X-Git-Url: https://gerrit.akraino.org/r/gitweb?p=ta%2Fbuild-tools.git;a=blobdiff_plain;f=dib_elements%2Fmyproduct%2Ffinalise.d%2F99-fix-grub-console;fp=dib_elements%2Fmyproduct%2Ffinalise.d%2F99-fix-grub-console;h=cb4e889069ddea1c9301d0dc2a1cdba519fe1cff;hp=951e39fd2d97a2076186b2752d54a8109c905dc0;hb=2dbc906c060a36a980da3dfcc2106512d17ab86a;hpb=fddfaa079633ecaba7fa6f5d375251b48c116bd1 diff --git a/dib_elements/myproduct/finalise.d/99-fix-grub-console b/dib_elements/myproduct/finalise.d/99-fix-grub-console index 951e39f..cb4e889 100755 --- a/dib_elements/myproduct/finalise.d/99-fix-grub-console +++ b/dib_elements/myproduct/finalise.d/99-fix-grub-console @@ -19,5 +19,16 @@ fi set -eu set -o pipefail -sed -i -e "s/console=ttyS0,115200/console=ttyS1,115200/g" /etc/default/grub +sed -i -e "s/console=ttyS0,115200/console=ttyS1,115200 console=ttyAMA0,115200/g" /etc/default/grub grub2-mkconfig -o /boot/grub2/grub.cfg + +# DIB only handles grub.cfg in /boot/grub2/grub.cfg, so we handle the UEFI grub.cfg explicitly +for efi_boot_dir in \ + /boot/efi/EFI/BOOT \ + /boot/efi/EFI/centos +do + if [ -d "${efi_boot_dir}" ]; then + rm -f "${efi_boot_dir}/grub.cfg" + cp /boot/grub2/grub.cfg "${efi_boot_dir}" + fi +done