Kernel compiling and build for DARwIn-OP

Post Reply
robotis
Posts: 3
Joined: Thu May 03, 2012 4:22 am

Kernel compiling and build for DARwIn-OP

Post by robotis »

We are testing mint Linux 9 for our DARwIn-OP robot and we have a problem.

1. Downloaded the kernel source file from

http://fit-pc2.com/download/ubuntu/dist ... .2_all.deb

A. after decompression we get the file
/usr/src/linux-source-2.6.35.tar.gz the directory gunzip/untar
And
linux-source-2.6.35.

B. run the following commands
make menuconfig. (timer frequency, preempt kernel option)

C. # make-kpkg --initrd --revision=r1 kernel_image kernel_headers linux_source modules_image to build.

D. However we get the following problem
make[2]: *** No rule to make target `firmware/rt3090.bin’, needed by `__fw_modbuild’. Stop.
make[1]: *** [modules] Error 2
make[1]: Leaving directory `/usr/src/linux-source-2.6.35’
So we have a problem relating with the wifi card.


2. Downloaded and decompressed the file
http://fit-pc2.com/download/ubuntu/dist ... rig.tar.gz (original),

and

http://fit-pc2.com/download/ubuntu/dist ... .2.diff.gz (CompuLab modified)
A. we get the same results.


3. downloaded from Ralinktech's homepage RT3070/RT3090 firmware rt3070.bin and rt3090.bin files and placed them onto the kernel's source folder; followed by the build.
A. http://www.ralinktech.com/en/04_support ... php?sn=501
B. The build was successful (no errors like above. However, after installing the Kernel the system does not boot.

Now our concerns are
1. is there a problem with the kernel source?

2. is there something we are doing wrong when building the kernel?

Denis
Posts: 301
Joined: Sun Apr 26, 2009 3:24 pm

Re: Kernel compiling and build for DARwIn-OP

Post by Denis »

1. Download .orig and .diff
2. Choose config debian/config/i386/config.fitpc2
3. Compile and ensure it works
4. Try your changes
Compulab's Linux support

robotis
Posts: 3
Joined: Thu May 03, 2012 4:22 am

Re: Kernel compiling and build for DARwIn-OP

Post by robotis »

Denis wrote:1. Download .orig and .diff
2. Choose config debian/config/i386/config.fitpc2
3. Compile and ensure it works
4. Try your changes
I can't find the file "debian/Config/i386/config.fitpc2".
# find . -name "*fitpc*" -> there is no file include 'fitpc' (except folder name and *.c file).
Where can I find the config file?

And default .config file include this line:
CONFIG_VERSION_SIGNATURE="Ubuntu 2.6.35-34.2-fitpc2"

So I think, this .config file seems to be correct file.

I just changed this two options:
CONFIG_HZ_250=y -> CONFIG_HZ_1000=y
CONFIG_PREEMPT_VOLUNTARY=y -> CONFIG_PREEMPT=y

There were no problems when using Ubuntu 9.10.

Denis
Posts: 301
Joined: Sun Apr 26, 2009 3:24 pm

Re: Kernel compiling and build for DARwIn-OP

Post by Denis »

Download .orig and patch it with .diff file:

Code: Select all

cd linux-2.6.35
patch -p1 < ../linux_2.6.35-34.2.diff
Then you will see the debian folder.
Compulab's Linux support

robotis
Posts: 3
Joined: Thu May 03, 2012 4:22 am

Re: Kernel compiling and build for DARwIn-OP

Post by robotis »

Denis wrote:Download .orig and patch it with .diff file:

Code: Select all

cd linux-2.6.35
patch -p1 < ../linux_2.6.35-34.2.diff
Then you will see the debian folder.
OK. Maybe there was some mistakes to patch kernel source.

I found the "config.fitpc2" file and copy it to ".config" -> compiled the kernel -> installed the compiled kernel.

But the result is same.. it did not boot.
Boot fail
Boot fail
IMAG0139.jpg (47.33 KiB) Viewed 11022 times

Denis
Posts: 301
Joined: Sun Apr 26, 2009 3:24 pm

Re: Kernel compiling and build for DARwIn-OP

Post by Denis »

What you have now is booted kernel, but it can not mount your harddisk because kernel does not contain all modules build-in, big part of them are on the harddisk itself in /lib/modules/.
What do you need is to build initrd and add in to boot/grub/menu.lst

It is possible to generate linux-initrd, linux-image, linux-headers .deb files in "ubuntu way", I`ve done it on ubuntu 10.04:

Code: Select all

cd /path-to-patched-kernel-sources
dpkg-buildpackage -D
It takes time, many .debs will be generated, linux-initrd among them.

Please googe "howto build initrd ubuntu 10.04"
Compulab's Linux support

Post Reply

Return to “Linux Mint”