[PATCH v2 3/5] x86: edison: Move U-Boot alignment into binman
Simon Glass
sjg at chromium.org
Tue Jun 16 16:24:18 CEST 2026
The mask ROM loads the OS image to 0x01100000 but enters it at
0x01101000, so U-Boot must sit 0x1000 (4KB) into the loaded image. This
is arranged by board/intel/edison/config.mk, which prepends 4096 zero
bytes to u-boot.bin through an 'INPUTS-y += u-boot-align.bin' rule whose
recipe moves its output back over u-boot.bin.
Since the Edison image is assembled by binman, provide the gap there
instead: pad with a 'fill' of 4096 zero bytes ahead of the u-boot entry.
Wrap the fill and U-Boot in a section that is also written out as
u-boot-edison-dfu.bin, the [gap + U-Boot] payload to flash into the
u-boot0 partition over DFU, so that no longer needs a manual prepend.
Drop the now-redundant alignment hack from the board config.mk.
Reviewed-by: Andy Shevchenko <andriy.shevchenko at linux.intel.com>
Signed-off-by: Simon Glass <sjg at chromium.org>
---
Changes in v2:
- Reframe as a binman conversion (the boot fix is now a precursor) and
drop the duplicate 'Fixes' tag
- Wrap the gap and U-Boot in a section emitted as u-boot-edison-dfu.bin,
the ready-to-flash DFU payload
arch/x86/dts/edison.dts | 21 +++++++++++++++++++--
board/intel/edison/config.mk | 10 ----------
2 files changed, 19 insertions(+), 12 deletions(-)
diff --git a/arch/x86/dts/edison.dts b/arch/x86/dts/edison.dts
index 8fdacfb0fd8..00eb787deb1 100644
--- a/arch/x86/dts/edison.dts
+++ b/arch/x86/dts/edison.dts
@@ -177,8 +177,25 @@
intel,load-address = <(CONFIG_TEXT_BASE - 0x1000)>;
};
- u-boot {
- offset = <0x200>;
+ /*
+ * The OSII loads the image to (CONFIG_TEXT_BASE - 0x1000) but
+ * enters it at CONFIG_TEXT_BASE, so U-Boot must sit 0x1000
+ * (4KB) into the loaded data. Pad with zeroes ahead of U-Boot
+ * to provide that gap, and emit the [gap + U-Boot] payload as
+ * its own file (u-boot-edison-dfu.bin) for flashing into the
+ * u-boot0 partition over DFU.
+ */
+ u-boot-dfu {
+ type = "section";
+ filename = "u-boot-edison-dfu.bin";
+
+ fill {
+ size = <0x1000>;
+ fill-byte = [00];
+ };
+
+ u-boot {
+ };
};
u-boot-env {
diff --git a/board/intel/edison/config.mk b/board/intel/edison/config.mk
index fff187caa15..da7c9acf1a2 100644
--- a/board/intel/edison/config.mk
+++ b/board/intel/edison/config.mk
@@ -4,14 +4,4 @@
# Copyright (c) 2017 Intel Corporation
#
-# Add 4096 bytes of zeroes to u-boot.bin
-quiet_cmd_mkalign_eds = EDSALGN $@
-cmd_mkalign_eds = \
- dd if=$< of=$@ bs=4k seek=1 2>/dev/null && \
- mv $@ $<
-
-INPUTS-y += u-boot-align.bin
-u-boot-align.bin: u-boot.bin FORCE
- $(call if_changed,mkalign_eds)
-
HOSTCFLAGS_include/autoconf.mk.dep = -Wno-variadic-macros
--
2.43.0
More information about the U-Boot
mailing list