diff mbox series

[v2,24/49] Makefile: Allow building .rom files for non-x86 boards

Message ID 20200613205717.v2.24.I29c8357536d96c6d2baa2ac77159420a2c8ed898@changeid
State New
Headers show
Series rockchip: x86: Support building ROM files automatically with binman | expand

Commit Message

Simon Glass June 14, 2020, 2:57 a.m. UTC
Some non-x86 devices can use SPI flash to boot and need to produce images
of a fixed size to program the flash.

Add a way to handle this for non-x86 boards.

Signed-off-by: Simon Glass <sjg at chromium.org>
---

(no changes since v1)

 Makefile | 12 ++++++++++++
 1 file changed, 12 insertions(+)

Comments

Bin Meng June 29, 2020, 7:30 a.m. UTC | #1
Hi Simon,

On Sun, Jun 14, 2020 at 10:57 AM Simon Glass <sjg at chromium.org> wrote:
>
> Some non-x86 devices can use SPI flash to boot and need to produce images
> of a fixed size to program the flash.
>
> Add a way to handle this for non-x86 boards.
>
> Signed-off-by: Simon Glass <sjg at chromium.org>
> ---
>
> (no changes since v1)
>
>  Makefile | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
>
> diff --git a/Makefile b/Makefile
> index 8a2bb94f2c..07c237120d 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -1607,6 +1607,18 @@ u-boot-x86-start16.bin: u-boot FORCE
>  OBJCOPYFLAGS_u-boot-x86-reset16.bin := -O binary -j .resetvec
>  u-boot-x86-reset16.bin: u-boot FORCE
>         $(call if_changed,objcopy)
> +
> +else # !CONFIG_X86
> +
> +ifdef CONFIG_SPL
> +rom-deps += spl/u-boot-spl.bin
> +rom-deps += u-boot.img

Not every platform has a u-boot.img target ?

> +endif
> +
> +ifdef CONFIG_TPL
> +rom-deps += tpl/u-boot-tpl.bin
> +endif
> +
>  endif
>
>  u-boot.rom: $(rom-deps) FORCE
> --

Regards,
Bin
diff mbox series

Patch

diff --git a/Makefile b/Makefile
index 8a2bb94f2c..07c237120d 100644
--- a/Makefile
+++ b/Makefile
@@ -1607,6 +1607,18 @@  u-boot-x86-start16.bin: u-boot FORCE
 OBJCOPYFLAGS_u-boot-x86-reset16.bin := -O binary -j .resetvec
 u-boot-x86-reset16.bin: u-boot FORCE
 	$(call if_changed,objcopy)
+
+else # !CONFIG_X86
+
+ifdef CONFIG_SPL
+rom-deps += spl/u-boot-spl.bin
+rom-deps += u-boot.img
+endif
+
+ifdef CONFIG_TPL
+rom-deps += tpl/u-boot-tpl.bin
+endif
+
 endif
 
 u-boot.rom: $(rom-deps) FORCE