Embedded Freaks..

August 13, 2010

Reusing GCC Specs to Compile The Linux Kernel

Filed under: ARM9, embedded-linux — kunilkuda @ 3:18 pm

I got very weird situation here: GCC-4.4.1 from CodeSourcery EABI 2009q3 package generates malfunction kernel (the kernel cannot decompress itself), but the same GCC version (GCC-4.4.1) from CodeSourcery EABI 2010q1 package can generate normal kernel.

So, I’m wondering how it could happen. Then I got the idea to use GCC-4.4.1 specs from 2009q3 package in GCC-4.4.1 from 2010q1 package. Here’s how to do it:

# Extract the GCC specs from 2009q3 package
cerpelai$ ./temp/2009q3/bin/arm-none-eabi-gcc -dumpspecs > gcc-4.4.1-2009q3.specs

# Go to kernel source 
cerpelai$ cd linux-2.6.33

cerpelai$ make ARCH=arm CROSS_COMPILE=/home/me/temp/2010q1/bin/arm-none-eabi- CC="/home/me/temp/2010q1/bin/arm-none-eabi-gcc -specs=/home/me/temp/gcc-4.4.1-2009q3.specs" ea313x_defconfig

cerpelai$ make ARCH=arm CROSS_COMPILE=/home/me/temp/2010q1/bin/arm-none-eabi- CC="/home/me/temp/2010q1/bin/arm-none-eabi-gcc -specs=/home/me/temp/gcc-4.4.1-2009q3.specs"
Advertisements

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: