<?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: iMX8M Passing bootargs from U-Boot without using command line in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/iMX8M-Passing-bootargs-from-U-Boot-without-using-command-line/m-p/851501#M130290</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/bharatkumarbacha"&gt;bharatkumarbacha&lt;/A&gt;‌,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;Kindly find my answers inline :&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;I am trying to understand how the bootargs are being passed to the kernel from U-Boot. I am not interested in using U-Boot prompt to setup environment variables.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;When u-boot starts kernel code by bootm for example, it will pass the start address and end address of the command line string, and kernel takes it from there.&lt;/SPAN&gt;&lt;BR style="color: #51626f; background-color: #ffffff;" /&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;Is there any fixed address the kernel looks at? or Is it stored in some RAM location and the address is passed onto kernel through "x" registers?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; color: #000000;"&gt;Yes. U-Boot has it's predefined addresses from where the kernel gets the information about boot arguments. You can check the address in u-Boot source code - &amp;lt;uboot_src&amp;gt;/git/include/configs/&amp;lt;your_board.h&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; color: #000000;"&gt;The MACRO will be named as "CONFIG_ENV_OFFSET"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; color: #000000;"&gt;Hope this will help you.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 13 Mar 2019 12:19:44 GMT</pubDate>
    <dc:creator>radhikasomaiya</dc:creator>
    <dc:date>2019-03-13T12:19:44Z</dc:date>
    <item>
      <title>iMX8M Passing bootargs from U-Boot without using command line</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/iMX8M-Passing-bootargs-from-U-Boot-without-using-command-line/m-p/851500#M130289</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to understand how the bootargs are being passed to the kernel from U-Boot. I am not interested in using U-Boot prompt to setup environment variables.&lt;BR /&gt;Is there any fixed address the kernel looks at? or Is it stored in some RAM location and the address is passed onto kernel through "x" registers?&lt;/P&gt;&lt;P&gt;Board: iMX8M&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and Regards,&lt;BR /&gt;Bharat Kumar.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Mar 2019 14:34:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/iMX8M-Passing-bootargs-from-U-Boot-without-using-command-line/m-p/851500#M130289</guid>
      <dc:creator>bharatkumarbach</dc:creator>
      <dc:date>2019-03-12T14:34:34Z</dc:date>
    </item>
    <item>
      <title>Re: iMX8M Passing bootargs from U-Boot without using command line</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/iMX8M-Passing-bootargs-from-U-Boot-without-using-command-line/m-p/851501#M130290</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/bharatkumarbacha"&gt;bharatkumarbacha&lt;/A&gt;‌,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;Kindly find my answers inline :&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;I am trying to understand how the bootargs are being passed to the kernel from U-Boot. I am not interested in using U-Boot prompt to setup environment variables.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;When u-boot starts kernel code by bootm for example, it will pass the start address and end address of the command line string, and kernel takes it from there.&lt;/SPAN&gt;&lt;BR style="color: #51626f; background-color: #ffffff;" /&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;Is there any fixed address the kernel looks at? or Is it stored in some RAM location and the address is passed onto kernel through "x" registers?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; color: #000000;"&gt;Yes. U-Boot has it's predefined addresses from where the kernel gets the information about boot arguments. You can check the address in u-Boot source code - &amp;lt;uboot_src&amp;gt;/git/include/configs/&amp;lt;your_board.h&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; color: #000000;"&gt;The MACRO will be named as "CONFIG_ENV_OFFSET"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; color: #000000;"&gt;Hope this will help you.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Mar 2019 12:19:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/iMX8M-Passing-bootargs-from-U-Boot-without-using-command-line/m-p/851501#M130290</guid>
      <dc:creator>radhikasomaiya</dc:creator>
      <dc:date>2019-03-13T12:19:44Z</dc:date>
    </item>
    <item>
      <title>Re: iMX8M Passing bootargs from U-Boot without using command line</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/iMX8M-Passing-bootargs-from-U-Boot-without-using-command-line/m-p/851502#M130291</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/radhika.somaiya@volansystech.com"&gt;radhika.somaiya@volansystech.com&lt;/A&gt;‌,&lt;/P&gt;&lt;P&gt;Thanks for the quick response.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When u-boot starts kernel code by bootm for example, it will pass the start address and end address of the command line string, and kernel takes it from there.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;As per Kernel requirements, U-Boot uses 4 registers X0(FDT), X1(res), X2(res), and X3(res) to pass arguments. It would be of great help if you can brief about how the start and end addresses are passed to the kernel.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes. U-Boot has it's predefined addresses from where the kernel gets the information about boot arguments. You can check the address in u-Boot source code - &amp;lt;uboot_src&amp;gt;/git/include/configs/&amp;lt;your_board.h&amp;gt;&lt;/P&gt;&lt;P&gt;The MACRO will be named as "CONFIG_ENV_OFFSET"&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;I thought so and to verify it, I opened the boot prompt and entered the following commands.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;u-boot=&amp;gt;setenv bootargs root=/dev/mmcblk0p1&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;u-boot=&amp;gt;run bootargs&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Used the&amp;nbsp;following to read from MMC&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;u-boot=&amp;gt; mmc read &amp;lt;ram address&amp;gt; &amp;lt;Sector of&amp;nbsp;CONFIG_ENV_OFFSET&amp;gt; &amp;lt;CONFIG_ENV_SIZE/512&amp;gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;u-boot=&amp;gt;md.b &amp;lt;ram address&amp;gt; &amp;lt;CONFIG_ENV_SIZE&amp;gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;I expected the bootargs to be saved in the memory I read, but it was not the case unless I do&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;u-boot=&amp;gt; saveenv&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Usually, the kernel can be booted without calling saveenv and I wild guess bootargs are copied into RAM and passed.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Bharat Kumar Bacha.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Mar 2019 16:26:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/iMX8M-Passing-bootargs-from-U-Boot-without-using-command-line/m-p/851502#M130291</guid>
      <dc:creator>bharatkumarbach</dc:creator>
      <dc:date>2019-03-13T16:26:16Z</dc:date>
    </item>
    <item>
      <title>Re: iMX8M Passing bootargs from U-Boot without using command line</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/iMX8M-Passing-bootargs-from-U-Boot-without-using-command-line/m-p/851503#M130292</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;U-boot passes kernel command line arguments via /chosen node in DTS.&lt;/P&gt;&lt;P&gt;See &lt;A class="link-titled" href="https://www.kernel.org/doc/Documentation/devicetree/usage-model.txt" title="https://www.kernel.org/doc/Documentation/devicetree/usage-model.txt"&gt;https://www.kernel.org/doc/Documentation/devicetree/usage-model.txt&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Mar 2019 08:38:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/iMX8M-Passing-bootargs-from-U-Boot-without-using-command-line/m-p/851503#M130292</guid>
      <dc:creator>felixradensky</dc:creator>
      <dc:date>2019-03-14T08:38:37Z</dc:date>
    </item>
  </channel>
</rss>

