1From 0c77be343fc4781719dcc0748bc29a26ea83e0a3 Mon Sep 17 00:00:00 2001 2From: Adriana Kobylak <anoo@us.ibm.com> 3Date: Wed, 9 Aug 2017 14:11:56 -0500 4Subject: [PATCH 3/4] config/ast-common: Add bootopts to support ubi and mtd 5 partitioning 6 7Upstream-Status: Pending 8 9Signed-off-by: Adriana Kobylak <anoo@us.ibm.com> 10--- 11 include/configs/ast-common.h | 19 +++++++++++++++++-- 12 1 file changed, 17 insertions(+), 2 deletions(-) 13 14diff --git a/include/configs/ast-common.h b/include/configs/ast-common.h 15index 7ddba62298..14191e4ab0 100644 16--- a/include/configs/ast-common.h 17+++ b/include/configs/ast-common.h 18@@ -84,6 +84,12 @@ 19 #define CONFIG_SYS_MAXARGS 16 20 #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE 21 22+/* 23+ * Dynamic MTD Partition support 24+ */ 25+#define MTDIDS_DEFAULT "nor0=bmc" 26+#define MTDPARTS_DEFAULT "mtdparts=bmc:384k(u-boot),128k(u-boot-env),-(obmc-ubi)" 27+ 28 /* 29 * Optional MTD and UBI support 30 */ 31@@ -99,7 +105,7 @@ 32 #if 0 33 #define CONFIG_BOOTARGS "console=ttyS4,115200n8 root=/dev/ram rw" 34 #endif 35-#define CONFIG_BOOTARGS "console=ttyS4,115200n8 root=/dev/mtdblock4 ro" 36+#define CONFIG_BOOTARGS "console=ttyS4,115200n8 ubi.mtd=obmc-ubi,0,0,0 ubi.mtd=alt-obmc-ubi,0,0,4 ro rootfstype=squashfs" 37 38 #define CONFIG_AST_SPI_NOR /* AST SPI NOR Flash */ 39 #define CONFIG_FMC_CS 1 40@@ -108,18 +114,27 @@ 41 #define CONFIG_ENV_IS_IN_FLASH 1 42 #define CONFIG_ENV_ADDR (AST_FMC_CS0_BASE + 0x60000) 43 #define CONFIG_ENV_ADDR_REDUND (AST_FMC_CS0_BASE + 0x70000) 44+#define CONFIG_LOADADDR 80800000 45 46 #define CONFIG_ENV_OFFSET 0x60000 /* environment starts here */ 47 #define CONFIG_ENV_OFFSET_REDUND 0x70000 48 #define CONFIG_ENV_SIZE 0x10000 /* Total Size of Environment Sector */ 49 #define CONFIG_ENV_SIZE_REDUND 0x10000 50 51-#define CONFIG_BOOTCOMMAND "bootm 20080000" 52+#define CONFIG_BOOTCOMMAND "run set_bootargs; run obmc_bootcmd" 53 #define CONFIG_ENV_OVERWRITE 54 55 #define ASPEED_ENV_SETTINGS \ 56+ "ubiblock=0,1 \0" \ 57+ "root=/dev/ubiblock0_1 \0" \ 58+ "kernelname=kernel-0 \0" \ 59+ "loadaddr=" __stringify(CONFIG_LOADADDR) "\0" \ 60+ "set_bootargs=setenv bootargs " CONFIG_BOOTARGS " ubi.block=\${ubiblock} root=\${root} \0" \ 61+ "obmc_bootcmd=ubi part obmc-ubi; ubi read ${loadaddr} ${kernelname}; bootm ${loadaddr} \0" \ 62 "verify=yes\0" \ 63 "spi_dma=yes\0" \ 64+ "mtdids=" MTDIDS_DEFAULT "\0" \ 65+ "mtdparts=" MTDPARTS_DEFAULT "\0" \ 66 "" 67 68 #endif /* __AST_COMMON_CONFIG_H */ 69-- 702.14.3 71 72