On Tue, 2015-06-02 at 20:03 +0800, Haojian Zhuang wrote:
On Tue, 2015-06-02 at 11:59 +0100, Ryan Harkin wrote:
I think the best way is to define Shell.efi as the default boot entry and then to provide startup.nsh on a boot device.
startup.nsh then contains a command to boot the kernel, eg:
Image dtb=file.dtb initrd=ramdisk.img <kernel commandline>
The only one issue is that there's no UART0 console on product HiKey board. So user has no chance to input anything.
But if you want a default BDS option to boot the kernel directly, you can also do this with type 0 device, set PcdDefaultBootDevicePath to be the path to your kernel image, then set PcdDefaultBootArgument to something like:
dtb=file.dtb initrd=ramdisk.img <kernel commandline>
i.e the same as before, only leave out the filename of the Image file.
I wouldn't use all that other stuff.
Could I create some boot entries by BootOptionCreate() in platform driver? (https://github.com/96boards/edk2/blob/hikey/HisiPkg/HiKeyPkg/Drivers/HiKeyDx...)
Hi all,
I implemented the multiple boot entries in this driver. https://github.com/hzhuang1/edk2/blob/bootentry/HisiPkg/HiKeyPkg/Drivers/HiK...
This driver create multiple boot entries successfully. At here, you'll get the "fastboot" and "debian on emmc" entries. It's based on whether "BootNext" is created. If "BootNext" variable is created by the driver, BDS won't create default boot entry by PCD values.
At last, the whole scenarios are in below. 1. After flushing the initial images in factory. System would try to load debian from eMMC directly if pin 5-6 isn't connected in J15 on HiKey board. Or system would try to run fastboot directly if pin 5-6 is connected in J15.
2. User select whether boot debian or android. Or boot from emmc or sd. (Use additional oem command in fastboot protocol.) $fastboot oem bootorder {index number} 0 -- fastboot 1 -- debian on emmc 2 -- debian on sd 3 -- android on emmc 4 -- android on sd 5 -- openembed on emmc 6 -- openembed on sd
When the boot order is specified, UEFI will always try the selected boot order.
3. User select whether uart0 or uart2 is the serial console. $fastboot oem serialconsole {console string} console string could be either "uart0" or "uart2". It'll only change the serial console of linux kernel. And it won't change the serial console in ATF or UEFI. By default, uart0 is the default serial console of linux kernel.
Do you have any opinion on these scenarios? If not, I'll continue on enabling these scenarios. Since we don't have serial port on hikey board, we have to create these scenarios to make it work.
By the way, do you support two different GPIO controllers in UEFI? PL061 gpio driver is only initialized with PCD value. It means that I can only enable 8 GPIO pins on hikey. It's the very strong limitation in design.
Best Regards Haojian