Now we can set up an OpenWrt builder as we want -- just run
make built/openwrt-builder-${commit}.sentinel
and then
docker run ${args} openwrt-builder-${commit} ${CMD}
This will won't need to pull down everything from scratch: the image
is already cached and has everything it needs to compile.
As for what ${args} would need to be for this to work:
- You need to mount a +x build system prep script to /input.sh
- You need to mount a +x build system output extractor to /output.sh
- You need to mount a folder with input resources to /input
- You need to mount an output folder to /output
So, /input.sh could `cp /input/diffconfig /builder/openwrt/.config`,
then cd to /builder/openwrt and run `make defconfig`. The ${CMD} could
then actually build, and /output.sh could collect logs and build
artefacts to /output.
But each of those build system setups can be disincluded from the
main build-system setup per-commit. We no longer have to repeatedly
setup the entire build system just to keep build environments for
different boards separate: only the things that are different between
build trees need that to be done.
Oh, and no more builds spoiled by stale artefacts :D
11 lines
192 B
Docker
11 lines
192 B
Docker
FROM openwrt-builder
|
|
|
|
ARG commit
|
|
|
|
RUN cd ${openwrt_dir} \
|
|
&& git pull origin master \
|
|
&& git checkout ${commit} \
|
|
&& ./scripts/feeds update -a \
|
|
&& ./scripts/feeds install -a
|
|
|