[U-Boot] env-variable setting in u-boot-function
Altunbas Sabri (DC-IA/EAH2)
sabri.altunbas at boschrexroth.de
Wed May 15 12:03:48 CEST 2013
Hi,
i want tos et an env. variable in a u-boot-function like this
fs/fs.c:
--------
int do_load(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[],
int fstype, int cmdline_base)
{
......
......
setenv("filesize", buf);
......
......
}
I tried it like following
Arch/x86/lib/board.c:
---------------------
void board_init_f(ulong boot_flags)
{
......
......
gd->flags = boot_flags;
1) /*setenv("starttype", boot_flags);*/
2) setenv((const char *) "starttype", (const char *) boot_flags);
......
......
}
I will find out the starttype. But the version
1) can not be compiled
board.c: In function 'board_init_f':
board.c:223:2: error: passing argument 2 of 'setenv' makes pointer from integer without a cast [-Werror]
In file included from board.c:34:0:
.../u-boot-2013.01/include/common.h:358:5: note: expected 'const char *' but argument is of type 'ulong'
cc1: all warnings being treated as errors
make[1]: *** [board.o] Error 1
make[1]: Leaving directory .../u-boot-2013.01/arch/x86/lib'
make: *** [arch/x86/lib/libx86.o] Error 2
the version
2) doesn't work. This means. Starttype is not set
Thank you for hints
Mit freundlichen Grüßen / Best regards
Sabri Altunbas (DC-IA/EAH2)
Tel. +49 (0) 6062/78-526
Fax +49 (0) 6062/78-771
More information about the U-Boot
mailing list