mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Jan Weitzel <j.weitzel@phytec.de>
Cc: barebox@lists.infradead.org
Subject: Re: [RFC] update: Add eccmode switching for different types
Date: Thu, 23 Jun 2011 10:04:05 +0200	[thread overview]
Message-ID: <20110623080405.GU6069@pengutronix.de> (raw)
In-Reply-To: <1308735715-8758-1-git-send-email-j.weitzel@phytec.de>

Hi Jan,

On Wed, Jun 22, 2011 at 11:41:55AM +0200, Jan Weitzel wrote:
> to use update on nand with different eccmodes for the nand partitions
> we need to set the eccmode before updating.
> Adding eccdev and eccmode to enviroment to use.
> eccdev example: gpmc_nand0
> eccmode for the different types:
> root_eccmode
> barebox_eccmode
> bareboxenv_eccmode
> xload_eccmode

I do not have a good idea how to solve this, but this is a generic
script and putting omap specific stuff in it is not a good idea.

Sascha

> 
> Signed-off-by: Jan Weitzel <j.weitzel@phytec.de>
> ---
>  defaultenv/bin/update |    8 ++++++++
>  1 files changed, 8 insertions(+), 0 deletions(-)
> 
> diff --git a/defaultenv/bin/update b/defaultenv/bin/update
> index 55ac10b..7473611 100644
> --- a/defaultenv/bin/update
> +++ b/defaultenv/bin/update
> @@ -27,21 +27,26 @@ done
>  
>  if [ x${type} = xkernel ]; then
>  	image=$kernelimage
> +	eccmode=${kernel_eccmode}
>  elif [ x${type} = xrootfs ]; then
>  	image=$rootfsimage
>  	type=root
> +	eccmode=${root_eccmode}
>  elif [ x${type} = xbarebox ]; then
>  	image=$bareboximage
>  	if [ x${image} = x ]; then
>  		image=barebox.bin
>  	fi
> +	eccmode=${barebox_eccmode}
>  elif [ x${type} = xbareboxenv ]; then
>  	image=$bareboxenvimage
>  	if [ x${image} = x ]; then
>  		image=bareboxenv.bin
>  	fi
> +	eccmode=${bareboxenv_eccmode}
>  elif [ x${type} = xxload ]; then
>  	image=$xloadimage
> +	eccmode=${xload_eccmode}
>  else
>  	. /env/bin/_update_help
>  	exit 1
> @@ -53,6 +58,9 @@ fi
>  
>  if [ x${device_type} = xnand ]; then
>  	part=/dev/nand0.${type}.bb
> +	if [ x${eccmode} != x ] && [ x${eccdev} != x ]; then
> +		${eccdev}.eccmode=${eccmode}
> +	fi
>  elif [ x${device_type} = xnor ]; then
>  	part=/dev/nor0.${type}
>  else
> -- 
> 1.7.0.4
> 
> 
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
> 

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

      reply	other threads:[~2011-06-23  8:04 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-22  9:41 Jan Weitzel
2011-06-23  8:04 ` Sascha Hauer [this message]

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=20110623080405.GU6069@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=j.weitzel@phytec.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