rebuild kernel by changing config file

2,329 views
Skip to first unread message

thongtom

unread,
Jun 22, 2011, 5:40:59 AM6/22/11
to Android-x86
Hi,
I am new to build kernel. I had problem with the default android-x86
iso, where it can't detect my hard drive, keep on "detecting
android"..................................
I try to modify and rebuild the kernel following the instruction in
http://www.android-x86.org/documents/customizekernel.
I added one line of CONFIG_ into the ~/android-x86/kernel/arch/x86/
configs/android-x86_deconfig and do a "make kernel
TARGET_PRODUCT=generic_x86"
The build is successfull and I get the kernel file in out/target/
product/generic_x86/kernel. but when I check the kernel config file
in /out/Target/product/generic_x86/obj/.config, it is not the file I
changed. the config file I changes is always named as .config.old
When I do a extract_ikconfig on the generated kernel file to extract
the config file, it does not contain my changes.
Can someone help clarify this ? did I do something wrong ?

Thanks

Douglas Santillan

unread,
Jun 22, 2011, 3:57:24 PM6/22/11
to andro...@googlegroups.com
Use target device instead

say you use eeepc as target device, so, modify 
/android-x86/device/asus/eepc/eeepc_defconfig

if you use another device, navigate that /android-x86/device part of the tree


--
You received this message because you are subscribed to the Google Groups "Android-x86" group.
To post to this group, send email to andro...@googlegroups.com.
To unsubscribe from this group, send email to android-x86...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/android-x86?hl=en.


fuzzy7k

unread,
Jun 24, 2011, 12:52:36 PM6/24/11
to Android-x86
It sounds like your changes are not correct, thus when the build
process runs make oldnoconfig it throws out your changes and saves the
original in .config.old. What is the line your are trying to add?
There should already be a line for it in the file. Just search for it
and you should find # CONFIG_* is not set. Just change to CONFIG_*=y.

On Jun 22, 5:40 am, thongtom <tkth...@gmail.com> wrote:
> Hi,
>   I am new to build kernel. I had problem with the default android-x86
> iso, where it can't detect my hard drive, keep on "detecting
> android"..................................
>   I try to modify and rebuild the kernel following the instruction inhttp://www.android-x86.org/documents/customizekernel.

Arobase40

unread,
Jun 24, 2011, 9:12:44 PM6/24/11
to Android-x86
If you modify the ~/android-x86/kernel/arch/x86/configs/android-
x86_deconfig, this is just to add some settings which were not use as
default.
But never do a "make kernel" ! This is useless.

Then the generic-x86 build use his own defconfig file as every targets
do !

So if you want to use your changes, you have to apply the changes
again into the target defconfig file, then create the build the normal
way :

make -jx iso_img TARGET_PRODUCT=your-target

where x is the number of CPU cores you want to allocate for the
building process depending of your host machine.
If you allocate the max of CPU cores, this will be faster, but
unlikely you won't be able to use your laptop or desktop for anything
else, unless your host linux have kernel equal or above 2.6.38...

make iso_img TARGET_PRODUCT=your-target, will work just as fine but
the building process will take much longer.

On 22 juin, 11:40, thongtom <tkth...@gmail.com> wrote:
> Hi,
>   I am new to build kernel. I had problem with the default android-x86
> iso, where it can't detect my hard drive, keep on "detecting
> android"..................................
>   I try to modify and rebuild the kernel following the instruction inhttp://www.android-x86.org/documents/customizekernel.

StefanS

unread,
Jun 27, 2011, 7:43:52 AM6/27/11
to andro...@googlegroups.com
Since this information was missing from the article you've seen, I have added the correct way of generating a modified kernel configuration file to http://android-x86.org/documents/customizekernel

At least then you can make sure that you have a correct kernel config file.

Stefan

thongtom

unread,
Jul 1, 2011, 4:25:28 AM7/1/11
to Android-x86

Thank you very much for all the answers, I manage to get the kernel
rebuild.
Now I am using my old linux kernel's config to build a new kernel,
which solved the detect harddisk problem, the rebuild new kernel can
detect hda1, but the keyboard stop working and android can't start
(kernel panic)

I try to merge my old linux kernel config with generic_x86 config
(which really takes me whole week with 4 i7 core to build) but the
result is not good. Either build fail or the hard drive not detected.

Is there some mandatory config that is required for Android to run ?

Aside to StefanS, I saw the section you added in the customizekernel,
but the make ARCH=i386 menuconfig does not work in my development
environment - "No rule to make target 'menuconfig' " and can you
explain a bit what it does ? Is it like the linux menuconfig where
user can select some group config via GUI ?

Thanks


On Jun 27, 7:43 pm, StefanS <andr...@stefanseidel.info> wrote:
> Since this information was missing from the article you've seen, I have
> added the correct way of generating a modified kernel configuration file tohttp://android-x86.org/documents/customizekernel

fuzzy7k

unread,
Jul 1, 2011, 9:29:14 AM7/1/11
to Android-x86
> Is there some mandatory config that is required for Android to run ?

Yes, there is. I would find out what drivers you need and add them to
the android config.

> Aside to StefanS, I saw the section you added in the customizekernel,
> but the make ARCH=i386 menuconfig does not work in my development
> environment - "No rule to make target 'menuconfig' " and can you
> explain a bit what it does ? Is it like the linux menuconfig where
> user can select some group config via GUI ?

You must cd kernel. It's not like it, it is it.
Reply all
Reply to author
Forward
0 new messages