[meta-freescale] Deploying U-Boot on empty NAND (imx28evk)

Per Smitt per.smitt at sbie.se
Tue Aug 26 07:48:47 PDT 2014


On Tue, Aug 26, 2014 at 10:40 AM, Per Smitt <per.smitt at sbie.se> wrote:
>> I am working with an imx28evk to build a Linux platform for a customer. I
>> have been able to get Linux running on the board both with SD and nand. To
>> run on nand I had to use MfgTool to write U-Boot to the nand.

> The U-Boot environment has the script to write it.

I tried two different scripts but with no success, update_nand_firmware_full and update_nand_firmware, see logs below.
The former script even scrubbed the nand partition.

To be certain that my files were ok I took the u-boot.sb file and downloaded it into the board using MfgTool (double checking the file by changing the name to something unique and verifying that MfgTool failed at the first attempt before setting the same filename in the ucl.xml). After loading with MfgTool the board starts U-Boot. Partial MfgTool log is available below.

So my conclusion is that kobs-ng does something with the u-boot.sb file that isnt done by the U-Boot script. As a side note that could be a hint, if I erase the default ramdisk partition U-Boot stops working with the same symptom. See the log below.

So any further hint would be really appreciated.

/Per


update_nand_firmware_full log:
run update_nand_firmware_full
TFTP from server 192.168.0.101; our IP address is 192.168.0.253                                                                       
Filename 'u-boot.nand'.                                                                                                               
Load address: 0x42000000                                                                                                              
Loading: #################################################################                                                            
done                                                                                                                                  
Bytes transferred = 4194304 (400000 hex)                                                                                              

Device 0: nand0, sector size 128 KiB                                                                                                  
  Page size      2048 b                                                                                                               
  OOB size         64 b                                                                                                               
  Erase size   131072 b                                                                                                               

NAND scrub: device 0 offset 0x0, size 0x400000                                                                                        
Erasing at 0x3e0000 -- 100% complete.                                                                                                 
OK                                                                                                                                    

NAND write:  540672 bytes written: OK                                                                                                 

NAND write: device 0 offset 0x80000, size 0x380000                                                                                    
 3670016 bytes written: OK                                                                                                            
=> 
0x8050800f                                                                                                                         


update_nand_firmware log:
run update_nand_firmware                                                                                                           
Using FEC0 device                                                                                                                     
TFTP from server 192.168.0.101; our IP address is 192.168.0.253                                                                       
Filename 'u-boot.sb'.                                                                                                                 
Load address: 0x42000000                                                                                                              
Loading: #################################                                                                                            

done                                                                                                                                  
Bytes transferred = 471440 (73190 hex)                                                                                                

Device 0: nand0, sector size 128 KiB                                                                                                  
  Page size      2048 b                                                                                                               
  OOB size         64 b                                                                                                               
  Erase size   131072 b                                                                                                               

NAND erase: device 0 offset 0x100000, size 0x200000                                                                                   
Erasing at 0x2e0000 -- 100% complete.                                                                                                 
OK                                                                                                                                    

NAND write: device 0 offset 0x100000, size 0x73190                                                                                    
 471440 bytes written: OK                                                                                                             

NAND write: device 0 offset 0x200000, size 0x73190                                                                                    
 471440 bytes written: OK                                                                                                             
=> 
0x8050800f 


MfgTool log:
UTP: executing "flash_eraseall /dev/mtd0"                                                                                             
Erasing 128 Kibyte @ 1400000 -- 100 % complete.                                                                                       
UTP: sending Success                                                                                                                  
UTP: received command '$ flash_eraseall /dev/mtd1'                                                                                    
UTP: sending Busy                                                                                                                     
UTP: executing "flash_eraseall /dev/mtd1"                                                                                             
Erasing 128 Kibyte @ 6c00000 -- 100 % complete.                                                                                       
UTP: sending Success                                                                                                                  
UTP: received command 'send'                                                                                                          
UTP: sending Success                                                                                                                  
UTP: received command '$ kobs-ng init $FILE'                                                                                          
UTP: sending Busy                                                                                                                     
UTP: executing "kobs-ng init $FILE"                                                                                                   
UTP: sending Success                                                                                                                  
UTP: received command '$ echo Update Complete!'                                                                                       
UTP: sending Busy                                                                                                                     
UTP: executing "echo Update Complete!"                                                                                                
Update Complete!                                                                                                                      
UTP: sending Success                                                                                                                  
g_file_storage gadget: high speed config #1                                                                                           
HTLLCLLC                                                                                                                              

U-Boot 2014.01 (Aug 18 2014 - 13:55:32)                                                                                               

CPU:   Freescale i.MX28 rev1.2 at 454 MHz                     


Erasing ramdisk and resetting log:
=> mtdparts default
=> mtdparts

device nand0 <gpmi-nand>, # parts = 7
 #: name                size            offset          mask_flags
 0: bootloader          0x00300000      0x00000000      1
 1: environment         0x00080000      0x00300000      0
 2: redundant-environment0x00080000     0x00380000      0
 3: kernel              0x00400000      0x00400000      0
 4: fdt                 0x00080000      0x00800000      0
 5: ramdisk             0x00800000      0x00880000      0
 6: filesystem          0x06f80000      0x01080000      0

active partition: nand0,0 - (bootloader) 0x00300000 @ 0x00000000

defaults:
mtdids  : nand0=gpmi-nand
mtdparts: mtdparts=gpmi-nand:3m(bootloader)ro,512k(environment),512k(redundant-environment),4m(kernel),512k(fdt),8m(ramdisk),-(filesys
tem)
=> nand erase.part ramdisk

NAND erase.part: device 0 offset 0x880000, size 0x800000
Erasing at 0x1060000 -- 100% complete.
OK
=> 
0x8050800f

                                                                        


More information about the meta-freescale mailing list