Introducing XDA:DevCon – A Conference For Developers By Developers
XDA Developers Android and Mobile Development Forum
Forgot your password?
 
Post Reply+
Tip us?
 
brian_o'fish
Old
(Last edited by brian_o'fish; 7th March 2011 at 11:31 AM.) Reason: Update after second try
#1  
Member - OP
Thanks Meter 42
Posts: 81
Join Date: Mar 2011
Location: Dormagen
Default [Q] archos gen8_gpl_froyo kernel build

Just for fun and because I can, I started to work on recompiling the kernel for my Archos 10.1 (gen8) device.

I'm working with the Archos provided gen8_gpl_froyo source tarball.

Apart from some small stuff I could work out, like unterminated double quoted strings in config.in files, patches that don't apply to sources because the sources contain symlinks where files are expected, and of course the rounds of what-do-I-need-on-my-host (automake, texinfo, ...) - I got both a working kernel compile, and all the rest of the build.

I proceeded to menuconfig in some stuff I'd like to have in the kernel, as modules, like netfilter conntracking / NAT support, advanced (policy) routing, namespaces, nfsd. Also went smoothly.

I can successfully start that kernel on an existing Uruk 0.7 install, by untarring my self built modules over what Uruk comes with in /lib/modules/2.6.29-omap1/kernel, depmod that, and use the Uruk's /root/initramfs.cpio.gz together with my self built zImage for flashing through the recovery menu.

The system then boots up fine, I can verify it is running the kernel, I can load the netfilter conntracking / NAT modules, and even install an state ESTABLISHED rule which does what it should.

HOWEVER - and that's why I open this thread, there is constant chatter, coming from the kernel, being written to logcat. This uses quite a bit of CPU, probably for the logging work, so I rapidly reverted to the Uruk's own kernel.

What I would like to know, is whether somebody else has seen the following kernel messages in a similar scenario, and knows what I did wrong / how I can work around that?

Code:
03-06 15:33:56.816 I/cat     ( 1020): <6>tmdlHdmiTxHdcpCheck 4245
03-06 15:33:56.816 I/cat     ( 1020): <3>Bad input instance value   returned in hdcp_check line 729
03-06 15:33:56.847 I/cat     ( 1020): <6>tmdlHdmiTxHdcpCheck 4245
03-06 15:33:56.847 I/cat     ( 1020): <3>Bad input instance value   returned in hdcp_check line 729
03-06 15:33:56.878 I/cat     ( 1020): <6>tmdlHdmiTxHdcpCheck 4245
03-06 15:33:56.878 I/cat     ( 1020): <3>Bad input instance value   returned in hdcp_check line 729
It is a constant repetition of these two lines, I just showed three instances so you can get a feel for the frequency from the timestamps.

The function names / messages are nowhere to be found in the archos released source code, nor in the modules compiled from there.

They reside in two module files that lie directly in /lib/modules/, named hdmicec.ko and hdmitx.ko

The hdmitx.ko module is loaded when I boot into my kernel. Loading hdmicec.ko by hand does not improve the situation. Also, under the normal Uruk 0.7 kernel, only the hdmitx.ko is loaded.

Update 7.3.: the situation stays the same after I modified my .config to be, except for the diverse modules I additionally selected, identical to the kernel /proc/config.gz found on Uruk 0.7. There seem to be several things missing that are in Uruk 0.7, i.e. the interactive CPU governor, and filesystem caches.

I also compared the loaded modules after boot, and apart from module size, it is the same list with Uruk 0.7 and my kernel.

Trying again to use my kernel, I also noticed that the tablet freezes as soon as I try to start WLAN. Still pings (on the g_ether USB connection I use), but the GUI is frozen and ssh connections, too.

It seems to me that the gen8_froyo_gpl source released by Archos is somewhat lacking...

Where can I find the Uruk 0.7 kernel tree, or some other kernel that is Known Good?
 
$aur0n
Old
#2  
$aur0n's Avatar
Senior Member
Thanks Meter 495
Posts: 1,453
Join Date: Nov 2010

 
DONATE TO ME
Latest kernel source you can find here:

http://sauron.pourix.com/UrukDroid/

conntrack/nat brakes compatibility with tiwlan kernel driver - witch is not part of kernel (but can be recompiled).
Anyway - entire wifi stock is a mess .. sadly
The Following User Says Thank You to $aur0n For This Useful Post: [ Click to Expand ]
 
brian_o'fish
Old
(Last edited by brian_o'fish; 22nd March 2011 at 11:22 AM.)
#3  
Member - OP
Thanks Meter 42
Posts: 81
Join Date: Mar 2011
Location: Dormagen
Quote:
Originally Posted by $aur0n View Post
Latest kernel source you can find here:
http sauron.pourix.com /UrukDroid/
Thanks! What is the build system are you using?

I'm not exactly confident that the one I built from the Archos GPL package, is good.

But it seems to work! I successfully compiled your kernel, with your .config, and run that now. Wifi is working so far, my g_ether usb network connection works, too, and no funny hdmi messages are showing.

Now I'm going to build in some of the stuff I wanted of the networking stuff, and see what breaks wifi exactly. I would _love_ to have conntrack / NAT available.

Update built again with various networking stuff enabled, advanced routing and namespaces among them, but consciously NOT with conntracking. Guess what - tiwlan_drv.ko does not load! When triggered through the UI that results in an apparent complete hang, but when trying insmod from a shell it is benign. All in all that's good - the wlan problems probably don't have anything to do with conntracking, and I have a half way easy test case to start "bisecting" which build option makes it fail. Now if I only had more time today...

Anyway, thanks again Sauron for providing such a good basis for playing!
 
brian_o'fish
Old
#4  
Member - OP
Thanks Meter 42
Posts: 81
Join Date: Mar 2011
Location: Dormagen
Quote:
Originally Posted by $aur0n View Post
conntrack/nat brakes compatibility with tiwlan kernel driver - witch is not part of kernel (but can be recompiled).
After some compile / flash / test cycles I'm pretty convinced that anything which changes the layout / size of struct net_device or struct sk_buff, breaks that binary tiwlan_drv.ko thing - which is probably to be expected...

Some googling around, did not find me any source code to that tiwlan_drv.ko, only loads of people copying it around between various systems in binary form (argh...)

Do you have source for that module available, so I could try and recompile it when the struct layout changes?

Here's a list of config defines that should probably be left alone, gleaned from looking at the struct definitions:

Code:
options that change sk_buff:

CONFIG_XFRM=y
CONFIG_NF_CONNTRACK=n
CONFIG_BRIDGE_NETFILTER=n (switches on when enabling bridge driver,
                           but can be switched off separately - bridge
                           itself builds and module loads)
CONFIG_NET_SCHED=n (so no tc / traffic shaping / queueing)
CONFIG_NET_CLS_ACT=n
CONFIG_IPV6_NDISC_NODETYPE=n?
CONFIG_MAC80211=n
CONFIG_NET_DMA=n?
CONFIG_NETWORK_SECMARK=n

options that change net_device:

CONFIG_WIRELESS_EXT=y
CONFIG_NET_DSA=n
CONFIG_NETPOLL=n (switched on / needed by netconsole... sigh)
CONFIG_NET_NS=n (would love to have that, lxc could work well then...)
CONFIG_DCB=n
CONFIG_COMPAT_NET_DEV_OPS=y
 
$aur0n
Old
#5  
$aur0n's Avatar
Senior Member
Thanks Meter 495
Posts: 1,453
Join Date: Nov 2010

 
DONATE TO ME
You can try with this source
http://processors.wiki.ti.com/index....beta_3_release

I haven't checked it - so I cant guarantee it will work. But If you could make it work - this would give us NAT on Uruk - so....
 
brian_o'fish
Old
#6  
Member - OP
Thanks Meter 42
Posts: 81
Join Date: Mar 2011
Location: Dormagen
Quote:
Originally Posted by $aur0n View Post
I haven't checked it - so I cant guarantee it will work. But If you could make it work - this would give us NAT on Uruk - so....
Thank you! I looked into the stuff a bit, it is certainly the right code set. It's a pretty huge pack overall, packing a kernel and userlevel stuff, even a copy of the iptables source , but I already located the driver itself...

I'll see that I extract the driver only parts into your kernel tree, somewhere under staging, and get it to build and maybe even work from there.

Will need some time to do that, and I'm rather busy with other work this week - next week maybe.
 
brian_o'fish
Old
(Last edited by brian_o'fish; 23rd March 2011 at 08:27 AM.)
#7  
Member - OP
Thanks Meter 42
Posts: 81
Join Date: Mar 2011
Location: Dormagen
Unhappy tiwlan_drv rebuild - no success so far

Hi $auron,

was able to take some time yesterday and today to work on the tiwlan_drv source code you pointed out. Unfortunately I did not get it to run.

I successfully built a module, inside your kernel tree, by incrementally dumping .c and .h files from the TI code drop into a subdir of drivers/staging/ and finding out which -DEFINES it needs to build, and some small code mangling was also neccessary.

However, the resulting module fails to properly load, first with some GPIO allocation message which I could get around (not present in the .ko file from Archos), and then in a request_irq call during initialization. Looking at that second failure point I notice that the more hardware / board oriented parts of the code look not at all like what objdump can tell me about the Archos binary...

Given my nonexistent ARM assembler skills, I cannot go forward at that point with ease, so I'm trying to chicken out by asking some Archos people for the source... No idea whether that will work...

UPDATE: no reply from Archos so far...

I try to sidestep the issue by moving the problematic elements of skbuff and net_device from the middle of the struct, to the end.
 
Golomidov
Old
#8  
Member
Thanks Meter 2
Posts: 46
Join Date: Jul 2007
Hi!
I see that the topic is quite old - but anyway: are there any news? I am trying to build gen8 kernel with conntrack/nat support but with no luck - the kernel doesn't load, it reboots the device.
Did anybody find the way to compile with that options?
 
$aur0n
Old
#9  
$aur0n's Avatar
Senior Member
Thanks Meter 495
Posts: 1,453
Join Date: Nov 2010

 
DONATE TO ME
Quote:
Originally Posted by Golomidov View Post
Hi!
I see that the topic is quite old - but anyway: are there any news? I am trying to build gen8 kernel with conntrack/nat support but with no luck - the kernel doesn't load, it reboots the device.
Did anybody find the way to compile with that options?
In Uruk 1.6 kernel has compiled in conntrack/nat.
 
Golomidov
Old
(Last edited by Golomidov; 10th October 2012 at 09:01 AM.)
#10  
Member
Thanks Meter 2
Posts: 46
Join Date: Jul 2007
Quote:
Originally Posted by $aur0n View Post
In Uruk 1.6 kernel has compiled in conntrack/nat.
Yes, but there are other options that are missing in your kernel - targets owner and multiport - and because of that orbot transparent proxy doesn't work
Could you please tell how did you achieve that? I mean how did you compile UD kernel with conntrack/nat support?
(btw, I have changed init and installation scripts in UD for it to work with latest archos devices - a35dm for exmple)

EDIT: did you take/recompile tiwlan_drv.ko? would standard kernel work if I just copy tiwlan_drv.ko from UD?

---------- Post added at 03:06 PM ---------- Previous post was at 02:48 PM ----------

Quote:
Originally Posted by Golomidov View Post
EDIT: did you take/recompile tiwlan_drv.ko? would standard kernel work if I just copy tiwlan_drv.ko from UD?
Nope, it didn't work

 
Post Reply+
Tags
archos, development, gen8, hdmitx, kernel
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Go to top of page...

XDA PORTAL POSTS

Windows-Based Multi-Tool for the Sony Xperia U

If you are a flashaholic and an owner of the Sony Xperia U, you may be interested in the … more

XDA University: Crafting Recovery-Flashable Packages

Those of us who use Linux on a day to day basis don’t think twice about sinking … more

Side-Swiping Multitasking with Kakudo

Recovering iPad users may still remember the multitasking function where you can swipe left or right to … more