<?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 imx8mp mmc_get_env_dev() issue in Other NXP Products</title>
    <link>https://community.nxp.com/t5/Other-NXP-Products/imx8mp-mmc-get-env-dev-issue/m-p/1800248#M20970</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;I am having an issue I hope you can help me with. As you know we are developing a custom imx8mp board based on the evk, BSP 6.1 langdale. Our board has an on-board eMMC and two SD card slots. We are wanting to use Linux fw_setenv command to set u-boot environment variables. We have placed the u-boot env in the EMMC boot1 partition. From Linux this works fine - I can see it there if I do an od-x /dev/mmcblk2boot1 | more. If we place this image on the eMMC everything works fine, however if we place it on and SD card and set the boot mode to boot from it on SD2 the mmc_get_env_dev returns 1, I think it should return 2. Because it tries to load the env from dev 1 and we get "&lt;SPAN&gt;&lt;SPAN class=""&gt;MMC partition switch failed&lt;/SPAN&gt;&lt;/SPAN&gt;". I added a lot of debug printf's but do not see where mmc_get_env_dev is getting the "1" from. As you can see from the code snippet attached I even try to set it to 2 in my board_init function but it does not change.&amp;nbsp; I have attached the console log, the board_init snippet and my defconfig, my uboot-config.cfg and my fw_env.config files.&lt;/P&gt;&lt;P&gt;I can send you the console log of it booting from eMMC if you need it.&lt;/P&gt;&lt;P&gt;Thanks for your help!&lt;/P&gt;&lt;P&gt;Rick&lt;/P&gt;</description>
    <pubDate>Thu, 01 Feb 2024 19:58:33 GMT</pubDate>
    <dc:creator>RickStievenart</dc:creator>
    <dc:date>2024-02-01T19:58:33Z</dc:date>
    <item>
      <title>imx8mp mmc_get_env_dev() issue</title>
      <link>https://community.nxp.com/t5/Other-NXP-Products/imx8mp-mmc-get-env-dev-issue/m-p/1800248#M20970</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;I am having an issue I hope you can help me with. As you know we are developing a custom imx8mp board based on the evk, BSP 6.1 langdale. Our board has an on-board eMMC and two SD card slots. We are wanting to use Linux fw_setenv command to set u-boot environment variables. We have placed the u-boot env in the EMMC boot1 partition. From Linux this works fine - I can see it there if I do an od-x /dev/mmcblk2boot1 | more. If we place this image on the eMMC everything works fine, however if we place it on and SD card and set the boot mode to boot from it on SD2 the mmc_get_env_dev returns 1, I think it should return 2. Because it tries to load the env from dev 1 and we get "&lt;SPAN&gt;&lt;SPAN class=""&gt;MMC partition switch failed&lt;/SPAN&gt;&lt;/SPAN&gt;". I added a lot of debug printf's but do not see where mmc_get_env_dev is getting the "1" from. As you can see from the code snippet attached I even try to set it to 2 in my board_init function but it does not change.&amp;nbsp; I have attached the console log, the board_init snippet and my defconfig, my uboot-config.cfg and my fw_env.config files.&lt;/P&gt;&lt;P&gt;I can send you the console log of it booting from eMMC if you need it.&lt;/P&gt;&lt;P&gt;Thanks for your help!&lt;/P&gt;&lt;P&gt;Rick&lt;/P&gt;</description>
      <pubDate>Thu, 01 Feb 2024 19:58:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Other-NXP-Products/imx8mp-mmc-get-env-dev-issue/m-p/1800248#M20970</guid>
      <dc:creator>RickStievenart</dc:creator>
      <dc:date>2024-02-01T19:58:33Z</dc:date>
    </item>
    <item>
      <title>Re: imx8mp mmc_get_env_dev() issue</title>
      <link>https://community.nxp.com/t5/Other-NXP-Products/imx8mp-mmc-get-env-dev-issue/m-p/1800966#M20994</link>
      <description>&lt;P&gt;Here is the boot log when I boot from eMMC.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Rick&lt;/P&gt;</description>
      <pubDate>Fri, 02 Feb 2024 15:52:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Other-NXP-Products/imx8mp-mmc-get-env-dev-issue/m-p/1800966#M20994</guid>
      <dc:creator>RickStievenart</dc:creator>
      <dc:date>2024-02-02T15:52:30Z</dc:date>
    </item>
    <item>
      <title>Re: imx8mp mmc_get_env_dev() issue</title>
      <link>https://community.nxp.com/t5/Other-NXP-Products/imx8mp-mmc-get-env-dev-issue/m-p/1800971#M20995</link>
      <description>&lt;P&gt;Also, I had the partition incorrectly set to 1, I have it set to 2 now which corresponds to boot1.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Rick&lt;/P&gt;</description>
      <pubDate>Fri, 02 Feb 2024 16:03:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Other-NXP-Products/imx8mp-mmc-get-env-dev-issue/m-p/1800971#M20995</guid>
      <dc:creator>RickStievenart</dc:creator>
      <dc:date>2024-02-02T16:03:07Z</dc:date>
    </item>
    <item>
      <title>Re: imx8mp mmc_get_env_dev() issue</title>
      <link>https://community.nxp.com/t5/Other-NXP-Products/imx8mp-mmc-get-env-dev-issue/m-p/1801938#M21020</link>
      <description>&lt;P&gt;Seems on your board, SD1 is mmc0, SD2 is mmc1 and eMMC is mmc2. If you want the return "dev" value of SD2 is 2, you may need to modify the mmc_get_env_dev() source code in u-boot.&lt;/P&gt;</description>
      <pubDate>Mon, 05 Feb 2024 13:48:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Other-NXP-Products/imx8mp-mmc-get-env-dev-issue/m-p/1801938#M21020</guid>
      <dc:creator>jimmychan</dc:creator>
      <dc:date>2024-02-05T13:48:47Z</dc:date>
    </item>
  </channel>
</rss>

