Commit Graph

33 Commits

Author SHA1 Message Date
6e1a52f871 cleanup: make: skip a cd to docker_src, as this is our roo Makefile 2022-05-24 17:13:00 -04:00
d488fb5703 fix: cleanup a logically incorrect && ... || shell sequence
If one of the other &&s had failed other than the last one, we'd have
descended into the OR here.
2022-05-24 17:11:33 -04:00
b433b970a6 feat: builder: Add gcc-multilib
This is needed? I don't know why.
2022-05-24 17:09:43 -04:00
b64d92b905 fix: make: Only touch (another) build sentinel on success 2022-05-24 17:09:11 -04:00
3203bdc98d fix: make: pre-mkdir the target build directory 2022-05-24 17:08:38 -04:00
0ce4a46d65 fix: build: Only touch builder sentinel on success 2022-05-24 17:04:11 -04:00
e0b62e4b47 fix: generalize Debian builder 'built' sentinel
... to all debian versions, by using a % in the Makefile.
2022-05-24 17:03:21 -04:00
1367486488 feat: openwrt: Add chunkeey's staging tree for building 2022-05-24 17:02:42 -04:00
0d9d0d3cf2 openwrt: Add the "source" mirror, from OpenWrt's git, for building 2021-05-09 19:09:59 +00:00
2b765dc058 openwrt: Handle if ${remote} is a tag ref instead of a branch
E.g., for the makefile target output-source_v21.02.0-rc1 -- you cannot
check it out as source/v21.02.0-rc1, but you can check it out as just
v21.02.0-rc1.
2021-05-09 19:08:20 +00:00
352fd5d271 openwrt: Clean up build input setup, forcing user to set it up
This makes it so that if the inputs are not available -- namely
input/.config and possibly input/files/, the build won't run. This
helps inform the user what must be done in order to get things to
build.
2021-05-09 19:06:22 +00:00
c4430001e2 Add stintel's remote to list 2021-05-09 17:25:24 +00:00
8f96b19c01 openwrt: flesh-out the documentation a bit 2021-03-16 19:41:32 +00:00
a9c953218c openwrt: document how the builder could be used 2021-03-16 19:28:18 +00:00
e9efab3688 openwrt: Use the docker_src variable in the makefile
Note that this breaks building directly from under the openwrt/ dir,
as we need to pass through the main Makefile to pick up configuration.
2021-03-16 19:27:30 +00:00
5fc260e155 Document the main Makefile a little less poorly 2021-03-16 19:27:09 +00:00
e20bf690c1 openwrt: Make the number of parallel Make jobslots configurable 2021-03-16 19:26:29 +00:00
7f20ca9ed5 Combine base input requirements for building owrt image into a var 2021-03-16 18:50:03 +00:00
c00a54a07d openwrt: add another remote (pr, for Github) 2021-02-18 02:34:04 +00:00
0f86363b3f openwrt: Add Makefile targets for building / debugging OpenWrt
The output-${remote}_${revision} (or output-${revision} from the main
remote) target builds OpenWrt with the given input diffconfig,
after checking out ${revision} from ${remote}. Note that neither the
remote nor the ref or revision can have an underscore in them and
still be properly interpreted.

Still, this is all very useful -- I can kick off a from-scratch build
with `make output-pr_p2041-mpc85xx` and in a few minutes it's ready to
review.
2021-02-18 02:30:55 +00:00
f459dc14a5 openwrt: output screen's logfile somewhere output can see
This is useful for recording compilation crashes.
2021-02-18 02:28:56 +00:00
5916b3e7a3 oops 2021-02-15 16:35:11 +00:00
b056beb2f8 Rework the builder targets so we may use different remotes
Now, in order to set up the builder at a given remote @ commit , we
will want to make

     ${docker_src}/built/openwrt-builder-remote_commit.sentinel

... and then use the openwrt-builder-remote_commit image as a base.

New remotes can / should be added to openwrt-remotes.txt. Honestly
this oughta have been under the openwrt dir but, eh.
2021-02-15 16:29:00 +00:00
8e1feaa4ff Clean up how a variable gets set up 2021-02-15 16:26:22 +00:00
959e206514 Add more targets to the openwrt toolchain 2021-02-10 01:05:27 +00:00
b05bd6d3e7 Add a README 2021-02-08 15:30:17 +00:00
7b2d32bb59 Add an example setting up an env for the previous commit
Quoting:

  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.

This lot provides exactly that. The makefile in this new dir just
requires diffconfig to be populated; then run `make output` and wait.

Q: What about adding LibreMesh

A: Just add to input.sh (or add a script to it) which does the steps
described here: https://libremesh.org/development.html. You can avoid
the 'make menuconfig' bits by pre-building a diffconfig as needed. And
if you need to debug, add a /bin/sh.
2021-02-08 15:20:55 +00:00
fe8eae25e9 openwrt-builder-commit: For commit-specific OpenWrt builds
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
2021-02-08 15:11:41 +00:00
15d7ea04c7 gitignore built/ -- for build sentinels 2021-02-08 15:06:19 +00:00
07d3c4acf5 openwrt-builder: dockerfile for an openwrt builder
This is a base builder -- it sets up *most* of the
environment right and provides a great cache; later we can git pull
again and check out the right commit, without needing to invalidate
this builder and re-clone OpenWrt again.
2021-02-08 15:04:23 +00:00
c26800155e Add an include guard to the main makeflie 2021-02-08 15:03:41 +00:00
98a0a68d57 Set up certain environment variables into a vars file 2021-02-08 14:54:02 +00:00
fc6902981c Initial setup
The point of this is to separate dockerfiles and build them on top of
each other wherever possible.

Then we can build them interdependently with makefiles!
2021-02-06 21:47:58 +00:00