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: Compiling Kernal on Cygwin [ELF Error]


The bash commands below the ==== line should work to build a 2.6.30 kernel for i386 if you have the full cygwin 1.7 install

This assumes you have an obj and src directory with the expanded tar ball for binutils, gcc, and the kernel versions used here

The only source change you will need to make is to add the following defines to ~scripts/mod/modpost.h after the include of elf.h

This is needed because the cygwin 1.7 elf.h does not have these defines which are available in the linux elf.h for modpost


#define R_386_32 1 #define R_386_PC32 2 #define R_ARM_ABS32 2 #define R_ARM_PC24 1 #define R_MIPS_26 4 #define R_MIPS_32 2 #define R_MIPS_HI16 5 #define R_MIPS_LO16 6

==========================

cd /snap/build/obj
build=$(pwd)

rm -rf binutils-2.19.1; mkdir binutils-2.19.1
cd binutils-2.19.1
../../src/binutils-2.19.1/configure --target=i386-linux
make -j 3
make -j 3 install
cd ..

rm -rf gcc-4.4.1; mkdir gcc-4.4.1
cd gcc-4.4.1
../../src/gcc-4.4.1/configure --target=i386-linux --enable-languages=c --enable-targets-all --disable-decimal-float --disable-threads --disable-shared --disable-multilib
make -j 3 all-host all-target-libgcc
make -j 3 install-host install-target-libgcc
cd ..


rm -rf linux-2.6.30; mkdir linux-2.6.30
cd ../src/linux-2.6.30
make -j 3 ARCH=i386 CROSS_COMPILE=i386-linux- O=$build/linux-2.6.30 defconfig
make -j 3 ARCH=i386 CROSS_COMPILE=i386-linux- O=$build/linux-2.6.30
cd ../../obj




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


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