diff mbox series

[OpenWrt-Devel] build: Add append-uboot-spl command

Message ID 1542966777-1225-1-git-send-email-ynezz@true.cz
State Not Applicable
Delegated to: John Crispin
Headers show
Series [OpenWrt-Devel] build: Add append-uboot-spl command | expand

Commit Message

Petr Štetiar Nov. 23, 2018, 9:52 a.m. UTC
Example usage:

 Define Device/apalis
   ...
   UBOOT_PATH := $$(STAGING_DIR_IMAGE)/$$(UBOOT)-u-boot.img
   UBOOT_SPL_PATH := $$(STAGING_DIR_IMAGE)/$$(UBOOT)-SPL
   ARTIFACTS := spl-uboot.bin
   ARTIFACT/spl-uboot.bin := append-uboot-spl | pad-to 68k | append-uboot
 endef

Signed-off-by: Petr Štetiar <ynezz@true.cz>
---
 include/image-commands.mk | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Hauke Mehrtens Nov. 24, 2018, 1:06 p.m. UTC | #1
On 11/23/18 10:52 AM, Petr Štetiar wrote:
> Example usage:
> 
>  Define Device/apalis
>    ...
>    UBOOT_PATH := $$(STAGING_DIR_IMAGE)/$$(UBOOT)-u-boot.img
>    UBOOT_SPL_PATH := $$(STAGING_DIR_IMAGE)/$$(UBOOT)-SPL
>    ARTIFACTS := spl-uboot.bin
>    ARTIFACT/spl-uboot.bin := append-uboot-spl | pad-to 68k | append-uboot
>  endef
> 
> Signed-off-by: Petr Štetiar <ynezz@true.cz>

Where do you need this? Normally the U-Boot build process creates a
binary with the spl + u-boot.

Hauke

> ---
>  include/image-commands.mk | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/include/image-commands.mk b/include/image-commands.mk
> index 05d3609..c324bc2 100644
> --- a/include/image-commands.mk
> +++ b/include/image-commands.mk
> @@ -221,6 +221,10 @@ define Build/append-uboot
>  	dd if=$(UBOOT_PATH) >> $@
>  endef
>  
> +define Build/append-uboot-spl
> +	dd if=$(UBOOT_SPL_PATH) >> $@
> +endef
> +
>  define Build/pad-to
>  	dd if=$@ of=$@.new bs=$(1) conv=sync
>  	mv $@.new $@
>
Petr Štetiar Nov. 24, 2018, 5:07 p.m. UTC | #2
On November 24, 2018 1:06:45 PM UTC, Hauke Mehrtens <hauke@hauke-m.de> wrote:
>Where do you need this? 

WIP support for i.mx6 Toradex Apalis board https://github.com/ynezz/openwrt/commits/wip/imx6-apalis

> Normally the U-Boot build process creates a
>binary with the spl + u-boot.

Ok, I'll check it. Thanks.


-- ynezz
Petr Štetiar Nov. 26, 2018, 11:19 p.m. UTC | #3
Hauke Mehrtens <hauke@hauke-m.de> [2018-11-24 14:06:45]:

Hi,

> >    UBOOT_PATH := $$(STAGING_DIR_IMAGE)/$$(UBOOT)-u-boot.img
> >    UBOOT_SPL_PATH := $$(STAGING_DIR_IMAGE)/$$(UBOOT)-SPL
> >    ARTIFACTS := spl-uboot.bin
> >    ARTIFACT/spl-uboot.bin := append-uboot-spl | pad-to 68k | append-uboot
>
> Where do you need this? Normally the U-Boot build process creates a
> binary with the spl + u-boot.

thanks for the hint, I was able to get exactly same image from U-boot with
`make u-boot-with-spl.imx`. I've marked the patch in patchwork as `Not
Applicable`, hope it's enough.

-- ynezz
diff mbox series

Patch

diff --git a/include/image-commands.mk b/include/image-commands.mk
index 05d3609..c324bc2 100644
--- a/include/image-commands.mk
+++ b/include/image-commands.mk
@@ -221,6 +221,10 @@  define Build/append-uboot
 	dd if=$(UBOOT_PATH) >> $@
 endef
 
+define Build/append-uboot-spl
+	dd if=$(UBOOT_SPL_PATH) >> $@
+endef
+
 define Build/pad-to
 	dd if=$@ of=$@.new bs=$(1) conv=sync
 	mv $@.new $@