mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Bernhard Walle <bernhard@bwalle.de>
To: "Andreas Bießmann" <biessmann@corscience.de>
Cc: ptxdist@pengutronix.de
Subject: Re: [ptxdist] [PATCH 2/2] Allow creation of bootable SD card for OMAP CPUs
Date: Tue, 10 Apr 2012 14:49:01 +0200	[thread overview]
Message-ID: <20120410124901.GA19975@regiomontanus.bwalle.de> (raw)
In-Reply-To: <4F841A44.1020807@corscience.de>

Hi,

* Andreas Bießmann <biessmann@corscience.de> [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 <ptxdist@pengutronix.de>
> 
> 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 conditions
> > +# see the README file.
> > +#
> > +
> > +SEL_ROOTFS-$(PTXCONF_IMAGE_OMAPSD)		+= $(IMAGEDIR)/omap_sd.img
> > +
> > +# preprend the $(IMAGEDIR) if PTXCONF_IMAGE_OMAPSD_ADDITIONAL_BOOT_FILES is not
> > +# empty
> > +ifneq ($(PTXCONF_IMAGE_OMAPSD_ADDITIONAL_BOOT_FILES),"")
> > +PTXCONF_IMAGE_OMAPSD_ADDITIONAL_BOOT_FILES_FULL := \
> > +	$(addprefix $(IMAGEDIR)/, $(PTXCONF_IMAGE_OMAPSD_ADDITIONAL_BOOT_FILES))
> > +endif
> > +
> > +$(IMAGEDIR)/omap_sd.img: $(IMAGEDIR)/root.ext2
> > +	@ln -sf $(IMAGEDIR)/linuximage $(IMAGEDIR)/uImage
> 
> alternatively provide a Kconfig option for renaming $(IMAGEDIR)/linuximage?

I fear that breaks too much. 

> > +	@echo "Creating bootable SD card for OMAP";					\
> > +	PATH=$(PTXCONF_SYSROOT_HOST)/bin:$$PATH $(PTXDIST_TOPDIR)/scripts/genomapsdimg	\
> > +		 -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=$(parted "${OUTPUT}" unit B print 2>/dev/null|grep "^ 1"|awk '{print $2}')
> > +	local vatsize=$(LANG=C 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

  reply	other threads:[~2012-04-10 12:49 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-26 12:01 [ptxdist] [PATCH 1/2] Add host-parted Bernhard Walle
2012-03-26 12:01 ` [ptxdist] [PATCH 2/2] Allow creation of bootable SD card for OMAP CPUs Bernhard Walle
2012-04-10 11:32   ` Andreas Bießmann
2012-04-10 12:49     ` Bernhard Walle [this message]
2012-04-10 12:01   ` Andreas Bießmann
2012-04-10 12:54     ` Bernhard Walle
2012-04-10 15:03       ` [ptxdist] [PATCH v2 1/2] Add host-parted Bernhard Walle
2012-04-10 15:03         ` [ptxdist] [PATCH v2 2/2] Allow creation of bootable SD card for OMAP CPUs Bernhard Walle
2012-04-10 15:25           ` Bernhard Walle
2012-04-10 15:26       ` [ptxdist] [PATCH v3 1/2] Add host-parted Bernhard Walle
2012-04-10 15:26         ` [ptxdist] [PATCH v3 2/2] Allow creation of bootable SD card for OMAP CPUs Bernhard Walle
2012-03-27 14:22 ` [ptxdist] [PATCH 1/2] Add host-parted Michael Olbrich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120410124901.GA19975@regiomontanus.bwalle.de \
    --to=bernhard@bwalle.de \
    --cc=biessmann@corscience.de \
    --cc=ptxdist@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox