Originally Posted by julle131
After doing some research, and asking few questions on #ubuntu-arm, this seems a bit hard project because there are no sources. There is no source for CM10 kernel(Or i can't read the github) nor Ubuntu kernel, so i can't just apply tweaks of them both to archos 3.0.8+ kernel. A way to unpack the zimage from ubuntu kernel and cm10 kernel would help, but atleast the script i tried couldn't unpack the zimage of ubuntu. Lets see what i figure out next.
Not sure what you mean by the CM10 Kernel, I don't think CM have any different settings from what is required by JellyBean itself. Plus the Kernel we originally used for the Archos CM10 is an ICS kernel with IPV6 Mangling adding, we got away with that because the Init.rc used to boot the Rom is a mashed up ICS Version. After thinking about it let me add the bit of knowledge I think I do know.
The kernels on arm platforms, to paraphrase Linus Tovalds was a complete mess, something which Linaro are working hard to fix, and are unique to the SOC vendor.
You need to get the Archos specific sources which are located on GItorious @ git://gitorious.org/archos/archos-gpl-gen9-kernel-ics.git, clone the 3.0.21 branch, in the directory there's a file called linux.config.g9 ( or something similar ). that's the config file. I just copy that to .config, change the settings I need to (if any) compile. That should setup an archos kernel which should run android
git clone git://gitorious.org/archos/archos-gpl-gen9-kernel-ics.git -b linux-icc-3.0.21
cp linux.config.g9 .config
Like I say I was thinking about it and the main difference between a standard kernel and android kernels is the binder, the switch class support and the log driver ( this is things I've noticed when building an android x86 Kernel )
When doing menuconfig the Android Driver settings are found in devices/staging/android, I suppose a place to start is to turn them off then switch on SYSV IPC ( i think that's in genral kernel settings ), from what I understand this is the sysv binder and should create a node at /dev/binder, standard kernel switch class support is set in Device Drivers ( Switch Class Support ).
I'm not sure about logging , It basically breaks down like this. The Android Kernel has a specific logging driver this creates device node at /dev/log/main /dev/log/system etc , Ubunutu ( on x86 at least ) has a single log device node which is created at /dev/log, I don't know weather this is something created by the kernel or something created in userspace by syslogd or something similar. I also don't know whether the Android Logs are compatible with ubuntu, or the android binder for that matter. I'll try and boot my x86 ubuntu with my Android Kernel later on , I suspect It won't work but speculation is one thing, knowing for sure is better
With regards to unpacking the zImage, I'll say this , Not all zImages are created equal , I notice you are using a samsung mobile ( galaxy s, if I'm not mistaken ) , so you're probably using the samsung zImage as a frame of reference... How I understand it Samsung pack the initramfs into the zImage, similar, but not same to the way android AOSP pack a boot.img. Samsung however do this in kernel itself, this is why Samsung zImage a) can be unpacked and b) require different tools than the standard tools used for unpacking boot images which work on just about every other device ( expect Archos of course
) . So you generally don't unpack zImage because It's just a binary blob that contains all the kernel functions, this is in the assembly language of whatever architecture you built your kernel for.
Given all that info you should now be able to build a working archos android kernel ( I assume you using linux etc and your not stupid
) , You now need the Ubuntu side of things..... Have you asked in the Archos G9 Ubuntu Development thread, they may be able to shed light on the changes to the config you need to make or alternativaly you could download the Ubuntu for Arm OMAP Image from https://wiki.ubuntu.com/ARM/OMAP
, unpack/mount it and see if there is the kernel .config file, It is normally packaged somehow with the distro for example x86 lubuntu has .configs in /lib/modules/3.5.0-19-generic/build/.config, the arm distro may have something similar. Then it's a case of see what configuration options are different, You can't just copy the config whole sale however because there are Archos Specific board settings in the Archos Kernel. Failing that the kernel sources will be somewhere as it is a legal requirement under the GPL and Cannonical are compliant, at least I've not read anywhere to the contrary.
This is just really how I understand it at the minute, Some of it could be inaccurate or just plain BS but hopefully should give you something to run with, there is a bit of a barrier to entry on the whole subject kernels/android kernels as the information is in little pieces all over the internet, when I was first getting to grips with it, it did feel like a bit a of treasure hunt for knowledge. Also knowing the Keywords to search for in the first place can be difficult
It sounds quite an interesting challenge, shame about my brick!!
If you want to understand more about the kernel generally ( and lets face it, who doesn't
) then Linux Kernel in a nutshell ( http://www.kroah.com/lkn/
) is a free e-book written by one of the kernel maintainers a should be a useful reference.
JUST IN CASE: Don't forget prefixing a filename with a fullstop (.) makes that file hidden and won't display in normal file listings, using ls -a to display all file in a directory