On Mon, Feb 8, 2016 at 2:37 PM, Steve McIntyre steve.mcintyre@linaro.org wrote:
On Mon, Feb 08, 2016 at 03:35:36PM +0000, Grant Likely wrote:
Hi all,
I've spent some time over the past couple of days getting update-grub working on the hikey. It works for me, but I need some review. The solution consists of three parts:
- a new config file in /etc/default/kernel that can contain
KERNEL_DEVICETREE="<board-name>" 2) a new script in /etc/kernel/postinst.d/devicetree that copies the requested device tree file into /boot when KERNEL_DEVICETREE is set 3) a modifcation to /etc/grub.d/10_linux that will add the devicetree command when KERNEL_DEVICETREE is set.
Hmmmm. Other machines aren't needing to know the specific devicetree in this way.
That is probably because the firmware is providing a valid device tree by default.
I've also be partially successful using the grub-install tool. It will install the grubaa64.efi application correctly in (ESP)/EFI/debian/grubaa64.efi, but barfs when trying to update the EFI variables which is unsurprising. However, the system boots fine when I copy the installed grubaa64.efi into (ESP)/EFI/BOOT/grubaa64.efi
Oh, ugh. What's the problem with the EFI variables? From a Debian perspective, you could (almost) get away with using the workaround I developed for broken firmware that doesn't do EFI properly. See http://bugs.debian.org/746662 for the full story if you're interested. There's support in Debian to track this automatically, and it's preseedable too if you need that.
Isn't the variables here the runtime support (for efibootmng)? If so, that is not supported by hikey.
However (as Mark says), if it's looking for (ESP)/EFI/BOOT/grubaa64.efi then it's wrong. The removable media path should be (ESP)/EFI/BOOT/bootaa64.efi, or have you mis-typed that in your mail here? (I hope so!)
This is probably why (which is known to be broken):
HisiPkg/HiKeyPkg/Drivers/HiKeyDxe/InstallBootMenu.c [HIKEY_BOOT_ENTRY_BOOT_EMMC] = { L"VenHw(B549F005-4BD4-4020-A0CB-06F42BDA68C3)/HD(6,GPT,5C0F213C-17E1-4149-88C8-8B50FB4EC70E,0x7000,0x20000)/\EFI\BOOT\GRUBAA64.EFI", NULL, L"boot from eMMC", LOAD_OPTION_CATEGORY_APP },
I'm hoping this to be fixed with the edk2/openplatformpkg rework and upstreaming effort that was started a few weeks ago.
Cheers,