Hi Simon, 2016-01-29 12:24 GMT+09:00 Simon Glass <s...@chromium.org>: > At present u-boot.bin holds the plain U-Boot binary without the device tree. > This is somewhat annoying since you need either u-boot.bin or u-boot-dtb.bin > depending on whether device tree is used. > > Adjust the build such that u-boot.bin includes a device tree (if enabled), > and the plain binary is in u-boot-nodtb.bin. For now u-boot-dtb.bin remains > the same. > > This should be acceptable since: > > - without OF_CONTROL, u-boot.bin still does not include a device tree > - with OF_CONTROL, u-boot-dtb.bin does not change > > The main impact is build systems which are set up to use u-boot.bin as > the output file and then add a device tree. These will have to change to use > u-boot-nodtb.bin instead. > > Adjust tegra rules so it continues to produce the correct files. > > Signed-off-by: Simon Glass <s...@chromium.org> > ---
With this patch, u-boot-dtb.bin will be an intermediate file. (u-boot.bin depends on u-boot-dtb.bin if CONFIG_OF_SEPARATE=y) You can change ALL-$(CONFIG_OF_SEPARATE) += u-boot.dtb u-boot-dtb.bin to ALL-$(CONFIG_OF_SEPARATE) += u-boot.dtb > Changes in v2: None > > Makefile | 24 ++++++++++++++++-------- > 1 file changed, 16 insertions(+), 8 deletions(-) > > diff --git a/Makefile b/Makefile > index 6b95e79..aebc43b 100644 > --- a/Makefile > +++ b/Makefile > @@ -822,9 +822,17 @@ PHONY += dtbs > dtbs dts/dt.dtb: checkdtc u-boot > $(Q)$(MAKE) $(build)=dts dtbs > > -u-boot-dtb.bin: u-boot.bin dts/dt.dtb FORCE > +ifeq ($(CONFIG_OF_CONTROL),y) I think this should be ifeq ($(CONFIG_OF_CONTROL_SEPARATE),y) Otherwise, this patch embeds the DTB into the U-Boot image and also adds it to the tail of the image. > +u-boot-dtb.bin: u-boot-nodtb.bin dts/dt.dtb FORCE > $(call if_changed,cat) > > +u-boot.bin: u-boot-dtb.bin FORCE > + $(call if_changed,cat) > +else > +u-boot.bin: u-boot-nodtb.bin FORCE > + $(call if_changed,cat) > +endif > Or, in stead, you can use $(call if_changed,copy) for clarification. (you need to move the "cmd_copy" define a bit above, though.) This might be a matter of preference, so I will leave this to you. -- Best Regards Masahiro Yamada _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot