b2gdev / Android-JB-4.1.2

A modified Android Jelly Bean 4.1.2 source tree (x-loader, u-boot, Kernel and Filesystem) for the b2g
2 stars 9 forks source link

1) Setting up build environment

1.1) Dependancies

from: http://processors.wiki.ti.com/index.php/TI-Android-JB-4.1.2-DevKit-4.0.0_DeveloperGuide

For 64-bit Ubuntu 10.04 The following command installs the required packages for setting up the android build host: $ sudo apt-get install git-core gnupg flex bison gperf build-essential \ zip curl zlib1g-dev libc6-dev lib32ncurses5-dev ia32-libs \ x11proto-core-dev libx11-dev lib32readline5-dev lib32z-dev \ libgl1-mesa-dev g++-multilib mingw32 tofrodos python-markdown \ libxml2-utils xsltproc minicom tftpd uboot-mkimage expect

For 64-bit Ubuntu 12.04 The following command installs the required packages for setting up the android build host: $ sudo apt-get install git-core 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 openjdk-6-jdk tofrodos \ python-markdown libxml2-utils xsltproc zlib1g-dev:i386 \ minicom tftpd uboot-mkimage expect $ sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so

For 64-bit Ubuntu 14.04 The following command installs the required packages for setting up the android build host: $ sudo apt-get install git-core 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 openjdk-6-jdk tofrodos \ python-markdown libxml2-utils xsltproc zlib1g-dev:i386 \ minicom tftpd expect libswitch-perl u-boot-tools $ sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so

The JDK version 1.6.0_23 is required : https://drive.google.com/file/d/0B-vV81AxHSyfU1RESlZ2MFlveDg/view?usp=sharing

1.2) Toolchain setup

Setup the toolchain path to point to arm-eabi- tools in prebuilts/gcc/linux-x86/arm/arm-eabi-4.6/bin and to the bin/ directory in the JDK. e.g. $ export PATH=$HOME/jdk1.6.0_23/bin:$HOME/rowboat-android/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6/bin:$PATH

2) Building

2.1) Building X-Loader

make -C x-loader/ CROSS_COMPILE=arm-eabi- distclean make -C x-loader/ CROSS_COMPILE=arm-eabi- omap3530beagle_config make -C x-loader/ CROSS_COMPILE=arm-eabi- cd x-loader/ ./signGP ./x-load.bin mv x-load.bin.ift MLO cd .. cp ./x-loader/MLO ./image_folder/NandFS/

2.2) Building U-boot

make -C u-boot/ CROSS_COMPILE=arm-eabi- distclean make -C u-boot/ CROSS_COMPILE=arm-eabi- omap3_beagle_config make -C u-boot/ CROSS_COMPILE=arm-eabi- cp ./u-boot/u-boot.bin ./image_folder/NandFS/

2.3) Building Kernels and File System

2.3.1)

Run this once after cloning

make update-api TARGET_PRODUCT=beagleboard OMAPES=5.x -j8

2.3.1)-A Build Kernel and User Filesystem

make -C kernel/ ARCH=arm CROSS_COMPILE=arm-eabi- omap3_tcbin_android_normal_defconfig make TARGET_PRODUCT=beagleboard TARGET_BUILD_VARIANT=user OMAPES=5.x -j8 make -C kernel/ ARCH=arm CROSS_COMPILE=arm-eabi- modules make -C kernel/ ARCH=arm CROSS_COMPILE=arm-eabi- uImage -j8 cp -v kernel/arch/arm/boot/uImage image_folder/NandFS/norm_uImage cd ./tcbin_misc/build_scripts ./user_nandfs_build.sh cd ../../

2.3.1)-B Build Kernel and Engineering Filesystem

make -C kernel/ ARCH=arm CROSS_COMPILE=arm-eabi- omap3_tcbin_android_normal_defconfig make TARGET_PRODUCT=beagleboard OMAPES=5.x -j8 make -C kernel/ ARCH=arm CROSS_COMPILE=arm-eabi- modules make -C kernel/ ARCH=arm CROSS_COMPILE=arm-eabi- uImage -j8 cp -v kernel/arch/arm/boot/uImage image_folder/NandFS/norm_uImage cd ./tcbin_misc/build_scripts ./debug_nandfs_build.sh cd ../../

2.3.2) Build Recovery Kernel

This must be run after a complete Kernel + Filesystem build (engineering or user)

cd ./tcbin_misc/build_scripts ./backupfs_build.sh cd ../../ make -C kernel/ ARCH=arm CROSS_COMPILE=arm-eabi- omap3_tcbin_android_backup_defconfig make -C kernel/ ARCH=arm CROSS_COMPILE=arm-eabi- uImage -j8 cp kernel/arch/arm/boot/uImage image_folder/NandFS/bk_uImage

2.4) Syscheck build instructions https://github.com/b2gdev/Android-JB-4.1.2/wiki/How-to-build-syscheck

3) Deployment

3.1) Refer the follwoing wiki link for instructions on how to deploy to NAND https://github.com/b2gdev/Android-JB-4.1.2/wiki/How-to-flash-a-new-device