[Cerowrt-devel] Cerowrt build helper script

Toke Høiland-Jørgensen toke at toke.dk
Sun Jun 30 17:33:10 EDT 2013


Hey everyone

I think it's past time I introduce my build helper script for cerowrt to
the list. It's meant to be an easy way to set up a build environment
that matches the releases cero builds to do your own experimentation
and/or customisations on.

The script resides in the cerowrt-next repository on Github, so the
first step is to clone that from
https://github.com/dtaht/cerowrt-next.git

Once a clone of the repository is obtained, the build script lives in
the scripts/ dir and is called cerobuild.sh. To just set up a build
environment, simply run it from the root of the checkout; that will
clone the auxiliary repositories containing the packages and filesystem,
and check out the right revisions, link things into the right places and
copy over the config. Basically making the whole thing ready to run
'make'.

By default, the package repositories are stored in the dl/ subfolder of
the cerowrt checkout, and the filesystem is stored in the env/ subfolder
(which is also the upstream openwrt defaults). There's a bit of help
From the script if it's run with a -h parameter.

After the first run, the script creates a hidden config file, which will
make it do its best on subsequent runs to update to the current version
without disturbing any customisations made to the repository.

Updates come from the main cerowrt repository, and have to be pulled
manually. The script uses some helper files stored in the repository to
keep the checkouts of the auxiliary repositories in sync. Things have a
tendency to break if the upstream package repositories get too out of
sync with the main repository content, which these files are meant to
remedy. The caveat is that they have to be updated (semi-)manually which
is not always done (bugging Dave and me to remember might help on this
account). Passing the -H parameter to the script will update all
auxiliary repositories to their current HEADs, which might work better
in that case. Feel free to experiment.

Another caveat is that the updated version of the script (which is a bit
more benign in its default invocation) is only in the current git HEAD.
I.e. while the script itself has existed for some months, older checkout
versions (such as the tagged revisions) will have the old version, so
bear this in mind if building older versions. My hope is that as the
script matures, and the updating of the revision files becomes better
integrated into the release process, that it will be possible to
check out any tagged version and use the script to get a build that is
for all intents and purposes identical to the binary version released by
Dave. However, I don't thing we're quite there yet.

I hope the above explanation (and the script itself) is somewhat
comprehensible and maybe even useful. Of course some familiarity with
the openwrt build process helps (see the wiki at openwrt.org), but
hopefully this script will make it easier to get started. As always,
comments, questions, bug reports and patches are very welcome. :)

Cheers,

-Toke
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 489 bytes
Desc: not available
URL: <https://lists.bufferbloat.net/pipermail/cerowrt-devel/attachments/20130630/e468efdd/attachment.sig>


More information about the Cerowrt-devel mailing list