Tag Archives: openembedded

AArch64 can build OpenEmbedded

In 2012 I was porting OpenEmbedded to target AArch64 so I can say that I did first OE builds for that architecture.

But today I did kind of reverse thing:

Build Configuration:
BB_VERSION        = "1.21.1"
BUILD_SYS         = "aarch64-linux"
TARGET_SYS        = "arm-oe-linux-gnueabi"
MACHINE           = "genericarmv7a"
DISTRO            = "nodistro"
DISTRO_VERSION    = "nodistro.0"
TUNE_FEATURES     = "armv7a vfp thumb neon callconvention-hard"
TARGET_FPU        = "vfp-neon"

Yes — I did build on AArch64 machine targeting ARMv7a system. Had to edit one patch (pseudo-native was set to use very old glibc symbols which are not available on 64-bit ARM) but after that build was running just fine.

I did not tested resulting binaries.

It is 10 years of Linux on ARM for me

It was somewhere between 7th and 11th February 2004 when I got package with my first Linux/ARM device. It was Sharp Zaurus SL-5500 (also named “collie”) and all started…

At that time I had Palm M105 (still own) and Sony CLIE SJ30 (both running PalmOS/m68k) but wanted hackable device. But I did not have idea what this device will do with my life.

Took me about three years to get to the point where I could abandon my daily work as PHP programmer and move to a bit risky business of embedded Linux consulting. But it was worth it. Not only from financial perspective (I paid more tax in first year then earned in previous) but also from my development. I met a lot of great hackers, people with knowledge which I did not have and I worked hard to be a part of that group.

I was a developer in multiple distributions: OpenZaurus, Poky Linux, Ångström, Debian, Maemo, Ubuntu. My patches landed also in many other embedded and “normal” ones. I patched uncountable amount of software packages to get them built and working. Sure, not all of those changes were sent upstream, some were just ugly hacks but this started to change one day.

Worked as distribution leader in OpenZaurus. My duties (still in free time only) were user support, maintaining repositories and images. I organized testing of pre-release images with over one hundred users — we had all supported devices covered. There was “updates” repository where we provided security fixes, kernel updates and other improvements. I also officially ended development of this distribution when we merged into Ångström.

I worked as one of main developers of Poky Linux which later became Yocto Linux. Learnt about build automation, QA control, build-after-commit workflow and many other things. During my work with OpenedHand I also spent some time on learning differences between British and American versions of English.

Worked with some companies based in USA. This allowed me to learn how to organize teamwork with people from quite far timezones (Vernier was based in Portland so 9 hours difference). It was useful then and still is as most of Red Hat ARM team is US based.

I remember moments when I had to explain what I am doing at work to some people (including my mom). For last 1.5 year I used to say “building software for computers which do not exist” but this is slowly changing as AArch64 hardware exists but is not on a mass market yet.

Now I got to a point when I am recognized at conferences by some random people when at FOSDEM 2007 I knew just few guys from OpenEmbedded (but connected many faces with names/nicknames there).

Played with more hardware then wanted. I still have some devices which I never booted (FRI2 for example). There are boards/devices which I would like to get rid of but most of them is so outdated that may go to electronic trash only.

But if I would have an option to move back that 10 years and think again about buying Sharp Zaurus SL-5500 I would not change it as it was one of the best things I did.

From a diary of AArch64 porter

One day I will go to software conference with an axe or a knife and will turn a place into slaughterhouse…

During last few weeks most of my work was related to fixing build issues on AArch64 platform. That’s what I do since September 2012. Just operating system changed from OpenEmbedded to Fedora. And there are days when I want to kill.

Kill who? Software developers. Some for shipping few years old copies of config.{guess,sub} files. Others for inviting crazy ways of abusing autoconf usage. My latest find was fakeroot.spec which has this precious jewel:

for type in sysv tcp; do
mkdir obj-$type
cd obj-$type
cat >> configure << 'EOF'
#! /bin/sh
exec ../configure "$@"
chmod +x configure
%configure \
  --disable-dependency-tracking \
  --disable-static \
  --libdir=%{_libdir}/libfakeroot \
  --with-ipc=$type \
cd ..

By default "%configure" macro updates config.{guess,sub} files. But it does it in place. So no luck here.

There are countless packages like that. Code for 3rd-party libraries bundled with code may have them as well.

So if your package uses config.{guess,sub} files then please take a look and do an update of them with new release.

My own company started 8th year today

Seven years ago I created my one person company. And it was one of best things I did in my life.

All started in 2006 when I started doing some small paid jobs around OpenEmbedded. Small things: solving build problems, updating recipes, adding new ones. But companies prefer to get invoice for such stuff instead of just giving money…

So one day I went to city hall and created what was then called “HaeRWu Marcin Juszkiewicz”. I changed name 2 years later and got rid of that ‘impossible to pronouce’ part.

There were many different clients for my consulting work. CELF was my first one, later I dropped my daily work and started remote work for OpenedHand. When they were acquired by Intel I got quite nice offer but preferred not to move to UK so went own way. From time perspective I do not know was it right decision ;)

So I looked at market around OpenEmbedded and started working with Bug Labs and few smaller jobs for other clients (some knew me from OpenedHand times). Also had job proposal from Canonical for their newly created ARM team but nothing came from it.

Time passed. One and half-year later Canonical made another attempt and this time I though “why not?”. So I went there just to be moved outside to a team which did not have any official name (other than NewCo or New Core which you may heard somewhere). And that team became Linaro some days later.

At Linaro I did lot of cleanup in Debian/Ubuntu toolchain components, added bootstrapable cross toolchain and fixed several packages (also created some new ones). But then, just when I was supposed to move to Canonical, new things came and AArch64 took my whole time.

ARMv8 work was great time. Learnt new things about OpenEmbedded, saw how project moved during those two years when I did not follow it’s development. Och it was good time.

But good things have to end one day. And so did my time at Linaro. But at around same time I started talking with several companies around Linaro to find a new place for me.

And I found it at Red Hat. Took a bit of time to get everything set up but I think that it was worth it. But due to the fact that I am employee not contractor I will suspend and in few months shutdown my consulting company.

It served me well. I came from being person not recognizable to someone who is known by people who I see for first time. It is good feeling ;)

On my own again

After 3 years at Linaro I have decided to not continue my trip with Canonical. So now I am back to be on my own again.

I will not write why I made such decision but also want to mention that time at Canonical/Linaro was good. I learnt some new tools and added some of them to “avoid if possible” list. From products created and developed at Canonical there are Bazaar and Unity. Both have replacements which I like more.

What next? Will see — I had some meetings and discussions. But I am open for job offers of course ;) It can be Debian or OpenEmbedded or Ubuntu or other ARM Linux related as long I do not have to move.

State of Linaro layers for OpenEmbedded

As I will leave Linaro at the end of May I would like to write a summary of current state of Linaro layers for OpenEmbedded.

At Linaro we have 3 layers:

  1. meta-aarch64
  2. meta-linaro
  3. meta-linaro-toolchain

First one is BSP kind. I know that it had some issues which affected each build which had it in BBLAYERS but I fixed those issues. I would like to thank Khem Raj for pointing me at those.

We have git version of binutils there due to some changes which were not present in 2.23 line. But use of this version is not required as builds are fine with OE Core one.

We have “tune-armv8.inc” in this layer as well. There was attempt to merge that into OE Core but “/lib or /lib64″ discussion started and at that time I decided to skip it. There are similar discussions at GCC and Glibc mailing lists. Once they sort that out OE tune file will be adapted by someone (I hope).

Rest of recipes can be split into 2-3 types. Few (like sysprof, emacs) just disable recipes for AArch64. Other have extra patches to add missing functionality or defines. And we have Linaro kernel for AArch64 there.

Second layer has ARMv7a(b) machine definitions used for our machine independent builds and some recipes.

There are no patches for OE recipes here. The only exception is busybox where we enable “dpkg(-deb)” command which we need for our tools used to merge rootfs with hardware support.

We have “recipes-extra” where we keep new recipes which may not be in a nicest state so are not yet merged into OpenEmbedded (or have no use there like “meta-toolchain-hhvm” one).

“recipes-linaro” is for our stuff. Images, automatic root shell on serial port etc.

And finally is toolchain layer. Everything here is related to gcc-linaro and Linaro binary cross toolchains (armv7a and aarch64 ones). GCC 4.6 and 4.7 is there but 4.6 one will be removed when 4.8 will be added into OE Core.

Who will maintain those layers after my leave? This was not decided yet. There are few guys at Linaro who know how to use OpenEmbedded but I think that most of them is outside of Builds and Baselines team.

If you have any questions then better ask now.

Linaro Connect Asia 2013 was fun

Second day in a row I managed to get 8 hours of sleep like I was not able at Linaro Connect Asia 2013. There was no time for sleeping as so many things had happened.

This time I decided to go to Hong Kong on Friday to have whole Sunday for shopping or sight seeing etc. Also to make things different I went though Helsinki (was Istanbul in 2012). It was interesting experience to hear English language with Finnish accent. There were moments when during in-flight announcements I was not able to recognize when they ended Finnish part and started English one ;D

HEL was cold but only outside so once I got to terminal it was fine. Rushed though, passed biometric passport gate and got a seat with electricity to charge my Chromebook and phone. Flight was “fine” as usual but as it was during night I tried to catch some sleep.

Finnair’s crew had some problems getting in-flight entertainment system working so we could watch how Linux booted on those NSC Geode GX2 based devices. Due to copyright note in bootloader (redboot) I assumed that it is not older than 9 years. Very slow boot anyway with lot of text printed. They should show some splash + potential progress bar instead. But finally it started working. Provided in-ear headphones are much better than ones on Lufthansa flights.

Landed, got prepaid sim from “3″ network, met Andrea Gallo and we went to hotel. I had plans to go to the city center but was too tired for it. I also lacked HKD due to other layout of keypad in ATM :D

ATM keypad in Hong Kong

On Sunday we grouped and went to Shim Shui Po to do some electronics related shopping. Prices in Hong Kong are similar/worse than in Europe so I bought only few things which I had problems finding in low price at home: mini-ITX case (16€), Nexus 4 back cover (6.5€), case for Samsung Chromebook (7.5€) and some cables. There are still no USB 3.0 cables in wide selection ;( I also bought crappy dual sim phone for 10€ as I needed one to get my Polish sim on network.

I also did some shopping on Tuesday — this time on Ladies’ Market. It is one long street with lot of sellers with clothes, wallets, toys, phone covers, headphones and other gift like things of unknown quality. I left there all money I had but got gifts for everyone I wanted. Haggling there is a must as 40% of starting price is easy to get. And you do not even need to tell anything to get price lowered…

We also went to Shenzen, China for one afternoon but that’s story for separate post.

But I went there for connecting with people. And to discuss/present our work done in last cycle and to be done in next ones.

Each day started with keynote (Friday one had Linaro awards). And we got speakers from outside of Linaro:

  • Jon Corbet (LWN)
  • Lars Kurth (Citrix)
  • Jason Taylor (Facebook)
  • Greg Kroah-Hartman

Each talk was interesting. Jon shown Linaro developers that Big.Little switcher should be taken for community review earlier, Lars presented Xen on ARM (v7, v8), Jason told about how Facebook handles servers and where is a space for ARM ones. Greg’s talk was best — he told why he does not want our code, what kind of mistakes people do in sent patches and gave us story how one code submission can break whole set of devices due to lack of testing. I wonder how Linaro Kernel WG will handle Greg’s new requirement of having all Linaro patches signed by senior kernel developer.

This was also first conference where I was fully ARMed. I left my x86 laptop at home and took Samsung Chromebook instead. Ubuntu runs fine on it, speed is comparable but size (13.3″ contra 11.6″) and weight differ. This also gave me few more occasions to talk with other developers.

I spoke with Citrix guys about Chromebook kernel changes and their Xen backport will probably be merged into “linux-chromebook 3.4″ package. Also had some discussions with ARM Mali developers which resulted in removal of OpenGLES packages from Chromebook support PPA due to licence issues (I do not have redistribution permission).

We also had meeting about hacking Samsung Chromebook where ChromeOS, Debian, Linaro, OpenSUSE, Ubuntu developers had discussion about what we can expect, where we are, how to get some things fixed etc. After that Nicolas ‘Charbax’ Charbonnier from armdevices.net shot video about it:

Direct link to video

I remember that Charbax tried to make interview with me at one of earlier Linaro Connects but I always rejected that idea. This time he went for help… And I could not refuse to Zack Pfeffer :) How it went? You tell me:

Direct link to video

Hong Kong was great. Weather was perfect with +25°C, sun and no rain. Someone told me March is the last moment for being there :)

At a beach near hotel in Hong Kong

But then I had to leave. Problem with return flights is that they usually are around midnight. Add lack of sleep during previous nights and result is not nice mix. So we spent some time in airport lounge to charge batteries (our and devices) and then squeezed in economy class for 11 hours. Took a nap, watched movie in English with Finnish subtitles (learnt new word even) and read “Amiga, the future was here” book.

Imagine weather change when we landed in Helsinki… -13°C and snow. As I left my spring jacket in checked-in baggage (but I had sweater) those few minutes from airport -> bus -> plane were cold ones. Similar few hours later in Berlin. But I had some time for shopping. Skipped salmiakki cause it is hard to know which ones will be hardcore just enough but got some other things.

Helsinki with snow

Szczecin was nice on Saturday. Cold, but spring was visible. Winter came during night:

Szczecin next day

Next Linaro Connect will be in Dublin, Ireland. See you there!