cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Visitor
Visitor
853 Views
Registered: ‎08-20-2013

Yocto build of u-boot-xlnx 2018.3 does not support 'saveenv' command

Jump to solution

I have a custom board based on the Zynq 7000 that worked fine under u-boot-xlnx 2016.4 (Krogoth). I'm in the process of porting over to 2018.3 (Thud). I have added the line

"CONFIG_CMD_SAVEENV=y"

to my custom_defcofig file and the line

"#define CONFIG_CMD_SAVEENV"

to my custom.h file.

When I try to execute saveenv at the uboot promt I get "Unrecognized command 'saveenv'.

 

 

 

0 Kudos
1 Solution

Accepted Solutions
Highlighted
Visitor
Visitor
733 Views
Registered: ‎08-20-2013

I fixed the issue by putting the following after the #include zynq-common.h line in my custom.h file

#undef CONFIG_ENV_IS_NOWHERE

View solution in original post

0 Kudos
8 Replies
Highlighted
Moderator
Moderator
816 Views
Registered: ‎09-12-2007

The saveenv requires a default storage. Can you pass your defconfig?

0 Kudos
Highlighted
Moderator
Moderator
802 Views
Registered: ‎02-07-2018

HI @jasonhannon 

Have you corss checked this config enabled or not in .config file after configuring th u-boot .

By default this CMD_SAVEENV support already enabled in xilinx u-boot. No need explicitly enable.

 

Thanks & regards

Aravind

0 Kudos
Highlighted
Visitor
Visitor
782 Views
Registered: ‎08-20-2013

Yes. 

In checking the .config file I see the following:

CONFIG_CMD_SAVEENV=y

CONFIG_ENV_IS_IN_UBI=y

 

 

0 Kudos
Highlighted
Moderator
Moderator
775 Views
Registered: ‎09-12-2007

Can you enable the debug in the u-boot (add #define debug in <u-boot_HOME>/include/common.h)

recompile, and try again.

0 Kudos
Highlighted
Visitor
Visitor
765 Views
Registered: ‎08-20-2013

It seems that when I have CONFIG_ENV_IS_IN_UBI=y  in my custom_deconfig file U-boot fails on boot giving the following error: No environment driver for location 13.

My current boot architecture uses an SD card with BOOT.bin, uEnv.txt, bootfiles.ubifs, and rootfs.ubifs installed. The sdboot definition in my custom.h file programs NAND with the contents of the SD. This approach worked fine back with the 2016.4 Krogoth u-boot-xlnx. Seems a lot has changed since then and I can't seem to locate any documentation that tells me what particular #define CONFIG_xxxx and/or CONFIG_xxxx=y options I need to have set in either my custom_defconfig and/or custom.h files.

 

0 Kudos
Visitor
Visitor
759 Views
Registered: ‎08-20-2013

A couple of more points:

1) When I have #define CONFIG_ENV_IS_IN_UBI in my custom.h file only it results in my .config file showing CONFIG_ENV_IS_IN_NOWHERE=y and the saveenv command being not enabled in my uboot build.

2) When I add  CONFIG_ENV_IS_IN_UBI=y in my custom_defconfig file the resulting .config file shows CONFIG_ENV_IS_IN_UBI=y but U-boot fails to boot giving the No environment driver for location 13 error.

What is the difference between having CONFIG_ENV_IS_IN_UBI=y in my custom_defconfig file and #define CONFIG_ENV_IS_IN_UBI in my custom.h file?

0 Kudos
Highlighted
Moderator
Moderator
748 Views
Registered: ‎09-12-2007

Try CONFIG_ENV_IS_IN_FAT

0 Kudos
Highlighted
Visitor
Visitor
734 Views
Registered: ‎08-20-2013

I fixed the issue by putting the following after the #include zynq-common.h line in my custom.h file

#undef CONFIG_ENV_IS_NOWHERE

View solution in original post

0 Kudos