[U-Boot] [PATCH v4 0/9] spl: dm: Make it possible for the SPL to pick its own DTB from a FIT
Jean-Jacques Hiblot
jjhiblot at ti.com
Mon Aug 7 10:07:45 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 |delta |boot-time| delta |
| (bytes) |(bytes) |(ms) | (ms) |
+---------------------------------------------------------------+
| reference | 120185 | | 1331 | |
+---------------------------------------------------------------+
| feature | | | | |
| deactiVated | 120185 | 0 | 1330 | -1 |
+---------------------------------------------------------------+
| 1 DTB LZO | 120208 | 23 | 1331 | 0 |
+---------------------------------------------------------------+
| 4 DTB LZO | 120810 | 625 | 1336 | 5 |
+---------------------------------------------------------------+
| 4 DTB LZO | | | | |
| no malloc | 120746 | 561 | 1343 | 12 |
+---------------------------------------------------------------+
| 4 DTB GZIP | 128552 | 8367 | 1353 | 22 |
+---------------------------------------------------------------+
| 4 DTB No comp | 132352 | 12167 | 1351 | 20 |
+----------------------+----------+----------+---------+--------+
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 (9):
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 and gunzip for the SPL
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 | 49 +++++++++++++++++
dts/Kconfig | 103 +++++++++++++++++++++++++++++++++++-
include/boot_fit.h | 9 +++-
include/common.h | 1 +
include/image.h | 13 +++++
include/linux/lzo.h | 3 ++
lib/Kconfig | 17 +++++-
lib/Makefile | 6 +--
lib/fdtdec.c | 85 +++++++++++++++++++++++++----
lib/gunzip.c | 15 ++++--
lib/lzo/lzo1x_decompress.c | 21 ++++++--
scripts/Makefile.spl | 35 +++++++++++-
26 files changed, 369 insertions(+), 54 deletions(-)
create mode 100644 doc/README.multi-dtb-fit
--
1.9.1
More information about the U-Boot
mailing list