Compiling kernel for android

412 views
Skip to first unread message

Tiago Natel de Moura

unread,
Nov 22, 2010, 7:55:48 PM11/22/10
to vt8500-wm8505...@googlegroups.com
Hi all,

I have a wm8505 netbook 7" running android 1.5.2. This is the image:
http://tails92.sepwich.com/files/easypc/android-ARM-8505-Smartbook.zip
I installed the debian in the same netbook and I see that this kernel
detect my joystick. But the android not ...

Then I compiled the kernel_wm8505 for android using the
"arch/arm/configs/android_wm8505_config" configuration file and for
now I'm trying replace the linux kernel that comes with this android.

I'm trying replace the uzImage.bin by the kernel that was compiled by
me... but does not work.

Is there a way to compile this kernel and load it into android?

Attached is the scriptcmd.

--
Tiago Natel de Moura
http://universemachine.wordpress.com

cmd.android.install

Angus Gratton

unread,
Nov 22, 2010, 8:26:14 PM11/22/10
to vt8500-wm8505...@googlegroups.com
Hi Tiago,

> I have a wm8505 netbook 7" running android 1.5.2. This is the image:
> http://tails92.sepwich.com/files/easypc/android-ARM-8505-Smartbook.zip

I haven't seen this link before. Are you sure you have WM8505 and not
VT8500?

If you have VT8500, everything else in this reply will be of no use to
you.


On Mon, 2010-11-22 at 22:55 -0200, Tiago Natel de Moura wrote:
> Then I compiled the kernel_wm8505 for android using the
> "arch/arm/configs/android_wm8505_config" configuration file and for
> now I'm trying replace the linux kernel that comes with this android.

Are you building WMT's kernel source via
http://github.com/projectgus/kernel_wm8505 ? Or somewhere else?

>
> I'm trying replace the uzImage.bin by the kernel that was compiled by
> me... but does not work.

In what way does it not work?


>
> Is there a way to compile this kernel and load it into android?

I haven't used any of the netbooks with Android, but you can compile a
kernel for the tablets' WM8505 Android 1.6. I think it is the same
Android, the upgrade script looks very similar.

You said 1.5.2, I think maybe that's the WMT SDK ("Android SDK")
revision not the Android version? WMT changed the partition layout
(hard-coded at drivers/mtd/nand/wmt_nand.c !) at some point in the WMT
SDK revisions around 1.7, to add a recovery partition. Which will mean
new kernel + old Android won't install or boot correctly.

Your script has the rootfs at /dev/mtdblock7, and I think the new
partition scheme places rootfs on /dev/mtdblock9.

If I'm right, I guess you have two immediate options:

* Put in the old partition layout values (you can get them from dmesg in
an old kernel), and update the kernel (or add an mtdparts= option on the
kernel command line.) Fairly tricky & annoying.

* Get a more recent Android tablet install, one based on WMT SDK 2.x.
This is almost certainly better, provided it works. WMT SDK 2.x
apparently runs faster than the old versions. I don't know if it works
on netbooks, though...


... there may be a third, even easier, option, though:


For compiling a kernel: on the tablets, the Android distribution has
some binary-only kernel modules so you need to force the kernel
revision. I build with:

make -j8 ubin modules ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- KERNELRELEASE=2.6.29-00236-g4f8dbbb-dirty


... if all you need is a module for your usb joystick, you might be able
to just compile that one module (with KERNELRELEASE= set), then just
copy it to your system and insmod it. Hacky and nasty, but it will work
if all the dependencies are already compiled into the old kernel.

Hth.

- Angus

Tiago Natel de Moura

unread,
Nov 23, 2010, 11:01:46 AM11/23/10
to vt8500-wm8505...@googlegroups.com
Hi angus,

> I haven't seen this link before. Are you sure you have WM8505 and not
> VT8500?

Yes, is a WM8505.

> Are you building WMT's kernel source via
> http://github.com/projectgus/kernel_wm8505 ? Or somewhere else?

yes.

> In what way does it not work?

The kernel don't boot ...

> You said 1.5.2, I think maybe that's the WMT SDK ("Android SDK")
> revision not the Android version? WMT changed the partition layout
> (hard-coded at drivers/mtd/nand/wmt_nand.c !) at some point in the WMT
> SDK revisions around 1.7, to add a recovery partition. Which will mean
> new kernel + old Android won't install or boot correctly.

Maybe... The version of Android that runs on it is a demo version. I
could not install any other version of android in this netbook. Others
don't boot...

> * Put in the old partition layout values (you can get them from dmesg in
> an old kernel), and update the kernel (or add an mtdparts= option on the
> kernel command line.) Fairly tricky & annoying.

What should I put in mtdparts? mtdparts=mtdblock9 ? where I can find
an example of using it?

> ... if all you need is a module for your usb joystick, you might be able
> to just compile that one module (with KERNELRELEASE= set), then just
> copy it to your system and insmod it. Hacky and nasty, but it will work
> if all the dependencies are already compiled into the old kernel.

nice, I'll try that.

Thanks.

Angus Gratton

unread,
Nov 25, 2010, 6:23:16 AM11/25/10
to vt8500-wm8505...@googlegroups.com
On Tue, 2010-11-23 at 14:01 -0200, Tiago Natel de Moura wrote:
> > * Put in the old partition layout values (you can get them from dmesg in
> > an old kernel), and update the kernel (or add an mtdparts= option on the
> > kernel command line.) Fairly tricky & annoying.
>
> What should I put in mtdparts? mtdparts=mtdblock9 ? where I can find
> an example of using it?

On second thoughts I'm not even sure if mtdparts= will work with WMT's
kernel, but if you google it then you can find some info about how to
set it up. It will be very tricky to get right, though, I think.

>
> > ... if all you need is a module for your usb joystick, you might be able
> > to just compile that one module (with KERNELRELEASE= set), then just
> > copy it to your system and insmod it. Hacky and nasty, but it will work
> > if all the dependencies are already compiled into the old kernel.
>
> nice, I'll try that.

This is definitely what I would recommend. Build the modules using a
command line like this:

make modules ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- KERNELRELEASE=2.6.29-00236-g4f8dbbb-dirty

... and hope it works. :)

You'll also need to modify the Android install's /init.rc file so it
inserts the new module(s).

Like I said to you on IRC, if the same kernel runs on Debian and
Android, and the Debian system sees the joystick but the Android system
does not, it's probably not actually a kernel problem. It's possible the
kernel is registering the device just fine, but Android doesn't have the
necessary support to use it.

If you're feeling very brave then you could try my hacky alpha Froyo
build on your netbook. It seems more tolerant to different hardware than
the custom Wondermedia Android version (probably because it makes less
efficient use of the hardware.) Although I don't think it will be any
good for games (the graphics will probably be way too slow.)
http://projectgus.com/2010/11/froyo-android-2-2-alpha-hack-for-eken-m001/

Good luck,

Angus

Tiago Natel de Moura

unread,
Nov 25, 2010, 4:43:37 PM11/25/10
to vt8500-wm8505...@googlegroups.com
Thanks Angus for all your help.

As you warned, the kernel has detected the joystick ... The problem is
that the android does not recognize it as an input method ...

Now I am researching ways to make android see the joystick...

Thanks.

2010/11/25 Angus Gratton <g...@projectgus.com>:

--

Reply all
Reply to author
Forward
0 new messages