?
Solved

Compile a new kernel

Posted on 1998-04-15
29
Medium Priority
?
314 Views
Last Modified: 2010-04-22
I tried to compile a new kernel. (2.1.96)
First I unpacked the file so I got a directory /usr/src/linux
Then
1.cd /usr/src/linux
2 make mrproper
3. make dep
4. Make clean
5. make zImage

When It compiels I get this:

make[2]: Entering directory `/usr/src/linux/kernel'
gcc -D__KERNEL__ -I/usr/src/linux/include -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -D__SMP__ -pipe -fno-strength-reduce -m486 -malign-loops=2 -malign-jumps=2 -malign-functions=2 -DCPU=586 -D__SMP__   -c -o kmod.o kmod.c
kmod.c: In function `kmod_init':
kmod.c:116: parse error before character 0240
make[2]: *** [kmod.o] Error 1
make[2]: Leaving directory `/usr/src/linux/kernel'
make[1]: *** [first_rule] Error 2
make[1]: Leaving directory `/usr/src/linux/kernel'
make: *** [linuxsubdirs] Error 2    

What shall I do???

(I won't accept a ansver like use the latest stable kernel 2.0.33. I like to try this one.
0
Comment
Question by:hulken
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 16
  • 13
29 Comments
 
LVL 51

Accepted Solution

by:
ahoffmann earned 750 total points
ID: 1637144
you have a invalid character (octal 240) in the file, check if you can remove it.
I don't know how to make it visible in vi, but try od -c to find
the position in the line.
0
 

Author Comment

by:hulken
ID: 1637145
Hmmm.. how can it be so??? Al I've done is to download the source.
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 1637146
dozent of reasons (corrupted file, corrupted gzip or tar, bad disk, etc. etc.)
extract just this file again from the sources to see if its in the source distribution.
0
Will your db performance match your db growth?

In Percona’s white paper “Performance at Scale: Keeping Your Database on Its Toes,” we take a high-level approach to what you need to think about when planning for database scalability.

 

Author Comment

by:hulken
ID: 1637147
Thanks but I still can't compile the kernel. It works fine when I don't enable soundsuport.

But if I try to compile sound I get:

t/net.a drivers/cdrom/cdrom.a drivers/sound/sound.a drivers/pci/pci.a drivers/pnp/pnp.a \
        /usr/src/linux/arch/i386/lib/lib.a /usr/src/linux/lib/lib.a /usr/src/linux/arch/i386/lib/lib.a \
        -o vmlinux
drivers/sound/sound.a(cs4232.o): In function `probe_cs4232':
cs4232.o(.text+0xb2): undefined reference to `ad1848_detect'
cs4232.o(.text+0x20a): undefined reference to `ad1848_detect'
drivers/sound/sound.a(cs4232.o): In function `attach_cs4232':
cs4232.o(.text+0x268): undefined reference to `ad1848_init'
cs4232.o(.text+0x282): undefined reference to `ad1848_control'
cs4232.o(.text+0x28e): undefined reference to `ad1848_control'
cs4232.o(.text+0x29a): undefined reference to `ad1848_control'
drivers/sound/sound.a(cs4232.o): In function `unload_cs4232':
cs4232.o(.text+0x2c7): undefined reference to `ad1848_unload'
make: *** [vmlinux] Error 1  

I followed the same procedure as before. make menuconfig; make ep; make clean; make zImage
0
 

Author Comment

by:hulken
ID: 1637148
This is weard. Now I cant read youre answere here...
It says:
Error - cannot open answer 10047952-5
Error - cannot open answer 10047952-6

BTW:
I tried with the kernel 2.1.97 and have the same problem.
If someone eles like to try I can send my .config...
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 1637149
you need in /usr/src/linux/.config

CONFIG_AD1848=y

Add it manually if make menuconfig did not provide it, then
use make config  to update generated header files.
0
 

Author Comment

by:hulken
ID: 1637150
Where in .config do I add this??
0
 

Author Comment

by:hulken
ID: 1637151
I tried to add this row in .config. And made a make config.
I still get:
        /usr/src/linux-2.1.97/arch/i386/lib/lib.a /usr/src/linux-2.1.97/lib/lib.a /usr/src/linux-2.1.97/arch/i386/lib/lib.a \
        -o vmlinux
drivers/sound/sound.a(cs4232.o): In function `probe_cs4232':
cs4232.o(.text+0xb2): undefined reference to `ad1848_detect'
cs4232.o(.text+0x20a): undefined reference to `ad1848_detect'
drivers/sound/sound.a(cs4232.o): In function `attach_cs4232':
cs4232.o(.text+0x268): undefined reference to `ad1848_init'
cs4232.o(.text+0x282): undefined reference to `ad1848_control'
cs4232.o(.text+0x28e): undefined reference to `ad1848_control'
cs4232.o(.text+0x29a): undefined reference to `ad1848_control'
drivers/sound/sound.a(cs4232.o): In function `unload_cs4232':
cs4232.o(.text+0x2c7): undefined reference to `ad1848_unload'
make: *** [vmlinux] Error 1  
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 1637152
did you make a  make clean  after  make config?

If so, you have to look into the sources what's going wrong.
You know you have beta sources, so they may have some bugs.
Check in cs4232.c how and when ad1848_* will be called, probably
you need more defines in .config.
0
 

Author Comment

by:hulken
ID: 1637153
Yes I did a make clean
 (Se the top of this page)
But I'm not a programmer som hod do I know what to change?
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 1637154
do you realy want to use a soundcard with CS4232 chip?

Please first change
      CONFIG_CS4232=y
to
      # CONFIG_CS4232=y

and recompile (make config; make dep; make clean; make zImage)

Check if this compiles, then we'll look deeper into this one.
0
 

Author Comment

by:hulken
ID: 1637155
There is a cs4232 chip on my card and it works fine with 2.0.X kernels.
(The only choise that works for me.
0
 

Author Comment

by:hulken
ID: 1637156
One more comment.
If I compile the sond as module the compiling proces doesn't give any errors. But after doing a rm -rf /lib/modules/2.1.97
make modules; make modules_install, depmod -a; reboot.
I get unresolved symboles in sound.0 and cs4232.o.
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 1637157
did you run   make mkscript  in  src/linux/drivers/sound  before
calling  make config?

If so, please send
      src/include/linux/autoconf.h
      src/driver/sound/Config.in
to  hoagascht@gmx.net
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 1637158
Compiling as module is nearly the same as compiling as library.
It won't help either. You first must fix the missing #defines
(see last comment)
0
 

Author Comment

by:hulken
ID: 1637159
I get this:


[hulken@svullo sound]# pwd
/usr/src/linux/drivers/sound
[hulken@svullo sound]# make mkscript
make: *** No rule to make target `mkscript'.  Stop.
[hulken@svullo sound]#      

So you mean that I shall do:

1. make mrproper

2. cd /usr/src/linux/sound

3. make mkscript

4. make config

5. make dep
6 ......
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 1637160
> make: *** No rule to make target `mkscript'.  Stop.

Ups, something changed from 2.0.x to 2.1.x :-|

Please look at /usr/src/linux/drivers/sound/Config.in
if there are some advices (my one told me to call  make mkscript)
You should find something about  CONFIG_CS4232

1. .. 6.  is ok.
0
 

Author Comment

by:hulken
ID: 1637161
Is this something about the make mkscript ??


SURPRISE SURPRISE!!!

The device file creation script that used to be here earlier is
obviously not here any more.

Why?

Because you do not need it. All Linux distributions have the
device files properly created (yes they are) so you should not
try to run any scripts which create them.  
0
 

Author Comment

by:hulken
ID: 1637162
This is the pat about CS4232 in Config.in ..

dep_tristate 'Support for Crystal CS4232 based (PnP) cards' CONFIG_CS4232 $CONFIG_SOUND
if [ "$CONFIG_CS4232" = "y" ]; then
    hex 'CS4232 audio I/O base 530, 604, E80 or F40' CONFIG_CS4232_BASE 530
    int 'CS4232 audio IRQ 5, 7, 9, 11, 12 or 15' CONFIG_CS4232_IRQ 11
    int 'CS4232 audio DMA 0, 1 or 3' CONFIG_CS4232_DMA 0
    int 'CS4232 second (duplex) DMA 0, 1 or 3' CONFIG_CS4232_DMA2 3
    hex 'CS4232 MIDI I/O base 330, 370, 3B0 or 3F0' CONFIG_CS4232_MPU_BASE 330
    int 'CS4232 MIDI IRQ 5, 7, 9, 11, 12 or 15' CONFIG_CS4232_MPU_IRQ 9
fi

0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 1637163
What do you mean at your last comment
?-)

mkscript is a target in the Makefile, it has nothing to do with
devices (/dev, mkdev, mknod).
Your compiling problems also have nothing to do with devices.
0
 

Author Comment

by:hulken
ID: 1637164
Forget this comment....
0
 

Author Comment

by:hulken
ID: 1637165
Adjusted points to 250
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 1637166
Hey, you writing comments faster than I could read 'em ;-)

So, according to your sound/Config.in you should get at least
one question about  CONFIG_CS4232  while doing  make config
True?

You also should have  sound/local.h  which has a couple of
    #define CS4232_.....
lines, and
    #define CONFIG_CS4232
0
 

Author Comment

by:hulken
ID: 1637167
Yes I have to ansver one question about cs4232
I ansverd it the same way as I ansverd it when I compiled my 2.0.33 kernel. My 2.0.33 kernel compiled fine....

 I dont have a sounds/local.h but a sound/local.h.master
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 1637168
Could you please do a  make config  in  sound.

Then in /usr/src/linux
      make clean
      make dep
      make zImage
0
 

Author Comment

by:hulken
ID: 1637169
Alredy tried it:
make: *** No rule to make target `config'.  Stop.
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 1637170
Sorry, actually I don't have 2.1.x sources.
But I'll try to help you anyway.
Please send sound/Makefile to hoagascht@gmx.net .
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 1637171
All the problems with undefined references are only there if you
try to compile the sound things as module?

Feel free to ask more questions.
0
 

Author Comment

by:hulken
ID: 1637172
No, I get those when I tries to compile it into the kernel to...
0

Featured Post

Get proactive database performance tuning online

At Percona’s web store you can order full Percona Database Performance Audit in minutes. Find out the health of your database, and how to improve it. Pay online with a credit card. Improve your database performance now!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Google Drive is extremely cheap offsite storage, and it's even possible to get extra storage for free for two years.  You can use the free account 15GB, and if you have an Android device..when you install Google Drive for the first time it will give…
In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses
Course of the Month9 days, 18 hours left to enroll

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question