am335x* defconfig: Increase u-boot partition in mtdparts
RFC PATCH 1/1 am335x* defconfig: Increase u-boot partition in mtdparts
From: Hong Guan <[email protected]>
Fix u-boot NAND partition in MTDPARTS_DEFAULT since the size of u-boot image has grown beyond 1MB and no longer fits in 1MB NAND partition, thus we are failing to flash and boot via GPMC NAND.
Increase the size of NAND.u-boot to 2MB since the size of u-boot.img is currently 1.4M.
---
This patch is marked RFC to understand if solution is acceptable since changing partition sizes will not be backwards compatible solution.
One other solution was too try to reduce the size of u-boot proper, but removing features (boot modes.. etc) did not seem to get the size of u-boot proper to 1MB with a usable u-boot proper.
--- configs/am335x_evm_defconfig | 2 +- configs/am335x_hs_evm_defconfig | 2 +- configs/am335x_hs_evm_uart_defconfig | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)
configs/am335x_evm_defconfig +1 -1
@@ -49,7 +49,7 @@ CONFIG_CMD_NAND=y CONFIG_BOOTP_DNS2=y CONFIG_CMD_MTDPARTS=y CONFIG_MTDIDS_DEFAULT="nand0=nand.0" -CONFIG_MTDPARTS_DEFAULT="mtdparts=nand.0:128k(NAND.SPL),128k(NAND.SPL.backup1),128k(NAND.SPL.backup2),128k(NAND.SPL.backup3),256k(NAND.u-boot-spl-os),1m(NAND.u-boot),128k(NAND.u-boot-env),128k(NAND.u-boot-env.backup1),8m(NAND.kernel),-(NAND.file-system)" +CONFIG_MTDPARTS_DEFAULT="mtdparts=nand.0:128k(NAND.SPL),128k(NAND.SPL.backup1),128k(NAND.SPL.backup2),128k(NAND.SPL.backup3),256k(NAND.u-boot-spl-os),2m(NAND.u-boot),128k(NAND.u-boot-env),128k(NAND.u-boot-env.backup1),8m(NAND.kernel),-(NAND.file-system)" # CONFIG_SPL_EFI_PARTITION is not set CONFIG_OF_CONTROL=y CONFIG_OF_LIST="am335x-evm am335x-bone am335x-sancloud-bbe am335x-sancloud-bbe-lite am335x-sancloud-bbe-extended-wifi am335x-boneblack am335x-evmsk am335x-bonegreen am335x-icev2 am335x-pocketbeagle"
configs/am335x_hs_evm_defconfig +1 -1
@@ -36,7 +36,7 @@ CONFIG_CMD_NAND=y CONFIG_BOOTP_DNS2=y CONFIG_CMD_MTDPARTS=y CONFIG_MTDIDS_DEFAULT="nand0=nand.0" -CONFIG_MTDPARTS_DEFAULT="mtdparts=nand.0:128k(NAND.SPL),128k(NAND.SPL.backup1),128k(NAND.SPL.backup2),128k(NAND.SPL.backup3),256k(NAND.u-boot-spl-os),1m(NAND.u-boot),128k(NAND.u-boot-env),128k(NAND.u-boot-env.backup1),8m(NAND.kernel),-(NAND.file-system)" +CONFIG_MTDPARTS_DEFAULT="mtdparts=nand.0:128k(NAND.SPL),128k(NAND.SPL.backup1),128k(NAND.SPL.backup2),128k(NAND.SPL.backup3),256k(NAND.u-boot-spl-os),2m(NAND.u-boot),128k(NAND.u-boot-env),128k(NAND.u-boot-env.backup1),8m(NAND.kernel),-(NAND.file-system)" # CONFIG_SPL_EFI_PARTITION is not set CONFIG_OF_CONTROL=y CONFIG_OF_LIST="am335x-evm am335x-bone am335x-boneblack am335x-evmsk am335x-bonegreen am335x-icev2 am335x-pocketbeagle"
configs/am335x_hs_evm_uart_defconfig +1 -1
@@ -38,7 +38,7 @@ CONFIG_CMD_NAND=y CONFIG_BOOTP_DNS2=y CONFIG_CMD_MTDPARTS=y CONFIG_MTDIDS_DEFAULT="nand0=nand.0" -CONFIG_MTDPARTS_DEFAULT="mtdparts=nand.0:128k(NAND.SPL),128k(NAND.SPL.backup1),128k(NAND.SPL.backup2),128k(NAND.SPL.backup3),256k(NAND.u-boot-spl-os),1m(NAND.u-boot),128k(NAND.u-boot-env),128k(NAND.u-boot-env.backup1),8m(NAND.kernel),-(NAND.file-system)" +CONFIG_MTDPARTS_DEFAULT="mtdparts=nand.0:128k(NAND.SPL),128k(NAND.SPL.backup1),128k(NAND.SPL.backup2),128k(NAND.SPL.backup3),256k(NAND.u-boot-spl-os),2m(NAND.u-boot),128k(NAND.u-boot-env),128k(NAND.u-boot-env.backup1),8m(NAND.kernel),-(NAND.file-system)" # CONFIG_SPL_EFI_PARTITION is not set CONFIG_OF_CONTROL=y CONFIG_OF_LIST="am335x-evm am335x-bone am335x-boneblack am335x-evmsk am335x-bonegreen am335x-icev2 am335x-pocketbeagle"
Signature · 1 line
2.47.1
Quoted 13 lines · Judith Mendez
From: Hong Guan <[email protected]>
Fix u-boot NAND partition in
MTDPARTS_DEFAULTsince the size of u-boot image has grown beyond 1MB and no longer fits in 1MB NAND partition, thus we are failing to flash and boot via GPMC NAND.Increase the size of NAND.u-boot to 2MB since the size of u-boot.img is currently 1.4M.
Signed-off-by Hong Guan <[email protected]>[Judith: extend fix to HS defconfigs and add commit msg]Signed-off-by Judith Mendez <[email protected]>
Quoted 8 lines
---
This patch is marked RFC to understand if solution is acceptable since changing partition sizes will not be backwards compatible solution.One other solution was too try to reduce the size of u-boot proper, but removing features (boot modes.. etc) did not seem to get the size of u-boot proper to 1MB with a usable u-boot proper.
So the big problem here is that we have more space being taken up by device trees than U-Boot itself. A quick mkimage -l and adding things up shows that we have 851936 bytes of device trees. You should look at switching to MULTI_DTB_FIT and enabling some compression, along with possibly LTO of U-Boot itself.
Signature · 1 line
Tom
Hi Tom,
Quoted 24 lines · Tom Rini
Quoted 13 lines · Judith Mendez
From: Hong Guan <[email protected]>
Fix u-boot NAND partition in
MTDPARTS_DEFAULTsince the size of u-boot image has grown beyond 1MB and no longer fits in 1MB NAND partition, thus we are failing to flash and boot via GPMC NAND.Increase the size of NAND.u-boot to 2MB since the size of u-boot.img is currently 1.4M.
Signed-off-by Hong Guan <[email protected]>[Judith: extend fix to HS defconfigs and add commit msg]Signed-off-by Judith Mendez <[email protected]>Quoted 8 lines
---
This patch is marked RFC to understand if solution is acceptable since changing partition sizes will not be backwards compatible solution.One other solution was too try to reduce the size of u-boot proper, but removing features (boot modes.. etc) did not seem to get the size of u-boot proper to 1MB with a usable u-boot proper.
Quoted 6 lines
So the big problem here is that we have more space being taken up by device trees than U-Boot itself. A quick mkimage -l and adding things up shows that we have 851936 bytes of device trees. You should look at switching to
MULTI_DTB_FITand enabling some compression, along with possibly LTO of U-Boot itself.
Thanks so much for your feedback, I will look some more into this.
~ Judith