From: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
To: "Boulais, Marc-Andre" <maboulais@rheinmetall.ca>
Cc: "barebox@lists.infradead.org" <barebox@lists.infradead.org>
Subject: Re: saveenv & erase with bad blocks present
Date: Tue, 3 Feb 2015 20:52:12 +0100 [thread overview]
Message-ID: <20150203195212.GG10842@pengutronix.de> (raw)
In-Reply-To: <29A2697B0516A946B1023D5E798DFCF67BAB6E85@mail-ying>
Hello,
On Tue, Feb 03, 2015 at 04:38:42PM +0000, Boulais, Marc-Andre wrote:
> I have flashed Barebox-2015.02.0 on my omap4 setup (using the Barebox
> update command) and I am now trying to modify the environment from the
> Barebox prompt. I have modified the env/config file and I would like
> to save my changes to NAND.
>
> For this task, I call the "saveenv" command and I get this result:
>
> barebox@Phytec phyCORE-OMAP4460:/ saveenv
> saving environment
> saveenv: No space left on device
>
> The "devinfo" command indicates to me that the /dev/nand0.bareboxenv partition is 128 Kb.
> Just to be sure, I erase it and get the following error:
What is the block size of your nand device? If your partition only
consists of a single block and this one turns bad ...
> barebox@Phytec phyCORE-OMAP4460:/ erase /dev/nand0.bareboxenv.bb
> nand: nand_erase_nand: attempt to erase a bad block at page 0x00000140
> erase: I/O error
I'm not sure why this error is printed, maybe erase must not be given a
.bb partition?
> So I guess I am a bit confused here.
> 1) Is "saveenv" the right command to save my changes to the environment ?
Yes
> 2) How can I erase a NAND partition that has bad blocks ?
It should be transparent to the user. I'd expect that erase does the
right thing.
> 3) Can bad blocks be marked by software or are they all marked by the manufacturer ?
The initial set of bad blocks are (obviously) marked by the
manufacturer. I don't know if barebox automatically marks blocks as bad,
but Linux does for sure.
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | http://www.pengutronix.de/ |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2015-02-03 19:52 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-03 16:38 Boulais, Marc-Andre
2015-02-03 19:52 ` Uwe Kleine-König [this message]
2015-02-03 20:11 ` Sascha Hauer
2015-02-03 20:44 ` Boulais, Marc-Andre
2015-02-05 10:16 ` Sascha Hauer
2015-02-05 19:09 ` Boulais, Marc-Andre
2015-02-05 21:23 ` Sascha Hauer
2015-02-06 17:03 ` Boulais, Marc-Andre
2015-02-09 7:18 ` Sascha Hauer
2015-02-09 13:37 ` Boulais, Marc-Andre
2015-02-10 9:20 ` Sascha Hauer
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=20150203195212.GG10842@pengutronix.de \
--to=u.kleine-koenig@pengutronix.de \
--cc=barebox@lists.infradead.org \
--cc=maboulais@rheinmetall.ca \
/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