[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Building a new kernel



Hello Stephen,

On 2007-01-01, you wrote:

> I have finaly managed to get Debian M68K 3.1 onto my Amiga 3000 (Cyberstorm 
> Mk1 '60, 128mb ram, 9gig scsi hd, cybervision, bfc multiface 3).
>
> I'm trying to re-compile the kernel to use the mutiface3's serial port 
> [...]
>
> In making a new kernel, I've tryed the verion 2.4.27 and 2.4.34 sources. using 
> thi smethod:
>
> make menuconfig (set/unset options that I don't have in the machine. ie: other 
> video cards, ide etc)
> make dep
> make bzImage
>
> Lot's of waiting and some warnings like the one listed here. Then the build 
> fails with this error (on both source tree's).
>
>
> [...]
> gcc -D__ASSEMBLY__ -D__KERNEL__ -I/usr/src/linux-2.4.34/include -traditional -c 
> head.S -o head.o
> In file included from head.S:259:
> /usr/src/linux-2.4.34/include/linux/init.h:134: detected recursion whilst 
> expanding macro "__inline__"
> /usr/src/linux-2.4.34/include/linux/init.h:138: detected recursion whilst 
> expanding macro "__inline__"
> head.S:3171: warning: extra tokens at end of #endif directive
> make[1]: *** [head.o] Error 1
> make[1]: Leaving directory `/usr/src/linux-2.4.34/arch/m68k/kernel'
> make: *** [_dir_arch/m68k/kernel] Error 2
> amiga3000:/usr/src/linux-2.4.34#      
>
>
Did You manage to compile the kernel yet?

My first attempts to compile the 2.4.27 kernel on my Amiga 2000/2060, with gcc-3.3 (the one installed together with Sarge 3.1r5) ended after about 3 hours at exactly the same spot as Yours.

The problem are two dummy declarations in linux/include/linux/init.h, or as the comment in the file says:

"[...]
/* These macros create a dummy inline: gcc 2.9x does not count alias
 as usage, hence the `unused function' warning when __init functions
 are declared static. We use the dummy __*_module_inline functions
 both to kill the warning and check the type of the init/cleanup
 function. */ [...]" 

I simply commented out the two static inline declarations on lines 134 and 138, and then
it worked. Because of the 68060 module load problem, I compiled a monolithic kernel (no modules) with the things I need. It took about 4 hours, but I have Linux on a not very fast HDD. 

As a by-product, the system clock problem , which caused my clock to be off by 1 hour (it showed UTC, but I live in UTC + 1), disappeared!
I thought this wasn't fixed until 2.6.x...

My specs: AMIGA 2000/Blizzard2060-50, 92MB Fast-RAM, X-Surf Ethernet, Picasso-II, Linux on IDE HDD.
Linux/GNU sources installed from Debian package 2.4.27, m68k-patches applied.
Compiled with gcc-3.3.5 (Debian 1:3.3.5-13) , for 68040-60.

The X-server does not work, so I plan to upgrade to 2.6.x, but since the Picasso-II (cirrusfb) does not work yet (I tried 2.6.18-4), I wanted a good system to work on first...

(Strangely enough, I had a few sightings of X a week ago: It happened after I first booted from 2.6.18-4 once, then from 2.4.27, which launced X successfully.)

I hope this helps You to compile a custom kernel too, Stephen!

Regards,
-- 
Christer Oldhoff
Email: coldhoff@swipnet.se



Reply to: