|
|
 |
« on: November 02, 2009, 06:08:33 PM » |
|
So I spent another day smashing my head against why I can't get the RFS working on an SD card...
As you can see, I'm using the latest version of u-boot:
Marvell>> ver U-Boot 1.1.4 (Sep 14 2009 - 15:36:37) Marvell version: 3.4.19
Here's what happens:
0. Resetenv to get back to a default set of environment variables. 1. Modify bootargs_root, bootargs, and bootcmd. I have done it dozens of times but don't know the exact sequence of commands. 2. Printenv to make sure everything is correct (including the console parameter which I didn't touch): console=ttyS0,115200 mtdparts=nand_mtd:0xc0000@0(uboot)ro,0x1ff00000@0x100000(root) 3. Saveenv to commit my changes. 4. Reset (power cycle) the target. 5. Printenv. Environment is corrupt. Specifically: console=a0000 e=ttyS0,115200 mtdparts=nand_mtd:0xc0000@0(uboot)ro,0x1ff00000@0x100000(root)
------
The "console" variable has been overwritten with a0000 and a new environment variable "e" has appeared with the value "console" used to have.
In addition, just for fun, you can't fix the corrupt console value. The corruption seems to get worse as you try. The only recourse is resetenv and start over.
Has anyone seen this? Is there a fix? Clue: The base address of the environment section is 0xa0000.
|
|
|
|
|
Logged
|
|
|
|
|
rooster
Administrator
Sr. Member
   
Karma: 8
Posts: 311
|
 |
« Reply #1 on: November 03, 2009, 07:17:53 AM » |
|
It seems there is a bug in this uboot version, the only workaround would be to configure the bootcmd on every reset and not save it.
|
|
|
|
|
Logged
|
|
|
|
|
|
|
 |
« Reply #2 on: November 03, 2009, 01:27:00 PM » |
|
This issue is trivially reproducible on my system. If anyone is interested in the details, let me know.
|
|
|
|
|
Logged
|
|
|
|
|
leadog
Newbie
Karma: 1
Posts: 6
|
 |
« Reply #3 on: November 03, 2009, 04:41:13 PM » |
|
Can you log to a file all of the output from your plug? Starting with a reset and then resetenv and the reproduction of the corrupted env? Basically capturing everything from the start with a clean set of env up through the corrupted set? I'll try and see how my plug reacts with the same sequence of events....
|
|
|
|
|
Logged
|
|
|
|
|
|
|
 |
« Reply #4 on: November 03, 2009, 06:02:33 PM » |
|
Leadog, thank you very much for being interested in this problem. I am losing my sense of humor having spent the last 4 days trying to get my target to support the RFS on SD card so a little help right now goes a long way. Let me know if I didn't capture everything you need. It's a little hard to read but I did a printenv to show the uncorrupted "console" and then another printenv to show the corrupted one.
---------------------
Marvell>> resetenv Erase Env parameters offset 0xa0000... done Warning: Default Environment Variables will take effect Only after RESET
Marvell>> reset þ __ __ _ _ | \/ | __ _ _ ____ _____| | | | |\/| |/ _` | '__\ \ / / _ \ | | | | | | (_| | | \ V / __/ | | |_| |_|\__,_|_| \_/ \___|_|_| _ _ ____ _ | | | | | __ ) ___ ___ | |_ | | | |___| _ \ / _ \ / _ \| __| | |_| |___| |_) | (_) | (_) | |_ \___/ |____/ \___/ \___/ \__| ** MARVELL BOARD: SHEEVA PLUG LE
U-Boot 1.1.4 (Sep 14 2009 - 15:36:37) Marvell version: 3.4.19
U-Boot code: 00600000 -> 0067FFF0 BSS: -> 006CFB00
Soc: 88F6281 A0 (DDR2) CPU running @ 1200Mhz L2 running @ 400Mhz SysClock = 400Mhz , TClock = 200Mhz
DRAM CAS Latency = 5 tRP = 5 tRAS = 18 tRCD=6 DRAM CS[0] base 0x00000000 size 256MB DRAM CS[1] base 0x10000000 size 256MB DRAM Total size 512MB 16bit width Addresses 8M - 0M are saved for the U-Boot usage. Mem malloc Initialization (8M - 7M): Done NAND:512 MB *** Warning - bad CRC or NAND, using default environment
Flash: 0 kB
CPU : Marvell Feroceon (Rev 1)
Streaming disabled Write allocate disabled
USB 0: host mode PEX 0: interface detected no Link. Net: egiga0 [PRIME], egiga1 Hit any key to stop autoboot: 0 Marvell>> printenv baudrate=115200 loads_echo=0 ipaddr=10.4.50.165 serverip=10.4.50.5 rootpath=/mnt/ARM_FS/ netmask=255.255.255.0 run_diag=yes stdin=serial stdout=serial stderr=serial console=console=ttyS0,115200 mtdparts=nand_mtd:0xc0000@0(uboot)ro,0x1ff00000@0x1 00000(root) mainlineLinux=no CASset=min enaMonExt=no enaCpuStream=no enaWrAllo=no pexMode=RC disL2Cache=no setL2CacheWT=yes disL2Prefetch=yes enaICPref=yes enaDCPref=yes sata_dma_mode=yes MALLOC_len=1 ethprime=egiga0 netbsd_en=no vxworks_en=no bootargs_root=root=/dev/nfs rw bootargs_end=:::DB88FXX81:eth0:none image_name=uImage bootcmd=tftpboot 0x2000000 $(image_name); setenv bootargs $(console) $(bootargs_ root) nfsroot=$(serverip):$(rootpath) ip=$(ipaddr):$(serverip)$(bootargs_end) $( mvNetConfig) $(mvPhoneConfig); bootm 0x2000000; standalone=fsload 0x2000000 $(image_name);setenv bootargs $(console) root=/dev/m tdblock0 rw ip=$(ipaddr):$(serverip)$(bootargs_end) $(mvPhoneConfig); bootm 0x20 00000; bootdelay=3 disaMvPnp=no ethaddr=00:50:43:92:25:34 ethmtu=1500 mvPhoneConfig=mv_phone_config=dev0:fxs,dev1:fxs mvNetConfig=mv_net_config=(00:11:88:0f:62:81,0:1:2:3),mtu=1500 usb0Mode=host yuk_ethaddr=00:00:00:EE:51:81 nandEcc=1bit netretry=no rcvrip=169.254.100.100 loadaddr=0x02000000 autoload=no enaAutoRecovery=yes pcieTune=no ethact=egiga0
Environment size: 1295/131068 bytes Marvell>> setenv bootargs 'console=ttyS0,115200 root=/dev/mmcblk0p1 rw' Marvell>> setenv bootargs_root 'root=/dev/mmcblk0p1 rw' Marvell>> setenv bootcmd 'mmcinit; nand read.e 0x00800000 0x00100000 0x00400000; bootm 0x00800000' Marvell>> saveenv Saving Environment to NAND... Erasing Nand...Writing to Nand... done Marvell>> reset þ __ __ _ _ | \/ | __ _ _ ____ _____| | | | |\/| |/ _` | '__\ \ / / _ \ | | | | | | (_| | | \ V / __/ | | |_| |_|\__,_|_| \_/ \___|_|_| _ _ ____ _ | | | | | __ ) ___ ___ | |_ | | | |___| _ \ / _ \ / _ \| __| | |_| |___| |_) | (_) | (_) | |_ \___/ |____/ \___/ \___/ \__| ** MARVELL BOARD: SHEEVA PLUG LE
U-Boot 1.1.4 (Sep 14 2009 - 15:36:37) Marvell version: 3.4.19
U-Boot code: 00600000 -> 0067FFF0 BSS: -> 006CFB00
Soc: 88F6281 A0 (DDR2) CPU running @ 1200Mhz L2 running @ 400Mhz SysClock = 400Mhz , TClock = 200Mhz
DRAM CAS Latency = 5 tRP = 5 tRAS = 18 tRCD=6 DRAM CS[0] base 0x00000000 size 256MB DRAM CS[1] base 0x10000000 size 256MB DRAM Total size 512MB 16bit width Addresses 8M - 0M are saved for the U-Boot usage. Mem malloc Initialization (8M - 7M): Done NAND:512 MB Flash: 0 kB
CPU : Marvell Feroceon (Rev 1)
Streaming disabled Write allocate disabled
USB 0: host mode PEX 0: interface detected no Link. Net: egiga0 [PRIME], egiga1 Hit any key to stop autoboot: 0 Marvell>> printenv baudrate=115200 loads_echo=0 ipaddr=10.4.50.165 serverip=10.4.50.5 rootpath=/mnt/ARM_FS/ netmask=255.255.255.0 run_diag=yes console=a0000 e=ttyS0,115200 mtdparts=nand_mtd:0xc0000@0(uboot)ro,0x1ff00000@0x100000(root) CASset=min MALLOC_len=1 ethprime=egiga0 bootargs_end=:::DB88FXX81:eth0:none image_name=uImage standalone=fsload 0x2000000 $(image_name);setenv bootargs $(console) root=/dev/m tdblock0 rw ip=$(ipaddr):$(serverip)$(bootargs_end) $(mvPhoneConfig); bootm 0x20 00000; ethaddr=00:50:43:92:25:34 ethmtu=1500 mvPhoneConfig=mv_phone_config=dev0:fxs,dev1:fxs mvNetConfig=mv_net_config=(00:11:88:0f:62:81,0:1:2:3),mtu=1500 usb0Mode=host yuk_ethaddr=00:00:00:EE:51:81 nandEcc=1bit netretry=no rcvrip=169.254.100.100 loadaddr=0x02000000 autoload=no ethact=egiga0 bootargs=console=ttyS0,115200 root=/dev/mmcblk0p1 rw bootargs_root=root=/dev/mmcblk0p1 rw bootcmd=mmcinit; nand read.e 0x00800000 0x00100000 0x00400000; bootm 0x00800000 stdin=serial stdout=serial stderr=serial nandEnvBase=a0000 mainlineLinux=no enaMonExt=no enaCpuStream=no enaWrAllo=no pexMode=RC disL2Cache=no setL2CacheWT=yes disL2Prefetch=yes enaICPref=yes enaDCPref=yes sata_dma_mode=yes netbsd_en=no vxworks_en=no bootdelay=3 disaMvPnp=no enaAutoRecovery=yes pcieTune=no
Environment size: 1242/131068 bytes Marvell>>
|
|
|
|
|
Logged
|
|
|
|
|
|
|
 |
« Reply #5 on: November 04, 2009, 02:16:37 AM » |
|
For the record, I have this problem with the new u-boot too. That's why I updated my Debian guide to use bootargs_console instead.
|
|
|
|
|
Logged
|
|
|
|
|
|
|
 |
« Reply #6 on: November 04, 2009, 02:40:42 AM » |
|
Can someone clarify the effects of this? I have a working system with this "broken" u-boot. Will I only see the problem if I ever try and change the boot args? i.e. it's working now, will it continue to work?
Will I see the problem if I decide to move to SD card booting (I think I have ruled that out due to the performance problems, but I may want to try stuff out on a seperate dev system on SD).
When there is a fixed u-boot, will there be a way of replacing just u-boot without it wiping my rootfs on in the internal flash?
|
|
|
|
|
Logged
|
|
|
|
|
|
|
 |
« Reply #7 on: November 04, 2009, 05:36:50 AM » |
|
I haven't noticed any ill effects caused by this defect. To state the obvious, if anything depended on the "console" environment variable, it would be unlikely to work after being corrupted but since "console" isn't passed to the kernel, I don't know that the problem is anything other than cosmetic. On the other hand, I can't get the SD card to support the RFS so when I see something that obviously clanks, I pay it a lot of attention.
|
|
|
|
|
Logged
|
|
|
|
|
rooster
Administrator
Sr. Member
   
Karma: 8
Posts: 311
|
 |
« Reply #8 on: November 04, 2009, 06:35:40 AM » |
|
Hi,
Please use the attached uboot version 3.4.23, this bug was fixed.
-rooster
|
uboot.bin (463.47 KB - downloaded 1924 times.)
|
|
|
Logged
|
|
|
|
|
|
|
 |
« Reply #9 on: November 04, 2009, 07:18:11 AM » |
|
What's the easiest way to get this u-boot flashed, without it wiping my root filesystem? (is there a way?)
|
|
|
|
|
Logged
|
|
|
|
|
|
|
leadog
Newbie
Karma: 1
Posts: 6
|
 |
« Reply #11 on: November 04, 2009, 11:34:09 AM » |
|
Just a quick followup to say that I too see this odd console variable value. No warning about CRC/NAND corruption. And like others, my setup does not use that variable. This is with a 3.4.19 build of my own.
Rooster, where did you pickup 3.4.23 source from?
|
|
|
|
|
Logged
|
|
|
|
|
|
|
|