Hi Grant, On Wed, 11 Aug 2021 at 07:47, Grant Likely <grant.lik...@secretlab.ca> wrote: > > On Wed, Aug 11, 2021 at 1:58 PM Simon Glass <s...@chromium.org> wrote: > > > > Hi Grant, > > > > On Wed, 11 Aug 2021 at 03:58, Grant Likely <grant.lik...@secretlab.ca> > > wrote: > > > > > > On Mon, Aug 9, 2021 at 8:11 PM Tom Rini <tr...@konsulko.com> wrote: > > > > > > > > On Sat, Aug 07, 2021 at 04:23:36PM -0600, Simon Glass wrote: > > > > > Comments welcome! > > > > > > > > I think what this is really showing is that Yamada-san was right. All > > > > the games we need to do so that "make fooboard_config all" results in > > > > building the N stages needed was the wrong track. Taking > > > > khadas-edge-v-rk3399 as an example, if we had instead of > > > > khadas-edge-v-rk3399_defconfig but khadas-edge-v-rk3399_tpl_defconfig > > > > khadas-edge-v-rk3399_spl_defconfig and khadas-edge-v-rk3399_config, each > > > > of which could set CONFIG_TPL, CONFIG_SPL or neither. Then yes, to > > > > build u-boot-rockchip.bin you would need to pass in the separately build > > > > TPL and SPL stages. But, that's true of so so many other platforms. To > > > > pick another example, imx8mm_evk doesn't function without other > > > > binaries. If in theory to build khadas-edge-v-rk3399 you had to do > > > > something like: > > > > $ export CROSS_COMPILE=aarch64-linux- > > > > $ make O=obj/tpl khadas-edge-v-rk3399_tpl_config all > > > > $ make O=obj/spl khadas-edge-v-rk3399_spl_config all > > > > $ make O=obj/khadas-edge-v-rk3399 TPL=obj/tpl/u-boot.bin \ > > > > SPL=obj/spl/u-boot.bin khadas-edge-v-rk3399_config all > > > > > > > > But it also meant that we didn't need to duplicate so so many Kconfig > > > > options and most of our obj rules would just be: > > > > obj-$(CONFIG_FOO) += foo.o > > > > > > > > would be a win. > > > > > > Oh! I quite like this. Simpler indeed. With all the different > > > components that need to be pulled in to build a bootable image, each > > > of the various U-Boot stages would just be another configuration that > > > needs to be built and included in the result. > > > > Have you looked at binman? It is designed to put images together, > > using the various U-Boot phases and anything else about. > > Yup, I looked quite closely at binman, and have been planning to use > it. This tool is more about building the required projects and less > about assembling the final image. I think the two are complementary.
Yes I see. I hope that we don't have to build the projects dependent on each other. At least for U-Boot, it should not depend on other projects for its config at build time. So for example the BL31 thing should be handled post-build (by binman). Regards, SImon