<?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 write u-boot environment variables in mmcblk0boot0 instead of mmcblk0p1 in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/How-to-write-u-boot-environment-variables-in-mmcblk0boot0/m-p/419991#M63318</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;boot0, boot1 for emmc is the boot partition.&lt;/P&gt;&lt;P&gt;If you want to write it. you need to change the settings in&amp;nbsp; the boot config.&lt;/P&gt;&lt;P&gt;You can check the mfg tool to get some idea. How handle the emmc boot partition from linux.&lt;/P&gt;&lt;P&gt;In uboot, mmc command has sub command&amp;nbsp; mmc partconf for that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But it is very dangous if your design is to access the boot partition.&lt;/P&gt;&lt;P&gt;Keep it read only is the system level to protect uboot. that is also why emmc has boot partition. SD card doesn't have.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You need to arrage a&amp;nbsp; layout for your design.&lt;/P&gt;&lt;P&gt;For most of the products design, the environment is fixed in the code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Better to check the emmc spec for more details.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 17 Jul 2015 10:11:51 GMT</pubDate>
    <dc:creator>BiyongSUN</dc:creator>
    <dc:date>2015-07-17T10:11:51Z</dc:date>
    <item>
      <title>How to write u-boot environment variables in mmcblk0boot0 instead of mmcblk0p1</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/How-to-write-u-boot-environment-variables-in-mmcblk0boot0/m-p/419990#M63317</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm working on board bring-up of a custom iMX6 based board. I'm using the Android package from iMX6 Sabre SD board, and have got most of the things working with booting from eMMC which on on-board, but I'm facing issue with 'saveenv' of u-boot. &lt;BR /&gt; &lt;BR /&gt;Firstly, everytime on boot there is a print : &lt;BR /&gt; &lt;BR /&gt;*** Warning - bad CRC or MMC, using default environment &lt;BR /&gt; &lt;BR /&gt;I search online and found that we have to do 'saveenv' once to let this error go away. So I did saveenv but after that the board doesn't boot completely and got stuck on 'Uncompressing Linux ...' ! &lt;BR /&gt; &lt;BR /&gt;I then boot-up the board using SD card and got the hexdump of /dev/block/mmcblk0boot0 and /dev/block/mmcblk0p1 (both are eMMC partitions, SD card is dev/block/mmcblk1) &lt;BR /&gt; &lt;BR /&gt;To my surprise, from hexdump I found that 'saveenv' writes the environment variable data to /dev/block/mmcblk0p1 and not /dev/block/mmcblk0boot0 which was the reason the board didn't boot-up as boot.img is in dev/block/mmcblk0p1 partition was corrupted by u-boot doing saveenv and over-writing the boot.img data. &lt;BR /&gt; &lt;BR /&gt;So, my question is how can I change the u-boot code to modify it to read and save environment variables on /dev/block/mmcblk0boot0 instead of /dev/block/mmcblk0p1 &lt;BR /&gt; &lt;BR /&gt;I'm trying to dig into the code and so far I have found that common/env_mmc.c is the file which has all functions to read/write environment variables, and include/configs/mx6solo_sabresd.h includes the configuration of my board.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Jul 2015 07:13:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/How-to-write-u-boot-environment-variables-in-mmcblk0boot0/m-p/419990#M63317</guid>
      <dc:creator>kulbhushankashy</dc:creator>
      <dc:date>2015-07-17T07:13:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to write u-boot environment variables in mmcblk0boot0 instead of mmcblk0p1</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/How-to-write-u-boot-environment-variables-in-mmcblk0boot0/m-p/419991#M63318</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;boot0, boot1 for emmc is the boot partition.&lt;/P&gt;&lt;P&gt;If you want to write it. you need to change the settings in&amp;nbsp; the boot config.&lt;/P&gt;&lt;P&gt;You can check the mfg tool to get some idea. How handle the emmc boot partition from linux.&lt;/P&gt;&lt;P&gt;In uboot, mmc command has sub command&amp;nbsp; mmc partconf for that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But it is very dangous if your design is to access the boot partition.&lt;/P&gt;&lt;P&gt;Keep it read only is the system level to protect uboot. that is also why emmc has boot partition. SD card doesn't have.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You need to arrage a&amp;nbsp; layout for your design.&lt;/P&gt;&lt;P&gt;For most of the products design, the environment is fixed in the code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Better to check the emmc spec for more details.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Jul 2015 10:11:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/How-to-write-u-boot-environment-variables-in-mmcblk0boot0/m-p/419991#M63318</guid>
      <dc:creator>BiyongSUN</dc:creator>
      <dc:date>2015-07-17T10:11:51Z</dc:date>
    </item>
  </channel>
</rss>

