Uboot saveenv fails on Hikey 620


#1

I am using U-Boot on Hikey 620. I have compiled the U-Boot myself following this guide : https://github.com/qemu/u-boot/tree/master/board/hisilicon/hikey and installed on Hikey LeMaker.

It works all fine except I am not able to “saveenv”. I get the following error :

=> saveenv
Saving Environment to FAT... Failed (1)

Has anyone experienced this before? If yes, any suggested solutions?


#2

Hi @insanecoder,

As per Hikey board defconfig, environment variables will be saved in MMC1 1st partition. So make sure you have the FAT partition type for the 1st partition of MMC1 device. This configuration is controlled by CONFIG_ENV_FAT_DEVICE_AND_PART symbol.


#3

I see…but my uboot is running from the eMMC storage… I believe the above guide that I shared is writing the images to eMMC. So they should be saved there…or is it the case that even though the uBoot is running from eMMC but due the configuration it is still expecting the SD card in the slot?


#4

If you are running from eMMC (by default), then SD card will be MMC1. So you should have FAT paritition in SD card. If you want to save env in eMMC, then modify the config symbol to 0:[FAT partition].