diff --git a/patch/u-boot/legacy/u-boot-meko-rk3588/1000-rockchip-dts-rk3588-enable-otp.patch b/patch/u-boot/legacy/u-boot-meko-rk3588/1000-rockchip-dts-rk3588-enable-otp.patch index 75f7911242..f27091b174 100644 --- a/patch/u-boot/legacy/u-boot-meko-rk3588/1000-rockchip-dts-rk3588-enable-otp.patch +++ b/patch/u-boot/legacy/u-boot-meko-rk3588/1000-rockchip-dts-rk3588-enable-otp.patch @@ -1,7 +1,7 @@ -From ec54def825a3d1a7aab5f5086167d0b1308476a5 Mon Sep 17 00:00:00 2001 +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Stephen Chen Date: Thu, 13 Apr 2023 11:19:49 +0800 -Subject: [PATCH 1000/1006] rockchip: dts: rk3588: enable otp +Subject: rockchip: dts: rk3588: enable otp Signed-off-by: Stephen Chen --- @@ -25,5 +25,5 @@ index d0b82f64b7..837d5be90b 100644 u-boot,dm-spl; }; -- -2.40.1 +Armbian diff --git a/patch/u-boot/legacy/u-boot-meko-rk3588/1001-mach-rockchip-board.c-find-serial-first-then-ethaddr.patch b/patch/u-boot/legacy/u-boot-meko-rk3588/1001-mach-rockchip-board.c-find-serial-first-then-ethaddr.patch deleted file mode 100644 index 49c6bc8722..0000000000 --- a/patch/u-boot/legacy/u-boot-meko-rk3588/1001-mach-rockchip-board.c-find-serial-first-then-ethaddr.patch +++ /dev/null @@ -1,158 +0,0 @@ -From 3d009929b5a9ef15f598a216fe9a7453f39c5ca3 Mon Sep 17 00:00:00 2001 -From: Ricardo Pardini -Date: Fri, 30 Jun 2023 14:53:49 +0200 -Subject: [PATCH 1001/1006] mach-rockchip/board.c: find serial# first, then - ethaddr; add a lot of debugging - ---- - arch/arm/mach-rockchip/board.c | 39 ++++++++++++++++++++++++++++++---- - 1 file changed, 35 insertions(+), 4 deletions(-) - -diff --git a/arch/arm/mach-rockchip/board.c b/arch/arm/mach-rockchip/board.c -index 9ffb017dd8..8797ad3436 100644 ---- a/arch/arm/mach-rockchip/board.c -+++ b/arch/arm/mach-rockchip/board.c -@@ -110,14 +110,23 @@ static int rockchip_set_ethaddr(void) - u8 ethaddr[ARP_HLEN * MAX_ETHERNET] = {0}; - int i, ret = -EINVAL; - -+ printf("%s: starting ethernet MAC set\n", __func__); -+ - #ifdef CONFIG_ROCKCHIP_VENDOR_PARTITION -+ printf("%s: going for vendor_storage_read\n", __func__); - ret = vendor_storage_read(LAN_MAC_ID, ethaddr, sizeof(ethaddr)); -+ printf("%s: vendor_storage_read returned %d\n", __func__, ret); -+ - #endif - for (i = 0; i < MAX_ETHERNET; i++) { -+ printf("%s: looping... %d and ret %d\n", __func__, i, ret); - if (ret <= 0 || !is_valid_ethaddr(ðaddr[i * ARP_HLEN])) { - if (!randomed) { - net_random_ethaddr(ðaddr[i * ARP_HLEN]); - randomed = true; -+ printf -+ ("%s: looping... generated RANDOMED... %d and ret %d\n", -+ __func__, i, ret); - } else { - if (i > 0) { - memcpy(ðaddr[i * ARP_HLEN], -@@ -128,6 +137,7 @@ static int rockchip_set_ethaddr(void) - } - } - -+ printf("%s: setting need_write true\n", __func__); - need_write = true; - } - -@@ -137,14 +147,18 @@ static int rockchip_set_ethaddr(void) - memcpy(mac, "ethaddr", sizeof("ethaddr")); - else - sprintf(mac, "eth%daddr", i); -+ printf("%s: setting in env\n", __func__); - env_set(mac, buf); - } - } - - #ifdef CONFIG_ROCKCHIP_VENDOR_PARTITION - if (need_write) { -+ printf("%s: gonna do vendor_storage_write\n", __func__); - ret = vendor_storage_write(LAN_MAC_ID, - ethaddr, sizeof(ethaddr)); -+ printf("%s: did vendor_storage_write returned %d\n", __func__, -+ ret); - if (ret < 0) - printf("%s: vendor_storage_write failed %d\n", - __func__, ret); -@@ -162,6 +176,7 @@ static int rockchip_set_serialno(void) - char serialno_str[VENDOR_SN_MAX]; - int ret = 0, i; - u64 serialno; -+ printf("%s: starting serial number code\n", __func__); - - /* Read serial number from vendor storage part */ - memset(serialno_str, 0, VENDOR_SN_MAX); -@@ -171,6 +186,7 @@ static int rockchip_set_serialno(void) - - ret = vendor_storage_read(SN_ID, serialno_str, (VENDOR_SN_MAX-1)); - if (ret > 0) { -+ printf("%s: got serial from vendor_storage_read\n", __func__); - j = strlen(serialno_str); - for (i = 0; i < j; i++) { - if ((serialno_str[i] >= 'a' && serialno_str[i] <= 'z') || -@@ -185,11 +201,16 @@ static int rockchip_set_serialno(void) - if (i > 0) { - serialno_str[i + 1] = 0x0; - env_set("serial#", serialno_str); -+ printf("%s: set in the env from vendor_storage_read\n", -+ __func__); - } - } - #endif - if (!env_get("serial#")) { -+ printf("%s: serial NOT in the env\n", __func__); -+ - #if defined(CONFIG_ROCKCHIP_EFUSE) || defined(CONFIG_ROCKCHIP_OTP) -+ printf("%s: serial gonna try in OTP\n", __func__); - struct udevice *dev; - - /* retrieve the device */ -@@ -203,10 +224,13 @@ static int rockchip_set_serialno(void) - &dev); - - if (ret) { -- printf("%s: could not find efuse/otp device\n", __func__); -+ printf("%s: could not find efuse/otp device\n", -+ __func__); - return ret; - } - -+ printf("%s: serial gonna try read fuses\n", __func__); -+ - /* read the cpu_id range from the efuses */ - ret = misc_read(dev, CPUID_OFF, &cpuid, sizeof(cpuid)); - if (ret) { -@@ -214,12 +238,18 @@ static int rockchip_set_serialno(void) - __func__, ret); - return ret; - } -+ printf("%s: serial read fuse looks like worked\n", __func__); -+ - #else -+ printf("%s: serial generate RANDOM\n", __func__); - /* generate random cpuid */ - for (i = 0; i < CPUID_LEN; i++) - cpuid[i] = (u8)(rand()); - #endif - /* Generate the serial number based on CPU ID */ -+ printf -+ ("%s: serial Generate the serial number based on CPU ID\n", -+ __func__); - for (i = 0; i < 8; i++) { - low[i] = cpuid[1 + (i << 1)]; - high[i] = cpuid[i << 1]; -@@ -230,6 +260,7 @@ static int rockchip_set_serialno(void) - snprintf(serialno_str, sizeof(serialno_str), "%llx", serialno); - - env_set("serial#", serialno_str); -+ printf("%s: stored serial num in env\n", __func__); - } - - return ret; -@@ -447,11 +478,11 @@ static void scan_run_cmd(void) - - int board_late_init(void) - { --#ifdef CONFIG_ROCKCHIP_SET_ETHADDR -- rockchip_set_ethaddr(); --#endif - #ifdef CONFIG_ROCKCHIP_SET_SN - rockchip_set_serialno(); -+#endif -+#ifdef CONFIG_ROCKCHIP_SET_ETHADDR -+ rockchip_set_ethaddr(); - #endif - setup_download_mode(); - scan_run_cmd(); --- -2.40.1 - diff --git a/patch/u-boot/legacy/u-boot-meko-rk3588/1002-use-serial-as-base-for-MAC-address.patch b/patch/u-boot/legacy/u-boot-meko-rk3588/1002-use-serial-as-base-for-MAC-address.patch index 8a9df6b69a..ff989a8050 100644 --- a/patch/u-boot/legacy/u-boot-meko-rk3588/1002-use-serial-as-base-for-MAC-address.patch +++ b/patch/u-boot/legacy/u-boot-meko-rk3588/1002-use-serial-as-base-for-MAC-address.patch @@ -1,23 +1,24 @@ -From fdd68a2b06862cd2229d77e463eb10a7ecef26db Mon Sep 17 00:00:00 2001 +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Ricardo Pardini Date: Fri, 30 Jun 2023 17:30:37 +0200 -Subject: [PATCH 1002/1006] use serial# as base for MAC address +Subject: use serial# as base for MAC address; find serial# first, then + ethaddr; add a lot of debugging --- - arch/arm/mach-rockchip/board.c | 35 ++++++++++++++++++++++++++++++++-- - 1 file changed, 33 insertions(+), 2 deletions(-) + arch/arm/mach-rockchip/board.c | 72 +++++++++- + 1 file changed, 67 insertions(+), 5 deletions(-) diff --git a/arch/arm/mach-rockchip/board.c b/arch/arm/mach-rockchip/board.c -index 8797ad3436..6c8d96a60e 100644 +index 9ffb017dd8..6c8d96a60e 100644 --- a/arch/arm/mach-rockchip/board.c +++ b/arch/arm/mach-rockchip/board.c -@@ -109,8 +109,31 @@ static int rockchip_set_ethaddr(void) +@@ -109,15 +109,55 @@ static int rockchip_set_ethaddr(void) char buf[ARP_HLEN_ASCII + 1], mac[16]; u8 ethaddr[ARP_HLEN * MAX_ETHERNET] = {0}; int i, ret = -EINVAL; + u8 serial_checksum[ARP_HLEN] = {0}; - - printf("%s: starting ethernet MAC set\n", __func__); ++ ++ printf("%s: starting ethernet MAC set\n", __func__); + + char *serial; + serial = env_get("serial#"); @@ -42,9 +43,13 @@ index 8797ad3436..6c8d96a60e 100644 + #ifdef CONFIG_ROCKCHIP_VENDOR_PARTITION - printf("%s: going for vendor_storage_read\n", __func__); -@@ -122,10 +145,18 @@ static int rockchip_set_ethaddr(void) - printf("%s: looping... %d and ret %d\n", __func__, i, ret); ++ printf("%s: going for vendor_storage_read\n", __func__); + ret = vendor_storage_read(LAN_MAC_ID, ethaddr, sizeof(ethaddr)); ++ printf("%s: vendor_storage_read returned %d\n", __func__, ret); ++ + #endif + for (i = 0; i < MAX_ETHERNET; i++) { ++ printf("%s: looping... %d and ret %d\n", __func__, i, ret); if (ret <= 0 || !is_valid_ethaddr(ðaddr[i * ARP_HLEN])) { if (!randomed) { - net_random_ethaddr(ðaddr[i * ARP_HLEN]); @@ -58,12 +63,129 @@ index 8797ad3436..6c8d96a60e 100644 + net_random_ethaddr(ðaddr[i * ARP_HLEN]); + } randomed = true; - printf -- ("%s: looping... generated RANDOMED... %d and ret %d\n", ++ printf + ("%s: looping... generated SERIAL or RANDOMED... %d and ret %d\n", - __func__, i, ret); ++ __func__, i, ret); } else { if (i > 0) { + memcpy(ðaddr[i * ARP_HLEN], +@@ -128,6 +168,7 @@ static int rockchip_set_ethaddr(void) + } + } + ++ printf("%s: setting need_write true\n", __func__); + need_write = true; + } + +@@ -137,14 +178,18 @@ static int rockchip_set_ethaddr(void) + memcpy(mac, "ethaddr", sizeof("ethaddr")); + else + sprintf(mac, "eth%daddr", i); ++ printf("%s: setting in env\n", __func__); + env_set(mac, buf); + } + } + + #ifdef CONFIG_ROCKCHIP_VENDOR_PARTITION + if (need_write) { ++ printf("%s: gonna do vendor_storage_write\n", __func__); + ret = vendor_storage_write(LAN_MAC_ID, + ethaddr, sizeof(ethaddr)); ++ printf("%s: did vendor_storage_write returned %d\n", __func__, ++ ret); + if (ret < 0) + printf("%s: vendor_storage_write failed %d\n", + __func__, ret); +@@ -162,6 +207,7 @@ static int rockchip_set_serialno(void) + char serialno_str[VENDOR_SN_MAX]; + int ret = 0, i; + u64 serialno; ++ printf("%s: starting serial number code\n", __func__); + + /* Read serial number from vendor storage part */ + memset(serialno_str, 0, VENDOR_SN_MAX); +@@ -171,6 +217,7 @@ static int rockchip_set_serialno(void) + + ret = vendor_storage_read(SN_ID, serialno_str, (VENDOR_SN_MAX-1)); + if (ret > 0) { ++ printf("%s: got serial from vendor_storage_read\n", __func__); + j = strlen(serialno_str); + for (i = 0; i < j; i++) { + if ((serialno_str[i] >= 'a' && serialno_str[i] <= 'z') || +@@ -185,11 +232,16 @@ static int rockchip_set_serialno(void) + if (i > 0) { + serialno_str[i + 1] = 0x0; + env_set("serial#", serialno_str); ++ printf("%s: set in the env from vendor_storage_read\n", ++ __func__); + } + } + #endif + if (!env_get("serial#")) { ++ printf("%s: serial NOT in the env\n", __func__); ++ + #if defined(CONFIG_ROCKCHIP_EFUSE) || defined(CONFIG_ROCKCHIP_OTP) ++ printf("%s: serial gonna try in OTP\n", __func__); + struct udevice *dev; + + /* retrieve the device */ +@@ -203,10 +255,13 @@ static int rockchip_set_serialno(void) + &dev); + + if (ret) { +- printf("%s: could not find efuse/otp device\n", __func__); ++ printf("%s: could not find efuse/otp device\n", ++ __func__); + return ret; + } + ++ printf("%s: serial gonna try read fuses\n", __func__); ++ + /* read the cpu_id range from the efuses */ + ret = misc_read(dev, CPUID_OFF, &cpuid, sizeof(cpuid)); + if (ret) { +@@ -214,12 +269,18 @@ static int rockchip_set_serialno(void) + __func__, ret); + return ret; + } ++ printf("%s: serial read fuse looks like worked\n", __func__); ++ + #else ++ printf("%s: serial generate RANDOM\n", __func__); + /* generate random cpuid */ + for (i = 0; i < CPUID_LEN; i++) + cpuid[i] = (u8)(rand()); + #endif + /* Generate the serial number based on CPU ID */ ++ printf ++ ("%s: serial Generate the serial number based on CPU ID\n", ++ __func__); + for (i = 0; i < 8; i++) { + low[i] = cpuid[1 + (i << 1)]; + high[i] = cpuid[i << 1]; +@@ -230,6 +291,7 @@ static int rockchip_set_serialno(void) + snprintf(serialno_str, sizeof(serialno_str), "%llx", serialno); + + env_set("serial#", serialno_str); ++ printf("%s: stored serial num in env\n", __func__); + } + + return ret; +@@ -447,11 +509,11 @@ static void scan_run_cmd(void) + + int board_late_init(void) + { +-#ifdef CONFIG_ROCKCHIP_SET_ETHADDR +- rockchip_set_ethaddr(); +-#endif + #ifdef CONFIG_ROCKCHIP_SET_SN + rockchip_set_serialno(); ++#endif ++#ifdef CONFIG_ROCKCHIP_SET_ETHADDR ++ rockchip_set_ethaddr(); + #endif + setup_download_mode(); + scan_run_cmd(); -- -2.40.1 +Armbian diff --git a/patch/u-boot/legacy/u-boot-meko-rk3588/1003-cmd-source-fix-the-error-that-the-command-source-fai.patch b/patch/u-boot/legacy/u-boot-meko-rk3588/1003-cmd-source-fix-the-error-that-the-command-source-fai.patch index 54c7c87845..2d82fc44e6 100644 --- a/patch/u-boot/legacy/u-boot-meko-rk3588/1003-cmd-source-fix-the-error-that-the-command-source-fai.patch +++ b/patch/u-boot/legacy/u-boot-meko-rk3588/1003-cmd-source-fix-the-error-that-the-command-source-fai.patch @@ -1,9 +1,9 @@ -From 4442082c4c37f397a94c5c11d012d9e3d540720b Mon Sep 17 00:00:00 2001 -From: Ricardo Pardini -Date: Fri, 30 Jun 2023 00:02:51 +0200 -Subject: [PATCH 1003/1006] cmd: source: fix the error that the command source - failed to execute +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Stephen +Date: Mon, 8 Nov 2021 14:30:00 +0800 +Subject: cmd: source: fix the error that the command source failed to execute +Signed-off-by: Stephen --- cmd/source.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) @@ -22,5 +22,5 @@ index 6b1c8b744b..cf820c072a 100644 #endif #if defined(CONFIG_FIT) -- -2.40.1 +Armbian diff --git a/patch/u-boot/legacy/u-boot-meko-rk3588/1004-rockchip-disable-gen_bl32_node.patch b/patch/u-boot/legacy/u-boot-meko-rk3588/1004-rockchip-disable-gen_bl32_node.patch index 5b795b986a..d1143d69b8 100644 --- a/patch/u-boot/legacy/u-boot-meko-rk3588/1004-rockchip-disable-gen_bl32_node.patch +++ b/patch/u-boot/legacy/u-boot-meko-rk3588/1004-rockchip-disable-gen_bl32_node.patch @@ -1,7 +1,7 @@ -From 7699c93604c388431b4a227fffa348c997fb529c Mon Sep 17 00:00:00 2001 +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Stephen Chen Date: Tue, 21 Mar 2023 16:09:11 +0800 -Subject: [PATCH 1004/1006] rockchip: disable gen_bl32_node +Subject: rockchip: disable gen_bl32_node Signed-off-by: Stephen Chen --- @@ -22,5 +22,5 @@ index 32ef33b8b0..045273e3bd 100755 gen_loadable_node gen_kfdt_node -- -2.40.1 +Armbian diff --git a/patch/u-boot/legacy/u-boot-meko-rk3588/1005-rockchip-allow-passing-of-BL31-location-via-variable.patch b/patch/u-boot/legacy/u-boot-meko-rk3588/1005-rockchip-allow-passing-of-BL31-location-via-variable.patch index dacf067338..4316605389 100644 --- a/patch/u-boot/legacy/u-boot-meko-rk3588/1005-rockchip-allow-passing-of-BL31-location-via-variable.patch +++ b/patch/u-boot/legacy/u-boot-meko-rk3588/1005-rockchip-allow-passing-of-BL31-location-via-variable.patch @@ -1,15 +1,14 @@ -From 601defb9d43e770ae7b6cfd833dc3e8ea6318ffe Mon Sep 17 00:00:00 2001 +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Stephen Chen Date: Tue, 21 Mar 2023 16:11:34 +0800 -Subject: [PATCH 1005/1006] rockchip: allow passing of BL31 location via - variable +Subject: rockchip: allow passing of BL31 location via variable Source link: https://github.com/piter75/armbian-build/blob/rock-3a-bring-up/patch/u-boot/u-boot-rk356x/general-configurable-bl31-path.patch Signed-off-by: Stephen Chen --- - arch/arm/mach-rockchip/decode_bl31.py | 12 +++++++++++- - arch/arm/mach-rockchip/make_fit_atf.py | 13 ++++++++++++- + arch/arm/mach-rockchip/decode_bl31.py | 12 ++++++++- + arch/arm/mach-rockchip/make_fit_atf.py | 13 +++++++++- 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-rockchip/decode_bl31.py b/arch/arm/mach-rockchip/decode_bl31.py @@ -62,5 +61,5 @@ index 27b6ef7597..fac8d6f121 100755 for opt, val in opts: if opt == "-o": -- -2.40.1 +Armbian diff --git a/patch/u-boot/legacy/u-boot-meko-rk3588/1006-rk3588_meko_defconfig-evb-sans-optee.patch b/patch/u-boot/legacy/u-boot-meko-rk3588/1006-rk3588_meko_defconfig-evb-sans-optee.patch index 27d86393fb..633ee8b78e 100644 --- a/patch/u-boot/legacy/u-boot-meko-rk3588/1006-rk3588_meko_defconfig-evb-sans-optee.patch +++ b/patch/u-boot/legacy/u-boot-meko-rk3588/1006-rk3588_meko_defconfig-evb-sans-optee.patch @@ -1,12 +1,11 @@ -From 2c0f21e19f5dde73530853c11c2ae8d1f7fe36a0 Mon Sep 17 00:00:00 2001 +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Ricardo Pardini Date: Sat, 1 Jul 2023 10:49:27 +0200 -Subject: [PATCH 1006/1006] rk3588_meko_defconfig - evb sans optee +Subject: rk3588_meko_defconfig - evb sans optee --- - configs/rk3588_meko_defconfig | 238 ++++++++++++++++++++++++++++++++++ + configs/rk3588_meko_defconfig | 238 ++++++++++ 1 file changed, 238 insertions(+) - create mode 100644 configs/rk3588_meko_defconfig diff --git a/configs/rk3588_meko_defconfig b/configs/rk3588_meko_defconfig new file mode 100644 @@ -253,5 +252,5 @@ index 0000000000..73104bb182 +CONFIG_AVB_LIBAVB_USER=y +CONFIG_RK_AVB_LIBAVB_USER=y -- -2.40.1 +Armbian