All of lore.kernel.org
 help / color / mirror / Atom feed
* Deploying U-Boot on empty NAND (imx28evk)
@ 2014-08-26 13:40 Per Smitt
  2014-08-26 14:02 ` Otavio Salvador
  2014-08-26 16:12 ` Eric Bénard
  0 siblings, 2 replies; 5+ messages in thread
From: Per Smitt @ 2014-08-26 13:40 UTC (permalink / raw)
  To: meta-freescale@yoctoproject.org

[-- Attachment #1: Type: text/plain, Size: 1439 bytes --]

Hi

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.

To get more control of the deployment process I want to move away from MfgTool and only use sb_loader.exe to send an U-Boot to execute in RAM and from there I want to manually download all files I need over TFTP and write them to nand.

I have managed to do this with both kernel and ubifs filesystem but U-Boot keeps eluding me.

I have an empty nand in the imx28evk board and do the following:
sb_loader.exe /f u-boot-imx28evk.sb
This starts U-Boot on the device, and the nand is still empty.

Then in U-Boot I do the following:
mtdparts delall
mtdparts add nand0 0x0300000 bootloader
nand erase.part bootloader
tftp ${loadaddr} tlx-image-minimal-imx28evk.uboot.mxsboot-nand
nand write ${loadaddr} bootloader

All the U-Boot commands were executed successfully. I had hoped that at this point I could press the reset button and get U-Boot executing right away. However I only get this in the terminal:
0x80508002

Anyone who can help me with this?

Additional info:
This based on core-image-minimal with minor changes to conf/machine/imx28evk.conf:
UBOOT_CONFIG ??= "nand"
IMAGE_FSTYPES ?= "uboot.mxsboot-nand uboot.mxsboot-sdcard sdcard ubifs"

Many thanks in advance,
Per Smitt






[-- Attachment #2: Type: text/html, Size: 2484 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Deploying U-Boot on empty NAND (imx28evk)
  2014-08-26 13:40 Deploying U-Boot on empty NAND (imx28evk) Per Smitt
@ 2014-08-26 14:02 ` Otavio Salvador
  2014-08-26 14:48   ` Per Smitt
  2014-08-26 16:12 ` Eric Bénard
  1 sibling, 1 reply; 5+ messages in thread
From: Otavio Salvador @ 2014-08-26 14:02 UTC (permalink / raw)
  To: Per Smitt; +Cc: meta-freescale@yoctoproject.org

On Tue, Aug 26, 2014 at 10:40 AM, Per Smitt <per.smitt@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.

-- 
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Deploying U-Boot on empty NAND (imx28evk)
  2014-08-26 14:02 ` Otavio Salvador
@ 2014-08-26 14:48   ` Per Smitt
  0 siblings, 0 replies; 5+ messages in thread
From: Per Smitt @ 2014-08-26 14:48 UTC (permalink / raw)
  To: Otavio Salvador; +Cc: meta-freescale@yoctoproject.org


On Tue, Aug 26, 2014 at 10:40 AM, Per Smitt <per.smitt@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

                                                                        

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Deploying U-Boot on empty NAND (imx28evk)
  2014-08-26 13:40 Deploying U-Boot on empty NAND (imx28evk) Per Smitt
  2014-08-26 14:02 ` Otavio Salvador
@ 2014-08-26 16:12 ` Eric Bénard
  2014-08-27  8:50   ` Per Smitt
  1 sibling, 1 reply; 5+ messages in thread
From: Eric Bénard @ 2014-08-26 16:12 UTC (permalink / raw)
  To: Per Smitt; +Cc: meta-freescale@yoctoproject.org

Le Tue, 26 Aug 2014 13:40:23 +0000,
Per Smitt <per.smitt@sbie.se> a écrit :

> Hi
> 
> 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.
> 
what is the NAND flash you are using ?
You may need to tune some parameters and values depending on the flash.

Eric


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Deploying U-Boot on empty NAND (imx28evk)
  2014-08-26 16:12 ` Eric Bénard
@ 2014-08-27  8:50   ` Per Smitt
  0 siblings, 0 replies; 5+ messages in thread
From: Per Smitt @ 2014-08-27  8:50 UTC (permalink / raw)
  To: Eric Bénard; +Cc: meta-freescale@yoctoproject.org


Le Tue, 26 Aug 2014 13:40:23 +0000,
Per Smitt <per.smitt@sbie.se> a écrit :

>> Hi
>>
>> 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.
>>
> what is the NAND flash you are using ?
> You may need to tune some parameters and values depending on the flash.
>
> Eric

You are quite correct. I had forgotten to setup the MXSBOOT_NAND_ARGS with the correct values for my flash. I had not considered this since the MfgTool had been able to flash the device with the .sb file. Since the .sb file is an input to the mxsboot command I figured it did not matter at this stage.

I have not been able to get U-Boot to write a bootloader using the .sb file like MfgTool does, however with the mxsboot parameters set I could flash the nand-file using the U-Boot script update_nand_firmware_full.

Many thanks for the help!

/Per



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-08-27  8:50 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-26 13:40 Deploying U-Boot on empty NAND (imx28evk) Per Smitt
2014-08-26 14:02 ` Otavio Salvador
2014-08-26 14:48   ` Per Smitt
2014-08-26 16:12 ` Eric Bénard
2014-08-27  8:50   ` Per Smitt

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.