Files
BPI-CM9-Linux/aml-patches/aml-comp/uboot/bl33/v2025/0001-a9-armbian-support-multidtb-1-1.patch

87 lines
3.2 KiB
Diff

From 353b737904b3b9afd3bdf69ce912d2bc96064c16 Mon Sep 17 00:00:00 2001
From: "chunfei.wang" <chunfei.wang@amlogic.com>
Date: Fri, 7 Aug 2026 02:53:50 +0000
Subject: [PATCH 1/2] a9: armbian support multidtb [1/1]
PD#SWPL-274170
Problem:
a9 armbian not support multidtb
Solution:
add 4g/8g/16g dtb
Fixed conflicts:
NA
Verify:
A9
Change-Id: I7cc964a39248d5f3d5d25be0d2823b9edb4f3ef6
Signed-off-by: chunfei.wang <chunfei.wang@amlogic.com>
---
include/amlogic/emmc_partitions.h | 4 +--
include/configs/amlogic/a9_by401_debian.h | 30 ++++++++++++++++++++++-
2 files changed, 31 insertions(+), 3 deletions(-)
diff --git a/include/amlogic/emmc_partitions.h b/include/amlogic/emmc_partitions.h
index f56b1c3589d..b4867220ac2 100644
--- a/include/amlogic/emmc_partitions.h
+++ b/include/amlogic/emmc_partitions.h
@@ -120,8 +120,8 @@
#define DTB_OFFSET (SZ_1M * 4)
#endif /* CONFIG_AMLOGIC_MIN_RESERVED_PARTITION */
#define DTB_ADDR (RESERVED_GPT_OFFSET + DTB_OFFSET)
-#define DTB_BLK_SIZE (512)
-#define DTB_BLK_CNT (512)
+#define DTB_BLK_SIZE (1024)
+#define DTB_BLK_CNT (1024)
#define DTB_SIZE (DTB_BLK_CNT * DTB_BLK_SIZE)
#define DTB_COPIES (2)
#define DTB_AREA_BLK_CNT (DTB_BLK_CNT * DTB_COPIES)
diff --git a/include/configs/amlogic/a9_by401_debian.h b/include/configs/amlogic/a9_by401_debian.h
index 92a5357ff05..2e9b635729b 100644
--- a/include/configs/amlogic/a9_by401_debian.h
+++ b/include/configs/amlogic/a9_by401_debian.h
@@ -121,8 +121,36 @@
"osd open; osd clear; bmp display ${loadaddr2};"\
"fi;"\
"\0" \
+ "set_linux_fdt="\
+ "if test ${aml_dt} = a9_a311y3_by401-4g; then "\
+ "setenv fdtfile a9_a311y3_by401_4g_linux.dtb; "\
+ "elif test ${aml_dt} = a9_a311y3_by401-8g; then "\
+ "setenv fdtfile a9_a311y3_by401_8g_linux.dtb; "\
+ "elif test ${aml_dt} = a9_a311y3_by401-16g; then "\
+ "setenv fdtfile a9_a311y3_by401_16g_linux.dtb; "\
+ "elif test ${aml_dt} = a9_a311y3_by401-4g-hdmi; then "\
+ "setenv fdtfile a9_a311y3_by401_4g_hdmi_linux.dtb; "\
+ "elif test ${aml_dt} = a9_a311y3_by401-8g-hdmi; then "\
+ "setenv fdtfile a9_a311y3_by401_8g_hdmi_linux.dtb; "\
+ "elif test ${aml_dt} = a9_a311y3_by401-16g-hdmi; then "\
+ "setenv fdtfile a9_a311y3_by401_16g_hdmi_linux.dtb; "\
+ "elif test ${aml_dt} = a9_a311y3_by401-4g-v1; then "\
+ "setenv fdtfile a9_a311y3_by401_4g_linux_v1.dtb; "\
+ "elif test ${aml_dt} = a9_a311y3_by401-8g-v1; then "\
+ "setenv fdtfile a9_a311y3_by401_8g_linux_v1.dtb; "\
+ "elif test ${aml_dt} = a9_a311y3_by401-16g-v1; then "\
+ "setenv fdtfile a9_a311y3_by401_16g_linux_v1.dtb; "\
+ "elif test ${aml_dt} = a9_a311y3_by401-4g-h-v1; then "\
+ "setenv fdtfile a9_a311y3_by401_4g_hdmi_linux_v1.dtb; "\
+ "elif test ${aml_dt} = a9_a311y3_by401-8g-h-v1; then "\
+ "setenv fdtfile a9_a311y3_by401_8g_hdmi_linux_v1.dtb; "\
+ "elif test ${aml_dt} = a9_a311y3_by401-16g-h-v1; then "\
+ "setenv fdtfile a9_a311y3_by401_16g_hdmi_linux_v1.dtb; "\
+ "fi;"\
+ "echo fdtfile=${fdtfile};"\
+ "\0"\
BOOTENV\
- "bootcmd=run distro_bootcmd\0"\
+ "bootcmd=run set_linux_fdt; run distro_bootcmd\0"\
"pxe_boot=dhcp; pxe get && pxe boot\0"\
"bootcmd_storeboot=run storeboot\0"\
"boot_targets=spi usb0 mmc0 mmc1 storeboot pxe dhcp\0"
--
2.43.2