saveenv not available in Debian 8.4 images

Hi,

The saveenv command is not able in the U-boot console, any idea why?

Thanks,

saveenv needs a default storage..

Since these images can be used on both the BeagleBone "White" and
BeagleBone Black..

default storage = microSD..

So now saveenv doesn't work if you are using the eMMC on the Black..

default storage = eMMC

Now it doesn't work on the White..

Therefore, i disable it..

(it also use to break boot on the White, when it was searching the eMMC
(which doesn't exist on the white) for the default environment..)

Regards,

Thanks,

If I require for u-boot to have this functionality on BeagleBone Black (and use eMMC as the default storage), I guess I can go ahead and create my own Debian image and turn on the saveenv functionality, but where is this functionality explicitly disabled?

Regards,

This one line:

https://github.com/RobertCNelson/Bootloader-Builder/blob/master/patches/v2016.03/0001-am335x_evm-uEnv.txt-bootz-n-fixes.patch#L177

Then just rebuild u-boot and dd MLO/u-boot.img to your drive:

https://eewiki.net/display/linuxonarm/BeagleBone+Black#BeagleBoneBlack-Bootloader:U-Boot

https://eewiki.net/display/linuxonarm/BeagleBone+Black#BeagleBoneBlack-SetupmicroSDcard

You won't have to /dev/zero your drive, just dd over the exiting
MLO/u-boot.img...

Regards,

Hello Robert,

Can you please describe more precisely how to enable uboot saveenv command for BeagleBone Black?

I could not understand how patch line 177 relates to saveenv command.

well now it's line 155

Regards,

Thanks!

I commented define in the file include/configs/am335x_evm.h
#define CONFIG_ENV_IS_NOWHERE

After that I found saveenv command in uboot. But in this case saveenv command cause error “Unable to use mmc 0:1 for saveenv”. I decided that I also should specify where I want to save environment variables. In source code I found that define CONFIG_EMMC_BOOT is used for RAW mode. I added define CONFIG_EMMC_BOOT in include/configs/am335x_evm.h and it seems that saveenv works now. I can see that raw data in emmc is not empty now:

root@user:~# hexdump -C /dev/mmcblk1boot1
00000000 7a f0 38 b3 04 61 72 63 68 3d 61 72 6d 00 61 72 |z.8..arch=arm.ar|
00000010 67 73 5f 66 69 74 3d 73 65 74 65 6e 76 20 62 6f |gs_fit=setenv bo|
00000020 6f 74 61 72 67 73 20 63 6f 6e 73 6f 6c 65 3d 24 |otargs console=$|
00000030 7b 63 6f 6e 73 6f 6c 65 7d 20 00 61 72 67 73 5f |{console} .args_|
00000040 6d 6d 63 3d 72 75 6e 20 66 69 6e 64 75 75 69 64 |mmc=run finduuid|
00000050 3b 73 65 74 65 6e 76 20 62 6f 6f 74 61 72 67 73 |;setenv bootargs|
00000060 20 63 6f 6e 73 6f 6c 65 3d 24 7b 63 6f 6e 73 6f | console=${conso|
00000070 6c 65 7d 20 24 7b 63 61 70 65 5f 64 69 73 61 62 |le} ${cape_disab|
00000080 6c 65 7d 20 24 7b 63 61 70 65 5f 65 6e 61 62 6c |le} ${cape_enabl|
00000090 65 7d 20 24 7b 63 61 70 65 5f 75 62 6f 6f 74 7d |e} ${cape_uboot}|

It is wrong way edit an u-boot source files.

The write way is change CONFIG_ENV_IS_NOWHERE=y to CONFIG_ENV_IS_NOWHERE=n and add CONFIG_SYS_EXTRA_OPTIONS=“EMMC_BOOT” to u-boot/configs/am335x_boneblack_defconfig (or to u-boot/configs/am335x_boneblack_vboot_defconfig) file.

Best regards.

thank you!