Posted by eoseontaek

Downloading a kernel source for Nexus 10


# git clone https://android.googlesource.com/kernel/exynos.git


# cd exynos


# git checkout android-exynos-manta-3.4-jb-mr1-fr



Ensure that the prebuilt toolchain is in your path


# export PATH=~/aosp_android-4.2.1_r1.2/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6/bin:$PATH



Building a manta kernel


we would build the manta kernel using the following commands:


# export ARCH=arm
# export SUBARCH=arm
# export CROSS_COMPILE=arm-eabi-

# make manta_defconfig
# make



The kernel for mantaray is device/samsung/manta/kernel


The image is output as arch/arm/boot/zImage. You may copy it as device/samsung/manta/kernel.



Creating a boot.img


Copy a image to ~/aosp_android-4.2.1_r1.2/out/target/product/manta directory.


# cp zImage ~/aosp_android-4.2.1_r1.2/out/target/product/manta/


Ensure that the mkbootimg binary is in your path


# export PATH=~/aosp_android-4.2.1_r1.2/out/host/linux-x86/bin:$PATH



Move to ~/aosp_android-4.2.1_r1.2/out/target/product/manta/ directory.


# cd ~/aosp_android-4.2.1_r1.2/out/target/product/manta/



Create a boot.img


# mkbootimg --kernel zImage --ramdisk ramdisk.img -o new-boot.img



Flashing a device


Once the device is in fastboot mode, run


# fastboot boot new-boot.img


Posted by eoseontaek

Build environment


+ Operating system -- Tested on Ubuntu 12.04 and 12.10 (64bit)

+ Terminal

+ Decent hardware (minimum of at least a dual core CPU and 4 GB of RAM)

+ Optimally have an SSD (standard mechanical drives work as well but slow down the process drastically)

+ Must have required packages for building installed, I will list them further down


Installing JDK


The Sun JDK is no longer in Ubuntu's main package repository. In order to download it, you need to add the appropriate repository and indicate to the system which JDK should be used.

Java 6: for Gingerbread and newer


# sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu hardy main multiverse"

# sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu hardy-updates main multiverse"

# sudo apt-get update

# sudo apt-get install sun-java6-jdk


Required packages


# sudo apt-get install git gnupg flex bison gperf build-essential \
 zip curl libc6-dev libncurses5-dev:i386 x11proto-core-dev \
 libx11-dev:i386 libreadline6-dev:i386 libgl1-mesa-glx:i386 \
 libgl1-mesa-dev g++-multilib mingw32 tofrodos \
 python-markdown libxml2-utils xsltproc zlib1g-dev:i386


# sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so



Getting the source


+ Make directory for repo binary

# mkdir ~/bin


+ Add directory for repo binary to your path

# PATH=~/bin:$PATH


+ Download repo binary and place it in the proper directory

# curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo


+ Give the repo binary the proper permissions

# chmod a+x ~/bin/repo


+ Create directory for where the AOSP repo will be stored and synced

# mkdir ~/aosp_android-4.2.1_r1.2


+ Move to our new AOSP directory

# cd ~/aosp_android-4.2.1_r1.2


+ Initialize the AOSP repo and download the manifest

# repo init -u https://android.googlesource.com/platform/manifest -b android-4.2.1_r1.2



+ Sync AOSP source

# repo sync


Getting the binaries

+ Obtaining proprietary binaries

Download a binary hardware support files for Nexus 10 that are available for users of the Android Open-Source Project.


Nexus 10 binaries for Android 4.2/4.2.1 (JOP40C and JOP40D)


# cd  ~/aosp_android-4.2.1_r1.2


1. Audio Processor

# wget https://dl.google.com/dl/android/aosp/audience-manta-jop40c-b1458d4b.tgz


2. Wi-Fi, Bluetooth, NFC

# wget https://dl.google.com/dl/android/aosp/broadcom-manta-jop40c-17f2edc4.tgz


3. Graphics

# wget https://dl.google.com/dl/android/aosp/samsung-manta-jop40c-a3d68928.tgz


+ Extracting the proprietary binaries


Each set of binaries comes as a self-extracting script in a compressed archive. After uncompressing each archive, run the included self-extracting script from the root of the source tree, confirm that you agree to the terms of the enclosed license agreement, and the binaries and their matching makefiles will get installed in the vendor/ hierarchy of the source tree.


# tar -xvzf audience-manta-jop40c-b1458d4b.tgz

# tar -xvzf broadcom-manta-jop40c-17f2edc4.tgz

# tar -xvzf samsung-manta-jop40c-a3d68928.tgz


# ./extract-audience-manta.sh

# ./extract-broadcom-manta.sh

# ./extract-samsung-manta.sh



Start the build


# . build/envsetup.sh


#  lunch full_manta-userdebug


If you have patience and have no build errors, you'll end up with a flashable binaries in ~/aosp_android-4.2.1_r1.2/out/target/product/manta


Flashing a device


Set the device in fastboot mode if necessary.


An entire Android system can be flashed in a single command: this writes the boot, recovery and system partitions together after verifying that the system being flashed is compatible with the installed bootloader and radio, and reboots the system. This also erases all the user data.



# cd ~/aosp_android-4.2.1_r1.2/out/target/product/manta


# fastboot -w flashall


Posted by eoseontaek

Build Error : 

target Java: core (out/target/common/obj/JAVA_LIBRARIES/core_intermediates/classes)

host Java: dx (out/host/common/obj/JAVA_LIBRARIES/dx_intermediates/classes)

/bin/bash: jar: command not found

make: *** [out/host/common/obj/JAVA_LIBRARIES/jsr305lib_intermediates/javalib.jar] Error 127

make: *** Waiting for unfinished jobs....

Note: Some input files use unchecked or unsafe operations.

Note: Recompile with -Xlint:unchecked for details.

/bin/bash: jar: command not found

make: *** [out/host/common/obj/JAVA_LIBRARIES/antlr-runtime_intermediates/javalib.jar] Error 127

Note: Some input files use unchecked or unsafe operations.

Note: Recompile with -Xlint:unchecked for details.

/bin/bash: jar: command not found

make: *** [out/host/common/obj/JAVA_LIBRARIES/dx_intermediates/javalib.jar] Error 127

Note: Some input files use or override a deprecated API.

Note: Recompile with -Xlint:deprecation for details.

Note: Some input files use unchecked or unsafe operations.

Note: Recompile with -Xlint:unchecked for details.

/bin/bash: jar: command not found

make: *** [out/target/common/obj/JAVA_LIBRARIES/core_intermediates/classes-full-debug.jar] Error 127


Fixed : 
build system에서 "jar" command를 찾을 수 없어서 발생 
# which jar

# sudo update-alternatives --install /usr/bin/jar jar /usr/lib/jvm/jdk1.6.0_34/bin/jar 1
# which jar
/usr/bin/jar





Posted by eoseontaek
이전버튼 1 이전버튼