Bug#824954: flash-kernel: please provide a way to integrate with GRUB
Let's assume U-Boot uses distroboot as described in doc/README.distro.
Environment variable boot_scripts decides which boot scripts are loaded.
The default value is
boot_scripts=boot.scr.uimg boot.scr
So if you create a boot script named boot.scr.uimg, it will override the
boot.scr created by flash-kernel.
flash-kernel creates a link /boot/dtb to the actual dtb.
So we do not need any variable part for calling grub.
Create a text file boot.txt like
# Booting Odroid C2 with grub
load mmc 0:2 0x1000000 dtb
load mmc 0:1 0x13000000 efi/debian/grubaa64.efi
bootefi 0x13000000 0x1000000
or
# Booting Odroid XU3/4 with grub
load mmc 0:2 0x43000000 dtb
load mmc 0:1 0x42000000 efi/debian/grubarm.efi
bootefi 0x42000000 0x43000000
Here I assumed that /boot/efi is partition 1 and /boot is partition 2.
Please, carefully verify the script for XU3/4. I have only tested on
Odroid C2.
Execute
mkimage -T script -d boot.txt uboot.scr.uimg
Copy file uboot.scr.uimg to the boot partition.
Now U-Boot will boot using uboot.scr.uimg and ignore the boot.scr that
flash-kernel keeps updating.
Best regards
Heinrich Schuchardt
Reply to: