<?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 u-boot env CRC mismatch in Layerscape</title>
    <link>https://community.nxp.com/t5/Layerscape/u-boot-env-CRC-mismatch/m-p/1385851#M9640</link>
    <description>&lt;P&gt;Hi there :-).&lt;/P&gt;&lt;P&gt;I'm evaluating LS1028ARDB kit. I have setup Yocto/dunfell build for it.&lt;/P&gt;&lt;P&gt;It is very basic at the moment, consisting of following layers:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;distro: poky
machine: ls1028ardb

repos:

  poky:
    url: https://git.yoctoproject.org/git/poky
    refspec: 0839888394a6e42e96f9f0d201376eb38bc79b24
    layers:
      meta:
      meta-poky:
      meta-yocto-bsp:

  meta-openembedded:
    url: https://git.openembedded.org/meta-openembedded
    refspec: 7889158dcd187546fc5e99fd81d0779cad3e8d17
    layers:
      meta-oe:
      meta-python:
      meta-networking:
      
  meta-freescale:
    url: https://github.com/Freescale/meta-freescale.git
    refspec: 99bd73bec2a9d84509cb012a08f9062cb65fb24e

  meta-tr-layerscape:
    layers:
      meta-tr-layerscape:

local_conf_header:
  nxp_eula: |
        ACCEPT_FSL_EULA = "1"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Where meta-tr-layerscape contains:&lt;/P&gt;&lt;P&gt;* libubootenv install fw_env.config to /etc/&lt;/P&gt;&lt;P&gt;* u-boot, use mainline u-boot (however u-boot-qoriq give the same result),&amp;nbsp;&lt;/P&gt;&lt;P&gt;* u-boot, defconfig disable&amp;nbsp;&lt;SPAN&gt;CONFIG_ENV_IS_IN_SPI_FLASH, change bootargs root to SD partition.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;* add WKS file for WIC generation.&lt;/P&gt;&lt;P&gt;My problem is that libubootenv and u-boot env CRC calculation seems to be different.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;U-Boot 2020.01 (Jan 06 2020 - 20:56:31 +0000)

SoC:  LS1028AE Rev1.0 (0x870b0010)

&amp;lt;...&amp;gt;

MMC:   FSL_SDHC: 0, FSL_SDHC: 1
Loading Environment from MMC... *** Warning - bad CRC, using default environment

EEPROM: Invalid ID (ff ff ff ff)
&amp;lt;...&amp;gt;
=&amp;gt; setenv aaaasetvar u-boot
=&amp;gt; saveenv
Saving Environment to MMC... Writing to MMC(0)... OK
=&amp;gt; run sd_bootcmd 
Trying load from SD ...

&amp;lt;...&amp;gt;

root@ls1028ardb:~# cat /etc/fw_env.config 
# device name       Device offset   Env. size       Flash sector size       Number of sectors
/dev/mmcblk0        5242880         8192   

root@ls1028ardb:~# fw_printenv aaaasetvar
Cannot read environment, using default
aaaasetvar=
root@ls1028ardb:~# hexdump /dev/mmcblk0 -s 5242880 -n 128 -C
00500000  f3 13 e9 7c 61 61 61 61  73 65 74 76 61 72 3d 75  |...|aaaasetvar=u|
00500010  2d 62 6f 6f 74 00 61 72  63 68 3d 61 72 6d 00 62  |-boot.arch=arm.b|
00500020  61 75 64 72 61 74 65 3d  31 31 35 32 30 30 00 62  |audrate=115200.b|
00500030  6f 61 72 64 3d 6c 73 31  30 32 38 61 72 64 62 00  |oard=ls1028ardb.|
00500040  62 6f 61 72 64 5f 6e 61  6d 65 3d 6c 73 31 30 32  |board_name=ls102|
00500050  38 61 00 62 6f 6f 74 5f  61 5f 73 63 72 69 70 74  |8a.boot_a_script|
00500060  3d 6c 6f 61 64 20 24 7b  64 65 76 74 79 70 65 7d  |=load ${devtype}|
00500070  20 24 7b 64 65 76 6e 75  6d 7d 3a 24 7b 64 69 73  | ${devnum}:${dis|
00500080
root@ls1028ardb:~# fw_setenv aaaasetvar linux
Cannot read environment, using default
root@ls1028ardb:~# hexdump /dev/mmcblk0 -s 5242880 -n 128 -C
00500000  76 42 b0 d3 61 61 61 61  73 65 74 76 61 72 3d 6c  |vB..aaaasetvar=l|
00500010  69 6e 75 78 00 61 72 63  68 3d 61 72 6d 00 62 61  |inux.arch=arm.ba|
00500020  75 64 72 61 74 65 3d 31  31 35 32 30 30 00 62 6f  |udrate=115200.bo|
00500030  61 72 64 3d 6c 73 31 30  32 38 61 72 64 62 00 62  |ard=ls1028ardb.b|
00500040  6f 61 72 64 5f 6e 61 6d  65 3d 6c 73 31 30 32 38  |oard_name=ls1028|
00500050  61 00 62 6f 6f 74 5f 61  5f 73 63 72 69 70 74 3d  |a.boot_a_script=|
00500060  6c 6f 61 64 20 24 7b 64  65 76 74 79 70 65 7d 20  |load ${devtype} |
00500070  24 7b 64 65 76 6e 75 6d  7d 3a 24 7b 64 69 73 74  |${devnum}:${dist|&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So, from what I understand:&lt;/P&gt;&lt;P&gt;* Both u-boot and libubootenv refer to the same area of sdcard.&lt;/P&gt;&lt;P&gt;* Both are configured to NOT use redundant environment.&lt;/P&gt;&lt;P&gt;* What is not directly visible but I can confirm is that both u-boot and libubootenv use same env size which is 8192.&lt;/P&gt;&lt;P&gt;It seems to me that I have forget about something, or u-boot still use redundant env even after I disable it by defconfig. But I was not able find it on MMC1 and MTD.&lt;/P&gt;&lt;P&gt;I'm attaching both u-boot patches I'm using for my build, I dont think they can be related.&lt;/P&gt;&lt;P&gt;I've started with u-boot-qoriq initially, however I got same result.&lt;/P&gt;&lt;P&gt;Can someone please enlighten me please ?&lt;/P&gt;&lt;P&gt;Best Regards&lt;/P&gt;&lt;P&gt;Grzegorz Heldt.&lt;/P&gt;</description>
    <pubDate>Mon, 13 Dec 2021 20:45:43 GMT</pubDate>
    <dc:creator>GrzegorzHeldt</dc:creator>
    <dc:date>2021-12-13T20:45:43Z</dc:date>
    <item>
      <title>u-boot env CRC mismatch</title>
      <link>https://community.nxp.com/t5/Layerscape/u-boot-env-CRC-mismatch/m-p/1385851#M9640</link>
      <description>&lt;P&gt;Hi there :-).&lt;/P&gt;&lt;P&gt;I'm evaluating LS1028ARDB kit. I have setup Yocto/dunfell build for it.&lt;/P&gt;&lt;P&gt;It is very basic at the moment, consisting of following layers:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;distro: poky
machine: ls1028ardb

repos:

  poky:
    url: https://git.yoctoproject.org/git/poky
    refspec: 0839888394a6e42e96f9f0d201376eb38bc79b24
    layers:
      meta:
      meta-poky:
      meta-yocto-bsp:

  meta-openembedded:
    url: https://git.openembedded.org/meta-openembedded
    refspec: 7889158dcd187546fc5e99fd81d0779cad3e8d17
    layers:
      meta-oe:
      meta-python:
      meta-networking:
      
  meta-freescale:
    url: https://github.com/Freescale/meta-freescale.git
    refspec: 99bd73bec2a9d84509cb012a08f9062cb65fb24e

  meta-tr-layerscape:
    layers:
      meta-tr-layerscape:

local_conf_header:
  nxp_eula: |
        ACCEPT_FSL_EULA = "1"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Where meta-tr-layerscape contains:&lt;/P&gt;&lt;P&gt;* libubootenv install fw_env.config to /etc/&lt;/P&gt;&lt;P&gt;* u-boot, use mainline u-boot (however u-boot-qoriq give the same result),&amp;nbsp;&lt;/P&gt;&lt;P&gt;* u-boot, defconfig disable&amp;nbsp;&lt;SPAN&gt;CONFIG_ENV_IS_IN_SPI_FLASH, change bootargs root to SD partition.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;* add WKS file for WIC generation.&lt;/P&gt;&lt;P&gt;My problem is that libubootenv and u-boot env CRC calculation seems to be different.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;U-Boot 2020.01 (Jan 06 2020 - 20:56:31 +0000)

SoC:  LS1028AE Rev1.0 (0x870b0010)

&amp;lt;...&amp;gt;

MMC:   FSL_SDHC: 0, FSL_SDHC: 1
Loading Environment from MMC... *** Warning - bad CRC, using default environment

EEPROM: Invalid ID (ff ff ff ff)
&amp;lt;...&amp;gt;
=&amp;gt; setenv aaaasetvar u-boot
=&amp;gt; saveenv
Saving Environment to MMC... Writing to MMC(0)... OK
=&amp;gt; run sd_bootcmd 
Trying load from SD ...

&amp;lt;...&amp;gt;

root@ls1028ardb:~# cat /etc/fw_env.config 
# device name       Device offset   Env. size       Flash sector size       Number of sectors
/dev/mmcblk0        5242880         8192   

root@ls1028ardb:~# fw_printenv aaaasetvar
Cannot read environment, using default
aaaasetvar=
root@ls1028ardb:~# hexdump /dev/mmcblk0 -s 5242880 -n 128 -C
00500000  f3 13 e9 7c 61 61 61 61  73 65 74 76 61 72 3d 75  |...|aaaasetvar=u|
00500010  2d 62 6f 6f 74 00 61 72  63 68 3d 61 72 6d 00 62  |-boot.arch=arm.b|
00500020  61 75 64 72 61 74 65 3d  31 31 35 32 30 30 00 62  |audrate=115200.b|
00500030  6f 61 72 64 3d 6c 73 31  30 32 38 61 72 64 62 00  |oard=ls1028ardb.|
00500040  62 6f 61 72 64 5f 6e 61  6d 65 3d 6c 73 31 30 32  |board_name=ls102|
00500050  38 61 00 62 6f 6f 74 5f  61 5f 73 63 72 69 70 74  |8a.boot_a_script|
00500060  3d 6c 6f 61 64 20 24 7b  64 65 76 74 79 70 65 7d  |=load ${devtype}|
00500070  20 24 7b 64 65 76 6e 75  6d 7d 3a 24 7b 64 69 73  | ${devnum}:${dis|
00500080
root@ls1028ardb:~# fw_setenv aaaasetvar linux
Cannot read environment, using default
root@ls1028ardb:~# hexdump /dev/mmcblk0 -s 5242880 -n 128 -C
00500000  76 42 b0 d3 61 61 61 61  73 65 74 76 61 72 3d 6c  |vB..aaaasetvar=l|
00500010  69 6e 75 78 00 61 72 63  68 3d 61 72 6d 00 62 61  |inux.arch=arm.ba|
00500020  75 64 72 61 74 65 3d 31  31 35 32 30 30 00 62 6f  |udrate=115200.bo|
00500030  61 72 64 3d 6c 73 31 30  32 38 61 72 64 62 00 62  |ard=ls1028ardb.b|
00500040  6f 61 72 64 5f 6e 61 6d  65 3d 6c 73 31 30 32 38  |oard_name=ls1028|
00500050  61 00 62 6f 6f 74 5f 61  5f 73 63 72 69 70 74 3d  |a.boot_a_script=|
00500060  6c 6f 61 64 20 24 7b 64  65 76 74 79 70 65 7d 20  |load ${devtype} |
00500070  24 7b 64 65 76 6e 75 6d  7d 3a 24 7b 64 69 73 74  |${devnum}:${dist|&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So, from what I understand:&lt;/P&gt;&lt;P&gt;* Both u-boot and libubootenv refer to the same area of sdcard.&lt;/P&gt;&lt;P&gt;* Both are configured to NOT use redundant environment.&lt;/P&gt;&lt;P&gt;* What is not directly visible but I can confirm is that both u-boot and libubootenv use same env size which is 8192.&lt;/P&gt;&lt;P&gt;It seems to me that I have forget about something, or u-boot still use redundant env even after I disable it by defconfig. But I was not able find it on MMC1 and MTD.&lt;/P&gt;&lt;P&gt;I'm attaching both u-boot patches I'm using for my build, I dont think they can be related.&lt;/P&gt;&lt;P&gt;I've started with u-boot-qoriq initially, however I got same result.&lt;/P&gt;&lt;P&gt;Can someone please enlighten me please ?&lt;/P&gt;&lt;P&gt;Best Regards&lt;/P&gt;&lt;P&gt;Grzegorz Heldt.&lt;/P&gt;</description>
      <pubDate>Mon, 13 Dec 2021 20:45:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Layerscape/u-boot-env-CRC-mismatch/m-p/1385851#M9640</guid>
      <dc:creator>GrzegorzHeldt</dc:creator>
      <dc:date>2021-12-13T20:45:43Z</dc:date>
    </item>
    <item>
      <title>Re: u-boot env CRC mismatch</title>
      <link>https://community.nxp.com/t5/Layerscape/u-boot-env-CRC-mismatch/m-p/1391203#M9689</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Please execute the following operations under u-boot.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;=&amp;gt; env default -a&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;## Resetting to default environment&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;=&amp;gt; saveenv&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Saving Environment to MMC... Writing to MMC(0)... OK&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;=&amp;gt; qixis_reset sd&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Dec 2021 08:06:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Layerscape/u-boot-env-CRC-mismatch/m-p/1391203#M9689</guid>
      <dc:creator>yipingwang</dc:creator>
      <dc:date>2021-12-23T08:06:38Z</dc:date>
    </item>
    <item>
      <title>Re: u-boot env CRC mismatch</title>
      <link>https://community.nxp.com/t5/Layerscape/u-boot-env-CRC-mismatch/m-p/1391249#M9691</link>
      <description>&lt;P&gt;Thank you for your help.&lt;/P&gt;&lt;P&gt;Cannot check it at the moment, will do it on Monday.&lt;/P&gt;&lt;P&gt;Anyway, could you please elaborate on how resetting SD can help, please?&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would be very glad to understand.&lt;/P&gt;</description>
      <pubDate>Thu, 23 Dec 2021 09:15:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Layerscape/u-boot-env-CRC-mismatch/m-p/1391249#M9691</guid>
      <dc:creator>GrzegorzHeldt</dc:creator>
      <dc:date>2021-12-23T09:15:40Z</dc:date>
    </item>
    <item>
      <title>Re: u-boot env CRC mismatch</title>
      <link>https://community.nxp.com/t5/Layerscape/u-boot-env-CRC-mismatch/m-p/1392594#M9734</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/52411"&gt;@yipingwang&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have followed your advice. Not sure what to expect, to be honest.&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;=&amp;gt; env default -a&lt;BR /&gt;## Resetting to default environment&lt;BR /&gt;=&amp;gt; saveenv&lt;BR /&gt;Saving Environment to MMC... Writing to MMC(0)... OK&lt;BR /&gt;=&amp;gt; qixis_reset sd&lt;BR /&gt;=&amp;gt; NOTICE: Fixed DDR on board&lt;/P&gt;&lt;P&gt;NOTICE: 4 GB DDR4, 32-bit, CL=11, ECC on&lt;BR /&gt;NOTICE: BL2: v1.5(release):LSDK-20.04-update-290520&lt;BR /&gt;NOTICE: BL2: Built : 13:52:31, May 18 2020&lt;BR /&gt;NOTICE: BL31: v1.5(release):LSDK-20.04-update-290520&lt;BR /&gt;NOTICE: BL31: Built : 13:52:31, May 18 2020&lt;BR /&gt;NOTICE: Welcome to LS1028 BL31 Phase&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;U-Boot 2020.01 (Jan 06 2020 - 20:56:31 +0000)&lt;/P&gt;&lt;P&gt;SoC: LS1028AE Rev1.0 (0x870b0010)&lt;BR /&gt;Clock Configuration:&lt;BR /&gt;CPU0(A72):1500 MHz CPU1(A72):1500 MHz&lt;BR /&gt;Bus: 400 MHz DDR: 1600 MT/s&lt;BR /&gt;Reset Configuration Word (RCW):&lt;BR /&gt;00000000: 3c004010 00000030 00000000 00000000&lt;BR /&gt;00000010: 00000000 018f0000 0030c000 00000000&lt;BR /&gt;00000020: 01e031a0 00002580 00000000 00003296&lt;BR /&gt;00000030: 00000000 00000010 00000000 00000000&lt;BR /&gt;00000040: 00000000 00000000 00000000 00000000&lt;BR /&gt;00000050: 00000000 00000000 00000000 00000000&lt;BR /&gt;00000060: 00000000 00000000 200e705a 00000000&lt;BR /&gt;00000070: bb580000 00000000&lt;BR /&gt;Model: NXP Layerscape 1028a RDB Board&lt;BR /&gt;Board: LS1028AE Rev1.0-RDB, Version: C, boot from SD&lt;BR /&gt;FPGA: v8 (RDB)&lt;BR /&gt;SERDES1 Reference : Clock1 = 100.00MHz Clock2 = 100.00MHz&lt;BR /&gt;DRAM: 3.9 GiB&lt;BR /&gt;DDR 3.9 GiB (DDR4, 32-bit, CL=11, ECC on)&lt;BR /&gt;Using SERDES1 Protocol: 47960 (0xbb58)&lt;BR /&gt;PCIe0: pcie@3400000 Root Complex: no link&lt;BR /&gt;PCIe1: pcie@3500000 Root Complex: no link&lt;BR /&gt;WDT: Started with servicing (60s timeout)&lt;BR /&gt;MMC: FSL_SDHC: 0, FSL_SDHC: 1&lt;BR /&gt;Loading Environment from MMC... OK&lt;BR /&gt;EEPROM: Invalid ID (ff ff ff ff)&lt;BR /&gt;In: serial&lt;BR /&gt;Out: serial&lt;BR /&gt;Err: serial&lt;BR /&gt;Net:&lt;BR /&gt;Warning: enetc-0 (eth0) using random MAC address - ba:51:30:48:a2:29&lt;BR /&gt;eth0: enetc-0&lt;BR /&gt;Warning: enetc-2 (eth1) using random MAC address - ba:01:0d:4c:6f:11&lt;BR /&gt;, eth1: enetc-2&lt;BR /&gt;Warning: enetc-6 (eth2) using random MAC address - 92:54:af:87:72:f9&lt;BR /&gt;, eth2: enetc-6&lt;BR /&gt;=&amp;gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Dec 2021 08:57:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Layerscape/u-boot-env-CRC-mismatch/m-p/1392594#M9734</guid>
      <dc:creator>GrzegorzHeldt</dc:creator>
      <dc:date>2021-12-28T08:57:00Z</dc:date>
    </item>
    <item>
      <title>Re: u-boot env CRC mismatch</title>
      <link>https://community.nxp.com/t5/Layerscape/u-boot-env-CRC-mismatch/m-p/1392603#M9736</link>
      <description>&lt;P&gt;There is no the following error in u-boot log.&lt;/P&gt;
&lt;PRE class="lia-code-sample  language-markup"&gt;&lt;CODE&gt;Loading Environment from MMC... *** Warning - bad CRC, using default environment&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 28 Dec 2021 09:09:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Layerscape/u-boot-env-CRC-mismatch/m-p/1392603#M9736</guid>
      <dc:creator>yipingwang</dc:creator>
      <dc:date>2021-12-28T09:09:03Z</dc:date>
    </item>
    <item>
      <title>Re: u-boot env CRC mismatch</title>
      <link>https://community.nxp.com/t5/Layerscape/u-boot-env-CRC-mismatch/m-p/1392637#M9737</link>
      <description>&lt;P&gt;Dear&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/52411"&gt;@yipingwang&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yes, there is no warning message anymore.&lt;/P&gt;&lt;P&gt;However, that has nothing to do with the problem I've described.&lt;/P&gt;</description>
      <pubDate>Tue, 28 Dec 2021 09:59:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Layerscape/u-boot-env-CRC-mismatch/m-p/1392637#M9737</guid>
      <dc:creator>GrzegorzHeldt</dc:creator>
      <dc:date>2021-12-28T09:59:53Z</dc:date>
    </item>
    <item>
      <title>Re: u-boot env CRC mismatch</title>
      <link>https://community.nxp.com/t5/Layerscape/u-boot-env-CRC-mismatch/m-p/1393055#M9749</link>
      <description>&lt;P&gt;Hello.&lt;/P&gt;&lt;P&gt;I will try to improve the issue description.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The problem is related to the cooperation of u-boot and libubootenv, where the environment is shared between these two components.&lt;/P&gt;&lt;P&gt;I'm aware of fact that the environment has to be initialized, which can be made using the steps you have suggested. And that works.&lt;/P&gt;&lt;P&gt;However then, when you start Linux and need to modify some variable at Linux prompt level, libubootenv (fw_printenv/fw_setenv) utilities report CRC error of environment.&lt;/P&gt;&lt;P&gt;At this point, it is possible to reinitialize the environment and set/read it using fw_utils.&lt;/P&gt;&lt;P&gt;However, when you enter u-boot again, bad CRC is reported AGAIN.&lt;/P&gt;&lt;P&gt;This at the end of the day makes it impossible to manage u-boot-env from Linux userspace, making it impossible to use frameworks like swupdate as an example.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The standard scenario is:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;initialize environment from u-boot or from userspace using libubootenv, depended on your use-case (both should work)&lt;/LI&gt;&lt;LI&gt;then it is possible to read, change environment from both libubootenv and u-boot.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best Regards&lt;/P&gt;&lt;P&gt;Greg.&lt;/P&gt;</description>
      <pubDate>Wed, 29 Dec 2021 12:28:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Layerscape/u-boot-env-CRC-mismatch/m-p/1393055#M9749</guid>
      <dc:creator>GrzegorzHeldt</dc:creator>
      <dc:date>2021-12-29T12:28:50Z</dc:date>
    </item>
    <item>
      <title>Re: u-boot env CRC mismatch</title>
      <link>https://community.nxp.com/t5/Layerscape/u-boot-env-CRC-mismatch/m-p/1393332#M9754</link>
      <description>&lt;P&gt;Please configure&amp;nbsp;/etc/fw_env.config as the following&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;# device name       Device offset   Env. size       Flash sector size       Number of sectors
/dev/mmcblk0        0x500000        0x2000   &lt;/LI-CODE&gt;&lt;P&gt;In addition, please use u-boot(atf) image from Yocto&amp;nbsp;dunfell release.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 30 Dec 2021 10:08:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Layerscape/u-boot-env-CRC-mismatch/m-p/1393332#M9754</guid>
      <dc:creator>yipingwang</dc:creator>
      <dc:date>2021-12-30T10:08:45Z</dc:date>
    </item>
    <item>
      <title>Re: u-boot env CRC mismatch</title>
      <link>https://community.nxp.com/t5/Layerscape/u-boot-env-CRC-mismatch/m-p/1393334#M9755</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/52411"&gt;@yipingwang&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As you see in very first message, I'm already using same configuration of fw_env.config:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;root@ls1028ardb:~# cat /etc/fw_env.config 
# device name       Device offset   Env. size       Flash sector size       Number of sectors
/dev/mmcblk0        5242880         8192   &lt;/LI-CODE&gt;&lt;P&gt;as 0x500000 is equal to 5242880 and 0x2000 is equal to 8912.&lt;/P&gt;&lt;P&gt;I have also tried u-boot specified by both poky@dunfell with u-boot as well as &lt;A href="mailto:meta-freescale@dunfell" target="_blank"&gt;meta-freescale@dunfell&lt;/A&gt;&amp;nbsp;with u-boot-qoriq, and the result is exactly the same.&lt;/P&gt;</description>
      <pubDate>Thu, 30 Dec 2021 10:29:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Layerscape/u-boot-env-CRC-mismatch/m-p/1393334#M9755</guid>
      <dc:creator>GrzegorzHeldt</dc:creator>
      <dc:date>2021-12-30T10:29:53Z</dc:date>
    </item>
    <item>
      <title>Re: u-boot env CRC mismatch</title>
      <link>https://community.nxp.com/t5/Layerscape/u-boot-env-CRC-mismatch/m-p/1393452#M9758</link>
      <description>&lt;P&gt;Please refer to my console log on ls1028ardb as the following, I didn't reproduce your problem.&lt;/P&gt;&lt;P&gt;root@ls1028ardb:~# touch /etc/u-boot-initial-env&lt;BR /&gt;root@ls1028ardb:~# vi /etc/fw_env.config&lt;BR /&gt;root@ls1028ardb:~# cat /etc/fw_env.config&lt;BR /&gt;# device name Device offset Env. size Flash sector size Number of sectors&lt;BR /&gt;/dev/mmcblk0 0x500000 0x2000&lt;BR /&gt;root@ls1028ardb:~# ./fw_setenv aaaasetvar linux&lt;BR /&gt;root@ls1028ardb:~# hexdump /dev/mmcblk0 -s 5242880 -n 128 -C&lt;BR /&gt;00500000 a4 f6 ef fe 61 61 61 61 73 65 74 76 61 72 3d 6c |....aaaasetvar=l|&lt;BR /&gt;00500010 69 6e 75 78 00 61 72 63 68 3d 61 72 6d 00 62 61 |inux.arch=arm.ba|&lt;BR /&gt;00500020 75 64 72 61 74 65 3d 31 31 35 32 30 30 00 62 6f |udrate=115200.bo|&lt;BR /&gt;00500030 61 72 64 3d 6c 73 31 30 32 38 61 72 64 62 00 62 |ard=ls1028ardb.b|&lt;BR /&gt;00500040 6f 61 72 64 5f 6e 61 6d 65 3d 6c 73 31 30 32 38 |oard_name=ls1028|&lt;BR /&gt;00500050 61 00 62 6f 6f 74 5f 61 5f 73 63 72 69 70 74 3d |a.boot_a_script=|&lt;BR /&gt;00500060 6c 6f 61 64 20 24 7b 64 65 76 74 79 70 65 7d 20 |load ${devtype} |&lt;BR /&gt;00500070 24 7b 64 65 76 6e 75 6d 7d 3a 24 7b 64 69 73 74 |${devnum}:${dist|&lt;BR /&gt;00500080&lt;BR /&gt;root@ls1028ardb:~# reboot&lt;/P&gt;&lt;P&gt;INIT: Sending processes configured via /etc/inittab the TERM signal&lt;BR /&gt;root@ls1028ardb:~# Stopping OpenBSD Secure Shell server: sshdstopped /usr/sbin/sshd (pid 918)&lt;BR /&gt;.&lt;BR /&gt;Stopping network benchmark server: netserverstopped /usr/sbin/netserver (pid 925)&lt;BR /&gt;.&lt;BR /&gt;Stopping system log daemon...0&lt;BR /&gt;Stopping internet superserver: xinetd.&lt;BR /&gt;Stopping random number generator daemon.&lt;BR /&gt;Deconfiguring network interfaces... done.&lt;BR /&gt;Stopping watchdog daemon...Sending all processes the TERM signal...&lt;BR /&gt;Sending all processes the KILL signal...&lt;BR /&gt;Unmounting remote filesystems...&lt;BR /&gt;Deactivating swap...&lt;BR /&gt;Unmounting local filesystems...&lt;BR /&gt;[ 362.558936] EXT4-fs (ram0): re-mounted. Opts: (null)&lt;BR /&gt;Rebooting... [ 362.573535] kvm: exiting hardware virtualization&lt;BR /&gt;[ 362.638300] reboot: Restarting system&lt;BR /&gt;NOTICE: Fixed DDR on board&lt;/P&gt;&lt;P&gt;NOTICE: 4 GB DDR4, 32-bit, CL=11, ECC on&lt;BR /&gt;NOTICE: BL2: v2.4(release):lf-5.10.72-2.2.0-16-gf3b196f23&lt;BR /&gt;NOTICE: BL2: Built : 07:51:09, Dec 22 2021&lt;BR /&gt;NOTICE: BL2: Booting BL31&lt;BR /&gt;NOTICE: BL31: v2.4(release):lf-5.10.72-2.2.0-16-gf3b196f23&lt;BR /&gt;NOTICE: BL31: Built : 07:51:09, Dec 22 2021&lt;BR /&gt;NOTICE: Welcome to ls1028ardb BL31 Phase&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;U-Boot 2021.04+fsl+gd65732ae99 (Dec 29 2021 - 08:16:57 +0000)&lt;/P&gt;&lt;P&gt;SoC: LS1028AE Rev1.0 (0x870b0010)&lt;BR /&gt;Clock Configuration:&lt;BR /&gt;CPU0(A72):1500 MHz CPU1(A72):1500 MHz&lt;BR /&gt;Bus: 400 MHz DDR: 1600 MT/s&lt;BR /&gt;Reset Configuration Word (RCW):&lt;BR /&gt;00000000: 3c004010 00000030 00000000 00000000&lt;BR /&gt;00000010: 00000000 018f0000 0030c000 00000000&lt;BR /&gt;00000020: 020031a0 00002580 00000000 00003296&lt;BR /&gt;00000030: 00000000 00000010 00000000 00000000&lt;BR /&gt;00000040: 00000000 00000000 00000000 00000000&lt;BR /&gt;00000050: 00000000 00000000 00000000 00000000&lt;BR /&gt;00000060: 00000000 00000000 200e705a 00000000&lt;BR /&gt;00000070: bb580000 00000000&lt;BR /&gt;Model: NXP Layerscape 1028a RDB Board&lt;BR /&gt;Board: LS1028AE Rev1.0-RDB, Version: C, boot from NOR&lt;BR /&gt;FPGA: v6 (RDB)&lt;BR /&gt;SERDES1 Reference : Clock1 = 100.00MHz Clock2 = 100.00MHz&lt;BR /&gt;DRAM: 3.9 GiB&lt;BR /&gt;DDR 3.9 GiB (DDR4, 32-bit, CL=11, ECC on)&lt;BR /&gt;Using SERDES1 Protocol: 47960 (0xbb58)&lt;BR /&gt;PCIe1: pcie@3400000 Root Complex: no link&lt;BR /&gt;PCIe2: pcie@3500000 Root Complex: no link&lt;BR /&gt;WDT: Started with servicing (60s timeout)&lt;BR /&gt;MMC: FSL_SDHC: 0, FSL_SDHC: 1&lt;BR /&gt;Loading Environment from SPIFlash... SF: Detected mt35xu02g with page size 256 Bytes, erase size 128 KiB, total 256 MiB&lt;BR /&gt;OK&lt;BR /&gt;EEPROM: NXID v1&lt;BR /&gt;In: serial&lt;BR /&gt;Out: serial&lt;BR /&gt;Err: serial&lt;BR /&gt;SEC0: RNG instantiated&lt;BR /&gt;Net: eth0: enetc-0, eth1: enetc-2, eth2: swp0, eth3: swp1, eth4: swp2, eth5: swp3&lt;BR /&gt;=&amp;gt; qixis_reset sd&lt;BR /&gt;=&amp;gt; NOTICE: Fixed DDR on board&lt;/P&gt;&lt;P&gt;NOTICE: 4 GB DDR4, 32-bit, CL=11, ECC on&lt;BR /&gt;NOTICE: BL2: v1.5(release):LSDK-20.04-update-290520&lt;BR /&gt;NOTICE: BL2: Built : 13:52:31, May 18 2020&lt;BR /&gt;NOTICE: BL31: v1.5(release):LSDK-20.04-update-290520&lt;BR /&gt;NOTICE: BL31: Built : 13:52:31, May 18 2020&lt;BR /&gt;NOTICE: Welcome to LS1028 BL31 Phase&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;U-Boot 2019.10+fsl+g1e55b2f9e7 (May 26 2020 - 06:54:57 +0000)&lt;/P&gt;&lt;P&gt;SoC: LS1028AE Rev1.0 (0x870b0010)&lt;BR /&gt;Clock Configuration:&lt;BR /&gt;CPU0(A72):1500 MHz CPU1(A72):1500 MHz&lt;BR /&gt;Bus: 400 MHz DDR: 1600 MT/s&lt;BR /&gt;Reset Configuration Word (RCW):&lt;BR /&gt;00000000: 3c004010 00000030 00000000 00000000&lt;BR /&gt;00000010: 00000000 018f0000 0030c000 00000000&lt;BR /&gt;00000020: 01e031a0 00002580 00000000 00003296&lt;BR /&gt;00000030: 00000000 00000010 00000000 00000000&lt;BR /&gt;00000040: 00000000 00000000 00000000 00000000&lt;BR /&gt;00000050: 00000000 00000000 00000000 00000000&lt;BR /&gt;00000060: 00000000 00000000 200e705a 00000000&lt;BR /&gt;00000070: bb580000 00000000&lt;BR /&gt;Model: NXP Layerscape 1028a RDB Board&lt;BR /&gt;Board: LS1028AE Rev1.0-RDB, Version: C, boot from SD&lt;BR /&gt;FPGA: v6 (RDB)&lt;BR /&gt;SERDES1 Reference : Clock1 = 100.00MHz Clock2 = 100.00MHz&lt;BR /&gt;DRAM: 3.9 GiB&lt;BR /&gt;DDR 3.9 GiB (DDR4, 32-bit, CL=11, ECC on)&lt;BR /&gt;Using SERDES1 Protocol: 47960 (0xbb58)&lt;BR /&gt;PCIe0: pcie@3400000 Root Complex: no link&lt;BR /&gt;PCIe1: pcie@3500000 Root Complex: no link&lt;BR /&gt;WDT: Started with servicing (60s timeout)&lt;BR /&gt;MMC: FSL_SDHC: 0, FSL_SDHC: 1&lt;BR /&gt;Loading Environment from MMC... OK&lt;BR /&gt;EEPROM: NXID v1&lt;BR /&gt;In: serial&lt;BR /&gt;Out: serial&lt;BR /&gt;Err: serial&lt;BR /&gt;Net: eth0: enetc-0, eth2: enetc-2, eth4: felix-switch@0, eth5: felix-switch@1, eth6: felix-switch@2, eth7: felix-switch@3, eth8: felix-switch@4&lt;BR /&gt;=&amp;gt; pri aaaasetvar&lt;BR /&gt;aaaasetvar=linux&lt;BR /&gt;=&amp;gt;&lt;/P&gt;</description>
      <pubDate>Fri, 31 Dec 2021 04:00:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Layerscape/u-boot-env-CRC-mismatch/m-p/1393452#M9758</guid>
      <dc:creator>yipingwang</dc:creator>
      <dc:date>2021-12-31T04:00:27Z</dc:date>
    </item>
    <item>
      <title>Re: u-boot env CRC mismatch</title>
      <link>https://community.nxp.com/t5/Layerscape/u-boot-env-CRC-mismatch/m-p/1393512#M9760</link>
      <description>&lt;P&gt;That is really good info.&lt;/P&gt;&lt;P&gt;Could you please share the set of layers and the versions that you have used to build this image?&lt;/P&gt;&lt;P&gt;This way I can build it on my side, check if it works for me, and understand the differences between your and my config.&lt;/P&gt;&lt;P&gt;In general, I've used versions described in this manual:&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.nxp.com/docs/en/user-guide/LSDKYOCTOUG.pdf" target="_blank" rel="noopener"&gt;https://www.nxp.com/docs/en/user-guide/LSDKYOCTOUG.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;but make it minimal, skipping some layers and added libubootenv tools.&lt;/P&gt;&lt;P&gt;I assume your setup must be a bit different, as there is no libubootenv in original setup.&lt;/P&gt;&lt;P&gt;If you can provide your's:&lt;/P&gt;&lt;P&gt;build/conf/bblayers.conf&lt;/P&gt;&lt;P&gt;build/conf/local.conf&lt;/P&gt;&lt;P&gt;and SHA-versions of the layers you've used, then most likely my problem can still be resolved this year :-).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best Regards&lt;/P&gt;&lt;P&gt;Greg.&lt;/P&gt;</description>
      <pubDate>Fri, 31 Dec 2021 10:03:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Layerscape/u-boot-env-CRC-mismatch/m-p/1393512#M9760</guid>
      <dc:creator>GrzegorzHeldt</dc:creator>
      <dc:date>2021-12-31T10:03:41Z</dc:date>
    </item>
    <item>
      <title>Re: u-boot env CRC mismatch</title>
      <link>https://community.nxp.com/t5/Layerscape/u-boot-env-CRC-mismatch/m-p/1395303#M9780</link>
      <description>&lt;P&gt;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/52411"&gt;@yipingwang&lt;/a&gt;&amp;nbsp;Any further help ? Could you please provide your build setup ?&lt;/P&gt;</description>
      <pubDate>Thu, 06 Jan 2022 04:44:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Layerscape/u-boot-env-CRC-mismatch/m-p/1395303#M9780</guid>
      <dc:creator>GrzegorzHeldt</dc:creator>
      <dc:date>2022-01-06T04:44:08Z</dc:date>
    </item>
    <item>
      <title>Re: u-boot env CRC mismatch</title>
      <link>https://community.nxp.com/t5/Layerscape/u-boot-env-CRC-mismatch/m-p/1395370#M9783</link>
      <description>&lt;P&gt;I followed procedure in&amp;nbsp;&lt;A href="https://source.codeaurora.org/external/qoriq/qoriq-components/yocto-sdk/tree/readme?h=dunfell" target="_blank"&gt;https://source.codeaurora.org/external/qoriq/qoriq-components/yocto-sdk/tree/readme?h=dunfell&lt;/A&gt;&amp;nbsp;to download Yocto recipes, and find libubootenv recipe in sources/poky/meta/recipes-bsp/u-boot/libubootenv_0.2.bb.&lt;/P&gt;
&lt;P&gt;I run "bitbake&amp;nbsp;libubootenv" to get&amp;nbsp;fw_printenv and&amp;nbsp;fw_setenv binaries in folder&amp;nbsp;build_ls1028ardb/tmp/work/aarch64-fsl-linux/libubootenv/0.2+gitAUTOINC+f4b9cde381-r0/image/usr/bin, I then copied them to the target board to use.&lt;/P&gt;
&lt;P&gt;I attached&amp;nbsp;fw_printenv and&amp;nbsp;fw_setenv binaries and atf images to you, please deploy them on your target board to do verification.&lt;/P&gt;</description>
      <pubDate>Thu, 06 Jan 2022 06:47:17 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Layerscape/u-boot-env-CRC-mismatch/m-p/1395370#M9783</guid>
      <dc:creator>yipingwang</dc:creator>
      <dc:date>2022-01-06T06:47:17Z</dc:date>
    </item>
  </channel>
</rss>

