Google maintainers advise to always repo sync the master branch for panda claiming it’s the most stable , but in my opinion they should focus on stabilizing tags. Tags should represent a stable snapshot of he source tree to build and run . That’s what a tag means in Software Engineering anyway !
This post is a translated version of the Japanese post on blog.sola-dolphin-1.net reposted under permission of the main author that describes how to build Android JB tag android-4.2.2_r1 for pandaboard, of course some patching is required to get it work, you can download all the patches required from this mirror or follow the steps to get them one by one from the main mirror.
android-4.2.2
– prepare the directory
$ mkdir ~/panda_work $ export PANDA_WORK=~/panda_work $ mkdir ~/panda_work/android $ export ANDROID_ROOT=~/panda_work/android
– init the repo
$ cd $ANDROID_ROOT $ repo init -u https://android.googlesource.com/platform/manifest -b android-4.2.2_r1 $ repo sync
notes:
- to save time you can use an old tree and repo init inside it’s dir , then sync will grab only the differences
- in case repo sync hangs use repo sync -j1 to disable multi threading also check repo sync -h for other options
– get the gpu user space binaries
$ wget https://dl.google.com/dl/android/aosp/imgtec-panda-20120807-c4e99e89.tgz $ tar zxvf imgtec-panda-20120807-c4e99e89.tgz $ ./extract-imgtec-panda.sh
– apply the patches
$ cd $ANDROID_ROOT/build/ $ wget http://sola-dolphin-1.net/data/Panda/0001-panda-jb4.2_build.patch $ git apply 0001-panda-jb4.2_build.patch $ cd $ANDROID_ROOT/device/ti/panda/ $ wget http://sola-dolphin-1.net/data/Panda/0001-panda-jb4.2_device-ti-panda.patch $ git apply 0001-panda-jb4.2_device-ti-panda.patch $ cd $ANDROID_ROOT/hardware/ti/omap4xxx/ $ wget http://sola-dolphin-1.net/data/Panda/0001-panda-jb4.2_hardware-ti-omap4xxx.patch $ git apply 0001-panda-jb4.2_hardware-ti-omap4xxx.patch $ cd $ANDROID_ROOT/hardware/ti/wpan/ $ wget http://sola-dolphin-1.net/data/Panda/0001-panda-jb4.2_hardware-ti-wpan.patch $ git apply 0001-panda-jb4.2_hardware-ti-wpan.patch
– you can either use fastboot to format and flash the images or use this script instead
$ cd $ANDROID_ROOT $ wget http://sola-dolphin-1.net/data/Panda/0001-add-mksdcard_pandaboard.sh.patch $ git apply 0001-add-mksdcard_pandaboard.sh.patch
– build the tree
$ cd $ANDROID_ROOT $ source build/envsetup.sh $ lunch full_panda-userdebug $ make -j4
– format and flash from a ubuntu machine, /dev/sdx is the the sdcard device
$ LANG=C sudo ./mksdcard_pandaboard.sh /dev/sdX $ANDROID_ROOT
kernel
– prepare the environment
$ export ARCH=arm $ export CROSS_COMPILE=$ANDROID_ROOT/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6/bin/arm-eabi-
– clone the repo
$ cd $PANDA_WORK $ git clone https://android.googlesource.com/kernel/omap.git kernel $ cd kernel $ git checkout -b android-omap-panda-3.0 origin/android-omap-panda-3.0
– build with panda config
$ make panda_defconfig $ make $ cp -a arch/arm/boot/zImage $ANDROID_ROOT/device/ti/panda/kernel
note: though bootloader and xloader images are provided within device/ti/panda dir , you can build them from source using the following instructions
xloader
– build xloader
$ cd $PANDA_WORK $ git clone git://git.omapzoom.org/repo/x-loader.git $ cd x-loader $ git checkout -b omap4_dev origin/omap4_dev $ make omap4430panda_config $ make ift $ cp -a MLO $ANDROID_ROOT/device/ti/panda/xloader.bin
bootlader(uboot)
– clone the repo
$ cd $PANDA_WORK $ git clone git://git.omapzoom.org/repo/u-boot.git $ cd u-boot $ git checkout -b omap4_dev origin/omap4_dev
– change the boot parameters
$ wget http://android-development-environment.googlecode.com/files/0001-change-bootarges.patch $ git apply 0001-change-bootarges.patch
– build
$ make omap4430panda_config $ make $ cp -a u-boot.bin $ANDROID_ROOT/device/ti/panda/bootloader.bin
29 responses to “Building android-4.2.2 JellyBean on Pandaboard/Pandaboard ES”
I saw your opening comment and I thought I would reply. Focusing on “TAGS” is an excellent idea, but let me elaborate.
There are two types of developers in the world (in this context). Those that work on basic board functionality, and don’t truly care about stability. To them, a baseline that always has the latest code, has the latest changes from all the participants, and has the most recent, mosto up-to-date information built into it, is by definition stable. From their perspective, they are correct.
From the perspective of actually creating a product, developing upon a platform, and delivering something to the end customer, using the latest main branch is a bad idea. There are many types of people who do development on a platform, from modem engineers to apps engineers, and they may not particularly care that the latest kernel improvements have now been optimized and the latest code is in the mainline. What they do care, instead, is that the baseline boots, runs, doesn’t crash for 20 days, works properly with the modem, and supports the defined APIs. Using the latest main branch would be a disaster for them.
It’s a major problem. BSP engineers tend to be particularly confident in their baseline, want to work quickly, and are content to throw their changes into the master branch as they see fit. This is completely inappropriate for the team at large.
Google is no exception, and while I was working with them, had no idea what stability means. They may understand now, I am sure Motorola is educating them (or maybe Motorola is so decimated they have lost their path as well).
LikeLike
Great elaboration , just saying that I had a very hard and confusing moment in building either the main branch or recent tags . Being ok with a rapidly evolving master branch but spending hours trying to stabilize a build from recent tags was very annoying , redundant and anti-productive.
LikeLike
Hi,
I am using pandaboard 4430 I have downloaded the code and build it successfully but I am facing the issue when ever i attempt to open the browser the board gets hanged even its not rebooting. I have enabled the watchdog timer in kernel code but there is no use can you please help me to sort out this issue
LikeLike
did you check the different logs available like kernel dumps, logcat …etc ?
LikeLike
i got these following errors… im follow those same steps and package.
how to resolve it or any thing i missed????
ERROR:
Note: com.google.common.base.FinalizableReferenceQueue accesses a method ‘startFinalizer(java.lang.Class,java.lang.Object)’ dynamically
frameworks/base/core/java/com/android/internal/widget/LockPatternUtils.java:1280: error 114: @deprecated tag with no explanatory comment
DroidDoc took 284 sec. to write docs to out/target/common/docs/doc-comment-check
Note: there were 2 accesses to class members by means of introspection.
You should consider explicitly keeping the mentioned class members
(using ‘-keep’ or ‘-keepclassmembers’).
make: *** [out/target/common/docs/doc-comment-check-timestamp] Error 45
make: *** Waiting for unfinished jobs….
Preparing output jar [/home/test/arun/android4.2.2/out/target/common/obj/APPS/Calculator_intermediates/proguard.classes.jar]
Copying resources from program jar [/home/test/arun/android4.2.2/out/target/common/obj/APPS/Calculator_intermediates/classes .jar]
LikeLike
Compiling SDK Stubs: out/target/common/obj/JAVA_LIBRARIES/android_stubs_current_intermediates/classes.jar
Copying: out/target/common/obj/APPS/SystemUI_intermediates/classes-jarjar.jar
Copying: out/target/common/obj/APPS/TelephonyProvider_intermediates/proguard.classes.dex
frameworks/base/api/17.txt:21088: error 9: Removed public constructor SmsMessage()
frameworks/base/api/17.txt:21089: error 9: Removed public method android.telephony.gsm.SmsMessage.calculateLength
frameworks/base/api/17.txt:21090: error 9: Removed public method android.telephony.gsm.SmsMessage.calculateLength
frameworks/base/api/17.txt:21091: error 9: Removed public method android.telephony.gsm.SmsMessage.createFromPdu
frameworks/base/api/17.txt:21092: error 9: Removed public method android.telephony.gsm.SmsMessage.getDisplayMessageBody
frameworks/base/api/17.txt:21093: error 9: Removed public method android.telephony.gsm.SmsMessage.getDisplayOriginatingAddress
frameworks/base/api/17.txt:21094: error 9: Removed public method android.telephony.gsm.SmsMessage.getEmailBody
frameworks/base/api/17.txt:21095: error 9: Removed public method android.telephony.gsm.SmsMessage.getEmailFrom
frameworks/base/api/17.txt:21096: error 9: Removed public method android.telephony.gsm.SmsMessage.getIndexOnSim
.
.
.
.
out/target/common/obj/PACKAGING/public_api.txt:21131: error 12: Class android.telephony.gsm.SmsMessage changed static qualifier
******************************
You have tried to change the API from what has been previously released in
an SDK. Please fix the errors listed above.
******************************
make: *** [out/target/common/obj/PACKAGING/checkapi-last-timestamp] Error 38
make: *** Waiting for unfinished jobs….
out/target/common/obj/JAVA_LIBRARIES/android_stubs_current_intermediates/src/android/telephony/gsm/SmsMessage.java:3: modifier static not allowed here
public static class SmsMessage
^
out/target/common/obj/JAVA_LIBRARIES/android_stubs_current_intermediates/src/java/security/cert/PKIXBuilderParameters.java:5: warning: [unchecked] unchecked conversion
found : java.util.Set
required: java.util.Set
.
.
.
.
any way all images are created and i tried to flash to memory card using mksdcard_pandaboard.sh.
booting is happen but when i click settings or any app system goes to hang… how to solve this issue…
any one give me some hints….
im using default xloder,boot loader and kernel..
LikeLike
You shouldn’t be getting any errors if you followed the exact same steps, my best guess is these errors are because different JDK version . Try to downgrade to JDK 1.6
LikeLike
ya got it… but it get hang if i press any apps/setings…. some time booting time also get STUCK… any permiossion problem… ???
and i want to know who to setup P2P ????
can u pls give some tips … i want to run in terminal… SOFTAP and STATION mode are working fine in terminal…..
LikeLike
This might be a silly question, but why use android-omap-panda-3.0 as a kernel?
For me it builds 3.0.31-gcb5fc50, but I was expecting JB to use a 3.2 kernel…
LikeLike
can u please share the path , from where i need to take the Kenel 3.2 and conf fiel fro panda .
i have some queries :
in kernel 3.0 wl1271 firmware (Rev 6.3.0.0.77) has the capability of P2P ??
i got some prebild image from linaro, they using kernel 3.2 and P2P supporting.
i download the kernel 3.2 from googlesource, and applied the panda_defconfig (kernel 3.0) for building.
it not booting in my panda board.. i need to change any thing more for that…
can u share proper conf file and kernel source path for pandaboaed REV A2
i got these errors
0.728729] io scheduler cfq registered (default)
[ 0.731170] OMAP DSS rev 4.0
[ 0.733795] omap_hwmod: dss_core: _wait_target_disable failed
[ 0.737823] omap_hwmod: dss_core: _wait_target_disable failed
[ 0.740478] omap_hwmod: dss_dispc: _wait_target_disable failed
.
.
.
.
.
init: /dev/hw_random not found
[ 16.974426] init: could not open /dev/keychord
[ 16.981475] init: cannot open ‘/initlogo.rle’
[ 36.998291] fs_mgr: Cannot mount filesystem on /dev/block/platform/omap/omap_hsmmc.0/by-name/system at /system
[ 37.008911] init: fs_mgr_mount_all returned an error
[ 37.023742] init: /dev/hw_random not found
[ 37.028259] init: Unable to open persistent property directory /data/property errno: 2
[ 37.052764] init: cannot find ‘/system/bin/servicemanager’, disabling ‘servicemanager’
[ 37.061248] init: cannot find ‘/system/bin/vold’, disabling ‘vold’
[ 37.068054] init: cannot find ‘/vendor/bin/pvrsrvctl’, disabling ‘pvrsrvctl’
[ 37.073425] healthd: wakealarm_init: timerfd_create failed
[ 37.081542] init: cannot find ‘/system/bin/setup_fs’, disabling ‘setup_fs’
[ 37.088867] init: cannot find ‘/system/bin/uim-sysfs’, disabling ‘uim’
[ 37.096679] init: cannot find ‘/system/bin/netd’, disabling ‘netd’
[ 37.103302] init: cannot find ‘/system/bin/debuggerd’, disabling ‘debuggerd’
[ 37.110839] init: cannot find ‘/system/bin/rild’, disabling ‘ril-daemon’
[ 37.118011] init: cannot find ‘/system/bin/surfaceflinger’, disabling ‘surfaceflinger’
[ 37.126464] init: cannot find ‘/system/bin/app_process’, disabling ‘zygote’
[ 37.134094] init: cannot find ‘/system/bin/drmserver’, disabling ‘drm’
[ 37.141082] init: cannot find ‘/system/bin/mediaserver’, disabling ‘media’
[ 37.148376] init: cannot find ‘/system/bin/installd’, disabling ‘installd’
[ 37.155731] init: cannot find ‘/system/etc/install-recovery.sh’, disabling ‘flash_recovery’
[ 37.164642] init: cannot find ‘/system/bin/keystore’, disabling ‘keystore’
[ 37.172454] init: property ‘ro.product.manufacturer’ doesn’t exist while expanding ‘${ro.product.manufacturer}’
[ 37.183166] init: cannot expand ‘${ro.product.manufacturer}’ while writing to ‘/sys/class/android_usb/android0/iManufacturer’
[ 37.195159] init: property ‘ro.product.model’ doesn’t exist while expanding ‘${ro.product.model}’
[ 37.204559] init: cannot expand ‘${ro.product.model}’ while writing to ‘/sys/class/android_usb/android0/iProduct’
[ 37.218933] init: property ‘sys.powerctl’ doesn’t exist while expanding ‘${sys.powerctl}’
[ 37.227783] init: powerctl: cannot expand ‘${sys.powerctl}’
[ 37.233703] init: property ‘sys.sysctl.extra_free_kbytes’ doesn’t exist while expanding ‘${sys.sysctl.extra_free_kbytes}’
[ 37.245300] init: cannot expand ‘${sys.sysctl.extra_free_kbytes}’ while writing to ‘/proc/sys/vm/extra_free_kbytes’
[ 37.256408] init: cannot find ‘/system/bin/sh’, disabling ‘console’
[ 42.299835] healthd: wakealarm_init: timerfd_create failed
[ 47.354461] healthd: wakealarm_init: timerfd_create failed
[ 52.424743] healthd: wakealarm_init: timerfd_create failed
[ 57.487243] healthd: wakealarm_init: timerfd_create failed
[ 57.494049] init: critical process ‘healthd’ exited 4 times in 4 minutes; rebooting into recovery mode
[ 57.505279] SysRq : Emergency Remount R/O
[ 57.510437] Emergency Remount complete
[ 57.536865] omap_hwmod: dss_dispc: _wait_target_disable failed
[ 57.543518] Restarting system with command ‘recovery’.
LikeLike
thanks for your replay…. im usingkernel 3.2 from
git clone http://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
cd linux
git checkout v3.2
LikeLike
I was just talking about the post guidelines.
$ git clone https://android.googlesource.com/kernel/omap.git kernel
$ cd kernel
$ git checkout -b android-omap-panda-3.0 origin/android-omap-panda-3.0
That seems to be a 3.0 kernel – the Makefile says Sneaky Weasel.
I’m now trying the kernel from with http://releases.linaro.org/13.07/android/panda which is Saber-toothed Squirrel
LikeLike
Did you try it ? Did it build and boot successfully ? if yes, then please share your thoughts here. Note that these instructions will only work for JB 4.2.2 and I can’t assure it will work for any other version.
LikeLike
In the end I just stuck with the linaro 13-07 build -> http://releases.linaro.org/13.07/android/panda
That one has a 3.2 kernel, and it boots fine on PandaBoard ES.
I build the kernel from source (using android-ndk-r9c – I don’t even need a 64-bit machine) and replace the uImage in boot.tar.bz2.
The rest of the images (pandaboard.img.bz2, system.tar.bz2, userdata.tar.bz2) are just copied from linaro.
LikeLike
Linaro have great builds , but you can’t ensure their builds are vanilla (not patched) . If u have no problems with that then Linaro would be a great choice.
LikeLike
From what I understand google have made their own modifications to the kernel(that’s why they have a seperate repo ? ) , so I would stick to google’s repo
LikeLike
hello sir,
I got the following error after running repo sync:
Fetching projects: 100% (329/329), done.
Deleting obsolete path /home/android/panda/android/art
Deleting obsolete path /home/android/panda/android/developers/build
Deleting obsolete path /home/android/panda/android/developers/demos
Deleting obsolete path /home/android/panda/android/developers/docs
Deleting obsolete path /home/android/panda/android/developers/samples/android
Deleting obsolete path /home/android/panda/android/device/generic/mini-emulator-armv7-a-neon
Deleting obsolete path /home/android/panda/android/device/generic/mini-emulator-mips
Deleting obsolete path /home/android/panda/android/device/generic/mini-emulator-x86
Deleting obsolete path /home/android/panda/android/device/linaro/arndale
Deleting obsolete path /home/android/panda/android/device/linaro/common
Deleting obsolete path /home/android/panda/android/device/linaro/fujitsu
Deleting obsolete path /home/android/panda/android/device/linaro/hi4511
Deleting obsolete path /home/android/panda/android/device/linaro/pandaboard
Deleting obsolete path /home/android/panda/android/device/linaro/vexpress
Deleting obsolete path /home/android/panda/android/device/samsung/proprietary-open
Deleting obsolete path /home/android/panda/android/device/ti/proprietary-open
Deleting obsolete path /home/android/panda/android/device/ti/uim
Deleting obsolete path /home/android/panda/android/external/android_input_bridge
Deleting obsolete path /home/android/panda/android/external/busybox
Deleting obsolete path /home/android/panda/android/external/ceres-solver
Deleting obsolete path /home/android/panda/android/external/chromium-libpac
Deleting obsolete path /home/android/panda/android/external/chromium_org
Deleting obsolete path /home/android/panda/android/external/droiddriver
Deleting obsolete path /home/android/panda/android/external/ffmpeg
error: Cannot remove project “external/gator”: uncommitted changes are present
commit changes, then run sync again
LikeLike
As the error suggests , u have made changes in external/gator so u either commit them or undo them.
LikeLike
thank u for reply.
LikeLike
i followed the above steps build completed successfully thank you for support ……..!
LikeLike
U r welcome!
LikeLike
Hi aabdelfattah
I followed the above procedure . Everything went fine but it gets hang if any application or settings is pressed.…. And also there is inconsistency in booting (As mentioned by Arun) .
I downgraded java to 1.6 also..but still i face the same issue…
LikeLike
Post logcat output here when you try to open any application, also what do you mean exactly by inconsistent booting would you care to explain more ?
LikeLike
Hi
Logcat doesn’t give any output when the application/settings is clicked . The minicom terminal also freezes when it hangs.
Inconsistent booting in the sense , sometimes the board boots completely and i am able to see the home screen in DVI monitor and sometimes only “Android” logo is getting displayed for infinite time.
LikeLike
This is wierd .. what kind of crash is that ? Even a kernel panic won’t hang minicom.
Regarding booting issues , i encountered them for 2 instances :
– when the graphics binaries in user space won’t match the graphics driver in kernel space but that won’t be ur case because it wouldn’t boot at all not randomly.
– sometimes it won’t boot and reflashing the userdata partition or other partitions solves the issue.
Try to dump logcat and minicom outputs somewhere and google them or paste them here.
Hope that helps,
Ahmed
LikeLike
Really informative blog article.Really thank you! Want more. geaeaecabbge
LikeLike
Anybody have any idea about the logcat and log messages ??????
LikeLike
Dear Kushari,
For repo sync is failing again & again for last 15 days. Kindly provide me the tar/zip of repo sync. It will be a great help of yours.
Regards
Abhay
LikeLike