From 0ccd10c27fbf94778553cea02f67d269df7c2854 Mon Sep 17 00:00:00 2001 From: Anton Gerasimov Date: Tue, 16 Jan 2018 18:51:19 +0100 Subject: Deploy startup.nsh before composing flashable image Additionally don't create extra images to save space and not confuse the user --- classes/sota_minnowboard.bbclass | 3 +++ 1 file changed, 3 insertions(+) (limited to 'classes') diff --git a/classes/sota_minnowboard.bbclass b/classes/sota_minnowboard.bbclass index 8417348..63510e3 100644 --- a/classes/sota_minnowboard.bbclass +++ b/classes/sota_minnowboard.bbclass @@ -4,4 +4,7 @@ EFI_PROVIDER_sota = "grub-efi" WKS_FILE_sota = "efiimage-sota.wks" IMAGE_BOOT_FILES_sota = "" +IMAGE_FSTYPES_remove_sota = "live hddimg" OSTREE_KERNEL_ARGS ?= "ramdisk_size=16384 rw rootfstype=ext4 rootwait rootdelay=2 console=ttyS0,115200 console=tty0" + +IMAGE_INSTALL_append = " minnowboard-efi-startup" -- cgit v1.2.3-54-g00ecf From 9e6d437d73aa990aff85d2cf456b77367be01920 Mon Sep 17 00:00:00 2001 From: Anton Gerasimov Date: Fri, 19 Jan 2018 16:38:13 +0100 Subject: Deploy initial primary version information --- classes/image_types_ostree.bbclass | 4 +++- classes/image_types_ota.bbclass | 5 +++++ 2 files changed, 8 insertions(+), 1 deletion(-) (limited to 'classes') diff --git a/classes/image_types_ostree.bbclass b/classes/image_types_ostree.bbclass index cf2e52f..dcc376d 100644 --- a/classes/image_types_ostree.bbclass +++ b/classes/image_types_ostree.bbclass @@ -12,6 +12,8 @@ IMAGE_DEPENDS_ostree = "ostree-native:do_populate_sysroot \ export OSTREE_REPO export OSTREE_BRANCHNAME +export GARAGE_TARGET_NAME + RAMDISK_EXT ?= ".ext4.gz" RAMDISK_EXT_arm ?= ".ext4.gz.u-boot" @@ -205,7 +207,7 @@ IMAGE_CMD_garagesign () { push_success=0 for push_retries in $( seq 3 ); do garage-sign targets pull --repo tufrepo --home-dir ${GARAGE_SIGN_REPO} - garage-sign targets add --repo tufrepo --home-dir ${GARAGE_SIGN_REPO} --name ${OSTREE_BRANCHNAME} --format OSTREE --version ${ostree_target_hash} --length 0 --url "https://example.com/" --sha256 ${ostree_target_hash} --hardwareids ${MACHINE} + garage-sign targets add --repo tufrepo --home-dir ${GARAGE_SIGN_REPO} --name ${GARAGE_TARGET_NAME} --format OSTREE --version ${ostree_target_hash} --length 0 --url "https://example.com/" --sha256 ${ostree_target_hash} --hardwareids ${MACHINE} garage-sign targets sign --repo tufrepo --home-dir ${GARAGE_SIGN_REPO} --key-name=targets errcode=0 garage-sign targets push --repo tufrepo --home-dir ${GARAGE_SIGN_REPO} || errcode=$? diff --git a/classes/image_types_ota.bbclass b/classes/image_types_ota.bbclass index 5dc4811..be9a017 100644 --- a/classes/image_types_ota.bbclass +++ b/classes/image_types_ota.bbclass @@ -53,6 +53,8 @@ export OSTREE_BRANCHNAME export OSTREE_REPO export OSTREE_BOOTLOADER +export GARAGE_TARGET_NAME + IMAGE_CMD_otaimg () { if ${@bb.utils.contains('IMAGE_FSTYPES', 'otaimg', 'true', 'false', d)}; then if [ -z "$OSTREE_REPO" ]; then @@ -106,6 +108,9 @@ IMAGE_CMD_otaimg () { mv ${HOME_TMP}/usr/homedirs/home ${PHYS_SYSROOT}/ || true # Ensure that /var/local exists (AGL symlinks /usr/local to /var/local) install -d ${PHYS_SYSROOT}/ostree/deploy/${OSTREE_OSNAME}/var/local + # Set package version for the first deployment + echo "{\"${ostree_target_hash}\":\"${GARAGE_TARGET_NAME}-${ostree_target_hash}\"}" > ${PHYS_SYSROOT}/ostree/deploy/${OSTREE_OSNAME}/var/sota/installed_versions + rm -rf ${HOME_TMP} # Calculate image type -- cgit v1.2.3-54-g00ecf