Hi,
I have a slightly modified bootloader with a few extra variables and I want to use fw_printenv and fw_setenv to update them. I am using r32.1 on a TX2.
I can see both mmcblk0boot0 and mmcblk0boot1. They have a size of 8192 and i have read and write permittions. The size of my bootloader is approximately 4192. I have changed the bootcommand to perform an saveenv prior to booting the OS. My /etc/fw_env.config is as follows:
/dev/mmcblk0pboo1 0x3fe000 0x2000
Whenever I do a: sudo fw_printenv i get >: Warning bad CRC, using the default environment. Am I missing something. Thanks in advance,
Joe
Hi piperak,
I am not pretty sure what you are doing. Could you elaborate the use of “fw_printenv”?
Hi,
when I type the following command on the command line : sudo fw_printenv I get the following error: Warning bad CRC, using the default environment.
I have a fw_env.config file in /etc
my fw_env.config contains the following line: /dev/mmcblk0pboo1 0x3fe000 0x2000
I also do a saveenv before booting linux. Am I missing something. This used to work with r28.2
BR
Joe
Do you use this command in u-boot? What is this command going to do?
hi,
I use this command in linux. It is supposed to print (or modify in the case of fw_setenv) the u-boot environment variables. See fw_tools. In order for the command to function, we need a valid fw_env.config and /dev/mmcblk0boot1 to be writable. I have that. It looks like the saveenv command executed by the bootloader fails to save the u-boot environment variables on the flash.
BR
Joseph
Could you help share your setup that can work on rel-28.2?
hi,
The fw_env.config contains one line: /dev/mmcblk0pboot1 0x3fe000 0x2000
I have a similar issue with this: https://devtalk.nvidia.com/default/topic/1037561/jetson-tx2/fw_printenv-and-fw_setenv-in-tx2/post/5273576/#5273576
and followed the instruction described in comment #3 in: https://devtalk.nvidia.com/default/topic/802197/jetson-tk1/problem-solved-support-for-uboot-tools-fw_printenv-fw_setenv-on-linux-for-tegra/post/4425615/#4425615
-
I have commented out host->mmc->caps2 |= MMC_CAP2_BOOTPART_NOACC; in drivers/mmc/host/sdhci-tegra.c
-
I have modified :
mmc_part_add(card, part_size,
EXT_CSD_PART_CONFIG_ACC_BOOT0 + idx,
/* allow write to uboot env in 2nd boot partition */
“boot%d”, idx, ( idx < 1 ) ? true : false,
MMC_BLK_DATA_AREA_BOOT);
- The bootcommand in u-boot is bodified from “run distro_bootcmd” to “saveenv; run distro_bootcmd”
However, the only difference between 28.2 and 32.1 is the partitioning file. We had to move certain partitions. The partitions are no longer the same in r32.1
BR
Joe
Not sure whether the steps from a tk1 tutorial would work or not. May I ask a more basic questions: how did you install the tool fw_printenv and fw_setenv?
Hi,
same way as before (r28.2), using apt install u-boot-tools.
hi,
any update on this. Thanks