]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blobdiff - lfs/u-boot
mpc: update to 0.35
[people/pmueller/ipfire-2.x.git] / lfs / u-boot
index cea74e64cd8ade380bc3b995ba6dad99cf47aaa9..af4d6acd7daf4d6218b50ad5a376a2f4c1b78cf8 100644 (file)
@@ -1,7 +1,7 @@
 ###############################################################################
 #                                                                             #
 # IPFire.org - A linux based firewall                                         #
-# Copyright (C) 2007-2022  IPFire Team  <info@ipfire.org>                     #
+# Copyright (C) 2007-2023  IPFire Team  <info@ipfire.org>                     #
 #                                                                             #
 # This program is free software: you can redistribute it and/or modify        #
 # it under the terms of the GNU General Public License as published by        #
@@ -84,7 +84,6 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
        @$(PREBUILD)
        @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar axf $(DIR_DL)/$(DL_FILE)
 
-ifneq "$(MKIMAGE)" "1"
        # Raspberry Pi 3
        -mkdir -pv /usr/share/u-boot/rpi
        cd $(DIR_APP) && make CROSS_COMPILE="" rpi_3_config
@@ -93,6 +92,7 @@ ifneq "$(MKIMAGE)" "1"
        cd $(DIR_APP) && install -v -m 644 u-boot.bin \
                /usr/share/u-boot/rpi/u-boot-rpi3.bin
        cd $(DIR_APP) && install u-boot.bin /boot/u-boot-rpi3.bin
+       cd $(DIR_APP) && install -v -m 755 tools/mkimage /usr/bin
        cd $(DIR_APP) && make distclean
 
        # Raspberry Pi 4
@@ -138,7 +138,7 @@ ifneq "$(MKIMAGE)" "1"
        cd $(DIR_APP) && make distclean
 
        # Nanopi R2C
-       cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/u-boot/rockchip/add_nanopi-r2c.patch
+       cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/u-boot/rockchip/add-nanopi-r2c-and-orangepi-r1-plus-lts.patch
        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=rk3328 ARCH=aarch64 DEBUG=0 bl31 LDFLAGS="$(LDFLAGS)"
@@ -156,6 +156,23 @@ ifneq "$(MKIMAGE)" "1"
                /usr/share/u-boot/nanopi_r2c/u-boot-rockchip.bin
        cd $(DIR_APP) && make distclean
 
+       # Orangepi R1 plus lts
+       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=rk3328 ARCH=aarch64 DEBUG=0 bl31 LDFLAGS="$(LDFLAGS)"
+       cd $(DIR_APP) && cp arm-trusted-firmware-$(ATF_VER)/build/rk3328/release/bl31/bl31.elf bl31.elf
+       cd $(DIR_APP) && rm -rf arm-trusted-firmware-$(ATF_VER)
+       -mkdir -pv /usr/share/u-boot/orangepi_r1_plus_lts
+
+       cd $(DIR_APP) && make CROSS_COMPILE="" orangepi-r1-plus-lts-rk3328_config
+       cd $(DIR_APP) && sed -i -e 's!^CONFIG_IDENT_STRING=.*!CONFIG_IDENT_STRING=" OrangePi R1 plus lts - IPFire.org"!' .config
+       cd $(DIR_APP) && sed -i -e 's!^CONFIG_BOOTCOMMAND=.*!CONFIG_BOOTCOMMAND="console=ttyS2,115200n8;run distro_bootcmd"!' .config
+       cd $(DIR_APP) && sed -i -e 's!^CONFIG_BAUDRATE=.*!CONFIG_BAUDRATE=115200!' .config
+       cd $(DIR_APP) && sed -i -e 's!.*CONFIG_ENV_OVERWRITE.*!CONFIG_ENV_OVERWRITE=y!' .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/orangepi_r1_plus_lts/u-boot-rockchip.bin
+       cd $(DIR_APP) && make distclean
 
        # Nanopi R4S
        # arm trusted firmware for rk3399 cannot build without cortex m0 gcc crosscompiler
@@ -183,12 +200,5 @@ ifneq "$(MKIMAGE)" "1"
        # patch real Kernel version to uEnv.txt
        sed -e "s/xxxKVERxxx/$(KVER)/g" -i /boot/uEnv.txt
 
-else
-       # mkimage
-       cd $(DIR_APP) && make CROSS_COMPILE="" rpi_3_config
-       cd $(DIR_APP) && make CROSS_COMPILE="" HOSTCC="gcc $(CFLAGS)" tools
-       cd $(DIR_APP) && install -v -m 755 tools/mkimage /usr/bin
-endif
-
        @rm -rf $(DIR_APP)
        @$(POSTBUILD)