[v6,060/102] x86: Separate out U-Boot and device tree in ROM image
diff mbox series

Message ID 20191206213936.v6.60.I2f1b39100523d60d688c251b38ced615624a4ed3@changeid
State Accepted
Delegated to: Bin Meng
Headers show
Series
  • x86: Add initial support for apollolake
Related show

Commit Message

Simon Glass Dec. 7, 2019, 4:42 a.m. UTC
At present binman does not support updating a device tree that is part of
U-Boot (i.e u-boot.bin). Separate the entries into two so that we can get
updated entry information. This makes binman_entry_find() work correctly.

Do the same for SPL tool.

In both cases, group the two parts into a section so that SPL symbols get
the correct total size.

It may be possible for binman to handle this automatically at some point,
by ignoring u-boot.bin and always creating it from u-boot-nodtb.bin and
u-boot.dtb

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
---

Changes in v6: None
Changes in v5:
- Change SPL as well
- Group U-Boot and device tree into a section
- Rename spl section to 'spl' so that binman symbols can find it

Changes in v4: None
Changes in v3: None
Changes in v2: None

 arch/x86/dts/u-boot.dtsi | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

Comments

Bin Meng Dec. 8, 2019, 3:35 a.m. UTC | #1
On Sat, Dec 7, 2019 at 12:49 PM Simon Glass <sjg@chromium.org> wrote:
>
> At present binman does not support updating a device tree that is part of
> U-Boot (i.e u-boot.bin). Separate the entries into two so that we can get
> updated entry information. This makes binman_entry_find() work correctly.
>
> Do the same for SPL tool.
>
> In both cases, group the two parts into a section so that SPL symbols get
> the correct total size.
>
> It may be possible for binman to handle this automatically at some point,
> by ignoring u-boot.bin and always creating it from u-boot-nodtb.bin and
> u-boot.dtb
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
> ---
>
> Changes in v6: None
> Changes in v5:
> - Change SPL as well
> - Group U-Boot and device tree into a section
> - Rename spl section to 'spl' so that binman symbols can find it
>
> Changes in v4: None
> Changes in v3: None
> Changes in v2: None
>
>  arch/x86/dts/u-boot.dtsi | 14 +++++++++++---
>  1 file changed, 11 insertions(+), 3 deletions(-)
>

applied to u-boot-x86/next, thanks!

Patch
diff mbox series

diff --git a/arch/x86/dts/u-boot.dtsi b/arch/x86/dts/u-boot.dtsi
index e0cca58640..f0f8c71761 100644
--- a/arch/x86/dts/u-boot.dtsi
+++ b/arch/x86/dts/u-boot.dtsi
@@ -44,13 +44,21 @@ 
 	u-boot-tpl-dtb {
 	};
 #endif
-	u-boot-spl {
+	spl {
+		type = "section";
 		offset = <CONFIG_X86_OFFSET_SPL>;
-	};
-	u-boot-spl-dtb {
+		u-boot-spl {
+		};
+		u-boot-spl-dtb {
+		};
 	};
 	u-boot {
+		type = "section";
 		offset = <CONFIG_X86_OFFSET_U_BOOT>;
+		u-boot-nodtb {
+		};
+		u-boot-dtb {
+		};
 	};
 #elif defined(CONFIG_SPL)
 	u-boot-spl-with-ucode-ptr {