Howto build Android kernel

Sean McNeil sean at mcneil.com
Tue Dec 9 11:24:07 CET 2008


Andy Green wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Somebody in the thread at some point said:
> | Hi Rui,
> |
> | I carry around a small patch that hacks in the menu button until I can
> | figure out how to gracefully add the capability into Android. There is
> | also some configuration changes that I use to include functionality 
> into
> | the kernel. Android can load kernel modules, but I tend to prefer not
> | using them at this time.
> |
> | Attached you'll find the change and config I use for the Android 
> kernel.
>
> Balaji and Sean, is there something we can do to integrate this patch?
> For example platform callback to implement the action in mach_gta02.c
> and just take on the interrupt mapping and private data?  Would it need
> to have the functionality enabled by /sys or somesuch because it muddles
> up the normal semantics?

I know we want to see everything into the kernel for Android, but I'm 
not sure if this is desired. It would most certainly impact how things 
work on other distros and there should be a way to deal with it inside 
of Android. I just haven't found it yet. If we do want to add it in for 
the time being, then yeah a /sys switch to change the default behavior 
would work. I can writeup a change to add that.  I'm not sure if my 
change is 100% correct, for that matter, as I can't get shutdown if I 
hold the key for 8 seconds or longer.

>
> On the config, the diff between this and the gta02 moredrivers one are
> these:
>
>
> Just changes to built-in from module already (fine):
>
> - -CONFIG_CRC_CCITT=m
> +CONFIG_CRC_CCITT=y
>
> - -CONFIG_CRYPTO_ARC4=m
> +CONFIG_CRYPTO_ARC4=y
>
> - -CONFIG_CRYPTO_ECB=m
> +CONFIG_CRYPTO_ECB=y
> - -CONFIG_CRYPTO_SHA1=m
> +CONFIG_CRYPTO_SHA1=y
> - -CONFIG_TUN=m
> +CONFIG_TUN=y
> - -CONFIG_SLHC=m
> +CONFIG_SLHC=y
> - -CONFIG_PPP_ASYNC=m
> - -CONFIG_PPP_BSDCOMP=m
> - -CONFIG_PPP_DEFLATE=m
> +CONFIG_PPP_ASYNC=y
> +CONFIG_PPP_BSDCOMP=y
> +CONFIG_PPP_DEFLATE=y
> - -CONFIG_PPP=m
> - -CONFIG_PPP_MPPE=m
> +CONFIG_PPP_MPPE=y
> - -CONFIG_PPP_SYNC_TTY=m
> +CONFIG_PPP_SYNC_TTY=y
> +CONFIG_PPP=y

Great. These might change further when I manage to get GPRS working for 
real. Still not quite there yet.

>
> NFS support (fine)
>
> +CONFIG_NETWORK_FILESYSTEMS=y
> +CONFIG_NFS_COMMON=y
> +CONFIG_NFS_FS=y
> +CONFIG_SUNRPC=y
> +CONFIG_LOCKD=y

This is only really needed for testing with a chroot environment. Not 
necessary for typical use.

>
>
> Kill Framebuffer console add logo:
>
> - -CONFIG_FONT_6x11=y
> - -CONFIG_FONTS=y
>
> - -CONFIG_FRAMEBUFFER_CONSOLE=y
>
> +CONFIG_LOGO_OPENMOKO_CLUT224=y
> +CONFIG_LOGO=y
>
>
> New / changed features (fine):
>
> - -CONFIG_NR_TTY_DEVICES=4
> +CONFIG_NR_TTY_DEVICES=6
>
> Prefer existing setting (shouldn't impact)
>
> - -CONFIG_USB_S3C2410_DEBUG=y
> - -CONFIG_LOG_BUF_SHIFT=18
> +CONFIG_LOG_BUF_SHIFT=17
> - -CONFIG_MMC_BLOCK_BOUNCE=y

Yes, agreed.
>
>
> So I can change to all of these except the last ones which I don't think
> matter for Android, and the "kill framebuffer and add logo" stuff...
> what happens if we leave the framebuffer console support in for Android,
> something bad?

With the console support and log messages that come out of both Android 
and the kernel it causes serious visual issues. Constant flipping back 
to the console to display logs and then it usually doesn't repaint 
properly when it goes back.




More information about the openmoko-kernel mailing list