From 4346d9bc9a6ba1b271f61288d6fed613d9efca3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Dalleau?= <frederic.dalleau@collabora.com> Date: Wed, 13 Feb 2019 11:29:42 +0000 Subject: [PATCH] Add an empty u-boot environment to mx6qsabrelite images MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Apertis update manager needs a valid u-boot environment to handle the rollback. Do it an image generation so that every image distributed already have a valid env. Signed-off-by: Frédéric Dalleau <frederic.dalleau@collabora.com> --- apertis-image-mx6qsabrelite.yaml | 6 +++ apertis-ospack-minimal.yaml | 3 ++ apertis-ostree-rollback-commit.yaml | 44 ++++++++++++++++-- .../usr/share/u-boot-env-imx6/u-boot-env.txt | 1 + .../usr/share/u-boot-env-imx6/u-boot.env | Bin 0 -> 8192 bytes 5 files changed, 51 insertions(+), 3 deletions(-) create mode 100644 overlays/u-boot-env-imx6/usr/share/u-boot-env-imx6/u-boot-env.txt create mode 100644 overlays/u-boot-env-imx6/usr/share/u-boot-env-imx6/u-boot.env diff --git a/apertis-image-mx6qsabrelite.yaml b/apertis-image-mx6qsabrelite.yaml index b6b64c83..7034aaba 100644 --- a/apertis-image-mx6qsabrelite.yaml +++ b/apertis-image-mx6qsabrelite.yaml @@ -100,6 +100,12 @@ actions: source: /usr/lib/u-boot/mx6qsabrelite/u-boot.imx offset: {{ sector 2 }} + - action: raw + description: Install U-Boot environment + origin: filesystem + source: /usr/share/u-boot-env-imx6/u-boot.env + offset: 0xC0000 + - action: run description: "Save installed package status" chroot: false diff --git a/apertis-ospack-minimal.yaml b/apertis-ospack-minimal.yaml index fac28a3a..803e3290 100644 --- a/apertis-ospack-minimal.yaml +++ b/apertis-ospack-minimal.yaml @@ -93,6 +93,9 @@ actions: {{ if eq $architecture "armhf" }} - action: overlay source: overlays/initramfs-modules-imx6 + + - action: overlay + source: overlays/u-boot-env-imx6 {{ end }} - action: overlay diff --git a/apertis-ostree-rollback-commit.yaml b/apertis-ostree-rollback-commit.yaml index b3d41fa2..e6d8fc38 100644 --- a/apertis-ostree-rollback-commit.yaml +++ b/apertis-ostree-rollback-commit.yaml @@ -6,7 +6,7 @@ {{ $board := or .board "uefi" }} {{ $repourl := or .repourl "https://images.apertis.org/ostree/repo" }} {{ $osname := or .osname "apertis" }} -{{ $branch := or .branch (printf "%s/%s/%s-%s/%s-rollback" $osname $suite $architecture $board $type) }} +{{ $branch := or .branch (printf "%s/%s/%s-%s/%s" $osname $suite $architecture $board $type) }} {{ $ostree := or .ostree "repo" }} {{ $message := or .message "Update" }} @@ -15,6 +15,40 @@ architecture: {{ $architecture }} actions: + - action: image-partition + imagename: {{ $image }}.img +{{ if eq $type "minimal" }} + imagesize: 4G +{{end}} +{{ if eq $type "target" "development" }} + imagesize: 15G +{{end}} + partitiontype: gpt + gpt_gap: {{ sector 6144 }}b + + mountpoints: + - mountpoint: / + partition: system + - mountpoint: /boot + partition: boot + - mountpoint: /home + partition: general_storage + + partitions: + - name: boot + fs: ext2 + start: 6176s + end: 1024M + flags: [ boot ] + - name: system + fs: ext4 + start: 1024M + end: 3000M + - name: general_storage + fs: btrfs + start: 3000M + end: 100% + - action: ostree-deploy description: Deploying ostree onto image repository: {{ $ostree }} @@ -25,10 +59,14 @@ actions: - action: run chroot: false - command: "rm ${ROOTDIR}/usr/bin/updatectl" + command: "find ${ROOTDIR} -name updatectl 2>/dev/null" + + - action: run + chroot: false + command: "rm ${ROOTDIR}/ostree/deploy/apertis/deploy/*/usr/bin/updatectl" - action: ostree-commit repository: {{ $ostree }} - branch: {{ $branch }} + branch: {{ $branch }}-rollback subject: {{ $message }} rollback test commit diff --git a/overlays/u-boot-env-imx6/usr/share/u-boot-env-imx6/u-boot-env.txt b/overlays/u-boot-env-imx6/usr/share/u-boot-env-imx6/u-boot-env.txt new file mode 100644 index 00000000..dd2e9006 --- /dev/null +++ b/overlays/u-boot-env-imx6/usr/share/u-boot-env-imx6/u-boot-env.txt @@ -0,0 +1 @@ +bootcount=0 diff --git a/overlays/u-boot-env-imx6/usr/share/u-boot-env-imx6/u-boot.env b/overlays/u-boot-env-imx6/usr/share/u-boot-env-imx6/u-boot.env new file mode 100644 index 0000000000000000000000000000000000000000..005b4768b595a3bb7f8cfd68db9fcd13183efa31 GIT binary patch literal 8192 zcmeIuK@|WI6aYYB1W-T>1-Sbc?pu3L<nZ21gvnp~d&C;C=c*;8g8>5u3>YwAz<>b* d1`HT5V8DO@0|pEjFkrxd0RsjM7%=eKzy;qA*B<}? literal 0 HcmV?d00001 -- GitLab