Posts Tagged ‘build’

What is Keepalived ?

Keepalived is a routing software written in C. The main goal of this project is to provide simple and robust facilities for loadbalancing and high-availability to Linux system and Linux based infrastructures. Loadbalancing framework relies on well-known and widely used Linux Virtual Server (IPVS) kernel module providing Layer4 loadbalancing. Keepalived implements a set of checkers to dynamically and adaptively maintain and manage loadbalanced server pool according their health. On the other hand high-availability is achieved by VRRP protocol. VRRP is a fundamental brick for router failover.

Visit here for more details : http://www.keepalived.org/


  1. Additional Packages required to build/compile keepalived from sourcesudo apt-get install build-essential libssl-dev keepalived psmisc
  2. Move Installed keepalivedmv /usr/sbin/keepalived /usr/sbin/keepalived.orig
  3. Change keepalived service script:

    vi /etc/init.d/keepalived

    Modify the path: “DAEMON=/usr/sbin/keepalived” to “DAEMON=/usr/local/sbin/keepalived”

  4. Need Additional 1 Virtual IP(VIP) address on top of existing IP

Download Source Code

sudo apt-get install wget

wget wget http://www.keepalived.org/software/keepalived-1.2.13.tar.gz

tar -zxvf keepalived-1.2.13.tar.gz

Build and Install from Source Code

cd keepalived-1.2.13
make install
keepalived -v
Keepalived v1.2.13 (11/30,2016)

Start Keepalived

/etc/init.d/keepalived start


service keepalived start/restart/stop

Error :

Nov 30 15:25:39 node-2 Keepalived[14392]: Starting Keepalived v1.2.13 (11/30,2016)
Nov 30 15:25:39 node-2 Keepalived[14393]: Starting Healthcheck child process, pid=14395
Nov 30 15:25:39 node-2 Keepalived[14393]: Starting VRRP child process, pid=14396
Nov 30 15:25:39 node-2 Keepalived_healthcheckers[14395]: Initializing ipvs 2.6
Nov 30 15:25:39 node-2 Keepalived_vrrp[14396]: Registering Kernel netlink reflector
Nov 30 15:25:39 node-2 Keepalived_vrrp[14396]: Registering Kernel netlink command channel
Nov 30 15:25:39 node-2 Keepalived_vrrp[14396]: Registering gratuitous ARP shared channel
Nov 30 15:25:39 node-2 Keepalived_vrrp[14396]: Opening file ‘/etc/keepalived/keepalived.conf’.
Nov 30 15:25:39 node-2 modprobe: ERROR: ../libkmod/libkmod.c:556 kmod_search_moddep() could not open moddep file ‘/lib/modules/3.19.0-26-generic/modules.dep.bin’
Nov 30 15:25:39 node-2 Keepalived_vrrp[14396]: Configuration is using : 63166 Bytes
Nov 30 15:25:39 node-2 Keepalived_vrrp[14396]: Using LinkWatch kernel netlink reflector…
Nov 30 15:25:39 node-2 Keepalived_vrrp[14396]: VRRP_Instance(V1) Entering BACKUP STATE
Nov 30 15:25:39 node-2 Keepalived_healthcheckers[14395]: IPVS: Can’t initialize ipvs: Protocol not available
Nov 30 15:25:39 node-2 Keepalived[14393]: Healthcheck child process(14395) died: Respawning


sudo modprobe ip_vs

service keepalived restart

Further Details will be updated, stay tuned.




Read Full Post »

What is FitPC2i ?

fit-PC2 is a miniature fanless PC based on Atom CPU. It is extremely small and extremely energy efficient, but still packs the full set of PC features. fit-PC2 is made of an embedded grade motherboard in a die-cast aluminum shell. Here is FitPC2i Spec.

Step0: Install Ubuntu 12.04.5 Linux(32-bit)
Install Ubuntu 12.04-5 Server OS into FitPC2i from here

Step1: AP Mode supported?
Verify your wireless adapter supports Access Point mode. Install “iw” tool to verify the AP mode support. Execute following command to know the same

sudo apt-get -y install iw
iw list | grep -8 “Supported interface modes:”

max scan IEs length: 2257 bytes
Coverage class: 0 (up to 0m)
Supported Ciphers:
* WEP40 (00-0f-ac:1)
* WEP104 (00-0f-ac:5)
* TKIP (00-0f-ac:2)
* CCMP (00-0f-ac:4)
Available Antennas: TX 0 RX 0
Supported interface modes:
* managed
* AP
* monitor
* mesh point
software interface modes (can always be added):

If you are able to see “AP” in the supported modes, then your Wi-Fi interface(wlan0) can act as a Access Point using hostapd.

Step2:Install dependency packages
sudo apt-get install -y libnl-3-dev libssl-dev

Step3: Compiling Hostapd-2.3 from source code
wget http://w1.fi/releases/hostapd-2.3.tar.gz
tar zxvf hostapd-2.3.tar.gz
cd hostapd-2.3/hostapd

#copy the default config file like we used to copy the kernel configuration file before build.
cp defconfig .config

#Add this line to “.config” file CONFIG_LIBNL32=y
.. .. .. CC ../src/drivers/driver_common.c /usr/bin/ld: cannot find -lnl-genl-3 collect2: ld returned 1 exit status make: *** [hostapd] Error 1

sudo ln -s /lib/libnl-genl-3.so.200.3.0 /lib/libnl-genl-3.so
#Re-make again to complete the compilation

#Its Done!, Activate You Own Wi-Fi AP at your Home/Small Office.

Step4: hostapd.conf <– Your AP configurations

#set general/minimum configuration

Step5: Run hostapd along with hostapd.conf
sudo ./hostapd -d hostapd.conf

Step6: Connect from your Android mobile or laptop and check it.

We will discuss further with more AP configuration details soon.

Read Full Post »

வணக்கம், உங்களுடைய ஆண்ட்ராய்டு கைப்பேசி அல்லது கணினியில் பயர்பாக்ஸ் உலாவியை தமிழில் எப்படி நிறுவிப் பயன்படுத்துவது


சோதிக்கப்பட்ட கருவி – Samsung – Galaxy Nexus – Android OS – பதிப்பு 4.3


உங்களுடைய கைப்பேசியை யூஎஸ்பி(USB-Debugging) கம்பியின் மூலம் கணினியுடன் இணைக்கவும்.

பிறகு கைப்பேசியின் அமைவுகளில் அதாவது settings ல் (USB Debugging Enable) வழுநீக்க முறைமை செயற்பாட்டில் உள்ளதா என சரி பார்க்கவும்.

இல்லையன்றால் அதை செயற்படுத்தவும்(Enable).


௧) தேவையான மென்பொருட்கள்

அ) android-tools – provide “adb”

ஆ) ஆணட்ராய்டு இயங்குதள பதிப்பு – 4.1.x அதற்கும் கூடுதலாக


௨) டெபியன்/உபுண்டு/பெடோரா இயங்குதளங்களில் – நிறுவல்


sudo apt-get install android-tools             #உபுண்டு

su –                                                      #பெடாேராவில் நீங்கள் root  – பயனராக மாறுதல் அவசியம்.

yum install android-tools                         #பெடாேரா

௩) ஆண்ட்ராய்டு இயங்குதளத்திற்க்கான சோதனை ஓட்ட

பயர்பாக்ஸ்-தமிழ்: பதிவிறக்கும் முறை


இங்கே சொடுக்கவும்: http://ftp.mozilla.org/pub/mozilla.org/mobile/nightly/latest-mozilla-aurora-android-l10n/fennec-31.0a2.ta.android-arm.apk

#ta என்றால் -Tamil அதுப்போல


இந்திய நாட்டு மொழிகள்









பிற நாட்டு மொழிகள்




பல்வேறு மொழிகளில் பயர்பாக்ஸ் வெளியிடப்பட்டுள்ளதால் – கீழ்கண்ட இணையப்பக்கத்தில் இருந்து உங்கள் தாய்மொழிக்கான apk கோப்பை பதிவிறக்கி சோதனை செய்யவும்.


உதாரணமாக தமிழ் மொழிக்கான கோப்பின் பொயர்: fennec-31.0a2.ta.android-arm.apk


௪) ஆண்ட்ராய்டு கைப்பேசியில் எப்படி பயர்பாக்ஸ்-தமிழ் பதிப்பை நிறுவுவது


அ) sudo adb devices            #கைப்பேசி கருவி கணினியுடன் இணைக்கப்பட்டுள்ளதா என பார்க்கவும்.

List of devices attached
01498B300401C006    device


ஆ) நீங்கள் apk கோப்பு பதிவிறக்கப்பட்ட அடைவுக்கு செல்ல வேண்டும். கீழேயுள்ளவாறு

cd ~/Downloads            #பாதையை சரியாக உள்ளிடவும்


இ) ls *.apk



ஈ) sudo adb install fennec-30.0a2.ta.android-arm.apk

415 KB/s (30592328 bytes in 71.927s)
pkg: /data/local/tmp/fennec-31.0a2.ta.android-arm.apk


௫)ஆண்ட்ராய்டு – கைப்பேசியில் நேரடியாக

பதிவிறக்கி நிறுவலாம்


http://ftp.mozilla.org/pub/mozilla.org/mobile/nightly/latest-mozilla-aurora-android-l10n/ – இணைப்பை சொடுக்கி fennec-31.0a2.ta.android-arm.apk கோப்பை பதிவிறக்கி கீழ்காணுமாறு செய்தால் சுலபமே !















நிறுவியப்பிறகு பயன்பாடுகளில் “Auroa” எனத் தலைப்பிடப்பட்டதை தொட்டு பயர்பாக்ஸ் உலாவி துவங்க வேண்டும்.

பிறகு கீழ்கண்டவாறு உலாவியை தமிழில் காணலாம்.


௬) சோதனை: சோதனை மேல் சோதனை போதுமடா சாமி!


Screenshot_2014-05-05-02-39-10 Screenshot_2014-05-05-02-47-11 Screenshot_2014-05-05-02-47-19 Screenshot_2014-05-05-02-53-41 Screenshot_2014-05-05-02-39-32 Screenshot_2014-05-05-02-44-54 Screenshot_2014-05-05-02-40-40 Screenshot_2014-05-05-02-41-47 Screenshot_2014-05-05-02-42-00 Screenshot_2014-05-05-02-42-16 Screenshot_2014-05-05-02-40-49 Screenshot_2014-05-05-02-50-41





















































































வழு/பிழை ஏதேனும் காணப்பட்டால்

FaceBook – மொசில்லா தமிழ் – Mozilla Tamil தெரியப்படுத்தவும்

மிக்க நன்றி









Read Full Post »

கற்க கசடற



wpa_supplicant is a daemon for wireless connection management on Andorid/Linux OS. You can check your laptop running will be using wpa_supplicant in background.

ps -aef | grep wpa_supplicant

Refer here: wpa_supplicant



mkdir -p ~/work; cd ~/work;
wget http://hostap.epitest.fi/releases/wpa_supplicant-2.1.tar.gz
tar  zxvf wpa_supplicant-2.1.tar.gz
cd wpa_supplicant-2.1/
cd wpa_supplicant/


Build Environment

Install compilations utilities such as gcc, make etc.

sudo apt-get update

sudo apt-get -y build-dep gcc-4.6 build-essential


P2P Configuration

cp defconfig .config
echo “” >> .config
echo “#Arun Kumar: Enabling Modules for Wi-Fi Direct aka P2P” >> .config
echo CONFIG_P2P=y >> .config
echo CONFIG_AP=y >> .config
echo CONFIG_WPS=y >> .config


Compilation & Installation


You may or may not get errors while compiling the source codes.I have faced following compilation errors and given corresponding solutions for the same as follows


CC  ../src/drivers/driver_wired.c
../src/drivers/driver_nl80211.c:25:31: fatal error: netlink/genl/genl.h: No such file or directory
compilation terminated.
make: *** [../src/drivers/driver_nl80211.o] Error 1

Solution #1
sudo apt-get -y install libssl-dev libnl-3-dev
echo CFLAGS +=-I/usr/include/libnl3/ >> .config


../src/drivers/driver_nl80211.c:95:9: warning: passing argument 1 of ‘genl_ctrl_alloc_cache’ from incompatible pointer type [enabled by default]
/usr/include/libnl3/netlink/genl/ctrl.h:25:14: note: expected ‘struct nl_sock *’ but argument is of type ‘struct nl_handle *’
../src/drivers/driver_nl80211.c:95:9: error: too few arguments to function ‘genl_ctrl_alloc_cache’
/usr/include/libnl3/netlink/genl/ctrl.h:25:14: note: declared here

Solution #2

sudo apt-get install libnl-genl-3-dev
echo CONFIG_LIBNL32=y >> .config


Now compilation succeeded.


wpa_supplicant is really compiled

tulashi@arunx:~/work/wpa_supplicant-2.1/wpa_supplicant$ file wpa_supplicant
wpa_supplicant: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.24, BuildID[sha1]=0xd69c0b4bbafd67e19dfc86a66bfffdd10c2e2de8, not stripped




run wpa_supplicant as daemon


Run the compiled wpa_supplicant for command lines options as mentioned below

tulashi@arunx:~/work/wpa_supplicant-2.1/wpa_supplicant$ ./wpa_supplicant -h
wpa_supplicant v2.1
Copyright (c) 2003-2014, Jouni Malinen <j@w1.fi> and contributors

This software may be distributed under the terms of the BSD license.
See README for more details.

This product includes software developed by the OpenSSL Project
for use in the OpenSSL Toolkit (http://www.openssl.org/)

wpa_supplicant [-BddhKLqqtvW] [-P] [-g] \
[-G<group>] \
-i<ifname> -c [-C] [-D] [-p<driver_param>] \
[-b<br_ifname>] [-e<entropy file>] \
[-o<override driver>] [-O<override ctrl>] \
[-N -i -c [-C] [-D] \
[-p<driver_param>] [-b<br_ifname>] [-I<config file>] …]

nl80211 = Linux nl80211/cfg80211
wext = Linux wireless extensions (generic)
wired = Wired Ethernet driver
-b = optional bridge interface name
-B = run daemon in the background
-c = Configuration file
-C = ctrl_interface parameter (only used if -c is not)
-i = interface name
-I = additional configuration file
-d = increase debugging verbosity (-dd even more)
-D = driver name (can be multiple drivers: nl80211,wext)
-e = entropy file
-g = global ctrl_interface
-G = global ctrl_interface group
-K = include keys (passwords, etc.) in debug output
-t = include timestamp in debug messages
-h = show this help text
-L = show license (BSD)
-o = override driver parameter for new interfaces
-O = override ctrl_interface parameter for new interfaces
-p = driver parameters
-P = PID file
-q = decrease debugging verbosity (-qq even less)
-v = show version
-W = wait for a control interface monitor before starting
-N = start describing new interface
wpa_supplicant -Dnl80211 -iwlan0 -c/etc/wpa_supplicant.conf


wpa_cli : p2p commands

Wpa_Supplicant needs client to communicate i.e wpa_cli

tulashi@arunx:~/work/wpa_supplicant-2.1/wpa_supplicant$ ./wpa_cli -h
wpa_cli [-pctrl sockets>] [-i] [-hvB] [-a] \
[-P<pid file>] [-g<global ctrl>] [-G<ping interval>]  [command..]
-h = help (show this usage text)
-v = shown version information
-a = run in daemon mode executing the action file based on events from
-B = run a daemon in the background
default path: /var/run/wpa_supplicant
default interface: first interface found in socket path
status [verbose] = get current WPA/EAPOL/EAP status
ifname = get current interface name
ping = pings wpa_supplicant
relog = re-open log-file (allow rolling logs)
note <text> = add a note to wpa_supplicant debug log
mib = get MIB variables (dot1x, dot11)
help [command] = show usage help
interface [ifname] = show interfaces/select interface
level <debug level> = change debug level
license = show full wpa_cli license
quit = exit wpa_cli
set = set variables (shows list of variables when run without arguments)
get <name> = get information
logon = IEEE 802.1X EAPOL state machine logon
logoff = IEEE 802.1X EAPOL state machine logoff
pmksa = show PMKSA cache
reassociate = force reassociation
preauthenticate = force preauthentication
identity <network id> <identity> = configure identity for an SSID
password <network id> <password> = configure password for an SSID
new_password <network id> <password> = change password for an SSID
pin <network id> <pin> = configure pin for an SSID
otp = configure one-time-password for an SSID
passphrase = configure private key passphrase
for an SSID
sim <network id> <pin> = report SIM operation result
bssid = set preferred BSSID for an SSID
blacklist <BSSID> = add a BSSID to the blacklist
blacklist clear = clear the blacklist
blacklist = display the blacklist
log_level <level> [<timestamp>] = update the log level/timestamp
log_level = display the current log level and log options
list_networks = list configured networks
select_network <network id> = select a network (disable others)
enable_network <network id> = enable a network
disable_network <network id> = disable a network
add_network = add a network
remove_network <network id> = remove a network
set_network <network id> <variable> <value> = set network variables (shows
list of variables when run without arguments)
get_network <network id> <variable> = get network variables
list_creds = list configured credentials
add_cred = add a credential
remove_cred <cred id> = remove a credential
set_cred <cred id> <variable> <value> = set credential variables
save_config = save the current configuration
disconnect = disconnect and wait for reassociate/reconnect command before
reconnect = like reassociate, but only takes effect if already disconnected
scan = request new BSS scan
scan_results = get latest scan results
bss < | > = get detailed scan result info
get_capability <eap/pairwise/group/key_mgmt/proto/auth_alg/channels/freq/modes> = get capabilies
reconfigure = force wpa_supplicant to re-read its configuration file
terminate = terminate wpa_supplicant
interface_add <ifname> <confname> <driver> <ctrl_interface> <driver_param>
<bridge_name> = adds new interface, all parameters but <ifname>
are optional
interface_remove <ifname> = removes the interface
interface_list = list available interfaces
ap_scan <value> = set ap_scan parameter
scan_interval <value> = set scan_interval parameter (in seconds)
bss_expire_age = set BSS expiration age parameter
bss_expire_count = set BSS expiration scan count parameter
bss_flush = set BSS flush age (0 by default)
stkstart = request STK negotiation with
ft_ds <addr> = request over-the-DS FT with <addr>
wps_pbc [BSSID] = start Wi-Fi Protected Setup: Push Button Configuration
wps_pin [PIN] = start WPS PIN method (returns PIN, if not hardcoded)
wps_check_pin <PIN> = verify PIN checksum
wps_cancel Cancels the pending WPS operation
wps_reg = start WPS Registrar to configure an AP
wps_ap_pin [params..] = enable/disable AP PIN
wps_er_start [IP address] = start Wi-Fi Protected Setup External Registrar
wps_er_stop = stop Wi-Fi Protected Setup External Registrar
wps_er_pin <UUID> <PIN> = add an Enrollee PIN to External Registrar
wps_er_pbc <UUID> = accept an Enrollee PBC using External Registrar
wps_er_learn <UUID> <PIN> = learn AP configuration
wps_er_set_config <UUID> <network id> = set AP configuration for enrolling
wps_er_config <UUID> <PIN> <SSID> <auth> <encr> <key> = configure AP
ibss_rsn = request RSN authentication with in IBSS
sta <addr> = get information about an associated station (AP)
all_sta = get information about all associated stations (AP)
deauthenticate = deauthenticate a station
disassociate <addr> = disassociate a station
chan_switch <cs_count> [sec_channel_offset=] [center_freq1=] [center_freq2=] [bandwidth=] [blocktx] [ht|vht] = CSA parameters
suspend = notification of suspend/hibernate
resume = notification of resume/thaw
drop_sa = drop SA without deauth/disassoc (test command)
roam = roam to the specified BSS
p2p_find [timeout] [type=*] = find P2P Devices for up-to timeout seconds
p2p_stop_find = stop P2P Devices search
p2p_connect <“pbc”|PIN> [ht40] = connect to a P2P Device
p2p_listen [timeout] = listen for P2P Devices for up-to timeout seconds
p2p_group_remove <ifname> = remove P2P group interface (terminate group if GO)
p2p_group_add [ht40] = add a new P2P group (local end as GO)
p2p_prov_disc <addr> <method> = request provisioning discovery
p2p_get_passphrase = get the passphrase for a group (GO only)
p2p_serv_disc_req <addr> <TLVs> = schedule service discovery request
p2p_serv_disc_cancel_req <id> = cancel pending service discovery request
p2p_serv_disc_resp <freq> <addr> <dialog token> <TLVs> = service discovery response
p2p_service_update = indicate change in local services
p2p_serv_disc_external <external> = set external processing of service discovery
p2p_service_flush = remove all stored service entries
p2p_service_add <bonjour|upnp> <query|version> <response|service> = add a local service
p2p_service_del <bonjour|upnp> <query|version> [|service] = remove a local service
p2p_reject <addr> = reject connection attempts from a specific peer
p2p_invite <cmd> [peer=addr] = invite peer
p2p_peers [discovered] = list known (optionally, only fully discovered) P2P peers
p2p_peer <address> = show information about known P2P peer
p2p_set <field> <value> = set a P2P parameter
p2p_flush = flush P2P state
p2p_cancel = cancel P2P group formation

= unauthorize a peer

p2p_presence_req [<duration> <interval>] [<duration> <interval>] = request GO presence
p2p_ext_listen [<period> <interval>] = set extended listen timing
p2p_remove_client <address|iface=address> = remove a peer from all groups
sta_autoconnect <0/1> = disable/enable automatic reconnection
tdls_discover = request TDLS discovery with
tdls_setup = request TDLS setup with
tdls_teardown = tear down TDLS with
signal_poll = get signal parameters
pktcnt_poll = get TX/RX packet counters
reauthenticate = trigger IEEE 802.1X/EAPOL reauthentication
raw <params..> = Sent unprocessed command
flush = flush wpa_supplicant state
radio_work = radio_work <show/add/done>


ஃ படித்தைமைக்கு மிக்க நன்றி || Thanks for visiting my blog ஃ

Read Full Post »

Build system: Ubuntu-12.04 32-bit

arun@arunx:~$ sudo apt-get build-dep gcc-4.6 build-essential

arun@arunx:~$ mkdir linaro-toolchain/{build-dir,install-dir}
arun@arunx:~$ cd linaro-toolchain
arun@arunx:~/linaro-toolchain$ wget http://launchpad.net/gcc-linaro/4.8/4.8-2013.05/+download/gcc-linaro-4.8-2013.05.tar.bz2
arun@arunx:~/linaro-toolchain$ tar jxvf gcc-linaro-4.8-2013.05.tar.bz2


arun@arunx:~/linaro-toolchain/build-dir$ ../gcc-linaro-4.8-2013.05/configure –target=arm-linux-gnueabi –host=i686-linux-gnu –build=i686-linux-gnu –prefix=/home/arun/linaro-toolchain/install-dir –enable-gold –program-transform-name=’s&^&arm-linux-gnueabi-&’ –disable-option-checking –disable-multilib –with-arch=armv5te

Make gcc
arun@arunx:~/linaro-toolchain/gcc-linaro-4.8-2013.05$ make -j4 # in My case 4 is no. of CPUs

After a while, I got into error

checking for suffix of object files… configure: error: in `/home/arun/linaro-toolchain/build-dir/arm-linux-gnueabi/libgcc’:
configure: error: cannot compute suffix of object files: cannot compile
See `config.log’ for more details.
make[1]: *** [configure-target-libgcc] Error 1
make[1]: Leaving directory `/home/arun/linaro-toolchain/build-dir’
make: *** [all] Error 2

Check config.log for more details, part of the errorin the log file is

/home/arun/linaro-toolchain/build-dir./gcc/as: 87: exec: -meabi=5: not found
configure:3591: $? = 1
configure: failed program was:


arun@arunx:~/linaro-toolchain/build-dir$ make -j4 all-gcc


arun@arunx:~/linaro-toolchain/build-dir$ make install-gcc

Verify the Installation
After the installation verify the files and location.

arun@arunx:~/linaro-toolchain/build-dir$ ls -l ~/linaro-toolchain/install-dir
drwxrwxr-x 2 arun arun 4096 May 23 14:11 bin
drwxrwxr-x 2 arun arun 4096 May 22 14:26 include
drwxrwxr-x 3 arun arun 4096 May 22 14:26 lib
drwxrwxr-x 3 arun arun 4096 May 22 14:26 libexec
drwxrwxr-x 5 arun arun 4096 May 22 14:26 share

arun@arunx:~/linaro-toolchain/build-dir$ ls ~/linaro-toolchain/install-dir/bin
arm-linux-gnueabi-c++ arm-linux-gnueabi-g++
arm-linux-gnueabi-gcc-4.8.1 arm-linux-gnueabi-gcc-nm
arm-linux-gnueabi-gcj arm-linux-gnueabi-gfortran
arm-linux-gnueabi-cpp arm-linux-gnueabi-gcc
arm-linux-gnueabi-gcc-ar arm-linux-gnueabi-gcc-ranlib
arm-linux-gnueabi-gcov arm-linux-gnueabi-jcf-dump

Gcc cross toolchain is ready now. You can start cross-compilation for ARM processor platforms.


Your Arun: thangamaniarun



Read Full Post »

Android developers supporting only 64-bit Ubuntu build systems from Android version 4.2.1 Jelly Bean. So this article intended to build Android on 64-bit Ubuntu-12.04 Linux machines only.

Install Ubuntu 12.04 64-bit Linux OS

Download Oracle JDK-6

Open this url in your browser http://www.oracle.com/technetwork/java/javase/downloads/jdk6u38-downloads-1877406.html

Older versions can be found here: http://www.oracle.com/technetwork/java/javase/downloads/java-archive-javase8-2177648.html
Download jdk-6u38-linux-x64.bin file under ~/jdk6 directory

Install JDK-6

arun@arunx:~$ mkdir jdk6
arun@arunx:~/jdk6$ chmod +x jdk-6u38-linux-x64.bin
arun@arunx:~/jdk6$ sh jdk-6u38-linux-x64.bin
arun@arunx:~/jdk6$ ls
jdk1.6.0_38 jdk-6u38-linux-x64.bin
arun@arunx:~/jdk6$ sudo mv jdk1.6.0_38 /usr/lib/jvm/

Update the new Java version

arun@arunx:~$ sudo update-alternatives –install /usr/bin/javac javac /usr/lib/jvm/jdk1.6.0_38/bin/javac 1
arun@arunx:~$ sudo update-alternatives –install /usr/bin/java java /usr/lib/jvm/jdk1.6.0_38/bin/java 1
arun@arunx:~$ sudo update-alternatives –install /usr/bin/javaws javaws /usr/lib/jvm/jdk1.6.0_38/bin/javaws 1

Make it as default
arun@arunx:~$ sudo update-alternatives –config javac
arun@arunx:~$ sudo update-alternatives –config java
arun@arunx:~$ sudo update-alternatives –config javaws

Check the Java version

arun@arunx:~$ java -version
java version “1.6.0_38”
Java(TM) SE Runtime Environment (build 1.6.0_38-b05)
Java HotSpot(TM) 64-Bit Server VM (build 20.13-b02, mixed mode)

arun@arunx:~$ ls -la /etc/alternatives/java*
lrwxrwxrwx 1 root root 33 May 15 02:40 /etc/alternatives/java -> /usr/lib/jvm/jdk1.6.0_38/bin/java
lrwxrwxrwx 1 root root 34 May 15 02:41 /etc/alternatives/javac -> /usr/lib/jvm/jdk1.6.0_38/bin/javac
lrwxrwxrwx 1 root root 35 May 15 02:40 /etc/alternatives/javaws -> /usr/lib/jvm/jdk1.6.0_38/bin/javaws

Install softwares required for Android Build Enviroment

arun@arunx:~$ sudo apt-get install git gnupg flex bison gperf build-essential zip curl libc6-dev libncurses5-dev x11proto-core-dev libx11-dev libreadlnes6i-dev libglapi-mesa libgl1-mesa-dev g++-multilib mingw32 tofrodos python-markdown libxml2-utils xsltproc zlib1g-dev libgl1-mesa-glx

Set HTTP/HTTPS Proxy if your system behind corporate firewall
arun@arunx:~$ export http_proxy=”http://:/&#8221;
arun@arunx:~$ export https_proxy=”https://:/&#8221;

Download the Git tool repo to sync the Android Source repository to local build system
arun@arunx:~$ mkdir ~/bin
arun@arunx:~$ PATH=~/bin:$PATH
arun@arunx:~$ curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
arun@arunx:~$ chmod a+x ~/bin/repo

Download the Android Open Source Project Source codes for Nexus7(grouper) from branch “android-4.2.1_r1”
arun@arunx:~$ mkdir -b nexus7/mydroid
arun@arunx:~$ cd nexus7/mydroid
arun@arunx:~/nexus7/mydroid $ repo init -u https://android.googlesource.com/platform/manifest -b android-4.2.1_r1
arun@arunx:~/nexus7/mydroid $repo sync

Initialize Build Env(Start Music)
arun@arunx:~/nexus7/mydroid $ source build/envsetup.sh
arun@arunx:~/nexus7/mydroid $ export USE_CCACHE=1

Choose a Target grouper(Nexus7)
arun@arunx:~/nexus7/mydroid $ lunch full_grouper-userdebug
Build the Code
arun@arunx:~/nexus7/mydroid $ make -j4 #4 cpu cores

I got following Error


/home/arun/nexus-7/mydroid/prebuilts/gcc/linux-x86/host/i686-linux-glibc2.7-4.6/bin/../lib/gcc/i686-linux/4.6.x-google/../../../../i686-linux/bin/as: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory
make: *** [out/host/linux-x86/obj/EXECUTABLES/acp_intermediates/acp.o] Error 1
make: *** Waiting for unfinished jobs….
/home/arun/nexus-7/mydroid/prebuilts/gcc/linux-x86/host/i686-linux-glibc2.7-4.6/bin/../lib/gcc/i686-linux/4.6.x-google/../../../../i686-linux/bin/as: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory
make: *** [out/host/linux-x86/obj/STATIC_LIBRARIES/libhost_intermediates/CopyFile.o] Error 1
/home/arun/nexus-7/mydroid/prebuilts/gcc/linux-x86/host/i686-linux-glibc2.7-4.6/bin/../lib/gcc/i686-linux/4.6.x-google/../../../../i686-linux/bin/as: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory
make: *** [out/host/linux-x86/obj/STATIC_LIBRARIES/libhost_intermediates/pseudolocalize.o] Error 1
/bin/bash: jar: command not found


arun@arunx:~/nexus7/mydroid $ sudo apt-get install lib32z1

Build Again
arun@arunx:~/nexus7/mydroid $ make -j4 #4 no. of cpu cores

Build Individual Android Modules/Libraries
Here I’m building wpasupplicant for wi-fi operations.
arun@arunx:~/nexus7/mydroid $ make wpa_supplicant wpa_cli

Clean the Build
arun@arunx:~/nexus7/mydroid $ make clean

Clean the Individual Modules
arun@arunx:~/nexus7/mydroid $ make clean
example: arun@arunx:~/nexus7/mydroid $ make clean-wpa_supplicant wpa_cli

Feel free to comment and let me know if you have any problem.

Read Full Post »