forked from brl/citadel
updated for appimg builder
This commit is contained in:
parent
07b3eb705d
commit
67b07c74e6
14
Makefile
14
Makefile
@ -1,9 +1,9 @@
|
||||
.PHONY: help docker-image docker-shell citadel-image citadel-kernel user-rootfs update-submodules
|
||||
.PHONY: help docker-image docker-shell citadel-image citadel-kernel user-rootfs update-submodules build-appimg install-build-deps
|
||||
|
||||
BASE_DIR = $(shell pwd)
|
||||
BASE_BINDMOUNT = type=bind,source=$(BASE_DIR),target=/home/builder/citadel
|
||||
DOCKER_RUN = docker run -it --mount $(BASE_BINDMOUNT) citadel-builder
|
||||
DOCKER_RUN_PRIV = docker run -it --privileged --mount $(BASE_BINDMOUNT) citadel-builder
|
||||
DOCKER_RUN = docker run -it --mount $(BASE_BINDMOUNT) citadel-builder
|
||||
DOCKER_RUN_PRIV = docker run -it --privileged --mount $(BASE_BINDMOUNT) citadel-builder
|
||||
|
||||
#
|
||||
# https://marmelab.com/blog/2016/02/29/auto-documented-makefile.html
|
||||
@ -27,9 +27,11 @@ citadel-kernel: ## Build citadel-kernel with bitbake
|
||||
bootloader: ## Build systemd-boot
|
||||
$(DOCKER_RUN) bash -c "source setup-build-env && bitbake systemd-boot"
|
||||
|
||||
user-rootfs: ## Build user-rootfs tarball with debootstrap and configuration scripts
|
||||
mkdir -p build/debootstrap
|
||||
$(DOCKER_RUN_PRIV) sudo scripts/build-user-rootfs-stage-one | tee build/debootstrap/build-user-rootfs.log
|
||||
build-appimg: ## Build an application image
|
||||
$(DOCKER_RUN_PRIV) sudo APPIMG_BUILDER_BASE=${PWD}/appimg-builder appimg-builder/stage-one.sh --no-confirm -z -d build/appimg
|
||||
|
||||
update-submodules: ## Retrieve or update submodule projects
|
||||
git submodule update --init
|
||||
|
||||
install-build-deps:
|
||||
sudo apt install --no-install-recommends build-essential python bzip2 cpio chrpath diffstat file texinfo inkscape libgmp-dev libmpc-dev libelf-dev
|
||||
|
@ -70,7 +70,7 @@ Before creating the installpack, some artifacts must exist in the build/images d
|
||||
* `make citadel-image` Creates: `images/citadel-image-intel-corei7-64.ext2`
|
||||
* `make citadel-kernel` Creates: `images/bzImage`
|
||||
* `make bootloader` Creates: `images/systemd-bootx64.efi`
|
||||
* `make user-rootfs` Creates: `debootstrap/user-rootfs.tar.xz`
|
||||
* `make appimg-rootfs` Creates: `appimg/appimg-rootfs.tar.xz`
|
||||
|
||||
After all of those components have been build, you can run `scripts/create_install_pack` which will create a file in the current directory called `installpack.tar`.
|
||||
|
||||
|
@ -16,7 +16,7 @@ image_file() {
|
||||
EFIBOOT=$(image_file systemd-bootx64.efi)
|
||||
KERNEL=$(image_file bzImage)
|
||||
ROOTFS=$(image_file citadel-image-intel-corei7-64.ext2)
|
||||
USER_ROOTFS=$(image_file ../debootstrap/user-rootfs.tar.xz)
|
||||
APPIMG_ROOTFS=$(image_file ../appimg/appimg-rootfs.tar.xz)
|
||||
HOWTO=$(image_file ../../docs/howto.md)
|
||||
INSTALL_SH=$(image_file ../../scripts/install.sh)
|
||||
|
||||
@ -51,7 +51,7 @@ rm -rf /tmp/installpack
|
||||
mkdir -p /tmp/installpack/components
|
||||
setup_boot
|
||||
cp ${ROOTFS} /tmp/installpack/components/citadel-image-rootfs.ext2
|
||||
cp ${USER_ROOTFS} /tmp/installpack/components/
|
||||
cp ${APPIMG_ROOTFS} /tmp/installpack/components/
|
||||
cp ${HOWTO} /tmp/installpack/components/
|
||||
cp ${INSTALL_SH} /tmp/installpack
|
||||
chmod +x /tmp/installpack/install.sh
|
||||
|
@ -141,7 +141,7 @@ install() {
|
||||
info "Installing base appimg tree"
|
||||
mkdir -p ${PRIMARY_ROOTFS}
|
||||
ln -s primary ${MNT}/appimg/default.appimg
|
||||
tar -C ${PRIMARY_ROOTFS} -xf components/user-rootfs.tar.xz
|
||||
tar -C ${PRIMARY_ROOTFS} -xf components/appimg-rootfs.tar.xz
|
||||
|
||||
mkdir -p ${PRIMARY_HOME}
|
||||
cp components/howto.md ${PRIMARY_HOME}
|
||||
@ -174,5 +174,3 @@ install ${1}
|
||||
unmount_disk
|
||||
sync
|
||||
info "Install completed successfully"
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user