iMX6UL-EVK - How to boot from NOR Flash- QSPI?

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

iMX6UL-EVK - How to boot from NOR Flash- QSPI?

1,517 Views
toanjunifer
Senior Contributor I

Hi,

My name is Toan. Currently, I'm using i.MX6UL-EVK. I boot from SDcard successfully and do some project with it. And now I wanna boot from NOR Flash. Because I know that iMX6UL have 256Mbit QSPI Flash and I quite interesting with it. I find any documents about NOR Flash and how to boot from it, but I don't understand clearly and something missing some required file.

Some one may guide me step by step?

Some extra questions:

1. Which files/tools are required to boot from NOR Flash ?

2. Did we need .vbs file and how to generate .vbs files ?

3. Do I need a SDcard when flash or something else with NOR flash ?

Thank you so much !!!

Labels (1)
5 Replies

1,180 Views
toanjunifer
Senior Contributor I

igorpadykov‌ , May i ask you extra question ?

"u-boot-qspi.imx" files is raw name file or edit from other file name *.imx ?

If it's a raw name, how to generate it ? If not, what is the raw name file ?

Thank you so much,

Toan

0 Kudos

1,180 Views
igorpadykov
NXP Employee
NXP Employee

Hi Dao

assumes you boot your board from MicroSD card:

1. Copy your qspi-nor-flash setup uboot image and attatched "qspi-header.bin"  into a VFAT partition of MicroSD card(e.g. the 3rd partition ,  there is uboot image file "u-boot-qspi.imx" and "qspi-header.bin" saved) .
2. Boot your board from MicroSD card and enter uboot command shell prompt line.
3. Enter command "fatls mmc 1:3" and you can see the two files in MicroSD copyed before.then enter command
   "fatload mmc 1:3   ${loadaddr}  u-boot-qspi.imx"
4. Enter command "sf probe"

5. The erase size is ${filesize}, around 351 Kbytes. This example assumes that it is 512 Kbytes.
Enter command "sf erase 0x0 0x80000"
6. Enter command "sf write ${loadaddr} 0x1000  0x80000 "   /* flash uboot.imx to 4k offset of qspi nor flash */

7. Enter command  "fatload mmc 1:3   0x90000000  qspi-header.bin"
8. Enter command "sf write 0x90000000 0x400   0x200"   /* flash qspi-header.bin to 1k offset of qspi nor flash, 512 bytes size */

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

1,180 Views
toanjunifer
Senior Contributor I

Hi Igor,

Thank you for quick reply. I have a trouble. How to generate "u-boot-qspi.imx" file ?

I build distro myself follow i.MX_Yocto_Project_User's_Guide-L4.14.98-2.0.0-ga.pdf. I used bitbake fsl-image-gui.

Thank you for your support,

Toan

0 Kudos

1,180 Views
igorpadykov
NXP Employee
NXP Employee

Hi Toan

one can look at mx6ul_14x14_evk_qspi1_defconfig

mx6ul_14x14_evk_qspi1_defconfig\configs - uboot-imx - i.MX U-Boot 

and sect.5.5 U-Boot configuration Yocto Guide in Linux L4.14.98_2.0.0 Documentation

Best regards
igor

1,180 Views
toanjunifer
Senior Contributor I

Sorry but I dont understand clearly, what do you mean ?

What is purpose of mx6ul_14x14_evk_qspi1_defconfig file ?

Last time, I do follow sect 5.5 but still dont get anyfile like this. Then I try to execute command:

$ bitbake fsl-image-gui

I get an error concern about SDcard.

ERROR: fsl-image-gui-1.0-r0 do_image_sdcard: Function failed: do_image_sdcard (log file is located at /home/toanrd/imx4nor/build-x11/tmp/work/imx6ulevk-poky-linux-gnueabi/fsl-image-gui/1.0-r0/temp/log.do_image_sdcard.3603)
ERROR: Logfile of failure stored in: /home/toanrd/imx4nor/build-x11/tmp/work/imx6ulevk-poky-linux-gnueabi/fsl-image-gui/1.0-r0/temp/log.do_image_sdcard.3603
Log data follows:
| DEBUG: Executing python function set_image_size
| DEBUG: 964303.600000 = 741772 * 1.300000
| DEBUG: 964303.600000 = max(964303.600000, 65536)[964303.600000] + 1
| DEBUG: 964304.000000 = int(964303.600000)
| DEBUG: 966656 = aligned(964304)
| DEBUG: returning 966656
| DEBUG: Python function set_image_size finished
| DEBUG: Executing python function extend_recipe_sysroot
| DEBUG: Python function extend_recipe_sysroot finished
| DEBUG: Executing shell function do_image_sdcard
| 0+0 records in
| 0+0 records out
| 0 bytes (0 B) copied, 0.000134655 s, 0.0 kB/s
| Model:  (file)
| Disk /home/toanrd/imx4nor/build-x11/tmp/work/imx6ulevk-poky-linux-gnueabi/fsl-image-gui/1.0-r0/deploy-fsl-image-gui-image-complete/fsl-image-gui-imx6ulevk-20190823085543.rootfs.sdcard: 1007MB
| Sector size (logical/physical): 512B/512B
| Partition Table: msdos
| Disk Flags:
|
| Number  Start   End     Size    Type     File system  Flags
|  1      4194kB  12.6MB  8389kB  primary               lba
|  2      12.6MB  1002MB  990MB   primary
|
| 1190+0 records in
| 1190+0 records out
| 609280 bytes (609 kB) copied, 0.00156972 s, 388 MB/s
| mkfs.fat: warning - lowercase labels might not work properly with DOS or Windows
| mkfs.fat 4.1 (2017-01-24)
| 2+0 records in
| 2+0 records out
| 8388608 bytes (8.4 MB) copied, 0.00520834 s, 1.6 GB/s
| dd: failed to open ‘/home/toanrd/imx4nor/build-x11/tmp/work/imx6ulevk-poky-linux-gnueabi/fsl-image-gui/1.0-r0/deploy-fsl-image-gui-image-complete/fsl-image-gui-imx6ulevk-20190823085543.rootfs.ext4’: No such file or directory
| WARNING: exit code 1 from a shell command.
| ERROR: Function failed: do_image_sdcard (log file is located at /home/toanrd/imx4nor/build-x11/tmp/work/imx6ulevk-poky-linux-gnueabi/fsl-image-gui/1.0-r0/temp/log.do_image_sdcard.3603)
ERROR: Task (/home/toanrd/imx4nor/sources/meta-fsl-bsp-release/imx/meta-sdk/recipes-fsl/images/fsl-image-gui.bb:do_image_sdcard) failed with exit code '1'
NOTE: Tasks Summary: Attempted 7732 tasks of which 7730 didn't need to be rerun and 1 failed.

Summary: 1 task failed:
  /home/toanrd/imx4nor/sources/meta-fsl-bsp-release/imx/meta-sdk/recipes-fsl/images/fsl-image-gui.bb:do_image_sdcard
0 Kudos