saveenv & erase with bad blocks present
Boulais, Marc-Andre
maboulais at rheinmetall.ca
Tue Feb 3 12:44:55 PST 2015
Ok, here's the info:
1. My config: arch/arm/configs/phytec-phycore-omap4460_defconfig
2. Output of "ls -l dev/nand0*"
barebox at Phytec phyCORE-OMAP4460:/ ls -l dev/nand0*
crw------- 1064566784 dev/nand0.root.bb
crw------- 1064566784 dev/nand0.root
crw------- 4194304 dev/nand0.splash.bb
crw------- 4194304 dev/nand0.splash
crw------- 4194304 dev/nand0.kernel.bb
crw------- 4194304 dev/nand0.kernel
crw------- 0 dev/nand0.bareboxenv.bb
crw------- 131072 dev/nand0.bareboxenv
crw------- 524288 dev/nand0.barebox.bb
crw------- 524288 dev/nand0.barebox
crw------- 131072 dev/nand0.xload.bb
crw------- 131072 dev/nand0.xload
crw------- 1073610752 dev/nand0.bb
crw------- 1073741824 dev/nand0
3. Barebox startup (MLO from Phytec + Barebox 2015.2.0):
barebox 2012.10.0 #3 Wed Feb 27 19:58:34 EST 2013
Board: Phytec phyCORE pcm049
omap-hsmmc at mci0: registered as mci0
probe buswidth
NAND device: Manufacturer ID: 0x2c, Chip ID: 0xb3 ( ), page size: 2048, OOB size: 64
Malloc space: 0x84000000 -> 0x85ffffff (size 32 MB)
Stack space : 0x8f000000 -> 0x8f008000 (size 32 kB)
booting from NAND
barebox 2015.02.0 #1 Tue Feb 3 15:32:15 EST 2015
Board: Phytec phyCORE-OMAP4460
i2c-omap i2c-omap40: bus 0 rev0.11 at 100 kHz
omap-hsmmc omap4-hsmmc0: registered as omap4-hsmmc0
mci0: detected SD card version 2.0
mci0: registered disk0
smc911x smc911x0: LAN911x identified, idrev: 0x92210000, generation: 4
mdio_bus: miibus0: probed
eth0: got preset MAC address: 50:2d:f4:05:65:82
nand: ONFI param page 0 valid
nand: ONFI flash detected
nand: NAND device: Manufacturer ID: 0x2c, Chip ID: 0xb3 (Micron MT29F8G16ADBDAH4), 1024MiB, page size: 2048, OOB size: 64
omap_fb omap_fb: HW-Revision 0x0040 0x0040
omap_fb omap_fb: registered
malloc space: 0x8d000000 -> 0x8effffff (size 32 MiB)
read: Directory not empty
running /env/bin/init...
BCH decoding failed
BCH decoding failed
BCH decoding failed
BCH decoding failed
BCH decoding failed
BCH decoding failed
BCH decoding failed
BCH decoding failed
BCH decoding failed
BCH decoding failed
BCH decoding failed
BCH decoding failed
BCH decoding failed
BCH decoding failed
BCH decoding failed
BCH decoding failed
BCH decoding failed
BCH decoding failed
BCH decoding failed
BCH decoding failed
BCH decoding failed
BCH decoding failed
BCH decoding failed
BCH decoding failed
BCH decoding failed
BCH decoding failed
BCH decoding failed
BCH decoding failed
BCH decoding failed
BCH decoding failed
BCH decoding failed
BCH decoding failed
BCH decoding failed
BCH decoding failed
BCH decoding failed
BCH decoding failed
BCH decoding failed
BCH decoding failed
BCH decoding failed
BCH decoding failed
BCH decoding failed
BCH decoding failed
BCH decoding failed
BCH decoding failed
BCH decoding failed
BCH decoding failed
BCH decoding failed
BCH decoding failed
BCH decoding failed
BCH decoding failed
BCH decoding failed
BCH decoding failed
BCH decoding failed
BCH decoding failed
BCH decoding failed
BCH decoding failed
BCH decoding failed
BCH decoding failed
BCH decoding failed
BCH decoding failed
BCH decoding failed
unable to read /dev/nand0.splash.bb
splash: Out of memory
Hit any key to stop autoboot: 0
booting kernel from /dev/nand0.kernel.bb
/dev/nand0.kernel.bb: No such file or directory
Unknown OS filetype (try -f)
handler failed with: Invalid argument
-----Original Message-----
From: Sascha Hauer [mailto:s.hauer at pengutronix.de]
Sent: February-03-15 3:12 PM
To: Boulais, Marc-Andre
Cc: barebox at lists.infradead.org
Subject: Re: saveenv & erase with bad blocks present
On Tue, Feb 03, 2015 at 04:38:42PM +0000, Boulais, Marc-Andre wrote:
> Hi,
> 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 at 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:
>
> barebox at 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
>
> 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 ?
when erasing a .bb device (which you did above) should let barebox just skip the bad blocks.
> 3) Can bad blocks be marked by software or are they all marked by the manufacturer ?
You can mark blocks as bad using the 'nand' command.
barebox tries to erase a bad block at page 0x140 which is 0x140 * 2048 = 0xa0000. In the device trees I see the environment partition starts at 0x100000. Could you tell me which config you built, post the startup messages from barebox and the output of 'ls -l dev/nand0*'?
Sascha
--
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 |
-------------- next part --------------
A non-text attachment was scrubbed...
Name: phytec-phycore-omap4460_defconfig
Type: application/octet-stream
Size: 1771 bytes
Desc: phytec-phycore-omap4460_defconfig
URL: <http://lists.infradead.org/pipermail/barebox/attachments/20150203/d62ded51/attachment.obj>
More information about the barebox
mailing list