u-boot: add nanopi r2s build

Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
This commit is contained in:
Arne Fitzenreiter
2021-10-03 07:39:04 +00:00
parent 4c59cad1c0
commit 1f38bac053
2 changed files with 20 additions and 3 deletions

View 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

View 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