This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Building kernel modules


Hi all, again.

I've installed proper toolchain (arm-linux, from CodeSourcery). Along
with this, I also (re)moved /usr/include/asm, and created following
sym links:
/usr/include/asm -> kernel_dir/include/asm-arm
/usr/include/linux -> kernel_dir/include/linux

As soon as I start kernel build (make ARCH=arm CROSS_COMPILE=...) I got:

  CHK     include/linux/version.h
make[1]: `include/asm-arm/mach-types.h' is up to date.
  CHK     include/linux/utsrelease.h
  HOSTCC  scripts/basic/fixdep
In file included from /usr/include/linux/byteorder/little_endian.h:11,
                 from /usr/include/asm/byteorder.h:54,
                 from /usr/include/cygwin/in.h:178,
                 from /usr/include/netinet/in.h:14,
                 from /usr/include/arpa/inet.h:14,
                 from scripts/basic/fixdep.c:117:
/usr/include/linux/types.h:21: error: conflicting types for '_types_fd_set'
/usr/include/sys/types.h:235: error: previous declaration of
'_types_fd_set' was here
/usr/include/linux/types.h:22: error: conflicting types for 'dev_t'
/usr/include/cygwin/types.h:50: error: previous declaration of 'dev_t' was here
/usr/include/linux/types.h:23: error: conflicting types for 'ino_t'
/usr/include/cygwin/types.h:109: error: previous declaration of 'ino_t' was here
/usr/include/linux/types.h:24: error: conflicting types for 'mode_t'
/usr/include/cygwin/types.h:205: error: previous declaration of
'mode_t' was here
/usr/include/linux/types.h:26: error: conflicting types for 'off_t'
/usr/include/cygwin/types.h:37: error: previous declaration of 'off_t' was here
/usr/include/linux/types.h:28: error: conflicting types for 'daddr_t'
/usr/include/sys/types.h:125: error: previous declaration of 'daddr_t' was here
/usr/include/linux/types.h:29: error: conflicting types for 'key_t'
/usr/include/cygwin/types.h:155: error: previous declaration of 'key_t' was here
/usr/include/linux/types.h:31: error: conflicting types for 'timer_t'
/usr/include/sys/types.h:261: error: previous declaration of 'timer_t' was here
/usr/include/linux/types.h:32: error: conflicting types for 'clockid_t'
/usr/include/sys/types.h:256: error: previous declaration of
'clockid_t' was here
/usr/include/linux/types.h:53: error: conflicting types for 'uid_t'
/usr/include/cygwin/types.h:87: error: previous declaration of 'uid_t' was here
/usr/include/linux/types.h:54: error: conflicting types for 'gid_t'
/usr/include/cygwin/types.h:98: error: previous declaration of 'gid_t' was here
/usr/include/linux/types.h:87: error: conflicting types for 'clock_t'
/usr/include/sys/types.h:104: error: previous declaration of 'clock_t' was here
/usr/include/linux/types.h:121: error: conflicting types for 'uint32_t'
/usr/include/stdint.h:28: error: previous declaration of 'uint32_t' was here
/usr/include/linux/types.h:152: error: conflicting types for 'blkcnt_t'
/usr/include/cygwin/types.h:66: error: previous declaration of
'blkcnt_t' was here
scripts/basic/fixdep.c: In function `parse_config_file':
scripts/basic/fixdep.c:233: warning: implicit declaration of function `ntohl'
make[1]: *** [scripts/basic/fixdep] Error 1
make: *** [scripts_basic] Error 2

Without /usr/include/asm and /usr/include/linux symlinks I get errors
that some .h files are non-existant.

>From my perspective it looks like a cygwin "problem". Sorry if I'm not righ.

Probably sys/types.h in cygwin and Linux are not the same, something
that is defined in linux/types.h in linux is also defined in
cygwin/types.h, etc. I can probably copy /usr/include from my Linux on
the Cygwin host, and probably I will be able to cross-compile kernel,
except the things that should be compiled for the host (cygwin in my
case).

Any comments?

Greetings

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]