]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
u-boot: add nanopi r2s build
authorArne Fitzenreiter <arne_f@ipfire.org>
Sun, 3 Oct 2021 07:39:04 +0000 (07:39 +0000)
committerArne Fitzenreiter <arne_f@ipfire.org>
Sun, 3 Oct 2021 07:39:04 +0000 (07:39 +0000)
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
config/rootfiles/common/aarch64/u-boot
lfs/u-boot

index 5b2d5cf09debc21a5e9258dcd0b94c7d73ab1d98..4b08707e3b6057812876cf0e0905bc6077257eb7 100644 (file)
@@ -5,7 +5,6 @@ boot/uEnv.txt
 boot/uboot.env
 boot/u-boot-rpi3.bin
 boot/u-boot-rpi4.bin
-#usr/share/u-boot
-#usr/share/u-boot/rpi
+usr/share/u-boot/nanopi_r2s/u-boot-rockchip.bin
 usr/share/u-boot/rpi/u-boot-rpi3.bin
 usr/share/u-boot/rpi/u-boot-rpi4.bin
index 9f3addd29cc2d5c1cccf0a21db089372d5599246..b245d529198798f6a980f73fb84d641e706307ca 100644 (file)
@@ -33,15 +33,19 @@ DIR_APP    = $(DIR_SRC)/$(THISAPP)
 TARGET     = $(DIR_INFO)/$(THISAPP)-$(MKIMAGE)
 SUP_ARCH   = armv6l aarch64
 
+CFLAGS    := $(patsubst -fstack-protector-strong,,$(CFLAGS))
+
 ###############################################################################
 # Top-level Rules
 ###############################################################################
 
-objects = $(DL_FILE)
+objects = $(DL_FILE) arm-trusted-firmware-2.5.tar.gz
 
 $(DL_FILE) = $(DL_FROM)/$(DL_FILE)
+arm-trusted-firmware-2.5.tar.gz = $(DL_FROM)/arm-trusted-firmware-2.5.tar.gz
 
 $(DL_FILE)_MD5 = 7afbe0ef070dc0e8e970c57a08e3f336
+arm-trusted-firmware-2.5.tar.gz_MD5 = a3c01d2a73d5171e3f1c0737ff5321d9
 
 install : $(TARGET)
 
@@ -178,6 +182,20 @@ else
        cd $(DIR_APP) && install u-boot.bin /boot/u-boot-rpi4.bin
        cd $(DIR_APP) && make distclean
 
+       # Nanopi R2S
+       cd $(DIR_APP) && rm -rf arm-trusted-firmware-2.5
+       cd $(DIR_APP) && tar axf $(DIR_DL)/arm-trusted-firmware-2.5.tar.gz
+       cd $(DIR_APP)/arm-trusted-firmware-2.5 && make PLAT=rk3328 ARCH=aarch64 DEBUG=0 bl31
+       cd $(DIR_APP) && cp arm-trusted-firmware-2.5/build/rk3328/release/bl31/bl31.elf bl31.elf
+       cd $(DIR_APP) && rm -rf arm-trusted-firmware-2.5
+       -mkdir -pv /usr/share/u-boot/nanoi_r2s
+       cd $(DIR_APP) && make CROSS_COMPILE="" nanopi-r2s-rk3328_config
+       cd $(DIR_APP) && sed -i -e 's!^CONFIG_IDENT_STRING=.*!CONFIG_IDENT_STRING=" Nanopi R2S - IPFire.org"!' .config
+       cd $(DIR_APP) && make CROSS_COMPILE="" HOSTCC="gcc $(CFLAGS)"
+       cd $(DIR_APP) && install -v -m 644 u-boot-rockchip.bin \
+               /usr/share/u-boot/nanoi_r2s/u-boot-rockchip.bin
+       cd $(DIR_APP) && make distclean
+
 endif
        # create an empty 128 KB File for the u-boot env
        dd if=/dev/zero of=/boot/uboot.env bs=1K count=128