fw_printenv resulting in bad crc, using default environment

Robert Varga robert.varga at getinge.com
Wed Feb 5 11:09:40 CET 2020


Hello,

I am using a Linux evaluation board MBa6x with the TQMa6x module. The system is configured in order to boot from eMMC. I would like to use the tool fw_printenv and get following result:

fw_printenv
Warning: Bad CRC, using default environment
bootargs=
bootcmd=
bootdelay=2
baudrate=115200
...

The content of /etc/fw_env.config is as follows:
cat /etc/fw_env.config
# Configuration file for fw_(printenv/setenv) utility.
# Up to two entries are valid, in this case the redundant
# environment sector is assumed present.
# Notice, that the "Number of sectors" is ignored on NOR and SPI-dataflash.
# Futhermore, if the Flash sector size is ommitted, this value is assumed to
# be the same as the Environment size, which is valid for NOR and SPI-dataflash

# THIS IS VALID FOR TQMa6x eMMC-card only!
# eMMC Block device access
/dev/mmcblk00x1000000x2000
# if using with redundant env
/dev/mmcblk00x1020000x2000
...

As a first action, I interrupted the boot process to enter the u-boot shell. Within the u-boot shall I forced to re-write the environment variables by using the command saveenv. This seems to work without any issues.
=> saveenv
Saving Environment to MMC...
Writing to MMC(0)... done

But next time, when the system reboots, the fw_printenv command issues the same result as described above (Bad CRC...).
Next action I have done is to dump the content of the memory at address 0x100000, which seems to be ok.

hexdump -C -s 0x100000 -n 8192 /dev/mmcblk0
00100000  95 fc 63 38 61 64 64 63  6d 61 3d 73 65 74 65 6e  |..c8addcma=seten|
00100010  76 20 62 6f 6f 74 61 72  67 73 20 24 7b 62 6f 6f  |v bootargs ${boo|
...

A hexdump at address 0x102000 seems to be incorrect. Maybe this is the root cause of the bad CRC issue?
hexdump -C -s 0x102000 -n 8192 /dev/mmcblk0
00102000  18 00 9f e5 95 24 01 eb  3c 30 94 e5 04 00 a0 e1  |.....$..<0......|
00102010  08 30 43 e2 3c 30 84 e5  80 ff ff eb 7b ff ff eb  |.0C.<0......{...|
...

Here is also the output of /dev

ls /dev
...
cuse              memory_bandwidth    stdout
disk               mmcblk0               tty
dri                 mmcblk0boot0     ttymxc1
fd                  mmcblk0boot1     ttymxc2
full                mmcblk0p1           ttymxc3
fuse              mmcblk0p2           ttymxc4
gpiochip0    mmcblk0p3           ubi_ctrl
gpiochip1    mmcblk0rpmb      uhid
gpiochip2    mmcblk1               uinput
gpiochip3    mmcblk1p1           urandom
gpiochip4    mmcblk1p2           v4l
gpiochip5    mmcblk1p3           vga_arbiter
gpiochip6    mqueue                 video0
...

Thank you for any hints you could provide in order to solve this issue.

Regards,
Robert Varga

This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to which they are addressed. If you have received this email in error please notify the system manager. This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. If you are not the intended recipient you are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited.


More information about the U-Boot mailing list