Skip to contentSkip to conversation

Building U-Boot without cmd_ide.c?

U-Boot-Users Timur Tabi 3 participants 4 messages Jul 11, 2006 – Jul 17, 2006

lore
Share & tools
lore

Timur Tabi

author
#0 lore raw

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?

Signature · 2 lines
Timur Tabi
Linux Kernel Developer @ Freescale
#1 lore raw
Quoted 2 lines · In message <[email protected]> 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.

Quoted 1 line

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?

Quoted 3 lines

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

Signature · 4 lines
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Q:  What is "SMOORPLAY"?
A:  It's what SMURFS do before they SMUCK, of course!
author
#2 lore raw
Quoted 2 lines · Wolfgang Denk

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.

Quoted 1 line

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.

Signature · 2 lines
Timur Tabi
Linux Kernel Developer @ Freescale
#3 lore raw
Quoted 3 lines · Timur Tabi

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