May 24, 2013

IcedTea-bin, Gentoo & Android Building

I faced a suffer couple days ago, 500 GB Hard disk on Lenovo IdeaCentre B320 All in-One Desktop PC getting almost full within 12 months usage. There are options, moving up some file to a back up storage of replacing by New Hard Disk ... which is suffering, since I need to resetting a lot of things, due to this loved PC I used for learning android building, B2G building, tweaking, little programming. Well a friend told me he has a 2 TB hard disk and he did not used, he is a film editor, working for a TV company. Okay ... I decided to replace e new hard disk ... 2 TB is interesting


On previous hard disk, a gentoo amd64 multilib well set up, juiced by stable gnome 2.32 desktop environment. I have NO enough time to set a gentoo on new hard disk, thus I decided to pick up lovely ubuntu 12.04 x86_64, fashioned by unity desktop environment. I don't like UNITY, thus give Cinnamon in option. During the installation, which is pretty quick and straight forward with "Just Work"...TM, oh No .... an 00:19.0 Ethernet controller: Intel Corporation 82579V Gigabit, give me hazle. Internet Connection randomly dropped ... very anoying. Updated the kernel from 3.2.0.23 to 3.2.0.45, the problem persist. I don't wish to compile own kernel at ubuntu :-)). With help of wifi connection (Atheros AR9285), I decided to download sysrescue CD 3.6.0 due to my old Sysrescue 1.5.2 also did not pick up Intel 82579V ethernet. After copying distfiles and some /etc/portage/configuration into New Hard Disk live in the IdeaCentre B320 ... I said "welcome back gentoo". Well this Desktop PC mostly for learning a little Android Developing and I rather boring with two standard panel of Gnome 2, but Gnome:3 is marked as UNSTABLE on gentoo portage and I decided to poke Xfce4 on this i3 dual core Intel processor with 2 x 8 GB RAM. Believed, this desktop can easily pick up KDE4 or Gnome:3. I wish NOT to give RAM space to Desktop Juice.
After safely moving needed repo, gitconfig, gpg, /home/user/bin file from old Hard disk, along with AOKP JB 4.2.2 Source Tree at 27 GB size, now have to start test. Gentoo is IMHO, the most FIT distro for developing, with selected profile "default/linux/amd64/13.0/desktop", almost all required packages for android development are well compiled, for sure unless 32 libs, just merge emul-linux-x86-baselibs and the Hero Package " JDK " . As you are aware, Google recommended sun-JDK for Android building, but LibreOffice use open-JDK or well known as IcedTea. At very personal reason, I don't want have TWO package installed, if I were can have ONLY ONE
Long debate arise on the internet among Android Enthusiast, regarding JDK, I used sun-JDK at previous gentoo box, Now it is good time to test IcedTea (Open JDK) for building an android rom. By default IcedTea-Bin package on gentoo dropped at /opt folder (as well as sun-jdk), with easy java-config -s command, gentoo user can easily set JVM to be used. Since I have only one JVM, thus automatically system picked IcedTea as JVM, look like I need to set USER to use this IcedTea JVM with java-config command. but Android still CAN NOT SEE. Finally I need to edit .bashrc file on /home/user/ add export PATH=/opt/icedtea-bin-6.1.12.4/bin:$PATH, exit terminal and re-open terminal. Give android build a try ..... : work flawlessly by commanding make clean :-)) Now test with real build
19:36:42 [/droid/aokp_jb]
x1123@gentoo >> . build/envsetup.sh
including device/dell/venue/vendorsetup.sh
including device/generic/armv7-a-neon/vendorsetup.sh
including device/generic/armv7-a/vendorsetup.sh
including device/generic/mips/vendorsetup.sh
including device/generic/x86/vendorsetup.sh
including device/samsung/jfltetmo/vendorsetup.sh
including device/samsung/maguro/vendorsetup.sh
including device/sony/hayabusa/vendorsetup.sh
including device/sony/mint/vendorsetup.sh
including device/sony/odin/vendorsetup.sh
including device/sony/tsubasa/vendorsetup.sh
including device/sony/yuga/vendorsetup.sh
including vendor/aokp/vendorsetup.sh
including sdk/bash_completion/adb.bash
19:36:55 [/droid/aokp_jb]

You're building on Linux

Lunch menu... pick a combo:
1. full-eng
2. full_x86-eng
3. vbox_x86-eng
4. full_mips-eng
5. full_venue-userdebug
6. mini_armv7a_neon-userdebug
7. mini_armv7a-userdebug
8. mini_mips-userdebug
9. mini_x86-userdebug
10. cm_jfltetmo-eng
11. full_maguro-userdebug
12. cm_hayabusa-eng
13. cm_mint-eng
14. cm_odin-eng
15. cm_tsubasa-eng
16. cm_yuga-eng
17. aokp_mako-userdebug
18. aokp_maguro-userdebug
19. aokp_toro-userdebug
20. aokp_toroplus-userdebug
21. aokp_grouper-userdebug
22. aokp_tilapia-userdebug
23. aokp_manta-userdebug
24. aokp_d2att-userdebug
25. aokp_d2tmo-userdebug
26. aokp_d2usc-userdebug
27. aokp_d2vzw-userdebug
28. aokp_evita-userdebug
29. aokp_hayabusa-userdebug
30. aokp_hercules-userdebug
31. aokp_i605-userdebug
32. aokp_i9100-userdebug
33. aokp_i9100g-userdebug
34. aokp_i9300-userdebug
35. aokp_jfltetmo-userdebug
36. aokp_l900-userdebug
37. aokp_m7-userdebug
38. aokp_maserati-userdebug
39. aokp_mint-userdebug
40. aokp_odin-userdebug
41. aokp_p930-userdebug
42. aokp_solana-userdebug
43. aokp_spyder-userdebug
44. aokp_su640-userdebug
45. aokp_t0lte-userdebug
46. aokp_t0lteatt-userdebug
47. aokp_t0ltetmo-userdebug
48. aokp_targa-userdebug
49. aokp_tsubasa-userdebug
50. aokp_umtsspyder-userdebug
51. aokp_vibrantmtd-userdebug
52. aokp_vs920-userdebug
53. aokp_yuga-userdebug

Which would you like? [full-eng] 32

============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=4.2.2
TARGET_PRODUCT=aokp_i9100
TARGET_BUILD_VARIANT=userdebug
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a-neon
HOST_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-3.8.13-gentoo-r3-x86_64-Intel-R-_Core-TM-_i3-2120_CPU_@_3.30GHz-with-gentoo-2.2
HOST_BUILD_TYPE=release
BUILD_ID=JDQ39
OUT_DIR=/droid/aokp_jb/out
============================================
Checking build tools versions...
************************************************************
You are attempting to build with an unsupported version of java.
Your version is: java version "1.6.0_27".
The correct version is: Java SE 1.6.

Please follow the machine setup instructions at
https://source.android.com/source/download.html
************************************************************

BUILDING WORKING FLAWLESSLY .........
I built from AOKP source tree for GT-I9100 device (Samsung Galaxy II International Edition), flashing the built rom to device and booting properly. Thus I can confirm that open-JDK, well known as IcedTea is FIT to build Android ROM without any different with sun-JDK. Sure this is NOOB opinion ... OH Yes ... we see a warning from compiler, but the build went well

Real Multilib Userland on Linux

Read multilib requirement on Android rom building and other stuff. About two years absent from getting rid with android rom. I have time to...