AnsweredAssumed Answered

u-boot compile problem

Question asked by zcyhansen on Oct 21, 2013
Latest reply on Oct 21, 2013 by Aaronwu

hello:

I  got an uboot file (u-boot.ldr,1.1.6) that others had  comliped. It can be loaded  to my board (bf537-leanxcam) and used ,but I found this u-boot does not include the  erase and protect command.  these command  are important for the job I am doing.

so I download the  source  file of uboot1.1.6 and compile a new one myself. I  just changed  the bf537-leanxcam.h file .

this file do not include CFG_CMD_FLASH , so I  add this argument by  | CFG_CMD_FLASH . 

 

after that ,I  compile the u-boot:

make clean

make bf537-leanxcam_config

make all

 

and there is an error :

/opt/uClinux/bfin-uclinux/lib/gcc/bfin-uclinux/4.1.2/include -pipe  -DCONFIG_BLACKFIN -Wall -Wstrict-prototypes -c -o cmd_flash.o cmd_flash.c

cmd_flash.c:46: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘flash_info’

cmd_flash.c:68: error: expected declaration specifiers or ‘...’ before ‘flash_info_t’

cmd_flash.c: In function ‘abbrev_spec’:

cmd_flash.c:70: error: ‘flash_info_t’ undeclared (first use in this function)

cmd_flash.c:70: error: (Each undeclared identifier is reported only once

cmd_flash.c:70: error: for each function it appears in.)

cmd_flash.c:70: error: ‘fp’ undeclared (first use in this function)

cmd_flash.c:81: error: ‘flash_info’ undeclared (first use in this function)

cmd_flash.c:81: error: ‘FLASH_UNKNOWN’ undeclared (first use in this function)

cmd_flash.c:101: error: ‘pinfo’ undeclared (first use in this function)

cmd_flash.c: In function ‘addr_spec’:

cmd_flash.c:165: error: ‘flash_info_t’ undeclared (first use in this function)

cmd_flash.c:165: error: ‘info’ undeclared (first use in this function)

cmd_flash.c:165: error: ‘flash_info’ undeclared (first use in this function)

cmd_flash.c: In function ‘flash_fill_sect_ranges’:

cmd_flash.c:203: error: ‘flash_info_t’ undeclared (first use in this function)

cmd_flash.c:203: error: ‘info’ undeclared (first use in this function)

cmd_flash.c:214: error: ‘flash_info’ undeclared (first use in this function)

cmd_flash.c:221: error: ‘FLASH_UNKNOWN’ undeclared (first use in this function)

cmd_flash.c: In function ‘do_flinfo’:

cmd_flash.c:293: warning: implicit declaration of function ‘flash_print_info’

cmd_flash.c:293: error: ‘flash_info’ undeclared (first use in this function)

cmd_flash.c: In function ‘do_flerase’:

cmd_flash.c:311: error: ‘flash_info_t’ undeclared (first use in this function)

cmd_flash.c:311: error: ‘info’ undeclared (first use in this function)

cmd_flash.c:329: error: ‘flash_info’ undeclared (first use in this function)

cmd_flash.c:330: warning: implicit declaration of function ‘flash_erase’

cmd_flash.c:335: error: too many arguments to function ‘abbrev_spec’

cmd_flash.c:400: warning: implicit declaration of function ‘flash_sect_erase’

cmd_flash.c: In function ‘flash_sect_erase’:

cmd_flash.c:406: error: ‘flash_info_t’ undeclared (first use in this function)

cmd_flash.c:406: error: ‘info’ undeclared (first use in this function)

cmd_flash.c:421: error: ‘flash_info’ undeclared (first use in this function)

cmd_flash.c: In function ‘do_protect’:

cmd_flash.c:447: error: ‘flash_info_t’ undeclared (first use in this function)

cmd_flash.c:447: error: ‘info’ undeclared (first use in this function)

cmd_flash.c:494: error: ‘flash_info’ undeclared (first use in this function)

cmd_flash.c:495: error: ‘FLASH_UNKNOWN’ undeclared (first use in this function)

cmd_flash.c:517: error: too many arguments to function ‘abbrev_spec’

cmd_flash.c:615: warning: implicit declaration of function ‘flash_sect_protect’

cmd_flash.c: In function ‘flash_sect_protect’:

cmd_flash.c:622: error: ‘flash_info_t’ undeclared (first use in this function)

cmd_flash.c:622: error: ‘info’ undeclared (first use in this function)

cmd_flash.c:638: error: ‘flash_info’ undeclared (first use in this function)

cmd_flash.c:639: error: ‘FLASH_UNKNOWN’ undeclared (first use in this function)

make[1]: *** [cmd_flash.o] Error 1

make[1]: Leaving directory `/home/oscar/scs-u-boot-4a12098/u-boot-1.1.6/common'

make: *** [common/libcommon.a] Error 2

root@oscar:/home/oscar/scs-u-boot-4a12098/u-boot-1.1.6#

 

I  think  some files or  valuesare no declare.. how can I solve this problem?  OR can I  just add some head file in the cmd_flash.c file?

Outcomes