commit | 5c6fbb7d6fce913458c659c88d8e677b077b7284 | [log] [tgz] |
---|---|---|
author | Jan Kundrát <jan.kundrat@cesnet.cz> | Fri Oct 27 13:31:06 2017 +0200 |
committer | Jan Kundrát <jan.kundrat@cesnet.cz> | Fri Oct 27 13:52:30 2017 +0200 |
tree | fbc1ed96cc95e927ebd1aa80a5164a59a0a4487a | |
parent | 1206f77c4120b6e69df5da966aefd651248e3b33 [diff] |
Document how to use submodules for a simple build Change-Id: I14bd9d05999fcad7d68f78707c5f06d1093a3fe1
This repository contains CzechLight-specific bits for Buildroot. Buildroot is a tool which produces system images for flashing to embedded devices. They have a nice documentation which explains everything that one might need.
Everything is in Gerrit. One should not need to clone anything from anywhere else. The build will download source tarballs of various open source components, though.
TODO: Automate this via the CI system. I want to get the .img
files for testing of each change, eventually.
git clone ssh://$YOUR_LOGIN@cesnet.cz@gerrit.cesnet.cz:29418/CzechLight/br2-external czechlight pushd czechlight git submodule update --init --recursive popd mkdir build-clearfog cd build-clearfog ../czechlight/dev-setup-git.sh make czechlight_clearfog_defconfig make
A full rebuild takes between 30 and 45 minutes on a T460s laptop for targets which use a pre-generated Linaro toolchain (clearfog
, beaglebone
). Other targets take longer because one has to build a toolchain first. When the build finishes, the generated image to be dd
-ed to an SD card is at images/sdcard.img
.
WARNING: Buildroot is fragile. It is not safe to perform incremental builds after changing an "important" setting. Please check their manual for details. Using ccache
might help, but a significant time is wasted in configure
steps which are not parallelized :( as of October 2017.
Apart from the traditional way of re-flashing the SD card or the eMMC from scratch, it's also possible to use RAUC to update. This method preserves the U-Boot version and the U-Boot's environment. Apart from that, everything starting with the kernel and the DTB file and including the root FS is updated.
FIXME: the system uses separate config partitions (/cfg
), so these persistent bits are not preserved yet (see these user stories).
To install an update:
# build node make rsync -avP images/update.raucb somewhere.example.org:path/to/web/root # target, perhaps via an USB console wget http://somewhere.example.org/update.raucb -O /tmp/update.raucb rauc install /tmp/update.raucb reboot