![]() |
|
(real) Mainline U-boot finally works on SPI, boots SATA, throw away your SD cards NOW - Printable Version +- PINE64 (https://forum.pine64.org) +-- Forum: ROCKPRO64 (https://forum.pine64.org/forumdisplay.php?fid=98) +--- Forum: General Discussion on ROCKPRO64 (https://forum.pine64.org/forumdisplay.php?fid=99) +--- Thread: (real) Mainline U-boot finally works on SPI, boots SATA, throw away your SD cards NOW (/showthread.php?tid=19868) |
(real) Mainline U-boot finally works on SPI, boots SATA, throw away your SD cards NOW - aleksei - 06-21-2025 This is on Arch ARM* or Manjaro installed on RP64. If compiling on amd64 machine, set CROSS_COMPILE variables accordingly. Build ATF: Code: git clone --depth=1 -b v2.13.0 https://github.com/ARM-software/arm-trusted-firmware.git
make -j $(nproc) CC=gcc PLAT=rk3399 bl31Code: git clone --depth=1 -b v2025.04 https://source.denx.de/u-boot/u-boot.git
export BL31=/path/to/built/bl31.elf
make mrproper && make rockpro64-rk3399_defconfig
make menuconfigCode: CONFIG_BOOTDELAY=20
CONFIG_BOOTCOMMAND="bootflow scan -lbm"
CONFIG_CMD_ERASEENV=y
CONFIG_CMD_NVEDIT_LOAD=y
CONFIG_NO_NET=y
CONFIG_BAUDRATE=115200
CONFIG_USE_PREBOOT=y
CONFIG_PREBOOT="usb start"
CONFIG_PREBOOT_DEFINED=y
make -j $(nproc)Code: dd if=idbloader.img of=/dev/sdX seek=64
dd if=u-boot.itb of=/dev/sdX seek=16384
syncFlashing to SPI is much simpler nowadays, see doc/board/rockchip/rockchip.rst in U-boot source. Create a partition with FAT filesystem on the same SD card, place u-boot-rockchip-spi.bin on it, reboot, get to U-boot cmdline and: Code: sf probe
load mmc 1:1 $kernel_addr_r u-boot-rockchip-spi.bin
sf update $fileaddr 0 $filesizeU-boot environment section on SPI might be empty, broken or contain wrong variables. To get default environment for installed version of U-boot, remove situational partitions variable and save the environment to SPI, run in U-boot cmdline: Code: env default -a
env delete partitions
env saveThen create EFI partition on SATA disk and proceed like with a regular UEFI machine. U-boot from SPI will also scan SATA partitions for extlinux/extlinux.conf, boot.scr and other U-boot-specific boot configs. * On Arch, pacman -U these 3 pkgs from Manjaro (choose a mirror close to you) to build ATF: https://mirror.truenetwork.ru/manjaro/arm-stable/extra/aarch64/arm-none-eabi-newlib-4.2.0.20211231-1-any.pkg.tar.zst https://mirror.truenetwork.ru/manjaro/arm-stable/extra/aarch64/arm-none-eabi-gcc-12.1.0-1-aarch64.pkg.tar.zst https://mirror.truenetwork.ru/manjaro/arm-stable/extra/aarch64/arm-none-eabi-binutils-2.38-1-aarch64.pkg.tar.zst PS Screw this forum software inserting copious newlines on every press of preview button. |