xfce on aarch64 using OE instructions – Updated

Posted: June 1, 2013 in aarch64, linaro, open_source

Updated June 3rd.

Here are the instructions for building your own Open Embedded based aarch64 image which is able to run an xfce based graphical environment. Consider this a draft that will evolve as there are some hacking bits and some steps that over time I want to make disappear.

mkdir openembedded

cd openembedded

git clone git://git.linaro.org/openembedded/jenkins-setup.git

cd jenkins-setup

sudo bash pre-build-root-install-dependencies.sh

edit init-and-build.sh and delete the very last line which is a call to bitbake. bitbake starts a build, we want to delay that for a bit.

./init-and-build.sh

  • pull from my xfce brance

cd meta-linaro
git remote add linaro git://git.linaro.org/people/tomgall/oe/meta-linaro.git
git fetch linaro
git checkout -b xfce linaro/xfce

cd ../meta-openembedded

git remote add linaro git://git.linaro.org/people/tomgall/oe/meta-openembedded.git
git fetch linaro
git checkout -b aarch64 linaro/aarch64

cd ../openembedded-core

git remote add linaro git://git.linaro.org/people/tomgall/oe/openembedded-core.git
git fetch linaro
git checkout -b aarch64 linaro/aarch64

cd ..

  • Next we need to expand the set of recipes the build will use.

cd build

edit conf/bblayers.conf and add

BBLAYERS += ‘/your-full-path/jenkins-setup/meta-linaro/meta-browser’
BBLAYERS += ‘/your-full-path/jenkins-setup/meta-openembedded/meta-xfce’
BBLAYERS += ‘/your-full-path/jenkins-setup/meta-openembedded/meta-gnome’

  • Now it’s time to build

cd openembedded-core
. oe-init-build-env ../build
cd ../build
bitbake linaro-image-xfce

  • The output of the build is in the build directory in tmp-eglibc/deploy/images
  • Package the resulting rootfs into an img. using linaro-media-create. This implies you have a current copy from bzr of linaro-image-tools (bzr clone lp:linaro-image-tools. Also you need the hwpack from the first step.

~/bzr/linaro-image-tools/linaro-media-create –dev fastmodel
–image_size 2000M –output-directory gfx   –binary
linaro-image-xfce-genericarmv8-20130524144429.rootfs.tar.gz –hwpack
../linux-gfx-model/hwpack_linaro-vexpress64-rtsm_20130521-337_arm64_supported.tar.gz

We’ll do some work to smooth this out and get rid of this step and use the OE built kernel.

  • Boot the rtsm model

I use a script for running with either the Foundation model or the RTSM model. Note I keep the Foundation model and the RTSM models inside of ~/aarch64.

————————————————————————————

#!/bin/bash

model=foundation
kernel=
rootfs=

if [ ! -z $3 ]; then
model=$3
fi

if [ -z $1 ]; then
echo “Usage: aarch64-sim KERNEL ROOTFS foundation|rtsm”
else
kernel=`realpath $1`
fi

if [ ! -z $2 ]; then
rootfs=`realpath $2`
fi

case $model in
foundation)
if [ ! -z $rootfs ];then
rootfs=” –block-device $rootfs”
fi
# sudo ip tuntap add tap0 mode tap
# sudo ifconfig tap0 192.168.168.1
~/aarch64/Foundation/Foundation_v8pkg/Foundation_v8 –image $kernel  –network nat $rootfs
;;
rtsm)
if [ ! -z $rootfs ];then
rootfs=” -C motherboard.mmc.p_mmc_file=$rootfs ”
fi
~/aarch64/RTSM_AEMv8_VE/bin/model_shell64 \
-a $kernel \
$rootfs \
~/aarch64/RTSM_AEMv8_VE/./models/Linux64_GCC-4.1/RTSM_VE_AEMv8A.so
;;
esac

———————————————————————————————

I put this in aarch64-sim.sh.  (Don’t forget to chmod +x)

aarch64-sim.sh gfx/img.axf  gfx/sd.img rtsm

  • After the linux system has booted you need the run the following by hand.

fc-cache -f -v

pango-querymodules > /etc/pango/pango.modules

  • and now finally run:

startxfce4

That it for now!

Advertisements
Comments
  1. Jean-Luc says:

    I get some warning at the step “bash jenkins-setup/init-and-build.sh” about pushd/popd, due to missing directories:

    “jenkins-setup/init-and-build.sh: line 52: pushd: meta-linaro: No such file or directory”

    but this step completes. I’m not sure we need the skipped test or not. However, after apparently building all 63 tasks, bitbake linaro-image-xfce fails with:

    “ERROR: Nothing RPROVIDES ‘xfwm4’ (but /home/jaufranc/edev/sandbox/armv8/openembedded/meta-linaro/meta-linaro/recipes-linaro/images/linaro-image-xfce.bb RDEPENDS on or otherwise requires it)
    NOTE: Runtime target ‘xfwm4’ is unbuildable, removing…
    Missing or unbuildable dependency chain was: [‘xfwm4’]
    ERROR: Required build target ‘linaro-image-xfce’ has no buildable providers.
    Missing or unbuildable dependency chain was: [‘linaro-image-xfce’, ‘xfwm4’]”

    • tgallfoo says:

      Jean-Luc,

      That looks like one of the following.
      1) BBLAYERS += ‘/your-full-path/jenkins-setup/meta-openembedded/meta-xfce’ is missing from your build/conf/bblayers.conf file
      2) The path in #1 isn’t quite right. I fully qualify mine ex /home/tgall/aarch64/jenkins-setup/meta-openembedded/meta-xfce

      After editing the layers cd into openembedded-core and run

      . oe-init-build-env ../build

      I’m not 100% sure this is required after one edits the bblayers.conf file but best be safe and it doesn’t hurt.

      Less likely I’d check that you’re on the right git branches for the recipes. For the xfwm4 target tho that should be just the layer being included.

  2. tgallfoo says:

    I’ve updated the instructions. Sorry about the error you note. That’s addressed with the step to updated the bblayers.conf file as well as the new branches I’ve added.

    • Jean-Luc says:

      Thank you for posting the updated instructions.
      However, It can’t find jenkins-setup/meta-linaro/meta-browser, as the directory does not exist, and the build fails. The other two BBLAYER seems fine.

      I’ve tried to disable meta-browser, and the build goes further than before, but fails during xfconf-4.10.0 build. I’ve had this problem before, so it’s probably not related to your code.

      I’m using Ubuntu 12.04 64-bit LTS for the build, which OS do you use?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s