Message ID | 20221101192029.10231-25-francis.laniel@amarulasolutions.com |
---|---|
State | RFC |
Delegated to: | Tom Rini |
Headers | show |
Series | Modernize U-Boot shell | expand |
On 11/1/22 20:20, Francis Laniel wrote: > This commit set CONFIG_HUSH_PARSER_2021 as the default to trigger the CI with > this parser. > > Nonetheless, Some boards are not compatible with new 2021 hush parser: > 1. rcar3_ulcb: > When built with CONFIG_HUSH_PARSER_2021, the u-boot.img file size > exceeds the 1MB file limit of 890 bytes: > aarch64: + rcar3_ulcb > +u-boot.img exceeds file size limit: > + limit: 0x100000 bytes > + actual: 0x10037a bytes > + excess: 0x37a bytes > Some complementary work is then needed to use CONFIG_HUSH_PARSER_2021 for this > board. Maybe this patch helps with ULCB ? https://patchwork.ozlabs.org/project/uboot/patch/20221222211315.142860-1-marek.vasut@gmail.com/
Le vendredi 23 décembre 2022, 05:15:50 CET Marek Vasut a écrit : > On 11/1/22 20:20, Francis Laniel wrote: > > This commit set CONFIG_HUSH_PARSER_2021 as the default to trigger the CI > > with this parser. > > > > Nonetheless, Some boards are not compatible with new 2021 hush parser: > > > > 1. rcar3_ulcb: > > When built with CONFIG_HUSH_PARSER_2021, the u-boot.img file size > > exceeds the 1MB file limit of 890 bytes: > > aarch64: + rcar3_ulcb > > +u-boot.img exceeds file size limit: > > + limit: 0x100000 bytes > > + actual: 0x10037a bytes > > + excess: 0x37a bytes > > Some complementary work is then needed to use CONFIG_HUSH_PARSER_2021 for > > this board. > > Maybe this patch helps with ULCB ? > > https://patchwork.ozlabs.org/project/uboot/patch/20221222211315.142860-1-mar > ek.vasut@gmail.com/ Yes! Perfect! Thank you a lot for the recommendation! With this, I was able to compile the img and its size is smaller than 1MB: $ make rcar3_ulcb_defconfig ... $ make menuconfig # To activate CONFIG_LTO $ CROSS_COMPILE=aarch64-linux-gnu- make -j$(nproc) ... $ du -sh u-boot.img 996K u-boot.img I will add your patch to future version of this series and I will rebase when your patch would have been merged.
diff --git a/cmd/Kconfig b/cmd/Kconfig index c15d7c51f7..1e5c7d08de 100644 --- a/cmd/Kconfig +++ b/cmd/Kconfig @@ -28,7 +28,7 @@ menu "Hush flavor to use" config HUSH_OLD_PARSER bool "Use hush old parser" - default y + default y if VENDOR_KM help This option enables the old flavor of hush based on hush Busybox from 2005. @@ -37,6 +37,7 @@ menu "Hush flavor to use" config HUSH_2021_PARSER bool "Use hush 2021 parser" + default y if !VENDOR_KM help This option enables the new flavor of hush based on hush Busybox from 2021. diff --git a/configs/rcar3_ulcb_defconfig b/configs/rcar3_ulcb_defconfig index f462bab5a8..ab4d83e3a9 100644 --- a/configs/rcar3_ulcb_defconfig +++ b/configs/rcar3_ulcb_defconfig @@ -113,3 +113,5 @@ CONFIG_USB_EHCI_HCD=y CONFIG_USB_EHCI_GENERIC=y CONFIG_USB_STORAGE=y CONFIG_OF_LIBFDT_OVERLAY=y +CONFIG_HUSH_OLD_PARSER=y +CONFIG_HUSH_2021_PARSER=n
This commit set CONFIG_HUSH_PARSER_2021 as the default to trigger the CI with this parser. Nonetheless, Some boards are not compatible with new 2021 hush parser: 1. rcar3_ulcb: When built with CONFIG_HUSH_PARSER_2021, the u-boot.img file size exceeds the 1MB file limit of 890 bytes: aarch64: + rcar3_ulcb +u-boot.img exceeds file size limit: + limit: 0x100000 bytes + actual: 0x10037a bytes + excess: 0x37a bytes Some complementary work is then needed to use CONFIG_HUSH_PARSER_2021 for this board. As CONFIG_BOOTCOMMAND is quite simple for this board, I think we can gain some bytes by deactivating hush features like if and loop. 2. the keymile (i.e. VENDOR_KM) family: This boards used set_local_var() to store some variables as local shell. They then used get_local_var() to retrieve the variables values. Sadly, this two functions do not exist with CONFIG_HUSH_PARSER_2021. A patch was proposed to use environment variables rather than local variables but it does not tackle the problem, so complementary work is needed to make this boards use CONFIG_HUSH_PARSER_2021 [1]. Signed-off-by: Francis Laniel <francis.laniel@amarulasolutions.com> [1] https://marc.info/?l=u-boot&m=165541917618725&w=2 --- cmd/Kconfig | 3 ++- configs/rcar3_ulcb_defconfig | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-)