[U-Boot] [PATCH v6 00/10] spl: dm: Make it possible for the SPL to pick its own DTB from a FIT
Jean-Jacques Hiblot
jjhiblot at ti.com
Fri Sep 15 10:57:23 UTC 2017
Following the RFC, here is the series implementing the mechanism in a cleaner
way. The idea is that the SPL may take advantage of selecting its DTB from a
pool of available DTBs. To do that several DTBs are embedded in a compressed
FIT image appended at the end of the SPL. The patch is done in such way that
this mechanism can easily be extended to other ways of loading the DTBs.
Here are some numbers:
+----------+------------+-----------+------------+
| size | size delta | SPL boot | boot time |
| (bytes) | (bytes) | time (s) | delta (s) |
+---------------------------+----------+------------+-----------+------------+
| 1 DTB | | | | |
+---------------------------+----------+------------+-----------+------------+
| reference | 125305 | 0 | 1.389 | 0 |
| LZO (dynamic allocation) | 125391 | 86 | 1.381 | -0.008 |
+---------------------------+----------+------------+-----------+------------+
| 4 DTBs (DRA7, DRA71, | | | | |
| DRA72, DRA72 revC) | | | | |
+---------------------------+----------+------------+-----------+------------+
| LZO (dynamic allocation) | 125991 | 686 | 1.39 | 0.001 |
| LZO (user defined area) | 125927 | 622 | 1.403 | 0.014 |
| GZIP (user defined area) | 133880 | 8575 | 1.421 | 0.032 |
| No compression (in place) | 137472 | 12167 | 1.412 | 0.023 |
+---------------------------+----------+------------+-----------+------------+
changes since v5:
- rebased on top of latest u-boot/master: updated patch #7 as support for
SPL_GZIP has been recently added to u-boot/master.
- Fixed the wrong ordering of includes in lib/fdtdec.c
- changed Kconfig messages to start with an an upper-case
changes since v4:
- Updated the documentation. Hopefully it's more intelligible.
- renamed SPL_MULTI_DTB_FIT_GZ in SPL_MULTI_DTB_FIT_GZIP
- Added a patch to sort the included headers in lib/fdtdec.c
- reduced the level of #ifdeffing of the patch
changes since v3:
- Added reviewed-by tags
- Fixed nits and spelling mistakes reported by Simon G.
- updated the help in Kconfig to take in account commit f1896c ("spl: make SPL
and normal u-boot stage use independent SYS_MALLOC_F_LEN")
changes since v2:
- rebased on u-boot/master
- improved help in Kconfig for the compression options in SPL
- improved commit message for patch #1
- Added some comments to describe locate_dtb_in_fit() and fit_find_config_node()
- Added a description of the mecanism in a README
changes since v1:
- improved help in Kconfig for the SPL_MULTI_DTB_FIT option
- Added "reviewed-by" tags
changes since RFC:
- split the RFC patch in several patches.
- leverage work from Cooper Jr., Franklin (CONFIG_FIT_EMBED) as a big part
of the code is similar. Rename CONFIG_FIT_EMBED as CONFIG_MULTI_DTB_FIT
to prevent confusion with CONFIG_OF_EMBED.
- use the default configuration if no match is provided by
board_fit_config_name_match(). note that this is generic not just for this
feature.
- provide an option to not use dynamic memory allocation.
- added a patch related to board detection on omap that's required to take
advantage of this feature.
Jean-Jacques Hiblot (10):
dts: renamed FIT_EMBED to MULTI_DTB_FIT and moved it to the dts
Kconfig
fit: use 'const' for the input of fdt_offset() and locate_dtb_in_fit()
fit: fixed bug in locate_dtb_in_fit()
fit: If no matching config is found in fit_find_config_node(), use the
default one
lzo: add a function to check the validity of the header
gzip: add a function to parse the header
lib: allow building lzo for the SPL
fdtdec: sort include files
spl: dm: Make it possible for the SPL to pick its own DTB from a FIT
omap: detect board before spl_early_init()
Makefile | 2 +-
arch/arm/mach-omap2/hwinit-common.c | 4 +-
board/ti/ks2_evm/board_k2e.c | 2 +-
board/ti/ks2_evm/board_k2g.c | 2 +-
board/ti/ks2_evm/board_k2hk.c | 2 +-
board/ti/ks2_evm/board_k2l.c | 2 +-
common/Kconfig | 16 ------
common/Makefile | 2 +-
common/boot_fit.c | 6 +--
common/common_fit.c | 20 +++++++
configs/k2e_evm_defconfig | 2 +-
configs/k2g_evm_defconfig | 2 +-
configs/k2hk_evm_defconfig | 2 +-
configs/k2l_evm_defconfig | 2 +-
doc/README.multi-dtb-fit | 65 +++++++++++++++++++++++
dts/Kconfig | 103 +++++++++++++++++++++++++++++++++++-
include/boot_fit.h | 9 +++-
include/common.h | 1 +
include/image.h | 13 +++++
include/linux/lzo.h | 3 ++
lib/Kconfig | 5 ++
lib/Makefile | 3 +-
lib/fdtdec.c | 98 +++++++++++++++++++++++++++++-----
lib/gunzip.c | 15 ++++--
lib/lzo/lzo1x_decompress.c | 21 ++++++--
scripts/Makefile.spl | 35 +++++++++++-
26 files changed, 381 insertions(+), 56 deletions(-)
create mode 100644 doc/README.multi-dtb-fit
--
1.9.1
More information about the U-Boot
mailing list