[U-Boot] env-variable setting in u-boot-function

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
participants (1)
-
Altunbas Sabri (DC-IA/EAH2)