<?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: How to Load initramfs from SD Card (Single FAT32 Boot Partition) in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/How-to-Load-initramfs-from-SD-Card-Single-FAT32-Boot-Partition/m-p/2262961#M242894</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/151788"&gt;@Zhiming_Liu&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As per your guidance, I followed the procedure you shared.&lt;BR /&gt;I am able to &lt;STRONG&gt;successfully load the kernel Image and DTB&lt;/STRONG&gt;, but the &lt;STRONG&gt;initramfs (cpio.gz) root filesystem is not being loaded by the kernel&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;Below are the exact U-Boot commands and behavior.&lt;/P&gt;&lt;H3&gt;&lt;STRONG&gt;U-Boot Commands Used&lt;/STRONG&gt;&lt;/H3&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;SPAN&gt;u-boot=&amp;gt; setenv bootargs console=ttymxc1,115200 root=/dev/ram rw &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;SPAN&gt;u-boot=&amp;gt; fatload mmc 1:1 &lt;SPAN class=""&gt;${loadaddr}&lt;/SPAN&gt; Image_copy.gz 13450466 bytes &lt;SPAN class=""&gt;read&lt;/SPAN&gt; &lt;SPAN class=""&gt;in&lt;/SPAN&gt; 282 ms (45.5 MiB/s) &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;SPAN&gt;u-boot=&amp;gt; fatload mmc 1:1 &lt;SPAN class=""&gt;${fdt_addr}&lt;/SPAN&gt; imx8mp-evk.dtb 82784 bytes &lt;SPAN class=""&gt;read&lt;/SPAN&gt; &lt;SPAN class=""&gt;in&lt;/SPAN&gt; 4 ms (19.7 MiB/s) &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;SPAN&gt;u-boot=&amp;gt; fatload mmc 1:1 &lt;SPAN class=""&gt;${ramdisk_addr_r}&lt;/SPAN&gt; core-image-minimal-initramfs-imx8mp-ddr4-evk.cpio.gz 12602736 bytes &lt;SPAN class=""&gt;read&lt;/SPAN&gt; &lt;SPAN class=""&gt;in&lt;/SPAN&gt; 264 ms (45.5 MiB/s) &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;SPAN&gt;u-boot=&amp;gt; booti &lt;SPAN class=""&gt;${loadaddr}&lt;/SPAN&gt; &lt;SPAN class=""&gt;${ramdisk_addr_r}&lt;/SPAN&gt;:&lt;SPAN class=""&gt;${filesize}&lt;/SPAN&gt; &lt;SPAN class=""&gt;${fdt_addr}&lt;/SPAN&gt; &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;After executing the booti command, the &lt;STRONG&gt;kernel starts booting&lt;/STRONG&gt;, but it &lt;STRONG&gt;does not mount or use the initramfs (cpio.gz) as root filesystem&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;I have attached the full kernel boot log for reference.&lt;/P&gt;&lt;H3&gt;&lt;STRONG&gt;Questions&lt;/STRONG&gt;&lt;/H3&gt;&lt;OL&gt;&lt;LI&gt;&lt;P&gt;What could be the possible reasons for the kernel &lt;STRONG&gt;not loading the initramfs (cpio.gz)&lt;/STRONG&gt; even though it is correctly loaded into memory by U-Boot?&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;Are there any &lt;STRONG&gt;mandatory kernel configuration options&lt;/STRONG&gt; required for initramfs support that I should verify?&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;Is the bootargs configuration correct for booting with initramfs on i.MX8M Plus, or are additional parameters required?&lt;/P&gt;&lt;/LI&gt;&lt;/OL&gt;</description>
    <pubDate>Mon, 15 Dec 2025 16:24:46 GMT</pubDate>
    <dc:creator>NXP_USER_05</dc:creator>
    <dc:date>2025-12-15T16:24:46Z</dc:date>
    <item>
      <title>How to Load initramfs from SD Card (Single FAT32 Boot Partition)</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/How-to-Load-initramfs-from-SD-Card-Single-FAT32-Boot-Partition/m-p/2259345#M242811</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am working on &lt;STRONG&gt;&amp;nbsp;i.MX8M Plus EVK&amp;nbsp;&lt;/STRONG&gt;board and would like to boot Linux using &lt;STRONG&gt;initramfs &lt;/STRONG&gt;as the root filesystem, loaded directly from an &lt;STRONG&gt;SD card &lt;/STRONG&gt;boot partition only(FAT32).&amp;nbsp;&lt;/P&gt;&lt;P&gt;The SD card does &lt;STRONG&gt;not&lt;/STRONG&gt; contain a separate root filesystem partition.&lt;/P&gt;&lt;H3&gt;Current Setup&lt;/H3&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;SD card contains &lt;STRONG&gt;only one FAT32 boot partition&lt;/STRONG&gt;&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;Files present on the FAT32 partition:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;Image(U-boot+kernel)&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;Device Tree Blob (.dtb)&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;initramfs image&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;H3&gt;Questions&lt;/H3&gt;&lt;OL&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;initramfs Generation&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;What is the recommended method to generate an initramfs image?&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;Should initramfs be built into the kernel or loaded as a separate image?&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;How can initramfs be loaded from the SD card (FAT32 partition) using U-Boot?&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;U-Boot Environment Commands&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;What are the U-Boot commands or environment variables needed to&amp;nbsp;Load the kernel, device tree, and initramfs from SD.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Dec 2025 15:57:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/How-to-Load-initramfs-from-SD-Card-Single-FAT32-Boot-Partition/m-p/2259345#M242811</guid>
      <dc:creator>NXP_USER_05</dc:creator>
      <dc:date>2025-12-10T15:57:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to Load initramfs from SD Card (Single FAT32 Boot Partition)</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/How-to-Load-initramfs-from-SD-Card-Single-FAT32-Boot-Partition/m-p/2262293#M242883</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What is the recommended method to generate an initramfs image?&lt;/P&gt;
&lt;P&gt;--&amp;gt; You can build it with &lt;STRONG&gt;bitbake&amp;nbsp;core-image-minimal-initramfs &lt;/STRONG&gt;in Yocto.&lt;/P&gt;
&lt;P&gt;Should initramfs be built into the kernel or loaded as a separate image?&lt;/P&gt;
&lt;P&gt;--&amp;gt; It depends on your needs.&lt;/P&gt;
&lt;P&gt;How can initramfs be loaded from the SD card (FAT32 partition) using U-Boot?&lt;BR /&gt;--&amp;gt;Here is example:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;# If mmc0 is your sd card.
setenv bootargs console=ttymxc0,115200 root=/dev/ram rw
fatload mmc 0:1 ${loadaddr} Image
fatload mmc 0:1 ${fdt_addr} imx8mp-evk.dtb
fatload mmc 0:1 ${ramdisk_addr} xxxx_initramfs.cpio.gz
booti ${loadaddr} ${ramdisk_addr}:${filesize} ${fdt_addr}
&lt;/LI-CODE&gt;
&lt;P&gt;You can refer&amp;nbsp;board/beacon/imx8mn/imx8mn_beacon.env&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;boot_fdt=try
bootdelay=2
bootscript=echo Running bootscript from mmc ...; source
console=ttymxc1
fdt_addr=0x45000000
fdt_file=imx8mn-beacon-kit.dtb
finduuid=part uuid mmc ${mmcdev}:2 uuid
image=Image
initrd_addr=0x46000000
loadbootscript=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};
loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}
loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}
loadramdisk=load mmc ${mmcdev} ${ramdisk_addr} ${ramdiskimage}
mmcargs=setenv bootargs console=${console},${baudrate}  root=PARTUUID=${uuid} rootwait rw ${mtdparts} ${optargs}
mmcautodetect=yes
mmcboot=echo Booting from mmc ...; run finduuid; run mmcargs; if test ${boot_fdt} = yes || test ${boot_fdt} = try; then if run loadfdt; then booti ${loadaddr} - ${fdt_addr}; else echo WARN: Cannot load the DT; fi; else echo wait for boot; fi;
mmcdev=1
mmcpart=1
netargs=setenv bootargs console=${console},${baudrate}  root=/dev/nfs ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp
netboot=echo Booting from net ...; run netargs;  if test ${ip_dyn} = yes; then setenv get_cmd dhcp; else setenv get_cmd tftp; fi; ${get_cmd} ${loadaddr} ${image}; if test ${boot_fdt} = yes || test ${boot_fdt} = try; then if ${get_cmd} ${fdt_addr} ${fdt_file}; then booti ${loadaddr} - ${fdt_addr}; else echo WARN: Cannot load the DT; fi; else booti; fi;
ramargs=setenv bootargs console=${console},${baudrate}  root=/dev/ram rw  ${optargs}
ramboot=echo Booting from RAMdisk...; run loadimage; run loadfdt; fdt addr $fdt_addr; run loadramdisk; run ramargs; booti ${loadaddr} ${ramdisk_addr} ${fdt_addr} ${optargs}
ramdisk_addr=0x46000000
ramdiskimage=rootfs.cpio.uboot
script=boot.scr
&lt;/LI-CODE&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;Best Regards,&lt;BR /&gt;Zhiming&lt;/P&gt;</description>
      <pubDate>Mon, 15 Dec 2025 06:40:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/How-to-Load-initramfs-from-SD-Card-Single-FAT32-Boot-Partition/m-p/2262293#M242883</guid>
      <dc:creator>Zhiming_Liu</dc:creator>
      <dc:date>2025-12-15T06:40:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to Load initramfs from SD Card (Single FAT32 Boot Partition)</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/How-to-Load-initramfs-from-SD-Card-Single-FAT32-Boot-Partition/m-p/2262961#M242894</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/151788"&gt;@Zhiming_Liu&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As per your guidance, I followed the procedure you shared.&lt;BR /&gt;I am able to &lt;STRONG&gt;successfully load the kernel Image and DTB&lt;/STRONG&gt;, but the &lt;STRONG&gt;initramfs (cpio.gz) root filesystem is not being loaded by the kernel&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;Below are the exact U-Boot commands and behavior.&lt;/P&gt;&lt;H3&gt;&lt;STRONG&gt;U-Boot Commands Used&lt;/STRONG&gt;&lt;/H3&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;SPAN&gt;u-boot=&amp;gt; setenv bootargs console=ttymxc1,115200 root=/dev/ram rw &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;SPAN&gt;u-boot=&amp;gt; fatload mmc 1:1 &lt;SPAN class=""&gt;${loadaddr}&lt;/SPAN&gt; Image_copy.gz 13450466 bytes &lt;SPAN class=""&gt;read&lt;/SPAN&gt; &lt;SPAN class=""&gt;in&lt;/SPAN&gt; 282 ms (45.5 MiB/s) &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;SPAN&gt;u-boot=&amp;gt; fatload mmc 1:1 &lt;SPAN class=""&gt;${fdt_addr}&lt;/SPAN&gt; imx8mp-evk.dtb 82784 bytes &lt;SPAN class=""&gt;read&lt;/SPAN&gt; &lt;SPAN class=""&gt;in&lt;/SPAN&gt; 4 ms (19.7 MiB/s) &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;SPAN&gt;u-boot=&amp;gt; fatload mmc 1:1 &lt;SPAN class=""&gt;${ramdisk_addr_r}&lt;/SPAN&gt; core-image-minimal-initramfs-imx8mp-ddr4-evk.cpio.gz 12602736 bytes &lt;SPAN class=""&gt;read&lt;/SPAN&gt; &lt;SPAN class=""&gt;in&lt;/SPAN&gt; 264 ms (45.5 MiB/s) &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;SPAN&gt;u-boot=&amp;gt; booti &lt;SPAN class=""&gt;${loadaddr}&lt;/SPAN&gt; &lt;SPAN class=""&gt;${ramdisk_addr_r}&lt;/SPAN&gt;:&lt;SPAN class=""&gt;${filesize}&lt;/SPAN&gt; &lt;SPAN class=""&gt;${fdt_addr}&lt;/SPAN&gt; &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;After executing the booti command, the &lt;STRONG&gt;kernel starts booting&lt;/STRONG&gt;, but it &lt;STRONG&gt;does not mount or use the initramfs (cpio.gz) as root filesystem&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;I have attached the full kernel boot log for reference.&lt;/P&gt;&lt;H3&gt;&lt;STRONG&gt;Questions&lt;/STRONG&gt;&lt;/H3&gt;&lt;OL&gt;&lt;LI&gt;&lt;P&gt;What could be the possible reasons for the kernel &lt;STRONG&gt;not loading the initramfs (cpio.gz)&lt;/STRONG&gt; even though it is correctly loaded into memory by U-Boot?&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;Are there any &lt;STRONG&gt;mandatory kernel configuration options&lt;/STRONG&gt; required for initramfs support that I should verify?&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;Is the bootargs configuration correct for booting with initramfs on i.MX8M Plus, or are additional parameters required?&lt;/P&gt;&lt;/LI&gt;&lt;/OL&gt;</description>
      <pubDate>Mon, 15 Dec 2025 16:24:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/How-to-Load-initramfs-from-SD-Card-Single-FAT32-Boot-Partition/m-p/2262961#M242894</guid>
      <dc:creator>NXP_USER_05</dc:creator>
      <dc:date>2025-12-15T16:24:46Z</dc:date>
    </item>
  </channel>
</rss>

