pub/scm/linux/kernel/git/rw/yocto-rpi-example.git  about / heads / tags
mirror of https://git.kernel.org/pub/scm/linux/kernel/git/rw/yocto-rpi-example.git/
$ git log --pretty=format:'%h %s (%cs)%d'
356308e fixup init.sh (2021-05-24)
	(HEAD -> master)
06fc461 Use squashfs+overlayfs rootfs (2021-05-22)
2f44982 Re-Enable UART (2021-05-22)
7331952 Add HelloWorld (2021-05-22)
65baf4a More updates (2021-05-21)
39056f8 Add minimal tooling to setup yocto (2021-05-20)
b334b4f Add needed layers as submodules (2021-05-20)
3230334 Initial commit (2021-05-20)

$ git cat-file blob HEAD:README
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

# heads (aka `branches'):
$ git for-each-ref --sort=-creatordate refs/heads \
	--format='%(HEAD) %(refname:short) %(subject) (%(creatordate:short))'
* master       fixup init.sh (2021-05-24)

# tags:
$ git for-each-ref --sort=-creatordate refs/tags \
	--format='%(refname:short) %(subject) (%(creatordate:short))'
# no tags, yet...

git clone https://80x24.org/lore/pub/scm/linux/kernel/git/rw/yocto-rpi-example.git