Hi Leif,

I have been trying my hands-on on replacing the current Legacy BDS loader with 
the
EFI_STUB on a Freescale ARM64 SoC to load Linux and utilize the features of the 
EFI_STUB.

I am taking a reference from ARM juno support, where I am getting confused 
about a couple of points:

1. Legacy Linux Loader:

I see the following INF inclusion in 'ArmPlatformPkg.dsc'. What do we mean 
exactly by Legacy Linux Loader here? Is it
the built-in Linux Loader which ignores the stub (as you refer to it, in a 
HiKey related discussion: 
https://lists.96boards.org/pipermail/dev/2015-March/000083.html)

ArmPlatformPkg.dsc
----------------------
# Legacy Linux Loader
  ArmPkg/Application/LinuxLoader/LinuxLoader.inf


2. Passing a initramfs/initird to the kernel:

Using the reference from Juno board, I have added the following to my .dsc. 
This allows me to specify a ARM64 Image + DTB placed on NOR flash to the kernel 
and I see that using the BootMenu, I can boot the kernel partially with the 
same:

  gArmPlatformTokenSpaceGuid.PcdDefaultBootDescription|L"EFI Linux from NOR 
flash"
  
gArmPlatformTokenSpaceGuid.PcdDefaultBootDevicePath|L"MemoryMapped(0x0,0x61100000,0x62000000)/Image"
  
gEmbeddedTokenSpaceGuid.PcdFdtDevicePaths|L"MemoryMapped(0x0,0x63000000,0x638FFFFF)/fsl-dtb.dtb"
  gArmPlatformTokenSpaceGuid.PcdDefaultBootArgument|"console=ttyS0,115200 
root=/dev/ram0 earlycon=uart8250,0x21c0500,115200"

However, I cannot find a way to provide a .cpio based initramfs/initrd kept on 
the NOR flash to the kernel. 

Will I need to use other booting media like a SD card (rather than the NOR 
flash) and keep the Root-file-system there and invoke all the components
via a "startup.nsh" like script:

fs0:\Image dtb=fsl-dtb.dtb rootwait console=ttyS0,115200 root=/dev/ram0 
earlycon=uart8250,0x21c0500,115200 root=/dev/sda1

Here are my Linux boot logs:

Logs:
------

[1] EFI Linux from NOR flash
        - MemoryMapped(0x0,0x61100000,0x62000000)/Image
        - Arguments: console=ttyS0,115200 root=/dev/ram0 
earlycon=uart8250,0x21c0500,115200
[2] Shell
[3] Boot Manager
Start: 1
EFI stub: Booting Linux Kernel...
EFI stub: Using DTB from configuration table
Booting Linux on physical CPU 0x0
Initializing cgroup subsys cpu
Linux version 3.19.3+ .....

Regards,
Bhupesh
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to