The process is straightforward with a few pitfalls. First initialize the OpenEmbedded build environment:
git clone git://git.openembedded.org/openembedded-core oe-core
cd oe-core
git clone git://git.openembedded.org/bitbake bitbake
git checkout krogoth
cd bitbake
git checkout 1.30
cd ..
. ./oe-init-build-env
cd ../..
Now you should at the same level with oe-core
. Clone the required layers:
git clone git://git.openembedded.org/bitbake
git clone git://git.openembedded.org/openembedded-core
git clone git://git.openembedded.org/meta-openembedded
git clone git://github.com/meta-qt5/meta-qt5.git
git clone git://git.openembedded.org/meta-xilinx
git clone https://github.com/Xilinx/meta-petalinux.git
Go to the build folder by cd oe-core/build
. Modify the conf/bblayer.conf
to something like
# LAYER_CONF_VERSION is increased each time build/conf/bblayers.conf
# changes incompatibly
LCONF_VERSION = "7"
BBPATH = "${TOPDIR}"
BBFILES ?= ""
BBLAYERS ?= " \
<your top dir>/oe-core/meta \
<your top dir>/meta-openembedded/meta-perl \
<your top dir>/meta-openembedded/meta-systemd \
<your top dir>/meta-openembedded/meta-gpe \
<your top dir>/meta-openembedded/meta-python \
<your top dir>/meta-openembedded/meta-efl \
<your top dir>/meta-openembedded/meta-ruby \
<your top dir>/meta-openembedded/meta-filesystems \
<your top dir>/meta-openembedded/meta-gnome \
<your top dir>/meta-openembedded/meta-multimedia \
<your top dir>/meta-openembedded/meta-networking \
<your top dir>/meta-openembedded/meta-webserver \
<your top dir>/meta-openembedded/meta-xfce \
<your top dir>/meta-openembedded/meta-initramfs \
<your top dir>/meta-openembedded/meta-oe \
<your top dir>/meta-qt5 \
<your top dir>/oe-core/meta-selftest \
<your top dir>/oe-core/meta-skeleton \
<your top dir>/meta-xilinx \
<your top dir>/meta-petalinux \
"
Add these to the top of conf/local.conf
:
PARALLEL_MAKE = "-j 8"
BB_NUMBER_THREADS = "8"
LICENSE_FLAGS_WHITELIST = "commercial"
MACHINE = "zedboard-zynq7"
Run bitbake core-image-minimal
in the build
directory. You should see the error:
ERROR: No recipes available for:
xxx/oe-core/meta-xilinx/recipes-microblaze/gcc/gcc-source_6.%.bbappend
xxx/oe-core/meta-xilinx/recipes-zynqmp/qemu/qemu_2.6%.bbappend
xxx/oe-core/meta-petalinux/recipes-core/udev/udev_%.bbappend
The solution is simple: rm -rf
the recipes :)
rm -rf xxx/oe-core/meta-xilinx/recipes-microblaze/gcc
rm -rf xxx/oe-core/meta-xilinx/recipes-zynqmp/qemu
rm -rf xxx/oe-core/meta-petalinux/recipes-core/udev
And now you can run BitBake to build the image:
bitbake core-image-minimal