How to customize the kernel?

440 views
Skip to first unread message

Chih-Wei

unread,
Apr 23, 2009, 9:58:59 PM4/23/09
to Android Linux Kernel Development
Hi,
I just realized the 'make' command in the android tree doesn't rebuild
the kernel binary from source.
Instead, it just uses the prebuilt image from the prebuilt/ directory.
So if I want to use a customized kernel, I have to compile the image
in the kernel/ directory,
and copy the generated kernel image to the prebuilt/ directory myself.
Am I right?
However, I still don't know how to add a customized module.
Is there any guide for it?
Thanks!

adam

unread,
May 1, 2009, 6:06:00 PM5/1/09
to Android Linux Kernel Development
Chih,

In AndroidBoard.mk there is a variable that will point to where the
built kernel would be located, example from eee_701,


ifeq ($(TARGET_PREBUILT_KERNEL),)
TARGET_PREBUILT_KERNEL := $(LOCAL_PATH)/kernel
endif

you could put another environment variable check here, and if that
variable exists, such as: TARGET_KERNEL_REBUILD=true
you could call the shell to run make in the linux kernel source tree.
After that you would want to update the TARGET_PREBUILT_KERNEL, and
let everything go along its way. That should be the cheap and easy
solution, I have not done this my self, I am new to the android source
so any other suggestions are more then welcome. This is a question I
was asking my self, currently I just build the linux source from
running make inside of the source try by hand.

Kind Regards

Neo

unread,
Jun 2, 2009, 5:43:20 AM6/2/09
to Android Linux Kernel Development
Does it mean that the pre-built image is not built of current linux
kernel?
Also I don't see the goldfish_defconfig anymore in the configs dir.
Reply all
Reply to author
Forward
0 new messages