diff mbox series

[OpenWrt-Devel,OpenWrt-Devel,3/7] at91: Generate sdcard images for at91sam9x5ek boards.

Message ID 15eeaa33f9e573d2078fcdce24d3dd6514d2bb3d.1559063196.git.sandeep.sheriker@microchip.com
State Superseded
Delegated to: Hauke Mehrtens
Headers show
Series at91 patch series. | expand

Commit Message

Sandeep Sheriker M May 28, 2019, 5:21 p.m. UTC
From: Sandeep Sheriker Mallikarjun <sandeepsheriker.mallikarjun@microchip.com>

Signed-off-by: Sandeep Sheriker Mallikarjun <sandeepsheriker.mallikarjun@microchip.com>
Signed-off-by: Sandeep Sheriker M <sandeep.sheriker@microchip.com>
---
 target/linux/at91/image/Makefile | 8 +++++++-
 target/linux/at91/image/sam9x.mk | 5 +++++
 2 files changed, 12 insertions(+), 1 deletion(-)

Comments

Hauke Mehrtens May 30, 2019, 11:49 a.m. UTC | #1
On 5/28/19 7:21 PM, Sandeep Sheriker M wrote:
> From: Sandeep Sheriker Mallikarjun <sandeepsheriker.mallikarjun@microchip.com>
> 
> Signed-off-by: Sandeep Sheriker Mallikarjun <sandeepsheriker.mallikarjun@microchip.com>
> Signed-off-by: Sandeep Sheriker M <sandeep.sheriker@microchip.com>
> ---
>  target/linux/at91/image/Makefile | 8 +++++++-
>  target/linux/at91/image/sam9x.mk | 5 +++++
>  2 files changed, 12 insertions(+), 1 deletion(-)
> 
> diff --git a/target/linux/at91/image/Makefile b/target/linux/at91/image/Makefile
> index e4c17e3..5b1433c 100644
> --- a/target/linux/at91/image/Makefile
> +++ b/target/linux/at91/image/Makefile
> @@ -51,13 +51,19 @@ define Build/at91-sdcard
>       mcopy -i $@.boot $(DTS_DIR)/$(dts).dtb \
>          ::$(dts).dtb)
>  
> +  $(if $(findstring sama5,$(DEVICE_NAME)) , \
>    mcopy -i $@.boot \
>      $(BIN_DIR)/u-boot-$(DEVICE_NAME:at91-%=%)_mmc/u-boot.bin \
>      ::u-boot.bin
>  
>    mcopy -i $@.boot \
>      $(BIN_DIR)/at91bootstrap-$(DEVICE_NAME:at91-%=%)sd*/at91bootstrap.bin \
> -    ::BOOT.bin
> +    ::BOOT.bin ,
> +
> +  mcopy -i $@.boot $(BIN_DIR)/u-boot-*_mmc/u-boot.bin ::u-boot.bin
> +
> +  mcopy -i $@.boot \
> +    $(BIN_DIR)/at91bootstrap-*sd*/at91bootstrap.bin ::BOOT.bin)
>  

Wouldn't it be more maintainable to split the at91-sdcard build part
into multiple parts?

Is it save to use at91bootstrap-*sd*/ ? are you sure it will take the
correct file?


>    ./gen_at91_sdcard_img.sh \
>        $@.img \
Sandeep Sheriker M May 30, 2019, 3:33 p.m. UTC | #2
> -----Original Message-----
> From: Hauke Mehrtens <hauke@hauke-m.de>
> Sent: Thursday, May 30, 2019 4:50 AM
> To: Sandeep Sheriker Mallikarjun - C17018
> <Sandeep.Sheriker@microchip.com>; openwrt-devel@lists.openwrt.org
> Cc: Sandeep Sheriker Mallikarjun - C17018
> <Sandeep.Sheriker@microchip.com>
> Subject: Re: [OpenWrt-Devel] [OpenWrt-Devel, 3/7] at91: Generate sdcard
> images for at91sam9x5ek boards.
> 
> External E-Mail
> 
> 
> On 5/28/19 7:21 PM, Sandeep Sheriker M wrote:
> > From: Sandeep Sheriker Mallikarjun
> > <sandeepsheriker.mallikarjun@microchip.com>
> >
> > Signed-off-by: Sandeep Sheriker Mallikarjun
> > <sandeepsheriker.mallikarjun@microchip.com>
> > Signed-off-by: Sandeep Sheriker M <sandeep.sheriker@microchip.com>
> > ---
> >  target/linux/at91/image/Makefile | 8 +++++++-
> > target/linux/at91/image/sam9x.mk | 5 +++++
> >  2 files changed, 12 insertions(+), 1 deletion(-)
> >
> > diff --git a/target/linux/at91/image/Makefile
> > b/target/linux/at91/image/Makefile
> > index e4c17e3..5b1433c 100644
> > --- a/target/linux/at91/image/Makefile
> > +++ b/target/linux/at91/image/Makefile
> > @@ -51,13 +51,19 @@ define Build/at91-sdcard
> >       mcopy -i $@.boot $(DTS_DIR)/$(dts).dtb \
> >          ::$(dts).dtb)
> >
> > +  $(if $(findstring sama5,$(DEVICE_NAME)) , \
> >    mcopy -i $@.boot \
> >      $(BIN_DIR)/u-boot-$(DEVICE_NAME:at91-%=%)_mmc/u-boot.bin \
> >      ::u-boot.bin
> >
> >    mcopy -i $@.boot \
> >      $(BIN_DIR)/at91bootstrap-$(DEVICE_NAME:at91-
> %=%)sd*/at91bootstrap.bin \
> > -    ::BOOT.bin
> > +    ::BOOT.bin ,
> > +
> > +  mcopy -i $@.boot $(BIN_DIR)/u-boot-*_mmc/u-boot.bin ::u-boot.bin
> > +
> > +  mcopy -i $@.boot \
> > +    $(BIN_DIR)/at91bootstrap-*sd*/at91bootstrap.bin ::BOOT.bin)
> >
> 
> Wouldn't it be more maintainable to split the at91-sdcard build part into
> multiple parts?
> 
> Is it save to use at91bootstrap-*sd*/ ? are you sure it will take the correct
> file?
> 

Ignore this patch, will resend it by splitting them in to multiple parts.

> 
> >    ./gen_at91_sdcard_img.sh \
> >        $@.img \
diff mbox series

Patch

diff --git a/target/linux/at91/image/Makefile b/target/linux/at91/image/Makefile
index e4c17e3..5b1433c 100644
--- a/target/linux/at91/image/Makefile
+++ b/target/linux/at91/image/Makefile
@@ -51,13 +51,19 @@  define Build/at91-sdcard
      mcopy -i $@.boot $(DTS_DIR)/$(dts).dtb \
         ::$(dts).dtb)
 
+  $(if $(findstring sama5,$(DEVICE_NAME)) , \
   mcopy -i $@.boot \
     $(BIN_DIR)/u-boot-$(DEVICE_NAME:at91-%=%)_mmc/u-boot.bin \
     ::u-boot.bin
 
   mcopy -i $@.boot \
     $(BIN_DIR)/at91bootstrap-$(DEVICE_NAME:at91-%=%)sd*/at91bootstrap.bin \
-    ::BOOT.bin
+    ::BOOT.bin ,
+
+  mcopy -i $@.boot $(BIN_DIR)/u-boot-*_mmc/u-boot.bin ::u-boot.bin
+
+  mcopy -i $@.boot \
+    $(BIN_DIR)/at91bootstrap-*sd*/at91bootstrap.bin ::BOOT.bin)
 
   ./gen_at91_sdcard_img.sh \
       $@.img \
diff --git a/target/linux/at91/image/sam9x.mk b/target/linux/at91/image/sam9x.mk
index 3aada4c..561a8bf 100644
--- a/target/linux/at91/image/sam9x.mk
+++ b/target/linux/at91/image/sam9x.mk
@@ -14,6 +14,7 @@  TARGET_DEVICES += at91sam9263ek
 define Device/at91sam9g15ek
   $(Device/evaluation)
   DEVICE_TITLE := Atmel AT91SAM9G15-EK
+  $(Device/evaluation-sdimage)
 endef
 TARGET_DEVICES += at91sam9g15ek
 
@@ -32,12 +33,14 @@  TARGET_DEVICES += at91sam9g20ek_2mmc
 define Device/at91sam9g25ek
   $(Device/evaluation)
   DEVICE_TITLE := Atmel AT91SAM9G25-EK
+  $(Device/evaluation-sdimage)
 endef
 TARGET_DEVICES += at91sam9g25ek
 
 define Device/at91sam9g35ek
   $(Device/evaluation)
   DEVICE_TITLE := Atmel AT91SAM9G35-EK
+  $(Device/evaluation-sdimage)
 endef
 TARGET_DEVICES += at91sam9g35ek
 
@@ -50,12 +53,14 @@  TARGET_DEVICES += at91sam9m10g45ek
 define Device/at91sam9x25ek
   $(Device/evaluation)
   DEVICE_TITLE := Atmel AT91SAM9X25-EK
+  $(Device/evaluation-sdimage)
 endef
 TARGET_DEVICES += at91sam9x25ek
 
 define Device/at91sam9x35ek
   $(Device/evaluation)
   DEVICE_TITLE := Atmel AT91SAM9X35-EK
+  $(Device/evaluation-sdimage)
 endef
 TARGET_DEVICES += at91sam9x35ek