Add MTD and UBI support to ast-g5
PATCH 1/1 Add MTD and UBI support to ast-g5
Add MTD and UBI support to the default g5 include, conditioned to having MTDPARTS_DEFAULT defined.
This allows platforms to enable this support if desired without adding it by default since it increases the size of u-boot.
--- include/configs/ast-g5-ncsi.h | 10 ++++++++++ 1 file changed, 10 insertions(+)
include/configs/ast-g5-ncsi.h +10 -0
@@ -28,4 +28,14 @@#define CONFIG_HW_WATCHDOG +/* MTD and UBI */ +#ifdef MTDPARTS_DEFAULT +#define CONFIG_FLASH_CFI_MTD +#define CONFIG_CMD_UBI +#define CONFIG_RBTREE +#define CONFIG_MTD_DEVICE +#define CONFIG_MTD_PARTITIONS +#define CONFIG_CMD_MTDPARTS +#endif +#endif /* __AST_G5_NCSI_CONFIG_H */
Signature · 1 line
1.8.2.2
Quoted 2 lines · Adriana Kobylak
Add MTD and UBI support to the default g5 include, conditioned to having
MTDPARTS_DEFAULTdefined.
Can you explain what we're planning on using mtdparts for? As I understand it this is for specifying the mtd partitions on the command line.
Are you proposing to move away from the device tree description?
Quoted 2 lines
This allows platforms to enable this support if desired without adding it by default since it increases the size of u-boot.
Do you have numbers? It's good to keep track in case we need to go back and save space in the future.
Quoted 10 lines
Signed-off-by Adriana Kobylak <[email protected]>--- include/configs/ast-g5-ncsi.h | 10 ++++++++++ 1 file changed, 10 insertions(+)include/configs/ast-g5-ncsi.h +0
-0
include/configs/ast-g5-ncsi.h line 34
Quoted 7 lines
include/configs/ast-g5-ncsi.h +4
-0@@ -28,4 +28,14 @@#define CONFIG_HW_WATCHDOG +/* MTD and UBI */ +#ifdef MTDPARTS_DEFAULT +#define CONFIG_FLASH_CFI_MTD +#define CONFIG_CMD_UBI
I thought Milton mentioned today that we didn't need to enable the UBI command in u-boot, but I may have misunderstood.
Quoted 10 lines
include/configs/ast-g5-ncsi.h +6
-1+#define CONFIG_RBTREE +#define CONFIG_MTD_DEVICE +#define CONFIG_MTD_PARTITIONS +#define CONFIG_CMD_MTDPARTS +#endif +#endif /* __AST_G5_NCSI_CONFIG_H */ --1.8.2.2
Thanks Joel, answers inline below.
Quoted 10 lines · Joel Stanley
Quoted 2 lines · Adriana Kobylak
Add MTD and UBI support to the default g5 include, conditioned to having
MTDPARTS_DEFAULTdefined.Can you explain what we're planning on using mtdparts for? As I understand it this is for specifying the mtd partitions on the command line.
Are you proposing to move away from the device tree description?
mtdparts is needed by u-boot to find the kernel in a ubi volume, for example the u-boot command "ubi part" requires it.
Implementing the device tree in u-boot could be a future possibility but the current version of u-boot in openbmc can't read from any other chips besides the bmc, so we need to duplicate the device tree layout of the bmc chip in u-boot for now.
Quoted 6 lines
Quoted 3 lines
This allows platforms to enable this support if desired without adding it by default since it increases the size of u-boot.
Do you have numbers? It's good to keep track in case we need to go back and save space in the future.
After you mentioned that you saw u-boot increasing by 122kB with an earlier patch, I removed UBIFS since it wasn't needed, bringing the increase down by 50kB. The new size is 302kB (increase of 72kB over current size).
Quoted 14 lines
Quoted 14 lines
Signed-off-by Adriana Kobylak <[email protected]>--- include/configs/ast-g5-ncsi.h | 10 ++++++++++ 1 file changed, 10 insertions(+)include/configs/ast-g5-ncsi.h +0
-0@@ -28,4 +28,14 @@#define CONFIG_HW_WATCHDOG
Quoted 7 lines
include/configs/ast-g5-ncsi.h line 34
Quoted 4 lines
include/configs/ast-g5-ncsi.h +4
-0+/* MTD and UBI */ +#ifdef MTDPARTS_DEFAULT +#define CONFIG_FLASH_CFI_MTD +#define CONFIG_CMD_UBI I thought Milton mentioned today that we didn't need to enable the UBI command in u-boot, but I may have misunderstood.
It is needed since the kernel is in ubi volume.
Quoted 11 lines
Quoted 11 lines
include/configs/ast-g5-ncsi.h +6
-1+#define CONFIG_RBTREE +#define CONFIG_MTD_DEVICE +#define CONFIG_MTD_PARTITIONS +#define CONFIG_CMD_MTDPARTS +#endif +#endif /* __AST_G5_NCSI_CONFIG_H */ --1.8.2.2
include/configs/ast-g5-ncsi.h
Quoted 16 lines · Adriana Kobylak
Add MTD and UBI support to the default g5 include, conditioned to having
MTDPARTS_DEFAULTdefined.
This allows platforms to enable this support if desired without adding it by default since it increases the size of u-boot.Signed-off-by Adriana Kobylak <[email protected]>---
include/configs/ast-g5-ncsi.h | 10 ++++++++++1 file changed, 10 insertions(+)include/configs/ast-g5- renamed from include/configs/ast-g5-ncsi.h +0
-0
ncsi.h
index 12d6684..b126e6e 100644include/configs/ast-g5-ncsi.h +0
-0
I suggest we make this common to all platforms to reduce the configuration headache. Putting the #defines in ast-g5-ncsi doesn't isolate the change to Witherspoon, and I think we should avoid further fragmentation e.g. by introducing a Witherspoon-specific configuration.
If other platforms need to recover the extra space required we can deal with that on an as-needed basis in the future.
Cheers,
Andrew
Quoted 15 lines
include/configs/ast-g5-ncsi.h +0
-0@@ -28,4 +28,14 @@
#defineCONFIG_HW_WATCHDOGinclude/configs/ast-g5-ncsi.h +10
-0+/* MTD and UBI */ +#ifdef MTDPARTS_DEFAULT +#define CONFIG_FLASH_CFI_MTD +#define CONFIG_CMD_UBI +#define CONFIG_RBTREE +#define CONFIG_MTD_DEVICE +#define CONFIG_MTD_PARTITIONS +#define CONFIG_CMD_MTDPARTS +#endif +#endif /*
__AST_G5_NCSI_CONFIG_H*/
Re: [PATCH u-boot v2016.07-aspeed-openbmc] Add optional MTD and UBI support to ast-g4 and ast-g5
Add MTD and UBI support conditioned to having MTDPARTS_DEFAULT defined. This allows platforms to enable this support if desired without adding it by default since it increases the size of u-boot by about 70kB.
--- include/configs/ast-g4-ncsi.h | 10 ++++++++++ include/configs/ast-g4-phy.h | 10 ++++++++++ include/configs/ast-g5-ncsi.h | 10 ++++++++++ include/configs/ast-g5-phy.h | 10 ++++++++++ 4 files changed, 40 insertions(+)
include/configs/ast-g4-ncsi.h +10 -0
@@ -26,4 +26,14 @@#define CONFIG_CPU_420 1#define CONFIG_DRAM_528 1 +/* Optional MTD and UBI */ +#ifdef MTDPARTS_DEFAULT +#define CONFIG_FLASH_CFI_MTD +#define CONFIG_CMD_UBI +#define CONFIG_RBTREE +#define CONFIG_MTD_DEVICE +#define CONFIG_MTD_PARTITIONS +#define CONFIG_CMD_MTDPARTS +#endif +#endif /* __AST_G4_NCSI_CONFIG_H */
include/configs/ast-g4-phy.h +10 -0
@@ -28,4 +28,14 @@#define CONFIG_CPU_420 1#define CONFIG_DRAM_528 1 +/* Optional MTD and UBI */ +#ifdef MTDPARTS_DEFAULT +#define CONFIG_FLASH_CFI_MTD +#define CONFIG_CMD_UBI +#define CONFIG_RBTREE +#define CONFIG_MTD_DEVICE +#define CONFIG_MTD_PARTITIONS +#define CONFIG_CMD_MTDPARTS +#endif +#endif /* __AST_G4_NCSI_CONFIG_H */
include/configs/ast-g5-ncsi.h +10 -0
@@ -28,4 +28,14 @@#define CONFIG_HW_WATCHDOG +/* Optional MTD and UBI */ +#ifdef MTDPARTS_DEFAULT +#define CONFIG_FLASH_CFI_MTD +#define CONFIG_CMD_UBI +#define CONFIG_RBTREE +#define CONFIG_MTD_DEVICE +#define CONFIG_MTD_PARTITIONS +#define CONFIG_CMD_MTDPARTS +#endif +#endif /* __AST_G5_NCSI_CONFIG_H */
include/configs/ast-g5-phy.h +10 -0
@@ -30,4 +30,14 @@/* platform.S */ #define CONFIG_DRAM_ECC_SIZE 0x10000000 +/* Optional MTD and UBI */ +#ifdef MTDPARTS_DEFAULT +#define CONFIG_FLASH_CFI_MTD +#define CONFIG_CMD_UBI +#define CONFIG_RBTREE +#define CONFIG_MTD_DEVICE +#define CONFIG_MTD_PARTITIONS +#define CONFIG_CMD_MTDPARTS +#endif +#endif /* __AST_G5_PHY_CONFIG_H */
Signature · 1 line
1.8.2.2
Re: [PATCH u-boot v2016.07-aspeed-openbmc] Add optional MTD and UBI support to ast-g4 and ast-g5
Quoted 11 lines · Adriana Kobylak
Add MTD and UBI support conditioned to having
MTDPARTS_DEFAULTdefined. This allows platforms to enable this support if desired without adding it by default since it increases the size of u-boot by about 70kB.Quoted 1 line
Signed-off-by Adriana Kobylak <[email protected]>---
include/configs/ast-g4-ncsi.h | 10 ++++++++++
include/configs/ast-g4-phy.h | 10 ++++++++++
include/configs/ast-g5-ncsi.h | 10 ++++++++++
include/configs/ast-g5-phy.h | 10 ++++++++++4 files changed, 40 insertions(+)
So my understanding is instead of duplicating the additions we can put the them once in include/configs/ast-common.h:
$ grep 'ast-common.h' include/configs/ast*
include/configs/ast-g4-ncsi.h:#include <configs/ast-common.h>
include/configs/ast-g4-phy.h:#include <configs/ast-common.h>
include/configs/ast-g5-ncsi.h:#include <configs/ast-common.h>
include/configs/ast-g5-phy.h:#include <configs/ast-common.h>Sorry for the back-and-forth, but I think that would be a cleaner solution.
Cheers,
Andrew
Quoted 77 lines
include/configs/ast-g4-ncsi.h +0
-0@@ -26,4 +26,14 @@Quoted 2 lines
#define
CONFIG_CPU_4201
#defineCONFIG_DRAM_5281include/configs/ast-g4-ncsi.h +10
-0+/* Optional MTD and UBI */ +#ifdef MTDPARTS_DEFAULT +#define CONFIG_FLASH_CFI_MTD +#define CONFIG_CMD_UBI +#define CONFIG_RBTREE +#define CONFIG_MTD_DEVICE +#define CONFIG_MTD_PARTITIONS +#define CONFIG_CMD_MTDPARTS +#endif +Quoted 1 line
#endif /*
__AST_G4_NCSI_CONFIG_H*/include/configs/ast-g4-phy.h +0
-0@@ -28,4 +28,14 @@Quoted 2 lines
#define
CONFIG_CPU_4201
#defineCONFIG_DRAM_5281include/configs/ast-g4-phy.h +10
-0+/* Optional MTD and UBI */ +#ifdef MTDPARTS_DEFAULT +#define CONFIG_FLASH_CFI_MTD +#define CONFIG_CMD_UBI +#define CONFIG_RBTREE +#define CONFIG_MTD_DEVICE +#define CONFIG_MTD_PARTITIONS +#define CONFIG_CMD_MTDPARTS +#endif +Quoted 1 line
#endif /*
__AST_G4_NCSI_CONFIG_H*/include/configs/ast-g5-ncsi.h +0
-0@@ -28,4 +28,14 @@
#defineCONFIG_HW_WATCHDOGinclude/configs/ast-g5-ncsi.h +10
-0+/* Optional MTD and UBI */ +#ifdef MTDPARTS_DEFAULT +#define CONFIG_FLASH_CFI_MTD +#define CONFIG_CMD_UBI +#define CONFIG_RBTREE +#define CONFIG_MTD_DEVICE +#define CONFIG_MTD_PARTITIONS +#define CONFIG_CMD_MTDPARTS +#endif +Quoted 1 line
#endif /*
__AST_G5_NCSI_CONFIG_H*/include/configs/ast-g5-phy.h +0
-0@@ -30,4 +30,14 @@ /* platform.S */Quoted 1 line
Quoted 1 line
#define
CONFIG_DRAM_ECC_SIZE0x10000000include/configs/ast-g5-phy.h +10
-0+/* Optional MTD and UBI */ +#ifdef MTDPARTS_DEFAULT +#define CONFIG_FLASH_CFI_MTD +#define CONFIG_CMD_UBI +#define CONFIG_RBTREE +#define CONFIG_MTD_DEVICE +#define CONFIG_MTD_PARTITIONS +#define CONFIG_CMD_MTDPARTS +#endif +Quoted 1 line
#endif /*
__AST_G5_PHY_CONFIG_H*/
Re: [PATCH u-boot v2016.07-aspeed-openbmc] Add optional MTD and UBI support to ast-common
Add MTD and UBI support conditioned to having MTDPARTS_DEFAULT defined. This allows platforms to enable this support if desired without adding it by default since it increases the size of u-boot by about 70kB.
--- include/configs/ast-common.h | 12 ++++++++++++ 1 file changed, 12 insertions(+)
include/configs/ast-common.h +12 -0
@@ -84,6 +84,18 @@#define CONFIG_SYS_MAXARGS 16#define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE +/* +* Optional MTD and UBI support +*/ +#ifdef MTDPARTS_DEFAULT +#define CONFIG_FLASH_CFI_MTD +#define CONFIG_CMD_UBI +#define CONFIG_RBTREE +#define CONFIG_MTD_DEVICE +#define CONFIG_MTD_PARTITIONS +#define CONFIG_CMD_MTDPARTS +#endif +#define CONFIG_BOOTARGS "console=ttyS4,115200n8 root=/dev/ram rw"#define CONFIG_AST_SPI_NOR /* AST SPI NOR Flash */
Signature · 1 line
1.8.2.2
Re: [PATCH u-boot v2016.07-aspeed-openbmc] Add optional MTD and UBI support to ast-g4 and ast-g5
In reply to Andrew JefferyQuoted 19 lines · Andrew Jeffery
Quoted 11 lines · Adriana Kobylak
Add MTD and UBI support conditioned to having
MTDPARTS_DEFAULTdefined. This allows platforms to enable this support if desired without adding it by default since it increases the size of u-boot by about 70kB.Quoted 1 line
Signed-off-by Adriana Kobylak <[email protected]>--- include/configs/ast-g4-ncsi.h | 10 ++++++++++ include/configs/ast-g4-phy.h | 10 ++++++++++ include/configs/ast-g5-ncsi.h | 10 ++++++++++ include/configs/ast-g5-phy.h | 10 ++++++++++ 4 files changed, 40 insertions(+)So my understanding is instead of duplicating the additions we can put the them once in
include/configs/ast-common.h:
Quoted 9 lines
$ grep 'ast-common.h' include/configs/ast* include/configs/ast-g4-ncsi.h:#include <configs/ast-common.h> include/configs/ast-g4-phy.h:#include <configs/ast-common.h> include/configs/ast-g5-ncsi.h:#include <configs/ast-common.h> include/configs/ast-g5-phy.h:#include <configs/ast-common.h>Sorry for the back-and-forth, but I think that would be a cleaner solution.
Yep, agree. Thanks Andrew for the feedback, better to do it right the first time. Will be sending a new patch in a min.
Quoted 81 lines
Cheers,
Andrew
Quoted 77 lines
include/configs/ast-g4-ncsi.h +0
-0@@ -26,4 +26,14 @@Quoted 2 lines
#define
CONFIG_CPU_4201
#defineCONFIG_DRAM_5281include/configs/ast-g4-ncsi.h +10
-0+/* Optional MTD and UBI */ +#ifdef MTDPARTS_DEFAULT +#define CONFIG_FLASH_CFI_MTD +#define CONFIG_CMD_UBI +#define CONFIG_RBTREE +#define CONFIG_MTD_DEVICE +#define CONFIG_MTD_PARTITIONS +#define CONFIG_CMD_MTDPARTS +#endif +Quoted 1 line
#endif /*
__AST_G4_NCSI_CONFIG_H*/include/configs/ast-g4-phy.h +0
-0@@ -28,4 +28,14 @@Quoted 2 lines
#define
CONFIG_CPU_4201
#defineCONFIG_DRAM_5281include/configs/ast-g4-phy.h +10
-0+/* Optional MTD and UBI */ +#ifdef MTDPARTS_DEFAULT +#define CONFIG_FLASH_CFI_MTD +#define CONFIG_CMD_UBI +#define CONFIG_RBTREE +#define CONFIG_MTD_DEVICE +#define CONFIG_MTD_PARTITIONS +#define CONFIG_CMD_MTDPARTS +#endif +Quoted 1 line
#endif /*
__AST_G4_NCSI_CONFIG_H*/include/configs/ast-g5-ncsi.h +10
-0@@ -28,4 +28,14 @@#define CONFIG_HW_WATCHDOG +/* Optional MTD and UBI */ +#ifdef MTDPARTS_DEFAULT +#define CONFIG_FLASH_CFI_MTD +#define CONFIG_CMD_UBI +#define CONFIG_RBTREE +#define CONFIG_MTD_DEVICE +#define CONFIG_MTD_PARTITIONS +#define CONFIG_CMD_MTDPARTS +#endif +Quoted 1 line
#endif /*
__AST_G5_NCSI_CONFIG_H*/include/configs/ast-g5-phy.h +0
-0@@ -30,4 +30,14 @@/* platform.S */ Quoted 1 line
Quoted 1 line
#define
CONFIG_DRAM_ECC_SIZE0x10000000include/configs/ast-g5-phy.h +10
-0+/* Optional MTD and UBI */ +#ifdef MTDPARTS_DEFAULT +#define CONFIG_FLASH_CFI_MTD +#define CONFIG_CMD_UBI +#define CONFIG_RBTREE +#define CONFIG_MTD_DEVICE +#define CONFIG_MTD_PARTITIONS +#define CONFIG_CMD_MTDPARTS +#endif +Quoted 1 line
#endif /*
__AST_G5_PHY_CONFIG_H*/
Andrew Jeffery
AppliedRe: [PATCH u-boot v2016.07-aspeed-openbmc] Add optional MTD and UBI support to ast-common
In reply to Adriana KobylakQuoted 5 lines · Adriana Kobylak
Add MTD and UBI support conditioned to having
MTDPARTS_DEFAULTdefined. This allows platforms to enable this support if desired without adding it by default since it increases the size of u-boot by about 70kB.Signed-off-by Adriana Kobylak <[email protected]>
Applied to v2016.07-aspeed-openbmc.
Thanks,
Andrew
Quoted 27 lines
---
include/configs/ast-common.h | 12 ++++++++++++1 file changed, 12 insertions(+)include/configs/ast-common.h +0
-0@@ -84,6 +84,18 @@Quoted 2 lines
#define
CONFIG_SYS_MAXARGS16
#defineCONFIG_SYS_BARGSIZECONFIG_SYS_CBSIZEinclude/configs/ast-common.h +12
-0+/* +* Optional MTD and UBI support +*/ +#ifdef MTDPARTS_DEFAULT +#define CONFIG_FLASH_CFI_MTD +#define CONFIG_CMD_UBI +#define CONFIG_RBTREE +#define CONFIG_MTD_DEVICE +#define CONFIG_MTD_PARTITIONS +#define CONFIG_CMD_MTDPARTS +#endif +Quoted 1 line
#define
CONFIG_BOOTARGS"console=ttyS4,115200n8 root=/dev/ram rw"
#define CONFIG_AST_SPI_NOR /* AST SPI NOR Flash */