Commit Graph

196 Commits

Author SHA1 Message Date
Adrian Schmutzler 225116dfd2 OpenWrt: bump to 19.07.3
Bump main repo, packages and routing repos.

Refresh patches, drop upstreamed ones.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2020-06-18 11:58:54 +02:00
Adrian Schmutzler 12422a5ea4 buildscript: check selected_bsp link target
While buildscript checks whether selected_bsp exists, it does not
verify whether it is pointing to a sensible direction.

Since we use the target file name and content to derive build folders
etc., though, this patch adds a check and exits the script if the
link is broken.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2020-04-17 17:05:08 +02:00
Fabian Bläse 5e37a2e9ba buildscript: clean feeds before updating them
When installing feed packages that already have been installed
from a different feed, OpenWrts feeds script does not change
the feed, but keeps the already installed package.

Therefore, packages are not updated to the correct feed on
updatefeeds, when the package is moved to a different feed
in our buildscript.

The update_feeds function already contains code to clean the already
installed feeds, but only removes the symlinks to the feed directory.
OpenWrts package installation directory (packages/feeds/*) is not
removed, however.

The 'clean' command of the scripts/feeds script properly cleans up
both directories. Hence, the 'rm' command is replaced with it.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-04-17 17:04:58 +02:00
Adrian Schmutzler 9b90dcb98e buildscript: update gluon packages repository
Our checkout of the Gluon packages is from 2017. This uses a recent
version which pulls in some improvements for simple-tc.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2020-04-17 15:50:09 +02:00
Adrian Schmutzler 958f9d09ca buildscript: use micrond from official package repo
micrond has been accepted into the official OpenWrt package repo
and is available in the openwrt-19.07 stable branch. Use this
source instead of the Gluon packages.

During merge, a few fixes/adjustments were made, including transfer
to procd.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2020-04-17 15:50:02 +02:00
Adrian Schmutzler 311bc8fc0f buildscript: remove kmod-batman-adv-legacy from package list
We do not use this package anymore, so remove it from package
selector as well.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2020-04-17 15:49:51 +02:00
Fabian Bläse 11ab5f15a7 bsp: autogenerate machine variable from filename
Because we nowadays only use bsp files as a wrapper for
OpenWrt targets, the machine variable got obsolete.
It's only use today is to locate the configuration folder for
a specific bsp.

Instead of explicitly defining this variable, it is now generated
from the filename of the bsp.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-04-17 15:49:46 +02:00
Adrian Schmutzler 157ddf2bc9 buildscript: copy all squashfs images for one device
So far, we are selecting specific squashfs images to be copied
from openwrt bin folder to our "final" bin directory. This has
the disadvantage that additional image types/names have to be
added explicitly, bloating the relevant code in buildscript.

With this patch, this behavior is changed in order to copy all
squashfs images for a particular device. To achieve that, the
image names in the bsp files are changed to contain a wildcard
that will be evaluated in buildscript.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2020-04-15 15:59:28 +02:00
Fabian Bläse c962c8465b buildscript: Move to OpenWrt 19.07.2
Bumped openwrt main repo, packages and routing to 19.07.2.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-03-15 22:03:46 +01:00
Fabian Bläse 32740ed90c buildscript: Put binaries in seperate folders per variant.
To make it easier to find the correct binary, this creates
a seperate folder for every variant and copies the binaries
appropriately.

The folder is created with "-p" to suppress errors, if it already
exists. This means the misplaced creation of the "bin"-folder inside
the build function can be ommited.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
2019-12-24 12:52:05 +01:00
Fabian Bläse 581eb9d469 buildscript: Remove prepare from buildall command
The builds for all BSPs have been merged into a single OpenWRT buildroot.
A prepare between builds cleans everything that has already been built,
including host tools. Building for multiple targets therefore takes quite
a bit longer than it has to.

This removes the prepare command between builds in the buildall command.
It now behaves exactly like multiple conscutive "selectbsp, build" commands,
which speeds up the build for multiple devices a lot.

This now means, that prepare has to be executed before buildall can be used,
just like with the 'build' command.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
2019-11-23 16:40:02 +01:00
Fabian Bläse 3e1f6e167d Remove target and subtarget from filename
This simplifies and shortens filenames quite significantly.

A rewrite script will be installed on the update servers
to allow updating routers with older firmwares.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
2019-11-20 20:05:03 +01:00
Fabian Bläse 84a937b798 buildscript: add variant information to firmware_release
This also introduces a variant variable in our buildscript, as
it is necessery multiple times in the build process.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
2019-11-20 20:04:09 +01:00
Fabian Bläse 9fc263d093 Bump openwrt, packages and routing to v18.06.5, rebase patches
Signed-off-by: Fabian Bläse <fabian@blaese.de>
2019-11-17 22:14:43 +01:00
Fabian Bläse 441e3a8e3c buildscript: Apply variant to builddir in build step
The build variant previously only got applied in the prepare
step. Therefore selecting a new variant for a subsequent build
without calling prepare again produced a build with a different
variant than the selected one.

As the filename and version number is evaluated in the prebuild
step, which is called on every build, the version number did use
selected variant, so the build variant did not match the variant
in the version string.

As applying the variant only causes the fff-base package to be
fully rebuilt, this step is moved into a function and also executed
in buildscripts prebuild step. It is therefore always applied when
starting a new build.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2019-11-17 22:14:10 +01:00
Adrian Schmutzler 3720af5ee5 buildscript: Add separate parameter to update feeds in build dir
By running "./buildscript updatefeeds", the feeds in build dir are
recreated without touching the rest of the directory.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2019-11-10 14:27:46 +01:00
Adrian Schmutzler 78e187e7c7 buildscript: Remove obsolete target variable
This removes the target variable, as it is just an alias for
builddir now.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2019-11-10 14:27:46 +01:00
Adrian Schmutzler d43ef0a6a0 buildscript: Do not use target-dependent build directory
So far, building the firmware happens in parallel subdirectories
of "build", one for each subtarget. However, OpenWrt itself is
capable of hosting several target builds in its directory, so
there is no need for this extra separation.

This patch thus build all targets/subtargets directly in the
"build" folder.

Since most of the time during build is spent for the toolchain,
this will also significantly boost build time if more than one
target is used.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2019-11-10 14:27:46 +01:00
Adrian Schmutzler 8edb1689a3 buildscript: Remove target binaries from build dir before building
So far, if build fails, but images from last successful build are
present in OpenWrt build directory (build/bin/targets/...), those
are copied even after unsuccessful build.

This results in the old images being copied to the bin folder and
being labelled with the new firmware revision. (!)
As our error check also only looks at whether images are there,
the image copying process will look like a success.

This patch deletes old images of the target/subtarget to be built,
so that the copy-firmware step will find nothing if the build
stop to early.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2019-10-07 14:24:50 +02:00
Fabian Bläse a08d42f6aa Bump openwrt, packages and routing to v18.06.4
Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
2019-07-22 22:45:45 +02:00
Adrian Schmutzler 95bfe752f0 buildscript: Remove warning due to long factory file names
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2019-06-16 10:24:42 +02:00
Adrian Schmutzler 9e6b4c6982 buildscript: Improve loop for applying build_patches
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
2019-04-10 15:26:31 +02:00
Adrian Schmutzler 014f66a8d7 buildscript/patches: Automatically scan directories for feeds
The buildscript knows two different types of patches, which are
applied to pulled-in repositories:

1. Feed patches
Those are applied as "GIT patches" to the relevant repos,
directly after those have been checked out.
They reside in subfolders of the build_patches folder, and
have to be selected individually and manually in the
buildscript.sh.

2. Build patches
Those are applied later in the process, just using the system
patch tool, and changing the $target directory.
All patches in the folder "build_patches/openwrt" are read
and applied automatically.

This is both inconsistent (two different types of patches in
the same dir) and annoying (feed patches have to be specified
by hand), especially for unexperienced developers.

This patch addresses this by:
- separating files into two dirs: build_patches and feed_patches
- automatically scanning feed patches and thus having similar
  experience for the user (I cannot think of a case where we
  provide a patch, but do not use it)

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
2019-04-10 15:26:16 +02:00
Adrian Schmutzler 803126e1de buildscript: Indicate current patch being applied
So far, we only saw the files affected, but not the patch used.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
2019-02-10 22:44:47 +01:00
Adrian Schmutzler e34f5b0119 build: Remove "squashfs" from image names
This is just meant to make image names shorter.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Christian Dresel <fff@chrisi01.de>
2019-02-10 22:44:06 +01:00
Adrian Schmutzler 140ea5fe98 buildscript: Fix indentation
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
2019-02-05 14:29:31 +01:00
Adrian Schmutzler 862f3cdf41 buildscript: Include build variant in firmware version label
With this change, based on a tag "20190101" two firmwares
node-20190101
layer3-20190101
can be created based on build variant.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
2019-02-05 14:29:31 +01:00
Tim Niemeyer f0eae4fff4 buildscript: support to choose the build variant
Signed-off-by: Tim Niemeyer <tim@tn-x.org>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2019-02-05 14:29:31 +01:00
Adrian Schmutzler 277e90061c OpenWrt: Bump openwrt, packages and routing to v18.06.2
Refresh patches.

This introduces backported BATMAN fixes up to v2019.0.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
2019-02-03 03:05:29 +01:00
Tim Niemeyer 23a81ffb9a packages/fff: add new fff-babeld package
Signed-off-by: Tim Niemeyer <tim@tn-x.org>
Signed-off-by: Fabian Bläse <fabian@blaese.de>
- Convert configuration to uci
- Split IPv4 network rules to fff specific subnets
- Add IPv6 ULA network rules
- Change PKG_VERSION to single number versioning
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
- Removed "delete batman-adv.bat0"

Reviewed-by: Christian Dresel <fff@chrisi01.de>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2019-01-28 13:10:40 +01:00
Tim Niemeyer 65d6a2c505 OpenWrt: Use the tiny target and update names
Signed-off-by: Tim Niemeyer <tim@tn-x.org>
[fabian@blaese.de: Add missing ATH79 MACHs]
Signed-off-by: Fabian Bläse <fabian@blaese.de>
Acked-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-10-24 18:03:55 +02:00
Adrian Schmutzler 6c24b89f16 OpenWRT: Update OpenWrt, packages and routing to openwrt-18.06
Refresh patches.

Bumps batman-adv to 2018.1

This goes beyond 18.06.0 since the release contains bug which
have been fixed in the later snapshots.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
[fabian@blaese.de: Use 18.06.1 for OpenWRT and packages]
Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-10-24 18:02:11 +02:00
Tim Niemeyer c1fc513cef buildscript: remove community config
The community file is not used anymore.

Signed-off-by: Tim Niemeyer <tim@tn-x.org>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-08-06 15:31:32 +02:00
Fabian Bläse a88484a63d Add batman-adv patch to remove gw mode switch message
This patch suppresses the messages batman writes to
the kernel log when gw_mode is changed. This is done
to avoid spamming the log with negligible messages
when gw_mode is switched frequently.

Fixes: #93

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
Tested-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2018-07-25 23:02:11 +02:00
Adrian Schmutzler 686d0ee2d3 alfred: Support interfaces IDs with more than two digits
Occationally /proc/net/if_inet6 contains interface IDs with
three digits. In this case, the regex in wait_for_ll_address()
does not work anymore and alfred is not starting.

This patch changes the evaluation so that fields are used instead
of the mere position by counting characters.

This is a backport from openwrt-routing and can be removed when
updating to OpenWRT 18.06, but not for newer versions of 17.01.

Fixes #98.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Tested-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Robert Langhgammer <rlanghammer@web.de>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
2018-06-17 10:27:41 +02:00
Adrian Schmutzler 4a23b1baf7 LEDE: Go back to OpenWRT sources
After the remerge the LEDE git source is broken, thus we switch
to the OpenWRT sources.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2018-01-03 21:30:30 +01:00
Robert Langhammer 95507d1728 fastd: generate the key from urandom
We do not use encrypted tunnels, so we can use urandom generating the keys to prevent blocking due to low entropy.

Signed-off-by: Robert Langhammer <rlanghammer@web.de>
Tested-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2017-12-22 14:06:05 +01:00
Adrian Schmutzler c54596d63f Support subtarget in buildscript
Prepares a subtarget variable for cases where it is not 'generic'

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
- Rebased
Signed-off-by: Tim Niemeyer <tim@tn-x.org>
2017-11-04 17:29:31 +01:00
Adrian Schmutzler 3f9b71d901 buildscript: Fix typo
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
2017-10-25 14:40:38 +02:00
Christian Dresel 60fecf6ea5 Update Batman to compat15
This is not compatible with the old Batman!

Signed-off-by: Jan Kraus <mayosemmel@gmail.com>
Signed-off-by: Christian Dresel <fff@chrisi01.de>
Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
2017-10-15 17:30:08 +02:00
Adrian Schmutzler a4550ad691 buildscript: Update LEDE and packages, use lede git mirror
- Fixes dnsmasq CVE-2017-13704
- Adds LED support to WA850RE v1

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
2017-10-14 17:57:49 +02:00
Adrian Schmutzler fd41c72013 simple-tc: Fix simple-tc not being active if set
Fixes: #55

This reintroduces the broken simple-tc.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Signed-off-by: Tim Niemeyer <tim@tn-x.org>
Tested-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2017-09-18 19:16:56 +02:00
Tim Niemeyer 6ce8cc5489 buildscript: simplify the use of patches for feeds
Do this by applying the path within the patch function.

Signed-off-by: Tim Niemeyer <tim@tn-x.org>
Tested-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2017-09-18 19:16:50 +02:00
Tim Niemeyer eb05402d48 buildscript: refresh lede/routing/gluon/packages repos
Changes that are relevant for us:
gluon:
    update batman-adv-legacy

lede:
    mbed-tls security fixes
    kernel update
    procd update
    switch Ports on tl-wr741nd
    mac address von tl-wr1043nd-v4

Signed-off-by: Tim Niemeyer <tim@tn-x.org>
Tested-by: Christian Dresel <fff@chrisi01.de> (auf einen 1043 v4)
Reviewed-by: Christian Dresel <fff@chrisi01.de>
2017-09-17 19:34:50 +02:00
Peter J. Philipp bb426c9e71 Check for root and bail out if the user is root.
Signed-off-by: Peter J. Philipp <freifunk@centroid.eu>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
2017-08-20 14:29:23 +02:00
Tim Niemeyer 5db3baa11c build_patches: change to git am format
With git am format, it is easier to apply the patches locally.

Signed-off-by: Tim Niemeyer <tim@tn-x.org>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2017-07-28 07:51:17 +02:00
Tim Niemeyer 9fb0b6b045 buildscript: patch source before generating feeds
.. otherwise the applied patches are not used while generating the
openwrt config.

Signed-off-by: Tim Niemeyer <tim@tn-x.org>
Reviewed-by: Tobias Klaus <tk+ff@meskal.net>
2017-07-28 07:36:34 +02:00
Tim Niemeyer 4d3f09ca3a buildscript: update lede to 17.01.2
Signed-off-by: Tim Niemeyer <tim@tn-x.org>
Reviewed-by: Tobias Klaus <tk+ff@meskal.net>
Tested-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2017-07-28 07:33:10 +02:00
Adrian Schmutzler 9d00b686a2 feeds/packages: update
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Tobias Klaus <tk+ff@meskal.net>
2017-06-02 23:20:07 +02:00
Adrian Schmutzler ca8afbe68b lede: update revision
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Tobias Klaus <tk+ff@meskal.net>
2017-06-02 23:20:07 +02:00