From: "Boulais, Marc-Andre" <maboulais@rheinmetall.ca>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: "barebox@lists.infradead.org" <barebox@lists.infradead.org>
Subject: RE: saveenv & erase with bad blocks present
Date: Tue, 3 Feb 2015 20:44:55 +0000 [thread overview]
Message-ID: <29A2697B0516A946B1023D5E798DFCF67BAB6F45@mail-ying> (raw)
In-Reply-To: <20150203201134.GQ12209@pengutronix.de>
[-- Attachment #1: Type: text/plain, Size: 5538 bytes --]
Ok, here's the info:
1. My config: arch/arm/configs/phytec-phycore-omap4460_defconfig
2. Output of "ls -l dev/nand0*"
barebox@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@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@pengutronix.de]
Sent: February-03-15 3:12 PM
To: Boulais, Marc-Andre
Cc: barebox@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@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@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 |
[-- Attachment #2: phytec-phycore-omap4460_defconfig --]
[-- Type: application/octet-stream, Size: 1771 bytes --]
CONFIG_ARCH_OMAP=y
CONFIG_BAREBOX_MAX_IMAGE_SIZE=0x80000
CONFIG_ARCH_OMAP4=y
CONFIG_MACH_PCM049=y
CONFIG_AEABI=y
CONFIG_ARM_UNWIND=y
CONFIG_MMU=y
CONFIG_TEXT_BASE=0x8f000000
CONFIG_MALLOC_SIZE=0x2000000
CONFIG_KALLSYMS=y
CONFIG_PROMPT="barebox> "
CONFIG_LONGHELP=y
CONFIG_GLOB=y
CONFIG_HUSH_FANCY_PROMPT=y
CONFIG_CMDLINE_EDITING=y
CONFIG_AUTO_COMPLETE=y
# CONFIG_TIMESTAMP is not set
CONFIG_DEFAULT_ENVIRONMENT_GENERIC=y
CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/arm/boards/phytec-phycore-omap4460/env"
CONFIG_BAREBOXENV_TARGET=y
CONFIG_BAREBOXCRC32_TARGET=y
CONFIG_CMD_EDIT=y
CONFIG_CMD_SLEEP=y
CONFIG_CMD_SAVEENV=y
CONFIG_CMD_EXPORT=y
CONFIG_CMD_PRINTENV=y
CONFIG_CMD_READLINE=y
CONFIG_CMD_TIME=y
CONFIG_CMD_AUTOMOUNT=y
CONFIG_CMD_TFTP=y
CONFIG_CMD_ECHO_E=y
CONFIG_CMD_LOADB=y
CONFIG_CMD_IOMEM=y
CONFIG_CMD_FLASH=y
CONFIG_CMD_BOOTM_SHOW_TYPE=y
CONFIG_CMD_BOOTM_VERBOSE=y
CONFIG_CMD_BOOTM_INITRD=y
CONFIG_CMD_BOOTM_OFTREE=y
CONFIG_CMD_BOOTM_OFTREE_UIMAGE=y
CONFIG_CMD_UIMAGE=y
# CONFIG_CMD_BOOTU is not set
CONFIG_CMD_RESET=y
CONFIG_CMD_GO=y
CONFIG_CMD_SPLASH=y
CONFIG_CMD_TIMEOUT=y
CONFIG_CMD_PARTITION=y
CONFIG_CMD_MAGICVAR=y
CONFIG_CMD_MAGICVAR_HELP=y
CONFIG_CMD_GPIO=y
CONFIG_CMD_I2C=y
CONFIG_NET=y
CONFIG_CMD_DHCP=y
CONFIG_NET_NFS=y
CONFIG_CMD_PING=y
CONFIG_DRIVER_SERIAL_NS16550=y
CONFIG_DRIVER_SERIAL_NS16550_OMAP_EXTENSIONS=y
CONFIG_SMSC_PHY=y
CONFIG_DRIVER_NET_SMC911X=y
# CONFIG_SPI is not set
CONFIG_I2C=y
CONFIG_I2C_OMAP=y
CONFIG_MTD=y
CONFIG_NAND=y
CONFIG_NAND_OMAP_GPMC=y
CONFIG_UBI=y
CONFIG_USB_HOST=y
CONFIG_VIDEO=y
CONFIG_DRIVER_VIDEO_OMAP=y
CONFIG_IMAGE_RENDERER=y
CONFIG_BMP=y
CONFIG_MCI=y
CONFIG_MCI_STARTUP=y
CONFIG_MCI_OMAP_HSMMC=y
CONFIG_MFD_TWL6030=y
CONFIG_FS_TFTP=y
CONFIG_FS_FAT=y
CONFIG_FS_FAT_WRITE=y
CONFIG_FS_FAT_LFN=y
CONFIG_LZO_DECOMPRESS=y
[-- Attachment #3: Type: text/plain, Size: 149 bytes --]
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2015-02-03 20:45 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
2015-02-03 20:11 ` Sascha Hauer
2015-02-03 20:44 ` Boulais, Marc-Andre [this message]
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=29A2697B0516A946B1023D5E798DFCF67BAB6F45@mail-ying \
--to=maboulais@rheinmetall.ca \
--cc=barebox@lists.infradead.org \
--cc=s.hauer@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