From: Arne Fitzenreiter Date: Sun, 5 Jan 2025 14:14:19 +0000 (+0000) Subject: u-boot: add support for OrangePi PC 2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2e1528a90095ad8f0421d631f75844a7ad26e04c;p=people%2Fms%2Fipfire-2.x.git u-boot: add support for OrangePi PC 2 this board can also boot with the OrangePi Zero+ u-boot but then it not support video out. Signed-off-by: Arne Fitzenreiter --- diff --git a/config/u-boot/boot.cmd b/config/u-boot/boot.cmd index dc634ca98..929d30862 100644 --- a/config/u-boot/boot.cmd +++ b/config/u-boot/boot.cmd @@ -41,7 +41,11 @@ fi; # for compatiblity reasons set DTBSUNXI if we run on sunxi if test "${board}" = "sunxi"; then - setenv fdtfile ${DTBSUNXI}; + if test ${DTBSUNXI} = ""; then + echo ...; + else + setenv fdtfile ${DTBSUNXI}; + fi; fi; # Check if serial console is enabled diff --git a/config/u-boot/uEnv.txt b/config/u-boot/uEnv.txt index 21780a971..e4d40d1b1 100644 --- a/config/u-boot/uEnv.txt +++ b/config/u-boot/uEnv.txt @@ -1,4 +1,3 @@ KVER=xxxKVERxxx -DTBSUNXI=sun8i-h3-nanopi-r1.dtb root_dev=UUID=xxxROOT-UUIDxxx SERIAL-CONSOLE=ON diff --git a/lfs/u-boot b/lfs/u-boot index d686917b2..d92ab3012 100644 --- a/lfs/u-boot +++ b/lfs/u-boot @@ -127,6 +127,22 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) cd $(DIR_APP) && make distclean cd $(DIR_APP) && rm -f bl31.bin + # OrangePi PC 2 + cd $(DIR_APP) && rm -rf arm-trusted-firmware-$(ATF_VER) + cd $(DIR_APP) && tar axf $(DIR_DL)/arm-trusted-firmware-$(ATF_VER).tar.gz + cd $(DIR_APP)/arm-trusted-firmware-$(ATF_VER) && make PLAT=sun50i_a64 ARCH=aarch64 CROSS_COMPILE="aarch64-pc-linux-gnu-" DEBUG=0 bl31 + cd $(DIR_APP) && cp arm-trusted-firmware-$(ATF_VER)/build/sun50i_a64/release/bl31.bin bl31.bin + cd $(DIR_APP) && rm -rf arm-trusted-firmware-$(ATF_VER) + -mkdir -pv /usr/share/u-boot/orangepi_pc2 + cd $(DIR_APP) && make CROSS_COMPILE="" orangepi_pc2_config + cd $(DIR_APP) && sed -i -e 's!^CONFIG_IDENT_STRING=.*!CONFIG_IDENT_STRING=" OrangePi PC2 - IPFire.org"!' .config + cd $(DIR_APP) && make CROSS_COMPILE="" HOSTCC="gcc $(CFLAGS)" + cd $(DIR_APP) && install -v -m 644 u-boot-sunxi-with-spl.bin \ + /usr/share/u-boot/orangepi_pc2 + cd $(DIR_APP) && make distclean + cd $(DIR_APP) && rm -f bl31.bin + + # distrobootcmd support was removed for rockchip boards. Revert. cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/u-boot/u-boot-2024.10-revert_rockchip_distro_bootcmd_removal.patch