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,
-- 
Jerome