Make Dies With Stock Freesco Kernel

Packaging/Compiling/Client Information Forums, including Author's chit chat forum and soon others.

Postby TalkingToes » Sun May 20, 2007 11:59 am

Hello,

I see the i2c / lm_modules are an option in the kernel in make menuconfig and want to use it again (i'm the original patch submitter!) with v037 freesco. I cannot find the i2c/sensors modules, so I want to compile my own kernel and modules that knows about i2c /sensors. I2c/sensors needs a lot of reading for configuring, so there is no install script.

I can compile a base kernel, but not the base modules part. I have a basic install.

Running VMWare , installed Win98(se) from CD, and then WinZip. Downloaded Slackware 3.9 and unzipped to c:\linux. Edited the \linux\linux.bat to start using hda. Downloaded the freesco package opensshd_3.7.1p1_dingetje_1.tgz and manually ran the steps in the setup script to make the necessary rsa/dsa files. I have /etc/rc/rc.local running /pkg/rc/opensshd boot and /pkg/rc/opensshd start so I can use puTTY to connect (My slow system causes the tab and return keys to double press in vmware. Annoying..).
Downloaded Official Freesco Kernel from sourceforge. ( lynx <a href='http://superb-east.dl.sourceforge.net/sourceforge/freesco/freesco-2.0.39.tar.gz)' target='_blank'>http://superb-east.dl.sourceforge.net/sour...-2.0.39.tar.gz)</a> 12372kb later, I use mc to extract it to /usr/src (so, /usr/src/linux exists.) Using the default .config file (7000 bytes)
make clean
make dep
make (running on hard drive, not using compressed kernel)
All is good till:
make modules (and a lot so stuff later):
Code: Select all
...
make[1]: Entering directory `/usr/src/linux/arch/i386/lib'
make[1]: Nothing to be done for `modules'.
make[1]: Leaving directory `/usr/src/linux/arch/i386/lib'
make[1]: Entering directory `/usr/src/linux/arch/i386/math-emu'
make[1]: Nothing to be done for `modules'.
make[1]: Leaving directory `/usr/src/linux/arch/i386/math-emu'
export KERN_INCLUDE
make -C drivers-new
make[1]: Entering directory `/usr/src/linux/drivers-new'
gcc -DMODULE -D__KERNEL__ -Wall -Wstrict-prototypes -O6 -I/usr/src/linux/include  -pipe -fno-strength-reduce -DMODVERSIONS   -c pci-skeleton.c -o pci-skeleton.o
pci-skeleton.c:110: linux/modversions.h: No such file or directory
In file included from pci-skeleton.c:145:
kern_compat.h:42: linux/modversions.h: No such file or directory
make[1]: *** [pci-skeleton.o] Error 1
make[1]: Leaving directory `/usr/src/linux/drivers-new'
make: *** [modules] Error 2



Now what? :blink:

Thanks,
TalkingToes in Seattle
5' 16" is easy math, so why do SO many miss it?
User avatar
TalkingToes
Senior Member
 
Posts: 76
Joined: Mon Sep 30, 2002 11:11 pm
Location: Seattle, WA

Postby Doc Nielsen » Sun May 20, 2007 12:24 pm

my guess: the driver isn't made for a 2.0.* kernel.
I work to better myself, for the sake of all mankind...
Everyone talks about changing the world, but no one talks about changing themselves.
User avatar
Doc Nielsen
Junior Member
 
Posts: 41
Joined: Wed Nov 14, 2001 2:02 am
Location: Copenhagen, Denmark

Postby TalkingToes » Sun May 20, 2007 1:25 pm

The pci-skeleton.c is evidently used by many of the /usr/src/linux/drivers-new/ PCI Network Card drivers. I bet it is required. :wink: I am using only what was downloaded, nothing new. Other suggestions?

TalkingToes
5' 16" is easy math, so why do SO many miss it?
User avatar
TalkingToes
Senior Member
 
Posts: 76
Joined: Mon Sep 30, 2002 11:11 pm
Location: Seattle, WA

Postby Lightning » Sun May 20, 2007 2:00 pm

Actually the pci-skeleton.c is a template for making your own driver and it is not required by any drivers, however some pci drivers start out using it as a template.
You have several options on how to fix this problem. The first is to edit that source file and change the include to <config/modversions.h>, or copy that file to the /usr/src/linux/include/linux directory, or just delete the pci-skeleton.c file.
If you are afraid that you might make a mistake. The chances are high that you will never learn anything.
User avatar
Lightning
FREESCO GOD !!
 
Posts: 12079
Joined: Wed Nov 14, 2001 6:50 am
Location: Oregon, USA

Postby TalkingToes » Sun May 20, 2007 9:30 pm

I have found a few more quirks in the kernel source code from sourceforge.

/usr/src/linux/.depend and /usr/src/linux/.hdepend looks for /usr/src/freesco-035/ and not /usr/src/linux Fix:
Code: Select all
ln -s /usr/src/linux /usr/src/freesco-035
(probably should edit this file instead of making a link)

/usr/src/linux/include/asm/ is a directory with files in it, needs to be deleted. asm is recreated as a soft link to ./asm-i386 when you run make menuconfig . (make complaines if not linked) Fix:
Code: Select all
rm -fR /usr/src/linux/include/asm


/usr/src/linux/include/linux/modversion.h does not exist., but does in ./include/linux, so softlink it. Fix:
Code: Select all
ln -s /usr/src/linux/include/config/modversions.h /usr/src/linux/include/linux/


Now, the freesco kernel compiles make zImage (with the default .config) file w/o errors. The make modules has no errors. But, the make modules_install still give me errors:
Code: Select all
mybox:/usr/src/linux# make modules_install
Installing modules under /lib/modules/2.0.39/net
Installing modules under /lib/modules/2.0.39/ipv4
Installing modules under /lib/modules/2.0.39/fs
Installing modules under /lib/modules/2.0.39/misc
make[1]: Entering directory `/usr/src/linux/drivers-new'
gcc -DMODULE -D__KERNEL__ -Wall -Wstrict-prototypes -O6 -I/usr/src/linux/include  -pipe -fno-strength-reduce -DMODVERSIONS   -c cb_shim.c -o cb_shim.o
cb_shim.c:59: pcmcia/driver_ops.h: No such file or directory
cb_shim.c:73: field `node' has incomplete type
cb_shim.c:83: field `drv_ops' has incomplete type
cb_shim.c: In function `drv_power_op':
cb_shim.c:117: dereferencing pointer to incomplete type
cb_shim.c: At top level:
cb_shim.c:137: parse error before `*'
cb_shim.c:137: warning: `struct dev_locator_t' declared inside parameter list
cb_shim.c:137: warning: its scope is only this definition or declaration,
cb_shim.c:137: warning: which is probably not what you want.
cb_shim.c:138: warning: return-type defaults to `int'
cb_shim.c: In function `drv_attach':
cb_shim.c:150: dereferencing pointer to incomplete type
cb_shim.c:150: `LOC_PCI' undeclared (first use this function)
cb_shim.c:150: (Each undeclared identifier is reported only once
cb_shim.c:150: for each function it appears in.)
cb_shim.c:151: dereferencing pointer to incomplete type
cb_shim.c:151: dereferencing pointer to incomplete type
cb_shim.c: In function `do_cb_register':
cb_shim.c:234: dereferencing pointer to incomplete type
cb_shim.c:235: dereferencing pointer to incomplete type
cb_shim.c:236: dereferencing pointer to incomplete type
cb_shim.c:237: dereferencing pointer to incomplete type
cb_shim.c:238: dereferencing pointer to incomplete type
cb_shim.c:241: warning: implicit declaration of function `register_driver'
cb_shim.c:224: warning: `dop' might be used uninitialized in this function
cb_shim.c: In function `do_cb_unregister':
cb_shim.c:250: warning: implicit declaration of function `unregister_driver'
make[1]: *** [cb_shim.o] Error 1
make[1]: Leaving directory `/usr/src/linux/drivers-new'
make: *** [modules_install] Error 2
The 4 folders at the top are infact made, it's what happens when it enters the drivers-new folder it dies..

Help again? I cannot find a .../pcmcia/drv_ops.h anywhere (nor in the original kernel files). Should it be going into /drivers-new/ ?

TalkingToes in Seattle, WA

PS. Yes I know I can copy all necessary *.o files and put them whereever manually, but that's not the point, is it? Also, I have yet to make changes using menuconfig so I can get the i2c/sensors going.
5' 16" is easy math, so why do SO many miss it?
User avatar
TalkingToes
Senior Member
 
Posts: 76
Joined: Mon Sep 30, 2002 11:11 pm
Location: Seattle, WA

Postby Lightning » Sun May 20, 2007 11:26 pm

The modversions.h file is automatically generated if you enable the module versions in the .config file and it is removed when you use the "make distclean" command, which is what was done before it was uploaded.
The other problems as probably guessed are because the source on my machine also includes the pcmcia source code, which is not by default part of the kernel source. I also had known about the asm directory problem and had put off the fix for it because it is turned into a directory in that process of creating the tar.gz

The current problem that I am faced with is to upload the old kernel code fixed or upload the new modified 038 kernel code fixed ??
If you are afraid that you might make a mistake. The chances are high that you will never learn anything.
User avatar
Lightning
FREESCO GOD !!
 
Posts: 12079
Joined: Wed Nov 14, 2001 6:50 am
Location: Oregon, USA

Postby Lightning » Mon May 21, 2007 12:13 am

The 038 kernel source is uploaded to sourceforge and the various problems should be corrected.
If you are afraid that you might make a mistake. The chances are high that you will never learn anything.
User avatar
Lightning
FREESCO GOD !!
 
Posts: 12079
Joined: Wed Nov 14, 2001 6:50 am
Location: Oregon, USA


Return to Packaging/Compiling/Client Information Forums

Who is online

Users browsing this forum: No registered users and 2 guests

cron