Initial Commit

- initial default booting image
This commit is contained in:
2026-11-06 20:45:42 +01:00
commit b8783708ae
15201 changed files with 602532 additions and 0 deletions

View File

@@ -0,0 +1,43 @@
image efi-part.vfat {
vfat {
file EFI {
image = "efi-part/EFI"
}
file Image {
image = "Image"
}
}
size = 64M
}
image disk.img {
hdimage {
partition-table-type = "gpt"
}
partition loader1 {
image = "idbloader.img"
partition-type-uuid = 8DA63339-0007-60C0-C436-083AC8230908
offset = 32K
}
partition loader2 {
image = "u-boot.itb"
partition-type-uuid = 8DA63339-0007-60C0-C436-083AC8230908
offset = 8M
}
partition boot {
image = "efi-part.vfat"
partition-type-uuid = esp
offset = 16M
bootable = true
}
partition root {
partition-type-uuid = root-arm64
image = "rootfs.ext2"
}
}

View File

@@ -0,0 +1,6 @@
set default="0"
set timeout="5"
menuentry "Buildroot" {
linux /Image root=PARTLABEL=root rootwait
}

View File

@@ -0,0 +1,6 @@
CONFIG_BLK_DEV_NVME=y
CONFIG_DWMAC_ROCKCHIP=y
CONFIG_PCIE_ROCKCHIP_HOST=y
CONFIG_PHY_ROCKCHIP_PCIE=y
CONFIG_STMMAC_ETH=y
CONFIG_STMMAC_PLATFORM=y

View File

@@ -0,0 +1,2 @@
# Locally calculated
sha256 6fd749e53c455aec3418288630544e7552bbffab4442ddc48b20ebef9aee87ff arm-trusted-firmware-v2.14-git4.tar.gz

View File

@@ -0,0 +1,2 @@
# From https://cdn.kernel.org/pub/linux/kernel/v6.x/sha256sums.asc
sha256 f850139ca5f79c1bf6bb8b32f92e212aadca97bdaef8a83a7cf4ac4d6a525fab linux-6.18.4.tar.xz

View File

@@ -0,0 +1,2 @@
# Locally calculated
sha256 464b3bf5bc4a61830357dbf81a0e5b89414d3bca1c2a752570cb0e40d2f1e637 optee-client-4.8.0.tar.gz

View File

@@ -0,0 +1,2 @@
# Locally calculated
sha256 5222cd553f5edb69ae4ec7cb99b2bfec2c47a47c0be1865b49744701918e8b4d optee-os-4.8.0.tar.gz

View File

@@ -0,0 +1,2 @@
# Locally calculated
sha256 b60d5865cefdbc75da8da4156c56c458e00de75a49b80c1a2e58a96e30ad0d54 u-boot-2026.01.tar.bz2

View File

@@ -0,0 +1,6 @@
#!/bin/sh
set -eu
# Copy the firmware for the SPI NOR flash into the filesystem.
install -v -D -m 0644 "$BINARIES_DIR/u-boot-rockchip-spi.bin" \
"$TARGET_DIR/lib/firmware/u-boot-rockchip-spi.bin"

View File

@@ -0,0 +1,7 @@
#!/bin/sh
set -eu
BOARD_DIR=$(dirname "$0")
# Override the default GRUB configuration file with our own.
cp -vf "${BOARD_DIR}/grub.cfg" "${BINARIES_DIR}/efi-part/EFI/BOOT/grub.cfg"

View File

@@ -0,0 +1,116 @@
Introduction
============
The rockpro64_ebbr_defconfig is meant to illustrate some aspects of the Arm EBBR
specification[1] and the Arm SystemReady Devicetree band[2].
It allows building an AArch64 disk image with a U-Boot based firmware
implementing the subset of UEFI defined by EBBR, as well as a Linux OS booting
with UEFI, to run on the PINE64 ROCKPro64. [3]
Building
========
$ make rockpro64_ebbr_defconfig
$ make
Generated files under output/images:
* disk.img: An eMMC or SD card disk image comprising TF-A, OP-TEE, the U-Boot
bootloader, the GRUB bootloader, the Linux kernel and the root filesystem.
* u-boot-rockchip-spi.bin: A firmware image suitable for flashing in SPI NOR
comprising TF-A, OP-TEE and the U-Boot bootloader (also included in the
root filesystem).
Running
=======
Create a bootable SD card:
# dd if=output/images/disk.img of=<sdcard device> ; sync
Connect to the UART console; the pin layout for serial console on PI-2 GPIO Bus
is as follows:
Pin Signal
--- ------
6 GND
8 Tx out of RK3399
10 Rx into RK3399
Voltage is 3V3, baudrate is 1500000.
If necessary, connect a jumper between pins 23 and 25 to force SD card boot. [4]
Flashing the firmware to SPI NOR
--------------------------------
It is possible to flash the firmware into the embedded SPI NOR, which makes the
SD card fully available to the OS and also allows to boot from USB2 or NVMe.
The SPI image and the mtd tools are included in the root filesystem; flash the
firmware from Linux with the following command:
# flashcp -v /lib/firmware/u-boot-rockchip-spi.bin /dev/mtd0
With the firmware in SPI NOR, it is possible to install or run another OS
supporting the EBBR specification.
The image generated by the aarch64_efi_defconfig, the images from Linux
distributions such as Debian, Fedora, openSUSE or Ubuntu, and the Arm ACS
Devicetree images[5] are examples of compatible OS images.
Firmware details
================
Noteworthy firmware features:
- TF-A, OP-TEE & U-Boot
- UEFI, with EFI variables stored on disk in the ESP
- Support for ethernet, USB2 and NVMe
- RTC emulation
- U-Boot environment in SPI NOR
Architecture diagram:
Non-Secure : Secure
:
+---------------------+ :
EL0 | Busybox | :
+---------------------+ : +--------+
EL1 | U-Boot, GRUB, Linux | : | OP-TEE | S-EL1
+---------------------+ : +--------+
.............................:
+----------------------------------+
| ROM, U-Boot TPL, SPL, TF-A | EL3
+----------------------------------+
Boot flow:
ROM -+-> TPL
`-> SPL -> TF-A -+-> OP-TEE
`-> U-Boot -> GRUB -> Linux -> Busybox
The ROM loads U-Boot TPL and SPL. [7][8]
U-Boot TPL does the DRAM setup, goes back to the ROM, which calls SPL.
U-Boot SPL loads the fit image with TF-A, OP-TEE, U-Boot and the Devicetree.
OP-TEE amends the Devicetree, calls back TF-A to go to normal world.
U-Boot loads GRUB with UEFI, boots Linux.
Miscellaneous
=============
This configuration is inspired by the rockpro64_defconfig, the other
configurations related with EBBR and the Arm SystemReady Devicetree Band
Integration and Testing Guide[6].
Firmware update, eMMC and battery-backed RTC are currently not supported.
[1] https://github.com/ARM-software/ebbr
[2] https://www.arm.com/architecture/system-architectures/systemready-compliance-program/systemready-devicetree-band
[3] https://www.pine64.org/rockpro64/
[4] https://pine64.org/documentation/ROCKPro64/Getting_started/
[5] https://github.com/ARM-software/arm-systemready/tree/main/SystemReady-devicetree-band/prebuilt_images
[6] https://developer.arm.com/documentation/DUI1101/latest/
[7] https://wiki.pine64.org/wiki/RK3399_boot_sequence
[8] https://opensource.rock-chips.com/wiki_Boot_option

View File

@@ -0,0 +1,19 @@
# CONFIG_SPL_ATF_NO_PLATFORM_PARAM is not set
CONFIG_BOOTM_OPTEE=y
CONFIG_CMD_BOOTEFI_HELLO=y
CONFIG_CMD_BOOTEFI_SELFTEST=y
CONFIG_CMD_DATE=y
CONFIG_CMD_EFIDEBUG=y
CONFIG_CMD_NVEDIT_EFI=y
CONFIG_CMD_RNG=y
CONFIG_CMD_RTC=y
CONFIG_CMD_SETEXPR=y
CONFIG_DM_RTC=y
CONFIG_EFI_HTTP_BOOT=y
CONFIG_EFI_RT_VOLATILE_STORE=y
CONFIG_EFI_SET_TIME=y
CONFIG_OPTEE=y
CONFIG_OPTEE_LIB=y
CONFIG_OPTEE_TZDRAM_SIZE=0x02000000
CONFIG_RTC_EMULATION=y
CONFIG_TEE=y