We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

AR# 24997

9.1i EDK - I cannot compile Linux 2.6 for my EDK project


Keywords: MV, Monta, Vista, kernel, OS, RTOS, driver

When I try to compile the Linux 2.6 kernel Monta Vista distribution, the following errors occur in the file included from drivers/block/xilinx_sysace/adapter.c:48:

"drivers/xilinx_common/xbasic_types.h:124: error: redefinition of
typedef 'u32'
include/asm/types.h:49: error: previous declaration of 'u32' was here
drivers/xilinx_common/xbasic_types.h:125: error: redefinition of
typedef 'u16'
include/asm/types.h:46: error: previous declaration of 'u16' was here
drivers/xilinx_common/xbasic_types.h:126: error: redefinition of
typedef 'u8'
include/asm/types.h:43: error: previous declaration of 'u8' was here
drivers/block/xilinx_sysace/adapter.c: In function `do_read_write':
drivers/block/xilinx_sysace/adapter.c:264: warning: implicit
declaration of function `msleep_interruptible'
make[3]: *** [drivers/block/xilinx_sysace/adapter.o] Error 1
make[2]: *** [drivers/block/xilinx_sysace] Error 2
make[1]: *** [drivers/block] Error 2
make: *** [drivers] Error 2"


To resolve this issue, add the following #ifndef statement around lines 123-125 in xbasic_types.h:

#ifndef __KERNEL__
typedef Xuint32 u32;
typedef Xuint16 u16;
typedef Xuint8 u8;

This problem has been fixed in the latest EDK 9.1i Service Pack, available at:
The first service pack containing the fix is EDK 9.1i Service Pack 2.
AR# 24997
Date Created 04/02/2007
Last Updated 05/07/2007
Status Active
Type General Article