]> git.ipfire.org Git - people/ms/ipfire-2.x.git/commitdiff
u-boot: add support for OrangePi PC 2
authorArne Fitzenreiter <arne_f@ipfire.org>
Sun, 5 Jan 2025 14:14:19 +0000 (14:14 +0000)
committerArne Fitzenreiter <arne_f@ipfire.org>
Sun, 5 Jan 2025 14:14:19 +0000 (14:14 +0000)
this board can also boot with the OrangePi Zero+ u-boot
but then it not support video out.

Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
config/u-boot/boot.cmd
config/u-boot/uEnv.txt
lfs/u-boot

index dc634ca989f3d882c83c8029c722dba691ea1183..929d308622f4d49ba27132041abca312c14eae87 100644 (file)
@@ -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
index 21780a971d671a1df65236b17595c02c0bb46930..e4d40d1b1d9feaae9fd6ab58ab65a31e7255259d 100644 (file)
@@ -1,4 +1,3 @@
 KVER=xxxKVERxxx
-DTBSUNXI=sun8i-h3-nanopi-r1.dtb
 root_dev=UUID=xxxROOT-UUIDxxx
 SERIAL-CONSOLE=ON
index d686917b2d922b5b083fd51d1485d67d8cdc7a00..d92ab3012f03789fb57cc7d700d07c376e34a876 100644 (file)
@@ -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