From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from smtprelay03.ispgateway.de ([80.67.29.7]) by metis.ext.pengutronix.de with esmtp (Exim 4.72) (envelope-from ) id 1SHaVM-0002pR-2r for ptxdist@pengutronix.de; Tue, 10 Apr 2012 14:49:05 +0200 Date: Tue, 10 Apr 2012 14:49:01 +0200 From: Bernhard Walle Message-ID: <20120410124901.GA19975@regiomontanus.bwalle.de> References: <1332763274-17969-1-git-send-email-bernhard@bwalle.de> <1332763274-17969-2-git-send-email-bernhard@bwalle.de> <4F841A44.1020807@corscience.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <4F841A44.1020807@corscience.de> Subject: Re: [ptxdist] [PATCH 2/2] Allow creation of bootable SD card for OMAP CPUs Reply-To: ptxdist@pengutronix.de List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Sender: ptxdist-bounces@pengutronix.de Errors-To: ptxdist-bounces@pengutronix.de To: Andreas =?iso-8859-1?Q?Bie=DFmann?= Cc: ptxdist@pengutronix.de Hi, * Andreas Bie=DFmann [2012-04-10 13:32]: > = > can we make the second ext3 filesystem optional? > Anyway, it could be done in a second step. Would be great to get this > tool into 2012.05! I would like to get that mainline first and add additional features, if needed, later. > > +# -*-makefile-*- > > +# > > +# Copyright (C) 2012 by the ptxdist project > = > your copyright? Honestly, I don't care. But I changed it now to be consistent. > > +# > > +# See CREDITS for details about who has contributed to this project. > > +# > > +# For further information about the PTXdist project and license condit= ions > > +# see the README file. > > +# > > + > > +SEL_ROOTFS-$(PTXCONF_IMAGE_OMAPSD) +=3D $(IMAGEDIR)/omap_sd.img > > + > > +# preprend the $(IMAGEDIR) if PTXCONF_IMAGE_OMAPSD_ADDITIONAL_BOOT_FIL= ES is not > > +# empty > > +ifneq ($(PTXCONF_IMAGE_OMAPSD_ADDITIONAL_BOOT_FILES),"") > > +PTXCONF_IMAGE_OMAPSD_ADDITIONAL_BOOT_FILES_FULL :=3D \ > > + $(addprefix $(IMAGEDIR)/, $(PTXCONF_IMAGE_OMAPSD_ADDITIONAL_BOOT_FILE= S)) > > +endif > > + > > +$(IMAGEDIR)/omap_sd.img: $(IMAGEDIR)/root.ext2 > > + @ln -sf $(IMAGEDIR)/linuximage $(IMAGEDIR)/uImage > = > alternatively provide a Kconfig option for renaming $(IMAGEDIR)/linuximag= e? I fear that breaks too much. = > > + @echo "Creating bootable SD card for OMAP"; \ > > + PATH=3D$(PTXCONF_SYSROOT_HOST)/bin:$$PATH $(PTXDIST_TOPDIR)/scripts/g= enomapsdimg \ > > + -m $(IMAGEDIR)/MLO \ > > + -b $(IMAGEDIR)/u-boot.img \ > = > use IMAGE_OMAPSD_BOOTLOADER variable here! Indeed. > > + -k $(IMAGEDIR)/uImage \ > > + -f $(IMAGEDIR)/root.ext2 \ > > + -a "$(PTXCONF_IMAGE_OMAPSD_ADDITIONAL_BOOT_FILES_FULL)" \ > > + -o $@ > = > cleanup $(IMAGEDIR)/uImage? Done. > > index 0000000..9c87e45 > > --- /dev/null > > +++ b/scripts/genomapsdimg > > @@ -0,0 +1,160 @@ > > +#!/bin/bash > = > copyright? Added. > catch possible error (in some tests I didn't had sfdisk in $PATH; took > some time to find this out ;). The script was not designed to get executed standalone. But well, I removed the 'set -e' and added some error messages. Please check. > > +create_filesystem() > > +{ > > + local vatstart=3D$(parted "${OUTPUT}" unit B print 2>/dev/null|grep "= ^ 1"|awk '{print $2}') > > + local vatsize=3D$(LANG=3DC fdisk -l "${OUTPUT}" 2>/dev/null|grep W95 = |awk '{print $5}') > > + > > + mkdosfs -F 32 -C "${OUTPUT_FAT}" "${vatsize}" >/dev/null 2>&1 > = > catch error on tool missing? It is not missing, it would have no effect because I added 'set -e'. The script aborts and has no chance to output an error. But as I mentioned above, I removed 'set -e' and added an error message here and at some more places. Regards, Bernhard -- = ptxdist mailing list ptxdist@pengutronix.de