From 67b07c74e64bdaf70c3218c488b0b14a32e5d66d Mon Sep 17 00:00:00 2001 From: Bruce Leidl Date: Wed, 7 Mar 2018 18:54:18 -0500 Subject: [PATCH] updated for appimg builder --- Makefile | 14 ++++++++------ README.md | 2 +- scripts/create_install_pack | 4 ++-- scripts/install.sh | 4 +--- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/Makefile b/Makefile index 804fa9e..a751982 100644 --- a/Makefile +++ b/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 diff --git a/README.md b/README.md index ff3ad4c..0dde6e9 100644 --- a/README.md +++ b/README.md @@ -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`. diff --git a/scripts/create_install_pack b/scripts/create_install_pack index 6084aa0..bc8dd8b 100755 --- a/scripts/create_install_pack +++ b/scripts/create_install_pack @@ -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 diff --git a/scripts/install.sh b/scripts/install.sh index a291734..47e9a7e 100755 --- a/scripts/install.sh +++ b/scripts/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" - -