maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Development (https://talk.maemo.org/forumdisplay.php?f=13)
-   -   kernel development for the 770 (https://talk.maemo.org/showthread.php?t=28147)

nicolai 2009-04-07 16:58

kernel development for the 770
 
Hello,

can someone give me advice on how to setup kernel development
environment for the 770 device.

I already searched, but only found howtos for the n800/n810 devices
or special howtos for bora and diablo. Correct me if I am wrong, but
I think I cannot take the diablo source and environment for the 770 device. I suppose I have to use the gregale sources. My device current firmware version is 3.2006.49-2.

So far I set up scratchbox target as describe in a tutorial from here:
http://test.maemo.org/platform/docs/...uide_bora.html
with:
sb-conf setup MaemoKernel -c cs2005q3.2-glibc-arm -t /scratchbox/devkits/cputransp/bin/qemu-arm-0.8.1-sb2
sb-conf select MaemoKernel
sb-conf rs MaemoKernel /scratchbox/packages/Maemo_Dev_Platform_v2.2_armel-rootstrap.tgz
sb-conf in MaemoKernel -e -d -F

I set my source.list for gregale instead of bora, but cannot do apt-get update. I get this error:
Failed to fetch http://repository.maemo.org/dists/gregale/Release.gpg Temporary failure resolving 'repository.maemo.org'
apt-get only works if I add debian-sarge devkit when setup the target.
By the way, why do some howtos use fakeroot apt-get, instead of just apt-get?

The next question is, where to find the kernel source. The maemo wiki entry for kernel developing only deals with diablo and the kernel source is named kernel-source-diable. But in the gregale repository is no package named kernel-source-gregal.

My primary goal is to rebuild some kernel modules, but I would like to rebuild the whole kernel too.

thanks in advance.

penguinbait 2009-04-07 17:47

Re: kernel development for the 770
 
Quote:

Originally Posted by nicolai (Post 278143)
Hello,

can someone give me advice on how to setup kernel development
environment for the 770 device.

I already searched, but only found howtos for the n800/n810 devices
or special howtos for bora and diablo. Correct me if I am wrong, but
I think I cannot take the diablo source and environment for the 770 device. I suppose I have to use the gregale sources. My device current firmware version is 3.2006.49-2.

So far I set up scratchbox target as describe in a tutorial from here:
http://test.maemo.org/platform/docs/...uide_bora.html
with:
sb-conf setup MaemoKernel -c cs2005q3.2-glibc-arm -t /scratchbox/devkits/cputransp/bin/qemu-arm-0.8.1-sb2
sb-conf select MaemoKernel
sb-conf rs MaemoKernel /scratchbox/packages/Maemo_Dev_Platform_v2.2_armel-rootstrap.tgz
sb-conf in MaemoKernel -e -d -F

I set my source.list for gregale instead of bora, but cannot do apt-get update. I get this error:
Failed to fetch http://repository.maemo.org/dists/gregale/Release.gpg Temporary failure resolving 'repository.maemo.org'
apt-get only works if I add debian-sarge devkit when setup the target.
By the way, why do some howtos use fakeroot apt-get, instead of just apt-get?

The next question is, where to find the kernel source. The maemo wiki entry for kernel developing only deals with diablo and the kernel source is named kernel-source-diable. But in the gregale repository is no package named kernel-source-gregal.

My primary goal is to rebuild some kernel modules, but I would like to rebuild the whole kernel too.

thanks in advance.



Check your DNS servers /scratchbox/etc/resolv.conf

Sounds like they are empty so no name resolution is happening

fanoush 2009-04-07 17:51

Re: kernel development for the 770
 
You can use normal bora or diablo SDK scratchbox target, all of them use same compiler so it doesn't matter. Creating new target is not needed.

kernel source is here
http://repository.maemo.org/pool/gre...source-2.6.16/ just unpack it somewhere inside the target

nicolai 2009-04-08 07:55

Re: kernel development for the 770
 
Thanks for this clarification. Now I can build the kernel.

nicolai

fast1 2009-04-08 10:51

Re: kernel development for the 770
 
sorry but what is a kernel?

spock128 2009-09-22 06:06

Re: kernel development for the 770
 
How do I set up the development environment for compiling the kernel? I've set up scratchbox following these instructions: http://scratchbox.org/documentation/...nstalldoc.html, and created a maemo 2.2 target (http://maemo.org/development/documen..._2_2_Tutorial/). I can build and run arm programs, but when I unpack the kernel sources and run "make menuconfig", I get a ton of linking errors (curses, apparently).

Is there a default .config I can modify for my needs? (need nat and/or bridge modules) and is there an easier way of configuring it than plain "make config"?

Thanks.

fanoush 2009-09-22 06:59

Re: kernel development for the 770
 
edit scripts/kconfig/lxdialog/check-lxdialog.sh to always return -lncurses
Code:

ldflags()
{
        $cc -print-file-name=libncursesw.so | grep -q /
        if [ $? -eq 0 ]; then
                echo '-lncursesw'
                exit
        fi
        $cc -print-file-name=libncurses.so | grep -q /
#      if [ $? -eq 0 ]; then
                echo '-lncurses'
                exit
#      fi
        $cc -print-file-name=libcurses.so | grep -q /
        if [ $? -eq 0 ]; then
                echo '-lcurses'
                exit
        fi
        exit 1
}

Quote:

Originally Posted by spock128 (Post 331244)
Is there a default .config I can modify for my needs?

make n770_defconfig
make menuconfig

spock128 2009-09-26 06:18

Re: kernel development for the 770
 
Thanks, fanoush. I got the kernel & modules to compile and run on the 770. The only problem now is that the wifi corruption bugfix module will cause the new kernel to crash whenever the wifi is used. Does this module's source exist anywhere? Even if it's a binary-only driver, isn't there an open-source wrapper that could be recompiled (like nVidia's Linux graphics driver)?

Thanks.

lma 2009-09-26 10:41

Re: kernel development for the 770
 
See bug 2006.

fanoush 2009-09-26 11:23

Re: kernel development for the 770
 
link to sources is in the bug too https://bugs.maemo.org/show_bug.cgi?id=2006#c14
however recompiling the wrapper may or may not help, see this https://garage.maemo.org/pipermail/c...er/000006.html
umac.ko uses some linux kernel structures too and some kernel config parameters may enlarge these structures making umac.ko using wrong data (offset to structure fields are changed). As we don't have sources to umac.ko described solution is to redefine those structures (sk_buff) to have new data in the end.


All times are GMT. The time now is 05:33.

vBulletin® Version 3.8.8