All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH v3 00/19] SPL: extend FIT loading support
@ 2017-03-31 22:31 Andre Przywara
  2017-03-31 22:31 ` [U-Boot] [PATCH v3 01/19] SPL: FIT: refactor FDT loading Andre Przywara
                   ` (19 more replies)
  0 siblings, 20 replies; 46+ messages in thread
From: Andre Przywara @ 2017-03-31 22:31 UTC (permalink / raw)
  To: u-boot

Some minor fixes version of the SPL FIT loading series and the respective
patches to enable this feature on 64-bit Allwinner SoCs.
There is a new patch (6/19) fixing the SPL_FIT dependencies, above all
selecting SPL_OF_LIBFDT when SPL_FIT is enabled. This reduces the number
of Kconfig symbols a board has to select for the SPL fit loading from
four down to two, which leads to changes in the final patches enabling
this feature. Compared to the previous version the SPL FIT loading
is now selected in the Kconfig for both 64-bit sunxi SoCs, so there is
less burden on each individual defconfig.
Also following Olliver's suggestion a symbol in mksunxiboot has been renamed.
---

The first five patches introduce the core of the extened SPL FIT loading
support, see below for a description. Patch 6 fixes a Kconfig dependency
to simplify the usage of this option.
Patches 7-10 make some room in the sunxi 64-bit SPL to allow
compiling in the FIT loading bits. Patch 11 and 12 let the SPL choose
the proper DT from the FIT image.
The next two patches add the infrastructure and an actual generator script,
so the FIT image is automatically created at build time.
Patches 14 and 15 enable the SPL FIT support for Allwinner 64-bit SoCs in
general and for the Pine64 and OrangePi PC 2 in particular.
The following two patches store a DT file name in the SPL header, so
U-Boot can easily pick the proper DT when scanning the FIT image.
The idea is that this DT name should stay with the board, ideally on
eMMC or SPI flash. So both U-Boot and a firmware update tool could
identify a board, updating with compatible firmware while keeping the
DT name in place. Ideally a board vendor would once seed this name
onto on-board storage like SPI flash.
I kept those two patches in, as the work on replacing mksunxiboot with
an mkimage extension is not ready yet. Feel free to drop those from
the series if this is a problem.
The final patch updates the Pine64 README file to document the current
way of building U-Boot, which now includes the ARM Trusted Firmware build
in its image.

I would be delighted if that series can make it into the next release,
as this finally enables the fully open source firmware for the 64-bit
Allwinner SoCs (including the ATF binary).

This series is based on sunxi/master, rebased upon origin/master.

Cheers,
Andre.

-------
Currently the FIT format is not used to its full potential in the SPL:
It only loads the first image from the /images node and appends the
proper FDT.
Some boards and platforms would benefit from loading more images before
starting U-Boot proper, notably Allwinner A64 and ARMv8 Rockchip boards,
which use an ARM Trusted Firmware (ATF) image to be executed before U-Boot.

This series tries to solve this in a board agnostic and generic way:
We extend the SPL FIT loading scheme to allow loading multiple images.
So apart from loading the image which is referenced by the "firmware"
property in the respective configuration node and placing the DTB right
behind it, we iterate over all strings in the "loadable" property.
Each image referenced there will be loaded to its specified load address.
The entry point U-Boot eventually branches to will be taken from the
first image to explicitly provide the "entry" property, or, if none
of them does so, from the load address of the "firmware" image.
This keeps the scheme compatible with the FIT images our Makefile creates
automatically at the moment.
Apart from the already mentioned ATF scenario this opens up more usage
scenarios, of which the commit message of patch 04/11 lists some.
The remaining patches prepare ane finally enable this scheme for the 64-bit
Allwinner boards.

Andre Przywara (18):
  SPL: FIT: refactor FDT loading
  SPL: FIT: rework U-Boot image loading
  SPL: FIT: improve error handling
  SPL: FIT: factor out spl_load_fit_image()
  SPL: FIT: allow loading multiple images
  Kconfig: fix SPL_FIT dependency
  tools: mksunxiboot: allow larger SPL binaries
  armv8: SPL: only compile GIC code if needed
  armv8: fsl: move ccn504 code into FSL Makefile
  sunxi: A64: move SPL stack to end of SRAM A2
  sunxi: SPL: store RAM size in gd
  sunxi: SPL: add FIT config selector for Pine64 boards
  Makefile: add rules to generate SPL FIT images
  sunxi: 64-bit SoCs: introduce FIT generator script
  sunxi: defconfig: add supported DT list for Pine64 and OrangePi PC 2
  sunxi: enable automatic FIT build for 64-bit SoCs
  sunxi: use SPL header DT name for FIT board matching
  sunxi: update Pine64 README

Siarhei Siamashka (1):
  sunxi: Store the device tree name in the SPL header

 Kconfig                               |  22 ++-
 Makefile                              |  20 +++
 arch/arm/include/asm/arch-sunxi/spl.h |  19 ++-
 arch/arm/lib/Makefile                 |   4 +-
 board/sunxi/Kconfig                   |   4 +
 board/sunxi/README.pine64             | 177 +++++++++++++-------
 board/sunxi/board.c                   |  36 +++-
 board/sunxi/mksunxi_fit_atf.sh        |  73 +++++++++
 common/spl/spl_fit.c                  | 298 ++++++++++++++++++++++------------
 configs/am335x_evm_defconfig          |   1 -
 configs/evb-rk3399_defconfig          |   1 -
 configs/orangepi_pc2_defconfig        |   1 +
 configs/pine64_plus_defconfig         |   1 +
 doc/uImage.FIT/howto.txt              |  21 +++
 include/configs/sunxi-common.h        |  17 +-
 scripts/Makefile.spl                  |   3 +-
 tools/mksunxiboot.c                   |  53 +++++-
 17 files changed, 562 insertions(+), 189 deletions(-)
 create mode 100755 board/sunxi/mksunxi_fit_atf.sh

-- 
2.8.2

^ permalink raw reply	[flat|nested] 46+ messages in thread

end of thread, other threads:[~2017-04-24 17:08 UTC | newest]

Thread overview: 46+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-31 22:31 [U-Boot] [PATCH v3 00/19] SPL: extend FIT loading support Andre Przywara
2017-03-31 22:31 ` [U-Boot] [PATCH v3 01/19] SPL: FIT: refactor FDT loading Andre Przywara
2017-04-05 10:29   ` Simon Glass
2017-04-24 17:08   ` Peter Robinson
2017-03-31 22:31 ` [U-Boot] [PATCH v3 02/19] SPL: FIT: rework U-Boot image loading Andre Przywara
2017-04-05 10:29   ` Simon Glass
2017-03-31 22:31 ` [U-Boot] [PATCH v3 03/19] SPL: FIT: improve error handling Andre Przywara
2017-04-05 10:29   ` Simon Glass
2017-03-31 22:31 ` [U-Boot] [PATCH v3 04/19] SPL: FIT: factor out spl_load_fit_image() Andre Przywara
2017-04-05 10:29   ` Simon Glass
2017-03-31 22:31 ` [U-Boot] [PATCH v3 05/19] SPL: FIT: allow loading multiple images Andre Przywara
2017-04-03  9:40   ` Lukasz Majewski
2017-04-03 10:05     ` Andre Przywara
2017-04-03 10:15       ` Dr. Philipp Tomsich
2017-04-03 10:50       ` Lukasz Majewski
2017-04-05 10:29   ` Simon Glass
2017-03-31 22:31 ` [U-Boot] [PATCH v3 06/19] Kconfig: fix SPL_FIT dependency Andre Przywara
2017-03-31 22:31 ` [U-Boot] [PATCH v3 07/19] tools: mksunxiboot: allow larger SPL binaries Andre Przywara
2017-03-31 22:31 ` [U-Boot] [PATCH v3 08/19] armv8: SPL: only compile GIC code if needed Andre Przywara
2017-03-31 22:31 ` [U-Boot] [PATCH v3 09/19] armv8: fsl: move ccn504 code into FSL Makefile Andre Przywara
2017-03-31 22:31 ` [U-Boot] [PATCH v3 10/19] sunxi: A64: move SPL stack to end of SRAM A2 Andre Przywara
2017-04-03  7:21   ` Maxime Ripard
2017-03-31 22:31 ` [U-Boot] [PATCH v3 11/19] sunxi: SPL: store RAM size in gd Andre Przywara
2017-04-03  7:22   ` Maxime Ripard
2017-03-31 22:31 ` [U-Boot] [PATCH v3 12/19] sunxi: SPL: add FIT config selector for Pine64 boards Andre Przywara
2017-04-03  7:22   ` Maxime Ripard
2017-03-31 22:31 ` [U-Boot] [PATCH v3 13/19] Makefile: add rules to generate SPL FIT images Andre Przywara
2017-03-31 22:31 ` [U-Boot] [PATCH v3 14/19] sunxi: 64-bit SoCs: introduce FIT generator script Andre Przywara
2017-04-03  7:23   ` Maxime Ripard
2017-03-31 22:31 ` [U-Boot] [PATCH v3 15/19] sunxi: defconfig: add supported DT list for Pine64 and OrangePi PC 2 Andre Przywara
2017-04-03  7:25   ` Maxime Ripard
2017-03-31 22:31 ` [U-Boot] [PATCH v3 16/19] sunxi: enable automatic FIT build for 64-bit SoCs Andre Przywara
2017-04-03  7:26   ` Maxime Ripard
2017-03-31 22:31 ` [U-Boot] [PATCH v3 17/19] sunxi: Store the device tree name in the SPL header Andre Przywara
2017-03-31 22:31 ` [U-Boot] [PATCH v3 18/19] sunxi: use SPL header DT name for FIT board matching Andre Przywara
2017-03-31 22:31 ` [U-Boot] [PATCH v3 19/19] sunxi: update Pine64 README Andre Przywara
2017-04-16  1:20   ` Andreas Färber
2017-04-18 20:38     ` André Przywara
2017-04-19 22:21       ` Andreas Färber
2017-04-19 22:24         ` Dr. Philipp Tomsich
2017-04-20  0:54         ` Tom Rini
2017-04-16 19:34   ` Simon Glass
2017-04-18 18:21   ` Andreas Färber
2017-03-31 22:43 ` [U-Boot] [PATCH v3 00/19] SPL: extend FIT loading support Simon Glass
2017-03-31 23:21   ` André Przywara
2017-04-05 10:29     ` Simon Glass

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.