blob: 2568cbec7bba5f699bf3a690019e147c4c4dcf6c [file] [log] [blame]
Cloning this repo
-----------------
$ git clone --recurse-submodules git://git.kernel.org/pub/scm/linux/kernel/git/rw/yocto-rpi-example.git
OR
$ git clone git://git.kernel.org/pub/scm/linux/kernel/git/rw/yocto-rpi-example.git
$ cd yocto-rpi-example
$ git submodule update --init --recursive
Required Packages for the Build Host
------------------------------------
Debian/Ubuntu:
$ apt-get install gawk wget git-core diffstat unzip texinfo gcc-multilib \
build-essential chrpath socat cpio python3 python3-pip python3-pexpect \
xz-utils debianutils iputils-ping python3-git python3-jinja2 libegl1-mesa libsdl1.2-dev \
pylint3 xterm make xsltproc docbook-utils fop dblatex xmlto
Fedora:
$ dnf install gawk make wget tar bzip2 gzip python3 unzip perl patch \
diffutils diffstat git cpp gcc gcc-c++ glibc-devel texinfo chrpath \
ccache perl-Data-Dumper perl-Text-ParseWords perl-Thread-Queue perl-bignum socat \
python3-pexpect findutils which file cpio python python3-pip xz python3-GitPython \
python3-jinja2 SDL-devel xterm rpcgen docbook-style-dsssl docbook-style-xsl \
docbook-dtds docbook-utils fop libxslt dblatex xmlto
SUSE:
$ zypper install python gcc gcc-c++ git chrpath make wget python-xml \
diffstat makeinfo python-curses patch socat python3 python3-curses tar python3-pip \
python3-pexpect xz which python3-Jinja2 Mesa-libEGL1 libSDL-devel xterm rpcgen pip3 \
install GitPython dblatex xmlto
When not building one of the above distros, please use docker or some chroot.
This repo contains an example Ubuntu container.
$ cd docker
$ docker build --build-arg UID=$(id -u) -t yocto_builder .
$ docker run -it -v /path/to/yocto-rpi-example:/home/builder/yocto yocto_builder
container$ cd /home/builder/yocto/
Building
--------
Open init.sh and set MACHINE either to raspberrypi4-64 or raspberrypi3-64.
Other variants should work too, but are untested.
Source the init.sh script and use bitbake
$ . init.sh
$ bitbake its-image
The final image will be tmp/deploy/images/raspberrypi4-64/its-image-raspberrypi4-64.wic.bz2
You can flash it into you SDCard using dd. e.g
$ bzcat its-image-raspberrypi4-64.wic.bz2 | dd of=/dev/mmcblk0 bs=32M