[yocto] bsp experiences

Frans Meulenbroeks fransmeulenbroeks at gmail.com
Tue May 1 07:21:21 PDT 2012


Dear all,

In this email I'd like to share my experiences wrt creating a new bsp.
I hope this is useful for someone (e.g. for updating the doc). Feel
free to point out the n00bish errors I made, or where I could have
improved.

Aim was to bring my current board (powerpc mpc8313e based) onto yocto 1.2
This board is already working under oe classic.

I started fetching poky-denzil-7.0.
Tested by building core-image-minimal. No problems here.

Then I wanted to add my own bsp. Decided to use the bsp-guide as a starter.

Tried to use yocto-bsp with the standard 7.0 setup (where there is a
poky-denzil-7.0-build dir adjacent to the soruce dir).
yocto-bsp when invoked complained with:
IOError: [Errno 2] No such file or directory:
'/home/frans/poky-denzil-7.0/scripts/../build/conf/bblayers.conf'

I resolved this for now by making /home/frans/poky-denzil-7.0/build/ a
symlink to /home/frans/poky-denzil-7.0-build
Not sure if that is the desired solution but anyway this allowed me to
move forward

Reinvoked yocto-bsp create, this indeed gave progress.
Now had to decide on the machine branch to start this on. As mpc8315
is fairly close decide to start with that one.
tuning support was a bit tough. The 8313 machine conf file in
oe-classic said ppce300c3, so used ppce300c2 as a starter
next modified the file that contains the device tree to the default 8313 dts.

That generated the layer.
Still had to add the layer to bblayers.conf (I was somewhat surprised
by this as the script before complained about not being able to find
that file so I somehow expected it to be added automatically)

Also went to conf/machine in my bsp and changed it to use
tune-ppce300c3 instead of c2, and created this include file by copying
the c2 file to c3 and renaming all references to c2 by c3 (as these
were the only changes when comparing the oe classic c2 and c3 tune inc
files.

While building core-image-minimal, building the kernel failed because
recipes-kernel/linux/linux-yocto_3.2.bbappend had some references to
mpc8315*. Replaced these with mpc8313*. (not fully sure if that is
fully sound though; anyway I need to hack the kernel part anyway).
And now, while typing this, things are happily humming along, giving
me time to type this message.

Next step is probably see if I can run the executables created; if so,
move on to adding my own image recipe, and see if I can get that
going.
After that hack the kernel recipe (so it uses my own defconfig and
device tree, and add our own drivers).
I'll write a followup email if there are things that could e.g. be
avoided by updating the docs.

Frans



More information about the yocto mailing list