blob: 4e465ced5b8f3acc1552796e87f6f4cbc34d4653 [file] [log] [blame]
Adriana Kobylak3749f522017-08-09 17:17:25 -05001From d9e403ce8669d9b0ac4e94a7c64cef91ad51dc80 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] config/ast-common: Add bootopts to support ubi and mtd partitioning
5
6Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
7---
8 include/configs/ast-common.h | 20 ++++++++++++++++++--
9 1 file changed, 18 insertions(+), 2 deletions(-)
10
11diff --git a/include/configs/ast-common.h b/include/configs/ast-common.h
Adriana Kobylak48c8fa32017-08-19 09:32:18 -050012index e7fa6ed..578de2c 100644
Adriana Kobylak3749f522017-08-09 17:17:25 -050013--- a/include/configs/ast-common.h
14+++ b/include/configs/ast-common.h
15@@ -84,10 +84,16 @@
16 #define CONFIG_SYS_MAXARGS 16
17 #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
18
19+/*
20+ * Dynamic MTD Partition support
21+ */
22+#define MTDIDS_DEFAULT "nor0=bmc"
23+#define MTDPARTS_DEFAULT "mtdparts=bmc:384k(u-boot),128k(u-boot-env),-(obmc-ubi)"
24+
25 #if 0
26 #define CONFIG_BOOTARGS "console=ttyS4,115200n8 root=/dev/ram rw"
27 #endif
28-#define CONFIG_BOOTARGS "console=ttyS4,115200n8 root=/dev/mtdblock4 ro"
29+#define CONFIG_BOOTARGS "console=ttyS4,115200n8 ubi.mtd=obmc-ubi,0,0,0 ubi.mtd=alt-obmc-ubi,0,0,4 ro rootfstype=squashfs"
30
31 #define CONFIG_AST_SPI_NOR /* AST SPI NOR Flash */
32 #define CONFIG_FMC_CS 1
33@@ -96,6 +102,7 @@
34 #define CONFIG_ENV_IS_IN_FLASH 1
35 #define CONFIG_ENV_ADDR (AST_FMC_CS0_BASE + 0x60000)
36 #define CONFIG_ENV_ADDR_REDUND (AST_FMC_CS0_BASE + 0x70000)
37+#define CONFIG_LOADADDR 80800000
38
39 #define CONFIG_ENV_OFFSET 0x60000 /* environment starts here */
40 #define CONFIG_ENV_OFFSET_REDUND 0x70000
Adriana Kobylak48c8fa32017-08-19 09:32:18 -050041@@ -109,12 +116,21 @@
Adriana Kobylak3749f522017-08-09 17:17:25 -050042 " bootm 20080000; else bootm 20080000 20300000; " \
43 "fi"
44 #endif
45-#define CONFIG_BOOTCOMMAND "fdt addr 20080000; bootm 20080000"
46+#define CONFIG_BOOTCOMMAND "run set_bootargs; run obmc_bootcmd"
47 #define CONFIG_ENV_OVERWRITE
Adriana Kobylak48c8fa32017-08-19 09:32:18 -050048
Adriana Kobylak3749f522017-08-09 17:17:25 -050049 #define ASPEED_ENV_SETTINGS \
50+ "ubiblock=0,1 \0" \
51+ "root=/dev/ubiblock0_1 \0" \
52+ "kernelname=kernel0 \0" \
53+ "kernelname=kernel0 \0" \
Adriana Kobylak48c8fa32017-08-19 09:32:18 -050054+ "loadaddr=" __stringify(CONFIG_LOADADDR) "\0" \
55+ "set_bootargs=setenv bootargs " CONFIG_BOOTARGS " ubi.block=\${ubiblock} root=\${root} \0" \
Adriana Kobylak3749f522017-08-09 17:17:25 -050056+ "obmc_bootcmd=ubi part obmc-ubi; ubi read ${loadaddr} ${kernelname}; bootm ${loadaddr} \0" \
57 "verify=yes\0" \
58 "spi_dma=yes\0" \
59+ "mtdids=" MTDIDS_DEFAULT "\0" \
60+ "mtdparts=" MTDPARTS_DEFAULT "\0" \
61 ""
62
63 #endif /* __AST_COMMON_CONFIG_H */
64--
651.8.2.2
66