RPI 4B ARM64 booting up sequence details

RPI 4B ARM64 booting up sequence details 




The boot process for an ARM64 (AArch64) operating system on a Raspberry Pi involves several steps, particularly because of the unique way the Raspberry Pi uses its GPU for initial booting. Here’s a detailed overview:

Boot Process Overview:

  1. GPU Initialization: Unlike typical ARM devices, the Raspberry Pi's boot process starts with the GPU. The GPU is active first and uses the proprietary firmware (bootcode.bin) to initialize the SDRAM.
  2. Loading Bootloaders:
    • bootcode.bin: This is the first stage bootloader, which is stored on the SD card. It enables SDRAM and loads the next stage bootloader (loader.bin).
    • loader.bin: The second stage bootloader, which then loads start.elf or start4.elf (for Pi 4 models).
  3. Kernel Loading:
    • start.elf handles further GPU initialization and potentially loads the device tree blob (DTB) files if present. It then loads the kernel image (kernel8.img for ARM64 on Pi 3 and earlier models, or kernel.img on Pi 4 which can boot in both modes but defaults to 64-bit with the appropriate configuration).
    • For ARM64, the kernel is kernel8.img on Pi 3 and earlier models; on the Pi 4, kernel.img is used since the Pi 4 supports native 64-bit booting.
  4. Device Tree: The Raspberry Pi uses device tree blobs to describe the hardware to the kernel. These are crucial because they inform the kernel about the specifics of the hardware configuration without needing a BIOS.
  5. Kernel Execution: Once the kernel is loaded into memory, it starts executing. For ARM64, this involves the kernel handling the booting of secondary CPUs if present.
  6. System Initialization: After the kernel boots, it hands over to the system initialization process, which could be systemd, SysVinit, or another init system, depending on the OS installed.

Specific Considerations for ARM64 on Raspberry Pi:

  • Pi 3 and Earlier: These models require a specific binary blob for GPU to boot, which is why many distributions still come in 32-bit unless explicitly compiled for 64-bit (arm64). The Pi 3 can run 64-bit, but the boot process still relies on the GPU starting the process.
  • Pi 4: The Pi 4 has a modified boot process where it can natively boot in 64-bit mode without the need for the older GPU boot mechanism in the same way. The bootloader (bootcode.bin) has moved to an internal EEPROM for Pi 4, simplifying some aspects of the boot process.
  • Boot Configuration: You configure which kernel to load and other boot parameters in the config.txt file on the boot partition, which is formatted as FAT32. For 64-bit mode, you would set arm_64bit=1 and specify kernel=kernel8.img for older models or kernel=kernel.img for Pi 4.
  • Software Compatibility: Running 64-bit OS means you can only run software compiled for ARM64. However, Debian-based systems like Raspberry Pi OS have repositories for ARM64 packages, making it easier to install software.

Resources and Further Reading:
  • For detailed information on how to configure for ARM64 boot, including setting up the SD card and what needs to be included in config.txt, check out resources like Raspberry Pi's official documentation, Stack Exchange threads, and community guides.

This process ensures that the Raspberry Pi can leverage the full capabilities of its ARM64 architecture, offering better memory addressing and potential performance benefits for CPU-intensive tasks.
.
https://x.com/i/grok/share/AAWL2gdofEUOWFhPHwL18d2RE Link to the same GROK material above.

My material: write to EEPROM that value to boot from USB flash drive first 0xF41 , then microSD card 2nd.

Comments

  1. This comment has been removed by the author.

    ReplyDelete
  2. https://forums.freebsd.org/threads/howto-setup-diskless-booting-of-raspberry-pi-running-rpi-os-via-tftp-nfsv4-from-a-freebsd-zfs-server.92717/ Here is diskless booting of raspberry Pi OS .

    ReplyDelete

Post a Comment

Popular posts from this blog

HDMI Audio sound patches into GhostBSD source code /usr/ghost14/ghostbsd-src SOLVED Jan20 2024

January 19, 2024 Howto Download a Raspberry Pi 4B bootable image from http://ghostbsdarm64.hopto.org/packages/

How to install GhostBSD-Arm64 into a USB Flash Drive stick April 24, 2024 update edition.