mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-10 15:14:43 +00:00
env: Rename setenv() to env_set()
We are now using an env_ prefix for environment functions. Rename setenv() for consistency. Also add function comments in common.h. Suggested-by: Wolfgang Denk <wd@denx.de> Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
01510091de
commit
382bee57f1
156 changed files with 470 additions and 454 deletions
|
@ -481,7 +481,7 @@ static int API_env_set(va_list ap)
|
|||
if ((value = (char *)va_arg(ap, uintptr_t)) == NULL)
|
||||
return API_EINVAL;
|
||||
|
||||
setenv(name, value);
|
||||
env_set(name, value);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -329,7 +329,7 @@ int arch_misc_init(void)
|
|||
|
||||
strcpy(soc, "vf");
|
||||
strcat(soc, soc_type);
|
||||
setenv("soc", soc);
|
||||
env_set("soc", soc);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -200,7 +200,7 @@ static int do_smhload(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
|
|||
/* Optionally save returned end to the environment */
|
||||
if (argc == 4) {
|
||||
sprintf(end_str, "0x%08lx", end_addr);
|
||||
setenv(argv[3], end_str);
|
||||
env_set(argv[3], end_str);
|
||||
}
|
||||
} else {
|
||||
return CMD_RET_USAGE;
|
||||
|
|
|
@ -132,7 +132,7 @@ int board_late_init(void)
|
|||
/* In bootstrap don't use the env vars */
|
||||
if (((reg & 0x3000000) >> 24) == 0x1) {
|
||||
set_default_env(NULL);
|
||||
setenv("preboot", "");
|
||||
env_set("preboot", "");
|
||||
}
|
||||
|
||||
return opos6ul_board_late_init();
|
||||
|
|
|
@ -256,9 +256,9 @@ int arch_misc_init(void)
|
|||
{
|
||||
#ifdef CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG
|
||||
if (is_mx7d())
|
||||
setenv("soc", "imx7d");
|
||||
env_set("soc", "imx7d");
|
||||
else
|
||||
setenv("soc", "imx7s");
|
||||
env_set("soc", "imx7s");
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -241,7 +241,7 @@ void arch_preboot_os(void)
|
|||
int fb_set_reboot_flag(void)
|
||||
{
|
||||
printf("Setting reboot to fastboot flag ...\n");
|
||||
setenv("dofastboot", "1");
|
||||
env_set("dofastboot", "1");
|
||||
env_save();
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -40,7 +40,7 @@ static void omap_set_fastboot_cpu(void)
|
|||
printf("Warning: fastboot.cpu: unknown CPU rev: %u\n", cpu_rev);
|
||||
}
|
||||
|
||||
setenv("fastboot.cpu", cpu);
|
||||
env_set("fastboot.cpu", cpu);
|
||||
}
|
||||
|
||||
static void omap_set_fastboot_secure(void)
|
||||
|
@ -63,7 +63,7 @@ static void omap_set_fastboot_secure(void)
|
|||
printf("Warning: fastboot.secure: unknown CPU sec: %u\n", dev);
|
||||
}
|
||||
|
||||
setenv("fastboot.secure", secure);
|
||||
env_set("fastboot.secure", secure);
|
||||
}
|
||||
|
||||
static void omap_set_fastboot_board_rev(void)
|
||||
|
@ -74,7 +74,7 @@ static void omap_set_fastboot_board_rev(void)
|
|||
if (board_rev == NULL)
|
||||
printf("Warning: fastboot.board_rev: unknown board revision\n");
|
||||
|
||||
setenv("fastboot.board_rev", board_rev);
|
||||
env_set("fastboot.board_rev", board_rev);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_FASTBOOT_FLASH_MMC_DEV
|
||||
|
@ -118,7 +118,7 @@ static void omap_set_fastboot_userdata_size(void)
|
|||
sprintf(buf, "%u", sz_kb);
|
||||
}
|
||||
|
||||
setenv("fastboot.userdata_size", buf);
|
||||
env_set("fastboot.userdata_size", buf);
|
||||
}
|
||||
#else
|
||||
static inline void omap_set_fastboot_userdata_size(void)
|
||||
|
@ -173,7 +173,7 @@ void omap_die_id_serial(void)
|
|||
snprintf(serial_string, sizeof(serial_string),
|
||||
"%08x%08x", die_id[0], die_id[3]);
|
||||
|
||||
setenv("serial#", serial_string);
|
||||
env_set("serial#", serial_string);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -34,11 +34,11 @@ static void setup_boot_mode(void)
|
|||
switch (boot_mode) {
|
||||
case BOOT_FASTBOOT:
|
||||
printf("enter fastboot!\n");
|
||||
setenv("preboot", "setenv preboot; fastboot usb0");
|
||||
env_set("preboot", "setenv preboot; fastboot usb0");
|
||||
break;
|
||||
case BOOT_UMS:
|
||||
printf("enter UMS!\n");
|
||||
setenv("preboot", "setenv preboot; ums mmc 0");
|
||||
env_set("preboot", "setenv preboot; ums mmc 0");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -30,11 +30,11 @@ static void setup_boot_mode(void)
|
|||
switch (boot_mode) {
|
||||
case BOOT_FASTBOOT:
|
||||
printf("enter fastboot!\n");
|
||||
setenv("preboot", "setenv preboot; fastboot usb0");
|
||||
env_set("preboot", "setenv preboot; fastboot usb0");
|
||||
break;
|
||||
case BOOT_UMS:
|
||||
printf("enter UMS!\n");
|
||||
setenv("preboot", "setenv preboot; ums mmc 0");
|
||||
env_set("preboot", "setenv preboot; ums mmc 0");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -37,11 +37,11 @@ static void setup_boot_mode(void)
|
|||
switch (boot_mode) {
|
||||
case BOOT_FASTBOOT:
|
||||
printf("enter fastboot!\n");
|
||||
setenv("preboot", "setenv preboot; fastboot usb0");
|
||||
env_set("preboot", "setenv preboot; fastboot usb0");
|
||||
break;
|
||||
case BOOT_UMS:
|
||||
printf("enter UMS!\n");
|
||||
setenv("preboot", "setenv preboot; if mmc dev 0;"
|
||||
env_set("preboot", "setenv preboot; if mmc dev 0;"
|
||||
"then ums mmc 0; else ums mmc 1;fi");
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -219,9 +219,9 @@ int arch_misc_init(void)
|
|||
{
|
||||
const u32 bsel = readl(&sysmgr_regs->bootinfo) & 0x7;
|
||||
const int fpga_id = socfpga_fpga_id(0);
|
||||
setenv("bootmode", bsel_str[bsel].mode);
|
||||
env_set("bootmode", bsel_str[bsel].mode);
|
||||
if (fpga_id >= 0)
|
||||
setenv("fpgatype", socfpga_fpga_model[fpga_id].var);
|
||||
env_set("fpgatype", socfpga_fpga_model[fpga_id].var);
|
||||
return socfpga_eth_reset();
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -214,9 +214,9 @@ int board_late_init(void)
|
|||
#if defined(CONFIG_TEGRA_SUPPORT_NON_SECURE)
|
||||
if (tegra_cpu_is_non_secure()) {
|
||||
printf("CPU is in NS mode\n");
|
||||
setenv("cpu_ns_mode", "1");
|
||||
env_set("cpu_ns_mode", "1");
|
||||
} else {
|
||||
setenv("cpu_ns_mode", "");
|
||||
env_set("cpu_ns_mode", "");
|
||||
}
|
||||
#endif
|
||||
start_cpu_fan();
|
||||
|
|
|
@ -49,7 +49,7 @@ static int set_ethaddr_from_nvtboot(void)
|
|||
return -ENOENT;
|
||||
}
|
||||
|
||||
ret = setenv("ethaddr", (void *)prop);
|
||||
ret = env_set("ethaddr", (void *)prop);
|
||||
if (ret) {
|
||||
printf("Failed to set ethaddr from nvtboot DTB: %d\n", ret);
|
||||
return ret;
|
||||
|
|
|
@ -55,7 +55,7 @@ static int uniphier_set_fdt_file(void)
|
|||
|
||||
strncat(dtb_name, ".dtb", buf_len);
|
||||
|
||||
return setenv("fdt_file", dtb_name);
|
||||
return env_set("fdt_file", dtb_name);
|
||||
}
|
||||
|
||||
int board_late_init(void)
|
||||
|
@ -65,20 +65,20 @@ int board_late_init(void)
|
|||
switch (uniphier_boot_device_raw()) {
|
||||
case BOOT_DEVICE_MMC1:
|
||||
printf("eMMC Boot");
|
||||
setenv("bootmode", "emmcboot");
|
||||
env_set("bootmode", "emmcboot");
|
||||
break;
|
||||
case BOOT_DEVICE_NAND:
|
||||
printf("NAND Boot");
|
||||
setenv("bootmode", "nandboot");
|
||||
env_set("bootmode", "nandboot");
|
||||
nand_denali_wp_disable();
|
||||
break;
|
||||
case BOOT_DEVICE_NOR:
|
||||
printf("NOR Boot");
|
||||
setenv("bootmode", "norboot");
|
||||
env_set("bootmode", "norboot");
|
||||
break;
|
||||
case BOOT_DEVICE_USB:
|
||||
printf("USB Boot");
|
||||
setenv("bootmode", "usbboot");
|
||||
env_set("bootmode", "usbboot");
|
||||
break;
|
||||
default:
|
||||
printf("Unknown");
|
||||
|
|
|
@ -138,7 +138,7 @@ int get_arc_info(void)
|
|||
printf("\t<not found>\n");
|
||||
} else {
|
||||
printf("\t%s\n", smac[3]);
|
||||
setenv("SERIAL", smac[3]);
|
||||
env_set("SERIAL", smac[3]);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -152,7 +152,7 @@ int get_arc_info(void)
|
|||
char *ret = getenv("ethaddr");
|
||||
|
||||
if (strcmp(ret, __stringify(CONFIG_ETHADDR)) == 0) {
|
||||
setenv("ethaddr", smac[2]);
|
||||
env_set("ethaddr", smac[2]);
|
||||
printf("\t%s (factory)\n", smac[2]);
|
||||
} else {
|
||||
printf("\t%s\n", ret);
|
||||
|
@ -160,8 +160,8 @@ int get_arc_info(void)
|
|||
}
|
||||
|
||||
if (strcmp(smac[1], "00:00:00:00:00:00") == 0) {
|
||||
setenv("eth1addr", smac[2]);
|
||||
setenv("eth2addr", smac[2]);
|
||||
env_set("eth1addr", smac[2]);
|
||||
env_set("eth2addr", smac[2]);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -172,7 +172,7 @@ int get_arc_info(void)
|
|||
char *ret = getenv("eth1addr");
|
||||
|
||||
if (strcmp(ret, __stringify(CONFIG_ETH1ADDR)) == 0) {
|
||||
setenv("eth1addr", smac[1]);
|
||||
env_set("eth1addr", smac[1]);
|
||||
printf("\t%s (factory)\n", smac[1]);
|
||||
} else {
|
||||
printf("\t%s\n", ret);
|
||||
|
@ -180,7 +180,7 @@ int get_arc_info(void)
|
|||
}
|
||||
|
||||
if (strcmp(smac[0], "00:00:00:00:00:00") == 0) {
|
||||
setenv("eth2addr", smac[1]);
|
||||
env_set("eth2addr", smac[1]);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -191,7 +191,7 @@ int get_arc_info(void)
|
|||
char *ret = getenv("eth2addr");
|
||||
|
||||
if (strcmp(ret, __stringify(CONFIG_ETH2ADDR)) == 0) {
|
||||
setenv("eth2addr", smac[0]);
|
||||
env_set("eth2addr", smac[0]);
|
||||
printf("\t%s (factory)\n", smac[0]);
|
||||
} else {
|
||||
printf("\t%s\n", ret);
|
||||
|
|
|
@ -230,9 +230,9 @@ int last_stage_init(void)
|
|||
strcat(newkernelargs, mmckargs);
|
||||
strcat(newkernelargs, " ");
|
||||
strcat(newkernelargs, &tmp[n]);
|
||||
setenv("kernelargs", newkernelargs);
|
||||
env_set("kernelargs", newkernelargs);
|
||||
} else {
|
||||
setenv("kernelargs", mmckargs);
|
||||
env_set("kernelargs", mmckargs);
|
||||
}
|
||||
}
|
||||
get_arc_info();
|
||||
|
@ -244,7 +244,7 @@ int last_stage_init(void)
|
|||
strcat(newkernelargs, sval);
|
||||
strcat(newkernelargs, " ");
|
||||
strcat(newkernelargs, kval);
|
||||
setenv("kernelargs", newkernelargs);
|
||||
env_set("kernelargs", newkernelargs);
|
||||
}
|
||||
} else {
|
||||
printf("Error reading kernelargs env variable!\n");
|
||||
|
|
|
@ -167,7 +167,7 @@ int board_late_init(void)
|
|||
lcd_position_cursor(1, 8);
|
||||
lcd_puts(
|
||||
"switching to network-console ... ");
|
||||
setenv("bootcmd", "run netconsole");
|
||||
env_set("bootcmd", "run netconsole");
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -203,7 +203,7 @@ int board_late_init(void)
|
|||
lcd_position_cursor(1, 8);
|
||||
lcd_puts(
|
||||
"switching to network-console ... ");
|
||||
setenv("bootcmd", "run netconsole");
|
||||
env_set("bootcmd", "run netconsole");
|
||||
cnt = 4;
|
||||
break;
|
||||
} else if (!gpio_get_value(ESC_KEY) &&
|
||||
|
@ -211,7 +211,7 @@ int board_late_init(void)
|
|||
lcd_position_cursor(1, 8);
|
||||
lcd_puts(
|
||||
"starting u-boot script from USB ... ");
|
||||
setenv("bootcmd", "run usbscript");
|
||||
env_set("bootcmd", "run usbscript");
|
||||
cnt = 4;
|
||||
break;
|
||||
} else if ((!gpio_get_value(ESC_KEY) &&
|
||||
|
@ -221,7 +221,7 @@ int board_late_init(void)
|
|||
lcd_position_cursor(1, 8);
|
||||
lcd_puts(
|
||||
"starting script from network ... ");
|
||||
setenv("bootcmd", "run netscript");
|
||||
env_set("bootcmd", "run netscript");
|
||||
cnt = 4;
|
||||
break;
|
||||
} else if (!gpio_get_value(ESC_KEY)) {
|
||||
|
@ -232,19 +232,19 @@ int board_late_init(void)
|
|||
lcd_position_cursor(1, 8);
|
||||
lcd_puts(
|
||||
"starting vxworks from network ... ");
|
||||
setenv("bootcmd", "run netboot");
|
||||
env_set("bootcmd", "run netboot");
|
||||
cnt = 4;
|
||||
} else if (scratchreg == 0xCD) {
|
||||
lcd_position_cursor(1, 8);
|
||||
lcd_puts(
|
||||
"starting script from network ... ");
|
||||
setenv("bootcmd", "run netscript");
|
||||
env_set("bootcmd", "run netscript");
|
||||
cnt = 4;
|
||||
} else if (scratchreg == 0xCE) {
|
||||
lcd_position_cursor(1, 8);
|
||||
lcd_puts(
|
||||
"starting AR from eMMC ... ");
|
||||
setenv("bootcmd", "run mmcboot");
|
||||
env_set("bootcmd", "run mmcboot");
|
||||
cnt = 4;
|
||||
}
|
||||
|
||||
|
@ -252,7 +252,7 @@ int board_late_init(void)
|
|||
switch (cnt) {
|
||||
case 0:
|
||||
lcd_puts("entering BOOT-mode. ");
|
||||
setenv("bootcmd", "run defaultAR");
|
||||
env_set("bootcmd", "run defaultAR");
|
||||
buf = 0x0000;
|
||||
break;
|
||||
case 1:
|
||||
|
@ -285,7 +285,7 @@ int board_late_init(void)
|
|||
(u32)getenv_ulong("vx_memtop", 16, gd->fb_base-0x20),
|
||||
(u32)getenv_ulong("vx_romfsbase", 16, 0),
|
||||
(u32)getenv_ulong("vx_romfssize", 16, 0));
|
||||
setenv("othbootargs", othbootargs);
|
||||
env_set("othbootargs", othbootargs);
|
||||
/*
|
||||
* reset VBAR registers to its reset location, VxWorks 6.9.3.2 does
|
||||
* expect that vectors are there, original u-boot moves them to _start
|
||||
|
|
|
@ -184,7 +184,7 @@ int load_lcdtiming(struct am335x_lcdpanel *panel)
|
|||
puts("no 'factory-settings / rotation' in dtb!\n");
|
||||
}
|
||||
snprintf(buf, sizeof(buf), "fbcon=rotate:%d", panel_info.vl_rot);
|
||||
setenv("optargs_rot", buf);
|
||||
env_set("optargs_rot", buf);
|
||||
#else
|
||||
pnltmp.hactive = getenv_ulong("ds1_hactive", 10, ~0UL);
|
||||
pnltmp.vactive = getenv_ulong("ds1_vactive", 10, ~0UL);
|
||||
|
|
|
@ -285,7 +285,7 @@ static int set_regdomain(void)
|
|||
puts("EEPROM regdomain read failed.\n");
|
||||
|
||||
printf("Regdomain set to %s\n", rd);
|
||||
return setenv("regdomain", rd);
|
||||
return env_set("regdomain", rd);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
@ -81,7 +81,7 @@ static int do_syno_populate(int argc, char * const argv[])
|
|||
ethaddr[0], ethaddr[1], ethaddr[2],
|
||||
ethaddr[3], ethaddr[4], ethaddr[5]);
|
||||
printf("parsed %s = %s\n", var, val);
|
||||
setenv(var, val);
|
||||
env_set(var, val);
|
||||
}
|
||||
if (!strncmp(buf + 32, SYNO_SN_TAG, strlen(SYNO_SN_TAG))) {
|
||||
char *snp, *csump;
|
||||
|
@ -111,7 +111,7 @@ static int do_syno_populate(int argc, char * const argv[])
|
|||
goto out_unmap;
|
||||
}
|
||||
printf("parsed SN = %s\n", snp);
|
||||
setenv("SN", snp);
|
||||
env_set("SN", snp);
|
||||
} else { /* old style format */
|
||||
unsigned char csum = 0;
|
||||
|
||||
|
@ -125,7 +125,7 @@ static int do_syno_populate(int argc, char * const argv[])
|
|||
}
|
||||
bufp[n] = '\0';
|
||||
printf("parsed SN = %s\n", buf + 32);
|
||||
setenv("SN", buf + 32);
|
||||
env_set("SN", buf + 32);
|
||||
}
|
||||
out_unmap:
|
||||
unmap_physmem(buf, len);
|
||||
|
|
|
@ -119,7 +119,7 @@ int misc_init_r(void)
|
|||
|
||||
if (reboot_mode[0] > 0 && isascii(reboot_mode[0])) {
|
||||
if (!getenv("reboot-mode"))
|
||||
setenv("reboot-mode", (char *)reboot_mode);
|
||||
env_set("reboot-mode", (char *)reboot_mode);
|
||||
}
|
||||
|
||||
omap_reboot_mode_clear();
|
||||
|
|
|
@ -55,7 +55,7 @@ int misc_init_r(void)
|
|||
len = meson_sm_read_efuse(EFUSE_SN_OFFSET, serial,
|
||||
EFUSE_SN_SIZE);
|
||||
if (len == EFUSE_SN_SIZE)
|
||||
setenv("serial#", serial);
|
||||
env_set("serial#", serial);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -325,7 +325,7 @@ int board_init(void)
|
|||
|
||||
int board_late_init(void)
|
||||
{
|
||||
setenv("bootmode", boot_mode_sf ? "sf" : "emmc");
|
||||
env_set("bootmode", boot_mode_sf ? "sf" : "emmc");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -670,9 +670,9 @@ int board_late_init(void)
|
|||
if (bootmode == 7) {
|
||||
my_bootdelay = getenv("nor_bootdelay");
|
||||
if (my_bootdelay != NULL)
|
||||
setenv("bootdelay", my_bootdelay);
|
||||
env_set("bootdelay", my_bootdelay);
|
||||
else
|
||||
setenv("bootdelay", "-2");
|
||||
env_set("bootdelay", "-2");
|
||||
}
|
||||
|
||||
/* if we have the lg panel, we can initialze it now */
|
||||
|
|
|
@ -116,7 +116,7 @@ extern void cm_remap(void);
|
|||
|
||||
int misc_init_r (void)
|
||||
{
|
||||
setenv("verify", "n");
|
||||
env_set("verify", "n");
|
||||
return (0);
|
||||
}
|
||||
|
||||
|
|
|
@ -267,7 +267,7 @@ int board_late_init(void)
|
|||
*p = tolower(*p);
|
||||
|
||||
strcat(name, "ek.dtb");
|
||||
setenv("dtb_name", name);
|
||||
env_set("dtb_name", name);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -312,9 +312,9 @@ int board_eth_init(bd_t *bis)
|
|||
|
||||
/* depending on the phy address we can detect our board version */
|
||||
if (phydev->addr == 0)
|
||||
setenv("boardver", "");
|
||||
env_set("boardver", "");
|
||||
else
|
||||
setenv("boardver", "mr");
|
||||
env_set("boardver", "mr");
|
||||
|
||||
printf("using phy at %d\n", phydev->addr);
|
||||
ret = fec_probe(bis, -1, base, bus, phydev);
|
||||
|
|
|
@ -301,8 +301,8 @@ int board_init(void)
|
|||
int board_late_init(void)
|
||||
{
|
||||
#ifdef CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG
|
||||
setenv("board_name", "BAV335xB");
|
||||
setenv("board_rev", "B"); /* Fix me, but why bother.. */
|
||||
env_set("board_name", "BAV335xB");
|
||||
env_set("board_rev", "B"); /* Fix me, but why bother.. */
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -251,7 +251,7 @@ static void check_button_status(void)
|
|||
|
||||
if (value == 0) {
|
||||
printf("front button activated !\n");
|
||||
setenv("harakiri", "1");
|
||||
env_set("harakiri", "1");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -954,7 +954,7 @@ static int do_kbd(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
|
|||
{
|
||||
char envvalue[ARRAY_SIZE(buttons)+1];
|
||||
int numpressed = read_keys(envvalue);
|
||||
setenv("keybd", envvalue);
|
||||
env_set("keybd", envvalue);
|
||||
return numpressed == 0;
|
||||
}
|
||||
|
||||
|
@ -995,7 +995,7 @@ static void preboot_keys(void)
|
|||
sprintf(cmd_name, "%s%c", kbd_command_prefix, *suffix);
|
||||
cmd = getenv(cmd_name);
|
||||
if (cmd) {
|
||||
setenv("preboot", cmd);
|
||||
env_set("preboot", cmd);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -228,7 +228,7 @@ static void erase_environment(void)
|
|||
static void rescue_mode(void)
|
||||
{
|
||||
printf("Entering rescue mode..\n");
|
||||
setenv("bootsource", "rescue");
|
||||
env_set("bootsource", "rescue");
|
||||
}
|
||||
|
||||
static void check_push_button(void)
|
||||
|
|
|
@ -93,7 +93,7 @@ int misc_init_r(void)
|
|||
x = (*(volatile u32 *)CONFIG_SYS_FPGAREG_DIPSW)
|
||||
& FPGAREG_MAC_MASK;
|
||||
sprintf(&s[15], "%02x", x);
|
||||
setenv("ethaddr", s);
|
||||
env_set("ethaddr", s);
|
||||
}
|
||||
#endif /* CONFIG_CMD_NET */
|
||||
|
||||
|
|
|
@ -318,7 +318,7 @@ static const struct boot_mode board_boot_modes[] = {
|
|||
int board_late_init(void)
|
||||
{
|
||||
add_board_boot_modes(board_boot_modes);
|
||||
setenv("board_name", "xpress");
|
||||
env_set("board_name", "xpress");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -755,9 +755,9 @@ int board_late_init(void)
|
|||
{
|
||||
#ifdef CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG
|
||||
if (is_mx6dq())
|
||||
setenv("board_rev", "MX6Q");
|
||||
env_set("board_rev", "MX6Q");
|
||||
else
|
||||
setenv("board_rev", "MX6DL");
|
||||
env_set("board_rev", "MX6DL");
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -123,7 +123,7 @@ int misc_init_r(void)
|
|||
|
||||
/* if BTN_ACQ_AL is pressed then bootdelay is changed to 60 second */
|
||||
if ((in_be16(&iop->iop_pcdat) & 0x0004) == 0)
|
||||
setenv("bootdelay", "60");
|
||||
env_set("bootdelay", "60");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -337,7 +337,7 @@ int misc_init_r(void)
|
|||
addr[0], addr[1], addr[2], addr[3], addr[4],
|
||||
addr[5]);
|
||||
|
||||
setenv("ethaddr", (char *)tmp);
|
||||
env_set("ethaddr", (char *)tmp);
|
||||
} else {
|
||||
printf("Invalid MAC address read.\n");
|
||||
}
|
||||
|
|
|
@ -466,7 +466,7 @@ int board_late_init(void)
|
|||
add_board_boot_modes(board_boot_modes);
|
||||
#endif
|
||||
|
||||
setenv("board_name", BOARD_NAME);
|
||||
env_set("board_name", BOARD_NAME);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@ static void mmc_late_init(void)
|
|||
|
||||
/* Set mmcblk env */
|
||||
sprintf(mmcblk, "/dev/mmcblk%dp2 rootwait rw", dev_no);
|
||||
setenv("mmcroot", mmcblk);
|
||||
env_set("mmcroot", mmcblk);
|
||||
|
||||
sprintf(cmd, "mmc dev %d", dev_no);
|
||||
run_command(cmd, 0);
|
||||
|
@ -43,20 +43,20 @@ int board_late_init(void)
|
|||
#ifdef CONFIG_ENV_IS_IN_MMC
|
||||
mmc_late_init();
|
||||
#endif
|
||||
setenv("modeboot", "mmcboot");
|
||||
env_set("modeboot", "mmcboot");
|
||||
break;
|
||||
case IMX6_BMODE_NAND:
|
||||
setenv("modeboot", "nandboot");
|
||||
env_set("modeboot", "nandboot");
|
||||
break;
|
||||
default:
|
||||
setenv("modeboot", "");
|
||||
env_set("modeboot", "");
|
||||
break;
|
||||
}
|
||||
|
||||
if (is_mx6ul())
|
||||
setenv("console", "ttymxc0");
|
||||
env_set("console", "ttymxc0");
|
||||
else
|
||||
setenv("console", "ttymxc3");
|
||||
env_set("console", "ttymxc3");
|
||||
|
||||
setenv_fdt_file();
|
||||
|
||||
|
|
|
@ -93,7 +93,7 @@ void setup_gpmi_nand(void)
|
|||
void setenv_fdt_file(void)
|
||||
{
|
||||
if (is_mx6ul())
|
||||
setenv("fdt_file", "imx6ul-geam-kit.dtb");
|
||||
env_set("fdt_file", "imx6ul-geam-kit.dtb");
|
||||
}
|
||||
|
||||
#ifdef CONFIG_SPL_BUILD
|
||||
|
|
|
@ -195,9 +195,9 @@ void setup_display(void)
|
|||
void setenv_fdt_file(void)
|
||||
{
|
||||
if (is_mx6dq())
|
||||
setenv("fdt_file", "imx6q-icore.dtb");
|
||||
env_set("fdt_file", "imx6q-icore.dtb");
|
||||
else if(is_mx6dl() || is_mx6solo())
|
||||
setenv("fdt_file", "imx6dl-icore.dtb");
|
||||
env_set("fdt_file", "imx6dl-icore.dtb");
|
||||
}
|
||||
|
||||
#ifdef CONFIG_SPL_BUILD
|
||||
|
|
|
@ -35,9 +35,9 @@ int board_mmc_get_env_dev(int devno)
|
|||
void setenv_fdt_file(void)
|
||||
{
|
||||
if (is_mx6dq())
|
||||
setenv("fdt_file", "imx6q-icore-rqs.dtb");
|
||||
env_set("fdt_file", "imx6q-icore-rqs.dtb");
|
||||
else if(is_mx6dl() || is_mx6solo())
|
||||
setenv("fdt_file", "imx6dl-icore-rqs.dtb");
|
||||
env_set("fdt_file", "imx6dl-icore-rqs.dtb");
|
||||
}
|
||||
|
||||
#ifdef CONFIG_SPL_BUILD
|
||||
|
|
|
@ -102,9 +102,9 @@ void setenv_fdt_file(void)
|
|||
{
|
||||
if (is_mx6ul()) {
|
||||
#ifdef CONFIG_ENV_IS_IN_MMC
|
||||
setenv("fdt_file", "imx6ul-isiot-emmc.dtb");
|
||||
env_set("fdt_file", "imx6ul-isiot-emmc.dtb");
|
||||
#else
|
||||
setenv("fdt_file", "imx6ul-isiot-nand.dtb");
|
||||
env_set("fdt_file", "imx6ul-isiot-nand.dtb");
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
|
|
@ -52,7 +52,7 @@ static int do_esbc_validate(cmd_tbl_t *cmdtp, int flag, int argc,
|
|||
* to continue U-Boot
|
||||
*/
|
||||
sprintf(buf, "%lx", img_addr);
|
||||
setenv("img_addr", buf);
|
||||
env_set("img_addr", buf);
|
||||
|
||||
if (ret)
|
||||
return 1;
|
||||
|
|
|
@ -80,12 +80,12 @@ int fsl_setenv_chain_of_trust(void)
|
|||
* bootdelay = 0 (To disable Boot Prompt)
|
||||
* bootcmd = CONFIG_CHAIN_BOOT_CMD (Validate and execute Boot script)
|
||||
*/
|
||||
setenv("bootdelay", "0");
|
||||
env_set("bootdelay", "0");
|
||||
|
||||
#ifdef CONFIG_ARM
|
||||
setenv("secureboot", "y");
|
||||
env_set("secureboot", "y");
|
||||
#else
|
||||
setenv("bootcmd", CONFIG_CHAIN_BOOT_CMD);
|
||||
env_set("bootcmd", CONFIG_CHAIN_BOOT_CMD);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -479,7 +479,7 @@ int mac_read_from_eeprom(void)
|
|||
* (i.e. have not yet been set)
|
||||
*/
|
||||
if (!getenv(enetvar))
|
||||
setenv(enetvar, ethaddr);
|
||||
env_set(enetvar, ethaddr);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -216,7 +216,7 @@ int mac_read_from_eeprom(void)
|
|||
buf[i * 6 + 4], buf[i * 6 + 5]);
|
||||
sprintf((char *)enetvar,
|
||||
i ? "eth%daddr" : "ethaddr", i);
|
||||
setenv((char *)enetvar, str);
|
||||
env_set((char *)enetvar, str);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -246,7 +246,7 @@ static int power_init(void)
|
|||
if (!p)
|
||||
return -ENODEV;
|
||||
|
||||
setenv("fdt_file", "imx53-qsb.dtb");
|
||||
env_set("fdt_file", "imx53-qsb.dtb");
|
||||
|
||||
/* Set VDDA to 1.25V */
|
||||
val = DA9052_BUCKCORE_BCOREEN | DA_BUCKCORE_VBCORE_1_250V;
|
||||
|
@ -289,7 +289,7 @@ static int power_init(void)
|
|||
if (!p)
|
||||
return -ENODEV;
|
||||
|
||||
setenv("fdt_file", "imx53-qsrb.dtb");
|
||||
env_set("fdt_file", "imx53-qsrb.dtb");
|
||||
|
||||
/* Set VDDGP to 1.25V for 1GHz on SW1 */
|
||||
pmic_reg_read(p, REG_SW_0, &val);
|
||||
|
|
|
@ -687,14 +687,14 @@ int board_late_init(void)
|
|||
#endif
|
||||
|
||||
#ifdef CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG
|
||||
setenv("board_name", "SABREAUTO");
|
||||
env_set("board_name", "SABREAUTO");
|
||||
|
||||
if (is_mx6dqp())
|
||||
setenv("board_rev", "MX6QP");
|
||||
env_set("board_rev", "MX6QP");
|
||||
else if (is_mx6dq())
|
||||
setenv("board_rev", "MX6Q");
|
||||
env_set("board_rev", "MX6Q");
|
||||
else if (is_mx6sdl())
|
||||
setenv("board_rev", "MX6DL");
|
||||
env_set("board_rev", "MX6DL");
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -700,14 +700,14 @@ int board_late_init(void)
|
|||
#endif
|
||||
|
||||
#ifdef CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG
|
||||
setenv("board_name", "SABRESD");
|
||||
env_set("board_name", "SABRESD");
|
||||
|
||||
if (is_mx6dqp())
|
||||
setenv("board_rev", "MX6QP");
|
||||
env_set("board_rev", "MX6QP");
|
||||
else if (is_mx6dq())
|
||||
setenv("board_rev", "MX6Q");
|
||||
env_set("board_rev", "MX6Q");
|
||||
else if (is_mx6sdl())
|
||||
setenv("board_rev", "MX6DL");
|
||||
env_set("board_rev", "MX6DL");
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -674,12 +674,12 @@ int board_late_init(void)
|
|||
#endif
|
||||
|
||||
#ifdef CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG
|
||||
setenv("board_name", "EVK");
|
||||
env_set("board_name", "EVK");
|
||||
|
||||
if (is_mx6ul_9x9_evk())
|
||||
setenv("board_rev", "9X9");
|
||||
env_set("board_rev", "9X9");
|
||||
else
|
||||
setenv("board_rev", "14X14");
|
||||
env_set("board_rev", "14X14");
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -84,8 +84,8 @@ int board_late_init(void)
|
|||
#endif
|
||||
|
||||
#ifdef CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG
|
||||
setenv("board_name", "EVK");
|
||||
setenv("board_rev", "14X14");
|
||||
env_set("board_name", "EVK");
|
||||
env_set("board_rev", "14X14");
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -301,7 +301,7 @@ int board_eth_init(bd_t *bis)
|
|||
if (!getenv("ethprime")) {
|
||||
struct eth_device *dev = eth_get_dev_by_index(0);
|
||||
if (dev) {
|
||||
setenv("ethprime", dev->name);
|
||||
env_set("ethprime", dev->name);
|
||||
printf("set ethprime to %s\n", getenv("ethprime"));
|
||||
}
|
||||
}
|
||||
|
@ -662,7 +662,7 @@ int checkboard(void)
|
|||
if (p)
|
||||
quiet = simple_strtol(p, NULL, 10);
|
||||
else
|
||||
setenv("quiet", "0");
|
||||
env_set("quiet", "0");
|
||||
|
||||
puts("\nGateworks Corporation Copyright 2014\n");
|
||||
if (info->model[0]) {
|
||||
|
@ -737,26 +737,26 @@ int misc_init_r(void)
|
|||
else if (is_cpu_type(MXC_CPU_MX6DL) ||
|
||||
is_cpu_type(MXC_CPU_MX6SOLO))
|
||||
cputype = "imx6dl";
|
||||
setenv("soctype", cputype);
|
||||
env_set("soctype", cputype);
|
||||
if (8 << (ventana_info.nand_flash_size-1) >= 2048)
|
||||
setenv("flash_layout", "large");
|
||||
env_set("flash_layout", "large");
|
||||
else
|
||||
setenv("flash_layout", "normal");
|
||||
env_set("flash_layout", "normal");
|
||||
memset(str, 0, sizeof(str));
|
||||
for (i = 0; i < (sizeof(str)-1) && info->model[i]; i++)
|
||||
str[i] = tolower(info->model[i]);
|
||||
setenv("model", str);
|
||||
env_set("model", str);
|
||||
if (!getenv("fdt_file")) {
|
||||
sprintf(fdt, "%s-%s.dtb", cputype, str);
|
||||
setenv("fdt_file", fdt);
|
||||
env_set("fdt_file", fdt);
|
||||
}
|
||||
p = strchr(str, '-');
|
||||
if (p) {
|
||||
*p++ = 0;
|
||||
|
||||
setenv("model_base", str);
|
||||
env_set("model_base", str);
|
||||
sprintf(fdt, "%s-%s.dtb", cputype, str);
|
||||
setenv("fdt_file1", fdt);
|
||||
env_set("fdt_file1", fdt);
|
||||
if (board_type != GW551x &&
|
||||
board_type != GW552x &&
|
||||
board_type != GW553x &&
|
||||
|
@ -765,7 +765,7 @@ int misc_init_r(void)
|
|||
str[5] = 'x';
|
||||
str[6] = 0;
|
||||
sprintf(fdt, "%s-%s.dtb", cputype, str);
|
||||
setenv("fdt_file2", fdt);
|
||||
env_set("fdt_file2", fdt);
|
||||
}
|
||||
|
||||
/* initialize env from EEPROM */
|
||||
|
@ -780,11 +780,11 @@ int misc_init_r(void)
|
|||
|
||||
/* board serial-number */
|
||||
sprintf(str, "%6d", info->serial);
|
||||
setenv("serial#", str);
|
||||
env_set("serial#", str);
|
||||
|
||||
/* memory MB */
|
||||
sprintf(str, "%d", (int) (gd->ram_size >> 20));
|
||||
setenv("mem_mb", str);
|
||||
env_set("mem_mb", str);
|
||||
}
|
||||
|
||||
/* Set a non-initialized hwconfig based on board configuration */
|
||||
|
@ -798,7 +798,7 @@ int misc_init_r(void)
|
|||
if (strlen(buf) + strlen(buf1) < sizeof(buf))
|
||||
strcat(buf, buf1);
|
||||
}
|
||||
setenv("hwconfig", buf);
|
||||
env_set("hwconfig", buf);
|
||||
}
|
||||
|
||||
/* setup baseboard specific GPIO based on board and env */
|
||||
|
|
|
@ -173,7 +173,7 @@ void board_late_mmc_init(void)
|
|||
/* Set mmcblk env */
|
||||
sprintf(mmcblk, "/dev/mmcblk%dp2 rootwait rw",
|
||||
dev_no);
|
||||
setenv("mmcroot", mmcblk);
|
||||
env_set("mmcroot", mmcblk);
|
||||
|
||||
sprintf(cmd, "mmc dev %d", dev_no);
|
||||
run_command(cmd, 0);
|
||||
|
|
|
@ -82,9 +82,9 @@ int misc_init_r(void)
|
|||
sprintf(envbuffer, "bootcmd%d", boot_choice);
|
||||
if (getenv(envbuffer)) {
|
||||
sprintf(envbuffer, "run bootcmd%d", boot_choice);
|
||||
setenv("bootcmd", envbuffer);
|
||||
env_set("bootcmd", envbuffer);
|
||||
} else
|
||||
setenv("bootcmd", "");
|
||||
env_set("bootcmd", "");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -83,7 +83,7 @@ int board_late_init(void)
|
|||
if (gpio_get_value(HOT_WATER_BUTTON))
|
||||
return 0;
|
||||
|
||||
setenv("bootcmd", "run swupdate");
|
||||
env_set("bootcmd", "run swupdate");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -64,11 +64,11 @@ static void assign_serial(void)
|
|||
|
||||
snprintf(usb0addr, sizeof(usb0addr), "02:00:86:%02x:%02x:%02x",
|
||||
ssn[13], ssn[14], ssn[15]);
|
||||
setenv("usb0addr", usb0addr);
|
||||
env_set("usb0addr", usb0addr);
|
||||
|
||||
for (i = 0; i < 16; i++)
|
||||
snprintf(&serial[2 * i], 3, "%02x", ssn[i]);
|
||||
setenv("serial#", serial);
|
||||
env_set("serial#", serial);
|
||||
|
||||
#if defined(CONFIG_CMD_SAVEENV) && !defined(CONFIG_ENV_IS_NOWHERE)
|
||||
env_save();
|
||||
|
@ -86,7 +86,7 @@ static void assign_hardware_id(void)
|
|||
printf("Can't retrieve hardware revision\n");
|
||||
|
||||
snprintf(hardware_id, sizeof(hardware_id), "%02X", v.hardware_id);
|
||||
setenv("hardware_id", hardware_id);
|
||||
env_set("hardware_id", hardware_id);
|
||||
|
||||
#if defined(CONFIG_CMD_SAVEENV) && !defined(CONFIG_ENV_IS_NOWHERE)
|
||||
env_save();
|
||||
|
|
|
@ -194,13 +194,13 @@ int board_late_init(void)
|
|||
#ifdef CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG
|
||||
switch (get_board_revision()) {
|
||||
case 0:
|
||||
setenv("board_name", "igep0034-lite");
|
||||
env_set("board_name", "igep0034-lite");
|
||||
break;
|
||||
case 1:
|
||||
setenv("board_name", "igep0034");
|
||||
env_set("board_name", "igep0034");
|
||||
break;
|
||||
default:
|
||||
setenv("board_name", "igep0033");
|
||||
env_set("board_name", "igep0033");
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -251,10 +251,10 @@ void set_fdt(void)
|
|||
{
|
||||
switch (gd->bd->bi_arch_number) {
|
||||
case MACH_TYPE_IGEP0020:
|
||||
setenv("fdtfile", "omap3-igep0020.dtb");
|
||||
env_set("fdtfile", "omap3-igep0020.dtb");
|
||||
break;
|
||||
case MACH_TYPE_IGEP0030:
|
||||
setenv("fdtfile", "omap3-igep0030.dtb");
|
||||
env_set("fdtfile", "omap3-igep0030.dtb");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -51,7 +51,7 @@ int set_km_env(void)
|
|||
pnvramaddr = gd->ram_size - CONFIG_KM_RESERVED_PRAM - CONFIG_KM_PHRAM
|
||||
- CONFIG_KM_PNVRAM;
|
||||
sprintf((char *)buf, "0x%x", pnvramaddr);
|
||||
setenv("pnvramaddr", (char *)buf);
|
||||
env_set("pnvramaddr", (char *)buf);
|
||||
|
||||
/* try to read rootfssize (ram image) from environment */
|
||||
p = getenv("rootfssize");
|
||||
|
@ -60,15 +60,15 @@ int set_km_env(void)
|
|||
pram = (rootfssize + CONFIG_KM_RESERVED_PRAM + CONFIG_KM_PHRAM +
|
||||
CONFIG_KM_PNVRAM) / 0x400;
|
||||
sprintf((char *)buf, "0x%x", pram);
|
||||
setenv("pram", (char *)buf);
|
||||
env_set("pram", (char *)buf);
|
||||
|
||||
varaddr = gd->ram_size - CONFIG_KM_RESERVED_PRAM - CONFIG_KM_PHRAM;
|
||||
sprintf((char *)buf, "0x%x", varaddr);
|
||||
setenv("varaddr", (char *)buf);
|
||||
env_set("varaddr", (char *)buf);
|
||||
|
||||
kernelmem = gd->ram_size - 0x400 * pram;
|
||||
sprintf((char *)buf, "0x%x", kernelmem);
|
||||
setenv("kernelmem", (char *)buf);
|
||||
env_set("kernelmem", (char *)buf);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -169,7 +169,7 @@ static int do_setboardid(cmd_tbl_t *cmdtp, int flag, int argc,
|
|||
return 1;
|
||||
}
|
||||
strcpy((char *)buf, p);
|
||||
setenv("boardid", (char *)buf);
|
||||
env_set("boardid", (char *)buf);
|
||||
printf("set boardid=%s\n", buf);
|
||||
|
||||
p = get_local_var("IVM_HWKey");
|
||||
|
@ -178,7 +178,7 @@ static int do_setboardid(cmd_tbl_t *cmdtp, int flag, int argc,
|
|||
return 1;
|
||||
}
|
||||
strcpy((char *)buf, p);
|
||||
setenv("hwkey", (char *)buf);
|
||||
env_set("hwkey", (char *)buf);
|
||||
printf("set hwkey=%s\n", buf);
|
||||
printf("Execute manually saveenv for persistent storage.\n");
|
||||
|
||||
|
@ -311,9 +311,9 @@ static int do_checkboardidhwk(cmd_tbl_t *cmdtp, int flag, int argc,
|
|||
envbid = bid;
|
||||
envhwkey = hwkey;
|
||||
sprintf(buf, "%lx", bid);
|
||||
setenv("boardid", buf);
|
||||
env_set("boardid", buf);
|
||||
sprintf(buf, "%lx", hwkey);
|
||||
setenv("hwkey", buf);
|
||||
env_set("hwkey", buf);
|
||||
}
|
||||
} /* end while( ! found ) */
|
||||
}
|
||||
|
|
|
@ -310,11 +310,11 @@ static int ivm_populate_env(unsigned char *buf, int len)
|
|||
#ifndef CONFIG_KMTEGR1
|
||||
/* if an offset is defined, add it */
|
||||
process_mac(valbuf, page2, CONFIG_PIGGY_MAC_ADRESS_OFFSET, true);
|
||||
setenv((char *)"ethaddr", (char *)valbuf);
|
||||
env_set((char *)"ethaddr", (char *)valbuf);
|
||||
#ifdef CONFIG_KMVECT1
|
||||
/* KMVECT1 has two ethernet interfaces */
|
||||
process_mac(valbuf, page2, 1, true);
|
||||
setenv((char *)"eth1addr", (char *)valbuf);
|
||||
env_set((char *)"eth1addr", (char *)valbuf);
|
||||
#endif
|
||||
#else
|
||||
/* KMTEGR1 has a special setup. eth0 has no connection to the outside and
|
||||
|
@ -322,9 +322,9 @@ static int ivm_populate_env(unsigned char *buf, int len)
|
|||
* gets the official MAC address from the IVM
|
||||
*/
|
||||
process_mac(valbuf, page2, CONFIG_PIGGY_MAC_ADRESS_OFFSET, false);
|
||||
setenv((char *)"ethaddr", (char *)valbuf);
|
||||
env_set((char *)"ethaddr", (char *)valbuf);
|
||||
process_mac(valbuf, page2, CONFIG_PIGGY_MAC_ADRESS_OFFSET, true);
|
||||
setenv((char *)"eth1addr", (char *)valbuf);
|
||||
env_set((char *)"eth1addr", (char *)valbuf);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -263,11 +263,11 @@ int last_stage_init(void)
|
|||
mv88e_sw_reset(name, CONFIG_KM_MVEXTSW_ADDR);
|
||||
|
||||
if (piggy_present()) {
|
||||
setenv("ethact", "UEC2");
|
||||
setenv("netdev", "eth1");
|
||||
env_set("ethact", "UEC2");
|
||||
env_set("netdev", "eth1");
|
||||
puts("using PIGGY for network boot\n");
|
||||
} else {
|
||||
setenv("netdev", "eth0");
|
||||
env_set("netdev", "eth0");
|
||||
puts("using frontport for network boot\n");
|
||||
}
|
||||
#endif
|
||||
|
@ -280,7 +280,7 @@ int last_stage_init(void)
|
|||
if (dip_switch != 0) {
|
||||
/* start bootloader */
|
||||
puts("DIP: Enabled\n");
|
||||
setenv("actual_bank", "0");
|
||||
env_set("actual_bank", "0");
|
||||
}
|
||||
#endif
|
||||
set_km_env();
|
||||
|
|
|
@ -193,7 +193,7 @@ static void set_bootcount_addr(void)
|
|||
unsigned int bootcountaddr;
|
||||
bootcountaddr = gd->ram_size - BOOTCOUNT_ADDR;
|
||||
sprintf((char *)buf, "0x%x", bootcountaddr);
|
||||
setenv("bootcountaddr", (char *)buf);
|
||||
env_set("bootcountaddr", (char *)buf);
|
||||
}
|
||||
|
||||
int misc_init_r(void)
|
||||
|
@ -299,7 +299,7 @@ int board_late_init(void)
|
|||
if (dip_switch != 0) {
|
||||
/* start bootloader */
|
||||
puts("DIP: Enabled\n");
|
||||
setenv("actual_bank", "0");
|
||||
env_set("actual_bank", "0");
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
@ -222,7 +222,7 @@ int last_stage_init(void)
|
|||
if (dip_switch != 0) {
|
||||
/* start bootloader */
|
||||
puts("DIP: Enabled\n");
|
||||
setenv("actual_bank", "0");
|
||||
env_set("actual_bank", "0");
|
||||
}
|
||||
#endif
|
||||
set_km_env();
|
||||
|
|
|
@ -134,7 +134,7 @@ int misc_init_r(void)
|
|||
|
||||
if (reboot_mode[0] > 0 && isascii(reboot_mode[0])) {
|
||||
if (!getenv("reboot-mode"))
|
||||
setenv("reboot-mode", (char *)reboot_mode);
|
||||
env_set("reboot-mode", (char *)reboot_mode);
|
||||
}
|
||||
|
||||
omap_reboot_mode_clear();
|
||||
|
|
|
@ -367,7 +367,7 @@ int board_init(void)
|
|||
|
||||
int board_late_init(void)
|
||||
{
|
||||
setenv("board_name", "mccmon6");
|
||||
env_set("board_name", "mccmon6");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -173,11 +173,11 @@ int board_init(void)
|
|||
|
||||
int board_late_init(void)
|
||||
{
|
||||
setenv("board_name", "imx6logic");
|
||||
env_set("board_name", "imx6logic");
|
||||
|
||||
if (is_mx6dq()) {
|
||||
setenv("board_rev", "MX6DQ");
|
||||
setenv("fdt_file", "imx6q-logicpd.dtb");
|
||||
env_set("board_rev", "MX6DQ");
|
||||
env_set("fdt_file", "imx6q-logicpd.dtb");
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -220,7 +220,7 @@ int board_late_init(void)
|
|||
|
||||
/* If the user has not set fdtimage, set the default */
|
||||
if (!getenv("fdtimage"))
|
||||
setenv("fdtimage", board->fdtfile);
|
||||
env_set("fdtimage", board->fdtfile);
|
||||
}
|
||||
|
||||
/* restore hsusb0_data5 pin as hsusb0_data5 */
|
||||
|
|
|
@ -413,7 +413,7 @@ int misc_init_r(void)
|
|||
|
||||
/* set env variable attkernaddr for relocated kernel */
|
||||
sprintf(buf, "%#x", KERNEL_ADDRESS);
|
||||
setenv("attkernaddr", buf);
|
||||
env_set("attkernaddr", buf);
|
||||
|
||||
/* initialize omap tags */
|
||||
init_omap_tags();
|
||||
|
|
|
@ -172,47 +172,47 @@ int misc_init_r(void)
|
|||
expansion_config.revision,
|
||||
expansion_config.fab_revision);
|
||||
MUX_GUMSTIX();
|
||||
setenv("defaultdisplay", "dvi");
|
||||
setenv("expansionname", "summit");
|
||||
env_set("defaultdisplay", "dvi");
|
||||
env_set("expansionname", "summit");
|
||||
break;
|
||||
case GUMSTIX_TOBI:
|
||||
printf("Recognized Tobi expansion board (rev %d %s)\n",
|
||||
expansion_config.revision,
|
||||
expansion_config.fab_revision);
|
||||
MUX_GUMSTIX();
|
||||
setenv("defaultdisplay", "dvi");
|
||||
setenv("expansionname", "tobi");
|
||||
env_set("defaultdisplay", "dvi");
|
||||
env_set("expansionname", "tobi");
|
||||
break;
|
||||
case GUMSTIX_TOBI_DUO:
|
||||
printf("Recognized Tobi Duo expansion board (rev %d %s)\n",
|
||||
expansion_config.revision,
|
||||
expansion_config.fab_revision);
|
||||
MUX_GUMSTIX();
|
||||
setenv("expansionname", "tobiduo");
|
||||
env_set("expansionname", "tobiduo");
|
||||
break;
|
||||
case GUMSTIX_PALO35:
|
||||
printf("Recognized Palo35 expansion board (rev %d %s)\n",
|
||||
expansion_config.revision,
|
||||
expansion_config.fab_revision);
|
||||
MUX_GUMSTIX();
|
||||
setenv("defaultdisplay", "lcd35");
|
||||
setenv("expansionname", "palo35");
|
||||
env_set("defaultdisplay", "lcd35");
|
||||
env_set("expansionname", "palo35");
|
||||
break;
|
||||
case GUMSTIX_PALO43:
|
||||
printf("Recognized Palo43 expansion board (rev %d %s)\n",
|
||||
expansion_config.revision,
|
||||
expansion_config.fab_revision);
|
||||
MUX_GUMSTIX();
|
||||
setenv("defaultdisplay", "lcd43");
|
||||
setenv("expansionname", "palo43");
|
||||
env_set("defaultdisplay", "lcd43");
|
||||
env_set("expansionname", "palo43");
|
||||
break;
|
||||
case GUMSTIX_CHESTNUT43:
|
||||
printf("Recognized Chestnut43 expansion board (rev %d %s)\n",
|
||||
expansion_config.revision,
|
||||
expansion_config.fab_revision);
|
||||
MUX_GUMSTIX();
|
||||
setenv("defaultdisplay", "lcd43");
|
||||
setenv("expansionname", "chestnut43");
|
||||
env_set("defaultdisplay", "lcd43");
|
||||
env_set("expansionname", "chestnut43");
|
||||
break;
|
||||
case GUMSTIX_PINTO:
|
||||
printf("Recognized Pinto expansion board (rev %d %s)\n",
|
||||
|
@ -225,8 +225,8 @@ int misc_init_r(void)
|
|||
expansion_config.revision,
|
||||
expansion_config.fab_revision);
|
||||
MUX_GUMSTIX();
|
||||
setenv("defaultdisplay", "lcd43");
|
||||
setenv("expansionname", "gallop43");
|
||||
env_set("defaultdisplay", "lcd43");
|
||||
env_set("expansionname", "gallop43");
|
||||
break;
|
||||
case GUMSTIX_ALTO35:
|
||||
printf("Recognized Alto35 expansion board (rev %d %s)\n",
|
||||
|
@ -234,8 +234,8 @@ int misc_init_r(void)
|
|||
expansion_config.fab_revision);
|
||||
MUX_GUMSTIX();
|
||||
MUX_ALTO35();
|
||||
setenv("defaultdisplay", "lcd35");
|
||||
setenv("expansionname", "alto35");
|
||||
env_set("defaultdisplay", "lcd35");
|
||||
env_set("expansionname", "alto35");
|
||||
break;
|
||||
case GUMSTIX_STAGECOACH:
|
||||
printf("Recognized Stagecoach expansion board (rev %d %s)\n",
|
||||
|
@ -261,8 +261,8 @@ int misc_init_r(void)
|
|||
expansion_config.fab_revision);
|
||||
MUX_GUMSTIX();
|
||||
MUX_ARBOR43C();
|
||||
setenv("defaultdisplay", "lcd43");
|
||||
setenv("expansionname", "arbor43c");
|
||||
env_set("defaultdisplay", "lcd43");
|
||||
env_set("expansionname", "arbor43c");
|
||||
break;
|
||||
case ETTUS_USRP_E:
|
||||
printf("Recognized Ettus Research USRP-E (rev %d %s)\n",
|
||||
|
@ -270,13 +270,13 @@ int misc_init_r(void)
|
|||
expansion_config.fab_revision);
|
||||
MUX_GUMSTIX();
|
||||
MUX_USRP_E();
|
||||
setenv("defaultdisplay", "dvi");
|
||||
env_set("defaultdisplay", "dvi");
|
||||
break;
|
||||
case GUMSTIX_NO_EEPROM:
|
||||
case GUMSTIX_EMPTY_EEPROM:
|
||||
puts("No or empty EEPROM on expansion board\n");
|
||||
MUX_GUMSTIX();
|
||||
setenv("expansionname", "tobi");
|
||||
env_set("expansionname", "tobi");
|
||||
break;
|
||||
default:
|
||||
printf("Unrecognized expansion board 0x%08x\n", expansion_id);
|
||||
|
@ -284,14 +284,14 @@ int misc_init_r(void)
|
|||
}
|
||||
|
||||
if (expansion_config.content == 1)
|
||||
setenv(expansion_config.env_var, expansion_config.env_setting);
|
||||
env_set(expansion_config.env_var, expansion_config.env_setting);
|
||||
|
||||
omap_die_id_display();
|
||||
|
||||
if (get_cpu_family() == CPU_OMAP34XX)
|
||||
setenv("boardname", "overo");
|
||||
env_set("boardname", "overo");
|
||||
else
|
||||
setenv("boardname", "overo-storm");
|
||||
env_set("boardname", "overo-storm");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -128,7 +128,7 @@ int misc_init_r(void)
|
|||
}
|
||||
|
||||
if (dm_gpio_get_value(&resin)) {
|
||||
setenv("bootdelay", "-1");
|
||||
env_set("bootdelay", "-1");
|
||||
printf("Power button pressed - dropping to console.\n");
|
||||
}
|
||||
|
||||
|
|
|
@ -251,7 +251,7 @@ static void set_fdtfile(void)
|
|||
return;
|
||||
|
||||
fdtfile = model->fdtfile;
|
||||
setenv("fdtfile", fdtfile);
|
||||
env_set("fdtfile", fdtfile);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -303,7 +303,7 @@ static void set_usbethaddr(void)
|
|||
eth_setenv_enetaddr("usbethaddr", msg->get_mac_address.body.resp.mac);
|
||||
|
||||
if (!getenv("ethaddr"))
|
||||
setenv("ethaddr", getenv("usbethaddr"));
|
||||
env_set("ethaddr", getenv("usbethaddr"));
|
||||
|
||||
return;
|
||||
}
|
||||
|
@ -314,13 +314,13 @@ static void set_board_info(void)
|
|||
char s[11];
|
||||
|
||||
snprintf(s, sizeof(s), "0x%X", revision);
|
||||
setenv("board_revision", s);
|
||||
env_set("board_revision", s);
|
||||
snprintf(s, sizeof(s), "%d", rev_scheme);
|
||||
setenv("board_rev_scheme", s);
|
||||
env_set("board_rev_scheme", s);
|
||||
/* Can't rename this to board_rev_type since it's an ABI for scripts */
|
||||
snprintf(s, sizeof(s), "0x%X", rev_type);
|
||||
setenv("board_rev", s);
|
||||
setenv("board_name", model->name);
|
||||
env_set("board_rev", s);
|
||||
env_set("board_name", model->name);
|
||||
}
|
||||
#endif /* CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG */
|
||||
|
||||
|
@ -345,7 +345,7 @@ static void set_serial_number(void)
|
|||
|
||||
snprintf(serial_string, sizeof(serial_string), "%016" PRIx64,
|
||||
msg->get_board_serial.body.resp.serial);
|
||||
setenv("serial#", serial_string);
|
||||
env_set("serial#", serial_string);
|
||||
}
|
||||
|
||||
int misc_init_r(void)
|
||||
|
|
|
@ -55,7 +55,7 @@ int board_late_init(void)
|
|||
/* Set MAC address */
|
||||
sprintf(env_mac, "%02X:%02X:%02X:%02X:%02X:%02X",
|
||||
mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]);
|
||||
setenv("ethaddr", env_mac);
|
||||
env_set("ethaddr", env_mac);
|
||||
|
||||
debug_led(0x0F);
|
||||
|
||||
|
|
|
@ -221,10 +221,10 @@ static void init_ethernet_mac(void)
|
|||
for (i = 0; i < SH7752EVB_ETHERNET_NUM_CH; i++) {
|
||||
get_sh_eth_mac(i, mac_string, buf);
|
||||
if (i == 0)
|
||||
setenv("ethaddr", mac_string);
|
||||
env_set("ethaddr", mac_string);
|
||||
else {
|
||||
sprintf(env_string, "eth%daddr", i);
|
||||
setenv(env_string, mac_string);
|
||||
env_set(env_string, mac_string);
|
||||
}
|
||||
set_mac_to_sh_giga_eth_register(i, mac_string);
|
||||
}
|
||||
|
|
|
@ -237,10 +237,10 @@ static void init_ethernet_mac(void)
|
|||
for (i = 0; i < SH7753EVB_ETHERNET_NUM_CH; i++) {
|
||||
get_sh_eth_mac(i, mac_string, buf);
|
||||
if (i == 0)
|
||||
setenv("ethaddr", mac_string);
|
||||
env_set("ethaddr", mac_string);
|
||||
else {
|
||||
sprintf(env_string, "eth%daddr", i);
|
||||
setenv(env_string, mac_string);
|
||||
env_set(env_string, mac_string);
|
||||
}
|
||||
set_mac_to_sh_giga_eth_register(i, mac_string);
|
||||
}
|
||||
|
|
|
@ -278,10 +278,10 @@ static void init_ethernet_mac(void)
|
|||
for (i = 0; i < SH7757LCR_ETHERNET_NUM_CH; i++) {
|
||||
get_sh_eth_mac(i, mac_string, buf);
|
||||
if (i == 0)
|
||||
setenv("ethaddr", mac_string);
|
||||
env_set("ethaddr", mac_string);
|
||||
else {
|
||||
sprintf(env_string, "eth%daddr", i);
|
||||
setenv(env_string, mac_string);
|
||||
env_set(env_string, mac_string);
|
||||
}
|
||||
|
||||
set_mac_to_sh_eth_register(i, mac_string);
|
||||
|
@ -291,7 +291,7 @@ static void init_ethernet_mac(void)
|
|||
for (i = 0; i < SH7757LCR_GIGA_ETHERNET_NUM_CH; i++) {
|
||||
get_sh_eth_mac(i + SH7757LCR_ETHERNET_NUM_CH, mac_string, buf);
|
||||
sprintf(env_string, "eth%daddr", i + SH7757LCR_ETHERNET_NUM_CH);
|
||||
setenv(env_string, mac_string);
|
||||
env_set(env_string, mac_string);
|
||||
|
||||
set_mac_to_sh_giga_eth_register(i, mac_string);
|
||||
}
|
||||
|
|
|
@ -44,7 +44,7 @@ int rk_board_late_init(void)
|
|||
{
|
||||
if (fastboot_key_pressed()) {
|
||||
printf("enter fastboot!\n");
|
||||
setenv("preboot", "setenv preboot; fastboot usb0");
|
||||
env_set("preboot", "setenv preboot; fastboot usb0");
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -51,7 +51,7 @@ void set_dfu_alt_info(char *interface, char *devstr)
|
|||
|
||||
alt_setting = get_dfu_alt_boot(interface, devstr);
|
||||
if (alt_setting) {
|
||||
setenv("dfu_alt_boot", alt_setting);
|
||||
env_set("dfu_alt_boot", alt_setting);
|
||||
offset = snprintf(buf, buf_size, "%s", alt_setting);
|
||||
}
|
||||
|
||||
|
@ -71,7 +71,7 @@ void set_dfu_alt_info(char *interface, char *devstr)
|
|||
status = "done\n";
|
||||
}
|
||||
|
||||
setenv("dfu_alt_info", alt_info);
|
||||
env_set("dfu_alt_info", alt_info);
|
||||
puts(status);
|
||||
}
|
||||
#endif
|
||||
|
@ -83,14 +83,14 @@ void set_board_info(void)
|
|||
|
||||
snprintf(info, ARRAY_SIZE(info), "%u.%u", (s5p_cpu_rev & 0xf0) >> 4,
|
||||
s5p_cpu_rev & 0xf);
|
||||
setenv("soc_rev", info);
|
||||
env_set("soc_rev", info);
|
||||
|
||||
snprintf(info, ARRAY_SIZE(info), "%x", s5p_cpu_id);
|
||||
setenv("soc_id", info);
|
||||
env_set("soc_id", info);
|
||||
|
||||
#ifdef CONFIG_REVISION_TAG
|
||||
snprintf(info, ARRAY_SIZE(info), "%x", get_board_rev());
|
||||
setenv("board_rev", info);
|
||||
env_set("board_rev", info);
|
||||
#endif
|
||||
#ifdef CONFIG_OF_LIBFDT
|
||||
const char *bdtype = "";
|
||||
|
@ -102,11 +102,11 @@ void set_board_info(void)
|
|||
bdtype = "";
|
||||
|
||||
sprintf(info, "%s%s", bdname, bdtype);
|
||||
setenv("boardname", info);
|
||||
env_set("boardname", info);
|
||||
#endif
|
||||
snprintf(info, ARRAY_SIZE(info), "%s%x-%s%s.dtb",
|
||||
CONFIG_SYS_SOC, s5p_cpu_id, bdname, bdtype);
|
||||
setenv("fdtfile", info);
|
||||
env_set("fdtfile", info);
|
||||
#endif
|
||||
}
|
||||
#endif /* CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG */
|
||||
|
|
|
@ -469,7 +469,7 @@ void exynos_lcd_misc_init(vidinfo_t *vid)
|
|||
#endif
|
||||
#ifdef CONFIG_S6E8AX0
|
||||
s6e8ax0_init();
|
||||
setenv("lcdinfo", "lcd=s6e8ax0");
|
||||
env_set("lcdinfo", "lcd=s6e8ax0");
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -397,6 +397,6 @@ void exynos_lcd_misc_init(vidinfo_t *vid)
|
|||
vid->pclk_name = 1; /* MPLL */
|
||||
vid->sclk_div = 1;
|
||||
|
||||
setenv("lcdinfo", "lcd=ld9040");
|
||||
env_set("lcdinfo", "lcd=ld9040");
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -413,11 +413,11 @@ static int set_pin_state(void)
|
|||
return ret;
|
||||
|
||||
if (val >= VAL_UPPER)
|
||||
setenv("pin_state", "connected");
|
||||
env_set("pin_state", "connected");
|
||||
else if (val < VAL_UPPER && val > VAL_LOWER)
|
||||
setenv("pin_state", "open");
|
||||
env_set("pin_state", "open");
|
||||
else
|
||||
setenv("pin_state", "button");
|
||||
env_set("pin_state", "button");
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
|
@ -69,9 +69,9 @@ int misc_init_r(void)
|
|||
/* Check EEPROM signature. */
|
||||
if (!(data[0] == 0xa5 && data[1] == 0x5a)) {
|
||||
puts("Invalid I2C EEPROM signature.\n");
|
||||
setenv("unit_serial", "invalid");
|
||||
setenv("unit_ident", "VINing-xxxx-STD");
|
||||
setenv("hostname", "vining-invalid");
|
||||
env_set("unit_serial", "invalid");
|
||||
env_set("unit_ident", "VINing-xxxx-STD");
|
||||
env_set("hostname", "vining-invalid");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -82,13 +82,13 @@ int misc_init_r(void)
|
|||
(data[0x56] << 8) | (data[0x57] << 0);
|
||||
memset(str, 0, sizeof(str));
|
||||
sprintf(str, "%07i", serial);
|
||||
setenv("unit_serial", str);
|
||||
env_set("unit_serial", str);
|
||||
}
|
||||
|
||||
if (!getenv("unit_ident")) {
|
||||
memset(str, 0, sizeof(str));
|
||||
memcpy(str, &data[0x2e], 18);
|
||||
setenv("unit_ident", str);
|
||||
env_set("unit_ident", str);
|
||||
}
|
||||
|
||||
/* Set ethernet address from EEPROM. */
|
||||
|
|
|
@ -266,7 +266,7 @@ err:
|
|||
|
||||
static struct ctrl_dev *cdev = (struct ctrl_dev *)CTRL_DEVICE_BASE;
|
||||
|
||||
static int factoryset_mac_setenv(void)
|
||||
static int factoryset_mac_env_set(void)
|
||||
{
|
||||
uint8_t mac_addr[6];
|
||||
|
||||
|
@ -296,11 +296,11 @@ static int factoryset_mac_setenv(void)
|
|||
return 0;
|
||||
}
|
||||
|
||||
int factoryset_setenv(void)
|
||||
int factoryset_env_set(void)
|
||||
{
|
||||
int ret = 0;
|
||||
|
||||
if (factoryset_mac_setenv() < 0)
|
||||
if (factoryset_mac_env_set() < 0)
|
||||
ret = -1;
|
||||
|
||||
return ret;
|
||||
|
|
|
@ -25,7 +25,7 @@ struct factorysetcontainer {
|
|||
};
|
||||
|
||||
int factoryset_read_eeprom(int i2c_addr);
|
||||
int factoryset_setenv(void);
|
||||
int factoryset_env_set(void);
|
||||
extern struct factorysetcontainer factory_dat;
|
||||
|
||||
#endif /* __FACTORYSET_H */
|
||||
|
|
|
@ -272,13 +272,13 @@ int board_late_init(void)
|
|||
#ifdef CONFIG_FACTORYSET
|
||||
/* Set ASN in environment*/
|
||||
if (factory_dat.asn[0] != 0) {
|
||||
setenv("dtb_name", (char *)factory_dat.asn);
|
||||
env_set("dtb_name", (char *)factory_dat.asn);
|
||||
} else {
|
||||
/* dtb suffix gets added in load script */
|
||||
setenv("dtb_name", "am335x-draco");
|
||||
env_set("dtb_name", "am335x-draco");
|
||||
}
|
||||
#else
|
||||
setenv("dtb_name", "am335x-draco");
|
||||
env_set("dtb_name", "am335x-draco");
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
|
@ -330,7 +330,7 @@ int board_eth_init(bd_t *bis)
|
|||
int n = 0;
|
||||
int rv;
|
||||
|
||||
factoryset_setenv();
|
||||
factoryset_env_set();
|
||||
|
||||
/* Set rgmii mode and enable rmii clock to be sourced from chip */
|
||||
writel((RMII_MODE_ENABLE | RMII_CHIPCKL_ENABLE), &cdev->miisel);
|
||||
|
|
|
@ -446,12 +446,12 @@ int board_late_init(void)
|
|||
factory_dat.pxm50 = 0;
|
||||
sprintf(tmp, "%s_%s", factory_dat.asn,
|
||||
factory_dat.comp_version);
|
||||
ret = setenv("boardid", tmp);
|
||||
ret = env_set("boardid", tmp);
|
||||
if (ret)
|
||||
printf("error setting board id\n");
|
||||
} else {
|
||||
factory_dat.pxm50 = 1;
|
||||
ret = setenv("boardid", "PXM50_1.0");
|
||||
ret = env_set("boardid", "PXM50_1.0");
|
||||
if (ret)
|
||||
printf("error setting board id\n");
|
||||
}
|
||||
|
|
|
@ -182,7 +182,7 @@ int board_eth_init(bd_t *bis)
|
|||
int rv;
|
||||
|
||||
#ifndef CONFIG_SPL_BUILD
|
||||
factoryset_setenv();
|
||||
factoryset_env_set();
|
||||
#endif
|
||||
|
||||
/* Set rgmii mode and enable rmii clock to be sourced from chip */
|
||||
|
@ -482,7 +482,7 @@ int board_late_init(void)
|
|||
else
|
||||
strcpy(tmp, "QMX7.E38_4.0");
|
||||
|
||||
ret = setenv("boardid", tmp);
|
||||
ret = env_set("boardid", tmp);
|
||||
if (ret)
|
||||
printf("error setting board id\n");
|
||||
|
||||
|
|
|
@ -380,9 +380,9 @@ static int upgrade_failure_fallback(void)
|
|||
partitionset_active = getenv("partitionset_active");
|
||||
if (partitionset_active) {
|
||||
if (partitionset_active[0] == 'A')
|
||||
setenv("partitionset_active", "B");
|
||||
env_set("partitionset_active", "B");
|
||||
else
|
||||
setenv("partitionset_active", "A");
|
||||
env_set("partitionset_active", "A");
|
||||
} else {
|
||||
printf("partitionset_active missing.\n");
|
||||
return -ENOENT;
|
||||
|
@ -390,22 +390,22 @@ static int upgrade_failure_fallback(void)
|
|||
|
||||
rootfs = getenv("rootfs");
|
||||
rootfs_fallback = getenv("rootfs_fallback");
|
||||
setenv("rootfs", rootfs_fallback);
|
||||
setenv("rootfs_fallback", rootfs);
|
||||
env_set("rootfs", rootfs_fallback);
|
||||
env_set("rootfs_fallback", rootfs);
|
||||
|
||||
kern_size = getenv("kernel_size");
|
||||
kern_size_fb = getenv("kernel_size_fallback");
|
||||
setenv("kernel_size", kern_size_fb);
|
||||
setenv("kernel_size_fallback", kern_size);
|
||||
env_set("kernel_size", kern_size_fb);
|
||||
env_set("kernel_size_fallback", kern_size);
|
||||
|
||||
kern_off = getenv("kernel_Off");
|
||||
kern_off_fb = getenv("kernel_Off_fallback");
|
||||
setenv("kernel_Off", kern_off_fb);
|
||||
setenv("kernel_Off_fallback", kern_off);
|
||||
env_set("kernel_Off", kern_off_fb);
|
||||
env_set("kernel_Off_fallback", kern_off);
|
||||
|
||||
setenv("bootargs", '\0');
|
||||
setenv("upgrade_available", '\0');
|
||||
setenv("boot_retries", '\0');
|
||||
env_set("bootargs", '\0');
|
||||
env_set("upgrade_available", '\0');
|
||||
env_set("boot_retries", '\0');
|
||||
env_save();
|
||||
|
||||
return 0;
|
||||
|
@ -424,7 +424,7 @@ static int do_upgrade_available(cmd_tbl_t *cmdtp, int flag, int argc,
|
|||
boot_retry = simple_strtoul(getenv("boot_retries"), NULL, 10);
|
||||
boot_retry++;
|
||||
sprintf(boot_buf, "%lx", boot_retry);
|
||||
setenv("boot_retries", boot_buf);
|
||||
env_set("boot_retries", boot_buf);
|
||||
env_save();
|
||||
|
||||
/*
|
||||
|
|
|
@ -376,14 +376,14 @@ int board_late_init(void)
|
|||
{
|
||||
#ifdef CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG
|
||||
if (is_hummingboard())
|
||||
setenv("board_name", "HUMMINGBOARD");
|
||||
env_set("board_name", "HUMMINGBOARD");
|
||||
else
|
||||
setenv("board_name", "CUBOXI");
|
||||
env_set("board_name", "CUBOXI");
|
||||
|
||||
if (is_mx6dq())
|
||||
setenv("board_rev", "MX6Q");
|
||||
env_set("board_rev", "MX6Q");
|
||||
else
|
||||
setenv("board_rev", "MX6DL");
|
||||
env_set("board_rev", "MX6DL");
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -56,12 +56,12 @@ int misc_init_r(void)
|
|||
if (!eth_getenv_enetaddr("ethaddr", mac_id) && !i2c_read_mac(mac_id))
|
||||
eth_setenv_enetaddr("ethaddr", mac_id);
|
||||
#endif
|
||||
setenv("verify", "n");
|
||||
env_set("verify", "n");
|
||||
|
||||
#if defined(CONFIG_SPEAR_USBTTY)
|
||||
setenv("stdin", "usbtty");
|
||||
setenv("stdout", "usbtty");
|
||||
setenv("stderr", "usbtty");
|
||||
env_set("stdin", "usbtty");
|
||||
env_set("stdout", "usbtty");
|
||||
env_set("stderr", "usbtty");
|
||||
|
||||
#ifndef CONFIG_SYS_NO_DCACHE
|
||||
dcache_enable();
|
||||
|
|
|
@ -320,7 +320,7 @@ int misc_init_r(void)
|
|||
u_id_high = readl(&STM32_U_ID->u_id_high);
|
||||
sprintf(serialno, "%08x%08x%08x",
|
||||
u_id_high, u_id_mid, u_id_low);
|
||||
setenv("serial#", serialno);
|
||||
env_set("serial#", serialno);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -712,7 +712,7 @@ static void setup_environment(const void *fdt)
|
|||
snprintf(serial_string, sizeof(serial_string),
|
||||
"%08x%08x", sid[0], sid[3]);
|
||||
|
||||
setenv("serial#", serial_string);
|
||||
env_set("serial#", serial_string);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -721,11 +721,11 @@ int misc_init_r(void)
|
|||
{
|
||||
__maybe_unused int ret;
|
||||
|
||||
setenv("fel_booted", NULL);
|
||||
setenv("fel_scriptaddr", NULL);
|
||||
env_set("fel_booted", NULL);
|
||||
env_set("fel_scriptaddr", NULL);
|
||||
/* determine if we are running in FEL mode */
|
||||
if (!is_boot0_magic(SPL_ADDR + 4)) { /* eGON.BT0 */
|
||||
setenv("fel_booted", "1");
|
||||
env_set("fel_booted", "1");
|
||||
parse_spl_header(SPL_ADDR);
|
||||
}
|
||||
|
||||
|
|
|
@ -156,9 +156,9 @@ int board_late_init(void)
|
|||
gpio_set_value(IMX_GPIO_NR(1, 29), 0);
|
||||
gpio_set_value(IMX_GPIO_NR(4, 21), 0);
|
||||
|
||||
setenv("preboot", "run gs_slow_boot");
|
||||
env_set("preboot", "run gs_slow_boot");
|
||||
} else
|
||||
setenv("preboot", "run gs_fast_boot");
|
||||
env_set("preboot", "run gs_fast_boot");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -144,8 +144,8 @@ static void setup_serial(void)
|
|||
serialno |= (u64)crc32_no_comp(serialno, high, 8) << 32;
|
||||
snprintf(serialno_str, sizeof(serialno_str), "%llx", serialno);
|
||||
|
||||
setenv("cpuid#", cpuid_str);
|
||||
setenv("serial#", serialno_str);
|
||||
env_set("cpuid#", cpuid_str);
|
||||
env_set("serial#", serialno_str);
|
||||
#endif
|
||||
|
||||
return;
|
||||
|
|
|
@ -731,7 +731,7 @@ int board_late_init(void)
|
|||
* on HS devices.
|
||||
*/
|
||||
if (get_device_type() == HS_DEVICE)
|
||||
setenv("boot_fit", "1");
|
||||
env_set("boot_fit", "1");
|
||||
#endif
|
||||
|
||||
#if !defined(CONFIG_SPL_BUILD)
|
||||
|
|
|
@ -626,7 +626,7 @@ int board_late_init(void)
|
|||
* on HS devices.
|
||||
*/
|
||||
if (get_device_type() == HS_DEVICE)
|
||||
setenv("boot_fit", "1");
|
||||
env_set("boot_fit", "1");
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -592,7 +592,7 @@ void am57x_idk_lcd_detect(void)
|
|||
/* we will let default be "no lcd" */
|
||||
}
|
||||
out:
|
||||
setenv("idk_lcd", idk_lcd);
|
||||
env_set("idk_lcd", idk_lcd);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -612,7 +612,7 @@ int board_late_init(void)
|
|||
* on HS devices.
|
||||
*/
|
||||
if (get_device_type() == HS_DEVICE)
|
||||
setenv("boot_fit", "1");
|
||||
env_set("boot_fit", "1");
|
||||
|
||||
/*
|
||||
* Set the GPIO7 Pad to POWERHOLD. This has higher priority
|
||||
|
|
|
@ -341,16 +341,16 @@ int misc_init_r(void)
|
|||
switch (get_board_revision()) {
|
||||
case REVISION_AXBX:
|
||||
printf("Beagle Rev Ax/Bx\n");
|
||||
setenv("beaglerev", "AxBx");
|
||||
env_set("beaglerev", "AxBx");
|
||||
break;
|
||||
case REVISION_CX:
|
||||
printf("Beagle Rev C1/C2/C3\n");
|
||||
setenv("beaglerev", "Cx");
|
||||
env_set("beaglerev", "Cx");
|
||||
MUX_BEAGLE_C();
|
||||
break;
|
||||
case REVISION_C4:
|
||||
printf("Beagle Rev C4\n");
|
||||
setenv("beaglerev", "C4");
|
||||
env_set("beaglerev", "C4");
|
||||
MUX_BEAGLE_C();
|
||||
/* Set VAUX2 to 1.8V for EHCI PHY */
|
||||
twl4030_pmrecv_vsel_cfg(TWL4030_PM_RECEIVER_VAUX2_DEDICATED,
|
||||
|
@ -360,7 +360,7 @@ int misc_init_r(void)
|
|||
break;
|
||||
case REVISION_XM_AB:
|
||||
printf("Beagle xM Rev A/B\n");
|
||||
setenv("beaglerev", "xMAB");
|
||||
env_set("beaglerev", "xMAB");
|
||||
MUX_BEAGLE_XM();
|
||||
/* Set VAUX2 to 1.8V for EHCI PHY */
|
||||
twl4030_pmrecv_vsel_cfg(TWL4030_PM_RECEIVER_VAUX2_DEDICATED,
|
||||
|
@ -371,7 +371,7 @@ int misc_init_r(void)
|
|||
break;
|
||||
case REVISION_XM_C:
|
||||
printf("Beagle xM Rev C\n");
|
||||
setenv("beaglerev", "xMC");
|
||||
env_set("beaglerev", "xMC");
|
||||
MUX_BEAGLE_XM();
|
||||
/* Set VAUX2 to 1.8V for EHCI PHY */
|
||||
twl4030_pmrecv_vsel_cfg(TWL4030_PM_RECEIVER_VAUX2_DEDICATED,
|
||||
|
@ -397,14 +397,14 @@ int misc_init_r(void)
|
|||
expansion_config.revision,
|
||||
expansion_config.fab_revision);
|
||||
MUX_TINCANTOOLS_ZIPPY();
|
||||
setenv("buddy", "zippy");
|
||||
env_set("buddy", "zippy");
|
||||
break;
|
||||
case TINCANTOOLS_ZIPPY2:
|
||||
printf("Recognized Tincantools Zippy2 board (rev %d %s)\n",
|
||||
expansion_config.revision,
|
||||
expansion_config.fab_revision);
|
||||
MUX_TINCANTOOLS_ZIPPY();
|
||||
setenv("buddy", "zippy2");
|
||||
env_set("buddy", "zippy2");
|
||||
break;
|
||||
case TINCANTOOLS_TRAINER:
|
||||
printf("Recognized Tincantools Trainer board (rev %d %s)\n",
|
||||
|
@ -412,37 +412,37 @@ int misc_init_r(void)
|
|||
expansion_config.fab_revision);
|
||||
MUX_TINCANTOOLS_ZIPPY();
|
||||
MUX_TINCANTOOLS_TRAINER();
|
||||
setenv("buddy", "trainer");
|
||||
env_set("buddy", "trainer");
|
||||
break;
|
||||
case TINCANTOOLS_SHOWDOG:
|
||||
printf("Recognized Tincantools Showdow board (rev %d %s)\n",
|
||||
expansion_config.revision,
|
||||
expansion_config.fab_revision);
|
||||
/* Place holder for DSS2 definition for showdog lcd */
|
||||
setenv("defaultdisplay", "showdoglcd");
|
||||
setenv("buddy", "showdog");
|
||||
env_set("defaultdisplay", "showdoglcd");
|
||||
env_set("buddy", "showdog");
|
||||
break;
|
||||
case KBADC_BEAGLEFPGA:
|
||||
printf("Recognized KBADC Beagle FPGA board\n");
|
||||
MUX_KBADC_BEAGLEFPGA();
|
||||
setenv("buddy", "beaglefpga");
|
||||
env_set("buddy", "beaglefpga");
|
||||
break;
|
||||
case LW_BEAGLETOUCH:
|
||||
printf("Recognized Liquidware BeagleTouch board\n");
|
||||
setenv("buddy", "beagletouch");
|
||||
env_set("buddy", "beagletouch");
|
||||
break;
|
||||
case BRAINMUX_LCDOG:
|
||||
printf("Recognized Brainmux LCDog board\n");
|
||||
setenv("buddy", "lcdog");
|
||||
env_set("buddy", "lcdog");
|
||||
break;
|
||||
case BRAINMUX_LCDOGTOUCH:
|
||||
printf("Recognized Brainmux LCDog Touch board\n");
|
||||
setenv("buddy", "lcdogtouch");
|
||||
env_set("buddy", "lcdogtouch");
|
||||
break;
|
||||
case BBTOYS_WIFI:
|
||||
printf("Recognized BeagleBoardToys WiFi board\n");
|
||||
MUX_BBTOYS_WIFI()
|
||||
setenv("buddy", "bbtoys-wifi");
|
||||
env_set("buddy", "bbtoys-wifi");
|
||||
break;
|
||||
case BBTOYS_VGA:
|
||||
printf("Recognized BeagleBoardToys VGA board\n");
|
||||
|
@ -459,20 +459,20 @@ int misc_init_r(void)
|
|||
case LSR_COM6L_ADPT:
|
||||
printf("Recognized LSR COM6L Adapter Board\n");
|
||||
MUX_BBTOYS_WIFI()
|
||||
setenv("buddy", "lsr-com6l-adpt");
|
||||
env_set("buddy", "lsr-com6l-adpt");
|
||||
break;
|
||||
case BEAGLE_NO_EEPROM:
|
||||
printf("No EEPROM on expansion board\n");
|
||||
setenv("buddy", "none");
|
||||
env_set("buddy", "none");
|
||||
break;
|
||||
default:
|
||||
printf("Unrecognized expansion board: %x\n",
|
||||
expansion_config.device_vendor);
|
||||
setenv("buddy", "unknown");
|
||||
env_set("buddy", "unknown");
|
||||
}
|
||||
|
||||
if (expansion_config.content == 1)
|
||||
setenv(expansion_config.env_var, expansion_config.env_setting);
|
||||
env_set(expansion_config.env_var, expansion_config.env_setting);
|
||||
|
||||
twl4030_power_init();
|
||||
switch (get_board_revision()) {
|
||||
|
|
|
@ -379,21 +379,21 @@ void __maybe_unused set_board_info_env(char *name)
|
|||
struct ti_common_eeprom *ep = TI_EEPROM_DATA;
|
||||
|
||||
if (name)
|
||||
setenv("board_name", name);
|
||||
env_set("board_name", name);
|
||||
else if (ep->name)
|
||||
setenv("board_name", ep->name);
|
||||
env_set("board_name", ep->name);
|
||||
else
|
||||
setenv("board_name", unknown);
|
||||
env_set("board_name", unknown);
|
||||
|
||||
if (ep->version)
|
||||
setenv("board_rev", ep->version);
|
||||
env_set("board_rev", ep->version);
|
||||
else
|
||||
setenv("board_rev", unknown);
|
||||
env_set("board_rev", unknown);
|
||||
|
||||
if (ep->serial)
|
||||
setenv("board_serial", ep->serial);
|
||||
env_set("board_serial", ep->serial);
|
||||
else
|
||||
setenv("board_serial", unknown);
|
||||
env_set("board_serial", unknown);
|
||||
}
|
||||
|
||||
static u64 mac_to_u64(u8 mac[6])
|
||||
|
|
|
@ -558,7 +558,7 @@ int board_late_init(void)
|
|||
* on HS devices.
|
||||
*/
|
||||
if (get_device_type() == HS_DEVICE)
|
||||
setenv("boot_fit", "1");
|
||||
env_set("boot_fit", "1");
|
||||
|
||||
omap_die_id_serial();
|
||||
omap_set_fastboot_vars();
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue