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

Re: [PATCH V3 4/6] Add SD-card image build support for hd-media builds on armhf



On Thu, Jan 01, 2015 at 11:20:26AM -0800, Vagrant Cascadian wrote:
> On 2015-01-01, Karsten Merker wrote:
> > +++ b/build/boot/README.concatenateable_images
> ...
> > +To create a complete image from the two parts on Linux systems, you can
> > +use zcat (for .gz images), bzcat (for .bz2 images) or xzcat (for .xz
> > +images) as follows:
> > +
> > +  zcat firmware.<board_name>.img.gz partition.img.gz > complete_image.img
> > +
> > +respectively
> > +
> > +  bzcat firmware.<board_name>.img.bz2 partition.img.bz2 > complete_image.img
> > +
> > +respectively
> > +
> > +  xzcat firmware.<board_name>.img.xz partition.img.xz > complete_image.img
> 
> I'm wondering if one example would be sufficiently explanatory? I'd
> suggest changing "as follows:" to "for example:" and removing the
> bzcat/xzcat examples.

I had been thinking about that too and decided to use the long
version for clarity regarding beginners.  If people generally
think we should use only the zcat example, I can change that, but
personally I think it is ok the way it is.

> > --- a/build/config/armhf/hd-media.cfg
> > +++ b/build/config/armhf/hd-media.cfg
> ...
> > +.PHONY: hd-media_images_full
> > +hd-media_images_full: $(KERNEL) $(INITRD) $(TEMP_DTBS) hd-media_bootscript
> > +	-rm -rf $(TEMP)/hd-media_images_full
> > +	mkdir $(TEMP)/hd-media_images_full
> ...
> > +.PHONY: hd-media_images_concatenateable
> > +hd-media_images_concatenateable: $(KERNEL) $(INITRD) $(TEMP_DTBS) hd-media_bootscript
> > +	-rm -rf $(TEMP)/hd-media_images_concatenateable
> > +	mkdir $(TEMP)/hd-media_images_concatenateable
> 
> The hd-media_images_full and hd-media_images_concatenateable targets are
> very similar.
> 
> Would it make sense to always build the concatenateable images, and then
> have the hd-media_images_full target generate it's images by simply
> concatenating the results of the hd-media_images_concatenateable target?
> 
> That would reduce some code duplication; are there any drawbacks or
> significant differences in the resulting images?

That would mean that the hd-media_images_full target would have
to remove the results of the hd-media_images_concatenateable
target at the end of the build which I consider bad style and it
would make it impossible to enable both targets for testing
purposes.

Another point why I made them independent from each other is that
we might in the future happen to build different things in both
targets - e.g. build all platforms that can be built with a
common filesystem as concatenateable images for space and
bandwidth reasons, and only build a few others which need a
device-specific filesystem setup as full images.

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: