Package: u-boot-sunxi
Version: 2019.01+dfsg-7
U-Boot images are configured with CONFIG_ENV_IS_IN_FAT=y, however the
default debian install configures all partitions (even /boot) as ext2/4
filesystem.
Although this don't impact on proper boot as u-boot supports ext2 and can
load the boot-script, this prevents from proper environment saving/loading
by u-boot itself and u-boot-tools:
When u-boot boots, it tries to load the environment it reports:
Loading Environment from FAT... Unable to use mmc 0:1... Setting up a
720x576i composite-pal console (overscan 32x20)
Also, if trying to see the environment from linux command line using
root@bpibuild:~# cat /etc/fw_env.config
# Device to access offset env size
/dev/mmcblk0 0x88000 0x20000
root@bpibuild:~# fw_printenv
Warning: Bad CRC, using default environment
I suggest that the output string, in hello.c, be corrected.
I am using Debian GNU/Linux 2.2, kernel 2.2.17-pre-patch-13
and libc6 2.1.3-10.
I confirmed this on a BananaPi (first model) and CubieTruck (CubieBoard3).
As some devices may store environment on internal flash, for devices like
these that have to store it on MMC I suggest to set the compiling options
to either:
CONFIG_ENV_IS_IN_EXT4
CONFIG_ENV_IS_IN_MMC
This will allow proper loading/saving of the environment either by the
loader itself and the linux fw_printenv tools.