Rebuilding kernel for emulator-x86

1,318 views
Skip to first unread message

koba

unread,
Jul 11, 2011, 8:16:58 AM7/11/11
to Android Building
Hi,

I tried to build full_x86 at AOSP master branch. It succeed to build
and run emulator-x86. It works fine.
Then I tried to rebuild the x86 goldfish kernel.

I followed the instruction of $ANDROID/prebuilt/android-x86/kernel/
README
And I read $ANDROID/external/qemu/docs/KERNEL.TXT, too.

What I did is below:

$ git clone git://android.git.kernel.org/kernel/common.git kernel-
common
$ cd kernel-common
$ git checkout origin/archive/android-gldfish-2.6.29
$ ../external/qemu/distrib/build-kernel.sh --arch=x86 --out=./out

Auto-config: --config=goldfish
Cannot find arch/x86/mach-goldfish. Please cd to the kernel source
directory.
Aborting.
Auto-config: --cross=i686-android-linux-
Auto-config: --cross=/opt/koba/android-master/prebuilt/linux-x86/
toolchain/i686-android-linux-4.4.3/bin/i686-android-linux-
Auto-config: -j16
HOSTCC scripts/basic/fixdep
scripts/basic/fixdep.c: In function ‘traps’:
scripts/basic/fixdep.c:377: warning: dereferencing type-punned pointer
will break strict-aliasing rules
scripts/basic/fixdep.c:379: warning: dereferencing type-punned pointer
will break strict-aliasing rules
HOSTCC scripts/basic/docproc
HOSTCC scripts/basic/hash
HOSTCC scripts/kconfig/conf.o
scripts/kconfig/conf.c: In function ‘conf_askvalue’:
scripts/kconfig/conf.c:105: warning: ignoring return value of ‘fgets’,
declared with attribute warn_unused_result
scripts/kconfig/conf.c: In function ‘conf_choice’:
scripts/kconfig/conf.c:307: warning: ignoring return value of ‘fgets’,
declared with attribute warn_unused_result
HOSTCC scripts/kconfig/kxgettext.o
SHIPPED scripts/kconfig/zconf.tab.c
SHIPPED scripts/kconfig/lex.zconf.c
SHIPPED scripts/kconfig/zconf.hash.c
HOSTCC scripts/kconfig/zconf.tab.o
HOSTLD scripts/kconfig/conf
***
*** Can't find default configuration "arch/x86/configs/
goldfish_defconfig"!
***
make[1]: *** [goldfish_defconfig] Error 1
make: *** [goldfish_defconfig] Error 2
Could not build the kernel. Aborting !

How can I get arch/x86/configs/goldfish_defconfig and files under arch/
x86/mach-goldfish ?

Jun Nakajima

unread,
Jul 12, 2011, 11:49:19 AM7/12/11
to android-...@googlegroups.com
The kernels for the emulator have been moved to kernel/qemu.git.

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

koba

unread,
Jul 12, 2011, 9:47:56 PM7/12/11
to Android Building
Thanks.
It works.

$ git clone git://android.git.kernel.org/kernel/qemu.git kernel-qemu
$ cd kernel-qemu/
$ git branch -r
$ git checkout origin/android-goldfish-2.6.29 -b android-
goldfish-2.6.29
$ mkdir out
$ ../external/qemu/distrib/build-kernel.sh --arch=x86 --out=./out

To run new kernel,

$ cd ..
$ emulator-x86 -kernel kernel-qemu/out/kernel-qemu -show-kernel




Reply all
Reply to author
Forward
0 new messages