From: Jean-Jacques Hiblot Date: Wed, 17 Apr 2019 11:48:27 +0200 Subject: [U-Boot] [RFC PATCH v2 00/12] Add support for applications of overlays in SPL In-Reply-To: References: <20190327153901.16069-1-jjhiblot@ti.com> Message-ID: <6c5cb39b-bc97-465b-90b5-565e211da9fd@ti.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Tom, Simon, On 28/03/2019 15:03, Michal Simek wrote: > On 27. 03. 19 16:38, Jean-Jacques Hiblot wrote: >> The purpose of this series is to provide the SPL with ability to apply >> overlays for u-boot. this is only a RFC so far, to get a feedback on the >> approach. >> >> Our use-case is the support of the daughter boards of the AM65x EVM. In >> Linux, each board is supported by a unique overlay. The presence of the >> boards is detected at runtime, and some useful features (like USB) are >> implemented on those daughter boards. Instead of providing multiple dtbs >> and fall in a combinatorial pit, we propose to use DT overlays. >> >> Patch #1 "spl: fit: Add support for applying DT overlay" has been posted >> a few weeks ago by Michal Simek. >> Patch #2 and #3 amend Michal's patch. >> Patch #4 and #5 are simple fixes for the Makefile >> Patch #6 is not required but relates to this series and will be required >> later by the AM6x platform >> Patch #7 may be a bit controversial. It basically replaces u-boot.img with >> a symlink to u-boot.itb in case we use a "complex" FIT (ie: if >> SPL_FIT_SOURCE or SPL_FIT_GENERATOR are set). This breaks buildman for >> several platforms because not all the binaries embedded in the FIT are >> available. >> Patch #9 adds a way to dynamically select the DT overlays. That is were we >> would use HW detection to select the required overlays. In that case, the >> board-level code tells what overlay it needs (it gives the name of the >> node). >> Patch #10 disables advanced SPL FIT features to keep the size of the SPL of >> the am335x_evm in check >> Patch #11 is not required, but demonstrates on a DRA76-evm how this series >> can be used. >> >> On arm, if overlay are supported, this series increases the size of the SPL >> by 3-4 kB. >> >> Changes in v2: >> - reworked board_fit_get_additionnal_images() and how it used in spl_fit.c >> - removed dtbo generation from dtso files and use .dts extension for the >> overlays >> - add dynamic allocation usage in a separate patch >> - defconfig change for the am335x_evm I don't know if you had time to look at this series. Its purpose is to allow the SPL to apply DT overlays to the FDT loaded for u-boot based on a runtime detection of the HW. We are going to need this kind of feature in our tree, I would really appreciate your feedback. I don't want to go in the wrong direction. JJ > This series looks better. > Is this able to also handle different images then just dtbs? > Thanks, > Michal >