Re: [U-Boot] [PATCH 2/7] fdt: Build a U-Boot binary without device tree
Hi Stephen, On 25 January 2016 at 17:42, Stephen Warren wrote: > On 01/25/2016 02:14 PM, Stephen Warren wrote: >> >> On 01/25/2016 01:30 PM, Simon Glass wrote: >>> >>> 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, 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. >> >> >> That's probably going to annoy somebody. Have you put thought into how >> such a build system could auto-detect which file it should use in order >> to automatically adjust to the different file naming conventions of >> different U-Boot versions or branches? If not, this change will burden >> the operator of any tool or automated system with manually handling the >> difference by branching their own code or processes:-( >> >>> Adjust tegra rules so it continues to produce the correct files. >> >> >> I don't see anything Tegra-related in this patch. Perhaps patch 1/7 was >> included here in a previous version and the commit description not >> updated? >> >> Anyway, I think this patch doesn't affect me or Tegra's flashing tools. >> For reference, the tool currently uses the following files: >> >> u-boot >> spl/u-boot-spl >> u-boot-nodtb-tegra.bin >> u-boot.dtb >> u-boot-dtb-tegra.bin > > > Oh, that list is for ARMv7 targets. For ARMv8 targets, we currently use the > following instead: > > u-boot* > u-boot.bin > u-boot.dtb > u-boot-dtb.bin > > Preferably those files won't change either, or if they do, there's a trivial > way of determining which set of files is present (e.g. perhaps we pick up > u-boot-nodtb.bin and u-boot-dtb.bin if those two files exist, else we pick > up u-boot.bin and u-boot-dtb.bin?) The only addition will be u-boot-nodtb.bin. I'm not sure what you should pick up - perhaps everything? Regards, Simon ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 2/7] fdt: Build a U-Boot binary without device tree
On 01/25/2016 02:14 PM, Stephen Warren wrote: On 01/25/2016 01:30 PM, Simon Glass wrote: 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, 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. That's probably going to annoy somebody. Have you put thought into how such a build system could auto-detect which file it should use in order to automatically adjust to the different file naming conventions of different U-Boot versions or branches? If not, this change will burden the operator of any tool or automated system with manually handling the difference by branching their own code or processes:-( Adjust tegra rules so it continues to produce the correct files. I don't see anything Tegra-related in this patch. Perhaps patch 1/7 was included here in a previous version and the commit description not updated? Anyway, I think this patch doesn't affect me or Tegra's flashing tools. For reference, the tool currently uses the following files: u-boot spl/u-boot-spl u-boot-nodtb-tegra.bin u-boot.dtb u-boot-dtb-tegra.bin Oh, that list is for ARMv7 targets. For ARMv8 targets, we currently use the following instead: u-boot* u-boot.bin u-boot.dtb u-boot-dtb.bin Preferably those files won't change either, or if they do, there's a trivial way of determining which set of files is present (e.g. perhaps we pick up u-boot-nodtb.bin and u-boot-dtb.bin if those two files exist, else we pick up u-boot.bin and u-boot-dtb.bin?) ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 2/7] fdt: Build a U-Boot binary without device tree
Hi Stephen, On 25 January 2016 at 14:14, Stephen Warren wrote: > On 01/25/2016 01:30 PM, Simon Glass wrote: >> >> 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, 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. > > > That's probably going to annoy somebody. Have you put thought into how such > a build system could auto-detect which file it should use in order to > automatically adjust to the different file naming conventions of different > U-Boot versions or branches? If not, this change will burden the operator of > any tool or automated system with manually handling the difference by > branching their own code or processes:-( Well we cannot know what downstream build systems do, but I think my reasoning is about right. > >> Adjust tegra rules so it continues to produce the correct files. > > > I don't see anything Tegra-related in this patch. Perhaps patch 1/7 was > included here in a previous version and the commit description not updated? Yes, somehow I managed to send out the wrong branch. A few commit messages are out of date but the code is the same. I'll fix it with v2 once I get some comments. > Anyway, I think this patch doesn't affect me or Tegra's flashing tools. For > reference, the tool currently uses the following files: > > u-boot > spl/u-boot-spl > u-boot-nodtb-tegra.bin > u-boot.dtb > u-boot-dtb-tegra.bin > Regards, Simon ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 2/7] fdt: Build a U-Boot binary without device tree
On 01/25/2016 01:30 PM, Simon Glass wrote: 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, 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. That's probably going to annoy somebody. Have you put thought into how such a build system could auto-detect which file it should use in order to automatically adjust to the different file naming conventions of different U-Boot versions or branches? If not, this change will burden the operator of any tool or automated system with manually handling the difference by branching their own code or processes:-( Adjust tegra rules so it continues to produce the correct files. I don't see anything Tegra-related in this patch. Perhaps patch 1/7 was included here in a previous version and the commit description not updated? Anyway, I think this patch doesn't affect me or Tegra's flashing tools. For reference, the tool currently uses the following files: u-boot spl/u-boot-spl u-boot-nodtb-tegra.bin u-boot.dtb u-boot-dtb-tegra.bin ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 2/7] fdt: Build a U-Boot binary without device tree
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, 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 --- Makefile | 22 +++--- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index e2b6674..4fa1b9a 100644 --- a/Makefile +++ b/Makefile @@ -827,9 +827,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) +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 + %.imx: %.bin $(Q)$(MAKE) $(build)=arch/arm/imx-common $@ @@ -846,11 +854,11 @@ OBJCOPYFLAGS_u-boot.srec := -O srec u-boot.hex u-boot.srec: u-boot FORCE $(call if_changed,objcopy) -OBJCOPYFLAGS_u-boot.bin := -O binary \ +OBJCOPYFLAGS_u-boot-nodtb.bin := -O binary \ $(if $(CONFIG_X86_RESET_VECTOR),-R .start16 -R .resetvec) -binary_size_check: u-boot.bin FORCE - @file_size=$(shell wc -c u-boot.bin | awk '{print $$1}') ; \ +binary_size_check: u-boot-nodtb.bin FORCE + @file_size=$(shell wc -c u-boot-nodtb.bin | awk '{print $$1}') ; \ map_size=$(shell cat u-boot.map | \ awk '/_image_copy_start/ {start = $$1} /_image_binary_end/ {end = $$1} END {if (start != "" && end != "") print "ibase=16; " toupper(end) " - " toupper(start)}' \ | sed 's/0X//g' \ @@ -858,12 +866,12 @@ binary_size_check: u-boot.bin FORCE if [ "" != "$$map_size" ]; then \ if test $$map_size -ne $$file_size; then \ echo "u-boot.map shows a binary size of $$map_size" >&2 ; \ - echo " but u-boot.bin shows $$file_size" >&2 ; \ + echo " but u-boot-nodtb.bin shows $$file_size" >&2 ; \ exit 1; \ fi \ fi -u-boot.bin: u-boot FORCE +u-boot-nodtb.bin: u-boot FORCE $(call if_changed,objcopy) $(call DO_STATIC_RELA,$<,$@,$(CONFIG_SYS_TEXT_BASE)) $(BOARD_SIZE_CHECK) @@ -1022,7 +1030,7 @@ rom: u-boot.rom FORCE IFDTOOL=$(objtree)/tools/ifdtool IFDTOOL_FLAGS = -f 0:$(objtree)/u-boot.dtb IFDTOOL_FLAGS += -m 0x$(shell $(NM) u-boot |grep _dt_ucode_base_size |cut -d' ' -f1) -IFDTOOL_FLAGS += -U $(CONFIG_SYS_TEXT_BASE):$(objtree)/u-boot.bin +IFDTOOL_FLAGS += -U $(CONFIG_SYS_TEXT_BASE):$(objtree)/u-boot-nodtb.bin IFDTOOL_FLAGS += -w $(CONFIG_SYS_X86_START16):$(objtree)/u-boot-x86-16bit.bin IFDTOOL_FLAGS += -C -- 2.7.0.rc3.207.g0ac5344 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot