Boot from SPI-NOR flash

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Boot from SPI-NOR flash

Jump to solution
4,398 Views
carmilili
Contributor III

The CPU of my board is i.mx6q.I want to use SPI-NOR flash(32M) to store u-boot kernel and file system.

Now,I have a problem with kernel booting.The u-boot boot up successfully.

Please look at below detail carefully.

The flash has two partition.

/dev/mtd0 4.5M

/dev/mtd1 27.5M

I use MfgTool to burn image and file system.

uxl2:

<CMD state="Updater" type="push" body="$ flash_erase /dev/mtd0 0 0">Erasing Boot partition</CMD>
<CMD state="Updater" type="push" body="send" file="files/u-boot.bin">Sending U-Boot</CMD>
<CMD state="Updater" type="push" body="$ dd if=$FILE of=/dev/mtd0 bs=512">write U-Boot to SPI-NOR</CMD>
<CMD state="Updater" type="push" body="send" file="files/uImage">Sending Kernel Image</CMD>
<CMD state="Updater" type="push" body="$ dd if=$FILE of=/dev/mtd0 bs=512 seek=1000">Flashing Kernel</CMD>

u-boot command

setenv bootargs_sf 'setenv bootargs ${bootargs} ip=${ipaddr} root=/dev/mtdblock1 rootwait rw video=mxcfb1:dev=ldb,LDB-XGA,if=RGB666 video=mxcfb0:dev=hdmi,1920x1080M@60,if=RGB24'

setenv bootcmd_sf 'run bootargs_base bootargs_sf;sf probe 2:0;sf read ${loadaddr} 0x80000 0x400000;bootm'

I think my u-boot image is stored in the first 512k and the kernel image follow the u-boot image.

//-----512k----/------4M-----/---------27.5M-------------//

     u-boot         kernel         file system

//            mtd0             /      mtd1                 //

But now when the u-boot run to end and copy the uImage from flash.It is interrupted by error.

MX6Q SABRESD U-Boot > boot

Wrong Image Format for bootm command

ERROR: can't get kernel image!

My question:

1,Does someone know why it can not find the kernel image?I think the address of kernel image is from 512k to 4.5M.

2,Dose the uImage different from using by MMC and SPI-NOR flash?

0 Kudos
Reply
1 Solution
1,455 Views
carmilili
Contributor III

Ha ha,

I solve it.


<CMD state="Updater" type="push" body="$ dd if=$FILE of=/dev/mtd0 bs=512 seek=1000">Flashing Kernel</CMD>

to

<CMD state="Updater" type="push" body="$ dd if=$FILE of=/dev/mtd0 bs=512 seek=1024">Flashing Kernel</CMD>

View solution in original post

0 Kudos
Reply
1 Reply
1,456 Views
carmilili
Contributor III

Ha ha,

I solve it.


<CMD state="Updater" type="push" body="$ dd if=$FILE of=/dev/mtd0 bs=512 seek=1000">Flashing Kernel</CMD>

to

<CMD state="Updater" type="push" body="$ dd if=$FILE of=/dev/mtd0 bs=512 seek=1024">Flashing Kernel</CMD>

0 Kudos
Reply