always using default environment

bernd
Hi,

my problem is that u-boot is always using the default environemt.
This is what i did:

bernd@e4400:~$ picocom -b 115200 /dev/ttyUSB0                
picocom v1.4                                                               
     

port is        : /dev/ttyUSB0
flowcontrol    : none        
baudrate is    : 115200      
parity is      : none        
databits are   : 8           
escape is      : C-a         
noinit is      : no          
noreset is     : no          
nolock is      : no          
send_cmd is    : sx -vv      
receive_cmd is : rz -vv      

Terminal ready

Supervivi> load ram 0x31000000 239016 u
USB host is connected. Waiting a download.

Now, Downloading [ADDRESS:31000000h,TOTAL:239026]
RECEIVED FILE SIZE:  239026 (116KB/S, 2S)        
Downloaded file at 0x31000000, size = 239016 bytes
Supervivi> go 0x31000000                          
go to 0x31000000                                  
  argument 0 = 0x00000000                         
  argument 1 = 0x00000000                         
  argument 2 = 0x00000000                         
árgument 3 = 0x00000000                           

U-Boot 1.3.2-dirty-moko12 (Apr 16 2009 - 18:14:52)

I2C:   ready
DRAM:  64 MB
Flash:  2 MB
NAND:  64 MiB
*** Warning - bad CRC or NAND, using default environment

USB:   S3C2410 USB Deviced
In:    serial             
Out:   serial             
Err:   serial             
MAC: 08:08:11:18:12:27    
Hit any key to stop autoboot:  0
MINI2440 # nand scrub           

NAND scrub: device 0 whole chip
Warning: scrub option will erase all factory set bad blocks!
         There is no reliable way to recover them.          
         Use this command only for testing purposes if you  
         are sure of what you are doing!                    

Really scrub this NAND flash? <y/N>
Erasing at 0x3ffc000 -- 100% complete.
Bad block table not found for chip 0  
Bad block table not found for chip 0  
OK                                    
MINI2440 # nand createbbt             
Create BBT and erase everything ? <y/N>
Skipping bad block at  0x03ff0000      
Skipping bad block at  0x03ff4000      
Skipping bad block at  0x03ff8000      
Skipping bad block at  0x03ffc000      

Creating BBT. Please wait ...Bad block table not found for chip 0
Bad block table not found for chip 0                             
Bad block table written to 0x03ffc000, version 0x01              
Bad block table written to 0x03ff8000, version 0x01              

MINI2440 # nand write 0x31000000 u-boot

NAND write: device 0 offset 0x0, size 0x40000
 262144 bytes written: OK                    
MINI2440 # resetţ                            

U-Boot 1.3.2-dirty-moko12 (Apr 16 2009 - 18:14:52)

I2C:   ready
DRAM:  64 MB
Flash:  2 MB
NAND:  64 MiB
*** Warning - bad CRC or NAND, using default environment

USB:   S3C2410 USB Deviced
In:    serial             
Out:   serial             
Err:   serial             
MAC: 08:08:11:18:12:27    
Hit any key to stop autoboot:  0
MINI2440 # printenv             
bootargs=root=/dev/mtdblock3 rootfstype=jffs2 console=ttySAC0,115200
bootcmd=                                                            
bootdelay=3                                                         
baudrate=115200                                                     
ethaddr=08:08:11:18:12:27                                           
ipaddr=10.0.0.111                                                   
serverip=10.0.0.4                                                   
netmask=255.255.255.0                                               
usbtty=cdc_acm                                                      
mtdparts=mtdparts=mini2440-nand:256k@0(u-boot),128k(env),5m(kernel),-(root)
mini2440=mini2440=0tb                                                      
bootargs_base=console=ttySAC0,115200 noinitrd                              
bootargs_init=init=/sbin/init                                              
root_nand=root=/dev/mtdblock3 rootfstype=jffs2                             
root_mmc=root=/dev/mmcblk0p2 rootdelay=2                                   
root_nfs=/mnt/nfs                                                          
set_root_nfs=setenv root_nfs root=/dev/nfs rw
nfsroot=${serverip}:${root_nfs}
ifconfig_static=run setenv ifconfig
ip=${ipaddr}:${serverip}::${netmask}:mini2440:eth0
ifconfig_dhcp=run setenv ifconfig ip=dhcp                                  
          
ifconfig=ip=dhcp                                                           
          
set_bootargs_mmc=setenv bootargs ${bootargs_base} ${bootargs_init}
${mini2440} ${root_mmc}
set_bootargs_nand=setenv bootargs ${bootargs_base} ${bootargs_init}
${mini2440} ${root_nand}
set_bootargs_nfs=run set_root_nfs; setenv bootargs ${bootargs_base}
${bootargs_init} ${mini2440} ${root_nfs} ${ifconfig}
mtdids=nand0=mini2440-nand                        ...stripped-down

bernd
Sorry, first post was stripped down.
Once again.

I followed this instructions:
http://labs.kernelconcepts.de/Publications/Micro24401

I'm curious about the "nand createbbt" command. It is skipping 4 memory
locations and saves the BBT to two of the previously skipped memory
locations ??


 Supervivi> load ram 0x31000000 239016 u
USB host is connected. Waiting a download.

Now, Downloading [ADDRESS:31000000h,TOTAL:239026]
RECEIVED FILE SIZE:  239026 (116KB/S, 2S)        
Downloaded file at 0x31000000, size = 239016 bytes
Supervivi> go 0x31000000                          
go to 0x31000000                                  
  argument 0 = 0x00000000                         
  argument 1 = 0x00000000                         
  argument 2 = 0x00000000                         
árgument 3 = 0x00000000                           

U-Boot 1.3.2-dirty-moko12 (Apr 16 2009 - 18:14:52)

I2C:   ready
DRAM:  64 MB
Flash:  2 MB
NAND:  64 MiB
*** Warning - bad CRC or NAND, using default environment

USB:   S3C2410 USB Deviced
In:    serial             
Out:   serial             
Err:   serial             
MAC: 08:08:11:18:12:27    
Hit any key to stop autoboot:  0
MINI2440 # nand scrub           

NAND scrub: device 0 whole chip
Warning: scrub option will erase all factory set bad blocks!
         There is no reliable way to recover them.          
         Use this command only for testing purposes if you  
         are sure of what you are doing!                    

Really scrub this NAND flash? <y/N>
Erasing at 0x3ffc000 -- 100% complete.
Bad block table not found for chip 0  
Bad block table not found for chip 0  
OK                                    
MINI2440 # nand createbbt             
Create BBT and erase everything ? <y/N>
Skipping bad block at  0x03ff0000      
Skipping bad block at  0x03ff4000      
Skipping bad block at  0x03ff8000      
Skipping bad block at  0x03ffc000      

Creating BBT. Please wait ...Bad block table not found for chip 0
Bad block table not found for chip 0                             
Bad block table written to 0x03ffc000, version 0x01              
Bad block table written to 0x03ff8000, version 0x01              

MINI2440 # nand write 0x31000000 u-boot

NAND write: device 0 offset 0x0, size 0x40000
 262144 bytes written: OK                    
MINI2440 # resetţ                            

U-Boot 1.3.2-dirty-moko12 (Apr 16 2009 - 18:14:52)

I2C:   ready
DRAM:  64 MB
Flash:  2 MB
NAND:  64 MiB
*** Warning - bad CRC or NAND, using default environment

USB:   S3C2410 USB Deviced
In:    serial             
Out:   serial             
Err:   serial             
MAC: 08:08:11:18:12:27    
Hit any key to stop autoboot:  0

MINI2440 # saveenv
Saving Environment to NAND...
Erasing Nand...MINI2440 # reset

U-Boot 1.3.2-dirty-moko12 (Apr 16 2009 - 18:14:52)

I2C:   ready
DRAM:  64 MB
Flash:  2 MB
NAND:  64 MiB
*** Warning - bad CRC or NAND, using default environment

USB:   S3C2410 USB Deviced
In:    serial
Out:   serial
Err:   serial
MAC: 08:08:11:18:12:27
Hit any key to stop autoboot:  0
MINI2440 #