From mboxrd@z Thu Jan 1 00:00:00 1970 From: Arne Fitzenreiter To: development@lists.ipfire.org Subject: [PATCH 2/3] u-boot: add OrangePi R1 Plus LTS Date: Fri, 28 Apr 2023 19:36:22 +0000 Message-ID: <20230428193623.2307228-2-arne_f@ipfire.org> In-Reply-To: <20230428193623.2307228-1-arne_f@ipfire.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============6291494301059978271==" List-Id: --===============6291494301059978271== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Signed-off-by: Arne Fitzenreiter --- config/rootfiles/common/aarch64/u-boot | 2 + lfs/u-boot | 19 ++- ...nanopi-r2c-and-orangepi-r1-plus-lts.patch} | 148 +++++++++++++++++- 3 files changed, 166 insertions(+), 3 deletions(-) rename src/patches/u-boot/rockchip/{add_nanopi-r2c.patch =3D> add-nanopi-r2c= -and-orangepi-r1-plus-lts.patch} (52%) diff --git a/config/rootfiles/common/aarch64/u-boot b/config/rootfiles/common= /aarch64/u-boot index 4b2dcd4fd..a9b9ed435 100644 --- a/config/rootfiles/common/aarch64/u-boot +++ b/config/rootfiles/common/aarch64/u-boot @@ -12,6 +12,8 @@ usr/share/u-boot/nanopi_r2c/u-boot-rockchip.bin usr/share/u-boot/nanopi_r2s/u-boot-rockchip.bin #usr/share/u-boot/nanopi_r4s usr/share/u-boot/nanopi_r4s/u-boot-rockchip.bin +#usr/share/u-boot/orangepi_r1_plus_lts +usr/share/u-boot/orangepi_r1_plus_lts/u-boot-rockchip.bin #usr/share/u-boot/orangepi_zero_plus usr/share/u-boot/orangepi_zero_plus/u-boot-sunxi-with-spl.bin #usr/share/u-boot/rpi diff --git a/lfs/u-boot b/lfs/u-boot index cea74e64c..2ad92df05 100644 --- a/lfs/u-boot +++ b/lfs/u-boot @@ -138,7 +138,7 @@ ifneq "$(MKIMAGE)" "1" cd $(DIR_APP) && make distclean =20 # Nanopi R2C - cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/u-boot/rockchip/add_na= nopi-r2c.patch + cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/u-boot/rockchip/add-na= nopi-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=3Drk3328 ARCH=3D= aarch64 DEBUG=3D0 bl31 LDFLAGS=3D"$(LDFLAGS)" @@ -156,6 +156,23 @@ ifneq "$(MKIMAGE)" "1" /usr/share/u-boot/nanopi_r2c/u-boot-rockchip.bin cd $(DIR_APP) && make distclean =20 + # 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=3Drk3328 ARCH=3D= aarch64 DEBUG=3D0 bl31 LDFLAGS=3D"$(LDFLAGS)" + cd $(DIR_APP) && cp arm-trusted-firmware-$(ATF_VER)/build/rk3328/release/bl= 31/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=3D"" orangepi-r1-plus-lts-rk3328_config + cd $(DIR_APP) && sed -i -e 's!^CONFIG_IDENT_STRING=3D.*!CONFIG_IDENT_STRING= =3D" OrangePi R1 plus lts - IPFire.org"!' .config + cd $(DIR_APP) && sed -i -e 's!^CONFIG_BOOTCOMMAND=3D.*!CONFIG_BOOTCOMMAND= =3D"console=3DttyS2,115200n8;run distro_bootcmd"!' .config + cd $(DIR_APP) && sed -i -e 's!^CONFIG_BAUDRATE=3D.*!CONFIG_BAUDRATE=3D11520= 0!' .config + cd $(DIR_APP) && sed -i -e 's!.*CONFIG_ENV_OVERWRITE.*!CONFIG_ENV_OVERWRITE= =3Dy!' .config + cd $(DIR_APP) && make CROSS_COMPILE=3D"" HOSTCC=3D"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 =20 # Nanopi R4S # arm trusted firmware for rk3399 cannot build without cortex m0 gcc crossc= ompiler diff --git a/src/patches/u-boot/rockchip/add_nanopi-r2c.patch b/src/patches/u= -boot/rockchip/add-nanopi-r2c-and-orangepi-r1-plus-lts.patch similarity index 52% rename from src/patches/u-boot/rockchip/add_nanopi-r2c.patch rename to src/patches/u-boot/rockchip/add-nanopi-r2c-and-orangepi-r1-plus-lts= .patch index 9e330041f..99712be03 100644 --- a/src/patches/u-boot/rockchip/add_nanopi-r2c.patch +++ b/src/patches/u-boot/rockchip/add-nanopi-r2c-and-orangepi-r1-plus-lts.pat= ch @@ -1,14 +1,16 @@ diff -Naur u-boot-2022.10.org/arch/arm/dts/Makefile u-boot-2022.10/arch/arm/= dts/Makefile --- u-boot-2022.10.org/arch/arm/dts/Makefile 2022-10-03 19:25:32.000000000 += 0000 -+++ u-boot-2022.10/arch/arm/dts/Makefile 2023-04-22 15:02:25.945603949 +0000 -@@ -124,6 +124,7 @@ ++++ u-boot-2022.10/arch/arm/dts/Makefile 2023-04-27 16:16:35.697116372 +0000 +@@ -124,7 +124,9 @@ =20 dtb-$(CONFIG_ROCKCHIP_RK3328) +=3D \ rk3328-evb.dtb \ + rk3328-nanopi-r2c.dtb \ rk3328-nanopi-r2s.dtb \ ++ rk3328-orangepi-r1-plus-lts.dtb \ rk3328-roc-cc.dtb \ rk3328-rock64.dtb \ + rk3328-rock-pi-e.dtb diff -Naur u-boot-2022.10.org/arch/arm/dts/rk3328-nanopi-r2c-u-boot.dtsi u-b= oot-2022.10/arch/arm/dts/rk3328-nanopi-r2c-u-boot.dtsi --- u-boot-2022.10.org/arch/arm/dts/rk3328-nanopi-r2c-u-boot.dtsi 1970-01-01= 00:00:00.000000000 +0000 +++ u-boot-2022.10/arch/arm/dts/rk3328-nanopi-r2c-u-boot.dtsi 2023-04-22 15:= 07:54.544953841 +0000 @@ -51,6 +53,32 @@ diff -Naur u-boot-2022.10.org/arch/arm/dts/rk3328-nanopi-r= 2c.dts u-boot-2022.10/ + vqmmc-supply =3D <&vcc18_emmc>; + status =3D "okay"; +}; +diff -Naur u-boot-2022.10.org/arch/arm/dts/rk3328-orangepi-r1-plus-lts-u-boo= t.dtsi u-boot-2022.10/arch/arm/dts/rk3328-orangepi-r1-plus-lts-u-boot.dtsi +--- u-boot-2022.10.org/arch/arm/dts/rk3328-orangepi-r1-plus-lts-u-boot.dtsi = 1970-01-01 00:00:00.000000000 +0000 ++++ u-boot-2022.10/arch/arm/dts/rk3328-orangepi-r1-plus-lts-u-boot.dtsi 2023= -04-27 16:12:50.320850145 +0000 +@@ -0,0 +1,6 @@ ++// SPDX-License-Identifier: GPL-2.0+ ++/* ++ */ ++ ++#include "rk3328-nanopi-r2s-u-boot.dtsi" ++#include "rk3328-sdram-lpddr3-666.dtsi" +diff -Naur u-boot-2022.10.org/arch/arm/dts/rk3328-orangepi-r1-plus-lts.dts u= -boot-2022.10/arch/arm/dts/rk3328-orangepi-r1-plus-lts.dts +--- u-boot-2022.10.org/arch/arm/dts/rk3328-orangepi-r1-plus-lts.dts 1970-01-= 01 00:00:00.000000000 +0000 ++++ u-boot-2022.10/arch/arm/dts/rk3328-orangepi-r1-plus-lts.dts 2023-04-27 1= 6:14:56.582755127 +0000 +@@ -0,0 +1,12 @@ ++// SPDX-License-Identifier: (GPL-2.0+ OR MIT) ++/* ++ */ ++ ++/dts-v1/; ++#include "rk3328-nanopi-r2s.dts" ++ ++/ { ++ model =3D "Xunlong Orange Pi R1 Plus"; ++ compatible =3D "xunlong,orangepi-r1-plus", "rockchip,rk3328"; ++}; ++ diff -Naur u-boot-2022.10.org/configs/nanopi-r2c-rk3328_defconfig u-boot-202= 2.10/configs/nanopi-r2c-rk3328_defconfig --- u-boot-2022.10.org/configs/nanopi-r2c-rk3328_defconfig 1970-01-01 00:00:= 00.000000000 +0000 +++ u-boot-2022.10/configs/nanopi-r2c-rk3328_defconfig 2023-04-22 15:09:20.8= 43584447 +0000 @@ -167,3 +195,119 @@ diff -Naur u-boot-2022.10.org/configs/nanopi-r2c-rk3328= _defconfig u-boot-2022.10 +CONFIG_SPL_TINY_MEMSET=3Dy +CONFIG_TPL_TINY_MEMSET=3Dy +CONFIG_ERRNO_STR=3Dy +diff -Naur u-boot-2022.10.org/configs/orangepi-r1-plus-lts-rk3328_defconfig = u-boot-2022.10/configs/orangepi-r1-plus-lts-rk3328_defconfig +--- u-boot-2022.10.org/configs/orangepi-r1-plus-lts-rk3328_defconfig 1970-01= -01 00:00:00.000000000 +0000 ++++ u-boot-2022.10/configs/orangepi-r1-plus-lts-rk3328_defconfig 2023-04-27 = 16:19:41.122065498 +0000 +@@ -0,0 +1,112 @@ ++CONFIG_ARM=3Dy ++CONFIG_SKIP_LOWLEVEL_INIT=3Dy ++CONFIG_COUNTER_FREQUENCY=3D24000000 ++CONFIG_ARCH_ROCKCHIP=3Dy ++CONFIG_SYS_TEXT_BASE=3D0x00200000 ++CONFIG_SPL_GPIO=3Dy ++CONFIG_NR_DRAM_BANKS=3D1 ++CONFIG_ENV_OFFSET=3D0x3F8000 ++CONFIG_DEFAULT_DEVICE_TREE=3D"rk3328-orangepi-r1-plus-lts" ++CONFIG_ROCKCHIP_RK3328=3Dy ++CONFIG_TPL_ROCKCHIP_COMMON_BOARD=3Dy ++CONFIG_TPL_LIBCOMMON_SUPPORT=3Dy ++CONFIG_TPL_LIBGENERIC_SUPPORT=3Dy ++CONFIG_SPL_DRIVERS_MISC=3Dy ++CONFIG_SPL_STACK_R_ADDR=3D0x600000 ++CONFIG_DEBUG_UART_BASE=3D0xFF130000 ++CONFIG_DEBUG_UART_CLOCK=3D24000000 ++CONFIG_SYS_LOAD_ADDR=3D0x800800 ++CONFIG_DEBUG_UART=3Dy ++CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=3Dy ++CONFIG_CUSTOM_SYS_INIT_SP_ADDR=3D0x300000 ++CONFIG_TPL_SYS_MALLOC_F_LEN=3D0x800 ++# CONFIG_ANDROID_BOOT_IMAGE is not set ++CONFIG_FIT=3Dy ++CONFIG_FIT_VERBOSE=3Dy ++CONFIG_SPL_LOAD_FIT=3Dy ++CONFIG_DEFAULT_FDT_FILE=3D"rockchip/rk3328-orangepi-r1-plus-lts.dtb" ++# CONFIG_DISPLAY_CPUINFO is not set ++CONFIG_DISPLAY_BOARDINFO_LATE=3Dy ++CONFIG_MISC_INIT_R=3Dy ++CONFIG_SPL_MAX_SIZE=3D0x40000 ++CONFIG_SPL_PAD_TO=3D0x7f8000 ++CONFIG_SPL_HAS_BSS_LINKER_SECTION=3Dy ++CONFIG_SPL_BSS_START_ADDR=3D0x2000000 ++CONFIG_SPL_BSS_MAX_SIZE=3D0x2000 ++# CONFIG_SPL_RAW_IMAGE_SUPPORT is not set ++# CONFIG_SPL_SHARES_INIT_SP_ADDR is not set ++CONFIG_SPL_STACK=3D0x400000 ++CONFIG_SPL_STACK_R=3Dy ++CONFIG_SPL_I2C=3Dy ++CONFIG_SPL_POWER=3Dy ++CONFIG_SPL_ATF=3Dy ++CONFIG_SPL_ATF_NO_PLATFORM_PARAM=3Dy ++CONFIG_TPL_SYS_MALLOC_SIMPLE=3Dy ++CONFIG_CMD_BOOTZ=3Dy ++CONFIG_CMD_GPT=3Dy ++CONFIG_CMD_MMC=3Dy ++CONFIG_CMD_USB=3Dy ++# CONFIG_CMD_SETEXPR is not set ++CONFIG_CMD_TIME=3Dy ++CONFIG_SPL_OF_CONTROL=3Dy ++CONFIG_TPL_OF_CONTROL=3Dy ++CONFIG_OF_SPL_REMOVE_PROPS=3D"clock-names interrupt-parent assigned-clocks = assigned-clock-rates assigned-clock-parents" ++CONFIG_TPL_OF_PLATDATA=3Dy ++CONFIG_ENV_IS_IN_MMC=3Dy ++CONFIG_SYS_RELOC_GD_ENV_ADDR=3Dy ++CONFIG_SYS_MMC_ENV_DEV=3D1 ++CONFIG_NET_RANDOM_ETHADDR=3Dy ++CONFIG_TPL_DM=3Dy ++CONFIG_REGMAP=3Dy ++CONFIG_SPL_REGMAP=3Dy ++CONFIG_TPL_REGMAP=3Dy ++CONFIG_SYSCON=3Dy ++CONFIG_SPL_SYSCON=3Dy ++CONFIG_TPL_SYSCON=3Dy ++CONFIG_CLK=3Dy ++CONFIG_SPL_CLK=3Dy ++CONFIG_FASTBOOT_BUF_ADDR=3D0x800800 ++CONFIG_FASTBOOT_CMD_OEM_FORMAT=3Dy ++CONFIG_ROCKCHIP_GPIO=3Dy ++CONFIG_SYS_I2C_ROCKCHIP=3Dy ++CONFIG_MMC_DW=3Dy ++CONFIG_MMC_DW_ROCKCHIP=3Dy ++CONFIG_SF_DEFAULT_SPEED=3D20000000 ++CONFIG_ETH_DESIGNWARE=3Dy ++CONFIG_GMAC_ROCKCHIP=3Dy ++CONFIG_PINCTRL=3Dy ++CONFIG_SPL_PINCTRL=3Dy ++CONFIG_DM_PMIC=3Dy ++CONFIG_PMIC_RK8XX=3Dy ++CONFIG_SPL_PMIC_RK8XX=3Dy ++CONFIG_SPL_DM_REGULATOR=3Dy ++CONFIG_REGULATOR_PWM=3Dy ++CONFIG_DM_REGULATOR_FIXED=3Dy ++CONFIG_SPL_DM_REGULATOR_FIXED=3Dy ++CONFIG_REGULATOR_RK8XX=3Dy ++CONFIG_PWM_ROCKCHIP=3Dy ++CONFIG_RAM=3Dy ++CONFIG_SPL_RAM=3Dy ++CONFIG_TPL_RAM=3Dy ++CONFIG_DM_RESET=3Dy ++CONFIG_BAUDRATE=3D1500000 ++CONFIG_DEBUG_UART_SHIFT=3D2 ++CONFIG_SYSINFO=3Dy ++CONFIG_SYSRESET=3Dy ++# CONFIG_TPL_SYSRESET is not set ++CONFIG_USB=3Dy ++CONFIG_USB_XHCI_HCD=3Dy ++CONFIG_USB_XHCI_DWC3=3Dy ++CONFIG_USB_EHCI_HCD=3Dy ++CONFIG_USB_EHCI_GENERIC=3Dy ++CONFIG_USB_OHCI_HCD=3Dy ++CONFIG_USB_OHCI_GENERIC=3Dy ++CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS=3D1 ++CONFIG_USB_DWC2=3Dy ++CONFIG_USB_DWC3=3Dy ++# CONFIG_USB_DWC3_GADGET is not set ++CONFIG_USB_GADGET=3Dy ++CONFIG_USB_GADGET_DWC2_OTG=3Dy ++CONFIG_SPL_TINY_MEMSET=3Dy ++CONFIG_TPL_TINY_MEMSET=3Dy ++CONFIG_ERRNO_STR=3Dy --=20 2.34.1 --===============6291494301059978271==--