diff options
author | Dominig ar Foll Intel Open Source <dominig.arfoll@fridu.net> | 2017-12-18 09:49:40 +0100 |
---|---|---|
committer | Jan-Simon Moeller <jsmoeller@linuxfoundation.org> | 2017-12-18 15:20:08 +0000 |
commit | 383aa265471628c778b1caa1a857a4469227eca8 (patch) | |
tree | b91afc46a4c8ba9bc7a3666ae98b0dfa2b42a105 /scripts/mkefi-agl.sh | |
parent | 61e887f49112017c6dc456c040d10c7e6cc50efa (diff) |
Adding mkabl to support MRB platforms (non signed kernel) and detection/rejection of configiguration with initrd=microcode.cpio
Change-Id: Iff7cbd34fb8abd0f0860fe183018a2d9a133614e
Signed-off-by: Dominig ar Foll Intel Open Source <dominig.arfoll@fridu.net>
Reviewed-on: https://gerrit.automotivelinux.org/gerrit/12663
Tested-by: Jenkins Job builder account <agl-jobbuilder@automotivelinux.org>
ci-image-build: Jenkins Job builder account <agl-jobbuilder@automotivelinux.org>
Reviewed-by: Jan-Simon Moeller <jsmoeller@linuxfoundation.org>
Diffstat (limited to 'scripts/mkefi-agl.sh')
-rwxr-xr-x | scripts/mkefi-agl.sh | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/scripts/mkefi-agl.sh b/scripts/mkefi-agl.sh index e3240a6e5..43a0c3e7f 100755 --- a/scripts/mkefi-agl.sh +++ b/scripts/mkefi-agl.sh @@ -25,7 +25,7 @@ # - keep initrd if present # - create a grub config with PARTUID to ease boot from various devices automaticaly # - add a UEFI startup.nsh script for autoboot -# - does not allocate swap +# - remove any configured swap is fstab # - accept .hddimg, wic and wic.xz as sources LANG=C @@ -450,7 +450,10 @@ if [ -e "$GRUB_CFG" ]; then sed -i "/menuentry 'install'/,/^}/d" $GRUB_CFG # Delete any LABEL= strings sed -i "s/ LABEL=[^ ]*/ /" $GRUB_CFG - + # detect config initrd=microcode.cpio + if grep -q microcode $GRUB_CFG; then + warn "initrd=microcode.cpio detected, might not work on all boot configurations" + fi sed -i "s@ root=[^ ]*@ @" $GRUB_CFG sed -i "s@vmlinuz @vmlinuz root=$ROOTFS_PARTUUID @" $GRUB_CFG fi @@ -470,7 +473,10 @@ if [ -e "$SYSTEMDBOOT_CFG" ]; then fi # Delete any LABEL= strings sed -i "s/ LABEL=[^ ]*/ /" $SYSTEMDBOOT_BOOT - + # detect config initrd=microcode.cpio + if grep -q microcode $SYSTEMDBOOT_BOOT; then + warn "initrd=microcode.cpio detected, might not work on all boot configurations" + fi sed -i "s@ root=[^ ]*@ @" $SYSTEMDBOOT_BOOT sed -i "s@options @options root=$ROOTFS_PARTUUID @" $SYSTEMDBOOT_BOOT fi @@ -488,6 +494,8 @@ if [ $DEBUG -eq 1 ] && [ $? -eq 0 ]; then else cp -a $HDDIMG_ROOTFS_MNT/* $ROOTFS_MNT 1>&3 2>&1 || die "Root FS copy failed" fi +debug "removing any swap entry in /etc/fstab" +sed --in-place '/swap/d' $ROOTFS_MNT/etc/fstab printf "flushing data on removable device. May take a while ... " sync --file-system $ROOTFS_MNT |