[U-Boot-Users] build errors on DMA or SPI driver

Shinya Kuribayashi
2008-01-30T21:30:42Z

Current DMA or SPI driver breaks MIPS builds.

example:
$ make gth2_config
$ make CROSS_COMPILE=mips-linux-

leads to ...

make[1]: Entering directory `/home/skuribay/devel/u-boot.git/drivers/dma'
mips-linux-gcc -g -Os -D__KERNEL__ -DTEXT_BASE=0x90000000 -I/home/skuribay/devel/u-boot.git/include -fno-builtin -ffreestanding -nostdinc -isystem /home/skuribay/devel/buildroot/build_mips/staging_dir/usr/bin/../lib/gcc/mips-linux-uclibc/4.2.1/include -pipe -DCONFIG_MIPS -D__MIPS__ -G 0 -mabicalls -fpic -pipe -msoft-float -march=4kc -mtune=4kc -EB -Wall -Wstrict-prototypes -c -o MCD_tasks.o MCD_tasks.c
In file included from MCD_tasks.c:25:
/home/skuribay/devel/u-boot.git/include/MCD_dma.h:279: error: expected specifier-qualifier-list before '$30'
/home/skuribay/devel/u-boot.git/include/MCD_dma.h:295: error: expected specifier-qualifier-list before '$30'
/home/skuribay/devel/u-boot.git/include/MCD_dma.h:323: error: expected declaration specifiers or '...' before '$30'
/home/skuribay/devel/u-boot.git/include/MCD_dma.h:323: error: expected declaration specifiers or '...' before '$30'
make[1]: *** [MCD_tasks.o] Error 1
make[1]: Leaving directory `/home/skuribay/devel/u-boot.git/drivers/dma'
make: *** [drivers/dma/libdma.a] Error 2

Then I modified $(TOPDIR)/Makefile like this, but still fails on SPI:

diff --git a/Makefile b/Makefile
index 0f6cc59..619859d 100644
--- a/Makefile
+++ b/Makefile
@@ -218,7 +218,6 @@ LIBS += net/libnet.a
LIBS += disk/libdisk.a
LIBS += drivers/bios_emulator/libatibiosemu.a
LIBS += drivers/block/libblock.a
-LIBS += drivers/dma/libdma.a
LIBS += drivers/hwmon/libhwmon.a
LIBS += drivers/i2c/libi2c.a
LIBS += drivers/input/libinput.a

make -C drivers/spi/
make[1]: Entering directory `/home/skuribay/devel/u-boot.git/drivers/spi'
mpc8xxx_spi.c:26:29: error: asm/mpc8xxx_spi.h: No such file or directory
make[1]: *** No rule to make target `.depend', needed by `libspi.a'. Stop.
make[1]: Leaving directory `/home/skuribay/devel/u-boot.git/drivers/spi'
make: *** [drivers/spi/libspi.a] Error 2

When remove libspi.a too, finally successed to build.

@@ -231,7 +230,6 @@ LIBS += drivers/net/libnet.a
LIBS += drivers/net/sk98lin/libsk98lin.a
LIBS += drivers/pci/libpci.a
LIBS += drivers/pcmcia/libpcmcia.a
-LIBS += drivers/spi/libspi.a
ifeq ($(CPU),mpc83xx)
LIBS += drivers/qe/qe.a
endif

thanks,

Shinya