fdt: Replace u-boot-dtb.bin with u-boot.bin
cover fdt: Replace u-boot-dtb.bin with u-boot.bin
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.
This series adjusts 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.
The original decision to use a separate u-boot-dtb.bin was aimed at allowing any device tree file to be concatenated to the u-boot.bin image after the build. However this no-longer seems so important. More important is the convenience of using the same output file regardless of the setting for OF_CONTROL.
Simon Glass (7):
tegra: Drop generation of -nodtb file with OF_CONTROL
fdt: Build a U-Boot binary without device tree
fdt: Build an SPL binary without device tree
tegra: Always build a boot image with the same filename
socfpga: Simplify Makefile filenames
Makefile: Make u-boot.img the same as u-boot-dtb.img
Makefile: Drop unnecessary -dtb suffixes
Makefile | 67 ++++++++++++++++++++++++++-------------------------- scripts/Makefile.spl | 26 +++++++++++++------- 2 files changed, 50 insertions(+), 43 deletions(-)
Signature · 1 line
2.7.0.rc3.207.g0ac5344
PATCH 1/7 tegra: Drop generation of -nodtb file with OF_CONTROL
It seems clear that the intent is to generate u-boot-nodtb-tegra.bin only when OF_CONTROL is not set. But due to the way the rules are set up, this file is always generated. Fix this.
---
Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
Makefile +3 -2
@@ -1077,8 +1077,9 @@ u-boot-nodtb-tegra.bin: spl/u-boot-spl u-boot.bin FORCE $(call if_changed,pad_cat) ifeq ($(CONFIG_OF_SEPARATE),y) -u-boot-dtb-tegra.bin: u-boot-nodtb-tegra.bin dts/dt.dtb FORCE - $(call if_changed,cat) +OBJCOPYFLAGS_u-boot-dtb-tegra.bin = -O binary --pad-to=$(CONFIG_SYS_TEXT_BASE) +u-boot-dtb-tegra.bin: spl/u-boot-spl u-boot-dtb.bin FORCE + $(call if_changed,pad_cat) endif endif
Signature · 1 line
2.7.0.rc3.207.g0ac5344
Stephen Warren
NAKPATCH 1/7 tegra: Drop generation of -nodtb file with OF_CONTROL
Quoted 3 lines · Simon Glass
It seems clear that the intent is to generate u-boot-nodtb-tegra.bin only when
OF_CONTROLis not set. But due to the way the rules are set up, this file is always generated. Fix this.
Nak, this file is used by our flashing tools, so needs to be kept around.
(As background, we take the separate u-boot-nodtb-tegra.bin and u-boot.dtb, modify u-boot.dtb to inject some changes to the environment such as over-writing bootcmd with flashing instructions etc., and then blend the two back together for download into RAM and subsequent execution).
PATCH 1/7 tegra: Drop generation of -nodtb file with OF_CONTROL
Hi Stephen,
Quoted 11 lines · Stephen Warren
Quoted 4 lines · Simon Glass
It seems clear that the intent is to generate u-boot-nodtb-tegra.bin only when
OF_CONTROLis not set. But due to the way the rules are set up, this file is always generated. Fix this.Nak, this file is used by our flashing tools, so needs to be kept around.
(As background, we take the separate u-boot-nodtb-tegra.bin and u-boot.dtb, modify u-boot.dtb to inject some changes to the environment such as over-writing bootcmd with flashing instructions etc., and then blend the two back together for download into RAM and subsequent execution).
OK. well in that case It think the code at the top is wrong:
# enable combined SPL/u-boot/dtb rules for tegra ifneq ($(CONFIG_TEGRA),) ifeq ($(CONFIG_SPL),y) ifeq ($(CONFIG_OF_SEPARATE),y) ALL-y += u-boot-dtb-tegra.bin else ALL-y += u-boot-nodtb-tegra.bin endif endif endif
It should be this, right?
# enable combined SPL/u-boot/dtb rules for tegra ifneq ($(CONFIG_TEGRA),) ifeq ($(CONFIG_SPL),y) ALL-y += u-boot-dtb-tegra.bin u-boot-nodtb-tegra.bin endif endif
Regards,
Simon
PATCH 1/7 tegra: Drop generation of -nodtb file with OF_CONTROL
Quoted 28 lines · Simon Glass
Hi Stephen,
Quoted 11 lines · Stephen Warren
Quoted 4 lines · Simon Glass
It seems clear that the intent is to generate u-boot-nodtb-tegra.bin only when
OF_CONTROLis not set. But due to the way the rules are set up, this file is always generated. Fix this.Nak, this file is used by our flashing tools, so needs to be kept around.
(As background, we take the separate u-boot-nodtb-tegra.bin and u-boot.dtb, modify u-boot.dtb to inject some changes to the environment such as over-writing bootcmd with flashing instructions etc., and then blend the two back together for download into RAM and subsequent execution).
OK. well in that case It think the code at the top is wrong:
# enable combined SPL/u-boot/dtb rules for tegra ifneq ($(CONFIG_TEGRA),) ifeq ($(CONFIG_SPL),y) ifeq ($(CONFIG_OF_SEPARATE),y) ALL-y += u-boot-dtb-tegra.bin else ALL-y += u-boot-nodtb-tegra.bin endif endif endif
Quoted 8 lines
It should be this, right?
# enable combined SPL/u-boot/dtb rules for tegra ifneq ($(CONFIG_TEGRA),) ifeq ($(CONFIG_SPL),y) ALL-y += u-boot-dtb-tegra.bin u-boot-nodtb-tegra.bin endif endif
That change looks almost fine, yes. I'd phrase it as follows:
ifneq ($(CONFIG_TEGRA),)
ifeq ($(CONFIG_SPL),y)
ALL-y += u-boot-nodtb-tegra.bin
ifeq ($(CONFIG_OF_SEPARATE),y)
ALL-y += u-boot-dtb-tegra.bin
endif
endif
endif
... so that u-boot-dtb-tegra.bin is only built when there's a DTB in use.
(or we could drop the most nested ifdef as you wrote, if we assume the value of CONFIG_OF_SEPARATE on Tegra)
Everything works and is safe right now since later Makefile says:
ifeq ($(CONFIG_OF_SEPARATE),y) u-boot-dtb-tegra.bin: u-boot-nodtb-tegra.bin dts/dt.dtb FORCE
$(call if_changed,cat)
endif
So the if statement you're quoting is ensuring that the "final" or "most complete" file is built, and then the dependency chain ends up ensuring that all the others are built. As you say though, it would be good if ALL-y listed everything that users expect to use.
PATCH 1/7 tegra: Drop generation of -nodtb file with OF_CONTROL
Hi Stephen,
Quoted 69 lines · Stephen Warren
Quoted 38 lines · Simon Glass
Hi Stephen,
Quoted 13 lines · Stephen Warren
Quoted 7 lines · Simon Glass
It seems clear that the intent is to generate u-boot-nodtb-tegra.bin only
whenOF_CONTROLis not set. But due to the way the rules are set up, this
file is always generated. Fix this.Quoted 6 lines
Nak, this file is used by our flashing tools, so needs to be kept around.
(As background, we take the separate u-boot-nodtb-tegra.bin and u-boot.dtb, modify u-boot.dtb to inject some changes to the environment such as over-writing bootcmd with flashing instructions etc., and then blend the two back together for download into RAM and subsequent execution).
OK. well in that case It think the code at the top is wrong:
# enable combined SPL/u-boot/dtb rules for tegra ifneq ($(CONFIG_TEGRA),) ifeq ($(CONFIG_SPL),y) ifeq ($(CONFIG_OF_SEPARATE),y) ALL-y += u-boot-dtb-tegra.bin else ALL-y += u-boot-nodtb-tegra.bin endif endif endifQuoted 8 lines
It should be this, right?
# enable combined SPL/u-boot/dtb rules for tegra ifneq ($(CONFIG_TEGRA),) ifeq ($(CONFIG_SPL),y) ALL-y += u-boot-dtb-tegra.bin u-boot-nodtb-tegra.bin endif endifThat change looks almost fine, yes. I'd phrase it as follows:
ifneq ($(CONFIG_TEGRA),)
ifeq ($(CONFIG_SPL),y)
ALL-y += u-boot-nodtb-tegra.bin
ifeq ($(CONFIG_OF_SEPARATE),y)
ALL-y += u-boot-dtb-tegra.bin
endif
endif
endif... so that u-boot-dtb-tegra.bin is only built when there's a DTB in use.
(or we could drop the most nested ifdef as you wrote, if we assume the value of
CONFIG_OF_SEPARATEon Tegra)Everything works and is safe right now since later
Makefilesays:ifeq ($(CONFIG_OF_SEPARATE),y) u-boot-dtb-tegra.bin: u-boot-nodtb-tegra.bin dts/dt.dtb FORCE
Quoted 7 lines
$(call if_changed,cat)endif
So the if statement you're quoting is ensuring that the "final" or "most complete" file is built, and then the dependency chain ends up ensuring that all the others are built. As you say though, it would be good if ALL-y listed everything that users expect to use.
OK thanks for the info.
Regards,
Simon
PATCH 2/7 fdt: Build a U-Boot binary without device tree
In reply to Simon GlassAt 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.
---
Makefile | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-)
Makefile +15 -7
@@ -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
Signature · 1 line
2.7.0.rc3.207.g0ac5344
PATCH 2/7 fdt: Build a U-Boot binary without device tree
Quoted 8 lines · Simon Glass
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.
Quoted 8 lines
This should be acceptable since:
- without
OF_CONTROL, u-boot.bin still does not include a device tree
- withOF_CONTROL, u-boot-dtb.bin does not changeThe 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:-(
Quoted 1 line
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
PATCH 2/7 fdt: Build a U-Boot binary without device tree
Hi Stephen,
Quoted 23 lines · Stephen Warren
Quoted 13 lines · Simon Glass
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:
Quoted 7 lines
- without
OF_CONTROL, u-boot.bin still does not include a device tree
- withOF_CONTROL, u-boot-dtb.bin does not changeThe 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.
Quoted 6 lines
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.
Quoted 6 lines
Quoted 2 lines
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.
Quoted 9 lines
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
PATCH 2/7 fdt: Build a U-Boot binary without device tree
In reply to Stephen WarrenQuoted 33 lines · Stephen Warren
Quoted 12 lines · Simon Glass
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:
Quoted 7 lines
- without
OF_CONTROL, u-boot.bin still does not include a device tree
- withOF_CONTROL, u-boot-dtb.bin does not changeThe 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:-(
Quoted 1 line
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?
Quoted 8 lines
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?)
PATCH 2/7 fdt: Build a U-Boot binary without device tree
Hi Stephen,
Quoted 57 lines · Stephen Warren
Quoted 38 lines · Stephen Warren
Quoted 13 lines · Simon Glass
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:
Quoted 7 lines
- without
OF_CONTROL, u-boot.bin still does not include a device tree
- withOF_CONTROL, u-boot-dtb.bin does not changeThe 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:-(
Quoted 1 line
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?
Quoted 8 lines
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.binOh, 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
Quoted 4 lines
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
PATCH 3/7 fdt: Build an SPL binary without device tree
In reply to Simon GlassAt present u-boot-spl.bin holds the plain SPL binary without the device tree. This is somewhat annoying since you need either u-boot-spl.bin or u-boot-spl-dtb.bin depending on whether device tree is used.
Adjust the build such that u-boot-spl.bin includes a device tree, and the plain binary is in u-boot-spl-nodtb.bin. For now u-boot-spl-dtb.bin remains the same.
---
scripts/Makefile.spl | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-)
scripts/Makefile.spl +14 -6
@@ -131,14 +131,14 @@ boot.bin: $(obj)/u-boot-spl.bin else MKIMAGEFLAGS_boot.bin = -T zynqimage -spl/boot.bin: $(obj)/u-boot-spl-dtb.bin +spl/boot.bin: $(obj)/u-boot-spl.bin $(call if_changed,mkimage) endif ALL-y += $(obj)/$(SPL_BIN).bin $(obj)/$(SPL_BIN).cfg ifdef CONFIG_SPL_OF_CONTROL -ALL-$(CONFIG_OF_SEPARATE) += $(obj)/$(SPL_BIN)-pad.bin $(obj)/$(SPL_BIN)-dtb.bin +ALL-$(CONFIG_OF_SEPARATE) += $(obj)/$(SPL_BIN)-pad.bin $(obj)/$(SPL_BIN)-nodtb.bin endif ifdef CONFIG_SAMSUNG
@@ -166,11 +166,19 @@ all: $(ALL-y) quiet_cmd_cat = CAT $@ cmd_cat = cat $(filter-out $(PHONY), $^) > $@ -$(obj)/$(SPL_BIN)-dtb.bin: $(obj)/$(SPL_BIN).bin $(obj)/$(SPL_BIN)-pad.bin \ +ifeq ($(CONFIG_SPL_OF_CONTROL),y) +$(obj)/$(SPL_BIN)-dtb.bin: $(obj)/$(SPL_BIN)-nodtb.bin $(obj)/$(SPL_BIN)-pad.bin \ $(obj)/$(SPL_BIN).dtb FORCE $(call if_changed,cat) -# Create a file that pads from the end of u-boot-spl.bin to bss_end +$(obj)/$(SPL_BIN).bin: $(obj)/$(SPL_BIN)-dtb.bin FORCE + $(call if_changed,cat) +else +$(obj)/$(SPL_BIN).bin: $(obj)/$(SPL_BIN)-nodtb.bin FORCE + $(call if_changed,cat) +endif + +# Create a file that pads from the end of u-boot-spl-nodtb.bin to bss_end $(obj)/$(SPL_BIN)-pad.bin: $(obj)/$(SPL_BIN) @bss_size_str=$(shell $(NM) $< | awk 'BEGIN {size = 0} /__bss_size/ {size = $$1} END {print "ibase=16; " toupper(size)}' | bc); \ dd if=/dev/zero of=$@ bs=1 count=$${bss_size_str} 2>/dev/null;
@@ -211,9 +219,9 @@ endif quiet_cmd_objcopy = OBJCOPY $@ cmd_objcopy = $(OBJCOPY) $(OBJCOPYFLAGS) $(OBJCOPYFLAGS_$(@F)) $< $@ -OBJCOPYFLAGS_$(SPL_BIN).bin = $(SPL_OBJCFLAGS) -O binary +OBJCOPYFLAGS_$(SPL_BIN)-nodtb.bin = $(SPL_OBJCFLAGS) -O binary -$(obj)/$(SPL_BIN).bin: $(obj)/$(SPL_BIN) FORCE +$(obj)/$(SPL_BIN)-nodtb.bin: $(obj)/$(SPL_BIN) FORCE $(call if_changed,objcopy) LDFLAGS_$(SPL_BIN) += -T u-boot-spl.lds $(LDFLAGS_FINAL)
Signature · 1 line
2.7.0.rc3.207.g0ac5344
PATCH 4/7 tegra: Always build a boot image with the same filename
In reply to Simon GlassAdjust the Makefile to build u-boot-tegra.bin which contains a device tree if OF_CONTROL is enabled, and does not if not. This mirrors U-Boot's new approach of using u-boot.bin to handle both cases.
---
Makefile | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-)
Makefile +5 -7
@@ -765,6 +765,7 @@ endif # enable combined SPL/u-boot/dtb rules for tegra ifneq ($(CONFIG_TEGRA),) ifeq ($(CONFIG_SPL),y) +ALL-y += u-boot-tegra.bin ifeq ($(CONFIG_OF_SEPARATE),y) ALL-y += u-boot-dtb-tegra.bin else
@@ -1080,15 +1081,12 @@ u-boot-sunxi-with-spl.bin: spl/sunxi-spl.bin \ endif ifneq ($(CONFIG_TEGRA),) -OBJCOPYFLAGS_u-boot-nodtb-tegra.bin = -O binary --pad-to=$(CONFIG_SYS_TEXT_BASE) -u-boot-nodtb-tegra.bin: spl/u-boot-spl u-boot.bin FORCE +OBJCOPYFLAGS_u-boot-tegra.bin = -O binary --pad-to=$(CONFIG_SYS_TEXT_BASE) +u-boot-tegra.bin: spl/u-boot-spl u-boot.bin FORCE $(call if_changed,pad_cat) -ifeq ($(CONFIG_OF_SEPARATE),y) -OBJCOPYFLAGS_u-boot-dtb-tegra.bin = -O binary --pad-to=$(CONFIG_SYS_TEXT_BASE) -u-boot-dtb-tegra.bin: spl/u-boot-spl u-boot-dtb.bin FORCE - $(call if_changed,pad_cat) -endif +u-boot-nodtb-tegra.bin u-boot-dtb-tegra.bin: u-boot-tegra.bin FORCE + $(call if_changed,cat) endif OBJCOPYFLAGS_u-boot-app.efi := $(OBJCOPYFLAGS_EFI)
Signature · 1 line
2.7.0.rc3.207.g0ac5344
PATCH 4/7 tegra: Always build a boot image with the same filename
Quoted 3 lines · Simon Glass
Adjust the
Makefileto build u-boot-tegra.bin which contains a device tree ifOF_CONTROLis enabled, and does not if not. This mirrors U-Boot's new approach of using u-boot.bin to handle both cases.
For Tegra, we need:
u-boot-nodtb-tegra.bin
Required always.
This never includes a DTB.
u-boot-dtb-tegra.bin
Required if OF_CONTROL is enabled (which these days is always). This always includes a DTB.
I believe this change violates those requirements since it makes both u-boot-nodtb-tegra.bin and u-boot-dtb-tegra.bin identical to u-boot-tegra.bin, and hence always include a DTB in practice.
PATCH 4/7 tegra: Always build a boot image with the same filename
Hi Stephen,
Quoted 13 lines · Stephen Warren
Quoted 4 lines · Simon Glass
Adjust the
Makefileto build u-boot-tegra.bin which contains a device tree ifOF_CONTROLis enabled, and does not if not. This mirrors U-Boot's new approach of using u-boot.bin to handle both cases.For Tegra, we need:
u-boot-nodtb-tegra.bin
Required always.
This never includes a DTB.
Quoted 7 lines
u-boot-dtb-tegra.bin
Required ifOF_CONTROLis enabled (which these days is always). This always includes a DTB.I believe this change violates those requirements since it makes both u-boot-nodtb-tegra.bin and u-boot-dtb-tegra.bin identical to u-boot-tegra.bin, and hence always include a DTB in practice.
Yes, I think I was confused by the code at the top, as mentioned on the other thread. Will await your response there and then take another look.
Regards,
Simon
PATCH 5/7 socfpga: Simplify Makefile filenames
In reply to Simon GlassWe don't need the -dtb suffix anymore, so drop it.
---
Makefile | 10 +++++----- scripts/Makefile.spl | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-)
Makefile +5 -5
@@ -1015,10 +1015,10 @@ u-boot.spr: spl/u-boot-spl.img u-boot.img FORCE ifneq ($(CONFIG_ARCH_SOCFPGA),) quiet_cmd_socboot = SOCBOOT $@ -cmd_socboot = cat spl/u-boot-spl-dtb.sfp spl/u-boot-spl-dtb.sfp \ - spl/u-boot-spl-dtb.sfp spl/u-boot-spl-dtb.sfp \ - u-boot-dtb.img > $@ || rm -f $@ -u-boot-with-spl-dtb.sfp: spl/u-boot-spl-dtb.sfp u-boot-dtb.img FORCE +cmd_socboot = cat spl/u-boot-spl.sfp spl/u-boot-spl.sfp \ + spl/u-boot-spl.sfp spl/u-boot-spl.sfp \ + u-boot.img > $@ || rm -f $@ +u-boot-with-spl.sfp: spl/u-boot-spl.sfp u-boot.img FORCE $(call if_changed,socboot) endif
@@ -1323,7 +1323,7 @@ spl/u-boot-spl: tools prepare $(if $(CONFIG_OF_SEPARATE),dts/dt.dtb) spl/sunxi-spl.bin: spl/u-boot-spl @: -spl/u-boot-spl-dtb.sfp: spl/u-boot-spl +spl/u-boot-spl.sfp: spl/u-boot-spl @: spl/boot.bin: spl/u-boot-spl
scripts/Makefile.spl +3 -3
@@ -146,7 +146,7 @@ ALL-y += $(obj)/$(BOARD)-spl.bin endif ifdef CONFIG_ARCH_SOCFPGA -ALL-y += $(obj)/$(SPL_BIN)-dtb.sfp +ALL-y += $(obj)/$(SPL_BIN).sfp endif ifdef CONFIG_SUNXI
@@ -230,8 +230,8 @@ LDFLAGS_$(SPL_BIN) += -Ttext $(CONFIG_SPL_TEXT_BASE) endif ifdef CONFIG_ARCH_SOCFPGA -MKIMAGEFLAGS_$(SPL_BIN)-dtb.sfp = -T socfpgaimage -$(obj)/$(SPL_BIN)-dtb.sfp: $(obj)/$(SPL_BIN)-dtb.bin FORCE +MKIMAGEFLAGS_$(SPL_BIN).sfp = -T socfpgaimage +$(obj)/$(SPL_BIN).sfp: $(obj)/$(SPL_BIN).bin FORCE $(call if_changed,mkimage) endif
Signature · 1 line
2.7.0.rc3.207.g0ac5344
PATCH 5/7 socfpga: Simplify Makefile filenames
Quoted 4 lines · Simon Glass
We don't need the -dtb suffix anymore, so drop it.
Signed-off-by Simon Glass <[email protected]>---
You should also fix the MCV:
$ git grep u-boot-with-spl-dtb.sfp ... include/configs/socfpga_mcvevk.h: "update_filename=u-boot-with-spl-dtb.sfp\0"
I have to admit, I am not a big fan of this renaming, since it's just introducing naming chaos between versions.
Quoted 46 lines
Makefile | 10 +++++----- scripts/Makefile.spl | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-)Makefile +4
-4@@ -1015,10 +1015,10 @@ u-boot.spr: spl/u-boot-spl.img u-boot.img FORCE ifneq ($(CONFIG_ARCH_SOCFPGA),) quiet_cmd_socboot = SOCBOOT $@ -cmd_socboot = cat spl/u-boot-spl-dtb.sfp spl/u-boot-spl-dtb.sfp \ - spl/u-boot-spl-dtb.sfp spl/u-boot-spl-dtb.sfp \ - u-boot-dtb.img > $@ || rm -f $@ -u-boot-with-spl-dtb.sfp: spl/u-boot-spl-dtb.sfp u-boot-dtb.img FORCE +cmd_socboot = cat spl/u-boot-spl.sfp spl/u-boot-spl.sfp \ + spl/u-boot-spl.sfp spl/u-boot-spl.sfp \ + u-boot.img > $@ || rm -f $@ +u-boot-with-spl.sfp: spl/u-boot-spl.sfp u-boot.img FORCE $(call if_changed,socboot) endif@@ -1323,7 +1323,7 @@ spl/u-boot-spl: tools prepare $(if$(CONFIG_OF_SEPARATE),dts/dt.dtb) spl/sunxi-spl.bin: spl/u-boot-spl
Makefile +1
-1@: -spl/u-boot-spl-dtb.sfp: spl/u-boot-spl +spl/u-boot-spl.sfp: spl/u-boot-spl @: spl/boot.bin: spl/u-boot-splscripts/Makefile.spl +1
-1@@ -146,7 +146,7 @@ ALL-y += $(obj)/$(BOARD)-spl.bin endif ifdef CONFIG_ARCH_SOCFPGA -ALL-y += $(obj)/$(SPL_BIN)-dtb.sfp +ALL-y += $(obj)/$(SPL_BIN).sfp endif ifdef CONFIG_SUNXI
scripts/Makefile.spl LDFLAGS_$(SPL_BIN) += -Ttext $(CONFIG_SPL_TEXT_BASE) · line 236
Quoted 9 lines
scripts/Makefile.spl +2
-2@@ -230,8 +230,8 @@ LDFLAGS_$(SPL_BIN) += -Ttext $(CONFIG_SPL_TEXT_BASE) endif ifdef CONFIG_ARCH_SOCFPGA -MKIMAGEFLAGS_$(SPL_BIN)-dtb.sfp = -T socfpgaimage -$(obj)/$(SPL_BIN)-dtb.sfp: $(obj)/$(SPL_BIN)-dtb.bin FORCE +MKIMAGEFLAGS_$(SPL_BIN).sfp = -T socfpgaimage +$(obj)/$(SPL_BIN).sfp: $(obj)/$(SPL_BIN).bin FORCE $(call if_changed,mkimage) endif
Best regards,
Marek Vasut
PATCH 5/7 socfpga: Simplify Makefile filenames
Hi Marek,
Quoted 12 lines · Marek Vasut
Quoted 4 lines · Simon Glass
We don't need the -dtb suffix anymore, so drop it.
Signed-off-by Simon Glass <[email protected]>---
You should also fix the MCV:
$ git grep u-boot-with-spl-dtb.sfp ... include/configs/socfpga_mcvevk.h: "update_filename=u-boot-with-spl-dtb.sfp\0"
OK
Quoted 2 lines
I have to admit, I am not a big fan of this renaming, since it's just introducing naming chaos between versions.
I'm rather hoping that the impact will be fairly small for the reasons I explained in the cover letter.
Quoted 49 lines
Quoted 49 lines
Makefile | 10 +++++----- scripts/Makefile.spl | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-)Makefile +4
-4@@ -1015,10 +1015,10 @@ u-boot.spr: spl/u-boot-spl.img u-boot.img FORCE ifneq ($(CONFIG_ARCH_SOCFPGA),) quiet_cmd_socboot = SOCBOOT $@ -cmd_socboot = cat spl/u-boot-spl-dtb.sfp spl/u-boot-spl-dtb.sfp \ - spl/u-boot-spl-dtb.sfp spl/u-boot-spl-dtb.sfp \ - u-boot-dtb.img > $@ || rm -f $@ -u-boot-with-spl-dtb.sfp: spl/u-boot-spl-dtb.sfp u-boot-dtb.img FORCE +cmd_socboot = cat spl/u-boot-spl.sfp spl/u-boot-spl.sfp \ + spl/u-boot-spl.sfp spl/u-boot-spl.sfp \ + u-boot.img > $@ || rm -f $@ +u-boot-with-spl.sfp: spl/u-boot-spl.sfp u-boot.img FORCE $(call if_changed,socboot) endif@@ -1323,7 +1323,7 @@ spl/u-boot-spl: tools prepare $(if$(CONFIG_OF_SEPARATE),dts/dt.dtb) spl/sunxi-spl.bin: spl/u-boot-spl
@:Makefile +1
-1-spl/u-boot-spl-dtb.sfp: spl/u-boot-spl +spl/u-boot-spl.sfp: spl/u-boot-spl @: spl/boot.bin: spl/u-boot-splscripts/Makefile.spl +1
-1@@ -146,7 +146,7 @@ ALL-y += $(obj)/$(BOARD)-spl.bin endif ifdef CONFIG_ARCH_SOCFPGA -ALL-y += $(obj)/$(SPL_BIN)-dtb.sfp +ALL-y += $(obj)/$(SPL_BIN).sfp endif ifdef CONFIG_SUNXI@@ -230,8 +230,8 @@ LDFLAGS_$(SPL_BIN) += -Ttext $(CONFIG_SPL_TEXT_BASE) endif
Quoted 10 lines
scripts/Makefile.spl LDFLAGS_$(SPL_BIN) += -Ttext $(CONFIG_SPL_TEXT_BASE) · line 236
Quoted 7 lines
scripts/Makefile.spl +2
-2ifdef CONFIG_ARCH_SOCFPGA -MKIMAGEFLAGS_$(SPL_BIN)-dtb.sfp = -T socfpgaimage -$(obj)/$(SPL_BIN)-dtb.sfp: $(obj)/$(SPL_BIN)-dtb.bin FORCE +MKIMAGEFLAGS_$(SPL_BIN).sfp = -T socfpgaimage +$(obj)/$(SPL_BIN).sfp: $(obj)/$(SPL_BIN).bin FORCE $(call if_changed,mkimage) endifBest regards,
Marek Vasut
Regards,
Simon
PATCH 6/7 Makefile: Make u-boot.img the same as u-boot-dtb.img
In reply to Simon GlassWhen OF_CONTROL is enabled, u-boot.img has no purpose since it does not include the required device tree binary. The correct image to use is u-boot-dtb.img with OF_CONTROL but u-boot.img without OF_CONTROL.
Create u-boot.img even when OF_CONTROL is enabled, so that this file can be used in both cases.
---
Makefile | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-)
Makefile +3 -10
@@ -906,6 +906,8 @@ MKIMAGEFLAGS_u-boot.img = -A $(ARCH) -T firmware -C none -O u-boot \ -a $(CONFIG_SYS_TEXT_BASE) -e $(CONFIG_SYS_UBOOT_START) \ -n "U-Boot $(UBOOTRELEASE) for $(BOARD) board" +MKIMAGEFLAGS_u-boot-dtb.img = $(MKIMAGEFLAGS_u-boot.img) + MKIMAGEFLAGS_u-boot.kwb = -n $(srctree)/$(CONFIG_SYS_KWD_CONFIG:"%"=%) \ -T kwbimage -a $(CONFIG_SYS_TEXT_BASE) -e $(CONFIG_SYS_TEXT_BASE)
@@ -915,17 +917,12 @@ MKIMAGEFLAGS_u-boot-spl.kwb = -n $(srctree)/$(CONFIG_SYS_KWD_CONFIG:"%"=%) \ MKIMAGEFLAGS_u-boot.pbl = -n $(srctree)/$(CONFIG_SYS_FSL_PBL_RCW:"%"=%) \ -R $(srctree)/$(CONFIG_SYS_FSL_PBL_PBI:"%"=%) -T pblimage -u-boot.img u-boot.kwb u-boot.pbl: u-boot.bin FORCE +u-boot-dtb.img u-boot.img u-boot.kwb u-boot.pbl: u-boot.bin FORCE $(call if_changed,mkimage) u-boot-spl.kwb: u-boot-dtb.img spl/u-boot-spl.bin FORCE $(call if_changed,mkimage) -MKIMAGEFLAGS_u-boot-dtb.img = $(MKIMAGEFLAGS_u-boot.img) - -u-boot-dtb.img: u-boot-dtb.bin FORCE - $(call if_changed,mkimage) - u-boot.sha1: u-boot.bin tools/ubsha1 u-boot.bin
@@ -1127,11 +1124,7 @@ spl/u-boot-spl.pbl: spl/u-boot-spl.bin FORCE $(call if_changed,mkimage) ifeq ($(ARCH),arm) -ifdef CONFIG_OF_CONTROL -UBOOT_BINLOAD := u-boot-dtb.img -else UBOOT_BINLOAD := u-boot.img -endif else UBOOT_BINLOAD := u-boot.bin endif
Signature · 1 line
2.7.0.rc3.207.g0ac5344
PATCH 7/7 Makefile: Drop unnecessary -dtb suffixes
In reply to Simon GlassWhen OF_CONTROL is enabled, u-boot-dtb.* files are the same as u-boot.* files. So we can use the latter for simplicity.
---
Makefile | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-)
Makefile +6 -7
@@ -920,7 +920,7 @@ MKIMAGEFLAGS_u-boot.pbl = -n $(srctree)/$(CONFIG_SYS_FSL_PBL_RCW:"%"=%) \ u-boot-dtb.img u-boot.img u-boot.kwb u-boot.pbl: u-boot.bin FORCE $(call if_changed,mkimage) -u-boot-spl.kwb: u-boot-dtb.img spl/u-boot-spl.bin FORCE +u-boot-spl.kwb: u-boot.img spl/u-boot-spl.bin FORCE $(call if_changed,mkimage) u-boot.sha1: u-boot.bin
@@ -1061,7 +1061,7 @@ endif cmd_ifdtool += $(IFDTOOL) $(IFDTOOL_FLAGS) u-boot.tmp; cmd_ifdtool += mv u-boot.tmp $@ -u-boot.rom: u-boot-x86-16bit.bin u-boot-dtb.bin +u-boot.rom: u-boot-x86-16bit.bin u-boot.bin $(call if_changed,ifdtool) OBJCOPYFLAGS_u-boot-x86-16bit.bin := -O binary -j .start16 -j .resetvec
@@ -1072,8 +1072,7 @@ endif ifneq ($(CONFIG_SUNXI),) OBJCOPYFLAGS_u-boot-sunxi-with-spl.bin = -I binary -O binary \ --pad-to=$(CONFIG_SPL_PAD_TO) --gap-fill=0xff -u-boot-sunxi-with-spl.bin: spl/sunxi-spl.bin \ - u-boot$(if $(CONFIG_OF_CONTROL),-dtb,).img FORCE +u-boot-sunxi-with-spl.bin: spl/sunxi-spl.bin u-boot.img FORCE $(call if_changed,pad_cat) endif
@@ -1090,7 +1089,7 @@ OBJCOPYFLAGS_u-boot-app.efi := $(OBJCOPYFLAGS_EFI) u-boot-app.efi: u-boot FORCE $(call if_changed,zobjcopy) -u-boot-dtb.bin.o: u-boot-dtb.bin FORCE +u-boot.bin.o: u-boot.bin FORCE $(call if_changed,efipayload) u-boot-payload.lds: $(LDSCRIPT_EFI) FORCE
@@ -1100,10 +1099,10 @@ u-boot-payload.lds: $(LDSCRIPT_EFI) FORCE quiet_cmd_u-boot_payload ?= LD $@ cmd_u-boot_payload ?= $(LD) $(LDFLAGS_EFI_PAYLOAD) -o $@ \ -T u-boot-payload.lds arch/x86/cpu/call32.o \ - lib/efi/efi.o lib/efi/efi_stub.o u-boot-dtb.bin.o \ + lib/efi/efi.o lib/efi/efi_stub.o u-boot.bin.o \ $(addprefix arch/$(ARCH)/lib/efi/,$(EFISTUB)) -u-boot-payload: u-boot-dtb.bin.o u-boot-payload.lds FORCE +u-boot-payload: u-boot.bin.o u-boot-payload.lds FORCE $(call if_changed,u-boot_payload) OBJCOPYFLAGS_u-boot-payload.efi := $(OBJCOPYFLAGS_EFI)
Signature · 1 line
2.7.0.rc3.207.g0ac5344
cover fdt: Replace u-boot-dtb.bin with u-boot.bin
In reply to Simon GlassHello Simon,
Quoted 17 lines · Simon Glass
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.
This series adjusts 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
- withOF_CONTROL, u-boot-dtb.bin does not changeThe 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.
Quoted 5 lines
The original decision to use a separate u-boot-dtb.bin was aimed at allowing any device tree file to be concatenated to the u-boot.bin image after the build. However this no-longer seems so important. More important is the convenience of using the same output file regardless of the setting for
OF_CONTROL.
This makes sense for user-friendness point of view and still allows for build systems to interact over the raw copy of U-Boot to concatenate it with the desired set of Device Tree files.
I think the more platforms move to Device Tree (from U-Boot point of view) the more important this change is.
I do support this addition. Tom, please make sure to mention this on the NEWS entry for the next release as integrations must to be aware of this behavior change.
Signature · 3 lines
Otavio Salvador O.S. Systems http://www.ossystems.com.br http://code.ossystems.com.br Mobile: +55 (53) 9981-7854 Mobile: +1 (347) 903-9750
cover fdt: Replace u-boot-dtb.bin with u-boot.bin
Hi Otavio,
Quoted 26 lines · Otavio Salvador
Hello Simon,
Quoted 17 lines · Simon Glass
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.
This series adjusts 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
- withOF_CONTROL, u-boot-dtb.bin does not changeThe 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.
Quoted 5 lines
The original decision to use a separate u-boot-dtb.bin was aimed at allowing any device tree file to be concatenated to the u-boot.bin image after the build. However this no-longer seems so important. More important is the convenience of using the same output file regardless of the setting for
OF_CONTROL.
Quoted 6 lines
This makes sense for user-friendness point of view and still allows for build systems to interact over the raw copy of U-Boot to concatenate it with the desired set of Device Tree files.
I think the more platforms move to Device Tree (from U-Boot point of view) the more important this change is.
Yes that is my motivation. We have been adding more and more special-case Makefile rules, and build/deploy instruction have had to change, etc. This way we can make the DT conversion a bit more seamless.
Quoted 4 lines
I do support this addition. Tom, please make sure to mention this on the NEWS entry for the next release as integrations must to be aware of this behavior change.
Regards,
Simon
cover fdt: Replace u-boot-dtb.bin with u-boot.bin
In reply to Simon GlassHi Hans,
Quoted 18 lines · Simon Glass
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.
This series adjusts 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
- withOF_CONTROL, u-boot-dtb.bin does not changeThe 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.
Quoted 5 lines
The original decision to use a separate u-boot-dtb.bin was aimed at allowing any device tree file to be concatenated to the u-boot.bin image after the build. However this no-longer seems so important. More important is the convenience of using the same output file regardless of the setting for
OF_CONTROL.
Do you have any comments on this series please?
Quoted 11 lines
Simon Glass (7):
tegra: Drop generation of -nodtb file withOF_CONTROL
fdt: Build a U-Boot binary without device tree
fdt: Build an SPL binary without device tree
tegra: Always build a boot image with the same filename
socfpga: SimplifyMakefilefilenames
Makefile: Make u-boot.img the same as u-boot-dtb.img
Makefile: Drop unnecessary -dtb suffixes
Quoted 7 lines
Makefile | 67 ++++++++++++++++++++++++++-------------------------- scripts/Makefile.spl | 26 +++++++++++++------- 2 files changed, 50 insertions(+), 43 deletions(-)--
2.7.0.rc3.207.g0ac5344
Regards,
Simon
cover fdt: Replace u-boot-dtb.bin with u-boot.bin
Hi,
Quoted 21 lines · Simon Glass
Hi Hans,
Quoted 18 lines · Simon Glass
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.
This series adjusts 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
- withOF_CONTROL, u-boot-dtb.bin does not changeThe 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.
Quoted 7 lines
Quoted 5 lines
The original decision to use a separate u-boot-dtb.bin was aimed at allowing any device tree file to be concatenated to the u-boot.bin image after the build. However this no-longer seems so important. More important is the convenience of using the same output file regardless of the setting for
OF_CONTROL.Do you have any comments on this series please?
I'm fine with this series, all normal sunxi use-cases use u-boot-sunxi-with-spl.bin which is generated like this:
ifneq ($(CONFIG_SUNXI),)
OBJCOPYFLAGS_u-boot-sunxi-with-spl.bin = -I binary -O binary \
--pad-to=$(CONFIG_SPL_PAD_TO) --gap-fill=0xff
u-boot-sunxi-with-spl.bin: spl/sunxi-spl.bin \
u-boot$(if $(CONFIG_OF_CONTROL),-dtb,).img FORCE
$(call if_changed,pad_cat)endif
Which should stay working just fine, although it might be slightly simplified after your patch to simply always use u-boot.img.
sunxi spl does not use a dtb, so nothing should change there.
Regards,
Hans
Quoted 23 lines
Quoted 12 lines
Simon Glass (7):
tegra: Drop generation of -nodtb file withOF_CONTROL
fdt: Build a U-Boot binary without device tree
fdt: Build an SPL binary without device tree
tegra: Always build a boot image with the same filename
socfpga: SimplifyMakefilefilenames
Makefile: Make u-boot.img the same as u-boot-dtb.img
Makefile: Drop unnecessary -dtb suffixesQuoted 7 lines
Makefile | 67 ++++++++++++++++++++++++++-------------------------- scripts/Makefile.spl | 26 +++++++++++++------- 2 files changed, 50 insertions(+), 43 deletions(-)--
2.7.0.rc3.207.g0ac5344Regards,
Simon
cover fdt: Replace u-boot-dtb.bin with u-boot.bin
Hi Hans,
Quoted 53 lines · Hans de Goede
Hi,
Quoted 36 lines · Simon Glass
Hi Hans,
Quoted 24 lines · Simon Glass
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.This series adjusts 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
- withOF_CONTROL, u-boot-dtb.bin does not changeThe 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.Quoted 6 lines
The original decision to use a separate u-boot-dtb.bin was aimed at allowing
any device tree file to be concatenated to the u-boot.bin image after the build. However this no-longer seems so important. More important is the convenience of using the same output file regardless of the setting forOF_CONTROL.Quoted 1 line
Do you have any comments on this series please?
I'm fine with this series, all normal sunxi use-cases use u-boot-sunxi-with-spl.bin
which is generated like this:ifneq ($(CONFIG_SUNXI),)
OBJCOPYFLAGS_u-boot-sunxi-with-spl.bin = -I binary -O binary \ --pad-to=$(CONFIG_SPL_PAD_TO) --gap-fill=0xff u-boot-sunxi-with-spl.bin: spl/sunxi-spl.bin \ u-boot$(if $(CONFIG_OF_CONTROL),-dtb,).img FORCE $(call if_changed,pad_cat)
Quoted 6 lines
endif
Which should stay working just fine, although it might be slightly simplified after your patch to simply always use u-boot.img.
sunxi spl does not use a dtb, so nothing should change there.
OK thanks. I'll respin the series with the comments address and send v2.
Regards,
Simon