<?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>i.MX Processors中的主题 Re: Using a statically compiled C file as rootfs</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/Using-a-statically-compiled-C-file-as-rootfs/m-p/410839#M61535</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Nabil,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You need a root filesystem in order for the kernel to locate your init program, and it will need to be named according to conventions (usually /init).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You even hinted at this in your question:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "&lt;SPAN style="color: #51626f; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;I put it in the &lt;/SPAN&gt;&lt;STRONG style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #51626f;"&gt;mmcblk0p1 ext4&lt;/STRONG&gt;&lt;SPAN style="color: #51626f; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt; partition..."&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;For this use case (highly specialized userspace), you'd normally want to use a RAM disk and have your boot loader load the ram disk and hand it off to the kernel. When doing this, you won't need a kernel command-line parameter specifying the root because it will be handed to the kernel by the boot loader.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 29 May 2015 14:24:46 GMT</pubDate>
    <dc:creator>EricNelson</dc:creator>
    <dc:date>2015-05-29T14:24:46Z</dc:date>
    <item>
      <title>Using a statically compiled C file as rootfs</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Using-a-statically-compiled-C-file-as-rootfs/m-p/410838#M61534</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P class="content"&gt;Hello guys !&lt;/P&gt;&lt;P class="content"&gt;&lt;/P&gt;&lt;P class="content"&gt;I want to boot my imx53-qsb board using not a normal rootfs but a &lt;STRONG&gt;statically&lt;/STRONG&gt; compiled &lt;EM&gt;hello_world.c&lt;/EM&gt; file in other words a &lt;EM&gt;hello_s.out&lt;/EM&gt;.&lt;/P&gt;&lt;P class="content"&gt;To achieve that, I wrote a &lt;EM&gt;hello_world.c&lt;/EM&gt; file cross compiled it statically to get my &lt;EM&gt;hello_s.out &lt;/EM&gt;I put it in the &lt;STRONG&gt;mmcblk0p1 ext4&lt;/STRONG&gt; partition of my sd card. I put my &lt;EM&gt;uImage&lt;/EM&gt; and my &lt;EM&gt;u-boot.imx&lt;/EM&gt; in the mmcblk0.&lt;/P&gt;&lt;P class="content"&gt;&lt;/P&gt;&lt;P class="content"&gt;I set after that my u-boot environment variables like this :&lt;/P&gt;&lt;P&gt;&lt;SPAN class="flash"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="content"&gt;&lt;EM&gt;setenv bootargs_base 'setenv bootargs console=ttymxc0,115200'&lt;SPAN class="flash"&gt;&lt;/SPAN&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P class="content"&gt;&lt;EM&gt;setenv bootargs_mmc root=/dev/mmcblk0p1 rw rootfstype=ext4 init=/hello_s.out&lt;SPAN class="flash"&gt;&lt;/SPAN&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P class="content"&gt;&lt;EM&gt;setenv bootcmd_mmc 'run bootargs_base bootargs_mmc;mmc dev 0;mmc read ${loadaddr} 0x800 0x4000;bootm'&lt;SPAN class="flash"&gt;&lt;/SPAN&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P class="content"&gt;&lt;EM&gt;setenv bootcmd 'run bootcmd_mmc'&lt;SPAN class="flash"&gt;&lt;/SPAN&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P class="content"&gt;&lt;EM&gt;saveenv&lt;SPAN class="flash"&gt;&lt;/SPAN&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P class="content"&gt;&lt;EM&gt;run bootcmd&lt;/EM&gt;&lt;SPAN class="flash"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="content"&gt;&lt;/P&gt;&lt;P class="content"&gt;&lt;SPAN class="flash"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="content"&gt;&lt;SPAN class="flash"&gt;But the board boots and i got an error :&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Please append a correct "root=" boot option; here are the available partitions:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;b300&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3872256 mmcblk0 driver: mmcblk&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; b301&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3868160 mmcblk0p1&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(2,0)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="flash"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="content"&gt;Any solution please ?&lt;SPAN class="flash"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 May 2015 14:15:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Using-a-statically-compiled-C-file-as-rootfs/m-p/410838#M61534</guid>
      <dc:creator>nabilb</dc:creator>
      <dc:date>2015-05-29T14:15:48Z</dc:date>
    </item>
    <item>
      <title>Re: Using a statically compiled C file as rootfs</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Using-a-statically-compiled-C-file-as-rootfs/m-p/410839#M61535</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Nabil,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You need a root filesystem in order for the kernel to locate your init program, and it will need to be named according to conventions (usually /init).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You even hinted at this in your question:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "&lt;SPAN style="color: #51626f; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;I put it in the &lt;/SPAN&gt;&lt;STRONG style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #51626f;"&gt;mmcblk0p1 ext4&lt;/STRONG&gt;&lt;SPAN style="color: #51626f; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt; partition..."&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;For this use case (highly specialized userspace), you'd normally want to use a RAM disk and have your boot loader load the ram disk and hand it off to the kernel. When doing this, you won't need a kernel command-line parameter specifying the root because it will be handed to the kernel by the boot loader.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 May 2015 14:24:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Using-a-statically-compiled-C-file-as-rootfs/m-p/410839#M61535</guid>
      <dc:creator>EricNelson</dc:creator>
      <dc:date>2015-05-29T14:24:46Z</dc:date>
    </item>
    <item>
      <title>Re: Using a statically compiled C file as rootfs</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Using-a-statically-compiled-C-file-as-rootfs/m-p/410840#M61536</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Eric, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your response.&lt;/P&gt;&lt;P&gt;But is it related to the version of the kernel that i am using ? Or to the board ? &lt;/P&gt;&lt;P&gt;Because I already did this with a beaglebone black and I didn't need the use of a ramdisk. I put the .out file directry in the partition and it worked.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 May 2015 14:36:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Using-a-statically-compiled-C-file-as-rootfs/m-p/410840#M61536</guid>
      <dc:creator>nabilb</dc:creator>
      <dc:date>2015-05-29T14:36:01Z</dc:date>
    </item>
    <item>
      <title>Re: Using a statically compiled C file as rootfs</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Using-a-statically-compiled-C-file-as-rootfs/m-p/410841#M61537</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Please check if Your kernel supports ext4. &lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Yuri&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Jun 2015 03:53:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Using-a-statically-compiled-C-file-as-rootfs/m-p/410841#M61537</guid>
      <dc:creator>Yuri</dc:creator>
      <dc:date>2015-06-01T03:53:09Z</dc:date>
    </item>
  </channel>
</rss>

