[U-Boot-Users] Building U-Boot without cmd_ide.c?

I'm working on providing support for the 8349e-mITX, which is another 8349 variant. I'm taking some old patches for U-Boot 1.1.3 and porting them to the latest code. Unfortunately, I don't know a whole lot about the 8349 or U-Boot, so this is a difficult task.
What I have so far won't boot at all. I power on the system and nothing happens. Obviously, I have no idea what's wrong.
So right now, I'm trying to compile U-Boot with as many options turned off as possible. The problem is that the build process tries to compile some files even if support for them has been turned off. For instance, if I undefine CONFIG_COMPACT_FLASH, then I get these errors when I build:
powerpc-unknown-linux-gnu-gcc -g -Os -fPIC -ffixed-r14 -meabi -D__KERNEL__ -DTEXT_BASE=0xFEF00000 -I/temp/u-boot/include -fno-builtin -ffreestanding -nostdinc -isystem /_TOOLS_/dist/gnu-gcc-3.4.3-binutils-2.15-powerpc-unknown-linux-gnu/i686-pc-linux2.4/lib/gcc/powerpc-unknown-linux-gnu/3.4.3/include -pipe -DCONFIG_PPC -D__powerpc__ -DCONFIG_MPC83XX -DCONFIG_E300 -ffixed-r2 -ffixed-r29 -msoft-float -Wall -Wstrict-prototypes -c -o cmd_ide.o cmd_ide.c cmd_ide.c:128: error: `CFG_IDE_MAXBUS' undeclared here (not in a function) cmd_ide.c:135: error: empty scalar initializer cmd_ide.c:135: error: (near initialization for `ide_bus_offset') cmd_ide.c:146: error: `CFG_IDE_MAXDEVICE' undeclared here (not in a function) cmd_ide.c: In function `ide_init': cmd_ide.c:618: error: `CFG_ATA_REG_OFFSET' undeclared (first use in this function) cmd_ide.c:618: error: (Each undeclared identifier is reported only once cmd_ide.c:618: error: for each function it appears in.) cmd_ide.c: In function `ide_outb': cmd_ide.c:810: error: `CFG_ATA_BASE_ADDR' undeclared (first use in this function) cmd_ide.c: In function `ide_inb': cmd_ide.c:828: error: `CFG_ATA_BASE_ADDR' undeclared (first use in this function) cmd_ide.c: In function `input_swap_data': cmd_ide.c:885: error: `CFG_ATA_BASE_ADDR' undeclared (first use in this function) cmd_ide.c:885: error: `CFG_ATA_DATA_OFFSET' undeclared (first use in this function) cmd_ide.c: In function `output_data': cmd_ide.c:930: error: `CFG_ATA_BASE_ADDR' undeclared (first use in this function) cmd_ide.c:930: error: `CFG_ATA_DATA_OFFSET' undeclared (first use in this function) cmd_ide.c: In function `input_data': cmd_ide.c:978: error: `CFG_ATA_BASE_ADDR' undeclared (first use in this function) cmd_ide.c:978: error: `CFG_ATA_DATA_OFFSET' undeclared (first use in this function) cmd_ide.c: In function `ide_ident': cmd_ide.c:1062: error: `CFG_ATA_REG_OFFSET' undeclared (first use in this function) cmd_ide.c: In function `ide_read': cmd_ide.c:1270: error: `CFG_ATA_REG_OFFSET' undeclared (first use in this function) cmd_ide.c: In function `ide_write': cmd_ide.c:1398: error: `CFG_ATA_REG_OFFSET' undeclared (first use in this function) cmd_ide.c: In function `ide_wait': cmd_ide.c:1505: error: `CFG_ATA_REG_OFFSET' undeclared (first use in this function) cmd_ide.c: At top level: cmd_ide.c:128: error: storage size of `ide_bus_offset' isn't known cmd_ide.c:141: error: storage size of `ide_bus_ok' isn't known cmd_ide.c:146: error: storage size of `ide_dev_desc' isn't known cmd_ide.c:141: warning: 'ide_bus_ok' defined but not used make[1]: *** [cmd_ide.o] Error 1 make[1]: Leaving directory `/temp/u-boot/common' make: *** [common/libcommon.a] Error 2
The reason these CFG_ATA_xxxx options are undefined is because they only get defined if CONFIG_COMPACT_FLASH is defined. Is there a reason why cmd_ide.c is being compiled? Do I really need it? Should I modified the Makefile to not build cmd_ide.c if CONFIG_COMPACT_FLASH is undefined?

In message 44B42D5E.6080603@freescale.com you wrote:
I'm working on providing support for the 8349e-mITX, which is another 8349 variant. I'm taking some old patches for U-Boot 1.1.3 and porting them to the latest code. Unfortunately, I don't know a whole lot about the 8349 or U-Boot, so this is a diffic ult task.
May I ask why you use old, obsolete code? Please use the current version (i. e. top of git repo) instead.
What I have so far won't boot at all. I power on the system and nothing happens. Obviously, I have no idea what's wrong.
Use a debugger?
The reason these CFG_ATA_xxxx options are undefined is because they only get defined if CONFIG_COMPACT_FLASH is defined. Is there a reason why cmd_ide.c is being compiled? Do I really need it? Should I
Most probably you have enabled IDE support in your board config file... And please don't ask *us* if *you* need it. Or, if you ask, the answer has obviously to be: no, you don't.
Best regards,
Wolfgang Denk

Wolfgang Denk wrote:
May I ask why you use old, obsolete code? Please use the current version (i. e. top of git repo) instead.
That's what I am doing. Sorry, I guess I wasn't clear. Some other group was using an old version of U-Boot, and so I'm trying to merge their code into the git head.
Most probably you have enabled IDE support in your board config file...
Ah, I get it now. I need to change my definition of CONFIG_COMMANDS.
Anyway, it compiles now, but it still doesn't boot. I guess I need to find that debugger. Thanks, Wolfgang.

Timur Tabi timur@freescale.com wrote:
Anyway, it compiles now, but it still doesn't boot. I guess I need to find that debugger. Thanks, Wolfgang.
Or try to use another gcc tool to compile git version like ELDK 4.0.
Regards,
Sam
___________________________________________________________ 抢注雅虎免费邮箱-3.5G容量,20M附件! http://cn.mail.yahoo.com
participants (3)
-
Sam Song
-
Timur Tabi
-
Wolfgang Denk