Hi,
I need some help with EDK2 on HiKey (1). After updating my hikey_optee project (2) with the latest 96boards/edk2 (3), I can't boot anymore. Is Grub now required to boot Linux? It seems that boot menu entries are hardcoded in (4), or am I missing something?. I could not really tell by reviewing the commit logs. Well in any case I'm getting the following menu:
~~~~~~~~ Fail to start BootNext. The default boot selection will start in 1 seconds [1] fastboot [2] grub on eMMC [3] grub on SD [4] Shell [5] Boot Manager Start: ~~~~~~~~
Entries 1-3 seem to do nothing, and just return to the same menu. Prior to this, EDK2 would boot Linux immediately as en EFI application, thanks to some entries in HiKey.dsc (5), which now seems to be ignored (are they really? similar entries are still present in 96boards/hikey which tends to indicate they're not obsolete).
What should I do to boot my kernel? I'd rather avoid adding Grub to the boot sequence, which is already complex enough IMHO, but I can of course do that if it is the recommended architecture. Now, if I could simply adjust my HiKey.dsc, that would be great...
(1) https://github.com/96boards/edk2 (2) https://github.com/linaro-swg/hikey_optee (3) https://github.com/96boards/edk2/commits/4984b34 (4) https://github.com/96boards/edk2/blob/de234273/HisiPkg/HiKeyPkg/Drivers/HiKe... (5) https://github.com/linaro-swg/edk2/blob/1690ce6/HisiPkg/HiKeyPkg/HiKey.dsc#L...
Thanks,
On 08/10/2015 09:18 AM, Jerome Forissier wrote:
Hi,
I need some help with EDK2 on HiKey (1). After updating my hikey_optee project (2) with the latest 96boards/edk2 (3), I can't boot anymore. Is Grub now required to boot Linux? It seems that boot menu entries are hardcoded in (4), or am I missing something?. I could not really tell by reviewing the commit logs. Well in any case I'm getting the following menu:
Fail to start BootNext. The default boot selection will start in 1 seconds [1] fastboot [2] grub on eMMC [3] grub on SD [4] Shell [5] Boot Manager Start:
Entries 1-3 seem to do nothing, and just return to the same menu.
Entry 1 should take you to fastboot mode. Once in fastboot mode you should be able to just follow the instructions documented here [1] to flash the binaries to the target's eMMC from your development host. [1] https://github.com/96boards/documentation/wiki/HiKeyUEFI
is this what is failing for you?
Prior to this, EDK2 would boot Linux immediately as en EFI application, thanks to some entries in HiKey.dsc (5), which now seems to be ignored (are they really? similar entries are still present in 96boards/hikey which tends to indicate they're not obsolete).
What should I do to boot my kernel? I'd rather avoid adding Grub to the boot sequence, which is already complex enough IMHO, but I can of course do that if it is the recommended architecture. Now, if I could simply adjust my HiKey.dsc, that would be great...
(1) https://github.com/96boards/edk2 (2) https://github.com/linaro-swg/hikey_optee (3) https://github.com/96boards/edk2/commits/4984b34 (4) https://github.com/96boards/edk2/blob/de234273/HisiPkg/HiKeyPkg/Drivers/HiKe... (5) https://github.com/linaro-swg/edk2/blob/1690ce6/HisiPkg/HiKeyPkg/HiKey.dsc#L...
Thanks,
Dev mailing list Dev@lists.96boards.org https://lists.96boards.org/mailman/listinfo/dev
On Mon, Aug 10, 2015 at 3:27 PM, Jorge Ramirez-Ortiz < jorge.ramirez-ortiz@linaro.org> wrote:
On 08/10/2015 09:18 AM, Jerome Forissier wrote:
Hi,
I need some help with EDK2 on HiKey (1). After updating my hikey_optee project (2) with the latest 96boards/edk2 (3), I can't boot anymore. Is Grub now required to boot Linux? It seems that boot menu entries are hardcoded in (4), or am I missing something?. I could not really tell by reviewing the commit logs. Well in any case I'm getting the following
menu:
Fail to start BootNext. The default boot selection will start in 1 seconds [1] fastboot [2] grub on eMMC [3] grub on SD [4] Shell [5] Boot Manager Start:
Entries 1-3 seem to do nothing, and just return to the same menu.
Entry 1 should take you to fastboot mode. Once in fastboot mode you should be able to just follow the instructions documented here [1] to flash the binaries to the target's eMMC from your development host. [1] https://github.com/96boards/documentation/wiki/HiKeyUEFI
is this what is failing for you?
Ah, thanks for pointing me to the wiki -- I realized I had not copied the fastboot binary as 'fastboot.efi' to the boot partition. It's nice to be able to boot into fastboot directly with J15 5-6 closed, and avoid going through recovery mode.
At first, grub is now required to boot Linux.
In the second, all boot entries are always hardcoded even before grub integrated. Since someone may not have serial port to monitor, I have to create all boot entries by default. It could avoid hikey becoming brick by accident. But developer can change it. The key is 'autoboot' that you could find it in the wiki of hikey UEFI.
@ enable autoboot that will create all boot entries and boot automatically. #sudo fastboot oem autoboot 1
@ disable autoboot #sudo fastboot oem autoboot 0
If you disable the autoboot, you could add any boot entry by UEFI boot manager as you wish.
At last, don't change HiKey.dsc for creating any boot entry. It's not good.
Regards Haojian
Date: Mon, 10 Aug 2015 15:18:12 +0200 From: jerome.forissier@linaro.org To: dev@lists.96boards.org Subject: [Dev] HiKey boot issue with recent 96boards/edk2
Hi, I need some help with EDK2 on HiKey (1). After updating my hikey_optee project (2) with the latest 96boards/edk2 (3), I can't boot anymore. Is Grub now required to boot Linux? It seems that boot menu entries are hardcoded in (4), or am I missing something?. I could not really tell by reviewing the commit logs. Well in any case I'm getting the following menu: ~~~~~~~~ Fail to start BootNext. The default boot selection will start in 1 seconds [1] fastboot [2] grub on eMMC [3] grub on SD [4] Shell [5] Boot Manager Start: ~~~~~~~~ Entries 1-3 seem to do nothing, and just return to the same menu. Prior to this, EDK2 would boot Linux immediately as en EFI application, thanks to some entries in HiKey.dsc (5), which now seems to be ignored (are they really? similar entries are still present in 96boards/hikey which tends to indicate they're not obsolete). What should I do to boot my kernel? I'd rather avoid adding Grub to the boot sequence, which is already complex enough IMHO, but I can of course do that if it is the recommended architecture. Now, if I could simply adjust my HiKey.dsc, that would be great... (1) https://github.com/96boards/edk2(2) https://github.com/linaro-swg/hikey_optee(3) https://github.com/96boards/edk2/commits/4984b34(4) https://github.com/96boards/edk2/blob/de234273/HisiPkg/HiKeyPkg/Drivers/HiKe...) https://github.com/linaro-swg/edk2/blob/1690ce6/HisiPkg/HiKeyPkg/HiKey.dsc#L... Thanks,-- Jerome
_______________________________________________ Dev mailing list Dev@lists.96boards.org https://lists.96boards.org/mailman/listinfo/dev
On Mon, Aug 10, 2015 at 3:27 PM, Haojian Zhuang haojian.zhuang@outlook.com wrote:
At first, grub is now required to boot Linux.
OK, I will add Grub to my config. Can you provide some pointers on how to generate the required files? It looks like I need grubaa64.efi and maybe a grub.cfg?
In the second, all boot entries are always hardcoded even before grub integrated. Since someone may not have serial port to monitor, I have to create all boot entries by default. It could avoid hikey becoming brick by accident. But developer can change it. The key is 'autoboot' that you could find it in the wiki of hikey UEFI.
@ enable autoboot that will create all boot entries and boot automatically. #sudo fastboot oem autoboot 1
@ disable autoboot #sudo fastboot oem autoboot 0
If you disable the autoboot, you could add any boot entry by UEFI boot manager as you wish.
Nice!
At last, don't change HiKey.dsc for creating any boot entry. It's not good.
Got it :) Hopefully I can use 96boards/edk2 unmodified, if I can manage to setup grub correctly that is.
Thanks,
On Tue, 2015-08-11 at 13:59 +0200, Jerome Forissier wrote:
On Mon, Aug 10, 2015 at 3:27 PM, Haojian Zhuang haojian.zhuang@outlook.com wrote: At first, grub is now required to boot Linux.
OK, I will add Grub to my config. Can you provide some pointers on how to generate the required files? It looks like I need grubaa64.efi and maybe a grub.cfg?
You could get grubaa64.efi & grub.cfg from the link in below. https://builds.96boards.org/snapshots/hikey/linaro/grub/latest/
Regards Haojian
On Tue, Aug 11, 2015 at 2:15 PM, Haojian Zhuang haojian.zhuang@linaro.org wrote:
On Tue, 2015-08-11 at 13:59 +0200, Jerome Forissier wrote:
On Mon, Aug 10, 2015 at 3:27 PM, Haojian Zhuang haojian.zhuang@outlook.com wrote: At first, grub is now required to boot Linux.
OK, I will add Grub to my config. Can you provide some pointers on how to generate the required files? It looks like I need grubaa64.efi and maybe a grub.cfg?
You could get grubaa64.efi & grub.cfg from the link in below. https://builds.96boards.org/snapshots/hikey/linaro/grub/latest/
Thanks, I'll take grub.cfg as a template. However I'm trying to avoid using pre-built binaries unless I have no other option (e.g., closed source files such as mcuimage.bin or nvme.img). How did you generate grubaa64.efi? With grub-mkimage?
Regards,
On Tue, 2015-08-11 at 14:27 +0200, Jerome Forissier wrote:
On Tue, Aug 11, 2015 at 2:15 PM, Haojian Zhuang haojian.zhuang@linaro.org wrote: On Tue, 2015-08-11 at 13:59 +0200, Jerome Forissier wrote: > > > On Mon, Aug 10, 2015 at 3:27 PM, Haojian Zhuang > haojian.zhuang@outlook.com wrote: > At first, grub is now required to boot Linux. > > > > OK, I will add Grub to my config. Can you provide some pointers on how > to generate the required files? It looks like I need grubaa64.efi and > maybe a grub.cfg? You could get grubaa64.efi & grub.cfg from the link in below. https://builds.96boards.org/snapshots/hikey/linaro/grub/latest/
Thanks, I'll take grub.cfg as a template. However I'm trying to avoid using pre-built binaries unless I have no other option (e.g., closed source files such as mcuimage.bin or nvme.img). How did you generate grubaa64.efi? With grub-mkimage?
Here is the reference to you. You could get the final one from fathi's build script file.
# apt-get update # apt-get install grub-efi-arm64-bin # mkdir -p /boot/grub # echo 'configfile (hd0,gpt6)/grub/grub.cfg' /boot/grub.configfile cat << EOF /boot/grub/grub.cfg set default="0" set timeout=10
menuentry 'HiKey' { insmod ext2 insmod fat insmod part_gpt insmod part_msdos set root='hd0,gpt6' linux /Image console=ttyAMA3,115200 root=/dev/disk/by-partlabel/system ro rootwait efi=noruntime initrd /initrd.img devicetree /hi6220-hikey.dtb } EOF
# grub-mkimage \ --verbose \ --config=/boot/grub.configfile \ --output=grubaa64.efi \ --format=arm64-efi \ --prefix='(hd0,gpt6)/grub' \ boot chain configfile efinet ext2 fat gettext help hfsplus loadenv lsefi normal normal ntfs ntfscomp part_gpt part_msdos read search search_fs_file search_fs_uuid search_label terminal terminfo tftp linux
On Tue, Aug 11, 2015 at 2:54 PM, Haojian Zhuang haojian.zhuang@linaro.org wrote:
On Tue, 2015-08-11 at 14:27 +0200, Jerome Forissier wrote:
On Tue, Aug 11, 2015 at 2:15 PM, Haojian Zhuang haojian.zhuang@linaro.org wrote: On Tue, 2015-08-11 at 13:59 +0200, Jerome Forissier wrote: > > > On Mon, Aug 10, 2015 at 3:27 PM, Haojian Zhuang > haojian.zhuang@outlook.com wrote: > At first, grub is now required to boot Linux. > > > > OK, I will add Grub to my config. Can you provide some pointers on how > to generate the required files? It looks like I need grubaa64.efi and > maybe a grub.cfg?
You could get grubaa64.efi & grub.cfg from the link in below. https://builds.96boards.org/snapshots/hikey/linaro/grub/latest/
Thanks, I'll take grub.cfg as a template. However I'm trying to avoid using pre-built binaries unless I have no other option (e.g., closed source files such as mcuimage.bin or nvme.img). How did you generate grubaa64.efi? With grub-mkimage?
Here is the reference to you. You could get the final one from fathi's build script file.
# apt-get update # apt-get install grub-efi-arm64-bin # mkdir -p /boot/grub # echo 'configfile (hd0,gpt6)/grub/grub.cfg' /boot/grub.configfile cat << EOF /boot/grub/grub.cfg set default="0" set timeout=10
menuentry 'HiKey' { insmod ext2 insmod fat insmod part_gpt insmod part_msdos set root='hd0,gpt6' linux /Image console=ttyAMA3,115200 root=/dev/disk/by-partlabel/system ro rootwait efi=noruntime initrd /initrd.img devicetree /hi6220-hikey.dtb } EOF
# grub-mkimage \ --verbose \ --config=/boot/grub.configfile \ --output=grubaa64.efi \ --format=arm64-efi \ --prefix='(hd0,gpt6)/grub' \ boot chain configfile efinet ext2 fat gettext help hfsplus loadenv lsefi normal normal ntfs ntfscomp part_gpt part_msdos read search search_fs_file search_fs_uuid search_label terminal terminfo tftp linux
Many thanks Haojian/Fathi. Everything is working now. And I have learned a bit about GRUB2 ;-)
Regards,