From d2fba532a6c06cd6ca93af66da129490a96e5452 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Igor=20Pe=C4=8Dovnik?= Date: Thu, 7 Oct 2021 19:26:06 +0200 Subject: [PATCH] allwinner: update u-boot to 2021.07 (#3143) * Bugfix - Bananapi PRO seems to work fine with latest u-boot Done many reboots and it didn't break. The same has to be tested with other A20 boards * Set Allwinner 32bit hw to most recent u-boot 2021.07 * Let's move all to 2021.07 and test ... --- config/sources/arm64.conf | 2 +- .../families/include/sunxi64_common.inc | 4 --- .../sources/families/include/sunxi_common.inc | 5 ---- config/sources/families/sun50iw9.conf | 1 - .../adjust-default-dram-clockspeeds.patch | 4 +-- .../adjust-small-boards-cpufreq.patch | 2 +- .../{ => board_orangepi3}/add-orangepi3.patch | 0 .../do-not-relocate-initrd.patch | 27 ------------------- .../enable-old-kernel-compat.patch | 13 --------- 9 files changed, 4 insertions(+), 54 deletions(-) rename patch/u-boot/u-boot-sunxi/{ => board_orangepi3}/add-orangepi3.patch (100%) delete mode 100644 patch/u-boot/u-boot-sunxi/branch_default/do-not-relocate-initrd.patch delete mode 100644 patch/u-boot/u-boot-sunxi/branch_default/enable-old-kernel-compat.patch diff --git a/config/sources/arm64.conf b/config/sources/arm64.conf index 9d13f5eec4..48974756ef 100644 --- a/config/sources/arm64.conf +++ b/config/sources/arm64.conf @@ -41,7 +41,7 @@ fi [[ -z $UBOOT_USE_GCC ]] && UBOOT_USE_GCC='> 8.0' [[ -z $BOOTSOURCE ]] && BOOTSOURCE=$MAINLINE_UBOOT_SOURCE [[ -z $BOOTDIR ]] && BOOTDIR=$MAINLINE_UBOOT_DIR -[[ -z $BOOTBRANCH ]] && BOOTBRANCH='tag:v2020.04' +[[ -z $BOOTBRANCH ]] && BOOTBRANCH='tag:v2021.07' [[ -z $KERNELDIR ]] && KERNELDIR=$MAINLINE_KERNEL_DIR [[ -z $KERNELSOURCE ]] && KERNELSOURCE=$MAINLINE_KERNEL_SOURCE diff --git a/config/sources/families/include/sunxi64_common.inc b/config/sources/families/include/sunxi64_common.inc index cff58ea853..3ba16f42e4 100644 --- a/config/sources/families/include/sunxi64_common.inc +++ b/config/sources/families/include/sunxi64_common.inc @@ -1,10 +1,6 @@ ARCH=arm64 ATF_TARGET_MAP="PLAT=$ATF_PLAT DEBUG=1 bl31;;build/$ATF_PLAT/debug/bl31.bin" BOOTDELAY=1 -##https://armbian.atlassian.net/browse/AR-867 -BOOTBRANCH='tag:v2020.10' - -[[ $BOARD == pineh64* ]] && BOOTBRANCH='tag:v2021.07' BOOTPATCHDIR='u-boot-sunxi' BOOTENV_FILE='sunxi.txt' diff --git a/config/sources/families/include/sunxi_common.inc b/config/sources/families/include/sunxi_common.inc index 1aa47084b3..4f5024fc16 100644 --- a/config/sources/families/include/sunxi_common.inc +++ b/config/sources/families/include/sunxi_common.inc @@ -1,10 +1,5 @@ ARCH=armhf BOOTDELAY=1 -##https://armbian.atlassian.net/browse/AR-867 -BOOTBRANCH='tag:v2020.10' - -[[ $LINUXFAMILY == sun8i-v3s ]] && BOOTBRANCH='tag:v2021.07' - BOOTPATCHDIR='u-boot-sunxi' UBOOT_TARGET_MAP=';;u-boot-sunxi-with-spl.bin' BOOTSCRIPT="boot-sunxi.cmd:boot.cmd" diff --git a/config/sources/families/sun50iw9.conf b/config/sources/families/sun50iw9.conf index 6d4bb8e7bd..626a1154c7 100644 --- a/config/sources/families/sun50iw9.conf +++ b/config/sources/families/sun50iw9.conf @@ -43,7 +43,6 @@ case $BRANCH in ATFBRANCH='branch:master' ATF_PLAT="sun50i_h616"; ATF_TARGET_MAP='PLAT=sun50i_h616 DEBUG=1 bl31;;build/sun50i_h616/debug/bl31.bin' - BOOTBRANCH='branch:v2021.07' LINUXCONFIG='linux-sunxi64-edge' ;; diff --git a/patch/u-boot/u-boot-sunxi/adjust-default-dram-clockspeeds.patch b/patch/u-boot/u-boot-sunxi/adjust-default-dram-clockspeeds.patch index 622b60584d..3939bde2a4 100644 --- a/patch/u-boot/u-boot-sunxi/adjust-default-dram-clockspeeds.patch +++ b/patch/u-boot/u-boot-sunxi/adjust-default-dram-clockspeeds.patch @@ -159,13 +159,13 @@ index 5638c4a..eec13fd 100644 --- a/configs/orangepi_lite_defconfig +++ b/configs/orangepi_lite_defconfig @@ -3,7 +3,9 @@ CONFIG_ARCH_SUNXI=y + CONFIG_DEFAULT_DEVICE_TREE="sun8i-h3-orangepi-lite" CONFIG_SPL=y CONFIG_MACH_SUN8I_H3=y -CONFIG_DRAM_CLK=672 +CONFIG_DRAM_CLK=624 +CONFIG_DRAM_ZQ=3881979 +CONFIG_DRAM_ODT_EN=y - CONFIG_DEFAULT_DEVICE_TREE="sun8i-h3-orangepi-lite" # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set CONFIG_USB_EHCI_HCD=y CONFIG_USB_OHCI_HCD=y @@ -187,13 +187,13 @@ index 4fe81f8..5f50366 100644 --- a/configs/orangepi_one_defconfig +++ b/configs/orangepi_one_defconfig @@ -3,7 +3,9 @@ CONFIG_ARCH_SUNXI=y + CONFIG_DEFAULT_DEVICE_TREE="sun8i-h3-orangepi-one" CONFIG_SPL=y CONFIG_MACH_SUN8I_H3=y -CONFIG_DRAM_CLK=672 +CONFIG_DRAM_CLK=624 +CONFIG_DRAM_ZQ=3881979 +CONFIG_DRAM_ODT_EN=y - CONFIG_DEFAULT_DEVICE_TREE="sun8i-h3-orangepi-one" # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set CONFIG_SUN8I_EMAC=y CONFIG_USB_EHCI_HCD=y diff --git a/patch/u-boot/u-boot-sunxi/adjust-small-boards-cpufreq.patch b/patch/u-boot/u-boot-sunxi/adjust-small-boards-cpufreq.patch index 35332158ac..f08e1e1c91 100644 --- a/patch/u-boot/u-boot-sunxi/adjust-small-boards-cpufreq.patch +++ b/patch/u-boot/u-boot-sunxi/adjust-small-boards-cpufreq.patch @@ -26,7 +26,7 @@ index f8dda05..739a5f4 100644 --- a/configs/orangepi_zero_defconfig +++ b/configs/orangepi_zero_defconfig @@ -9,6 +9,7 @@ CONFIG_SPL_SPI_SUNXI=y - CONFIG_DEFAULT_DEVICE_TREE="sun8i-h2-plus-orangepi-zero" + CONFIG_SPL_SPI_SUNXI=y # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set +CONFIG_SYS_CLK_FREQ=480000000 CONFIG_CONSOLE_MUX=y diff --git a/patch/u-boot/u-boot-sunxi/add-orangepi3.patch b/patch/u-boot/u-boot-sunxi/board_orangepi3/add-orangepi3.patch similarity index 100% rename from patch/u-boot/u-boot-sunxi/add-orangepi3.patch rename to patch/u-boot/u-boot-sunxi/board_orangepi3/add-orangepi3.patch diff --git a/patch/u-boot/u-boot-sunxi/branch_default/do-not-relocate-initrd.patch b/patch/u-boot/u-boot-sunxi/branch_default/do-not-relocate-initrd.patch deleted file mode 100644 index b3d4e3f79d..0000000000 --- a/patch/u-boot/u-boot-sunxi/branch_default/do-not-relocate-initrd.patch +++ /dev/null @@ -1,27 +0,0 @@ -diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h -index 64a190059a..bbec551cac 100644 ---- a/include/configs/sunxi-common.h -+++ b/include/configs/sunxi-common.h -@@ -503,6 +503,12 @@ extern int soft_i2c_gpio_scl; - #define FDTFILE CONFIG_DEFAULT_DEVICE_TREE ".dtb" - #endif - -+#ifdef CONFIG_MACH_SUN8I_H3 -+#define INITRD_HIGH_ENV "initrd_high=0xFFFFFFFF\0" -+#else -+#define INITRD_HIGH_ENV -+#endif -+ - #define CONFIG_EXTRA_ENV_SETTINGS \ - CONSOLE_ENV_SETTINGS \ - MEM_LAYOUT_ENV_SETTINGS \ -@@ -512,7 +518,8 @@ extern int soft_i2c_gpio_scl; - SUNXI_MTDIDS_DEFAULT \ - SUNXI_MTDPARTS_DEFAULT \ - BOOTCMD_SUNXI_COMPAT \ -- BOOTENV -+ BOOTENV \ -+ INITRD_HIGH_ENV - - #else /* ifndef CONFIG_SPL_BUILD */ - #define CONFIG_EXTRA_ENV_SETTINGS diff --git a/patch/u-boot/u-boot-sunxi/branch_default/enable-old-kernel-compat.patch b/patch/u-boot/u-boot-sunxi/branch_default/enable-old-kernel-compat.patch deleted file mode 100644 index d31bb98fe4..0000000000 --- a/patch/u-boot/u-boot-sunxi/branch_default/enable-old-kernel-compat.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig -index 513a35fc4e..77bc949cb7 100644 ---- a/arch/arm/Kconfig -+++ b/arch/arm/Kconfig -@@ -623,7 +623,8 @@ config ARCH_SOCFPGA - - config ARCH_SUNXI - bool "Support sunxi (Allwinner) SoCs" - select BINMAN -+ select OLD_SUNXI_KERNEL_COMPAT - select CMD_GPIO - select CMD_MMC if MMC - select CMD_USB if DISTRO_DEFAULTS