[PATCH v2 0/4] support for booting the compressed U-boot binary on Rockchip based ARM64 SOC's

Manoj Sai abbaraju.manojsai at amarulasolutions.com
Tue Jul 25 05:50:57 CEST 2023


This patchset adds the support on Rockchip based ARM64 SOC's that  compress the U-BOOT proper along with dtb 
and ATF in FIT image format.Second stage bootloader(SPL) loads the compressed binaries, uncompress 
them and  handover control to the next stage.

Changes for V2 :-

- Removed the need to create gzip and lzma compressed U-boot-nodtb files using Makefile  and added a changeset 
that "compress" field to u-boot-nodtb node and "compression" field to  u-boot Node in the FIT image, with the help 
of this change binman will create the compressed Binaries.
  
Size Comparision between compressed and uncompressed binaries :-
  
  	size of uncompressed binary :- 9.4 MB (94,26,432 bytes)
         manoj:u-boot$ ls -lb u-boot-rockchip.bin 
        -rw-rw-r-- 1 manoj manoj 9426432 Jul 25 07:42 u-boot-rockchip.bin

       size of GZIP compressed binary :- 9.0 MB (89,85,088 bytes)
         manoj:u-boot$ ls -lb u-boot-rockchip.bin 
         -rw-rw-r-- 1 manoj manoj 8985088 Jul 25 07:42 u-boot-rockchip.bin

       size of LZMA compressed binary :- 9.0 MB (90,06,080 bytes)
         manoj:u-boot$ ls -lb u-boot-rockchip.bin 
         -rw-rw-r-- 1 manoj manoj 9006080 Jul 25 07:47 u-boot-rockchip.bin 

- modified to use the CONFIG_SYS_LOAD_ADDR as the source RAM address to store the  compressed U-Boot binary which 
will be defined in the machine defconfig file in place of creating a new RAM address for a specific board using Kconfig.
so patchset related to adding a new RAM address to store compressed binary has been removed in V2 patchset. 

- Removed the patchset related to adding  the u-boot-nodtb.bin.gz and u-boot-nodtb.bin.lzma as input binary to binman.


-- Test results of  Booting time using bootstage command in Uboot command prompt on roc-rk3399-pc board :-

1) Uncompressed U-BOOT : Total boot time ≈ 12.3 seconds 
=> bootstage  report
Timer summary in microseconds (10 records):
       Mark    Elapsed  Stage
          0          0  reset
  1,824,330  1,824,330  board_init_f
  2,921,678  1,097,348  board_init_r
  5,179,369  2,257,691  eth_common_init
  5,478,307    298,938  eth_initialize
  5,478,484        177  main_loop
  5,478,641        157  usb_start
 12,017,936  6,539,295  cli_loop

Accumulated time:
                15,899  dm_r
               694,371  dm_f

2) GZIP Compressed U-BOOT : Total boot time ≈ 13.5 seconds 
=>  bootstage  report
Timer summary in microseconds (10 records):
       Mark    Elapsed  Stage
          0          0  reset
  2,591,355  2,591,355  board_init_f
  3,689,407  1,098,052  board_init_r
  5,947,314  2,257,907  eth_common_init
  6,246,250    298,936  eth_initialize
  6,246,427        177  main_loop
  6,246,585        158  usb_start
 12,785,936  6,539,351  cli_loop

Accumulated time:
                15,902  dm_r
               694,779  dm_f

2) LZMA Compressed U-BOOT : Total boot time ≈ 23.5 seconds
=> bootstage report
Timer summary in microseconds (10 records):
       Mark    Elapsed  Stage
          0          0  reset
  6,376,405  6,376,405  board_init_f
  7,471,967  1,095,562  board_init_r
  9,726,257  2,254,290  eth_common_init
 10,024,873    298,616  eth_initialize
 10,025,049        176  main_loop
 10,025,208        159  usb_start
 16,564,906  6,539,698  cli_loop
 
Accumulated time:
                15,851  dm_r
               693,323  dm_f


Patch 1/4  generate a GZIP-compressed U-boot binary using binman if CONFIG_SPL_GZIP selected
Patch 2/4  generate a LZMA-compressed U-boot binary using binman if CONFIG_SPL_LZMA selected 
Patch 3/4  uncompress the gzip U-BOOT binary and load the binaries if gzip compression supoort is enabled
Patch 4/4  uncompress the lzma U-BOOT binary and load the binaries if lzma compression supoort is enabled

Manoj Sai (4):
  rockchip: Add support to generate GZIP compressed U-boot binary
  rockchip: Add support to generate LZMA compressed U-boot binary
  spl: fit: support for booting a GZIP-compressed U-boot binary
  spl: fit: support for booting a LZMA-compressed U-boot binary

 arch/arm/dts/rockchip-u-boot.dtsi | 11 +++++++++++
 common/spl/spl_fit.c              | 21 +++++++++++++++++----
 include/spl.h                     | 10 ++++++++++
 3 files changed, 38 insertions(+), 4 deletions(-)

-- 
2.25.1



More information about the U-Boot mailing list