LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 10-25-2003, 01:43 AM   #1
matt3333
Member
 
Registered: Dec 2002
Location: Winnipeg, Manitoba, Canada
Distribution: Slackware
Posts: 371

Rep: Reputation: 30
kernel help


Ok I tried to complie my first kernel ok well i tried and it didnt work so im hoping u guys can help me out here. Ok first of all i went to http://www.kernel.org and download linux-2.6.0-test6.tar.gz i wasnt sure if this is the right one. Anyways i did gzip -cd linux-2.6.0-test6.tar.gz | tar xfv - and then it started doing all this stuff. Oh and before i started all this i added this to my lilo conf:

image = /boot/vmlinuz.old
root = /dev/hda1
label = slack.old
read-only

then after that was done i started all that. Ok now were at when it finished unziping it then i did:

cd /usr/include
rm -rf asm linux scsi
ln -s /usr/src/linux/include/asm-i386 asm
ln -s /usr/src/linux/include/linux linux
ln -s /usr/src/linux/include/scsi scsi

but for some reason the last three lines had trouble i dunno??? anyways it wasnt in the kernel complieing guide at the top of this forum so it didnt concen me much. So i did this:

cd /usr/src/linux
make mrproper

then i tried make config and i got alot of errors:

root@DarkPunk:/usr/src/linux-2.6.0-test6# make config
HOSTCC scripts/fixdep
In file included from /usr/include/bits/posix1_lim.h:126,
from /usr/include/limits.h:144,
from /usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/limits.h:132,
from /usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/syslimits.h:7,
from /usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/limits.h:11,
from scripts/fixdep.c:105:
/usr/include/bits/local_lim.h:36:26: linux/limits.h: No such file or directory
In file included from /usr/include/netinet/in.h:212,
from scripts/fixdep.c:107:
/usr/include/bits/socket.h:305:24: asm/socket.h: No such file or directory
scripts/fixdep.c: In function `use_config':
scripts/fixdep.c:193: `PATH_MAX' undeclared (first use in this function)
scripts/fixdep.c:193: (Each undeclared identifier is reported only once
scripts/fixdep.c:193: for each function it appears in.)
scripts/fixdep.c:193: warning: unused variable `s'
scripts/fixdep.c: In function `parse_dep_file':
scripts/fixdep.c:289: `PATH_MAX' undeclared (first use in this function)
scripts/fixdep.c:289: warning: unused variable `s'
make[1]: *** [scripts/fixdep] Error 1
make: *** [scripts/fixdep] Error 2
root@DarkPunk:/usr/src/linux-2.6.0-test6#

then for make menuconfig i get this:

root@DarkPunk:/usr/src/linux-2.6.0-test6# make menuconfig
HOSTCC scripts/fixdep
In file included from /usr/include/bits/posix1_lim.h:126,
from /usr/include/limits.h:144,
from /usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/limits.h:132,
from /usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/syslimits.h:7,
from /usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include/limits.h:11,
from scripts/fixdep.c:105:
/usr/include/bits/local_lim.h:36:26: linux/limits.h: No such file or directory
In file included from /usr/include/netinet/in.h:212,
from scripts/fixdep.c:107:
/usr/include/bits/socket.h:305:24: asm/socket.h: No such file or directory
scripts/fixdep.c: In function `use_config':
scripts/fixdep.c:193: `PATH_MAX' undeclared (first use in this function)
scripts/fixdep.c:193: (Each undeclared identifier is reported only once
scripts/fixdep.c:193: for each function it appears in.)
scripts/fixdep.c:193: warning: unused variable `s'
scripts/fixdep.c: In function `parse_dep_file':
scripts/fixdep.c:289: `PATH_MAX' undeclared (first use in this function)
scripts/fixdep.c:289: warning: unused variable `s'
make[1]: *** [scripts/fixdep] Error 1
make: *** [scripts/fixdep] Error 2
root@DarkPunk:/usr/src/linux-2.6.0-test6#

I dunno why im getting these errors can anyone help me out plz. Also im not too sure if i downloaded the right kernel i have the one that came with slack 9.0 and using swaret i upgrade my packs. but it excluded the kernel. PLZ HELP ME!!!!!!
THANX

Matt3333
 
Old 10-25-2003, 02:48 AM   #2
Cerbere
Member
 
Registered: Dec 2002
Location: California
Distribution: Slackware & LFS
Posts: 799

Rep: Reputation: 33
First off, let's get on the same page. You did move the tarball (linux-2.6.0-test6.tar.gz) to /usr/src/ before you unzipped it, right? (BTW you can unzip & untar it with one command: tar xzvf linux-2.6.0-test6.tar.gz). So you should have a new directory in /usr/src/ called linux-2.6.0-test6/

Now, the links that you're trying to create with the commands:
ln -s /usr/src/linux/include/asm-i386 asm
ln -s /usr/src/linux/include/linux linux
ln -s /usr/src/linux/include/scsi scsi
won't work because those commands are trying to link from /usr/src/linux/... but you have created the directory /usr/src/linux-2.6.0-test6/...

What I usually do is change the name of the 'linux-blah-blah-' directory to 'linux', others just make a link named linux to the real directory. The choice is yours.

Either of these methods should get you going, but do you really want to switch to the 2.6 kernel? It is, after all, experimental and may not yet be stable. I'm still pretty happy with 2.4.21 and figure I'll wait 'til 2.6 is officially released. Again, it's your choice.

Enjoy!
--- Cerbere
 
Old 10-25-2003, 04:14 AM   #3
hussar
Member
 
Registered: Oct 2003
Location: Heidelberg, Germany
Distribution: Slackware 11.0; Kubuntu 6.06; OpenBSD 4.0; OS X 10.4.10
Posts: 345

Rep: Reputation: 30
Question Re: kernel help

Quote:

then after that was done i started all that. Ok now were at when it finished unziping it then i did:

cd /usr/include
rm -rf asm linux scsi
ln -s /usr/src/linux/include/asm-i386 asm
ln -s /usr/src/linux/include/linux linux
ln -s /usr/src/linux/include/scsi scsi
Why did you remove asm, linux and scsi from /usr/include? I have been compiling kernels since 2.0.xx, and I have never had to mess with anything but /usr/src/linux and /etc/lilo.conf. What have I been missing? Has something changed?

If you compile the kernel from within /usr/src/linux, the lines below from the Makefile ensure that you reference the includes from the source of the kernel you are compiling.

TOPDIR := $(shell /bin/pwd)

HPATH = $(TOPDIR)/include
FINDHPATH = $(HPATH)/asm $(HPATH)/linux $(HPATH)/scsi $(HPATH)/net $(HPATH
)/math-emu
 
Old 10-25-2003, 10:40 AM   #4
matt3333
Member
 
Registered: Dec 2002
Location: Winnipeg, Manitoba, Canada
Distribution: Slackware
Posts: 371

Original Poster
Rep: Reputation: 30
I dunno why but if u look in the readme it says to do that so i was just following the readme.???? But can someone help out with this i really wanna complie this kernel i heard good things from it. I still get that error when i try to do a make config and a make menuconfig. I dunno what im doing wrong i followed the Readme and the kerenl complieing guide on this forum. What am i doing wrong??? Thanx


Matt3333
 
Old 10-25-2003, 11:48 AM   #5
matt3333
Member
 
Registered: Dec 2002
Location: Winnipeg, Manitoba, Canada
Distribution: Slackware
Posts: 371

Original Poster
Rep: Reputation: 30
Anyone????


Matt3333
 
Old 10-25-2003, 12:45 PM   #6
hussar
Member
 
Registered: Oct 2003
Location: Heidelberg, Germany
Distribution: Slackware 11.0; Kubuntu 6.06; OpenBSD 4.0; OS X 10.4.10
Posts: 345

Rep: Reputation: 30
I am not sure which README file you mean, but let's see what we can do from here.

If you haven't done so already, copy the kernel tarball to /usr/src.

cd to /usr/src.

Remove the link from /usr/src/linux to whatever it is linked to now. 'rm linux'

Untar the source tarball. 'tar xzvpf linux-2.6.0-test6.tar.gz'

Make a link from linux-2.6.0-test6 to linux. 'ln -sf linux-2.6.0-test6 linux'

cd to linux (/usr/src/linux).

'make menuconfig'

Select your kernel options and compile your kernel.

If this doesn't work, and you get messages like the ones you reported before, you will need to reinstall the kernel-headers package from the d/ software set from your install disks and try the above steps again.
 
Old 10-25-2003, 12:50 PM   #7
matt3333
Member
 
Registered: Dec 2002
Location: Winnipeg, Manitoba, Canada
Distribution: Slackware
Posts: 371

Original Poster
Rep: Reputation: 30
Quote:
`If this doesn't work, and you get messages like the ones you reported before, you will need to reinstall the kernel-headers package from the d/ software set from your install disks and try the above steps again.
what do u mean by this Yes i got the exactly the same error as before i reported.
thanx

matt3333
 
Old 10-25-2003, 01:15 PM   #8
hussar
Member
 
Registered: Oct 2003
Location: Heidelberg, Germany
Distribution: Slackware 11.0; Kubuntu 6.06; OpenBSD 4.0; OS X 10.4.10
Posts: 345

Rep: Reputation: 30
I think that when you removed the asm, linux and scsi directories from /usr/include, you removed header files that you need to do 'make config' and 'make menuconfig'. Specifically, your error messages are telling you that the system cannot find files in /usr/include/bits. My thought was that if you reinstall the kernel-headers package, you may be able to recover from this error.
 
Old 10-25-2003, 01:31 PM   #9
matt3333
Member
 
Registered: Dec 2002
Location: Winnipeg, Manitoba, Canada
Distribution: Slackware
Posts: 371

Original Poster
Rep: Reputation: 30
Oh Ok but how would i go about doing that???sorry i shoulda said that in my last post. Thanx for u help and replys

Matt3333
 
Old 10-25-2003, 04:34 PM   #10
hussar
Member
 
Registered: Oct 2003
Location: Heidelberg, Germany
Distribution: Slackware 11.0; Kubuntu 6.06; OpenBSD 4.0; OS X 10.4.10
Posts: 345

Rep: Reputation: 30
Load Disk 1 of your Slackware set into the cdrom drive and mount it. cd to the slackware/d/ directory. Once there, as root, do a 'installpkg kernel-headers-2.4.xx-i386-x.tgz' where the x's match what is on your install disk.

If that doesn't work, let us know exactly what error messages you get when you try to do a 'make menuconfig' in /usr/src/linux.
 
Old 10-25-2003, 04:35 PM   #11
hussar
Member
 
Registered: Oct 2003
Location: Heidelberg, Germany
Distribution: Slackware 11.0; Kubuntu 6.06; OpenBSD 4.0; OS X 10.4.10
Posts: 345

Rep: Reputation: 30
One more thing just occurred to me. Can you post the output of 'ls -l /usr/src'?
 
Old 10-25-2003, 05:14 PM   #12
matt3333
Member
 
Registered: Dec 2002
Location: Winnipeg, Manitoba, Canada
Distribution: Slackware
Posts: 371

Original Poster
Rep: Reputation: 30
root@DarkPunk:/usr/src/linux# ls -l /usr/src/
total 32344
lrwxrwxrwx 1 root root 26 Oct 25 12:22 linux -> /usr/src/linux-2.6.0-test6/
drwxrwxr-x 18 1046 1046 4096 Sep 27 19:50 linux-2.6.0-test6/
-rw-r--r-- 1 root root 33073407 Oct 25 12:15 linux-2.6.0-test6.tar.bz2
drwxr-xr-x 7 root root 4096 Oct 6 03:29 rpm/
root@DarkPunk:/usr/src/linux#

There u go ill install that package it a sec and tell u if it works and what error i get so i just install that pkg using installpkg /mnt/cdrom/blah blah blah.tgz then ii try the make config or make menuconfig right??? Ill post u what happens when im done
Thanx for ur help!!!!


Matt3333
 
Old 10-25-2003, 05:50 PM   #13
matt3333
Member
 
Registered: Dec 2002
Location: Winnipeg, Manitoba, Canada
Distribution: Slackware
Posts: 371

Original Poster
Rep: Reputation: 30
Ok i ran into abit of trouble i think ok i finally got make menuconfig to work went thru that not sure if i did it right. Anyways what do i save it as?? i wasnt sure the default was .config so i just added a 1 to the end of it. Anyways then i did make dep then it said this:

root@DarkPunk:/usr/src/linux# make dep
*** Warning: make dep is unnecessary now.

so i went on and did make bzImage and it started but then i get this error:

root@DarkPunk:/usr/src/linux# make bzimage
make: *** No rule to make target `bzimage'. Stop.
root@DarkPunk:/usr/src/linux# make bzImage
CHK include/linux/version.h
UPD include/linux/version.h
SYMLINK include/asm -> include/asm-i386
HOSTCC scripts/fixdep
HOSTCC scripts/split-include
HOSTCC scripts/conmakehash
HOSTCC scripts/docproc
HOSTCC scripts/kallsyms
CC scripts/empty.o
HOSTCC scripts/mk_elfconfig
MKELF scripts/elfconfig.h
HOSTCC scripts/file2alias.o
HOSTCC scripts/modpost.o
HOSTLD scripts/modpost
HOSTCC scripts/pnmtologo
HOSTCC scripts/bin2c
SPLIT include/linux/autoconf.h -> include/config/*
CC arch/i386/kernel/asm-offsets.s
In file included from include/asm/signal.h:4,
from include/linux/signal.h:4,
from arch/i386/kernel/asm-offsets.c:7:
include/linux/types.h:14: syntax error before "dev_t"
include/linux/types.h:14: warning: type defaults to `int' in declaration of `dev_t'
include/linux/types.h:14: warning: data definition has no type or storage class
In file included from include/asm/signal.h:180,
from include/linux/signal.h:4,
from arch/i386/kernel/asm-offsets.c:7:
include/asm/sigcontext.h:79: warning: no semicolon at end of struct or union
include/asm/sigcontext.h:79: syntax error before '*' token
include/asm/sigcontext.h:82: syntax error before '}' token
In file included from include/linux/signal.h:4,
from arch/i386/kernel/asm-offsets.c:7:
include/asm/signal.h:220: syntax error before '(' token
In file included from include/asm/siginfo.h:4,
from include/linux/signal.h:5,
from arch/i386/kernel/asm-offsets.c:7:
include/asm-generic/siginfo.h:51: syntax error before "timer_t"
include/asm-generic/siginfo.h:51: warning: no semicolon at end of struct or union
include/asm-generic/siginfo.h:51: warning: no semicolon at end of struct or union
include/asm-generic/siginfo.h:87: syntax error before '}' token
include/asm-generic/siginfo.h:87: warning: type defaults to `int' in declaration of `_sifields'
include/asm-generic/siginfo.h:87: warning: data definition has no type or storage class
include/asm-generic/siginfo.h:88: syntax error before '}' token
include/asm-generic/siginfo.h:88: warning: type defaults to `int' in declaration of `siginfo_t'
include/asm-generic/siginfo.h:88: warning: data definition has no type or storage class
In file included from include/asm/siginfo.h:4,
from include/linux/signal.h:5,
from arch/i386/kernel/asm-offsets.c:7:
include/asm-generic/siginfo.h: In function `copy_siginfo':
include/asm-generic/siginfo.h:278: structure has no member named `_sifields'
include/asm-generic/siginfo.h:278: structure has no member named `_sifields'
include/asm-generic/siginfo.h:278: structure has no member named `_sifields'
include/asm-generic/siginfo.h: At top level:
include/asm-generic/siginfo.h:283: syntax error before '*' token
include/asm-generic/siginfo.h:283: warning: function declaration isn't a prototype
In file included from arch/i386/kernel/asm-offsets.c:7:
include/linux/signal.h:14: syntax error before "siginfo_t"
include/linux/signal.h:14: warning: no semicolon at end of struct or union
In file included from arch/i386/kernel/asm-offsets.c:8:
include/asm/ucontext.h:8: field `uc_mcontext' has incomplete type
In file included from arch/i386/kernel/asm-offsets.c:9:
arch/i386/kernel/sigframe.h:5: field `sc' has incomplete type
arch/i386/kernel/asm-offsets.c: In function `foo':
arch/i386/kernel/asm-offsets.c:18: dereferencing pointer to incomplete type
arch/i386/kernel/asm-offsets.c:19: dereferencing pointer to incomplete type
arch/i386/kernel/asm-offsets.c:20: dereferencing pointer to incomplete type
arch/i386/kernel/asm-offsets.c:21: dereferencing pointer to incomplete type
arch/i386/kernel/asm-offsets.c:22: dereferencing pointer to incomplete type
arch/i386/kernel/asm-offsets.c:23: dereferencing pointer to incomplete type
arch/i386/kernel/asm-offsets.c:24: dereferencing pointer to incomplete type
arch/i386/kernel/asm-offsets.c:25: dereferencing pointer to incomplete type
arch/i386/kernel/asm-offsets.c:26: dereferencing pointer to incomplete type
make[1]: *** [arch/i386/kernel/asm-offsets.s] Error 1

And now i dont know what to do im scared to reboot or anything so plz HELP me out i made sure i added:

image = /boot/vmlinuz.old
root = /dev/hda1
label = slack.old
read-only

and when i type # lilo i get:

root@DarkPunk:/usr/src/linux# lilo
Added Linux *
Fatal: open /boot/vmlinuz.old: No such file or directory

does this mean that if i reboot im screwed?? Plz help me out!!!!

Thanx

Matt3333
 
Old 10-25-2003, 07:03 PM   #14
hussar
Member
 
Registered: Oct 2003
Location: Heidelberg, Germany
Distribution: Slackware 11.0; Kubuntu 6.06; OpenBSD 4.0; OS X 10.4.10
Posts: 345

Rep: Reputation: 30
OK, let's deal with the last issue first. You haven't swapped out kernels, so you still have a bootable kernel. Even if you had wacked your kernel, you would still be able to boot using the Slackware install disks by telling the kernel at boot that your root=/dev/hda1 ('linux root=/dev/hda1").

Lilo will report an error like the one you got if there is no file /boot/vmlinuz.old in your /boot directory. If you didn't do something like 'cp /boot/vmlinuz /boot/vmlinuz.old' before you ran lilo, that would explain the error you got. On my machine, I have also copied a running kernel to vmlinuz.resq, and I set up an image in /etc/lilo.conf that uses it. The reason I named it vmlinuz.resq is that if you do a 'make bzlilo', lilo will move your current kernel image (vmlinuz) to "vmlinuz.old". That means that vmlinuz.old is not static. It changes with every 'bzlilo'.

Your compile problems seem to center on the include/asm symlink. I just untarred the 2.6.0-test8 sources, and there is no symlink from asm to asm-i386 in them. So, that means one of a few things. First, it could be that test6 is different from test8. I doubt that. It could also be that 'make menuconfig' sets a symlink from asm to asm-i386 based on the processor you set in the configuration process. In this case, doing a 'make distclean' or 'make mrproper' should fix that. Actually, I just checked the Makefile, and a symlink is set in the config process and removed in the mrproper/distclean process. You might want to try that, and then reconfigure your 2.6.0-test kernel for another try at a compile.
 
Old 10-25-2003, 09:32 PM   #15
matt3333
Member
 
Registered: Dec 2002
Location: Winnipeg, Manitoba, Canada
Distribution: Slackware
Posts: 371

Original Poster
Rep: Reputation: 30
Ok cool its working i download test8 and im doing bzImage right now!!!! anyways what should i do next should i do make bzlilo?? or when should i do that??? thanx for ur help!!!!

Matt3333
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Kernel 2.4 in Zipslack (Waring: unable to open an initial console | Kernel Panic...) kurtamos Linux - General 2 05-10-2006 12:58 PM
Kernel-Patch Debian Logo 2.6.2 not correctly working for custom kernel 2.6.11 smp deepclutch Debian 3 06-27-2005 03:59 AM
kernel panic: try passing init= option to kernel...installation with Red Hat 9 kergen Linux - Hardware 1 09-30-2004 03:28 AM
Unable to build NVIDIA kernel module / determin kernel version Night Ink Fedora 2 05-31-2004 04:54 PM
Kernel 2.4.23 compile causes kernel panics on ATA RAID-1 (mirror) array Raptor Ramjet Slackware 3 12-18-2003 01:40 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 03:59 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration