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

Timur Tabi timur at freescale.com
Wed Jul 12 00:59:42 CEST 2006


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?


-- 
Timur Tabi
Linux Kernel Developer @ Freescale




More information about the U-Boot mailing list