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