custom kernel

gearheadgeek
Posts: 13
Joined: Fri Aug 28, 2009 10:07 pm

Re: custom kernel

Post by gearheadgeek »

Denis wrote:Why you do not try Ubuntu 9.04? Drm, psb, unionfs, squashfs included in kernel sources already
That is more or less what I did for the moment. I used the kernel and modules from your Jaunty repository. I was able to compile from source also. The application is currently done on 8.04, and the plan is to move to 9.04, but that requires a lot of work and takes time.

Thanks.

ilia
Posts: 15
Joined: Mon Jun 25, 2012 11:33 am

Re: custom kernel

Post by ilia »

Looks, I have similar problem!
When using the procedure, described by Denis:
  • Download the linux_2.6.35.orig.tar.gz and linux_2.6.35-34.2.diff.gz;
  • Unpacking both, cd linux-2.6.35;
  • Applying the patch as patch -p1 < ../linux_2.6.35-34.2.diff
  • cp debian/config/i386/config.fitpc2 .config
and than do:
make oldconfig
the build asks a lot of configuration questions, like:

Xen guest support (XEN) [N/y/?] (NEW) n
IBM Calgary IOMMU support (CALGARY_IOMMU) [N/y/?] (NEW) n
AMD IOMMU support (AMD_IOMMU) [N/y/?] (NEW) n
... and so on.
At the end, there is a lot of differences between the original config.fitpc2 and the new .config, created by this procedure.
Diff between the both files attached.
Plain make asks the same questions exactly. Looks as it executes make oldconfig internally.

All this looks as the config.fitpc2 is not fit the kernel :( . AFAIK, all these messages, finished with (NEW) means that the relevant parameters are not configured in the config.fitpc2.
Can I get the kernel and the config which are compatible?

P.S.
I build the kernel not on the fitpc itself, but on my development machine, which is (naturally) more advanced.
uname -a on it shows:
Linux ilia-Linux 3.2.0-26-generic #41-Ubuntu SMP Thu Jun 14 17:49:24 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
Can the kernel cross-compilation be done? If yes, how?
Thanks.
Ilia.

ilia
Posts: 15
Joined: Mon Jun 25, 2012 11:33 am

Re: custom kernel

Post by ilia »

One more attempt to build kernel, this time on the Fit-PC2 machine itself.
It took really lot of time, and still failed!

First I unpacked the linux_2.6.35-34.2.diff.gz and linux_2.6.35.orig.tar.gz (both from Compulab site), than:
cd linux-2.6.35
patch -p1 < ../linux_2.6.35-34.2.diff
make oldconfig

This time make oldconfig completed without problems;


Then I decided to give the dpkg-buildpackage a try. After apt-get install all the needed dependencies, I run:
dpkg-buildpackage -D

and get the following:
cp -f debian/control.stub debian/control
dpkg-source -b linux-2.6.35
dpkg-source: info: using source format `1.0'
dpkg-source: info: building linux using existing linux_2.6.35.orig.tar.gz
dpkg-source: info: building linux in linux_2.6.35-34.2.diff.gz
dpkg-source: warning: file linux-2.6.35/ubuntu/omnibook/misc/README.mmkeys has no final newline (either original or modified version)
dpkg-source: warning: file linux-2.6.35/ubuntu/rtl8192se/rtl8192s/r8192S_dev.c has no final newline (either original or modified version)
dpkg-source: warning: file linux-2.6.35/drivers/gpu/drm/emgd/emgd/include/tnc/igd_tnc_wa.h has no final newline (either original or modified version)
dpkg-source: error: cannot represent change to linux-2.6.35/scripts/basic/fixdep: binary file contents changed
dpkg-source: error: cannot represent change to linux-2.6.35/scripts/basic/hash: binary file contents changed
dpkg-source: error: cannot represent change to linux-2.6.35/scripts/basic/docproc: binary file contents changed
dpkg-source: error: cannot represent change to linux-2.6.35/scripts/kconfig/kxgettext.o: binary file contents changed
dpkg-source: error: cannot represent change to linux-2.6.35/scripts/kconfig/zconf.tab.o: binary file contents changed
dpkg-source: error: cannot represent change to linux-2.6.35/scripts/kconfig/conf.o: binary file contents changed
dpkg-source: error: cannot represent change to linux-2.6.35/scripts/kconfig/conf: binary file contents changed
dpkg-source: warning: the diff modifies the following upstream files:
.config

:
There comes the long list of the files, patched in the linux_2.6.35-34.2.diff - or at least so it's looks. Why the dpkg-buildpackage need to do it is beyond my understanding.
:
And at the end, there is the following error message:
dpkg-source: info: use the '3.0 (quilt)' format to have separate and documented changes to upstream files, see dpkg-source(1)
dpkg-source: unrepresentable changes to source
dpkg-buildpackage: error: dpkg-source -b linux-2.6.35 gave error exit status 1



Second attempt: The classic make:
I typed:
make clean
make

The kernel compilation starts.

At some point it reports:
LD vmlinux.o
MODPOST vmlinux.o
WARNING: modpost: Found 2 section mismatch(es).
To see full details build your kernel with:
'make CONFIG_DEBUG_SECTION_MISMATCH=y'


and than:
BUILD arch/x86/boot/bzImage
Root device is (8, 1)
Setup is 13404 bytes (padded to 13824 bytes).
System is 3703 kB
CRC 96d84450
Kernel: arch/x86/boot/bzImage is ready (#1)


Looks as the kernel build succeeded. WOW!!
The make than automatically goes to building the modules (*.ko files):

Building modules, stage 2.
MODPOST 1373 modules
WARNING: modpost: Found 33 section mismatch(es).
To see full details build your kernel with:
'make CONFIG_DEBUG_SECTION_MISMATCH=y'

And this process is failed with the message:
make[1]: *** No rule to make target `firmware/rt3090.bin', needed by `__fw_modbuild'. Stop.
make: *** [modules] Error 2



Questions:
  1. It looks as the problem is the lack of vendor firmware for the device named rt3090.
  2. What's it the device?
  3. Does this device used in the Fit-PC 2i?
  4. If not, can I just exclude it from the configuration?
  5. If it's needed, how can I get the missing file?
Does the mentioned section mismatches critical? In another words, can the messages like Found xx section mismatch(es). be ignored? If not, what can be done on?

Thanks in advance.
Ilia.

ilia
Posts: 15
Joined: Mon Jun 25, 2012 11:33 am

Re: custom kernel

Post by ilia »

Looks as the problem is solved (OK, sort of)
I found that the device rt3090, for which the firmware file was lacking, is the WiFi chip (of Realtek, AFAIK).
As my machine has no WiFi, I just disabled the WiFi in the kernel config (changed it from "M" to none) and the kernel was successfully built.

In the course, I found that the Fit-PC kernel from Compulab contains a lot of drivers, which are of no use there. Looks as this kernel is the minimally changed Ubuntu with all the baggage of assorted drivers for nearly any PC possible.
I think at some step it's well worth to remove all the unneeded stuff.

Post Reply

Return to “Linux on fit-PC2”