Adriana Kobylak | dd70153 | 2017-08-09 17:17:25 -0500 | [diff] [blame] | 1 | From d9e403ce8669d9b0ac4e94a7c64cef91ad51dc80 Mon Sep 17 00:00:00 2001 |
| 2 | From: Adriana Kobylak <anoo@us.ibm.com> |
| 3 | Date: Wed, 9 Aug 2017 14:11:56 -0500 |
| 4 | Subject: [PATCH] config/ast-common: Add bootopts to support ubi and mtd partitioning |
| 5 | |
| 6 | Signed-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 | |
| 11 | diff --git a/include/configs/ast-common.h b/include/configs/ast-common.h |
| 12 | index b8b1f01..9c12f1f 100644 |
| 13 | --- 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 |
| 41 | @@ -109,11 +116,20 @@ |
| 42 | " 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 |
| 48 | #define ASPEED_ENV_SETTINGS \ |
| 49 | + "ubiblock=0,1 \0" \ |
| 50 | + "root=/dev/ubiblock0_1 \0" \ |
| 51 | + "kernelname=kernel0 \0" \ |
| 52 | + "kernelname=kernel0 \0" \ |
| 53 | + "loadaddr=" CONFIG_LOADADDR "\0" \ |
| 54 | + "set_bootargs=setenv bootargs " CONFIG_BOOTARGS " ubi.block=${ubiblock} root=${root} \0" \ |
| 55 | + "obmc_bootcmd=ubi part obmc-ubi; ubi read ${loadaddr} ${kernelname}; bootm ${loadaddr} \0" \ |
| 56 | "verify=yes\0" \ |
| 57 | "spi_dma=yes\0" \ |
| 58 | + "mtdids=" MTDIDS_DEFAULT "\0" \ |
| 59 | + "mtdparts=" MTDPARTS_DEFAULT "\0" \ |
| 60 | "" |
| 61 | |
| 62 | #endif /* __AST_COMMON_CONFIG_H */ |
| 63 | -- |
| 64 | 1.8.2.2 |
| 65 | |