
Do you want to know RPI specific? or ARM in general?szatox wrote:Well, I do know that rpi4 uses GPU for hardware initialization, but it doesn't help me know how to prepare disk so it's recognized and can be booted from.
I'm specifically looking for detailed information about the things that go on the removable memory. Basically everyone talks about uboot, like it was the only bootloader in existence, but following the step-by-step guides that don't explain anything only guarantees I'm going to need those guides every single time I touch it. I want to know enough about its boot process to let me throw those guides out, or pick a different line of devices and still succeed.
Trusted boot on arm is a first for me. Is it true for pocket-size SBCs, or are you talking about server boards and so on?
When I bought my rpis they already came capable of booting from sd-card and from usb memory, I don't think I'll ever have enough of a reason to flash a new firmware into them. I can physically change the boot device in a matter of seconds, and it doesn't even require me to have a keyboard around.
what is "removable memory" reference here?things that go on the removable memory

Code: Select all
/boot/bcm2708-rpi-b-plus.dtb /boot/bcm2710-rpi-3-b-plus.dtb /boot/bcm2711-rpi-cm4.dtb /boot/bcm2712d0-rpi-5-b.dtb
/boot/bcm2708-rpi-b-rev1.dtb /boot/bcm2710-rpi-3-b.dtb /boot/bcm2711-rpi-cm4s.dtb /boot/bcm2837-rpi-3-a-plus.dtb
/boot/bcm2708-rpi-b.dtb /boot/bcm2710-rpi-cm0.dtb /boot/bcm2712-d-rpi-5-b.dtb /boot/bcm2837-rpi-3-b-plus.dtb
/boot/bcm2708-rpi-cm.dtb /boot/bcm2710-rpi-cm3.dtb /boot/bcm2712-rpi-5-b.dtb /boot/bcm2837-rpi-3-b.dtb
/boot/bcm2708-rpi-zero-w.dtb /boot/bcm2710-rpi-zero-2-w.dtb /boot/bcm2712-rpi-500.dtb /boot/bcm2837-rpi-cm3-io3.dtb
/boot/bcm2708-rpi-zero.dtb /boot/bcm2710-rpi-zero-2.dtb /boot/bcm2712-rpi-cm5-cm4io.dtb /boot/bcm2837-rpi-zero-2-w.dtb
/boot/bcm2709-rpi-2-b.dtb /boot/bcm2711-rpi-4-b.dtb /boot/bcm2712-rpi-cm5-cm5io.dtb
/boot/bcm2709-rpi-cm2.dtb /boot/bcm2711-rpi-400.dtb /boot/bcm2712-rpi-cm5l-cm4io.dtb
/boot/bcm2710-rpi-2-b.dtb /boot/bcm2711-rpi-cm4-io.dtb /boot/bcm2712-rpi-cm5l-cm5io.dtbCode: Select all
/boot/fixup.dat /boot/fixup4cd.dat /boot/fixup4x.dat /boot/fixup_db.dat
/boot/fixup4.dat /boot/fixup4db.dat /boot/fixup_cd.dat /boot/fixup_x.datCode: Select all
/boot/start.elf /boot/start4cd.elf /boot/start4x.elf /boot/start_db.elf
/boot/start4.elf /boot/start4db.elf /boot/start_cd.elf /boot/start_x.elfCode: Select all
/boot/kernel.img /boot/kernel7.img /boot/kernel7l.img /boot/kernel8.img /boot/kernel_2712.imgCode: Select all
...
kernel 6.12.32-v8-16k+
initramfs initramfs_1.cpio followkernel
device_tree=bcm2712-rpi-cm5-cm5io.dtb_6.12.32-v8-16k+
...
They come from raspberrypi firmware/. Look in /boot.="szatox"What are those fixup and start files, and where do they come from? It's been a damn long time since I made that image for my banana, but I'm pretty sure they weren't a thing yet.
Code: Select all
emerge raspberrypi-firmwareSee the github repo above. Looi in /boot again.szatox wrote:For boards without EEPROM, where does this bootcode.bin come from, where does it go, and what are its key features?
? Banana Pi? All this is irrelevant to you.bpi
I suspect that there are lots of standards. One for every vendor and a few left over.szatox wrote:Is there some standard for hardware discovery which lets boards introduce themselves to loader?
Code: Select all
8.56 [sdcard] pieeprom.upd not found
8.56 [sdcard] recover4.elf not found
8.57 [sdcard] recovery.elf not found
8.50 Read start4.elf bytes 2263968 hnd 0x4b09
8.55 Read fixup4.dat bytes 5456 hnd 0x481f
8.57 0x00c03112 0x00000000 0x00001fff
8.60 MEM GPU: 76 ARM: 948 TOTAL: 1024
8.50 Starting start4.elf @ 0xfec00200 partition 1
8.90 XHCI-STOP
8.90 xHC0 ver: 256 HCS: 05000420 fc000031 00e70004 HCC: 002841eb
8.91 USBSTS 18
8.91 PCI0 reset
9.00 +
MESS:00:00:09.106724:0: arasan: arasan_emmc_open
MESS:00:00:09.108385:0: arasan: arasan_emmc_set_clock C0: 0x00800000 C1: 0x000e0047 emmc: 200000000 actual: 390625 div: 0x00000100 target: 400000 min: 400000 max: 400000 delay: 5
MESS:00:00:09.228626:0: arasan: arasan_emmc_set_clock C0: 0x00800000 C1: 0x000e0047 emmc: 200000000 actual: 390625 div: 0x00000100 target: 400000 min: 400000 max: 400000 delay: 5
MESS:00:00:09.241498:0: arasan: arasan_emmc_set_clock C0: 0x00800f00 C1: 0x000e0047 emmc: 200000000 actual: 390625 div: 0x00000100 target: 400000 min: 390000 max: 400000 delay: 5
MESS:00:00:09.288509:0: boot-part: 1 fs-type: 0
MESS:00:00:09.289921:0: boot-part: 1 fs-type: 3
MESS:00:00:09.294306:0: arasan: arasan_emmc_set_clock C0: 0x00800f06 C1: 0x000e0207 emmc: 200000000 actual: 50000000 div: 0x00000002 target: 50000000 min: 0 max: 50000000 delay: 1
MESS:00:00:09.386042:0: brfs: File read: /mfs/sd/config.txt
MESS:00:00:09.389049:0: brfs: File read: 595 bytes
MESS:00:00:09.571607:0: HDMI1:EDID error reading EDID block 0 attempt 0
MESS:00:00:09.576108:0: HDMI1:EDID giving up on reading EDID block 0
MESS:00:00:09.587219:0: brfs: File read: /mfs/sd/config.txt
MESS:00:00:10.349609:0: gpioman: gpioman_get_pin_num: pin DISPLAY_DSI_PORT not defined
MESS:00:00:10.355159:0: gpioman: gpioman_get_pin_num: pin DISPLAY_DSI_PORT not defined
MESS:00:00:10.364193:0: *** Restart logging
MESS:00:00:10.365968:0: brfs: File read: 595 bytes
MESS:00:00:10.536801:0: hdmi: HDMI1:EDID error reading EDID block 0 attempt 0
MESS:00:00:10.541884:0: hdmi: HDMI1:EDID giving up on reading EDID block 0
MESS:00:00:10.647659:0: hdmi: HDMI1:EDID error reading EDID block 0 attempt 0
MESS:00:00:10.652733:0: hdmi: HDMI1:EDID giving up on reading EDID block 0
MESS:00:00:10.658330:0: hdmi: HDMI:hdmi_get_state is deprecated, use hdmi_get_display_state instead
MESS:00:00:10.667090:0: HDMI0: hdmi_pixel_encoding: 300000000
MESS:00:00:10.672562:0: HDMI1: hdmi_pixel_encoding: 300000000
MESS:00:00:10.699204:0: dtb_file 'bcm2711-rpi-4-b.dtb'
MESS:00:00:10.715871:0: brfs: File read: /mfs/sd/bcm2711-rpi-4-b.dtb
MESS:00:00:10.719160:0: Loaded 'bcm2711-rpi-4-b.dtb' to 0x3e0000 size 0xdb93
MESS:00:00:10.760592:0: brfs: File read: 56211 bytes
MESS:00:00:10.782804:0: brfs: File read: /mfs/sd/overlays/overlay_map.dtb
MESS:00:00:10.848413:0: brfs: File read: 5627 bytes
MESS:00:00:10.853671:0: brfs: File read: /mfs/sd/config.txt
MESS:00:00:10.856339:0: dtparam: sd_poll_once=true
MESS:00:00:10.888203:0: dtparam: audio=on
MESS:00:00:10.899715:0: brfs: File read: 595 bytes
MESS:00:00:10.905001:0: brfs: File read: /mfs/sd/overlays/disable-bt.dtbo
MESS:00:00:10.946799:0: Loaded overlay 'disable-bt'
MESS:00:00:11.033338:0: brfs: File read: 1073 bytes
MESS:00:00:11.037683:0: brfs: File read: /mfs/sd/overlays/disable-wifi.dtbo
MESS:00:00:11.064288:0: Loaded overlay 'disable-wifi'
MESS:00:00:11.102744:0: brfs: File read: 387 bytes
MESS:00:00:11.107816:0: brfs: File read: /mfs/sd/overlays/upstream-pi4.dtbo
MESS:00:00:11.268966:0: Loaded overlay 'upstream-pi4'
MESS:00:00:11.693024:0: brfs: File read: 2775 bytes
MESS:00:00:11.700529:0: Failed to open command line file 'cmdline.txt'
MESS:00:00:12.846735:0: brfs: File read: /mfs/sd/RPI_EFI.fd
MESS:00:00:12.849243:0: Loaded 'RPI_EFI.fd' to 0x0 size 0x3d0000
MESS:00:00:12.854993:0: No compatible kernel found
MESS:00:00:12.859481:0: Device tree loaded to 0x3e0000 (size 0xe1dc)
MESS:00:00:12.869698:0: uart: Set PL011 baud rate to 103448.300000 Hz
MESS:00:00:12.875938:0: uart: Baud rate change done...
MESS:00:00:12.877961:0: uart: Baud rate change done...
MESS:00:00:12.886930:0: gpioman: gpioman_get_pin_num: pin SDCARD_CONTROL_POWER not defined
NOTICE: BL31: v2.9(release):v2.9
NOTICE: BL31: Built : 17:09:05, May 24 2023
UEFI firmware (version UEFI Firmware v1.41 built at 15:58:53 on Feb 21 2025)
ESC (setup), F1 (shell), ENTER (boot).....
/------------------------------------------------------------------------------\
| File Explorer |
\------------------------------------------------------------------------------/
> EFI41,
[VenHw(100C2CFA-B586-4198-9B4C-1683D195B1DA)/HD(1,MB
R,0xFC19AF42,0x2000,0x100000)]
/------------------------------------------------------------------------------\
| |
| ^v=Move Highlight <Enter>=Select Entry Esc=Exit |
\------------------------------------------------------------------------------/
Raspberry Pi 4 Model B
BCM2711 (ARM Cortex-A72) 1.50 GHz
UEFI Firmware v1.41 4096 MB RAM
Select Language <English> Continue
> Device Manager
> Boot Manager
> Boot Maintenance Manager
Continue
Reset
^v=Move Highlight <Enter>=Select Entry
>>Start PXE over IPv4. GNU GRUB version 2.12
PXE-E18: Server response timeout.
Minimal BASH-like line editing is supported. For the first word, TAB
lists possible command completions. Anywhere else TAB lists possible
device or file completions. To enable less(1)-like paging, "set
pager=1".
grub>
grub>
grub>
grub>
grub> insmod part_msdos
grub> set root=(hd0,1)
grub> source /boot/grub/t-basic2.cfg
grub> boot
EFI stub: Booting Linux Kernel...
EFI stub: Loaded initrd from LINUX_EFI_INITRD_MEDIA_GUID device path
EFI stub: Using DTB from configuration table
EFI stub: Exiting boot services...
[ 0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd083]
[ 0.000000] Linux version 6.12.25+rpt-rpi-v8 (serge@raspberrypi.com) (aarch64-linux-gnu-gcc-12 (Debian 12.2.0-14) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40) #1 SMP PREEMPT Debian 1:6.12.25-1+rpt1 (2025-04-30)
[ 0.000000] KASLR enabled
[ 0.000000] random: crng init done
[ 0.000000] Machine model: Raspberry Pi 4 Model B Rev 1.2
[ 0.000000] efi: EFI v2.7 by https://github.com/pftf/RPi4
,,,

Code: Select all
# fdisk -l /dev/sdb
Disk /dev/sdb: 59.63 GiB, 64021856256 bytes, 125042688 sectors
Disk model: TF CARD Storage
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: 0x31c350a6
Device Boot Start End Sectors Size Id Type
/dev/sdb1 2048 524287 522240 255M c W95 FAT32 (LBA)
/dev/sdb2 524288 125042687 124518400 59.4G 83 Linux
Code: Select all
Disk /dev/sdb: 59.63 GiB, 64021856256 bytes, 125042688 sectors
Disk model: TF CARD Storage
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: 0x96831db9
Device Boot Start End Sectors Size Id Type
/dev/sdb1 16384 1064959 1048576 512M c W95 FAT32 (LBA)
/dev/sdb2 1064960 125042687 123977728 59.1G 83 Linux


