Forum Discussion
Altera_Forum
Honored Contributor
20 years agoHi ,
> *** Warning - bad CRC, using default environment This indicates that the environment was not saved to NV memory. > I notice that my flash is AM29LV128,while using AM29065D.C, and their CFI > commands is not the same. So I just modified AM29065D.c to meet AM29LV128. > Like here, erasing successed but writing failed. You need to modify the flash driver, make sure you set the appropriate number of sectors, etc. > Please help me to figure out how to setup ENV in compile time, to modify which > c-file to determine bootcmd? Put it in your configuration header file. For example, for the PK1C20 board, it would go in the include/configs/PK1C20.h file. The generic way is with the CONFIG_EXTRA_ENV_SETTINGS macro: # define CONFIG_EXTRA_ENV_SETTINGS "myvar=somthing\0" "hostname=MyHost\0" "" There are many "standard" environment variables that have their own macros: # define CONFIG_BOOTCOMMAND "run net_nfs"# define CONFIG_BOOTDELAY 5# define CONFIG_ETHADDR 08:00:3e:26:0a:5b# define CONFIG_NETMASK 255.255.255.0# define CONFIG_IPADDR 192.168.2.21# define CONFIG_SERVERIP 192.168.2.16 etc. You'll need to review the README file. Regards, --Scott