Archive for June, 2013

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