From 21f55a886165fb511e7d480fa2ae7860272ede6c Mon Sep 17 00:00:00 2001 From: David 'Digit' Turner Date: Tue, 4 Oct 2011 20:07:58 +0200 Subject: ANDROID-KERNEL.TXT: Update document This patch renames docs/KERNEL.TXT to docs/ANDROID-KERNEL.TXT and also updates the content with: - the new git repository and branch to use to get the kernel sources (android.git.kernel.org/kernel/qemu.git android-goldfish-2.6.29) - how to rebuild the ARMv7 kernel image (just use the --armv7 flag) Change-Id: I87cbbcbcbdfa2b9b0efaac6d3410a68ad336e5b3 --- docs/ANDROID-KERNEL.TXT | 77 +++++++++++++++++++++++++++++++++++++++++++++++++ docs/KERNEL.TXT | 72 --------------------------------------------- 2 files changed, 77 insertions(+), 72 deletions(-) create mode 100644 docs/ANDROID-KERNEL.TXT delete mode 100644 docs/KERNEL.TXT (limited to 'docs') diff --git a/docs/ANDROID-KERNEL.TXT b/docs/ANDROID-KERNEL.TXT new file mode 100644 index 0000000..d5a1930 --- /dev/null +++ b/docs/ANDROID-KERNEL.TXT @@ -0,0 +1,77 @@ +HOW TO REBUILT THE ANDROID EMULATOR-SPECIFIC KERNEL: +==================================================== + +I. Helper script: +----------------- + +We now provide a helper script to rebuild the kernel, +it is under distrib/rebuild-kernel.sh. + +You need the sources in android.git.kernel.org/kernel/qemu.git, +in branch origin/android-goldfish-2.6.29 + +To rebuild the ARMv5TE kernel: + + cd $KERNEL_SOURCES + /path/to/rebuild-kernel.sh --out=$ANDROID/prebuilt/android-arm/kernel + +To rebuild the ARMv7-A one: + + cd $KERNEL_SOURCES + /path/to/rebuild-kernel.sh --armv7 --out=$ANDROID/prebuilt/android-arm/kernel + +To rebuild the x86 kernel: + + cd $KERNEL_SOURCES + /path/to/rebuild-kernel.sh --arch=x86 --out=$ANDROID/prebuilt/android-x86/kernel + +Note that you will need to have your cross-toolchain in your path. +If this is not the case, the script will complain and give you the +expected name. Use --cross= to specify a different toolchain. + +See rebuild-kernel.sh --help for more options and details. + + +II. Rebuilding from scratch: +---------------------------- + +If you don't or can't use the script, here are manual instructions: + +You need to have the Android toolchain in your path +(i.e. 'arm-eabi-gcc --version' must work) + +then: + +git clone git://android.git.kernel.org/kernel/common.git kernel-common +cd kernel-common +git checkout origin/archive/android-gldfish-2.6.29 + +export CROSS_COMPILE=arm-eabi- +export ARCH=arm +export SUBARCH=arm +make goldfish_defconfig # configure the kernel +make -j2 # build it + +=> this generates a file named arch/arm/boot/zImage + +NOTE: Branch android-goldfish-2.6.27 is obsolete now. Do not use it. + +Now, you can use it with: + + emulator -kernel path/to/your/new/zImage + + +You can build an ARMv7-compatible kernel image by using goldfish_armv7_defconfg +in the above instructions (instead of goldfish_defconfig). Note that you will +need to enable ARMv7 emulation by using the -cpu cortex-a8 option, as in: + + emulator -kernel path/to/your/new/zImage -qemu -cpu cortex-a8 + +As a special convenience, if the name of your kernel image ends in -armv7, then +the emulator binary will automatically enable ARMv7 emulation for you, so doing +the following should be equivalent + + emulator -kernel path/to/your/kernel-armv7 + + +Voila ! diff --git a/docs/KERNEL.TXT b/docs/KERNEL.TXT deleted file mode 100644 index 35d1f1f..0000000 --- a/docs/KERNEL.TXT +++ /dev/null @@ -1,72 +0,0 @@ -HOW TO REBUILT THE ANDROID EMULATOR-SPECIFIC KERNEL: -==================================================== - -I. Helper script: ------------------ - -We now provide a helper script to rebuild the kernel, -it is under distrib/rebuild-kernel.sh. - -You need the sources in android.git.kernel.org/kernel/common.git, -in branch origin/archive/android-gldfish-2.6.29 (note the typo!) - -To rebuild the ARM kernel: - - cd $KERNEL_SOURCES - /path/to/rebuild-kernel.sh --out=$ANDROID/prebuilt/android-arm/kernel - -To rebuild the x86 kernel: - - cd $KERNEL_SOURCES - /path/to/rebuild-kernel.sh --arch=x86 --out=$ANDROID/prebuilt/android-x86/kernel - -Note that you will need to have your cross-toolchain in your path. -If this is not the case, the script will complain and give you the -expected name. Use --cross= to specify a different toolchain. - -See rebuild-kernel.sh --help for more options and details. - - -II. Rebuilding from scratch: ----------------------------- - -If you don't or can't use the script, here are manual instructions: - -You need to have the Android toolchain in your path -(i.e. 'arm-eabi-gcc --version' must work) - -then: - -git clone git://android.git.kernel.org/kernel/common.git kernel-common -cd kernel-common -git checkout origin/archive/android-gldfish-2.6.29 - -export CROSS_COMPILE=arm-eabi- -export ARCH=arm -export SUBARCH=arm -make goldfish_defconfig # configure the kernel -make -j2 # build it - -=> this generates a file named arch/arm/boot/zImage - -NOTE: Branch android-goldfish-2.6.27 is obsolete now. Do not use it. - -Now, you can use it with: - - emulator -kernel path/to/your/new/zImage - - -You can build an ARMv7-compatible kernel image by using goldfish_armv7_defconfg -in the above instructions (instead of goldfish_defconfig). Note that you will -need to enable ARMv7 emulation by using the -cpu cortex-a8 option, as in: - - emulator -kernel path/to/your/new/zImage -qemu -cpu cortex-a8 - -As a special convenience, if the name of your kernel image ends in -armv7, then -the emulator binary will automatically enable ARMv7 emulation for you, so doing -the following should be equivalent - - emulator -kernel path/to/your/kernel-armv7 - - -Voila ! -- cgit v1.1