

Code: Select all
ls -l <sdcard mountpoint>Code: Select all
fdisk -l /dev/<sdcard device>Sure, here are the contents of my SD card's ROOT directory.pingtoo wrote:NeddySeagoon,
This config use armstub=RPI_EFI.fd to start EFI bootloader.
jgaz,
I am interesting in this topic, I don't use EFI for myself, however I am playing u-boot on my RPI 1b, so I know a little bit of boot sequence.
I think to debug this, we need to first know what is content of SD card, We also want to see SD card partition table information. So if you can share,andCode: Select all
ls -l <sdcard mountpoint>For now, once we have these information we can better in sync to talk about what else is needed.Code: Select all
fdisk -l /dev/<sdcard device>
Code: Select all
# ls -l /mnt/microsd/
total 64
-rwxr-xr-x 1 root root 2057 Jan 23 17:06 0001-MdeModulePkg-UefiBootManagerLib-Signal-ReadyToBoot-o.patch
-rwxr-xr-x 1 root root 2426 Jan 23 17:06 0002-Check-for-Boot-Discovery-Policy-change.patch
-rwxr-xr-x 1 root root 2736 Jan 23 17:06 License.txt
-rwxr-xr-x 1 root root 5065 Jan 23 17:06 README.md
drwxr-xr-x 3 root root 4096 Jan 23 17:06 boot
-rwxr-xr-x 1 root root 230 Jan 23 17:06 config.txt
drwxr-xr-x 3 root root 4096 Jan 23 17:06 documentation
drwxr-xr-x 2 root root 4096 Jan 23 17:06 edk2
drwxr-xr-x 2 root root 4096 Jan 23 17:06 edk2-non-osi
drwxr-xr-x 2 root root 4096 Jan 23 17:06 edk2-platforms
drwxr-xr-x 2 root root 4096 Jan 23 17:06 extra
drwxr-xr-x 3 root root 4096 Jan 23 17:06 firmware
drwxr-xr-x 3 root root 4096 Jan 23 17:06 hardfp
drwxr-xr-x 6 root root 4096 Jan 23 17:06 modules
drwxr-xr-x 3 root root 4096 Jan 23 17:06 opt
Code: Select all
# ls -l /mnt/microsd/boot/
total 49924
-rwxr-xr-x 1 root root 18693 Jan 23 17:06 COPYING.linux
-rwxr-xr-x 1 root root 1594 Jan 23 17:06 LICENCE.broadcom
-rwxr-xr-x 1 root root 28418 Jan 23 17:06 bcm2708-rpi-b-plus.dtb
-rwxr-xr-x 1 root root 27790 Jan 23 17:06 bcm2708-rpi-b-rev1.dtb
-rwxr-xr-x 1 root root 28111 Jan 23 17:06 bcm2708-rpi-b.dtb
-rwxr-xr-x 1 root root 28032 Jan 23 17:06 bcm2708-rpi-cm.dtb
-rwxr-xr-x 1 root root 29267 Jan 23 17:06 bcm2708-rpi-zero-w.dtb
-rwxr-xr-x 1 root root 27856 Jan 23 17:06 bcm2708-rpi-zero.dtb
-rwxr-xr-x 1 root root 29305 Jan 23 17:06 bcm2709-rpi-2-b.dtb
-rwxr-xr-x 1 root root 29304 Jan 23 17:06 bcm2709-rpi-cm2.dtb
-rwxr-xr-x 1 root root 30170 Jan 23 17:06 bcm2710-rpi-2-b.dtb
-rwxr-xr-x 1 root root 32533 Jan 23 17:06 bcm2710-rpi-3-b-plus.dtb
-rwxr-xr-x 1 root root 31922 Jan 23 17:06 bcm2710-rpi-3-b.dtb
-rwxr-xr-x 1 root root 30157 Jan 23 17:06 bcm2710-rpi-cm3.dtb
-rwxr-xr-x 1 root root 31230 Jan 23 17:06 bcm2710-rpi-zero-2-w.dtb
-rwxr-xr-x 1 root root 31230 Jan 23 17:06 bcm2710-rpi-zero-2.dtb
-rwxr-xr-x 1 root root 52325 Jan 23 17:06 bcm2711-rpi-4-b.dtb
-rwxr-xr-x 1 root root 52457 Jan 23 17:06 bcm2711-rpi-400.dtb
-rwxr-xr-x 1 root root 52910 Jan 23 17:06 bcm2711-rpi-cm4.dtb
-rwxr-xr-x 1 root root 50224 Jan 23 17:06 bcm2711-rpi-cm4s.dtb
-rwxr-xr-x 1 root root 52476 Jan 23 17:06 bootcode.bin
-rwxr-xr-x 1 root root 7265 Jan 23 17:06 fixup.dat
-rwxr-xr-x 1 root root 5400 Jan 23 17:06 fixup4.dat
-rwxr-xr-x 1 root root 3170 Jan 23 17:06 fixup4cd.dat
-rwxr-xr-x 1 root root 8382 Jan 23 17:06 fixup4db.dat
-rwxr-xr-x 1 root root 8386 Jan 23 17:06 fixup4x.dat
-rwxr-xr-x 1 root root 3170 Jan 23 17:06 fixup_cd.dat
-rwxr-xr-x 1 root root 10229 Jan 23 17:06 fixup_db.dat
-rwxr-xr-x 1 root root 10227 Jan 23 17:06 fixup_x.dat
-rwxr-xr-x 1 root root 6272904 Jan 23 17:06 kernel.img
-rwxr-xr-x 1 root root 6635232 Jan 23 17:06 kernel7.img
-rwxr-xr-x 1 root root 7045464 Jan 23 17:06 kernel7l.img
-rwxr-xr-x 1 root root 8197595 Jan 23 17:06 kernel8.img
drwxr-xr-x 2 root root 24576 Jan 23 17:06 overlays
-rwxr-xr-x 1 root root 2974880 Jan 23 17:06 start.elf
-rwxr-xr-x 1 root root 2250656 Jan 23 17:06 start4.elf
-rwxr-xr-x 1 root root 805084 Jan 23 17:06 start4cd.elf
-rwxr-xr-x 1 root root 3746856 Jan 23 17:06 start4db.elf
-rwxr-xr-x 1 root root 2998120 Jan 23 17:06 start4x.elf
-rwxr-xr-x 1 root root 805084 Jan 23 17:06 start_cd.elf
-rwxr-xr-x 1 root root 4818728 Jan 23 17:06 start_db.elf
-rwxr-xr-x 1 root root 3721800 Jan 23 17:06 start_x.elf
Code: Select all
# fdisk -l /dev/mmcblk0
Disk /dev/mmcblk0: 119.08 GiB, 127865454592 bytes, 249737216 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x40b2a0ce
Device Boot Start End Sectors Size Id Type
/dev/mmcblk0p1 2048 2099199 2097152 1G c W95 FAT32 (LBA)
Code: Select all
# cat config.txt
arm_64bit=1
enable_uart=1
uart_2ndstage=1
enable_gic=1
armstub=RPI_EFI.fd
disable_commandline_tags=1
disable_overscan=1
device_tree_address=0x1f0000
device_tree_end=0x200000
dtoverlay=miniuart-bt
dtoverlay=upstream-pi4

Code: Select all
armstub=RPI_EFI.fdWell, I'm an idiot.NeddySeagoon wrote:jgaz,
You haveso the boot loader will try to load the file /mnt/microsd/boot/RPI_EFI.fd and run it before passing control to the kernel.Code: Select all
armstub=RPI_EFI.fd
If RPI_EFI.fd never returns, it won't do that.
I don't see your /mnt/microsd/boot/RPI_EFI.fd file.

Eww ... grub on a Pi4 ... if you are not careful :)https://github.com/pftf/RPi4 wrote: ... At this stage, you can press Esc to enter the firmware setup, F1 to launch the UEFI Shell, or, provided you also have an UEFI bootloader on the SD card or on a USB drive in efi/boot/bootaa64.efi, you can let the UEFI system run that (which will be the default if no action is taken). ...
Pingtoo, yeah, I'll definitely poke around the UEFI shell and have a look around.pingtoo wrote:The RPi4_UEFI_Firmware_v1.34.zip only provide you EFI bootloader, no kernel or anything else.
You will need to go into shell to see what was default setup and either put stuff to match the default setup or modify default to match your boot partition.
You can try to press <F1> to launch UEFI shell.
You can try "help" as command to see what this firmware offer.
Not sure what you want EFI for? if you want to boot linux (or any other EFI application) you can just setup EFI var to find the EFI application (Linux kernel can be one). Adding GRUB is just another layer of boot loader which I think is unnecessary.jgaz wrote:I have found basic instructions for deploying the GRUB bootloader to the Pi in order to bring up an OS kernel here: https://forums.raspberrypi.com/viewtopic.php?t=306511. I'll try those instructions in a bit. I'll also test the arm64 bootable Gentoo ISO and see if it plays nice with that setup. It has EFI support, so fingers-crossed.
