[U-Boot-Users] Porting project to u-boot 1.1.4: compilation error.

Hello, community.
I need your advice.
I'm porting u-boot to new (not supported by u-boot) 8247A based board. I began with the previous u-boot, release 1.1.3, and built our project. Yesterday I moved the project to u-boot release 1.1.4 and since I have the compilation failure:
common/libcommon.a(env_flash.o)(.text+0xe8): In function `saveenv': /home/seva/tools/u-boot-1.1.4/common/env_flash.c:332: undefined reference to `flash_sect_protect' common/libcommon.a(env_flash.o)(.text+0x108):/home/seva/tools/u-boot-1.1.4/common/env_flash.c:336: undefined reference to `flash_sect_erase' common/libcommon.a(env_flash.o)(.text+0x158):/home/seva/tools/u-boot-1.1.4/common/env_flash.c:349: undefined reference to `flash_sect_protect'
In the project's header file I've defined CONFIG_COMMANDS as:
#define CONFIG_COMMANDS (CFG_CMD_ECHO | CONFIG_CMD_DFL | CONFIG_JFFS2_CMDLINE | CFG_CMD_FLASH)
During debug I've found that the file cmd_flash.c doesn't compile at all. Above the meaning code I inserted next lines for test purpose:
------------- #include <common.h> #include <command.h>
#if (CONFIG_COMMANDS) #error #endif -------------
Then I've seen that compilation passed but resulted object: 1. Not empty, `ls` output is: -rw-r--r-- 1 seva users 17856 2006-01-03 11:18 common/cmd_flash.o
2. Has not symbols at all, output of `nm` is empty.
I tried to remove space in "#if (...)" statement, between "if" and left bracket, but this didn't affect. I tried also change statement to "#if (CONFIG_COMMANDS != 0)" but this didn't work too, the compilation passed for the file "successfully".
Please advice. Where the problem could came from? Where am I wrong?
More about the compilation environment:
Toolchain is ELDK version 3.1.1 Build 2005-06-07 Linux is SuSE 9.3 Project configured as 8260, in the Makefile:
P110_config: unconfig @./mkconfig P110 ppc mpc8260 P110
Compiler's string for the file:
ppc_82xx-gcc -g -Os -fPIC -ffixed-r14 -meabi -D__KERNEL__ -DTEXT_BASE=0xFFF00000 -I/home/seva/tools/u-boot-1.1.4/include -fno-builtin -ffreestanding -nostdinc -isystem /opt/cross/usr/bin/../lib/gcc-lib/ppc-linux/3.3.3/include -pipe -DCONFIG_PPC -D__powerpc__ -DCONFIG_8260 -DCONFIG_CPM2 -ffixed-r2 -ffixed-r29 -mstring -mcpu=603e -mmultiple -Wall -Wstrict-prototypes -c -o cmd_flash.o cmd_flash.c
Thanks and sorry for my poor English.

In message 7a2ed4090601030242t6810d4a9g8360afd8061504c9@mail.gmail.com you wrote:
I'm porting u-boot to new (not supported by u-boot) 8247A based board. I began with the previous u-boot, release 1.1.3, and built our project. Yesterday I moved the project to u-boot release 1.1.4 and since I have the compilation failure:
common/libcommon.a(env_flash.o)(.text+0xe8): In function `saveenv': /home/seva/tools/u-boot-1.1.4/common/env_flash.c:332: undefined reference to `flash_sect_protect' common/libcommon.a(env_flash.o)(.text+0x108):/home/seva/tools/u-boot-1.1.4/common/env_flash.c:336: undefined reference to `flash_sect_erase'
common/libcommon.a(env_flash.o)(.text+0x158):/home/seva/tools/u-boot-1.1.4/common/env_flash.c:349: undefined reference to `flash_sect_protect'
In the project's header file I've defined CONFIG_COMMANDS as:
#define CONFIG_COMMANDS (CFG_CMD_ECHO | CONFIG_CMD_DFL | CONFIG_JFFS2_CMDLINE | CFG_CMD_FLASH)
Is this the exact notation as used in your config file? I. e. written in two lines without using a continuation marker ('') in the first line?
Please advice. Where the problem could came from? Where am I wrong?
I guess your board config file is broken.
Best regards,
Wolfgang Denk
participants (2)
-
Nekto Peresmeshnik
-
Wolfgang Denk