delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2009/09/03/22:58:51

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL,BAYES_00
X-Spam-Check-By: sourceware.org
X-VR-Score: -30.00
X-Authority-Analysis: v=1.0 c=1 a=9eiAPjpx2iEA:10 a=aSyYFIOGhxIG--7sAmUA:9 a=Z4yG58lrqwYYRz6N-egA:7 a=-fG6jNioDYrLqUdq7gT3rl22Ix4A:4
X-CM-Score: 0.00
Message-ID: <4AA08254.8000905@ou.edu>
Date: Thu, 03 Sep 2009 21:58:28 -0500
From: "Stephen M. Kenton" <skenton AT ou DOT edu>
User-Agent: Thunderbird 2.0.0.23 (Windows/20090812)
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: Compiling Kernal on Cygwin [ELF Error]
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019