[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Add generic armhf SD card image



On Sat, Jul 30, 2016 at 05:43:26PM -0700, Martin Michlmayr wrote:
> Karsten, do you have any objections to this patch?
> 
> This adds a generic SD card image for armhf.  It consists of the kernel,
> installer, DTBs and boot script but no u-boot.  This can be used to
> easily populate SD card images on devices for which we don't provide
> u-boot images.
> ---
>  build/config/armhf/netboot.cfg | 1 +
>  debian/changelog               | 1 +
>  2 files changed, 2 insertions(+)
> 
> diff --git a/build/config/armhf/netboot.cfg b/build/config/armhf/netboot.cfg
> index 5da8d92..febce02 100644
> --- a/build/config/armhf/netboot.cfg
> +++ b/build/config/armhf/netboot.cfg
> @@ -53,4 +53,5 @@ netboot_images_concatenateable: $(KERNEL) $(INITRD) $(TEMP_DTBS) netboot_bootscr
>  	  fi ;\
>  	done < boot/arm/u-boot-image-config
>  	gen-hd-image -v -z -b partition -s "$(FLOPPY_SIZE)" -i "$(TEMP)/netboot_images_concatenateable" -o "$(SOME_DEST)/$(EXTRANAME)/SD-card-images/$(CONCATENATEABLE_SUFFIX)/partition.img"
> +	gen-hd-image -v -z -b complete -s "$(FLOPPY_SIZE)" -i "$(TEMP)/netboot_images_concatenateable" -o "$(SOME_DEST)/$(EXTRANAME)/SD-card-images/$(CONCATENATEABLE_SUFFIX)/generic.img"
>  	cp boot/README.concatenateable_images "$(SOME_DEST)/$(EXTRANAME)/SD-card-images/$(CONCATENATEABLE_SUFFIX)/"
> diff --git a/debian/changelog b/debian/changelog
> index c8d9f5a..9eb1f0d 100644
> --- a/debian/changelog
> +++ b/debian/changelog
> @@ -10,6 +10,7 @@ debian-installer (20160704) UNRELEASED; urgency=medium
>      - Split orion5x into orion5x and orion5x-qnap.  This is based on
>        work done by Roger Shimizu.
>      - Exclude the text frontend.
> +  * Add generic armhf SD card image.
>  
>    [ Adam Conrad ]
>    * build/Makefile: Don't strip modules; this removes sigs (LP: #1604441)

Hello Martin,

I have no objections against the idea of providing a "generic" SD
card image, but I would prefer to achieve that by just generating
a "firmware.none.img.gz" that can be concatenated together with
the partition image like we do it for the "real" firmware images. 
With this method, the space and bandwidth impact would be
absolutely minimal (addition of 1kB for "firmware.none.img.gz"
instead of ~25MB for a full disk "generic.img"). The following
patch adds that functionality:

diff --git a/build/config/armhf/netboot.cfg b/build/config/armhf/netboot.cfg
index 5da8d92..1e898a6 100644
--- a/build/config/armhf/netboot.cfg
+++ b/build/config/armhf/netboot.cfg
@@ -52,5 +52,6 @@ netboot_images_concatenateable: $(KERNEL) $(INITRD) $(TEMP_DTBS) netboot_bootscr
 	    gen-hd-image -v -z -b firmware -s "$(FLOPPY_SIZE)" -o "$(SOME_DEST)/$(EXTRANAME)/SD-card-images/$(CONCATENATEABLE_SUFFIX)/firmware.$${1}.img" "$$2" "$$3" "$$4" "$$5" ;\
 	  fi ;\
 	done < boot/arm/u-boot-image-config
+	gen-hd-image -v -z -b firmware -s "$(FLOPPY_SIZE)" -o "$(SOME_DEST)/$(EXTRANAME)/SD-card-images/$(CONCATENATEABLE_SUFFIX)/firmware.none.img"
 	gen-hd-image -v -z -b partition -s "$(FLOPPY_SIZE)" -i "$(TEMP)/netboot_images_concatenateable" -o "$(SOME_DEST)/$(EXTRANAME)/SD-card-images/$(CONCATENATEABLE_SUFFIX)/partition.img"
 	cp boot/README.concatenateable_images "$(SOME_DEST)/$(EXTRANAME)/SD-card-images/$(CONCATENATEABLE_SUFFIX)/"

Would that be ok for you? I would also add a short explanation to
the "README.concatenateable_images" if we do it this way.

Regards,
Karsten
-- 
Gem. Par. 28 Abs. 4 Bundesdatenschutzgesetz widerspreche ich der Nutzung
sowie der Weitergabe meiner personenbezogenen Daten für Zwecke der
Werbung sowie der Markt- oder Meinungsforschung.


Reply to: