<?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 Bootable SD image for ls1046ardb in QorIQ</title>
    <link>https://community.nxp.com/t5/QorIQ/Bootable-SD-image-for-ls1046ardb/m-p/1374655#M10640</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I am trying to build a bootable SD card image for an OK1046A-C2 board (based on LS1046A).&lt;BR /&gt;The board has 2GB of DDR4 memory.&lt;/P&gt;&lt;P&gt;I tried both Yocto and flex_build 21.08.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;(1)&lt;BR /&gt;Yocto hardknott-3.3&lt;/P&gt;&lt;P&gt;conf/local.conf:&lt;BR /&gt;MACHINE ??= "ls1046ardb"&lt;/P&gt;&lt;P&gt;conf/bblayers.conf:&lt;BR /&gt;/workdir/poky/meta-freescale&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;(2)&lt;BR /&gt;I also built a composite firmware using flexbuild LSDK-21.08 for boot from SD card.&lt;/P&gt;&lt;P&gt;flex-builder -i mkfw -m ls1046ardb&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Neither can boot with the same error message:&lt;/P&gt;&lt;P&gt;ERROR: First slot cannot be empty.&lt;BR /&gt;ERROR: Parsing DIMM Error&lt;BR /&gt;ERROR: DDR init failed.&lt;BR /&gt;NOTICE: Incorrect DRAM0 size is defined in platform_def.h&lt;BR /&gt;ERROR: mmap_add_region_check() failed. error -22&lt;BR /&gt;ERROR: mmap_add_region_check() failed. error -22&lt;BR /&gt;NOTICE: BL2: v2.4(release):LSDK-21.08-0-g340b20bcb&lt;BR /&gt;NOTICE: BL2: Built : 21:57:48, Nov 21 2021&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;The dvice can be booted from SPI which already has an older bootloader. Here is the partial output of bdinfo:&lt;/P&gt;&lt;P&gt;arch_number = 0x00000000&lt;BR /&gt;boot_params = 0x00000000&lt;BR /&gt;DRAM bank = 0x00000000&lt;BR /&gt;-&amp;gt; start = 0x80000000&lt;BR /&gt;-&amp;gt; size = 0x7BE00000&lt;BR /&gt;Secure ram = 0xFBE00000&lt;BR /&gt;...&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Can you help me with this please? My goad is to build a bootable SD card image using the latest version of Yocto.&lt;/P&gt;</description>
    <pubDate>Sun, 21 Nov 2021 21:14:53 GMT</pubDate>
    <dc:creator>siravix</dc:creator>
    <dc:date>2021-11-21T21:14:53Z</dc:date>
    <item>
      <title>Bootable SD image for ls1046ardb</title>
      <link>https://community.nxp.com/t5/QorIQ/Bootable-SD-image-for-ls1046ardb/m-p/1374655#M10640</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I am trying to build a bootable SD card image for an OK1046A-C2 board (based on LS1046A).&lt;BR /&gt;The board has 2GB of DDR4 memory.&lt;/P&gt;&lt;P&gt;I tried both Yocto and flex_build 21.08.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;(1)&lt;BR /&gt;Yocto hardknott-3.3&lt;/P&gt;&lt;P&gt;conf/local.conf:&lt;BR /&gt;MACHINE ??= "ls1046ardb"&lt;/P&gt;&lt;P&gt;conf/bblayers.conf:&lt;BR /&gt;/workdir/poky/meta-freescale&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;(2)&lt;BR /&gt;I also built a composite firmware using flexbuild LSDK-21.08 for boot from SD card.&lt;/P&gt;&lt;P&gt;flex-builder -i mkfw -m ls1046ardb&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Neither can boot with the same error message:&lt;/P&gt;&lt;P&gt;ERROR: First slot cannot be empty.&lt;BR /&gt;ERROR: Parsing DIMM Error&lt;BR /&gt;ERROR: DDR init failed.&lt;BR /&gt;NOTICE: Incorrect DRAM0 size is defined in platform_def.h&lt;BR /&gt;ERROR: mmap_add_region_check() failed. error -22&lt;BR /&gt;ERROR: mmap_add_region_check() failed. error -22&lt;BR /&gt;NOTICE: BL2: v2.4(release):LSDK-21.08-0-g340b20bcb&lt;BR /&gt;NOTICE: BL2: Built : 21:57:48, Nov 21 2021&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;The dvice can be booted from SPI which already has an older bootloader. Here is the partial output of bdinfo:&lt;/P&gt;&lt;P&gt;arch_number = 0x00000000&lt;BR /&gt;boot_params = 0x00000000&lt;BR /&gt;DRAM bank = 0x00000000&lt;BR /&gt;-&amp;gt; start = 0x80000000&lt;BR /&gt;-&amp;gt; size = 0x7BE00000&lt;BR /&gt;Secure ram = 0xFBE00000&lt;BR /&gt;...&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Can you help me with this please? My goad is to build a bootable SD card image using the latest version of Yocto.&lt;/P&gt;</description>
      <pubDate>Sun, 21 Nov 2021 21:14:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/QorIQ/Bootable-SD-image-for-ls1046ardb/m-p/1374655#M10640</guid>
      <dc:creator>siravix</dc:creator>
      <dc:date>2021-11-21T21:14:53Z</dc:date>
    </item>
    <item>
      <title>Re: Bootable SD image for ls1046ardb</title>
      <link>https://community.nxp.com/t5/QorIQ/Bootable-SD-image-for-ls1046ardb/m-p/1374922#M10641</link>
      <description>&lt;P&gt;You need to modify DDR timing configuration in ATF source code for your custom board.&lt;/P&gt;
&lt;P&gt;In your Yocto build environment, please run the following command to fetch atf source code.&lt;/P&gt;
&lt;P&gt;1. $ bitbake atf -c cleansstate&lt;/P&gt;
&lt;P&gt;2. $ bitbake atf -c patch&lt;/P&gt;
&lt;P&gt;3. Go to atf source code folder&amp;nbsp;build_ls1046ardb/tmp/work/ls1046ardb-fsl-linux/atf/git-r0/git, please modify&amp;nbsp;plat/nxp/soc-ls1046/ls1046ardb/ddr_init.c according to your target board.&lt;/P&gt;
&lt;P&gt;If there is SPD on your target board, please modify the following section.&lt;/P&gt;
&lt;P&gt;static const struct rc_timing rce[] = {&lt;BR /&gt;{1600, 8, 7},&lt;BR /&gt;{1867, 8, 7},&lt;BR /&gt;{2134, 8, 9},&lt;BR /&gt;{}&lt;BR /&gt;};&lt;/P&gt;
&lt;P&gt;static const struct board_timing udimm[] = {&lt;BR /&gt;{0x04, rce, 0x01020304, 0x06070805},&lt;BR /&gt;};&lt;/P&gt;
&lt;P&gt;If there is no SPD on your custom board, please define&amp;nbsp;CONFIG_STATIC_DDR in&amp;nbsp;plat/nxp/soc-ls1046/ls1046ardb/platform_def.h, and modify&amp;nbsp;static_2100,&amp;nbsp;static_1800 or&amp;nbsp;static_1600 according to your target board.&lt;/P&gt;
&lt;P&gt;4. Rebuild atf&lt;/P&gt;
&lt;P&gt;$ bitbake atf -c configure -f&lt;/P&gt;
&lt;P&gt;5.&amp;nbsp;$ bitbake atf&lt;/P&gt;
&lt;P&gt;6. Go to step 3 to continue to do modification.&lt;/P&gt;
&lt;P&gt;According to your description, you have working u-boot on the target board, you could use CodeWarrior to connect to the target board to read DDR configuration parameters from the target board. In CodeWarrior IDE, please create a QCVS project with "reading from target" method, then get DDR configuration parameters in&amp;nbsp;ddr_init1.c in Generated_Code folder.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Nov 2021 09:30:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/QorIQ/Bootable-SD-image-for-ls1046ardb/m-p/1374922#M10641</guid>
      <dc:creator>yipingwang</dc:creator>
      <dc:date>2021-11-22T09:30:36Z</dc:date>
    </item>
  </channel>
</rss>

