Active Topics

 


Reply
Thread Tools
Posts: 18 | Thanked: 1 time | Joined on Feb 2007
#1
I have been searching google for a long time and have no luck solving my problem compiling the kernel for n770. Wondering if anybody here had the same issue before and knows how to deal with it.

I am using VMware with Ubuntu 5.1; I setup the latest version of scratchbox (Apophis R4); I am using "cs2005q3.2-glibc-arm" as the toolchain, "qemu-arm-0.8.1-sb2" as cputransp; Devkits: perl, doctools, debian, cputransp; And I use the "Maemo 2.2" (Maemo_Dev_Platform_v2.2_armel-rootstrap.tgz) as rootstrap. (p.s. hope this is the correct setup)

I want to compile the kernel and thus I follow the tutorial (http://maemo.org/maemowiki/HowTo_KernelCompilation), everything goes fine. I got the kernel-source-2.6.16 and su-18-kernel without problem. Now when I follow the instruction and do the "dpkg-buildpackage -rfakeroot -uc -us -sa -d" I ran into trouble:

-----
make HOSTCC=host-gcc n770_defconfig && \
make HOSTCC=host-gcc zImage
make[1]: Entering directory `/home/ubuntu/kernel/su-18-kernel-2.6.16/kernel-source-2.6.16'
HOSTCC scripts/basic/fixdep
/scratchbox/compilers/bin/host-gcc: Too many open files
make[2]: *** [scripts/basic/fixdep] Error 1
make[1]: *** [scripts_basic] Error 2
make[1]: Leaving directory `/home/ubuntu/kernel/su-18-kernel-2.6.16/kernel-source-2.6.16'
make: *** [build-stamp] Error 2
-----

Above are the last few lines that telling me there are build errors.
Anyone here has idea how could I fix it?

Thanks a lot,
Regards,
 
Posts: 2,152 | Thanked: 1,490 times | Joined on Jan 2006 @ Czech Republic
#2
http://www.gossamer-threads.com/list...rs/20850#20850

Do not build deb, and do not use host-gcc. Just switch to arm target and go to kernel directory /home/ubuntu/kernel/su-18-kernel-2.6.16/kernel-source-2.6.16 and do
Code:
make n770_oldconfig
if you have no customized config yet
and then for changing configuration do the ncurses fix in mail above and do
Code:
make menuconfig
and finally
Code:
make
After long compilation kernel is in arch/arm/boot/zImage, just flash it to device. Or when you are not sure about the result there is flasher option to load and boot kernel without flashing so if kernel is bad you just need to reboot. Also copy over modules you want (those with .ko suffix).
 
Posts: 18 | Thanked: 1 time | Joined on Feb 2007
#3
Thanks fanoush for the information.
Actually I did look up at that page b4 but there are some confusion in between that stoped me.

It looks to me the procedure compiling the kernel is dfferent between Maemo 2.1 and Maemo Bora 3.1; As I am using Maemo2.2 I suppose I should follow more on this tutorial: http://maemo.org/maemowiki/HowTo_KernelCompilation

I am not sure what is the purpose of getting "su-18-kernel"; however according to the tutorial, b4 I get the su-18-kernel I have to install the kernel-source-2.6.16: "fakeroot apt-get install kernel-source-2.6.16", this one is very different then what its said on the Bora3.1 tutorial.

Thus I wont have the directory "/home/ubuntu/kernel/su-18-kernel-2.6.16/kernel-source-2.6.16",
instead, I only have
"/home/ubuntu/kernel/su-18-kernel-2.6.16/"

Now my question turns out to be, should I get the kernel-source-2.6.16 using
"apt-get source kernel-source-2.6.16" and put the directory and files into the su-18-kernel-2.6.16 folder?

Thanks,
 
Posts: 2,152 | Thanked: 1,490 times | Joined on Jan 2006 @ Czech Republic
#4
Originally Posted by macken View Post
I am not sure what is the purpose of getting "su-18-kernel"
,
To get original kernel image. This one is also in the firmware image. You don't need it for compiling kernel source.
Originally Posted by macken View Post
I have to install the kernel-source-2.6.16: "fakeroot apt-get install kernel-source-2.6.16"
Yes, this one.
Originally Posted by macken View Post
Now my question turns out to be, should I get the kernel-source-2.6.16 using
"apt-get source kernel-source-2.6.16"
You can but use the one above.
Originally Posted by macken View Post
and put the directory and files into the su-18-kernel-2.6.16 folder?
,
There is no reason to do this.

Most debian packages contain binaries to run. apt-get source is for getting sources of such debian package so you can rebuild the binary. Kernel-source debian package is different. It contains source of linux kernel, not binary. You can get source of such debian package too, but in this situation there in no point in doing that.
 
Posts: 2,152 | Thanked: 1,490 times | Joined on Jan 2006 @ Czech Republic
#5
Also if you use the 'fakeroot apt-get install ...' method, kernel sources are installed to /usr/src/.... not to current directory like with apt-get source.
 
Reply


 
Forum Jump


All times are GMT. The time now is 17:18.