commit | 94106d1a972ec4ba7697798aa9454ac5b644e30e | [log] [tgz] |
---|---|---|
author | Erico Nunes <nunes.erico@gmail.com> | Thu Apr 05 12:25:21 2018 +0200 |
committer | Miroslav Mareš <mmares@cesnet.cz> | Thu Apr 05 17:22:59 2018 +0200 |
tree | e43352c1c4f5dd1adae237a0eda637dc6afdd6cd | |
parent | acf4305e7a0b2c12dcfccd7c0ce3d23a4f268237 [diff] |
grub2-tools: new package Support tools to interact with GNU GRUB Multiboot boot loader. In the context of Buildroot, some useful target tools provided by grub2-tools are grub2-editenv, grub2-reboot, which provide means to manage the Grub 2 environment, boot order, and others. This package is also meant as a preparation step to be turned into a host-package later and help decouple the target and host portions of the actual Grub 2 boot loader package. Signed-off-by: Erico Nunes <nunes.erico@gmail.com> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Downloaded from: https://patchwork.ozlabs.org/patch/755651/ Reviewed-by: Miroslav Mareš <mmares@cesnet.cz> Change-Id: Ic91591b584c832c936b49af76f1f56fd7c6cf5ad
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.
A significant amount of time is wasted in configure
steps which are not parallelized :( as of November 2017. This can be hacked by patching Buildroot's top-level Makefile
, but note that one cannot easily debug stuff afterwards.
diff --git a/Makefile b/Makefile index 79db7fe..905099a 100644 --- a/Makefile +++ b/Makefile @@ -114,7 +114,7 @@ endif # this top-level Makefile in parallel comment the ".NOTPARALLEL" line and # use the -j<jobs> option when building, e.g: # make -j$((`getconf _NPROCESSORS_ONLN`+1)) -.NOTPARALLEL: # absolute path TOPDIR := $(CURDIR)
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. Configuration stored in /cfg
is brought along and preserved as well.
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