OESF | ELSI | pdaXrom | OpenZaurus | Zaurus Themes | Community Links | Ibiblio

IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Netwalker's Kernel, journey to junkyard
Sleep_Walker
post Jun 11 2010, 11:35 AM
Post #1





Group: Members
Posts: 16
Joined: 14-April 10
From: Czech Republic
Member No.: 67,997



Hi,

as I had Hackweek 5 at work, I had a look into Netwalker's kernel a bit. My aim was to port latest Netwalker's coe which can be found in Ubuntu 2.6.28 araneo kernel sources to latest 2.6.31 Freescale kernel. I'm not telling I'm kernel expert but I gave a try. At the end of this week I abandoned this idea smile.gif

I have never seen such mess. As some of you alrerady know, there is no machine ID dedicated to Netwalker. There is used one for Babbage board which is quite (but not completely) similar. Unfortunately this machine ID is used in RedBoot - the Netwalker's bootloader, so to do things correctly NOR flash where RedBoot is located need to be altered and you can brick your device when this is not done correctly. Great! When this is done, change in current kernel is quite cosmetic.

Unfortuinately - this is the lesser problem. Bigger problem is that board configuration is written in headers statically and #ifdefs are ensuring that right HW is used. This would mean maintaining separate kernel tree for Netwalker and porting to newer versions will be always pain. As the biggest pain I find fact that there are widespread #ifdefs in 46 files in different areas of kernel altering code slightly for Netwalker. That means a LOT of time to do things correctly and maintainable. It seems that these changes were done by Nissin Systems Co.,Ltd. - thanks for hardly maintainable code!

I abandoned porting code to Freescale's kernel but I hope there is way to do it correctly in upstream. That will be my long term focus.

Best regards,

Sleep_Walker


UPDATE: it seems that some files contain some partial backport of newer kernel features and statistic measurement so the count of files which needs to be reworked is a bit smaller. It also seems that hidden cursor in framebuffer console is ugly handled feature, not bug. Authors didn't want to have SHARP logo (which seems to be easily altered) disturbed by blinking cursor.

UPDATE2: Yes! Got blinking cursor - what a relief...
Go to the top of the page
 
+Quote Post
Sleep_Walker
post Jun 11 2010, 11:55 AM
Post #2





Group: Members
Posts: 16
Joined: 14-April 10
From: Czech Republic
Member No.: 67,997



Ok, there are also some positives of this digging. I found that LED currently controlled by WiFi driver can be reused for other tasks - I missed monitoring access to SD card or WiFi activity - this would be easy with slight kernel changes smile.gif
Go to the top of the page
 
+Quote Post
ptoki
post Jun 11 2010, 01:13 PM
Post #3





Group: Members
Posts: 90
Joined: 1-April 08
From: Silesia
Member No.: 21,583



QUOTE(Sleep_Walker @ Jun 11 2010, 09:55 PM) *
Ok, there are also some positives of this digging. I found that LED currently controlled by WiFi driver can be reused for other tasks - I missed monitoring access to SD card or WiFi activity - this would be easy with slight kernel changes smile.gif

I admire your efforts. I do not know almost anything about kernel programming but Im aware how complicated it is.
Is it very hard to make patch for blinking wifi led?

And another question: is it possible to get any sort of remote for netwalker (BT solution is known to me)? Zaurus has such solution (resistors in audio jack).
Go to the top of the page
 
+Quote Post
Sleep_Walker
post Jun 13 2010, 01:33 AM
Post #4





Group: Members
Posts: 16
Joined: 14-April 10
From: Czech Republic
Member No.: 67,997



QUOTE(ptoki @ Jun 11 2010, 11:13 PM) *
QUOTE(Sleep_Walker @ Jun 11 2010, 09:55 PM) *
Ok, there are also some positives of this digging. I found that LED currently controlled by WiFi driver can be reused for other tasks - I missed monitoring access to SD card or WiFi activity - this would be easy with slight kernel changes smile.gif

I admire your efforts. I do not know almost anything about kernel programming but Im aware how complicated it is.
Is it very hard to make patch for blinking wifi led?

And another question: is it possible to get any sort of remote for netwalker (BT solution is known to me)? Zaurus has such solution (resistors in audio jack).

LED - it depends on your approach - mac80211 provides these LED triggers already, but ks7010_sdio doesn't use it. If you hardcode such change, it should be doable quite simply, but it would be better choice to fix this driver and merge upstream smile.gif

I'm not sure what do you mean, but you have USB port to do anything you want...

UPDATE: Ok, you can enable LED during compilation in 2.6.28 kernel and use mmc1 trigger (where SDIO WiFi is connected), but you need to disable LED handling in WiFi. I tried to do it quickly during shopping but probably missed something so I got to oops quickly.

UPDATE2: I'm pretty sure that my modifications are quite clear so I suspect that weird sdio detection handling (used way of WiFi on/off). Harder to spot :/
Go to the top of the page
 
+Quote Post
Sleep_Walker
post Jun 14 2010, 02:20 PM
Post #5





Group: Members
Posts: 16
Joined: 14-April 10
From: Czech Republic
Member No.: 67,997



I posted "patches" here.
Go to the top of the page
 
+Quote Post
propofol
post Jun 14 2010, 09:04 PM
Post #6





Group: Members
Posts: 33
Joined: 5-December 05
From: Seattle, WA
Member No.: 8,669



Hi Netwalker,

Thanks for the info on getting the cursor back. I also found this very annoying. It seems somewhat painful compiling the kernel from scratch on the Netwalker. Do you use a cross compile environment or virtual machine or did you just do it on the Netwalker?

Regards,
Stefan


QUOTE(Sleep_Walker @ Jun 14 2010, 03:20 PM) *
I posted "patches" here.

Go to the top of the page
 
+Quote Post
Sleep_Walker
post Jun 14 2010, 11:32 PM
Post #7





Group: Members
Posts: 16
Joined: 14-April 10
From: Czech Republic
Member No.: 67,997



QUOTE(propofol @ Jun 15 2010, 07:04 AM) *
Hi Netwalker,

hehe, Sleep_Walker is nick, Netwalker is device smile.gif

QUOTE(propofol @ Jun 15 2010, 07:04 AM) *
Thanks for the info on getting the cursor back. I also found this very annoying. It seems somewhat painful compiling the kernel from scratch on the Netwalker. Do you use a cross compile environment or virtual machine or did you just do it on the Netwalker?


Well, I'm mostly compiling on Netwalker since it is comfortable and I can do it everywhere (doctor, shopping, etc smile.gif and I'm not making big differences so it takes seconds. I have also cross compilation environment on my notebook so I can use it too.
Go to the top of the page
 
+Quote Post
propofol
post Jun 15 2010, 09:07 PM
Post #8





Group: Members
Posts: 33
Joined: 5-December 05
From: Seattle, WA
Member No.: 8,669



QUOTE(Sleep_Walker @ Jun 15 2010, 12:32 AM) *
QUOTE(propofol @ Jun 15 2010, 07:04 AM) *
Hi Netwalker,

hehe, Sleep_Walker is nick, Netwalker is device smile.gif

QUOTE(propofol @ Jun 15 2010, 07:04 AM) *
Thanks for the info on getting the cursor back. I also found this very annoying. It seems somewhat painful compiling the kernel from scratch on the Netwalker. Do you use a cross compile environment or virtual machine or did you just do it on the Netwalker?


Well, I'm mostly compiling on Netwalker since it is comfortable and I can do it everywhere (doctor, shopping, etc smile.gif and I'm not making big differences so it takes seconds. I have also cross compilation environment on my notebook so I can use it too.



Hi Sleep_Walker,

Oops, sorry that will teach me to do post late at night!

How do you set up the cross compile for the netwalker? I found one or two Japanese websites however even with Google translate I could not quite sort it out.

Regards,
Stefan



Go to the top of the page
 
+Quote Post
Sleep_Walker
post Jun 18 2010, 05:44 AM
Post #9





Group: Members
Posts: 16
Joined: 14-April 10
From: Czech Republic
Member No.: 67,997



Hi,

QUOTE(propofol @ Jun 16 2010, 06:08 AM) *
How do you set up the cross compile for the netwalker? I found one or two Japanese websites however even with Google translate I could not quite sort it out.


I'm not completely sure what you mean, but installation of cross compiler is distro dependand. In my openSUSE I have it as package in openSUSE Buildservice. In Gentoo I build it with crossdev tool...

Or you may be asking about cross compilation of kernel. I invoke make with this call:
make INSTALL_MOD_PATH="/Devel/netwalker/modules" CROSS_COMPILE=arm-linux-gnueabi- ARCH=arm

If it is not, what you meant, please, ask again.
Go to the top of the page
 
+Quote Post
propofol
post Jun 18 2010, 08:23 AM
Post #10





Group: Members
Posts: 33
Joined: 5-December 05
From: Seattle, WA
Member No.: 8,669



QUOTE(Sleep_Walker @ Jun 18 2010, 06:44 AM) *
Hi,

QUOTE(propofol @ Jun 16 2010, 06:08 AM) *
How do you set up the cross compile for the netwalker? I found one or two Japanese websites however even with Google translate I could not quite sort it out.


I'm not completely sure what you mean, but installation of cross compiler is distro dependand. In my openSUSE I have it as package in openSUSE Buildservice. In Gentoo I build it with crossdev tool...

Or you may be asking about cross compilation of kernel. I invoke make with this call:
make INSTALL_MOD_PATH="/Devel/netwalker/modules" CROSS_COMPILE=arm-linux-gnueabi- ARCH=arm

If it is not, what you meant, please, ask again.


Thanks for the reply. This is what I had in mind. Unfortunately I have various flavors of Debian installed so my setup would be different.

Regards,
Stefan

PS Sorry about the multiple previous postings - I have removed it.

Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 23rd November 2014 - 12:05 PM