<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: iMX6sx How to flash a whole image to QSPI flash in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/iMX6sx-How-to-flash-a-whole-image-to-QSPI-flash/m-p/1225051#M168832</link>
    <description>&lt;P&gt;Hello,&lt;BR /&gt;&lt;BR /&gt;Unfortunately we don't have examples for flashing whole Linux image into the QSPI.&lt;BR /&gt;&lt;BR /&gt;I could suggest to take a look to the script to flash uboot into the QSPI and modify it accordingly for this purpose.&lt;BR /&gt;&lt;BR /&gt;qspi_burn_loader script&lt;/P&gt;
&lt;LI-SPOILER&gt;
&lt;P&gt;uuu_version 1.2.39&lt;/P&gt;
&lt;P&gt;# @_flexspi.bin | bootloader&lt;BR /&gt;# @_image [_flexspi.bin] | image burn to flexspi, default is the same as bootloader&lt;/P&gt;
&lt;P&gt;# This command will be run when i.MX6/7 i.MX8MM, i.MX8MQ&lt;BR /&gt;SDP: boot -f _flexspi.bin&lt;/P&gt;
&lt;P&gt;# This command will be run when ROM support stream mode&lt;BR /&gt;# i.MX8QXP, i.MX8QM, skip QSPI header&lt;BR /&gt;SDPS: boot -f _flexspi.bin -skipfhdr&lt;/P&gt;
&lt;P&gt;# These commands will be run when use SPL and will be skipped if no spl&lt;BR /&gt;# SDPU will be deprecated. please use SDPV instead of SDPU&lt;BR /&gt;# {&lt;BR /&gt;SDPU: delay 1000&lt;BR /&gt;SDPU: write -f _flexspi.bin -offset 0x10000 -skipfhdr&lt;BR /&gt;SDPU: jump&lt;BR /&gt;# }&lt;/P&gt;
&lt;P&gt;# These commands will be run when use SPL and will be skipped if no spl&lt;BR /&gt;# if (SPL support SDPV)&lt;BR /&gt;# {&lt;BR /&gt;SDPV: delay 1000&lt;BR /&gt;SDPV: write -f _flexspi.bin -skipspl -skipfhdr&lt;BR /&gt;SDPV: jump&lt;BR /&gt;# }&lt;/P&gt;
&lt;P&gt;FB: ucmd setenv fastboot_buffer ${loadaddr}&lt;BR /&gt;FB: download -f _image&lt;/P&gt;
&lt;P&gt;# Check Image if include flexspi header&lt;BR /&gt;FB: ucmd if qspihdr dump ${fastboot_buffer}; then setenv qspihdr_exist yes; else setenv qspihdr_exist no; fi;&lt;/P&gt;
&lt;P&gt;FB[-t 60000]: ucmd if test ${qspihdr_exist} = yes; then qspihdr init ${fastboot_buffer} ${fastboot_bytes} safe; else true; fi;&lt;/P&gt;
&lt;P&gt;#if uboot can't support qspihdr command, use uboot image to write qspi image, which require image include qspi flash header&lt;BR /&gt;FB: ucmd if test ${qspihdr_exist} = no; then sf probe; else true; fi;&lt;BR /&gt;FB[-t 40000]: ucmd if test ${qspihdr_exist} = no; then sf erase 0 +${fastboot_bytes}; else true; fi;&lt;BR /&gt;FB[-t 20000]: ucmd if test ${qspihdr_exist} = no; then sf write ${fastboot_buffer} 0 ${fastboot_bytes}; else true; fi;&lt;BR /&gt;FB: done&lt;/P&gt;
&lt;/LI-SPOILER&gt;
&lt;P&gt;Best regards,&lt;BR /&gt;Aldo.&lt;/P&gt;</description>
    <pubDate>Wed, 03 Feb 2021 01:15:22 GMT</pubDate>
    <dc:creator>AldoG</dc:creator>
    <dc:date>2021-02-03T01:15:22Z</dc:date>
    <item>
      <title>iMX6sx How to flash a whole image to QSPI flash</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/iMX6sx-How-to-flash-a-whole-image-to-QSPI-flash/m-p/1222814#M168608</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am looking for a way to burn the QSPI flash of the iMX6sx SABRE board with an image of the whole system, I mean containing bootloader, kernel, DTB and root file system.&lt;/P&gt;&lt;P&gt;I built an image starting from the repo&amp;nbsp;&lt;A href="https://github.com/Freescale/fsl-community-bsp-platform" target="_blank"&gt;https://github.com/Freescale/fsl-community-bsp-platform&lt;/A&gt; -b dunfell, with these settings:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;MACHINE=imx6sxsabresd
DISTRO=poky
UBOOT_CONFIG = "qspi2 sd"
core-image-minimal&lt;/LI-CODE&gt;&lt;OL&gt;&lt;LI&gt;Is it possible to transfer a whole image to QSPI flash, maybe with the UUU tool?&lt;/LI&gt;&lt;LI&gt;If 1. is true, how must be the virtual image partitioned, using for instance&amp;nbsp;&lt;SPAN&gt;kpartx like explained in&amp;nbsp;&lt;A href="https://community.nxp.com/t5/i-MX-Processors/Cloning-an-SD-card-that-came-with-the-SABRE-SD-Quad/m-p/1221939#M168505" target="_blank" rel="noopener"&gt;this post&lt;/A&gt;? looking at section "Flash Memory maps" of the "i.MX Linux User's Guide" I found this:&lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P class="lia-indent-padding-left-30px"&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;mtdparts=[memory type designator]:[size]([name of partition]),[size]([name of partition]),-([name of final partition])&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;&lt;SPAN&gt;and, for the&amp;nbsp;QuadSPI in particular, this:&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;mtdparts=21e4000.qspi:1m(uboot),8m(kernel),1m(dtb),-(user)&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;&lt;SPAN&gt;Does it mean that when I set the partitions I have to leave 1MB free for the bootloader, then make a first partition (8MB) for the kernel, a second one (1MB) for the DTB and a third one for user space?&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;&lt;SPAN&gt;I tried to use UUU following its user guide where I found these:&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;SDP: boot -f u-boot-imx7dsabresd_sd.imx -nojump
SDP: write -f zImage -addr 0x80800000
SDP: write -f zImage-imx7d-sdb.dtb -addr 0x83000000
SDP: write -f fsl-image-mfgtool-initramfs-imx_mfgtools.cpio.gz.u-boot -addr 0x83800000
SDP: jump -f u-boot-dtb.imx -iv&lt;/LI-CODE&gt;&lt;P class="lia-indent-padding-left-30px"&gt;&amp;nbsp;but I'm not sure about it.&lt;/P&gt;&lt;P&gt;Does anybody suggest me&amp;nbsp;the right way?&lt;/P&gt;</description>
      <pubDate>Thu, 28 Jan 2021 18:25:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/iMX6sx-How-to-flash-a-whole-image-to-QSPI-flash/m-p/1222814#M168608</guid>
      <dc:creator>mpilia</dc:creator>
      <dc:date>2021-01-28T18:25:57Z</dc:date>
    </item>
    <item>
      <title>Re: iMX6sx How to flash a whole image to QSPI flash</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/iMX6sx-How-to-flash-a-whole-image-to-QSPI-flash/m-p/1225051#M168832</link>
      <description>&lt;P&gt;Hello,&lt;BR /&gt;&lt;BR /&gt;Unfortunately we don't have examples for flashing whole Linux image into the QSPI.&lt;BR /&gt;&lt;BR /&gt;I could suggest to take a look to the script to flash uboot into the QSPI and modify it accordingly for this purpose.&lt;BR /&gt;&lt;BR /&gt;qspi_burn_loader script&lt;/P&gt;
&lt;LI-SPOILER&gt;
&lt;P&gt;uuu_version 1.2.39&lt;/P&gt;
&lt;P&gt;# @_flexspi.bin | bootloader&lt;BR /&gt;# @_image [_flexspi.bin] | image burn to flexspi, default is the same as bootloader&lt;/P&gt;
&lt;P&gt;# This command will be run when i.MX6/7 i.MX8MM, i.MX8MQ&lt;BR /&gt;SDP: boot -f _flexspi.bin&lt;/P&gt;
&lt;P&gt;# This command will be run when ROM support stream mode&lt;BR /&gt;# i.MX8QXP, i.MX8QM, skip QSPI header&lt;BR /&gt;SDPS: boot -f _flexspi.bin -skipfhdr&lt;/P&gt;
&lt;P&gt;# These commands will be run when use SPL and will be skipped if no spl&lt;BR /&gt;# SDPU will be deprecated. please use SDPV instead of SDPU&lt;BR /&gt;# {&lt;BR /&gt;SDPU: delay 1000&lt;BR /&gt;SDPU: write -f _flexspi.bin -offset 0x10000 -skipfhdr&lt;BR /&gt;SDPU: jump&lt;BR /&gt;# }&lt;/P&gt;
&lt;P&gt;# These commands will be run when use SPL and will be skipped if no spl&lt;BR /&gt;# if (SPL support SDPV)&lt;BR /&gt;# {&lt;BR /&gt;SDPV: delay 1000&lt;BR /&gt;SDPV: write -f _flexspi.bin -skipspl -skipfhdr&lt;BR /&gt;SDPV: jump&lt;BR /&gt;# }&lt;/P&gt;
&lt;P&gt;FB: ucmd setenv fastboot_buffer ${loadaddr}&lt;BR /&gt;FB: download -f _image&lt;/P&gt;
&lt;P&gt;# Check Image if include flexspi header&lt;BR /&gt;FB: ucmd if qspihdr dump ${fastboot_buffer}; then setenv qspihdr_exist yes; else setenv qspihdr_exist no; fi;&lt;/P&gt;
&lt;P&gt;FB[-t 60000]: ucmd if test ${qspihdr_exist} = yes; then qspihdr init ${fastboot_buffer} ${fastboot_bytes} safe; else true; fi;&lt;/P&gt;
&lt;P&gt;#if uboot can't support qspihdr command, use uboot image to write qspi image, which require image include qspi flash header&lt;BR /&gt;FB: ucmd if test ${qspihdr_exist} = no; then sf probe; else true; fi;&lt;BR /&gt;FB[-t 40000]: ucmd if test ${qspihdr_exist} = no; then sf erase 0 +${fastboot_bytes}; else true; fi;&lt;BR /&gt;FB[-t 20000]: ucmd if test ${qspihdr_exist} = no; then sf write ${fastboot_buffer} 0 ${fastboot_bytes}; else true; fi;&lt;BR /&gt;FB: done&lt;/P&gt;
&lt;/LI-SPOILER&gt;
&lt;P&gt;Best regards,&lt;BR /&gt;Aldo.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Feb 2021 01:15:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/iMX6sx-How-to-flash-a-whole-image-to-QSPI-flash/m-p/1225051#M168832</guid>
      <dc:creator>AldoG</dc:creator>
      <dc:date>2021-02-03T01:15:22Z</dc:date>
    </item>
  </channel>
</rss>

