<?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: i.MX6 Linux: fw_printenv/fw_setenv problems in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/i-MX6-Linux-fw-printenv-fw-setenv-problems/m-p/657271#M100787</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am facing the same problem, however slightly different. If I use fw_setenv in user space, I get in u-boot: spi flash protected.&lt;/P&gt;&lt;P&gt;Has someone already solved this issue or should I use the workaround?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;Pieter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 19 Jun 2017 19:26:35 GMT</pubDate>
    <dc:creator>pietercardoen</dc:creator>
    <dc:date>2017-06-19T19:26:35Z</dc:date>
    <item>
      <title>i.MX6 Linux: fw_printenv/fw_setenv problems</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX6-Linux-fw-printenv-fw-setenv-problems/m-p/657266#M100782</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;Problem Statement:&lt;/STRONG&gt;&amp;nbsp;Problem in updating u-boot environment variables from Linux using fw_setenv/fw_printenv tools. I observed the following,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;What is working:&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Able to print environment variables without any problem&lt;/LI&gt;&lt;LI&gt;Able to modify a default environment variable&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;What is not working:&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Not able to create a new environment variables using fw_setenv. It is leading to Bad CRC issue when new variables are added&lt;/LI&gt;&lt;LI&gt;Not allowing more than one default environment variable to be modified in one power cycle. Modifying more than one variable is also leading to Bad CRC. If I modify one variable, reboot the system and then modify the second one then there is no issue&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Our Environment:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;We are using Yocto 2.1 - Linux 4.1 Freescale community BSP for our custom board based on Advantech Q7 - i.MX6 CPU module. The u-boot version is 2016.07. The u-boot binary and environment variables are stored in SPI NOR Flash (n25q032)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any one has faced similar issues?. Any pointers to debug this would be welcome.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Dec 2016 12:13:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX6-Linux-fw-printenv-fw-setenv-problems/m-p/657266#M100782</guid>
      <dc:creator>ganesank</dc:creator>
      <dc:date>2016-12-08T12:13:04Z</dc:date>
    </item>
    <item>
      <title>Re: i.MX6 Linux: fw_printenv/fw_setenv problems</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX6-Linux-fw-printenv-fw-setenv-problems/m-p/657267#M100783</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Could you show me the fw_env.config?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Dec 2016 08:27:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX6-Linux-fw-printenv-fw-setenv-problems/m-p/657267#M100783</guid>
      <dc:creator>jimmychan</dc:creator>
      <dc:date>2016-12-09T08:27:14Z</dc:date>
    </item>
    <item>
      <title>Re: i.MX6 Linux: fw_printenv/fw_setenv problems</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX6-Linux-fw-printenv-fw-setenv-problems/m-p/657268#M100784</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;fw_env.config:&lt;/P&gt;&lt;P&gt;/dev/mtd1 0x0000 0x2000 0x10000&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CONFIG_ENV_SIZE is set to (8 * 1024)&lt;/P&gt;&lt;P&gt;and sector size is 64 KBytes&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Dec 2016 10:56:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX6-Linux-fw-printenv-fw-setenv-problems/m-p/657268#M100784</guid>
      <dc:creator>ganesank</dc:creator>
      <dc:date>2016-12-09T10:56:32Z</dc:date>
    </item>
    <item>
      <title>Re: i.MX6 Linux: fw_printenv/fw_setenv problems</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX6-Linux-fw-printenv-fw-setenv-problems/m-p/657269#M100785</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you may try to set the ENV_SIZE to 0x10000.&lt;/P&gt;&lt;P&gt;If still not work, I think you can try to add some printk in the fw_env.c to see why CRC error happen when modify one more variable.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Dec 2016 08:19:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX6-Linux-fw-printenv-fw-setenv-problems/m-p/657269#M100785</guid>
      <dc:creator>jimmychan</dc:creator>
      <dc:date>2016-12-12T08:19:22Z</dc:date>
    </item>
    <item>
      <title>Re: i.MX6 Linux: fw_printenv/fw_setenv problems</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX6-Linux-fw-printenv-fw-setenv-problems/m-p/657270#M100786</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I found the root cause of this problem. The flash sectors are protected so it has to be unlocked before erase &amp;amp; write operations which I expected to be handled in fw_setenv tool. In fact I checked about it in the code and there are unlock and lock ioctl calls being made but it doesn't seem to work properly. I have to debug this further. Any suggestion is most welcome.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Workaround:&lt;/STRONG&gt; If I run "&lt;EM&gt;flash_unlock /dev/mtd1&lt;/EM&gt;" command before every "fw_setenv &amp;lt;var&amp;gt; &amp;lt;value&amp;gt;" command then all use-cases like multiple modifications and creation of new variables are working fine.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Dec 2016 09:53:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX6-Linux-fw-printenv-fw-setenv-problems/m-p/657270#M100786</guid>
      <dc:creator>ganesank</dc:creator>
      <dc:date>2016-12-13T09:53:14Z</dc:date>
    </item>
    <item>
      <title>Re: i.MX6 Linux: fw_printenv/fw_setenv problems</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX6-Linux-fw-printenv-fw-setenv-problems/m-p/657271#M100787</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am facing the same problem, however slightly different. If I use fw_setenv in user space, I get in u-boot: spi flash protected.&lt;/P&gt;&lt;P&gt;Has someone already solved this issue or should I use the workaround?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;Pieter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Jun 2017 19:26:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX6-Linux-fw-printenv-fw-setenv-problems/m-p/657271#M100787</guid>
      <dc:creator>pietercardoen</dc:creator>
      <dc:date>2017-06-19T19:26:35Z</dc:date>
    </item>
    <item>
      <title>Re: i.MX6 Linux: fw_printenv/fw_setenv problems</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX6-Linux-fw-printenv-fw-setenv-problems/m-p/657272#M100788</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Same as me. I can unlock the spi flash with the command&lt;/P&gt;&lt;P&gt;'sf protect unlock 0x0 &amp;lt;FLASH_SIZE&amp;gt;', &lt;/P&gt;&lt;P&gt;and after doing so I can change the value of an environment variable as often as I want in the bootloader cli, and exactly once in linux by running the 'fw_setenv' command. After this command, the SPI-flash is protected again.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does anyone know why the SPI flash gets locked? Is this somehow adjustable by a define during U-Boot configuration?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I use the u-boot-imx 2016.03&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Benjamin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Sep 2017 06:12:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX6-Linux-fw-printenv-fw-setenv-problems/m-p/657272#M100788</guid>
      <dc:creator>benjaminp</dc:creator>
      <dc:date>2017-09-06T06:12:19Z</dc:date>
    </item>
    <item>
      <title>Re: i.MX6 Linux: fw_printenv/fw_setenv problems</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX6-Linux-fw-printenv-fw-setenv-problems/m-p/657273#M100789</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I used a workaround. I searched for the code which is executed if saveenv is applied. At a certain point it tries to write to the SPI flash. Just before, I added a command to unprotect the SPI flash. So now every time I do saveenv, I first get the message: "Unprotecting SPI Flash".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe not the best way but it works.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;Pieter Cardoen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Sep 2017 07:05:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX6-Linux-fw-printenv-fw-setenv-problems/m-p/657273#M100789</guid>
      <dc:creator>pietercardoen</dc:creator>
      <dc:date>2017-09-06T07:05:50Z</dc:date>
    </item>
    <item>
      <title>Re: i.MX6 Linux: fw_printenv/fw_setenv problems</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX6-Linux-fw-printenv-fw-setenv-problems/m-p/657274#M100790</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Anyone has a valable solution for this one yet?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Jan 2019 12:48:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX6-Linux-fw-printenv-fw-setenv-problems/m-p/657274#M100790</guid>
      <dc:creator>woutervh</dc:creator>
      <dc:date>2019-01-14T12:48:27Z</dc:date>
    </item>
    <item>
      <title>Re: i.MX6 Linux: fw_printenv/fw_setenv problems</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX6-Linux-fw-printenv-fw-setenv-problems/m-p/657275#M100791</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;fw_setenv code from U-Boot assumes wrong protection scheme. SPI NOR usaually protects not sector by sector but a region beginning from bottom or top. So after first usage a complete region is protected. Maybe disabling the whole protection stuff in fw_setenv optionally if env is on SPI_NOR is a way to go. Maybe should be patched in U-Boot mainline?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Jan 2019 13:15:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX6-Linux-fw-printenv-fw-setenv-problems/m-p/657275#M100791</guid>
      <dc:creator>Niebel-TQ</dc:creator>
      <dc:date>2019-01-14T13:15:10Z</dc:date>
    </item>
    <item>
      <title>Re: i.MX6 Linux: fw_printenv/fw_setenv problems</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX6-Linux-fw-printenv-fw-setenv-problems/m-p/657276#M100792</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, maybe. But I'm a bit surprised we are having this issue. This question dates back to 2016... Nobody else is using spi nor for uboot environment storage? And why not?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Jan 2019 08:53:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX6-Linux-fw-printenv-fw-setenv-problems/m-p/657276#M100792</guid>
      <dc:creator>woutervh</dc:creator>
      <dc:date>2019-01-15T08:53:56Z</dc:date>
    </item>
  </channel>
</rss>

