How to boot QuadSPI with u-boot, kernel, DBT and RootFS in i.MX6SX

cancel
Showing results for 
Search instead for 
Did you mean: 

How to boot QuadSPI with u-boot, kernel, DBT and RootFS in i.MX6SX

2,580 Views
erickang
Contributor II

Hi All,

I want to know how to boot with u-boot, kernel, DTB and root file system in Quad SPI NOR.

Firstly I could confirm the normal booting with u-boot in Quad SPI-NOR.

But I don't know how to boot with u-boot, kernel, DTB and root file system in Quad SPI NOR.

Which image was used for this operation based on prebuilt images?

And How do I modify the MFGTool Script, ucl2.xml?

We can find the MFGTool and Prebuilt Image for i.MX6SX in the below location.

http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=i.MX6SX&fpsp=1&tab=Design_Tools_Tab

Hardware Development Tools -> IMX6_L3.10.53_MFG_TOOL

IMX6_L3.10.53_MFG_TOOL

Run-time Software -> L3.10.53_1.1.0_iMX6SX_Bundle

L3.10.53_1.1.0_iMX6SX_Bundle

Best Regards,

Eric.

Labels (3)
0 Kudos
9 Replies

605 Views
erickang
Contributor II

I confirmed the booting with u-boot and kernel.

For this, I modified the flash reading parameters in u-boot environment.

Previous

setenv bootcmd 'run bootargsset; sf probe; sf read ${loadaddr} 0xA00000 0x2000; sf read ${fdt_addr} 0x800000 0x800; bootz ${loadaddr} - ${fdt_addr}'

Modiied

setenv bootcmd 'run bootargsset; sf probe; sf read ${loadaddr} 0xA00000 0x600000; sf read ${fdt_addr} 0x800000 0x10000; bootz ${loadaddr} - ${fdt_addr}'

But I couldn't write the RootFS into QuadSPI-NOR with MFGTool.

Could you tell me how to boot with RootFS after writing the RootFS with MFGTool?

Best Regards,

Eric.

0 Kudos

605 Views
ranshalit
Senior Contributor I

Hi Eric,

Does u-boot/linux for booting from qspi requires any modifications in the original sabre u-boot in yocto ?

What is the offset for filesystem ?

Thank you,

Ran

0 Kudos

605 Views
igorpadykov
NXP TechSupport
NXP TechSupport

Hi Eric

RootFS is quite big so probably it will not fit to spi-nor,

please try to work with SD. If you have one are which is able to boot,

one use the same card.

Best regards

igor

0 Kudos

605 Views
erickang
Contributor II

Hi Igor,

Thanks for your response.

I think Writing RootFS into QSPI is possible if I used the small RootFS.

Could you tell me how to apply the RootFS into QSPI?

Best Regards,

Eric.


0 Kudos

605 Views
igorpadykov
NXP TechSupport
NXP TechSupport

Hi Eric

you can try to buld core-image-minimal

image and check if it fits.

Best regards

igor

0 Kudos

605 Views
erickang
Contributor II

Hi Igor,

Thanks for your response.

I'll try to build core-image-minimal to make the small RootFS.

I'll make the small RootFS manually if the size is bigger than QSPI size.

But I want to know how to write the whole images(u-boot, kernel, DTB and RootFS) into one QSPI.

I assume the whole images can write into one QSPI.

Actually I confirmed the operation of u-boot/kernel/DTB in one QSPI already.

So I have to confirm the operation of RootFS.

Could you tell me how to write the whole images into QSPI by using MFGTool?

It's very helpful to me if you inform me how to use the ucl2.xml for writing the whole images into QSPI.

Best Regards,

Eric.

0 Kudos

605 Views
igorpadykov
NXP TechSupport
NXP TechSupport

Hi Eric

I would suggest to create new thread for that. 

Thanks !

igor

0 Kudos

605 Views
erickang
Contributor II

Hi Igor,

Thanks for your support.

I created new thread for MFGTool usage.

How to write RootFS into QuadSPI-NOR via MFGTool in i.MX6SX

Best Regards,

Eric.

0 Kudos

605 Views
erickang
Contributor II

I used the below items for the booting from Quad SPI-NOR.

- MFGTool Script, ucl2.xml
<!-- U-boot -->
<CMD state="Updater" type="push" body="send" file="files/u-boot-imx6sxsabresd_qspi2.imx" ifdev="MX6SX">Sending u-boot.bin</CMD>
<CMD state="Updater" type="push" body="$ dd if=$FILE of=/dev/mtd0 bs=1k seek=4">write U-Boot to NOR flash</CMD>
<!-- burn the kernel: -->
<CMD state="Updater" type="push" body="send" file="files/zImage">Sending kernel zImage</CMD>
<CMD state="Updater" type="push" body="$ dd if=$FILE of=/dev/mtd0 bs=1M seek=10">write kernel to NOR flash</CMD>
<!-- burn DTB -->
<CMD state="Updater" type="push" body="send" file="files/zImage-imx6sx-sdb.dtb">Sending DTB Image</CMD>
<CMD state="Updater" type="push" body="$ dd if=$FILE of=/dev/mtd0 bs=1M seek=8">write DTB to NOR flash</CMD>


- u-boot environment
setenv loadaddr 0x80800000
setenv fdt_addr 0x83000000

setenv consoleinfo 'console=ttymxc0,115200'
setenv rootfsinfo 'root=/dev/mmcblk0p2 rootwait rw'
setenv displayinfo 'video=mxcfb0:dev=lcd,if=RGB565'
setenv special 'uart_at_osc'
setenv bootargsset 'setenv bootargs ${consoleinfo} ${rootfsinfo} ${displayinfo} ${special}'
setenv bootcmd 'run bootargsset; sf probe; sf read ${loadaddr} 0xA00000 0x2000; sf read ${fdt_addr} 0x800000 0x800; bootz ${loadaddr} - ${fdt_addr}'


But Kernel was not operated with the below log.

- Booting Log
SF: Detected N25Q256 with page size 256 Bytes, erase size 4 KiB, total 32 MiB
SF: 8192 bytes @ 0xa00000 Read: OK
SF: 2048 bytes @ 0x800000 Read: OK
Kernel image @ 0x80800000 [ 0x000000 - 0x549dd0 ]
## Flattened Device Tree blob at 83000000
   Booting using the fdt blob at 0x83000000
   Using Device Tree in place at 83000000, end 8300ef36
No gpc device node -11, force to ldo-enable.

Starting kernel ...

0 Kudos