fw_printenv and fw_setenv from Userspace

      fw_printenv and fw_setenv from Userspace

      Hi,

      I compiled uboot for efusA9 from fsimx6-V3.1. Then I copied fw_printenv and fw_setenv to /sbin in the rootfs of my image.
      When I perform cat /proc/mtd

      Source Code

      1. ​dev: size erasesize name
      2. mtd0: 00040000 00020000 "NBoot"
      3. mtd1: 000c0000 00020000 "UserDef"
      4. mtd2: 00040000 00020000 "Refresh"
      5. mtd3: 000c0000 00020000 "UBoot"
      6. mtd4: 00040000 00020000 "UBootEnv"
      7. mtd5: 00800000 00020000 "Kernel"
      8. mtd6: 001c0000 00020000 "FDT"
      9. mtd7: 0f400000 00020000 "TargetFS"


      I wrote to /etc/fw_env.config only one line to access the uboot environment variables

      Source Code

      1. ​/dev/mtd4 0x00000 0x20000


      when I try to write a variable in uboot from user space using --> "fw_setenv test 1" and when --> "fw_printenv test" then it shows that the variable is correctly written into the NAND flash.

      However when I reboot and try to look into the variable on the uboot console, I can not find it when "printenv test" ???

      Please what is the correct values that I should write in /etc/fw_env.config, I feel that the values I have are not correct.

      Thanks
      The correct settings would be:

      Source Code

      1. /dev/mtd4 0x0000 0x4000 0x20000 0x2


      This translates to:
      The environment is at offset 0 in MTD partition mtd4, the environment size is 16 KB, the block size (smallest entity that can be erased) is 0x20000 bytes (=128KB) and the environment partition is 2 blocks in size, i.e. 256KB.

      Your F&S Support Team
      F&S Elektronik Systeme GmbH
      As this is an international forum, please try to post in English.
      Da dies ein internationales Forum ist, bitten wir darum, Beiträge möglichst in Englisch zu verfassen.

      New

      This is one of our next tasks to go to a newer U-Boot version. Porting is not easy, we have done significant additions and modifications to U-Boot, so simply using a newer U-Boot version will not work. It requires porting all our features to the newer version.

      The reason why we stayed with 2014.07 for so long is that this was the last version that did *not* use Kconfig. Since 2014.10, the whole configuration in U-Boot is a mess. If they would have moved the whole configuration to Kconfig, then this would be OK. But there are still a lot of settings in the header file under include/configs *and* they have introduced device trees for U-Boot. So there are three places where the settings are distributed: .config, include/configs/*.h and device tree. We always hoped that this confusing mess would be solved some day, but not up to now.

      Can you tell me why you want or even need 2016.07?

      Your F&S Support Team
      F&S Elektronik Systeme GmbH
      As this is an international forum, please try to post in English.
      Da dies ein internationales Forum ist, bitten wir darum, Beiträge möglichst in Englisch zu verfassen.