From b2f817fcb472d2c84fa08ad913494583155561f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=AE=B8=E4=BA=91=E9=80=9A?= Date: Mon, 25 Apr 2022 13:30:12 +0000 Subject: [PATCH 1/2] =?UTF-8?q?Signed-off-by:=20=E8=AE=B8=E4=BA=91?= =?UTF-8?q?=E9=80=9A=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../board/hisilicon/hi3516dv300/hi3516dv300.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/u-boot-2020.01/board/hisilicon/hi3516dv300/hi3516dv300.c b/u-boot-2020.01/board/hisilicon/hi3516dv300/hi3516dv300.c index 335629e18f..d84f25f536 100755 --- a/u-boot-2020.01/board/hisilicon/hi3516dv300/hi3516dv300.c +++ b/u-boot-2020.01/board/hisilicon/hi3516dv300/hi3516dv300.c @@ -37,6 +37,7 @@ #endif /* CONFIG_AUTO_OTA_UPDATE */ #include #include +#define INDEPENDENT_RAMDISK_PARTITION #ifndef CONFIG_SYS_DCACHE_OFF void enable_caches(void) @@ -689,13 +690,30 @@ int misc_init_r(void) ReadMiscLogoBuffer(); +#ifdef INDEPENDENT_RAMDISK_PARTITION + const char bootargs_with_ramdisk[] = "mem=640M console=ttyAMA0,115200 mmz=anonymous,0,0xA8000000,384M " + "clk_ignore_unused androidboot.selinux=permissive skip_initramfs rootdelay=10 hardware=Hi3516DV300 " + "default_boot_device=soc/10100000.himci.eMMC init=/init " + "root=/dev/ram0 blkdevparts=mmcblk0:1M(boot),15M(kernel),20M(updater)," + "2M(misc),4M(ramdisk),3303M(system),256M(vendor),-(userdata) initrd=0x84000000,0xA24000"; + const char bootcmd_with_ramdisk[] = "mmc read 0x0 0x80000000 0x800 0x4800; " + "mmc read 0x0 0x84000000 0x13000 0x2000; " + "bootm 0x80000000 0x84000000:0xA24000"; + + memset(g_bootArgsStr, 0, ARG_SZ); + memcpy(g_bootArgsStr, bootargs_with_ramdisk, strlen(bootargs_with_ramdisk)); + env_set("bootcmd", bootcmd_with_ramdisk); +#endif + ChangeBootArgs(); // 0x80000000: boot img load addr; 0x84000000: updater img load addr const char updater_cmdBuf[] = "mmc read 0x0 0x80000000 0x800 0x4800; mmc read 0x0 0x84000000 0x8000 0xB000; " "bootm 0x80000000 0x84000000"; env_set("bootargs", g_bootArgsStr); +#ifndef INDEPENDENT_RAMDISK_PARTITION env_set("bootcmd", cmdBuf); +#endif if (g_isRecovery) { env_set("bootcmd", updater_cmdBuf); } -- Gitee From 385c7248f892739128d32f2c888640ba19c5ef72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=AE=B8=E4=BA=91=E9=80=9A?= Date: Wed, 27 Apr 2022 11:10:35 +0000 Subject: [PATCH 2/2] =?UTF-8?q?update=20u-boot-2020.01/board/hisilicon/hi3?= =?UTF-8?q?516dv300/hi3516dv300.c.=20Signed-off-by:=20=E8=AE=B8=E4=BA=91?= =?UTF-8?q?=E9=80=9A=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- u-boot-2020.01/board/hisilicon/hi3516dv300/hi3516dv300.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/u-boot-2020.01/board/hisilicon/hi3516dv300/hi3516dv300.c b/u-boot-2020.01/board/hisilicon/hi3516dv300/hi3516dv300.c index d84f25f536..c6b4f89d78 100755 --- a/u-boot-2020.01/board/hisilicon/hi3516dv300/hi3516dv300.c +++ b/u-boot-2020.01/board/hisilicon/hi3516dv300/hi3516dv300.c @@ -695,7 +695,7 @@ int misc_init_r(void) "clk_ignore_unused androidboot.selinux=permissive skip_initramfs rootdelay=10 hardware=Hi3516DV300 " "default_boot_device=soc/10100000.himci.eMMC init=/init " "root=/dev/ram0 blkdevparts=mmcblk0:1M(boot),15M(kernel),20M(updater)," - "2M(misc),4M(ramdisk),3303M(system),256M(vendor),-(userdata) initrd=0x84000000,0xA24000"; + "2M(misc),4M(ramdisk),3303M(system),256M(vendor),50M(sys_prod),50M(chip_prod),-(userdata) initrd=0x84000000,0xA24000"; const char bootcmd_with_ramdisk[] = "mmc read 0x0 0x80000000 0x800 0x4800; " "mmc read 0x0 0x84000000 0x13000 0x2000; " "bootm 0x80000000 0x84000000:0xA24000"; -- Gitee