From: Arne Fitzenreiter Date: Sun, 3 Oct 2021 07:39:04 +0000 (+0000) Subject: u-boot: add nanopi r2s build X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1f38bac05383eef9c8065f7834f35779e79ab966;p=people%2Fms%2Fipfire-2.x.git u-boot: add nanopi r2s build Signed-off-by: Arne Fitzenreiter --- diff --git a/config/rootfiles/common/aarch64/u-boot b/config/rootfiles/common/aarch64/u-boot index 5b2d5cf09d..4b08707e3b 100644 --- a/config/rootfiles/common/aarch64/u-boot +++ b/config/rootfiles/common/aarch64/u-boot @@ -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 diff --git a/lfs/u-boot b/lfs/u-boot index 9f3addd29c..b245d52919 100644 --- a/lfs/u-boot +++ b/lfs/u-boot @@ -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