Hi there,
I would like to read and write uboot environment from rootfs and I found that uboot-envtools supported it.
I download the newest uboot version u-boot-2015.04.tar.bz2 and built with config : am335x_boneblack.config .
when I tried to modify a field in uboot-environment and save it by command saveenv, it worked well
U-Boot#saveenv Saving Environment to MMC... Writing to redundant MMC(1)... done
I found this page www.crashcourse.ca/.../EMMC_on_the_BBB explain about hardware partitions on eMMC, and I know uboot-enviromment will be save into mmcblk0boot0 or mmcblk0boot1 ( default config ).
When I tried to use fw_printenv with fw_env.config, I always got Bad CRC.
Hex Dump: # hexdump -C /dev/mmcblk0boot0 00000000 b8 fd 66 da 02 61 72 63 68 3d 61 72 6d 00 62 61 |..f..arch=arm.ba| 00000010 75 64 72 61 74 65 3d 31 31 35 32 30 30 00 62 6f |udrate=115200.bo| 00000020 61 72 64 3d 61 6d 33 33 35 78 00 62 6f 61 72 64 |ard=am335x.board| 00000030 5f 6e 61 6d 65 3d 41 33 33 35 42 4e 4c 54 00 62 |_name=A335BNLT.b| ....... 00000ea0 65 6e 64 6f 72 3d 61 62 63 00 76 65 72 3d 55 2d |endor=abc.ver=U-| 00000eb0 42 6f 6f 74 20 32 30 31 35 2e 30 37 2d 72 63 31 |Boot 2015.07-rc1| 00000ec0 2d 30 30 32 35 35 2d 67 30 65 36 62 37 61 32 2d |-00255-g0e6b7a2-| 00000ed0 64 69 72 74 79 20 28 4d 61 79 20 32 31 20 32 30 |dirty (May 21 20| 00000ee0 31 35 20 2d 20 31 36 3a 34 31 3a 30 33 29 00 00 |15 - 16:41:03)..| 00000ef0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| * 00020000 06 a6 e0 be 01 61 72 63 68 3d 61 72 6d 00 62 61 |.....arch=arm.ba| 00020010 75 64 72 61 74 65 3d 31 31 35 32 30 30 00 62 6f |udrate=115200.bo| 00020020 61 72 64 3d 61 6d 33 33 35 78 00 62 6f 61 72 64 |ard=am335x.board| ....... 00020ed0 69 72 74 79 20 28 4d 61 79 20 32 31 20 32 30 31 |irty (May 21 201| 00020ee0 35 20 2d 20 31 36 3a 34 31 3a 30 33 29 00 00 00 |5 - 16:41:03)...| 00020ef0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| My config: # cat /etc/fw_env.config /dev/mmcblk0boot1 0x0000 0x20000 0x20000
When I tried to write in to /dev/mmcblk0boot1, I got error: "Operation not permitted"
How could I use uboot-envtools for eMMC? I know uboot just only support save environment into hardware partitions, how to create a hardware partition, which can be write by rootfs?
Uboot mmc command supported to create hardware partitions but I don't know how to use it. How to create GP1, GP2 , GP3, GP4 partition on eMMC?
Anyone could help me?
Thanks,
Tuan Nguyen