From d34697c7e575adb4d24e0e65b8b3abe35b3d020c Mon Sep 17 00:00:00 2001 From: Tianling Shen Date: Wed, 8 Jan 2025 16:55:33 +0800 Subject: [PATCH] uboot-rockchip: bump to 2025.01 Removed upstreamed patches. Signed-off-by: Tianling Shen --- package/boot/uboot-rockchip/Makefile | 4 +- ...se-rng-seed-size-to-make-it-sufficie.patch | 96 ------------------- ...libfdt-i_shipped-Use-SWIG_AppendOutp.patch | 55 ----------- ...llow-rockchip_dnl_key_pressed-in-SPL.patch | 4 +- ...e-PCI-to-discover-network-controller.patch | 51 ---------- ...dd-photonicat-board-watchdog-support.patch | 4 +- 6 files changed, 6 insertions(+), 208 deletions(-) delete mode 100644 package/boot/uboot-rockchip/patches/001-rockchip-board-Increase-rng-seed-size-to-make-it-sufficie.patch delete mode 100644 package/boot/uboot-rockchip/patches/002-scripts-dtc-pylibfdt-libfdt-i_shipped-Use-SWIG_AppendOutp.patch delete mode 100644 package/boot/uboot-rockchip/patches/105-bootstd-efi-Initialize-PCI-to-discover-network-controller.patch diff --git a/package/boot/uboot-rockchip/Makefile b/package/boot/uboot-rockchip/Makefile index e947910d30b..8dbbb41bce8 100644 --- a/package/boot/uboot-rockchip/Makefile +++ b/package/boot/uboot-rockchip/Makefile @@ -5,9 +5,9 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/kernel.mk -PKG_VERSION:=2024.10 +PKG_VERSION:=2025.01 PKG_RELEASE:=1 -PKG_HASH:=b28daf4ac17e43156363078bf510297584137f6df50fced9b12df34f61a92fb0 +PKG_HASH:=cdef7d507c93f1bbd9f015ea9bc21fa074268481405501945abc6f854d5b686f PKG_MAINTAINER:=Sarah Maedel diff --git a/package/boot/uboot-rockchip/patches/001-rockchip-board-Increase-rng-seed-size-to-make-it-sufficie.patch b/package/boot/uboot-rockchip/patches/001-rockchip-board-Increase-rng-seed-size-to-make-it-sufficie.patch deleted file mode 100644 index 0b7bf1be7d0..00000000000 --- a/package/boot/uboot-rockchip/patches/001-rockchip-board-Increase-rng-seed-size-to-make-it-sufficie.patch +++ /dev/null @@ -1,96 +0,0 @@ -From ed4ae7386257aa66455e330234e513d098a36f84 Mon Sep 17 00:00:00 2001 -From: Alex Shumsky -Date: Wed, 16 Oct 2024 13:02:03 +0300 -Subject: [PATCH] rockchip: board: Increase rng-seed size to make it sufficient - for modern Linux - -Increase rng-seed size to make Linux happy and initialize rng pool instantly. -Linux 5.19+ requires 32 bytes of entropy to initialize random pool, but u-boot -currently provides only 8 bytes. -Linux 5.18 and probably some versions before it used to require 64 bytes. -Bump min value to 64 bytes to be on a safe side. - -Boot with 8 byte rng-seed (Linux 6.11): - # dmesg | grep crng - [ 12.089286] random: crng init done -Boot with 32 byte rng-seed (Linux 6.11): - # dmesg | grep crng - [ 0.000000] random: crng init done - -Linux source references: -https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/char/random.c?h=v5.19#n551 -https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/char/random.c?h=v5.18#n236 - -Signed-off-by: Alex Shumsky -Fixes: d2048bafae40 ("rockchip: board: Add board_rng_seed() for all Rockchip devices") -Reviewed-by: Dragan Simic -Reviewed-by: Marek Vasut -Reviewed-by: Quentin Schulz -Reviewed-by: Kever Yang ---- - arch/arm/mach-rockchip/board.c | 11 ++++++++++- - common/Kconfig | 3 +++ - doc/usage/environment.rst | 5 +++++ - include/fdt_support.h | 3 ++- - 4 files changed, 20 insertions(+), 2 deletions(-) - ---- a/arch/arm/mach-rockchip/board.c -+++ b/arch/arm/mach-rockchip/board.c -@@ -480,9 +480,18 @@ __weak int misc_init_r(void) - __weak int board_rng_seed(struct abuf *buf) - { - struct udevice *dev; -- size_t len = 0x8; -+ ulong len = env_get_ulong("rng_seed_size", 10, 64); - u64 *data; - -+ if (len < 64) { -+ /* -+ * rng_seed_size should be at least 32 bytes for Linux 5.19+, -+ * or 64 for older Linux kernel versions -+ */ -+ log_warning("Value for rng_seed_size (%lu) too low, Linux kernel RNG may fail to initialize early\n", -+ len); -+ } -+ - data = malloc(len); - if (!data) { - printf("Out of memory\n"); ---- a/common/Kconfig -+++ b/common/Kconfig -@@ -927,6 +927,9 @@ config BOARD_RNG_SEED - new seed for use on subsequent boots, and whether or not the - kernel should account any entropy from the given seed. - -+ Default seed size (64 bytes) can be overridden by a decimal -+ environment variable rng_seed_size. -+ - endmenu - - menu "Update support" ---- a/doc/usage/environment.rst -+++ b/doc/usage/environment.rst -@@ -323,6 +323,11 @@ netretry - Useful on scripts which control the retry operation - themselves. - -+rng_seed_size -+ Size of random value added to device-tree node /chosen/rng-seed. -+ This variable is given as a decimal number. -+ If unset, 64 bytes is used as the default. -+ - silent_linux - If set then Linux will be told to boot silently, by - adding 'console=' to its command line. If "yes" it will be ---- a/include/fdt_support.h -+++ b/include/fdt_support.h -@@ -202,7 +202,8 @@ int ft_board_setup(void *blob, struct bd - * - * This function is called if CONFIG_BOARD_RNG_SEED is set, and must - * be provided by the board. It should return, via @buf, some suitable -- * seed value to pass to the kernel. -+ * seed value to pass to the kernel. Seed size could be set in a decimal -+ * environment variable rng_seed_size and it defaults to 64 bytes. - * - * @param buf A struct abuf for returning the seed and its size. - * @return 0 if ok, negative on error. diff --git a/package/boot/uboot-rockchip/patches/002-scripts-dtc-pylibfdt-libfdt-i_shipped-Use-SWIG_AppendOutp.patch b/package/boot/uboot-rockchip/patches/002-scripts-dtc-pylibfdt-libfdt-i_shipped-Use-SWIG_AppendOutp.patch deleted file mode 100644 index f5beca8d77a..00000000000 --- a/package/boot/uboot-rockchip/patches/002-scripts-dtc-pylibfdt-libfdt-i_shipped-Use-SWIG_AppendOutp.patch +++ /dev/null @@ -1,55 +0,0 @@ -From a63456b9191fae2fe49f4b121e025792022e3950 Mon Sep 17 00:00:00 2001 -From: Markus Volk -Date: Wed, 30 Oct 2024 06:07:16 +0100 -Subject: [PATCH] scripts/dtc/pylibfdt/libfdt.i_shipped: Use SWIG_AppendOutput -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Swig has changed language specific AppendOutput functions. The helper -macro SWIG_AppendOutput remains unchanged. Use that instead -of SWIG_Python_AppendOutput, which would require an extra parameter -since swig 4.3.0. - -/home/flk/poky/build-test/tmp/work/qemux86_64-poky-linux/u-boot/2024.10/git/arch/x86/cpu/u-boot-64.lds -| scripts/dtc/pylibfdt/libfdt_wrap.c: In function ‘_wrap_fdt_next_node’: -| scripts/dtc/pylibfdt/libfdt_wrap.c:5581:17: error: too few arguments to function ‘SWIG_Python_AppendOutput’ -| 5581 | resultobj = SWIG_Python_AppendOutput(resultobj, val); -| | ^~~~~~~~~~~~~~~~~~~~~~~~ - -Signed-off-by: Markus Volk -Reported-by: Rudi Heitbaum -Link: https://github.com/dgibson/dtc/pull/154 ---- - scripts/dtc/pylibfdt/libfdt.i_shipped | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - ---- a/scripts/dtc/pylibfdt/libfdt.i_shipped -+++ b/scripts/dtc/pylibfdt/libfdt.i_shipped -@@ -1037,7 +1037,7 @@ typedef uint32_t fdt32_t; - fdt_string(fdt1, fdt32_to_cpu($1->nameoff))); - buff = PyByteArray_FromStringAndSize( - (const char *)($1 + 1), fdt32_to_cpu($1->len)); -- resultobj = SWIG_Python_AppendOutput(resultobj, buff); -+ resultobj = SWIG_AppendOutput(resultobj, buff); - } - } - -@@ -1076,7 +1076,7 @@ typedef uint32_t fdt32_t; - - %typemap(argout) int *depth { - PyObject *val = Py_BuildValue("i", *arg$argnum); -- resultobj = SWIG_Python_AppendOutput(resultobj, val); -+ resultobj = SWIG_AppendOutput(resultobj, val); - } - - %apply int *depth { int *depth }; -@@ -1092,7 +1092,7 @@ typedef uint32_t fdt32_t; - if (PyTuple_GET_SIZE(resultobj) == 0) - resultobj = val; - else -- resultobj = SWIG_Python_AppendOutput(resultobj, val); -+ resultobj = SWIG_AppendOutput(resultobj, val); - } - } - diff --git a/package/boot/uboot-rockchip/patches/101-rockchip-boot_mode-Allow-rockchip_dnl_key_pressed-in-SPL.patch b/package/boot/uboot-rockchip/patches/101-rockchip-boot_mode-Allow-rockchip_dnl_key_pressed-in-SPL.patch index f7f64a1b9b3..c1acc3aa8c3 100644 --- a/package/boot/uboot-rockchip/patches/101-rockchip-boot_mode-Allow-rockchip_dnl_key_pressed-in-SPL.patch +++ b/package/boot/uboot-rockchip/patches/101-rockchip-boot_mode-Allow-rockchip_dnl_key_pressed-in-SPL.patch @@ -26,7 +26,7 @@ Signed-off-by: Chris Morgan obj-spl-$(CONFIG_ROCKCHIP_RK3036) += rk3036-board-spl.o --ifeq ($(CONFIG_SPL_BUILD)$(CONFIG_TPL_BUILD),) +-ifeq ($(CONFIG_XPL_BUILD)$(CONFIG_TPL_BUILD),) - # Always include boot_mode.o, as we bypass it (i.e. turn it off) # inside of boot_mode.c when CONFIG_ROCKCHIP_BOOT_MODE_REG is 0. This way, @@ -101,7 +101,7 @@ Signed-off-by: Chris Morgan #include #include #include -@@ -133,3 +134,26 @@ int arch_cpu_init(void) +@@ -139,3 +140,26 @@ int arch_cpu_init(void) #endif return 0; } diff --git a/package/boot/uboot-rockchip/patches/105-bootstd-efi-Initialize-PCI-to-discover-network-controller.patch b/package/boot/uboot-rockchip/patches/105-bootstd-efi-Initialize-PCI-to-discover-network-controller.patch deleted file mode 100644 index bfc9e8b1ba0..00000000000 --- a/package/boot/uboot-rockchip/patches/105-bootstd-efi-Initialize-PCI-to-discover-network-controller.patch +++ /dev/null @@ -1,51 +0,0 @@ -From 583d37d192d92c5e92efa68b1d97f8ecdef71c47 Mon Sep 17 00:00:00 2001 -From: Jonas Karlman -Date: Sun, 12 Nov 2023 10:57:21 +0000 -Subject: [PATCH] bootstd: efi: Initialize PCI to discover network controllers - -Boards like Radxa ROCK 5 Model B and NanoPi R5C require PCI to be -initialized in order to discover their onboard network controllers. - -During standard boot, PCI gets initialized after faster boot media have -been evaluated. However when an EFI bootflow is run from a fast boot -media, PCI initialization may not have happended and as a result no -network device is exposed to EFI. - -Fix this by initializing PCI during EFI bootflow when no ethernet device -can be found. - -This allows chainloading e.g. iPXE on ROCK 5B and NanoPi R5C without -having to enable PCI_INIT_R. Enabling of PCI_INIT_R has the side affect -of slowing down booting from faster boot media, by adding ~1 second off -boot delay for each unocupied M.2 slot. - -Signed-off-by: Jonas Karlman ---- - boot/bootmeth_efi.c | 9 +++++++++ - 1 file changed, 9 insertions(+) - ---- a/boot/bootmeth_efi.c -+++ b/boot/bootmeth_efi.c -@@ -16,6 +16,7 @@ - #include - #include - #include -+#include - #include - #include - #include -@@ -307,6 +308,14 @@ static int distro_efi_read_bootflow(stru - { - int ret; - -+ /* init PCI first since this is often used to provide Ehternet */ -+ if (IS_ENABLED(CONFIG_NETDEVICES) && IS_ENABLED(CONFIG_PCI) && -+ !eth_get_dev()) { -+ ret = pci_init(); -+ if (ret) -+ return log_msg_ret("pci", ret); -+ } -+ - /* - * bootmeth_efi doesn't allocate any buffer neither for blk nor net device - * set flag to avoid freeing static buffer. diff --git a/package/boot/uboot-rockchip/patches/200-add-photonicat-board-watchdog-support.patch b/package/boot/uboot-rockchip/patches/200-add-photonicat-board-watchdog-support.patch index 8016fa105ee..22cbd2adf88 100644 --- a/package/boot/uboot-rockchip/patches/200-add-photonicat-board-watchdog-support.patch +++ b/package/boot/uboot-rockchip/patches/200-add-photonicat-board-watchdog-support.patch @@ -1,13 +1,13 @@ --- a/drivers/watchdog/Makefile +++ b/drivers/watchdog/Makefile -@@ -50,3 +50,4 @@ obj-$(CONFIG_WDT_STM32MP) += stm32mp_wdt +@@ -52,3 +52,4 @@ obj-$(CONFIG_WDT_STM32MP) += stm32mp_wdt obj-$(CONFIG_WDT_SUNXI) += sunxi_wdt.o obj-$(CONFIG_WDT_TANGIER) += tangier_wdt.o obj-$(CONFIG_WDT_XILINX) += xilinx_wwdt.o +obj-$(CONFIG_WDT_PCAT) += pcat_wdt.o --- a/drivers/watchdog/Kconfig +++ b/drivers/watchdog/Kconfig -@@ -421,4 +421,10 @@ config WDT_FTWDT010 +@@ -443,4 +443,10 @@ config WDT_FTWDT010 help Faraday Technology ftwdt010 watchdog is an architecture independent watchdog. It is usually used in SoC chip design.