No subject


Mon Dec 5 13:53:56 CET 2011


#define CONFIG_ENV_OFFSET       0x60000
#define CONFIG_ENV_SIZE         0x20000

root:/>  fw_printenv
Cannot read bad block mark: Invalid argument

root:/> strace fw_printenv
ioctl(0, SNDCTL_TMR_TIMEBASE or SNDRV_TIMER_IOCTL_NEXT_DEVICE or TCGETS,
{B57600 opost isig icanon echo ...}) =3D 0
ioctl(1, SNDCTL_TMR_TIMEBASE or SNDRV_TIMER_IOCTL_NEXT_DEVICE or TCGETS,
{B57600 opost isig icanon echo ...}) =3D 0
open("/etc/fw_env.config", O_RDONLY)    =3D 3
ioctl(3, SNDCTL_TMR_TIMEBASE or SNDRV_TIMER_IOCTL_NEXT_DEVICE or TCGETS,
0x2decca8) =3D -1 ENOTTY (Inappropriate ioctl for device)
mmap2(NULL, 4096, PROT_READ|PROT_WRITE,
MAP_SHARED|MAP_ANONYMOUS|0x4000000, 0, 0) =3D 0x203b000
read(3, "# Configuration file for fw_(pri"..., 256) =3D 256
read(3, "Flash sector size\tNumber of sect"..., 256) =3D 163
read(3, "", 256)                        =3D 0
close(3)                                =3D 0
stat("/dev/mtd0", {st_mode=3DS_IFCHR|0660, st_rdev=3Dmakedev(90, 0), =
...}) =3D
0
mmap2(NULL, 135168, PROT_READ|PROT_WRITE,
MAP_SHARED|MAP_ANONYMOUS|0x4000000, 0, 0) =3D 0x2e00000
open("/dev/mtd0", O_RDONLY)             =3D 3
ioctl(3, MEMGETINFO or MFB_SET_CHROMA_KEY, {type=3DMTD_NANDFLASH,
flags=3DMTD_WRITEABLE, size=3D0x80000, erasesize=3D0x20000, =
writesize=3D0x800,
oobsize=3D0x40, padding=3D0xffffffff}) =3D 0
ioctl(3, MEMGETBADBLOCK, [393216])      =3D 1
ioctl(3, MEMGETBADBLOCK, [524288])      =3D -1 EINVAL (Invalid argument)
write(2, "Cannot read bad block mark", 26Cannot read bad block mark) =3D
26
write(2, ": ", 2: )                       =3D 2
write(2, "Invalid argument", 16Invalid argument)        =3D 16
write(2, "\n", 1
)                       =3D 1
close(3)                                =3D 0
_exit(1)                                =3D ?
root:/>

I've been dealing with Mike Frysinger on the linux-mtd list and he
recommended that I shoot this up to you guys.
His comment was "your config though says you only have 1 block starting
at 0x60000 with a length of 0x20000.  so there's no reason it should be
testing 0x80000 -- after all, you only care about bytes 0x60000 -
0x7ffff."


I am hoping there is something that I am doing that is causing this.  I
would appreciate some info.

Thank you.




More information about the U-Boot mailing list