[U-Boot] Sunxi H5 and CONFIG_ENV_IS_IN_MMC problem

Greetings
Our board has an AllWinner H5 with SPI flash and eMMC. Since SPI flash support for 'saveenv' is not currently mainline, I thought I'd simply use one of the eMMC boot blocks to persist the environment. However I keep running into image size problems [1]
Not being a U-Boot ninja, the defconfig [2] is about as minimal as I believe I can make it. (Network support is required for TFTP/NFS operations) Does the panel have any suggestions for getting the desired configuration built?
MTIA.
Jerry. --------------------------------snip---------------------------------------- -- [1] MKSUNXI spl/sunxi-spl.bin MKIMAGE u-boot.img MKIMAGE u-boot-dtb.img /home/moi/src/u-boot/denx/"board/sunxi/mksunxi_fit_atf.sh" \ arch/arm/dts/anemos-sc5.dtb > u-boot.its MKIMAGE u-boot.itb u-boot.itb exceeds file size limit: limit: 516096 bytes actual: 519448 bytes excess: 3352 bytes /home/moi/src/u-boot/denx/Makefile:1204: recipe for target 'u-boot.itb' failed
----------------------------snip------------------------------------------ [2] CONFIG_ARM=y CONFIG_ARCH_SUNXI=y CONFIG_SPL=y CONFIG_MACH_SUN50I_H5=y CONFIG_DRAM_CLK=504 CONFIG_DRAM_ZQ=3881977 CONFIG_DRAM_ODT_EN=y CONFIG_MACPWR="PD6" CONFIG_MMC_SUNXI_SLOT_EXTRA=2 CONFIG_SPL_SPI_SUNXI=y CONFIG_SPL_SPI_FLASH_SUPPORT=y CONFIG_SPL_SPI_FLASH_TINY=y CONFIG_DEFAULT_DEVICE_TREE="anemos-sc5" CONFIG_ENV_IS_IN_MMC=y CONFIG_NET_RANDOM_ETHADDR=y CONFIG_MTD=y CONFIG_MTD_DEVICE=y CONFIG_SUN8I_EMAC=y CONFIG_USB_EHCI_HCD=y CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y

On 16/03/2019 14:07, g4@novadsp.com wrote:
Greetings
Our board has an AllWinner H5 with SPI flash and eMMC. Since SPI flash support for 'saveenv' is not currently mainline, I thought I'd simply use one of the eMMC boot blocks to persist the environment. However I keep running into image size problems [1]
Not being a U-Boot ninja, the defconfig [2] is about as minimal as I believe I can make it. (Network support is required for TFTP/NFS operations) Does the panel have any suggestions for getting the desired configuration built?
MTIA.
Jerry.
Hey Jerry,
Take a look at the final defconfig once you've run 'make yourboard_defconfig' in order to see if there is anything specific you disable. Your current defconfig is very minimal but a lot of things will be turned on by default and you should look at specifically switching them off in order to reduce the size.
Cheers, Jack.
--------------------------------snip----------------------------------------
[1] MKSUNXI spl/sunxi-spl.bin MKIMAGE u-boot.img MKIMAGE u-boot-dtb.img /home/moi/src/u-boot/denx/"board/sunxi/mksunxi_fit_atf.sh" \ arch/arm/dts/anemos-sc5.dtb > u-boot.its MKIMAGE u-boot.itb u-boot.itb exceeds file size limit: limit: 516096 bytes actual: 519448 bytes excess: 3352 bytes /home/moi/src/u-boot/denx/Makefile:1204: recipe for target 'u-boot.itb' failed
----------------------------snip------------------------------------------ [2] CONFIG_ARM=y CONFIG_ARCH_SUNXI=y CONFIG_SPL=y CONFIG_MACH_SUN50I_H5=y CONFIG_DRAM_CLK=504 CONFIG_DRAM_ZQ=3881977 CONFIG_DRAM_ODT_EN=y CONFIG_MACPWR="PD6" CONFIG_MMC_SUNXI_SLOT_EXTRA=2 CONFIG_SPL_SPI_SUNXI=y CONFIG_SPL_SPI_FLASH_SUPPORT=y CONFIG_SPL_SPI_FLASH_TINY=y CONFIG_DEFAULT_DEVICE_TREE="anemos-sc5" CONFIG_ENV_IS_IN_MMC=y CONFIG_NET_RANDOM_ETHADDR=y CONFIG_MTD=y CONFIG_MTD_DEVICE=y CONFIG_SUN8I_EMAC=y CONFIG_USB_EHCI_HCD=y CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot

MTIA.
Jerry.
Hey Jerry,
Take a look at the final defconfig once you've run 'make yourboard_defconfig' in order to see if there is anything specific you disable. Your current defconfig is very minimal but a lot of things will be turned on by default and you should look at specifically switching them off in order to reduce the size.
Cheers, Jack.
Hi Jack and thanks.
Sacrificed regex and compression support to get it down to fighting weight.
BR
Jerry.
participants (2)
-
g4@novadsp.com
-
Jack Mitchell