February 5, 2013
spacer Tom Gall Tom Gall Tom Gall
  • android
  • drobo
  • gles
  • images
  • linaro
  • linux
  • open_source
  • opengl
  • opengl es 2.00
  • server
  • uncategorized
» Stupid Pet Tricks with Android.mk 2

Here’s another useful example with the Android build system.

How do you install a number of files in the Android.mk build system without actually specifying the files?

In this case, it makes a single test case that uses lots and lots of data files. Who wants to name each and every data file? I don’t!  I have better things to do! Let’s look at an example:

LOCAL_PATH:= $(call my-dir)
piglit_shared_libs := libGLESv2 \
 libwaffle-1 \
 libpiglitutil_gles2 \
piglit_c_includes := $(piglit_top)/tests/util \
 bionic \
 $(piglit_top)/src \
 external/waffle/include/waffle \
 external/mesa3d/include \
include $(CLEAR_VARS)
LOCAL_SHARED_LIBRARIES := libGLESv2 libwaffle-1 libpiglitutil_gles2
LOCAL_C_INCLUDES := $(piglit_c_includes)
LOCAL_CFLAGS := -DPIGLIT_USE_WAFFLE -DPIGLIT_USE_OPENGL_ES2 -DPIGLIT_HAS_ANDROID
LOCAL_MODULE_TAGS := eng 
LOCAL_MODULE := glslparsertest_gles2
systemtarball: glslparsertest_gles2
LOCAL_SRC_FILES := glslparsertest.c
LOCAL_MODULE_PATH := $(TARGET_OUT_OPTIONAL_EXECUTABLES)/piglit/glslparsertest
include $(BUILD_EXECUTABLE)
define all-vert-frag-files-under
$(patsubst ./%,%, \
 $(shell cd $(1) ; \
 find $(2) -name "*.vert" -or -name "*.frag" -and -not -name ".*" -printf "%P\n" ) \
 )
endef
define glsl2_add_test_data
include $(CLEAR_VARS)
LOCAL_SRC_FILES := glsl2/$1
$(warning $(LOCAL_SRC_FILES)) 
LOCAL_MODULE:= $1
LOCAL_MODULE_TAGS := eng
LOCAL_MODULE_CLASS := data
LOCAL_MODULE_PATH:=$(TARGET_OUT_DATA)/glslparser-data/glsl2
datatarball: $1
include $(BUILD_PREBUILT)
endef
glsl2_files := $(call all-vert-frag-files-under, external/piglit/tests/glslparsertest/glsl2)
$(foreach item,$(glsl2_files),$(eval $(call glsl2_add_test_data,$(item))))

Walking you through. all-vert-frag-files-under contains the find which looks for those files.  The next define glsl2_add_test_data creates a BUILD_PREBUILT block for each one of the data files.  After the define, we call the find naming the directory where to look. The line after goes through the contents of glsl2_files which has the list of data files that the find found. It iterates through each entry, passing each $item as a param in the BUILD_PREBUILT block.

Simple as that, but given I couldn’t find any documentation or examples, I thought I’d save you the trouble. Enjoy!


spacer spacer

by tgallfoo at 6:01 PM under android , linaro , open_source (Comments)
spacer Marcin Juszkiewicz hrw Marcin Juszkiewicz » linaro
  • allwinner
  • amd64
  • android
  • angstrom
  • archos
  • arm
  • armv
  • armv8
  • at91
  • beagleboard
  • brick
  • bug
  • calxeda
  • centos
  • chromebook
  • collie
  • company
  • computer
  • conferences
  • consulting
  • cross-compiler
  • debian
  • default
  • dell
  • development
  • donations
  • efika-mx
  • efikamx
  • fedora
  • fosdem
  • free drivers
  • gnome
  • google
  • home-computer
  • i.mx6
  • jolla
  • jtag
  • kernel
  • laptop
  • life
  • linaro
  • linaroconnect
  • linux
  • maemo
  • mini itx
  • n900
  • netbook
  • nexus
  • nhk15
  • nokia
  • nslu2
  • omap
  • open
  • openembedded
  • openmoko
  • opensuse
  • openzaurus
  • origen
  • pandaboard
  • phone
  • poodle
  • quickstart
  • raspberrypi
  • serial
  • sheevaplug
  • sim.one
  • snowball
  • tablet
  • timeline
  • tizen
  • tosa
  • travels
  • ubuntu
  • uds
  • wrt54
  • zaurus
» FOSDEM 2013

Year ago we had Linaro Connect right after FOSDEM so I decided to skip and walk to Golden Gate instead. But this year there were no conflicts!

Months before we had discussion on SzLUUG mailing list about who goes for FOSDEM. There were about 9 people wanting and we ended with five. So on Friday morning friends arrived near my house, I jumped into car, we grabbed 4th one (Tomek was in London at that time) and went to Berlin Schönefeld airport for 07:00 Easyjet flight.

And we missed it… 5-10 minutes late we were ;( 75€ per person and 10 hours later he took off from SXF airport.

But that 10h was not wasted. Berlin has very nice Technical Museum with many trains, cars, planes and other exhibitions. And they had Trabant 601 as well:

spacer

Then trip to shops (Saturn, Media Markt) in search for HTC Desire X case (Magda) and LG Nexus 4 (me). Avoid Saturn — they do not handle credit card payments at Alexanderplatz so I had to walk to the ATM. Two S-Bahns later we passed security check and went to the gate early enough to fly.

BRU airport… I think that (with exception of SXF/TXL) it is my most visited airport as it was my 5th FOSDEM and there was UDS-M around as well. But this time we took a bus instead of a train. 14€ ticket works for 72 hours so cover all trips perfectly. Few hours later we were joking that this multi country journey was exhausting as we were in Berlin, Brussels, went though Geneve (bus stop) to Luxembourg (square) and passed near London (restaurant) ;D

Hotel, drop stuff, connect chargers, went for beer event. Crowdy as usual it was. But I managed to meet some friends (but also missed lot of them) and grabbed few beers. Good spent time. Too bad that I was so tired that went back to hotel just right after midnight.

Saturday

Breakfast in St. Nicolas hotel maybe is not the best but provides enough energy to survive a day. Met several guys there, Philip gave me Kindle Paperwhite which I bought few days before (with delivery to his house to lower price) and his famous Belgium/Holland/Luxembourg guidebook. I also got Beagle pendrive from Koen.

spacer

Then overcrowded bus 71 and FOSDEM! I told Bartek where things are (but at that time I had no idea of K building) and we split. In AW building I met friends manning OpenEmbedded stand just right in front of building entry.

spacer

Circuitco had Beaglebone stand right to it:

spacer

That robot was great example what you can do with enough signals available to drive all those motors. And what you can do with 3D printers ;D

I do not know is it due to crisis or something but AW building had just half of a space for stands used…

Then I went for talks:

  • “Embedded distro shootout: buildroot vs. Debian” — wasted time. Long discussion about Emdebian + short info that Buildroot works in other way. Could be nice talk if done in other way.
  • “Porting Fedora to 64-bit ARM systems” — talk done by Jon Masters and his clone. As usual first “what the hell is 64-bit ARM” and then how Fedora bootstraps itself. Nice talk, got some new stuff. Have to dig for Cavium SDK.
  • “Porting OpenJDK to AArch64″ — interesting it was. Two speakers, lot of technical details.
  • “ARMv8, ARM’s new architecture including 64-bit” by Andrew Wafaa. Mostly to catch speaker in easy way ;D
  • “Bootstrapping Debian-based distributions for new architectures” – I was lazy to go somewhere else but it was good talk.
  • “Bootstrapping the Debian/Ubuntu arm64 ports” by Wookey. Kind of recycled talk from Barcelona but I like his presentations. Also first one without “what the hell is armv8″ introduction.

I also had nice discussion with Jolla guys about their system/device and would I like to test it once they will have something ready for complains. Played a bit with Firefox OS on their reference developer platform and on Nexus S and was not impressed — for example it looked like they have to learn about DPI…

Then I met OE crew and few other guys and when finally noticed that it is time to go to the hotel and drop gear there. Once arrived it was a bit to late to go somewhere and search for some event so I joined SzLUUG team and we went for a meal, chocolates and then some drinking with Kerneliusz (SzLUUG mascotte):

spacer

Sunday

Breakfast, packing gear and go for a bus which was less crowded than day before (but we are a bit late as well). As we had to leave after 14:00 I managed only two talks:

  • “systemd, Two Years Later” — some Ubuntu trolling and project status. Nice talk.
  • “Porting applications to 64-Bit ARM Architecture” by Riku Voipio (main AArch64 porter at Linaro). Good discussion in a room, some nice hints and suggestions. Read his recent blog post about ARMv8 porting

Then walk, tram, bus and security check. This time I did not have to take developer boards from backpack as I gave them away during event. We arrived in Berlin and (due to Micha?’s fosdem flu) I drove us back home.

Summary

It was great event as usual. But distance between K building and rest was too big for sessions which are one after another. I dropped some entries from my calendar just because it would be H->K->H->K switching.

Android application for schedule was ok. Would be nice to make a bigger effort and update it to cover K building as well and add a way to see what is going on in each building/room to reduce time before sessions.

Funny part

On Saturday I realized that for some reason I may remind Jon Masters… That’s due to hardware I had with me:

  • two developer boards
  • two phones
  • two tablets
  • 3 USB chargers
  • 4 microUSB cables

The good thing is that they were not of same type (except some cables) :D

Related content:

  1. UDS-Q
  2. Going for FOSDEM
  3. FOSDEM X
  4. UDS-O
  5. Dublin: Ubuntu sprint and more


All rights reserved © Marcin Juszkiewicz
FOSDEM 2013 was originally posted on Marcin Juszkiewicz website

spacer spacer
spacer

by Marcin Juszkiewicz at 10:30 AM under armv8 , conferences , default , fosdem , jolla , linaro , nokia , openembedded , travels , ubuntu (Comments)
spacer Linaro.org Linaro.org Linaro - Open source software for ARM SoCs
» An Easy Way to Update Android Kernel Related Files Without Getting the sdcard Out

Do you feel it’s difficult or complicated to update kernel related files for a running Android device? Do you feel that it’s boring to get the sdcard out when you just want to update some kernel files when the Android … Continue reading

3:20 AM
» Update android kernel related files easily without getting the sdcard out

Do you feel it’s difficult or complicate to update the kernel related files for a running android device? Or do you feel that it’s boring to get the sdcard out when you just want to update some kernel files when … Continue reading

2:53 AM
February 4, 2013
spacer Riku Voipio rikuvoipio suihkulokki rambling
  • aarch64
  • android
  • arm
  • armv8
  • beagleboard
  • buildd
  • debconf
  • debian
  • firefox
  • linaro
  • marvell
  • meego
  • mosh
  • n900
  • omap3
  • openwrt
  • pandaboard
  • qemu
  • scam
  • webgl
  • x40
» On behalf of aarch64 porters

Public service announcement

When porting GNU/Linux applications to a new architecture, such as 64-Bit ARM, one gets familiar with the following error message:


checking build system type... x86_64-pc-linux-gnu
checking host system type... Invalid configuration `aarch64-oe-linux': machine `aarch64-oe' not recognized
configure: error: /bin/sh config.sub aarch64-oe-linux failed

This in itself is trivial to fix - run autoreconf or just copy in new versions of config.sub and config.guess. However, when bootstrapping a distribution of 12000+ packages, this becomes quickly tiresome. Thus we have a small request:

If you are an upstream of a software that uses autoconf - Please run autoreconf against autotools-dev 20120210.1 or later, and make a release of your software.

Aarch64 porters will be grateful as updated software trickles down to distributions.

This was the most discussed point during my FOSDEM talk "Porting applications to 64-Bit ARM".

by suihkulokki at 3:36 PM under aarch64 , armv8 , debian , linaro
February 1, 2013
spacer Tom Gall Tom Gall Tom Gall
  • android
  • drobo
  • gles
  • images
  • linaro
  • linux
  • open_source
  • opengl
  • opengl es 2.00
  • server
  • uncategorized
» Stupid pet tricks with Android

Or how to do some fairly useful things with the Android build system that were not intuitively obvious to me.

I’ve been working with Android a fair amount this week, both the upstream Android Open Source Project sources and the Linaro sources. For both I’ve been getting piglit to build which has required me to construct a number of Android.mk files. In this case, piglit and waffle are the two packages that need to build. Waffle for it’s library and piglit for it’s library, testcases and test case data.

How do you build a number of binaries in a loop using Android’s Android.mk?

I wondered the same. As the google examples go, for each binary you want to build, you need to specify several LOCAL_* values. If you had to do this for each and every test binary in piglit, it’d be quite quite tedious.  Here’s example how to it the easy way:

include $(call all-subdir-makefiles)

LOCAL_PATH:= $(call my-dir)

piglit_top := $(LOCAL_PATH)/../../..
piglit_shared_libs := libGLESv2 libwaffle-1 libpiglitutil_gles2
piglit_c_includes := $(piglit_top)/tests/util \
bionic \
$(piglit_top)/src \
external/waffle/include/waffle \
external/mesa3d/include \

piglit_c_flags := -DPIGLIT_USE_WAFFLE -DPIGLIT_USE_OPENGL_ES2 -DPIGLIT_HAS_ANDROID

module_name = piglit-spec-gles2

define $(module_name)_etc_add_executable
include $(CLEAR_VARS)
LOCAL_SHARED_LIBRARIES := $(piglit_shared_libs)
LOCAL_C_INCLUDES := $(piglit_c_includes)
LOCAL_CFLAGS := $(piglit_c_flags)
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_CLASS := tests
LOCAL_MODULE := $1_gles2
systemtarball: $1_gles2
LOCAL_SRC_FILES := $1.c
LOCAL_MODULE_PATH := $(TARGET_OUT_OPTIONAL_EXECUTABLES)/piglit/$(module_name)
include $(BUILD_EXECUTABLE)
endef

test_names := invalid-es3-queries minmax
$(foreach item,$(test_names),$(eval $(call $(module_name)_etc_add_executable, $(item))))

It’s fairly straightforward once you have the solution but getting there isn’t exactly documented in the google docs from what I could see. So let me talk you through it.

At the top, I have the list of shared libs that will be linked in and the directories that should be searched.

Within define $(module_name)_etc_add_executable are the set of values  we need to specify for each testcase. Observe that $1 is a parameter passed in. We have to keep to a pattern of test_case.c  will end up as name of the test_case binary, but who cares, this is quite acceptable.

Last test_names is the list of all the test cases we’re going to build. Followed last but not least by the loop that iterates over the test case list.

Next. Data!

How do you copy test case user data to the data partition in an Android.mk file?

Again this was something I scratched my head about, looking through the docs, googled often and came up empty. It’s not hard but it’s not necessarily intuitive.

LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)

LOCAL_MODULE:= sanity.shader_test
LOCAL_MODULE_TAGS := eng
LOCAL_MODULE_CLASS := data
LOCAL_MODULE_PATH:=$(TARGET_OUT_DATA)/shader-data/execution
LOCAL_SRC_FILES := sanity.shader_test
userdatatarball: $(LOCAL_MODULE)
include $(BUILD_PREBUILT)

In this example there is but one data file. But I think you can see where it’s going. Combine with the loop example above and things get quite useful.

Some things to point out.  We need BUILD_PREBUILT since we’re not building anything. The LOCAL_SRC_FILES is our list of data. LOCAL_MODULE_PATH is where to install to.  TARGET_OUT_DATA is /data. It will create the directories for you if they don’t exist.

userdatatarball: is rule to make sure that the datafile ends up in the tarball. I couldn’t figure out a way to not have this but perhaps there is a way. I didn’t run across it.

So there you have it. There might be bugs yet. There might be a better more official way. Based on what I figured out this is what works for me.


spacer spacer

by tgallfoo at 8:05 PM under android , linaro , open_source (Comments)
spacer Linaro.org Linaro.org Linaro - Open source software for ARM SoCs
» Linaro 13.01 released

All things are created twice; first mentally; then physically. The key to creativity is to begin with the end in mind, with a vision and a blue print of the desired result. ~Stephen Covey We are pleased to announce the … Continue reading

1:12 PM
spacer Linaro Announcements linaro-announcements Linaro Announcements
» Linaro 13.01 released

"All things are created twice; first mentally; then physically. The key
to creativity is to begin with the end in mind, with a vision and a
blue print of the desired result." ~Stephen Covey

We are pleased to announce the release of Linaro 13.01.

With the first release of the calendar year, Linaro is happy to highlight
the ingredients that make up the deliverables, again produced by Linaro
Teams – Working Groups, Enterprise Group, Landing Teams and Platform Teams –.
Linaro anticipates another great year of Linux on ARM development
celebrating new members and producing some cutting edge advances.

The Developer Platform Team has enabled 64bit HipHop VM development in
OpenEmbedded, continued to merge ARMv8 support into the OpenEmbedded
platform and upstream, engaged initial support for the Arndale board
and released Linux Linaro 3.8-rc4 2013.01.

For the Android team, it was a busy cycle. The initial changes to
android-build page for the new build program have been done. They are
finally moving towards consolidation of manifests: Origen and Versatile
Express can now be synced and built from the same manifest. The Team is
happy to announce linaro-android-tools which is directed towards kernel
developers. The tool can be used to update kernel and initrd in Android
without having to remove the SDcard. They have also updated the third
party benchmarks to use the uiatomator testing framework introduced in
Jelly Bean. Android hardware pack support has been added.

The Linaro Enterprise Group (LEG) has released Linaro UEFI 2013.01.
The highlights include fixes for native building of UEFI on ARM
platforms and improvements to flashing images on Arndale board and
enable native building for PandaBoard.

The Power Management Group hosted a big.LITTLE sprint in Cambridge led
by Amit Kucheria. A meeting of minds between ARM, Linaro and the
community succeeded in achieving enhanced focus and a more defined
roadmap for the big.LITTLE story. Topics included clearly defined
benchmarking to determine the effectiveness of the platform, enhanced
verification to augment the traditional kernel power/performance testing,
and a well defined roadmap for big.LITTLE on Android. In related
big.LITTLE MP development, version 14 of the big.LITTLE MP tree has
been released.

We encourage everybody to use the 13.01 release. The download links for
all images and components are available on our downloads page:

gipoco.com is neither affiliated with the authors of this page nor responsible for its contents. This is a safe-cache copy of the original web site.