From 1095594925743e5695454259bd5d5b0dd08993e1 Mon Sep 17 00:00:00 2001 From: Sven Roederer Date: Mon, 17 Feb 2020 22:57:04 +0100 Subject: [PATCH 01/82] rename packages folder to imagetypes When we started to use some code of the gluon framework a minor conflict of the useage of the packages-folder came up. We use it to store the package lists for our images, Gluon uses this folder to store the upstream repos. By this double-use there are always the repos inseide the folder and causing git to report them as untracked files. Adding the folder to .gitignore is also no option, as we need it for our package lists. So just lets move our files and adjust .gitignore. --- .gitignore | 1 + {packages => imagetypes}/manual.txt | 0 {packages => imagetypes}/manual_4MB.sh | 0 {packages => imagetypes}/manual_4MB.txt | 0 {packages => imagetypes}/mesh_4MB.txt | 0 {packages => imagetypes}/notunnel.txt | 0 {packages => imagetypes}/notunnel_4MB.sh | 0 {packages => imagetypes}/notunnel_4MB.txt | 0 {packages => imagetypes}/tunnel-berlin-openvpn.txt | 0 {packages => imagetypes}/tunnel-berlin-openvpn_4MB.sh | 0 {packages => imagetypes}/tunnel-berlin-openvpn_4MB.txt | 0 {packages => imagetypes}/tunnel-berlin-tunneldigger.txt | 0 {packages => imagetypes}/tunnel-berlin-tunneldigger_4MB.sh | 0 {packages => imagetypes}/tunnel-berlin-tunneldigger_4MB.txt | 0 14 files changed, 1 insertion(+) rename {packages => imagetypes}/manual.txt (100%) rename {packages => imagetypes}/manual_4MB.sh (100%) rename {packages => imagetypes}/manual_4MB.txt (100%) rename {packages => imagetypes}/mesh_4MB.txt (100%) rename {packages => imagetypes}/notunnel.txt (100%) rename {packages => imagetypes}/notunnel_4MB.sh (100%) rename {packages => imagetypes}/notunnel_4MB.txt (100%) rename {packages => imagetypes}/tunnel-berlin-openvpn.txt (100%) rename {packages => imagetypes}/tunnel-berlin-openvpn_4MB.sh (100%) rename {packages => imagetypes}/tunnel-berlin-openvpn_4MB.txt (100%) rename {packages => imagetypes}/tunnel-berlin-tunneldigger.txt (100%) rename {packages => imagetypes}/tunnel-berlin-tunneldigger_4MB.sh (100%) rename {packages => imagetypes}/tunnel-berlin-tunneldigger_4MB.txt (100%) diff --git a/.gitignore b/.gitignore index 3f04ffea9a..bf9d2c3c01 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ bin ^openwrt firmwares dl +/packages diff --git a/packages/manual.txt b/imagetypes/manual.txt similarity index 100% rename from packages/manual.txt rename to imagetypes/manual.txt diff --git a/packages/manual_4MB.sh b/imagetypes/manual_4MB.sh similarity index 100% rename from packages/manual_4MB.sh rename to imagetypes/manual_4MB.sh diff --git a/packages/manual_4MB.txt b/imagetypes/manual_4MB.txt similarity index 100% rename from packages/manual_4MB.txt rename to imagetypes/manual_4MB.txt diff --git a/packages/mesh_4MB.txt b/imagetypes/mesh_4MB.txt similarity index 100% rename from packages/mesh_4MB.txt rename to imagetypes/mesh_4MB.txt diff --git a/packages/notunnel.txt b/imagetypes/notunnel.txt similarity index 100% rename from packages/notunnel.txt rename to imagetypes/notunnel.txt diff --git a/packages/notunnel_4MB.sh b/imagetypes/notunnel_4MB.sh similarity index 100% rename from packages/notunnel_4MB.sh rename to imagetypes/notunnel_4MB.sh diff --git a/packages/notunnel_4MB.txt b/imagetypes/notunnel_4MB.txt similarity index 100% rename from packages/notunnel_4MB.txt rename to imagetypes/notunnel_4MB.txt diff --git a/packages/tunnel-berlin-openvpn.txt b/imagetypes/tunnel-berlin-openvpn.txt similarity index 100% rename from packages/tunnel-berlin-openvpn.txt rename to imagetypes/tunnel-berlin-openvpn.txt diff --git a/packages/tunnel-berlin-openvpn_4MB.sh b/imagetypes/tunnel-berlin-openvpn_4MB.sh similarity index 100% rename from packages/tunnel-berlin-openvpn_4MB.sh rename to imagetypes/tunnel-berlin-openvpn_4MB.sh diff --git a/packages/tunnel-berlin-openvpn_4MB.txt b/imagetypes/tunnel-berlin-openvpn_4MB.txt similarity index 100% rename from packages/tunnel-berlin-openvpn_4MB.txt rename to imagetypes/tunnel-berlin-openvpn_4MB.txt diff --git a/packages/tunnel-berlin-tunneldigger.txt b/imagetypes/tunnel-berlin-tunneldigger.txt similarity index 100% rename from packages/tunnel-berlin-tunneldigger.txt rename to imagetypes/tunnel-berlin-tunneldigger.txt diff --git a/packages/tunnel-berlin-tunneldigger_4MB.sh b/imagetypes/tunnel-berlin-tunneldigger_4MB.sh similarity index 100% rename from packages/tunnel-berlin-tunneldigger_4MB.sh rename to imagetypes/tunnel-berlin-tunneldigger_4MB.sh diff --git a/packages/tunnel-berlin-tunneldigger_4MB.txt b/imagetypes/tunnel-berlin-tunneldigger_4MB.txt similarity index 100% rename from packages/tunnel-berlin-tunneldigger_4MB.txt rename to imagetypes/tunnel-berlin-tunneldigger_4MB.txt From 01a0b5888775e17f1473797e48f18db245b06ee9 Mon Sep 17 00:00:00 2001 From: Sven Roederer Date: Mon, 17 Feb 2020 23:07:35 +0100 Subject: [PATCH 02/82] assemble_firmware.sh: adapt to renamed packages folder --- assemble_firmware.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assemble_firmware.sh b/assemble_firmware.sh index 889be15a0c..105eec49da 100755 --- a/assemble_firmware.sh +++ b/assemble_firmware.sh @@ -15,7 +15,7 @@ set -e IB_FILE="" PROFILES="" TEMP_DIR="" -PKGLIST_DIR="$(dirname "$0")/packages" +PKGLIST_DIR="$(dirname "$0")/imagetypes" DEST_DIR="$(dirname "$0")/firmwares" DEBUG="" USECASES="" From 2fe7a1965f3f0727a5ffb98a04c40ff8055d2a0f Mon Sep 17 00:00:00 2001 From: Sven Roederer Date: Sun, 23 Feb 2020 16:38:16 +0100 Subject: [PATCH 03/82] README: short description of this branch --- README.md | 244 ++---------------------------------------------------- 1 file changed, 5 insertions(+), 239 deletions(-) diff --git a/README.md b/README.md index 23a6a42552..b29509bf27 100644 --- a/README.md +++ b/README.md @@ -7,243 +7,9 @@ broken stuff in OpenWrt itself or for example LuCI) and additional default packa ## Contact / More information -More user relevant information about the firmware are on the wiki page at: https://wiki.freifunk.net/Berlin:Firmware. There you can also find the -* [ReleaseNotes](https://wiki.freifunk.net/Berlin:Firmware/v1.0.2) -* a tutorial ([en](https://wiki.freifunk.net/Berlin:Firmware:En:Howto) / [de](https://wiki.freifunk.net/Berlin:Firmware:Howto)) on router configuration +This branch is used to integrate the gluon-build-framework to out buildsystem. The intention +is based on: +* using "scripts/target_config.lua" +* use the more flexible package-selection for kernel-packages as seen in "targets/ath79-generic" +* feature the flexible selection of finally published images (sysupgrade, factory, tftp, initrd) -For questions write a mail to or come to our weekly meetings. -If you find bugs please report them at: https://github.com/freifunk-berlin/firmware/issues - -## Development - -### Info - -For the Berlin Freifunk firmware we use vanilla OpenWrt with additional patches -and packages. The Makefile automates firmware -creation and apply patches / integrates custom freifunk packages. All custom -patches are located in *patches/* and all additional packages can be found at -http://github.com/freifunk-berlin/packages_berlin. - -### Build Prerequisites - -Please take a look at the [OpenWrt documentation](https://openwrt.org/docs/guide-developer/build-system/install-buildsystem?s[]=prerequisites#prerequisites) -for a complete and uptodate list of packages for your operating system. Make -sure the list contains `quilt`. We use it for patch management. - -On Ubuntu/Debian: -``` -apt-get install git build-essential libncurses5-dev zlib1g-dev gawk time \ - unzip libxml-perl flex wget gawk libncurses5-dev gettext quilt python libssl-dev -``` - -On openSUSE: -``` -zypper install --type pattern devel_basis -zypper install git ncurses-devel zlib-devel gawk time \ - unzip perl-libxml-perl flex wget gawk gettext-runtime quilt python libopenssl-devel -``` -On Arch/Antergos: -``` -pacman -S base-devel git ncurses lib32-zlib gawk time unzip perl-xml-libxml \ - flex wget gettext quilt python openssl -``` - -### Building all firmwares - -To get the source and build the firmware locally use: - -``` -git clone https://github.com/freifunk-berlin/firmware.git -cd firmware -make -``` - -The build will take some time. You can improve the build time with [build options](https://openwrt.org/docs/guide-developer/build-system/use-buildsystem) -such as `-j `. `V=s` will give more verbose error messages. - -An internet connection is required during the build process. A good internet -connection can improve the build time. - -You need approximately 10GB of space for the build. - -### Directory Layout - -You can find the actual firmware images generated by the ImageBuilder (and the ImageBuilder itself) -in `firmwares`. The layout looks like the following: - -``` -firmwares/ - TARGET/ - backbone/ - images.. - default/ - images.. - ... - OpenWrt-ImageBuilder-....tar.xz - OpenWrt-SDK-....tar.xz - initrd/ - images.. - packages/ - packages/ - base/*.ipk - luci/*.ipk - packages/*.ipk - packages_berlin/*.ipk - routing/*.ipk - targets/MAINTARGET/SUBTARGET/packages/ - *.ipk -``` - -As you notice there are several different image variants ("backbone", "default", etc.). -These different *packages lists* are defined in `packages/`. -See the "Features" section above for a description of the purpose of each package list. -With the "OpenWrt-Imagebuilder" you can assemble your own image variant with your -*packages lists* without having to compile everything yourself. The "OpenWrt-SDK" is -the fastest way to build your own packages or programs without compiling OpenWrt itself. -The "initrd" directory contains some initrd-images for netboot, which are required on -some boards to initially install OpenWrt. - -### customizing make - -`make` will use by default `TARGET` and `PACKAGES_LIST_DEFAULT` defined in -`config.mk`. You can customize this by overriding them: - -``` -make TARGET=mpc85xx PACKAGES_LIST_DEFAULT=backbone -``` -in addition you can build your own image from a prebuilt imagebuilder by something like: - -``` -make images IB_FILE= TARGET=... PACKAGES_LIST_DEFAULT=... -``` - -The default target is `ar71xx-generic`. For a complete list of supported targets look in `configs/` for the target-specific configs. -Each of these targets need a matching file in `profiles/` with the profiles (boards) that should be build with the imagebuilder. - -additional options - -* IS_BUILDBOT : - * this will be "yes" when running on the buildbot farm and helps to save some disc-space by removing files not required anymore. On manual builds you should not set this to "yes", as you have to rebuild the whole toolchain each time. -* SET_BUILDBOT : - * "env" the Makefile will honor the "IS_BUILDBOT" environment - * "yes" the Makefile will always act as "IS_BUILDBOT" was set to "yes" - * "no" the Makefile will always act as "IS_BUILDBOT" was set to "no" / is unset. This way we can run builds on the buildbot like a local build. - -### Continuous integration / Buildbot - -The firmware is [built -automatically](http://buildbot.berlin.freifunk.net/one_line_per_build) by our [buildbot farm](http://buildbot.berlin.freifunk.net/buildslaves). If you have a bit of CPU+RAM+storage capacity on one of your servers, you can provide a buildbot slave (see [berlin-buildbot](https://github.com/freifunk/berlin-buildbot)). - -All branches whose name complies to the "X.Y.Z" pattern are built and put into the "stable" downloads directory: -[http://buildbot.berlin.freifunk.net/buildbot/stable/](http://buildbot.berlin.freifunk.net/buildbot/stable/) - -All branches with names not fitting the "X.Y.Z" pattern are built and put into the "unstable" directory: -[http://buildbot.berlin.freifunk.net/buildbot/unstable/](http://buildbot.berlin.freifunk.net/buildbot/unstable/) -Note that in the directory there is no reference to the branch name; unstable builds can be identified by build number only. - -#### Creating a release - -Every release has a [semantic version number](http://semver.org); each major version has its own codename. -We name our releases after important female computer scientists, hackers, etc. -For inspiration please take a look at the related -[ticket](https://github.com/freifunk-berlin/firmware/issues/24). - -For a new release, create a new branch. The branch name must be a semantic version -number. Make sure you change the semantic version number and, for major releases, -the codename in the README and config files (./configs/*) - -The buildbot will build the release and place the files in the stable direcotry -once you pushed the new branch to github. - -### Patches with "git format-patch" - -**Important:** all patches should be pushed upstream! - -If a patch is not yet included upstream, it can be placed in the corresponding subdirectory below the`patches` -directory. To create a correct patch-file just use the [`git format-patch`](https://git-scm.com/docs/git-format-patch) command. - -#### Create a patch - -In order to add a patch file update your build environment by running: - -```bash -make clean patch -``` -Then switch to the openwrt directory: - -```bash -cd openwrt -``` - -or continue to the relevant feed directory: - -```bash -cd feeds/luci -``` - -use the normal `git commit` workflow to apply your changes to the code. When done convert your last commit -into a patch by running: - -```bash -git format-patch --start-number HEAD^ -``` -where `n` is the next free number of the correlating patch-subdirectory. You can use something like `HEAD^^^^` -to create patch-files from you last 4 commmits, or even use a git-rev directly. Feel free to squash multiple -commits into a single one before creating the patch-file or use something like - -```bash -git format-patch --stdout HEAD^^^^ > patches/routing/0008-awesome.patch -``` -to create a single file of these 4 commits - -#### Modify a patch - -To update an existing patch do the same as above: - -```bash -make clean patch -cd openwrt -cd feeds/luci -``` -Then just add a new commit with your changes and squash it with the commit relating to the patch-file. -To update the patch-file use the same `git format-patch` sequence as you did when creating the patch -initially. - -#### Delete a patch - -To remove a patch-file you have to remove it from the patch-subdirectory and update the build- -environment: - -```bash -git rm patches/openwrt/0010-unrelevant-change.patch -make patch -``` - -### Submitting patches - -#### Freifunk Berlin - -Please create a pull request for the project you want to submit a patch. -If you are already member of the Freifunk Berlin team, please delete branches once they have been merged. - -#### OpenWrt - -Create a commit in the openwrt directory that contains your change. Use `git -format-patch` to create a patch: - -``` -git format-patch origin -``` - -Send a patch to the OpenWrt mailing list with `git send-email`: - -``` -git send-email \ - --to=openwrt-devel@lists.openwrt.org \ - --smtp-server=mail.foo.bar \ - --smtp-user=foo \ - --smtp-encryption=tls \ - 0001-a-fancy-change.patch -``` - -Additional information: https://dev.openwrt.org/wiki/SubmittingPatches From 2678494a77a1c668d7f2ca888a149875e340efcd Mon Sep 17 00:00:00 2001 From: Sven Roederer Date: Wed, 19 Feb 2020 01:03:43 +0100 Subject: [PATCH 04/82] import basic files from gluon (15. Feb. 2020) https://github.com/freifunk-gluon/gluon/commit/f83d6764424910bd2a154d80c0d7cda4d52ba382 --- package/features | 34 +++ scripts/check_site.lua | 400 +++++++++++++++++++++++++++ scripts/features.sh | 77 ++++++ scripts/filesize.sh | 16 ++ scripts/site_config.lua | 11 + scripts/target_config.lua | 24 ++ scripts/target_config_check.lua | 66 +++++ scripts/target_config_lib.lua | 82 ++++++ scripts/target_lib.lua | 289 ++++++++++++++++++++ scripts/update-patches.sh | 26 ++ targets/ar71xx-generic | 466 ++++++++++++++++++++++++++++++++ targets/ar71xx-mikrotik | 12 + targets/ar71xx-nand | 33 +++ targets/ar71xx-tiny | 132 +++++++++ targets/ath79-generic | 66 +++++ targets/brcm2708-bcm2708 | 12 + targets/brcm2708-bcm2709 | 8 + targets/brcm2708-bcm2710 | 10 + targets/brcm2708.inc | 6 + targets/generic | 72 +++++ targets/ipq40xx-generic | 89 ++++++ targets/ipq806x-generic | 28 ++ targets/lantiq-xrx200 | 12 + targets/mpc85xx-generic | 1 + targets/mvebu-cortexa9 | 3 + targets/ramips-mt7620 | 58 ++++ targets/ramips-mt7621 | 55 ++++ targets/ramips-mt76x8 | 71 +++++ targets/targets.mk | 29 ++ targets/x86-generic | 11 + targets/x86.inc | 38 +++ 31 files changed, 2237 insertions(+) create mode 100644 package/features create mode 100644 scripts/check_site.lua create mode 100644 scripts/features.sh create mode 100644 scripts/filesize.sh create mode 100644 scripts/site_config.lua create mode 100644 scripts/target_config.lua create mode 100644 scripts/target_config_check.lua create mode 100644 scripts/target_config_lib.lua create mode 100644 scripts/target_lib.lua create mode 100644 scripts/update-patches.sh create mode 100644 targets/ar71xx-generic create mode 100644 targets/ar71xx-mikrotik create mode 100644 targets/ar71xx-nand create mode 100644 targets/ar71xx-tiny create mode 100644 targets/ath79-generic create mode 100644 targets/brcm2708-bcm2708 create mode 100644 targets/brcm2708-bcm2709 create mode 100644 targets/brcm2708-bcm2710 create mode 100644 targets/brcm2708.inc create mode 100644 targets/generic create mode 100644 targets/ipq40xx-generic create mode 100644 targets/ipq806x-generic create mode 100644 targets/lantiq-xrx200 create mode 100644 targets/mpc85xx-generic create mode 100644 targets/mvebu-cortexa9 create mode 100644 targets/ramips-mt7620 create mode 100644 targets/ramips-mt7621 create mode 100644 targets/ramips-mt76x8 create mode 100644 targets/targets.mk create mode 100644 targets/x86-generic create mode 100644 targets/x86.inc diff --git a/package/features b/package/features new file mode 100644 index 0000000000..1f0d825a39 --- /dev/null +++ b/package/features @@ -0,0 +1,34 @@ +nodefault 'web-wizard' + +packages 'web-wizard' \ + 'gluon-config-mode-hostname' \ + 'gluon-config-mode-geo-location' \ + 'gluon-config-mode-contact-info' \ + 'gluon-config-mode-outdoor' + +packages 'web-wizard & autoupdater' \ + 'gluon-config-mode-autoupdater' + +packages 'web-wizard & (mesh-vpn-fastd | mesh-vpn-tunneldigger)' \ + 'gluon-config-mode-mesh-vpn' + + +nodefault 'web-advanced' + +packages 'web-advanced' \ + 'gluon-web-admin' \ + 'gluon-web-network' \ + 'gluon-web-wifi-config' + +packages 'web-advanced & autoupdater' \ + 'gluon-web-autoupdater' + +packages 'status-page & mesh-batman-adv-15' \ + 'gluon-status-page-mesh-batman-adv' + +packages 'mesh-batman-adv-15' \ + 'gluon-ebtables-limit-arp' \ + 'gluon-radvd' + +packages 'mesh-babel' \ + 'gluon-radvd' diff --git a/scripts/check_site.lua b/scripts/check_site.lua new file mode 100644 index 0000000000..4e78437aec --- /dev/null +++ b/scripts/check_site.lua @@ -0,0 +1,400 @@ +local cjson = require 'cjson' + +local function config_error(src, ...) + error(src .. ' error: ' .. string.format(...), 0) +end + +local has_domains = (os.execute('ls -d "$IPKG_INSTROOT"/lib/gluon/domains/ >/dev/null 2>&1') == 0) + + +local function load_json(filename) + local f = assert(io.open(filename)) + local json = cjson.decode(f:read('*a')) + f:close() + return json +end + + +local function get_domains() + local domains = {} + local dirs = io.popen("find \"$IPKG_INSTROOT\"/lib/gluon/domains/ -name '*.json'") + for filename in dirs:lines() do + local name = string.match(filename, '([^/]+).json$') + domains[name] = load_json(filename) + end + dirs:close() + + if not next(domains) then + config_error('site', 'no domain configurations found') + end + + return domains +end + +local site, domain_code, domain, conf + + +local M = setmetatable({}, { __index = _G }) + + +local function merge(a, b) + local function is_array(t) + local n = 0 + for _ in pairs(t) do + n = n + 1 + end + return n == #t + end + + if not b then return a end + if type(a) ~= type(b) then return b end + if type(b) ~= 'table' then return b end + if not next(b) then return a end + if is_array(a) ~= is_array(b) then return b end + + local m = {} + for k, v in pairs(a) do + m[k] = v + end + for k, v in pairs(b) do + m[k] = merge(m[k], v) + end + + return m +end + + +local function path_to_string(path) + return table.concat(path, '.') +end + +local function format(val) + if type(val) == 'string' then + return string.format('%q', val) + else + return tostring(val) + end +end + +local function array_to_string(array) + local strings = {} + for i, v in ipairs(array) do + strings[i] = format(v) + end + return '[' .. table.concat(strings, ', ') .. ']' +end + +function M.table_keys(tbl) + local keys = {} + for k in pairs(tbl) do + keys[#keys + 1] = k + end + return keys +end + + +local loadpath + +local function site_src() + return 'site.conf' +end + +local function domain_src() + return 'domains/' .. domain_code .. '.conf' +end + +local function conf_src(path) + local src + + if has_domains then + if loadpath(nil, domain, unpack(path)) ~= nil then + src = domain_src() + elseif loadpath(nil, site, unpack(path)) ~= nil then + src = site_src() + else + src = site_src() .. ' / ' .. domain_src() + end + else + src = site_src() + end + + return src +end + +local function var_error(path, val, msg) + local found = 'unset' + if val ~= nil then + found = string.format('%s (a %s value)', format(val), type(val)) + end + + config_error(conf_src(path), 'expected %s to %s, but it is %s', path_to_string(path), msg, found) +end + +function M.in_site(path) + if has_domains and loadpath(nil, domain, unpack(path)) ~= nil then + config_error(domain_src(), '%s is allowed in site configuration only', path_to_string(path)) + end + + return path +end + +function M.in_domain(path) + if has_domains and loadpath(nil, site, unpack(path)) ~= nil then + config_error(site_src(), '%s is allowed in domain configuration only', path_to_string(path)) + end + + return path +end + +function M.this_domain() + return domain_code +end + + +function M.extend(path, c) + if not path then return nil end + + local p = {unpack(path)} + + for _, e in ipairs(c) do + p[#p+1] = e + end + return p +end + +function loadpath(path, base, c, ...) + if not c or base == nil then + return base + end + + if type(base) ~= 'table' then + if path then + var_error(path, base, 'be a table') + else + return nil + end + end + + return loadpath(M.extend(path, {c}), base[c], ...) +end + +local function loadvar(path) + return loadpath({}, conf, unpack(path)) +end + +local function check_type(t) + return function(val) + return type(val) == t + end +end + +local function check_one_of(array) + return function(val) + for _, v in ipairs(array) do + if v == val then + return true + end + end + return false + end +end + + +function M.alternatives(...) + local errs = {'All of the following alternatives have failed:'} + for i, f in ipairs({...}) do + local ok, err = pcall(f) + if ok then + return + end + errs[#errs+1] = string.format('%i) %s', i, err) + end + + error(table.concat(errs, '\n '), 0) +end + + +local function check_chanlist(channels) + local is_valid_channel = check_one_of(channels) + return function(chanlist) + for group in chanlist:gmatch("%S+") do + if group:match("^%d+$") then + local channel = tonumber(group) + if not is_valid_channel(channel) then + return false + end + elseif group:match("^%d+-%d+$") then + local from, to = group:match("^(%d+)-(%d+)$") + from = tonumber(from) + to = tonumber(to) + if from >= to then + return false + end + if not is_valid_channel(from) or not is_valid_channel(to) then + return false + end + else + return false + end + end + return true + end +end + +function M.need(path, check, required, msg) + local val = loadvar(path) + if required == false and val == nil then + return nil + end + + if not check(val) then + var_error(path, val, msg) + end + + return val +end + +local function need_type(path, type, required, msg) + return M.need(path, check_type(type), required, msg) +end + + +function M.need_alphanumeric_key(path) + local val = path[#path] + -- We don't use character classes like %w here to be independent of the locale + if type(val) ~= 'string' or not val:match('^[0-9a-zA-Z_]+$') then + var_error(path, val, 'have a string key using only alphanumeric characters and underscores') + end +end + + +function M.need_string(path, required) + return need_type(path, 'string', required, 'be a string') +end + +function M.need_string_match(path, pat, required) + local val = M.need_string(path, required) + if not val then + return nil + end + + if not val:match(pat) then + var_error(path, val, "match pattern '" .. pat .. "'") + end + + return val +end + +function M.need_number(path, required) + return need_type(path, 'number', required, 'be a number') +end + +function M.need_boolean(path, required) + return need_type(path, 'boolean', required, 'be a boolean') +end + +function M.need_array(path, subcheck, required) + local val = need_type(path, 'table', required, 'be an array') + if not val then + return nil + end + + if subcheck then + for i = 1, #val do + subcheck(M.extend(path, {i})) + end + end + + return val +end + +function M.need_table(path, subcheck, required) + local val = need_type(path, 'table', required, 'be a table') + if not val then + return nil + end + + if subcheck then + for k, _ in pairs(val) do + subcheck(M.extend(path, {k})) + end + end + + return val +end + +function M.need_value(path, value, required) + return M.need(path, function(v) + return v == value + end, required, 'be ' .. tostring(value)) +end + +function M.need_one_of(path, array, required) + return M.need(path, check_one_of(array), required, 'be one of the given array ' .. array_to_string(array)) +end + +function M.need_string_array(path, required) + return M.need_array(path, M.need_string, required) +end + +function M.need_string_array_match(path, pat, required) + return M.need_array(path, function(e) M.need_string_match(e, pat) end, required) +end + +function M.need_array_of(path, array, required) + return M.need_array(path, function(e) M.need_one_of(e, array) end, required) +end + +function M.need_chanlist(path, channels, required) + local valid_chanlist = check_chanlist(channels) + return M.need(path, valid_chanlist, required, + 'be a space-separated list of WiFi channels or channel-ranges (separated by a hyphen). ' + .. 'Valid channels are: ' .. array_to_string(channels)) +end + +function M.need_domain_name(path) + M.need_string(path) + M.need(path, function(domain_name) + local f = io.open(os.getenv('IPKG_INSTROOT') .. '/lib/gluon/domains/' .. domain_name .. '.json') + if not f then return false end + f:close() + return true + end, nil, 'be a valid domain name') +end + +function M.obsolete(path, msg) + local val = loadvar(path) + if val == nil then + return nil + end + + if not msg then + msg = 'Check the release notes and documentation for details.' + + end + + config_error(conf_src(path), '%s is obsolete. %s', path_to_string(path), msg) +end + +local check = setfenv(assert(loadfile()), M) + +site = load_json(os.getenv('IPKG_INSTROOT') .. '/lib/gluon/site.json') + +local ok, err = pcall(function() + if has_domains then + for k, v in pairs(get_domains()) do + domain_code = k + domain = v + conf = merge(site, domain) + check() + end + else + conf = site + check() + end +end) + +if not ok then + io.stderr:write('*** ', err, '\n') + os.exit(1) +end diff --git a/scripts/features.sh b/scripts/features.sh new file mode 100644 index 0000000000..1d7184eeb0 --- /dev/null +++ b/scripts/features.sh @@ -0,0 +1,77 @@ +#!/bin/bash --norc + +set -e +shopt -s nullglob + + +nodefault() { + # We define a function instead of a variable, as variables could + # be predefined in the environment (in theory) + eval "gluon_feature_nodefault_$1() { + : + }" +} + +packages() { + : +} + +for f in package/features packages/*/features; do + . "$f" +done + + +# Shell variables can't contain minus signs, so we escape them +# using underscores (and also escape underscores to avoid mapping +# multiple inputs to the same output) +sanitize() { + local v="$1" + v="${v//_/_1}" + v="${v//-/_2}" + echo -n "$v" +} + +vars=() + +for feature in $1; do + if [ "$(type -t "gluon_feature_nodefault_${feature}")" != 'function' ]; then + echo "gluon-${feature}" + fi + + vars+=("$(sanitize "$feature")=1") +done + + +nodefault() { + : +} + +# shellcheck disable=SC2086 +packages() { + local cond="$(sanitize "$1")" + shift + + # We only allow variable names, parentheses and the operators: & | ! + if grep -q '[^A-Za-z0-9_()&|! ]' <<< "$cond"; then + exit 1 + fi + + # Let will return false when the result of the passed expression is 0, + # so we always add 1. This way false is only returned for syntax errors. + local ret="$(env -i "${vars[@]}" bash --norc -ec "let _result_='1+($cond)'; echo -n \"\$_result_\"" 2>/dev/null)" + case "$ret" in + 2) + for pkg in "$@"; do + echo "$pkg" + done + ;; + 1) + ;; + *) + exit 1 + esac +} + +for f in package/features packages/*/features; do + . "$f" +done diff --git a/scripts/filesize.sh b/scripts/filesize.sh new file mode 100644 index 0000000000..7068eb544f --- /dev/null +++ b/scripts/filesize.sh @@ -0,0 +1,16 @@ +#!/bin/sh + +check_command() { + command -v "$1" >/dev/null +} + +if check_command gnustat; then + gnustat -c%s "$@" +elif check_command gstat; then + gstat -c%s "$@" +elif check_command stat; then + stat -c%s "$@" +else + echo "$0: no suitable stat implementation was found" >&2 + exit 1 +fi diff --git a/scripts/site_config.lua b/scripts/site_config.lua new file mode 100644 index 0000000000..f49eb95c69 --- /dev/null +++ b/scripts/site_config.lua @@ -0,0 +1,11 @@ +local site = os.getenv('GLUON_SITEDIR') .. '/' + +return function(config) + local function loader() + coroutine.yield('return ') + coroutine.yield(io.open(site..config):read('*a')) + end + + -- setfenv doesn't work with Lua 5.2 anymore, but we're using 5.1 + return setfenv(assert(load(coroutine.wrap(loader), config)), {})() +end diff --git a/scripts/target_config.lua b/scripts/target_config.lua new file mode 100644 index 0000000000..452d4f190c --- /dev/null +++ b/scripts/target_config.lua @@ -0,0 +1,24 @@ +local funcs = {} + +function funcs.config_message(config, _, ...) + config(...) +end + +function funcs.config_package(config, pkg, value) + config('CONFIG_PACKAGE_%s=%s', pkg, value) +end + +local lib = dofile('scripts/target_config_lib.lua')(funcs) + + +local output = {} + +for config in pairs(lib.configs) do + table.insert(output, config) +end + +-- The sort will make =y entries override =m ones +table.sort(output) +for _, line in ipairs(output) do + io.stdout:write(line, '\n') +end diff --git a/scripts/target_config_check.lua b/scripts/target_config_check.lua new file mode 100644 index 0000000000..160c32a388 --- /dev/null +++ b/scripts/target_config_check.lua @@ -0,0 +1,66 @@ +local ret = 0 + + +local function fail(...) + if ret == 0 then + ret = 1 + io.stderr:write('Configuration failed:', '\n') + end + + io.stderr:write(' * ', string.format(...), '\n') +end + +local function match_config(f) + for line in io.lines('openwrt/.config') do + if f(line) then + return true + end + end + + return false +end + +local function check_config(pattern) + return match_config(function(line) return line == pattern end) +end + +local function check_config_prefix(pattern) + return match_config(function(line) return string.sub(line, 1, -2) == pattern end) +end + + +local funcs = {} + +function funcs.config_message(_, message, ...) + local pattern = string.format(...) + + if not check_config(pattern) then + fail('%s', message) + end +end + +function funcs.config_package(_, pkg, value) + local pattern = string.format('CONFIG_PACKAGE_%s=%s', pkg, value) + local res + if value == 'y' then + res = check_config(pattern) + else + res = check_config_prefix(string.sub(pattern, 1, -2)) + end + + if not res then + fail("unable to enable package '%s'", pkg) + end +end + +local lib = dofile('scripts/target_config_lib.lua')(funcs) + +for config, v in pairs(lib.configs) do + if v == 2 then + if not check_config(config) then + fail("unable to set '%s'", config) + end + end +end + +os.exit(ret) diff --git a/scripts/target_config_lib.lua b/scripts/target_config_lib.lua new file mode 100644 index 0000000000..71443db779 --- /dev/null +++ b/scripts/target_config_lib.lua @@ -0,0 +1,82 @@ +return function(funcs) + local lib = dofile('scripts/target_lib.lua') + local env = lib.env + + assert(env.BOARD) + assert(env.SUBTARGET) + + local target = arg[1] + local extra_packages = arg[2] + + local openwrt_config_target + if env.SUBTARGET ~= '' then + openwrt_config_target = env.BOARD .. '_' .. env.SUBTARGET + else + openwrt_config_target = env.BOARD + end + + + local function site_packages(image) + return lib.exec_capture_raw(string.format([[ + MAKEFLAGS= make print _GLUON_IMAGE_=%s --no-print-directory -s -f - <<'END_MAKE' +include $(GLUON_SITEDIR)/site.mk + +print: + echo -n '$(GLUON_$(_GLUON_IMAGE_)_SITE_PACKAGES)' +END_MAKE + ]], lib.escape(image))) + end + + lib.include('generic') + for pkg in string.gmatch(extra_packages, '%S+') do + lib.packages {pkg} + end + lib.include(target) + + lib.check_devices() + + + if not lib.opkg then + lib.config '# CONFIG_SIGNED_PACKAGES is not set' + lib.config 'CONFIG_CLEAN_IPKG=y' + lib.packages {'-opkg'} + end + + + local default_pkgs = '' + for _, pkg in ipairs(lib.target_packages) do + default_pkgs = default_pkgs .. ' ' .. pkg + + if string.sub(pkg, 1, 1) == '-' then + lib.try_config('# CONFIG_PACKAGE_%s is not set', string.sub(pkg, 2)) + else + funcs.config_package(lib.config, pkg, 'y') + end + end + + for _, dev in ipairs(lib.devices) do + local profile = dev.options.profile or dev.name + local device_pkgs = default_pkgs + + local function handle_pkg(pkg) + if string.sub(pkg, 1, 1) ~= '-' then + funcs.config_package(lib.config, pkg, 'm') + end + device_pkgs = device_pkgs .. ' ' .. pkg + end + + for _, pkg in ipairs(dev.options.packages or {}) do + handle_pkg(pkg) + end + for pkg in string.gmatch(site_packages(dev.image), '%S+') do + handle_pkg(pkg) + end + + funcs.config_message(lib.config, string.format("unable to enable device '%s'", profile), + 'CONFIG_TARGET_DEVICE_%s_DEVICE_%s=y', openwrt_config_target, profile) + lib.config('CONFIG_TARGET_DEVICE_PACKAGES_%s_DEVICE_%s="%s"', + openwrt_config_target, profile, device_pkgs) + end + + return lib +end diff --git a/scripts/target_lib.lua b/scripts/target_lib.lua new file mode 100644 index 0000000000..d5133b1ee2 --- /dev/null +++ b/scripts/target_lib.lua @@ -0,0 +1,289 @@ +-- Functions for use in targets/* +local F = {} + +-- To be accessed by scripts using target_lib +local M = setmetatable({}, { __index = F }) + +local funcs = setmetatable({}, { + __index = function(_, k) + return F[k] or _G[k] + end, +}) + +local env = setmetatable({}, { + __index = function(_, k) return os.getenv(k) end +}) +F.env = env + +local envtrue = setmetatable({}, { + __index = function(_, k) return (tonumber(os.getenv(k)) or 0) > 0 end +}) +F.envtrue = envtrue + +assert(env.GLUON_SITEDIR) +assert(env.GLUON_TARGETSDIR) +assert(env.GLUON_RELEASE) +assert(env.GLUON_DEPRECATED) + + +M.site_code = assert(assert(dofile('scripts/site_config.lua')('site.conf')).site_code) +M.target_packages = {} +M.configs = {} +M.devices = {} +M.images = {} +M.opkg = true + + +local default_options = { + profile = false, + factory = '-squashfs-factory', + factory_ext = '.bin', + sysupgrade = '-squashfs-sysupgrade', + sysupgrade_ext = '.bin', + extra_images = {}, + aliases = {}, + manifest_aliases = {}, + packages = {}, + deprecated = false, + broken = false, +} + + +local gluon_devices, unknown_devices = {}, {} +for dev in string.gmatch(env.GLUON_DEVICES or '', '%S+') do + gluon_devices[dev] = true + unknown_devices[dev] = true +end + +local function want_device(dev, options) + if options.broken and not envtrue.BROKEN then + return false + end + if options.deprecated and env.GLUON_DEPRECATED == '0' then + return false + end + + if (env.GLUON_DEVICES or '') == '' then + return true + end + + unknown_devices[dev] = nil + return gluon_devices[dev] +end + +local full_deprecated = env.GLUON_DEPRECATED == 'full' + + +local function merge(a, b) + local ret = {} + for k, v in pairs(a) do + ret[k] = v + end + for k, v in pairs(b or {}) do + assert(ret[k] ~= nil, string.format("unknown option '%s'", k)) + ret[k] = v + end + return ret +end + +-- Escapes a single argument to be used in a shell command +-- The argument is surrounded by single quotes, single quotes inside the +-- argument are replaced by '\''. +-- To allow using shell wildcards, zero bytes in the arguments are replaced +-- by unquoted asterisks. +function F.escape(s) + s = string.gsub(s, "'", "'\\''") + s = string.gsub(s, "%z", "'*'") + return "'" .. s .. "'" +end + +local function escape_command(command, raw) + local ret = 'exec' + for _, arg in ipairs(command) do + ret = ret .. ' ' .. F.escape(arg) + end + if raw then + ret = ret .. ' ' .. raw + end + return ret +end + +function F.exec_raw(command, may_fail) + local ret = os.execute(command) + assert((ret == 0) or may_fail) + return ret +end + +function F.exec(command, may_fail, raw) + return F.exec_raw(escape_command(command, raw), may_fail) +end + +function F.exec_capture_raw(command) + local f = io.popen(command) + assert(f) + + local data = f:read('*a') + f:close() + return data +end + +function F.exec_capture(command, raw) + return F.exec_capture_raw(escape_command(command, raw)) +end + + +local image_mt = { + __index = { + dest_name = function(image, name, site, release) + return env.GLUON_IMAGEDIR..'/'..image.subdir, + 'gluon-'..(site or M.site_code)..'-'..(release or env.GLUON_RELEASE)..'-'..name..image.out_suffix..image.extension + end, + }, +} + +local function add_image(image) + table.insert(M.images, setmetatable(image, image_mt)) +end + +function F.try_config(...) + M.configs[string.format(...)] = 1 +end + +function F.config(...) + M.configs[string.format(...)] = 2 +end + +function F.packages(pkgs) + for _, pkg in ipairs(pkgs) do + table.insert(M.target_packages, pkg) + end +end +M.packages = F.packages + +function F.device(image, name, options) + options = merge(default_options, options) + + if not want_device(image, options) then + return + end + + table.insert(M.devices, { + image = image, + name = name, + options = options, + }) + + if options.sysupgrade then + add_image { + image = image, + name = name, + subdir = 'sysupgrade', + in_suffix = options.sysupgrade, + out_suffix = '-sysupgrade', + extension = options.sysupgrade_ext, + aliases = options.aliases, + manifest_aliases = options.manifest_aliases, + } + end + + if options.deprecated and not full_deprecated then + return + end + + if options.factory then + add_image { + image = image, + name = name, + subdir = 'factory', + in_suffix = options.factory, + out_suffix = '', + extension = options.factory_ext, + aliases = options.aliases, + manifest_aliases = options.manifest_aliases, + } + end + for _, extra_image in ipairs(options.extra_images) do + add_image { + image = image, + name = name, + subdir = 'other', + in_suffix = extra_image[1], + out_suffix = extra_image[2], + extension = extra_image[3], + aliases = options.aliases, + manifest_aliases = options.manifest_aliases, + } + end +end + +function F.factory_image(image, name, ext, options) + options = merge(default_options, options) + + if not want_device(image, options) then + return + end + + if options.deprecated and not full_deprecated then + return + end + + add_image { + image = image, + name = name, + subdir = 'factory', + in_suffix = '', + out_suffix = '', + extension = ext, + aliases = options.aliases, + manifest_aliases = options.manifest_aliases, + } +end + +function F.sysupgrade_image(image, name, ext, options) + options = merge(default_options, options) + + if not want_device(image, options) then + return + end + + add_image { + image = image, + name = name, + subdir = 'sysupgrade', + in_suffix = '', + out_suffix = '-sysupgrade', + extension = ext, + aliases = options.aliases, + manifest_aliases = options.manifest_aliases, + } +end + +function F.no_opkg() + M.opkg = false +end + +function F.defaults(options) + default_options = merge(default_options, options) +end + +function F.include(name) + local f = assert(loadfile(env.GLUON_TARGETSDIR .. '/' .. name)) + setfenv(f, funcs) + return f() +end + + +function M.check_devices() + local device_list = {} + for device in pairs(unknown_devices) do + table.insert(device_list, device) + end + if #device_list ~= 0 then + table.sort(device_list) + io.stderr:write('Error: unknown devices given: ', table.concat(device_list, ' '), '\n') + os.exit(1) + end +end + + +return M diff --git a/scripts/update-patches.sh b/scripts/update-patches.sh new file mode 100644 index 0000000000..94f103fa6b --- /dev/null +++ b/scripts/update-patches.sh @@ -0,0 +1,26 @@ +#!/bin/bash + +set -e +shopt -s nullglob + +[ "$GLUON_PATCHESDIR" ] || exit 1 + +. scripts/modules.sh + + +GLUONDIR="$(pwd)" + +for module in $GLUON_MODULES; do + echo "--- Updating patches for module '$module' ---" + + rm -rf "${GLUON_PATCHESDIR:?}/$module" + + cd "$GLUONDIR"/"$module" + + n=0 + for commit in $(git rev-list --reverse --no-merges base..patched); do + (( ++n )) + mkdir -p "${GLUON_PATCHESDIR}/$module" + git -c core.abbrev=40 show --pretty=format:'From: %an <%ae>%nDate: %aD%nSubject: %B' --no-renames --binary "$commit" > "${GLUON_PATCHESDIR}/$module/$(printf '%04u' $n)-$(git show -s --pretty=format:%f "$commit").patch" + done +done diff --git a/targets/ar71xx-generic b/targets/ar71xx-generic new file mode 100644 index 0000000000..497a00e512 --- /dev/null +++ b/targets/ar71xx-generic @@ -0,0 +1,466 @@ +config 'CONFIG_GLUON_SPECIALIZE_KERNEL=y' +config 'CONFIG_TARGET_SQUASHFS_BLOCK_SIZE=64' + +local ATH10K_PACKAGES = { + 'kmod-ath10k', + '-kmod-ath10k-ct', + '-kmod-ath10k-ct-smallbuffers', + 'ath10k-firmware-qca988x', + '-ath10k-firmware-qca988x-ct', +} +local ATH10K_PACKAGES_QCA9887 = { + 'kmod-ath10k', + '-kmod-ath10k-ct', + '-kmod-ath10k-ct-smallbuffers', + 'ath10k-firmware-qca9887', + '-ath10k-firmware-qca9887-ct', +} +local ATH10K_PACKAGES_QCA9888 = { + 'kmod-ath10k', + '-kmod-ath10k-ct', + '-kmod-ath10k-ct-smallbuffers', + 'ath10k-firmware-qca9888', + '-ath10k-firmware-qca9888-ct', +} + + +-- 8devices + +device('8devices-carambola2-board', 'carambola2', { + factory = false, +}) + + +-- ALFA NETWORK + +device('alfa-network-ap121f', 'ap121f', { + factory = false, +}) + + +-- Allnet + +device('allnet-all0315n', 'all0315n', { + profile = 'ALL0315N', + factory = false, +}) + + +-- AVM + +device('avm-fritz-box-4020', 'fritz4020', { + factory = false, +}) + +device('avm-fritz-wlan-repeater-300e', 'fritz300e', { + factory = false, +}) + +device('avm-fritz-wlan-repeater-450e', 'fritz450e', { + factory = false, +}) + + +-- Buffalo + +device('buffalo-wzr-hp-g300nh', 'wzr-hp-g300nh', { + profile = 'WZRHPG300NH', +}) +device('buffalo-wzr-hp-g300nh2', 'wzr-hp-g300nh2', { + profile = 'WZRHPG300NH2', +}) +device('buffalo-wzr-hp-g450h', 'wzr-hp-g450h', { + profile = 'WZRHPG450H', +}) + + +device('buffalo-wzr-hp-ag300h', 'wzr-hp-ag300h', { + profile = 'WZRHPAG300H', + sysupgrade = false, +}) +device('buffalo-wzr-600dhp', 'wzr-600dhp', { + profile = 'WZR600DHP', + sysupgrade = false, +}) +sysupgrade_image('buffalo-wzr-hp-ag300h-wzr-600dhp', 'wzr-hp-ag300h-squashfs-sysupgrade', '.bin') + + +-- D-Link + +device('d-link-dap-1330-rev-a1', 'dap-1330-a1', { + factory_ext = '.img', +}) + +device('d-link-dir-505-rev-a1', 'dir-505-a1', { + profile = 'DIR505A1', + aliases = {'d-link-dir-505-rev-a2'}, +}) + +device('d-link-dir-825-rev-b1', 'dir-825-b1', { + profile = 'DIR825B1', + factory = false, +}) + + +-- GL.iNet + +device('gl-inet-6408a-v1', 'gl-inet-6408A-v1') + +device('gl-inet-6416a-v1', 'gl-inet-6416A-v1') + +device('gl.inet-gl-ar150', 'gl-ar150', { + factory = false, + manifest_aliases = {'gl-ar150'}, +}) + +device('gl.inet-gl-ar300m', 'gl-ar300m', { + factory = false, + manifest_aliases = {'gl-ar300m'}, +}) + +device('gl.inet-gl-ar750', 'gl-ar750', { + factory = false, + manifest_aliases = {'gl-ar750'}, + packages = ATH10K_PACKAGES_QCA9887, +}) + + +-- Linksys by Cisco + +device('linksys-wrt160nl', 'wrt160nl', { + profile = 'WRT160NL', +}) + + +-- Meraki +device('meraki-mr12', 'mr12', { + factory = false, + aliases = {'meraki-mr62'}, + broken = true, -- MAC address uniqueness issues +}) + +device('meraki-mr16', 'mr16', { + factory = false, + aliases = {'meraki-mr66'}, + broken = true, -- MAC address uniqueness issues +}) + + +-- Netgear + +device('netgear-wndr3700', 'wndr3700', { + factory_ext = '.img', +}) + +device('netgear-wndr3700v2', 'wndr3700v2', { + factory_ext = '.img', +}) + +device('netgear-wndr3800', 'wndr3800', { + aliases = {'netgear-wndr3800chmychart'}, + factory_ext = '.img', +}) + +device('netgear-wndrmacv2', 'wndrmacv2', { + factory_ext = '.img', +}) + +device('netgear-wndrmac', 'wndrmac', { + factory_ext = '.img', + broken = true, -- untested +}) + +-- BROKEN: Untested +device('netgear-wnr2200', 'wnr2200', { + profile = 'WNR2200', + factory_ext = '.img', + broken = true, -- untested +}) + + +-- OCEDO + +device('ocedo-koala', 'koala', { + factory = false, + packages = ATH10K_PACKAGES, +}) + + +-- Onion + +device('onion-omega', 'onion-omega', { + broken = true, -- no Ethernet +}) + +-- OpenMesh + +device('openmesh-a60', 'a60', { + profile = 'A60', + aliases = {'openmesh-a40'}, + packages = ATH10K_PACKAGES, +}) + +device('openmesh-mr1750', 'mr1750', { + profile = 'MR1750', + aliases = {'openmesh-mr1750v2'}, + packages = ATH10K_PACKAGES, +}) + +device('openmesh-mr600', 'mr600', { + profile = 'MR600', + aliases = {'openmesh-mr600v2'}, +}) + +device('openmesh-mr900', 'mr900', { + profile = 'MR900', + aliases = {'openmesh-mr900v2'}, +}) + +device('openmesh-om2p', 'om2p', { + profile = 'OM2P', + aliases = { + 'openmesh-om2pv2', + 'openmesh-om2pv4', + 'openmesh-om2p-hs', + 'openmesh-om2p-hsv2', + 'openmesh-om2p-hsv3', + 'openmesh-om2p-hsv4', + 'openmesh-om2p-lc', + }, +}) + +device('openmesh-om5p', 'om5p', { + profile = 'OM5P', + aliases = {'openmesh-om5p-an'}, +}) + +device('openmesh-om5p-ac', 'om5pac', { + profile = 'OM5PAC', + aliases = {'openmesh-om5p-acv2'}, + packages = ATH10K_PACKAGES, +}) + + +-- TP-Link + +local tplink_region_suffix = '' +if (env.GLUON_REGION or '') ~= '' then + tplink_region_suffix = '-' .. env.GLUON_REGION +end + +device('tp-link-cpe210-v1.0', 'cpe210-220-v1', { + aliases = {'tp-link-cpe210-v1.1', 'tp-link-cpe220-v1.1'}, +}) +device('tp-link-cpe210-v2.0', 'cpe210-v2') +device('tp-link-cpe210-v3.0', 'cpe210-v3') + +device('tp-link-cpe510-v1.0', 'cpe510-520-v1', { + aliases = {'tp-link-cpe510-v1.1', 'tp-link-cpe520-v1.1'}, +}) + +device('tp-link-wbs210-v1.20', 'wbs210-v1') +device('tp-link-wbs510-v1.20', 'wbs510-v1') + +device('tp-link-tl-wr710n-v1', 'tl-wr710n-v1', { + packages = { 'zram-swap' }, +}) +device('tp-link-tl-wr710n-v2.1', 'tl-wr710n-v2.1', { + packages = { 'zram-swap' }, +}) + +device('tp-link-tl-wr810n-v1', 'tl-wr810n-v1') + +device('tp-link-tl-wr842n-nd-v1', 'tl-wr842n-v1', { + packages = { 'zram-swap' }, +}) +device('tp-link-tl-wr842n-nd-v2', 'tl-wr842n-v2', { + packages = { 'zram-swap' }, +}) +device('tp-link-tl-wr842n-nd-v3', 'tl-wr842n-v3') + +device('tp-link-tl-wr1043n-nd-v1', 'tl-wr1043nd-v1', { + packages = { 'zram-swap' }, +}) +device('tp-link-tl-wr1043n-nd-v2', 'tl-wr1043nd-v2') +device('tp-link-tl-wr1043n-nd-v3', 'tl-wr1043nd-v3') +device('tp-link-tl-wr1043n-nd-v4', 'tl-wr1043nd-v4') +device('tp-link-tl-wr1043n-v5', 'tl-wr1043n-v5') + +device('tp-link-tl-wdr3500-v1', 'tl-wdr3500-v1') +device('tp-link-tl-wdr3600-v1', 'tl-wdr3600-v1') +device('tp-link-tl-wdr4300-v1', 'tl-wdr4300-v1') + +device('tp-link-tl-wr2543n-nd-v1', 'tl-wr2543-v1') + +device('tp-link-archer-c5-v1', 'archer-c5-v1', { + packages = ATH10K_PACKAGES, +}) + +device('tp-link-archer-c7-v2', 'archer-c7-v2', { + packages = ATH10K_PACKAGES, + factory = '-squashfs-factory' .. tplink_region_suffix, +}) + +device('tp-link-archer-c7-v4', 'archer-c7-v4', { + packages = ATH10K_PACKAGES, +}) + +device('tp-link-archer-c7-v5', 'archer-c7-v5', { + packages = ATH10K_PACKAGES, +}) + +device('tp-link-archer-c25-v1', 'archer-c25-v1', { + packages = ATH10K_PACKAGES_QCA9887, + broken = true, -- OOM with 5GHz enabled in most environments +}) + +device('tp-link-archer-c58-v1', 'archer-c58-v1', { + packages = ATH10K_PACKAGES_QCA9888, + broken = true, -- OOM with 5GHz enabled in most environments +}) + +device('tp-link-archer-c59-v1', 'archer-c59-v1', { + packages = ATH10K_PACKAGES_QCA9888, +}) + +device('tp-link-archer-c60-v1', 'archer-c60-v1', { + packages = ATH10K_PACKAGES_QCA9888, + broken = true, -- OOM with 5GHz enabled in most environments +}) + +device('tp-link-archer-c60-v2', 'archer-c60-v2', { + packages = ATH10K_PACKAGES_QCA9888, + broken = true, -- OOM with 5GHz enabled in most environments +}) + +device('tp-link-re355', 're355-v1', { + packages = ATH10K_PACKAGES, + broken = true, -- OOM with 5GHz enabled in most environments if device is 64M RAM variant +}) + +device('tp-link-tl-wr902ac-v1', 'tl-wr902ac-v1', { + packages = ATH10K_PACKAGES_QCA9887, + broken = true, -- OOM due to insufficient RAM for ath10k expected +}) + +device('tp-link-re450', 're450-v1', { + packages = ATH10K_PACKAGES, +}) + + +-- Ubiquiti + +device('ubiquiti-airgateway', 'ubnt-air-gateway', { + aliases = {'ubiquiti-airgateway-lr'}, +}) + +device('ubiquiti-airgateway-pro', 'ubnt-air-gateway-pro') + +device('ubiquiti-airrouter', 'ubnt-airrouter') + +device('ubiquiti-bullet-m', 'ubnt-bullet-m', { + aliases = { + 'ubiquiti-nanostation-loco-m2', + 'ubiquiti-nanostation-loco-m5', + 'ubiquiti-bullet-m2', + 'ubiquiti-bullet-m5', + 'ubiquiti-picostation-m2', + }, + packages = { 'zram-swap' }, +}) + +device('ubiquiti-rocket-m', 'ubnt-rocket-m', { + aliases = { + 'ubiquiti-rocket-m2', + 'ubiquiti-rocket-m5', + }, +}) + +device('ubiquiti-nanostation-m', 'ubnt-nano-m', { + aliases = { + 'ubiquiti-nanostation-m2', + 'ubiquiti-nanostation-m5', + }, + packages = { 'zram-swap' }, +}) + +device('ubiquiti-loco-m-xw', 'ubnt-loco-m-xw', { + aliases = { + 'ubiquiti-nanostation-loco-m2-xw', + 'ubiquiti-nanostation-loco-m5-xw', + -- 'ubiquiti-nanobeam-m5', -- untested + }, +}) + +device('ubiquiti-nanostation-m-xw', 'ubnt-nano-m-xw', { + aliases = { + 'ubiquiti-nanostation-m2-xw', + 'ubiquiti-nanostation-m5-xw', + }, +}) + +device('ubiquiti-rocket-m-xw', 'ubnt-rocket-m-xw', { + aliases = { + 'ubiquiti-rocket-m2-xw', + 'ubiquiti-rocket-m5-xw', + }, +}) + +device('ubiquiti-rocket-m-ti', 'ubnt-rocket-m-ti', { + aliases = { + 'ubiquiti-rocket-m2-ti', + 'ubiquiti-rocket-m5-ti', + }, +}) + +device('ubiquiti-unifi', 'ubnt-unifi', { + aliases = { + 'ubiquiti-unifi-ap', + 'ubiquiti-unifi-ap-lr', + }, +}) + +device('ubiquiti-unifi-ap-pro', 'ubnt-uap-pro') +device('ubiquiti-unifiap-outdoor', 'ubnt-unifi-outdoor') +device('ubiquiti-unifiap-outdoor+', 'ubnt-unifi-outdoor-plus') + +device('ubiquiti-ls-sr71', 'ubnt-ls-sr71', { + broken = true, -- untested +}) + +device('ubiquiti-unifi-ac-lite', 'ubnt-unifiac-lite', { + factory = false, + packages = ATH10K_PACKAGES, + aliases = {'ubiquiti-unifi-ac-lite-mesh'}, +}) + +device('ubiquiti-unifi-ac-lr', 'ubnt-unifiac-lr', { + factory = false, + packages = ATH10K_PACKAGES, +}) + +device('ubiquiti-unifi-ac-pro', 'ubnt-unifiac-pro', { + factory = false, + packages = ATH10K_PACKAGES, +}) + +device('ubiquiti-unifi-ac-mesh', 'ubnt-unifiac-mesh', { + factory = false, + packages = ATH10K_PACKAGES, +}) + +device('ubiquiti-unifi-ac-mesh-pro', 'ubnt-unifiac-mesh-pro', { + factory = false, + packages = ATH10K_PACKAGES, +}) + + +-- Western Digital + +device('wd-my-net-n600', 'mynet-n600') +device('wd-my-net-n750', 'mynet-n750') + +-- ZyXEL +device('zyxel-nbg6616', 'NBG6616', { + packages = ATH10K_PACKAGES, +}) diff --git a/targets/ar71xx-mikrotik b/targets/ar71xx-mikrotik new file mode 100644 index 0000000000..6a783b5e9e --- /dev/null +++ b/targets/ar71xx-mikrotik @@ -0,0 +1,12 @@ +config 'CONFIG_GLUON_SPECIALIZE_KERNEL=y' + +defaults { + factory = false, +} + +device('mikrotik-rb-nor-flash-16M', 'rb-nor-flash-16M') +device('mikrotik-rb-nor-flash-16M-ac', 'rb-nor-flash-16M-ac') + +device('mikrotik-nand-64m', 'nand-64m') +device('mikrotik-nand-large', 'nand-large') +device('mikrotik-nand-large-ac', 'nand-large-ac') diff --git a/targets/ar71xx-nand b/targets/ar71xx-nand new file mode 100644 index 0000000000..e52b82e012 --- /dev/null +++ b/targets/ar71xx-nand @@ -0,0 +1,33 @@ +config 'CONFIG_GLUON_SPECIALIZE_KERNEL=y' + +local ATH10K_PACKAGES = {'kmod-ath10k', '-kmod-ath10k-ct', 'ath10k-firmware-qca988x', '-ath10k-firmware-qca988x-ct'} + + +defaults { + sysupgrade_ext = '.tar', +} + + +-- Aerohive + +device('aerohive-hiveap-121', 'hiveap-121') + + +-- Netgear + +device('netgear-wndr3700v4', 'wndr3700v4', { + profile = 'WNDR3700V4', + factory = '-ubi-factory', + factory_ext = '.img', +}) +device('netgear-wndr4300', 'wndr4300', { + profile = 'WNDR4300V1', + factory = '-ubi-factory', + factory_ext = '.img', +}) + +-- ZyXEL +device('zyxel-nbg6716', 'nbg6716', { + profile = 'NBG6716', + packages = ATH10K_PACKAGES, +}) diff --git a/targets/ar71xx-tiny b/targets/ar71xx-tiny new file mode 100644 index 0000000000..1d09fc179c --- /dev/null +++ b/targets/ar71xx-tiny @@ -0,0 +1,132 @@ +config 'CONFIG_GLUON_SPECIALIZE_KERNEL=y' + +no_opkg() + +packages { + '-uboot-envtools', + '-kmod-usb-core', + '-kmod-usb-ohci', + '-kmod-usb2', + '-kmod-usb-ledtrig-usbport', +} + +defaults { + deprecated = true, -- 4/32 +} + + +-- D-Link + +device('d-link-dir-615-rev-c1', 'dir-615-c1', { + profile = 'DIR615C1', +}) + + +-- TP-Link + +local tplink_region_suffix = '' +if (env.GLUON_REGION or '') ~= '' then + tplink_region_suffix = '-' .. env.GLUON_REGION +end + +device('tp-link-tl-wa701n-nd-v1', 'tl-wa701nd-v1') +device('tp-link-tl-wa701n-nd-v2', 'tl-wa701nd-v2') + +device('tp-link-tl-wa7210n-v2', 'tl-wa7210n-v2') +device('tp-link-tl-wa7510n-v1', 'tl-wa7510n-v1') + +device('tp-link-tl-wr703n-v1', 'tl-wr703n-v1') + +device('tp-link-tl-wr710n-v2', 'tl-wr710n-v2') + +device('tp-link-tl-wr740n-nd-v1', 'tl-wr740n-v1') +device('tp-link-tl-wr740n-nd-v3', 'tl-wr740n-v3') +device('tp-link-tl-wr740n-nd-v4', 'tl-wr740n-v4') +device('tp-link-tl-wr740n-nd-v5', 'tl-wr740n-v5') + +device('tp-link-tl-wr741n-nd-v1', 'tl-wr741nd-v1') +device('tp-link-tl-wr741n-nd-v2', 'tl-wr741nd-v2') +device('tp-link-tl-wr741n-nd-v4', 'tl-wr741nd-v4') +device('tp-link-tl-wr741n-nd-v5', 'tl-wr741nd-v5') + +device('tp-link-tl-wr743n-nd-v1', 'tl-wr743nd-v1') +device('tp-link-tl-wr743n-nd-v2', 'tl-wr743nd-v2') + +device('tp-link-tl-wa801n-nd-v1', 'tl-wa801nd-v1') +device('tp-link-tl-wa801n-nd-v2', 'tl-wa801nd-v2') +device('tp-link-tl-wa801n-nd-v3', 'tl-wa801nd-v3') + +device('tp-link-tl-wr802n-v1', 'tl-wr802n-v1', { + broken = true, -- untested +}) + +device('tp-link-tl-wr840n-v2', 'tl-wr840n-v2') + +device('tp-link-tl-wr841n-nd-v3', 'tl-wr841-v3') +device('tp-link-tl-wr841n-nd-v5', 'tl-wr841-v5') +device('tp-link-tl-wr841n-nd-v7', 'tl-wr841-v7') +device('tp-link-tl-wr841n-nd-v8', 'tl-wr841-v8') +device('tp-link-tl-wr841n-nd-v9', 'tl-wr841-v9') +device('tp-link-tl-wr841n-nd-v10', 'tl-wr841-v10') +device('tp-link-tl-wr841n-nd-v11', 'tl-wr841-v11', { + factory = '-squashfs-factory' .. tplink_region_suffix, +}) +device('tp-link-tl-wr841n-nd-v12', 'tl-wr841-v12', { + factory = '-squashfs-factory' .. tplink_region_suffix, +}) + +device('tp-link-tl-wr843n-nd-v1', 'tl-wr843nd-v1') + +device('tp-link-tl-wr941n-nd-v2', 'tl-wr941nd-v2') +device('tp-link-tl-wr941n-nd-v3', 'tl-wr941nd-v3') + +device('tp-link-tl-wr941n-nd-v4', 'tl-wr941nd-v4', { + aliases = {'tp-link-tl-wr940n-v1'}, +}) + +device('tp-link-tl-wr941n-nd-v5', 'tl-wr941nd-v5', { + aliases = {'tp-link-tl-wr940n-v2'}, +}) + +device('tp-link-tl-wr941n-nd-v6', 'tl-wr941nd-v6', { + aliases = {'tp-link-tl-wr940n-v3'}, +}) + +device('tp-link-tl-wr940n-v4', 'tl-wr940n-v4', { + factory = '-squashfs-factory' .. tplink_region_suffix, + aliases = {'tp-link-tl-wr940n-v5'}, +}) + +device('tp-link-tl-wr940n-v6', 'tl-wr940n-v6', { + factory = '-squashfs-factory' .. tplink_region_suffix, +}) + +device('tp-link-tl-wa730re-v1', 'tl-wa730re-v1') + +device('tp-link-tl-wa750re-v1', 'tl-wa750re-v1') + +device('tp-link-tl-wa830re-v1', 'tl-wa830re-v1') +device('tp-link-tl-wa830re-v2', 'tl-wa830re-v2') + +device('tp-link-tl-wa850re-v1', 'tl-wa850re-v1') + +device('tp-link-tl-wa860re-v1', 'tl-wa860re-v1') + +device('tp-link-tl-wa901n-nd-v1', 'tl-wa901nd-v1') +device('tp-link-tl-wa901n-nd-v2', 'tl-wa901nd-v2') +device('tp-link-tl-wa901n-nd-v3', 'tl-wa901nd-v3') +device('tp-link-tl-wa901n-nd-v4', 'tl-wa901nd-v4') +device('tp-link-tl-wa901n-nd-v5', 'tl-wa901nd-v5') + +device('tp-link-tl-mr13u-v1', 'tl-mr13u-v1') + +device('tp-link-tl-mr3020-v1', 'tl-mr3020-v1') + +device('tp-link-tl-mr3040-v1', 'tl-mr3040-v1') +device('tp-link-tl-mr3040-v2', 'tl-mr3040-v2') + +device('tp-link-tl-mr3220-v1', 'tl-mr3220-v1') +device('tp-link-tl-mr3220-v2', 'tl-mr3220-v2') + +device('tp-link-tl-mr3420-v1', 'tl-mr3420-v1') +device('tp-link-tl-mr3420-v2', 'tl-mr3420-v2') diff --git a/targets/ath79-generic b/targets/ath79-generic new file mode 100644 index 0000000000..7caf65785f --- /dev/null +++ b/targets/ath79-generic @@ -0,0 +1,66 @@ +local ATH10K_PACKAGES_QCA9880 = { + 'kmod-ath10k', + '-kmod-ath10k-ct', + '-kmod-ath10k-ct-smallbuffers', + 'ath10k-firmware-qca988x', + '-ath10k-firmware-qca988x-ct', +} + +local ATH10K_PACKAGES_QCA9888 = { + 'kmod-ath10k', + '-kmod-ath10k-ct', + '-kmod-ath10k-ct-smallbuffers', + 'ath10k-firmware-qca9888', + '-ath10k-firmware-qca9888-ct', +} + +-- devolo + +device('devolo-wifi-pro-1200e', 'devolo_dvl1200e', { + packages = ATH10K_PACKAGES_QCA9880, + factory = false, +}) + +device('devolo-wifi-pro-1200i', 'devolo_dvl1200i', { + packages = ATH10K_PACKAGES_QCA9880, + factory = false, +}) + +device('devolo-wifi-pro-1750c', 'devolo_dvl1750c', { + packages = ATH10K_PACKAGES_QCA9880, + factory = false, +}) + +device('devolo-wifi-pro-1750e', 'devolo_dvl1750e', { + packages = ATH10K_PACKAGES_QCA9880, + factory = false, +}) + +device('devolo-wifi-pro-1750i', 'devolo_dvl1750i', { + packages = ATH10K_PACKAGES_QCA9880, + factory = false, +}) + +device('devolo-wifi-pro-1750x', 'devolo_dvl1750x', { + packages = ATH10K_PACKAGES_QCA9880, + factory = false, +}) + +-- GL.iNet + +device('gl.inet-gl-ar300m-lite', 'glinet_gl-ar300m-lite', { + factory = false, +}) + +-- OCEDO + +device('ocedo-raccoon', 'ocedo_raccoon', { + factory = false, +}) + +-- TP-Link + +device('tp-link-archer-c6-v2', 'tplink_archer-c6-v2', { + packages = ATH10K_PACKAGES_QCA9888, +}) + diff --git a/targets/brcm2708-bcm2708 b/targets/brcm2708-bcm2708 new file mode 100644 index 0000000000..4d4068aba3 --- /dev/null +++ b/targets/brcm2708-bcm2708 @@ -0,0 +1,12 @@ +include 'brcm2708.inc' + +device('raspberrypi-model-b', 'rpi', { + manifest_aliases = { + 'raspberrypi-model-b-plus', + 'raspberrypi-model-b-rev2', + + -- from Gluon 2019.1 and older + 'raspberry-pi-model-b-rev-2', + 'raspberry-pi-model-b-plus-rev-1.2', + }, +}) diff --git a/targets/brcm2708-bcm2709 b/targets/brcm2708-bcm2709 new file mode 100644 index 0000000000..e5af9c896f --- /dev/null +++ b/targets/brcm2708-bcm2709 @@ -0,0 +1,8 @@ +include 'brcm2708.inc' + +device('raspberrypi-2-model-b', 'rpi-2', { + manifest_aliases = { + -- from Gluon 2019.1 and older + 'raspberry-pi-2-model-b-rev-1.1', + }, +}) diff --git a/targets/brcm2708-bcm2710 b/targets/brcm2708-bcm2710 new file mode 100644 index 0000000000..1cf9ef3697 --- /dev/null +++ b/targets/brcm2708-bcm2710 @@ -0,0 +1,10 @@ +include 'brcm2708.inc' + +device('raspberrypi-3-model-b', 'rpi-3', { + manifest_aliases = { + 'raspberrypi-3-model-b-plus', + + -- from Gluon 2019.1 and older + 'raspberry-pi-3-model-b-rev-1.2', + }, +}) diff --git a/targets/brcm2708.inc b/targets/brcm2708.inc new file mode 100644 index 0000000000..e15988b4d3 --- /dev/null +++ b/targets/brcm2708.inc @@ -0,0 +1,6 @@ +defaults { + factory = '-ext4-factory', + factory_ext = '.img.gz', + sysupgrade = '-ext4-sysupgrade', + sysupgrade_ext = '.img.gz', +} diff --git a/targets/generic b/targets/generic new file mode 100644 index 0000000000..65982ef4bf --- /dev/null +++ b/targets/generic @@ -0,0 +1,72 @@ +assert(env.GLUON_LANGS) + + +config('CONFIG_GLUON_SITEDIR="%s"', env.GLUON_SITEDIR) +config('CONFIG_GLUON_RELEASE="%s"', env.GLUON_RELEASE) +try_config('CONFIG_GLUON_BRANCH="%s"', env.GLUON_BRANCH or '') + +for lang in string.gmatch(env.GLUON_LANGS, '%S+') do + try_config('CONFIG_GLUON_WEB_LANG_%s=y', lang) +end + +config('CONFIG_TARGET_%s=y', env.BOARD) +if env.SUBTARGET ~= '' then + config('CONFIG_TARGET_%s_%s=y', env.BOARD, env.SUBTARGET) +end + +-- Disable non-default feeds in distfeeds.conf +config('# CONFIG_FEED_gluon_base is not set') + +local default_feeds = {} +for feed in string.gmatch(exec_capture_raw('. scripts/default_feeds.sh && echo "$DEFAULT_FEEDS"'), '%S+') do + default_feeds[feed] = true +end + +for feed in string.gmatch(exec_capture_raw('. scripts/modules.sh && echo -n "$FEEDS"'), '%S+') do + if not default_feeds[feed] then + config('# CONFIG_FEED_%s is not set', feed) + end +end + + +config '# CONFIG_TARGET_ROOTFS_INITRAMFS is not set' + +config 'CONFIG_ALL_NONSHARED=y' + +config '# CONFIG_PACKAGE_usbip is not set' -- fails to build +config '# CONFIG_PACKAGE_kmod-jool is not set' -- fails to build + +config 'CONFIG_BUSYBOX_CUSTOM=y' +config '# CONFIG_BUSYBOX_CONFIG_FEATURE_PREFER_IPV4_ADDRESS is not set' + +config 'CONFIG_PACKAGE_ATH_DEBUG=y' + +config '# CONFIG_KERNEL_IP_MROUTE is not set' +config '# CONFIG_KERNEL_IPV6_MROUTE is not set' + +try_config 'CONFIG_TARGET_MULTI_PROFILE=y' +try_config 'CONFIG_TARGET_PER_DEVICE_ROOTFS=y' + +if envtrue.GLUON_MULTIDOMAIN then + config 'CONFIG_GLUON_MULTIDOMAIN=y' +end + +if envtrue.GLUON_DEBUG then + config 'CONFIG_DEBUG=y' + config 'CONFIG_NO_STRIP=y' + config '# CONFIG_USE_STRIP is not set' + config '# CONFIG_USE_SSTRIP is not set' + + try_config 'CONFIG_TARGET_ROOTFS_PARTSIZE=500' +end + + +packages { + '-odhcpd-ipv6only', + '-ppp', + '-ppp-mod-pppoe', + '-wpad-mini', + '-wpad-basic', + 'gluon-core', + 'ip6tables', +} diff --git a/targets/ipq40xx-generic b/targets/ipq40xx-generic new file mode 100644 index 0000000000..8df11ea24a --- /dev/null +++ b/targets/ipq40xx-generic @@ -0,0 +1,89 @@ +local ATH10K_PACKAGES_IPQ40XX = { + 'kmod-ath10k', + '-kmod-ath10k-ct', + '-kmod-ath10k-ct-smallbuffers', + 'ath10k-firmware-qca4019', + '-ath10k-firmware-qca4019-ct', +} +local ATH10K_PACKAGES_IPQ40XX_QCA9888 = { + 'kmod-ath10k', + '-kmod-ath10k-ct', + '-kmod-ath10k-ct-smallbuffers', + 'ath10k-firmware-qca4019', + '-ath10k-firmware-qca4019-ct', + 'ath10k-firmware-qca9888', + '-ath10k-firmware-qca9888-ct', +} + + +defaults { + packages = ATH10K_PACKAGES_IPQ40XX, +} + + +-- Aruba + +device('aruba-ap-303', 'aruba_ap-303', { + factory = false, + aliases = {'aruba-instant-on-ap11'}, +}) + + +-- AVM + +device('avm-fritz-box-4040', 'avm_fritzbox-4040', { + factory = false, + extra_images = { + {'-squashfs-eva', '-bootloader', '.bin'}, + }, +}) + +device('avm-fritz-repeater-1200', 'avm_fritzrepeater-1200', { + factory = false, +}) + + +-- GL.iNet + +device('gl.inet-gl-b1300', 'glinet_gl-b1300', { + factory = false, +}) + + +-- NETGEAR + +device('netgear-ex6100v2', 'netgear_ex6100v2', { + factory_ext = '.img', +}) + +device('netgear-ex6150v2', 'netgear_ex6150v2', { + factory_ext = '.img', +}) + + +-- OpenMesh + +device('openmesh-a42', 'openmesh_a42') + +device('openmesh-a62', 'openmesh_a62', { + packages = ATH10K_PACKAGES_IPQ40XX_QCA9888, +}) + + +-- ZyXEL + +device('zyxel-nbg6617', 'zyxel_nbg6617') + +device('zyxel-wre6606', 'zyxel_wre6606', { + factory = false, +}) + + +-- 8devices + +device('8devices-jalapeno', '8dev_jalapeno', { + factory = '-squashfs-nand-factory', + factory_ext = '.ubi', + sysupgrade = '-squashfs-nand-sysupgrade', + sysupgrade_ext = '.bin', +}) diff --git a/targets/ipq806x-generic b/targets/ipq806x-generic new file mode 100644 index 0000000000..1b3263fc3e --- /dev/null +++ b/targets/ipq806x-generic @@ -0,0 +1,28 @@ +-- The QCA9980 was discontinued by Qualcomm. It didn't receive any firmware-update for over 4 years. +-- See https://github.com/kvalo/ath10k-firmware/tree/master/QCA99X0/hw2.0 +-- 802.11s was never implemented for the chip's firmware. It will most likely be broken forever. +-- The QCA9984 on the other hand works fine for 11s meshes on both bands. + +local QCA9980_PACKAGES = {'-kmod-ath10k', 'kmod-ath10k-ct', '-ath10k-firmware-qca99x0', 'ath10k-firmware-qca99x0-ct'} +local QCA9984_PACKAGES = {'kmod-ath10k', '-kmod-ath10k-ct', 'ath10k-firmware-qca9984', '-ath10k-firmware-qca9984-ct'} + + +-- +-- QCA9980 +-- + +-- TP-Link +device('tp-link-archer-c2600', 'tplink_c2600', { + packages = QCA9980_PACKAGES, + broken = true, +}) + +-- +-- QCA9984 +-- + +-- NETGEAR +device('netgear-nighthawk-x4s-r7800', 'netgear_r7800', { + factory_ext = '.img', + packages = QCA9984_PACKAGES, +}) diff --git a/targets/lantiq-xrx200 b/targets/lantiq-xrx200 new file mode 100644 index 0000000000..43526eb079 --- /dev/null +++ b/targets/lantiq-xrx200 @@ -0,0 +1,12 @@ +device('avm-fritz-box-7360-sl', 'avm_fritz7360sl', { + factory = false, + aliases = {'avm-fritz-box-7360-v1', 'avm-fritz-box-7360-v2'}, +}) + +device('avm-fritz-box-7362-sl', 'avm_fritz7362sl', { + factory = false, +}) + +device('avm-fritz-box-7412', 'avm_fritz7412', { + factory = false, +}) diff --git a/targets/mpc85xx-generic b/targets/mpc85xx-generic new file mode 100644 index 0000000000..a806587b4a --- /dev/null +++ b/targets/mpc85xx-generic @@ -0,0 +1 @@ +device('tp-link-tl-wdr4900-v1', 'tl-wdr4900-v1') diff --git a/targets/mvebu-cortexa9 b/targets/mvebu-cortexa9 new file mode 100644 index 0000000000..1a5e640e7b --- /dev/null +++ b/targets/mvebu-cortexa9 @@ -0,0 +1,3 @@ +device('linksys-wrt1200ac', 'linksys_wrt1200ac', { + factory_ext = '.img', +}) diff --git a/targets/ramips-mt7620 b/targets/ramips-mt7620 new file mode 100644 index 0000000000..9dd6a2d9ef --- /dev/null +++ b/targets/ramips-mt7620 @@ -0,0 +1,58 @@ +-- ASUS + +device('asus-rt-ac51u', 'rt-ac51u', { + factory = false, + broken = true, -- no 5GHz usable, LEDs not fully supported +}) + + +-- GL.iNet + +device('gl-mt300a', 'gl-mt300a', { + factory = false, +}) + +device('gl-mt300n', 'gl-mt300n', { + factory = false, +}) + +device('gl-mt750', 'gl-mt750', { + factory = false, +}) + + +-- Nexx + +device('nexx-wt3020-8m', 'wt3020-8M', { + aliases = { + 'nexx-wt3020ad', + 'nexx-wt3020f', + 'nexx-wt3020h', + }, +}) + +-- TP-Link + +local tplink_region_suffix = '' +if (env.GLUON_REGION or '') ~= '' then + tplink_region_suffix = '-' .. env.GLUON_REGION +end + +device('tp-link-archer-c2-v1', 'tplink_c2-v1', { + factory = false, +}) + +device('tp-link-archer-c20-v1', 'tplink_c20-v1') + +device('tp-link-archer-c20i', 'ArcherC20i') + +device('tp-link-archer-c50', 'ArcherC50v1', { + factory = '-squashfs-factory' .. tplink_region_suffix, +}) + + +-- Xiaomi + +device('xiaomi-miwifi-mini', 'miwifi-mini', { + factory = false, +}) diff --git a/targets/ramips-mt7621 b/targets/ramips-mt7621 new file mode 100644 index 0000000000..9b3ddf86e1 --- /dev/null +++ b/targets/ramips-mt7621 @@ -0,0 +1,55 @@ +-- ASUS + +device('asus-rt-ac57u', 'asus_rt-ac57u', { + factory = false, +}) + + +-- D-Link + +device('d-link-dir-860l-b1', 'dir-860l-b1') + + +-- Netgear + +device('netgear-ex6150', 'netgear_ex6150', { + factory_ext = '.chk', +}) + +device('netgear-r6220', 'r6220', { + factory_ext = '.img', +}) + +device('netgear-wndr3700v5', 'wndr3700v5', { + factory = false, + broken = true, -- untested +}) + + +-- ZBT + +device('zbt-wg3526-16m', 'zbt-wg3526-16M', { + factory = false, + manifest_aliases = { + 'zbt-wg3526', + }, +}) + +device('zbt-wg3526-32m', 'zbt-wg3526-32M', { + factory = false, +}) + + +-- Devices without WLAN + +-- Ubiquiti + +device('ubnt-erx', 'ubnt-erx', { + factory = false, + packages = {'-hostapd-mini'}, +}) + +device('ubnt-erx-sfp', 'ubnt-erx-sfp', { + factory = false, + packages = {'-hostapd-mini'}, +}) diff --git a/targets/ramips-mt76x8 b/targets/ramips-mt76x8 new file mode 100644 index 0000000000..c1e0354f9c --- /dev/null +++ b/targets/ramips-mt76x8 @@ -0,0 +1,71 @@ +-- GL.iNet + +device('gl-mt300n-v2', 'gl-mt300n-v2', { + factory = false, +}) + +device('gl.inet-vixmini', 'glinet_vixmini', { + factory = false, +}) + + +-- Netgear + +device('netgear-r6120', 'netgear_r6120', { + factory_ext = '.img', +}) + + +-- TP-Link + +device('tp-link-archer-c50-v3', 'tplink_c50-v3', { + factory = false, + extra_images = { + {'-squashfs-tftp-recovery', '-bootloader', '.bin'}, + }, +}) + +device('tp-link-archer-c50-v4', 'tplink_c50-v4', { + factory = false, +}) + +device('tp-link-tl-mr3020-v3', 'tplink_tl-mr3020-v3', { + factory = false, + extra_images = { + {'-squashfs-tftp-recovery', '-bootloader', '.bin'}, + }, +}) + +device('tp-link-tl-mr3420-v5', 'tplink_tl-mr3420-v5', { + factory = false, + extra_images = { + {'-squashfs-tftp-recovery', '-bootloader', '.bin'}, + }, +}) + +device('tp-link-tl-wa801nd-v5', 'tplink_tl-wa801nd-v5', { + factory = false, + extra_images = { + {'-squashfs-tftp-recovery', '-bootloader', '.bin'}, + }, +}) + +device('tp-link-tl-wr841n-v13', 'tl-wr841n-v13', { + factory = false, + extra_images = { + {'-squashfs-tftp-recovery', '-bootloader', '.bin'}, + }, +}) + +device('tp-link-tl-wr902ac-v3', 'tplink_tl-wr902ac-v3', { + factory = false, + extra_images = { + {'-squashfs-tftp-recovery', '-bootloader', '.bin'}, + }, +}) + +-- VoCore 2 + +device('vocore2', 'vocore2', { + factory = false, +}) diff --git a/targets/targets.mk b/targets/targets.mk new file mode 100644 index 0000000000..9009898eab --- /dev/null +++ b/targets/targets.mk @@ -0,0 +1,29 @@ +$(eval $(call GluonTarget,ar71xx,generic)) +ifneq ($(GLUON_DEPRECATED),0) +$(eval $(call GluonTarget,ar71xx,tiny)) +endif +$(eval $(call GluonTarget,ar71xx,nand)) +$(eval $(call GluonTarget,ath79,generic)) +$(eval $(call GluonTarget,brcm2708,bcm2708)) +$(eval $(call GluonTarget,brcm2708,bcm2709)) +$(eval $(call GluonTarget,ipq40xx,generic)) +$(eval $(call GluonTarget,ipq806x,generic)) +$(eval $(call GluonTarget,lantiq,xrx200)) +$(eval $(call GluonTarget,lantiq,xway)) +$(eval $(call GluonTarget,mpc85xx,generic)) +$(eval $(call GluonTarget,mpc85xx,p1020)) +$(eval $(call GluonTarget,ramips,mt7620)) +$(eval $(call GluonTarget,ramips,mt7621)) +$(eval $(call GluonTarget,ramips,mt76x8)) +$(eval $(call GluonTarget,ramips,rt305x)) +$(eval $(call GluonTarget,sunxi,cortexa7)) +$(eval $(call GluonTarget,x86,generic)) +$(eval $(call GluonTarget,x86,geode)) +$(eval $(call GluonTarget,x86,64)) + + +ifneq ($(BROKEN),) +$(eval $(call GluonTarget,ar71xx,mikrotik)) # BROKEN: no sysupgrade support +$(eval $(call GluonTarget,brcm2708,bcm2710)) # BROKEN: Untested +$(eval $(call GluonTarget,mvebu,cortexa9)) # BROKEN: No 11s support +endif diff --git a/targets/x86-generic b/targets/x86-generic new file mode 100644 index 0000000000..57b55f4a09 --- /dev/null +++ b/targets/x86-generic @@ -0,0 +1,11 @@ +include 'x86.inc' + +factory_image('x86-generic', 'combined-squashfs', '.img.gz') +factory_image('x86-generic', 'combined-squashfs', '.vdi') +factory_image('x86-generic', 'combined-squashfs', '.vmdk') +sysupgrade_image('x86-generic', 'combined-squashfs', '.img.gz', { + manifest_aliases = { + 'x86-kvm', + 'x86-xen_domu', + }, +}) diff --git a/targets/x86.inc b/targets/x86.inc new file mode 100644 index 0000000000..4ca2bb8c64 --- /dev/null +++ b/targets/x86.inc @@ -0,0 +1,38 @@ +config 'CONFIG_VDI_IMAGES=y' +config 'CONFIG_VMDK_IMAGES=y' + +packages { + 'kmod-3c59x', + 'kmod-8139cp', + 'kmod-8139too', + 'kmod-e100', + 'kmod-e1000', + 'kmod-e1000e', + 'kmod-forcedeth', + 'kmod-igb', + 'kmod-natsemi', + 'kmod-ne2k-pci', + 'kmod-pcnet32', + 'kmod-r8169', + 'kmod-sis900', + 'kmod-sky2', + 'kmod-tg3', + 'kmod-tulip', + 'kmod-via-rhine', + 'kmod-via-velocity', + 'kmod-ath9k', + 'kmod-gpio-button-hotplug', + 'kmod-gpio-nct5104d', + 'kmod-hwmon-core', + 'kmod-leds-gpio', + 'kmod-leds-apu2', + 'kmod-sp5100_tco', + 'kmod-usb-core', + 'kmod-usb-ohci', + 'kmod-usb2', + 'kmod-usb3', + 'kmod-usb-serial', + 'kmod-ath10k', + 'ath10k-firmware-qca9887', + 'ath10k-firmware-qca988x', +} From be75b80b2d720f744bfc88b35717f72ed36b8509 Mon Sep 17 00:00:00 2001 From: Sven Roederer Date: Mon, 28 Oct 2019 13:36:10 +0100 Subject: [PATCH 05/82] gluon: (partial) add FLAG "GLUON_FOREIGN" to make the framework usable for other types of firmwares ignored changes in MAkefile defining this FLAG (to "1") disables / skips some things * including gluon-core packages * strict inclusion of some packages * per device sepecific kernel build * a gluon specific target/generic_gluon will be considered --- scripts/target_config_lib.lua | 13 +++++++--- targets/generic | 47 ----------------------------------- targets/generic_gluon | 45 +++++++++++++++++++++++++++++++++ 3 files changed, 54 insertions(+), 51 deletions(-) create mode 100644 targets/generic_gluon diff --git a/scripts/target_config_lib.lua b/scripts/target_config_lib.lua index 71443db779..7be10a3066 100644 --- a/scripts/target_config_lib.lua +++ b/scripts/target_config_lib.lua @@ -28,6 +28,9 @@ END_MAKE end lib.include('generic') + if env.FOREIGN_BUILD == '' then + lib.include('generic_gluon') + end for pkg in string.gmatch(extra_packages, '%S+') do lib.packages {pkg} end @@ -72,10 +75,12 @@ END_MAKE handle_pkg(pkg) end - funcs.config_message(lib.config, string.format("unable to enable device '%s'", profile), - 'CONFIG_TARGET_DEVICE_%s_DEVICE_%s=y', openwrt_config_target, profile) - lib.config('CONFIG_TARGET_DEVICE_PACKAGES_%s_DEVICE_%s="%s"', - openwrt_config_target, profile, device_pkgs) + if env.FOREIGN_BUILD == '' then + funcs.config_message(lib.config, string.format("unable to enable device '%s'", profile), + 'CONFIG_TARGET_DEVICE_%s_DEVICE_%s=y', openwrt_config_target, profile) + lib.config('CONFIG_TARGET_DEVICE_PACKAGES_%s_DEVICE_%s="%s"', + openwrt_config_target, profile, device_pkgs) + end end return lib diff --git a/targets/generic b/targets/generic index 65982ef4bf..dfeacd807b 100644 --- a/targets/generic +++ b/targets/generic @@ -1,22 +1,9 @@ -assert(env.GLUON_LANGS) - - -config('CONFIG_GLUON_SITEDIR="%s"', env.GLUON_SITEDIR) -config('CONFIG_GLUON_RELEASE="%s"', env.GLUON_RELEASE) -try_config('CONFIG_GLUON_BRANCH="%s"', env.GLUON_BRANCH or '') - -for lang in string.gmatch(env.GLUON_LANGS, '%S+') do - try_config('CONFIG_GLUON_WEB_LANG_%s=y', lang) -end config('CONFIG_TARGET_%s=y', env.BOARD) if env.SUBTARGET ~= '' then config('CONFIG_TARGET_%s_%s=y', env.BOARD, env.SUBTARGET) end --- Disable non-default feeds in distfeeds.conf -config('# CONFIG_FEED_gluon_base is not set') - local default_feeds = {} for feed in string.gmatch(exec_capture_raw('. scripts/default_feeds.sh && echo "$DEFAULT_FEEDS"'), '%S+') do default_feeds[feed] = true @@ -28,29 +15,6 @@ for feed in string.gmatch(exec_capture_raw('. scripts/modules.sh && echo -n "$FE end end - -config '# CONFIG_TARGET_ROOTFS_INITRAMFS is not set' - -config 'CONFIG_ALL_NONSHARED=y' - -config '# CONFIG_PACKAGE_usbip is not set' -- fails to build -config '# CONFIG_PACKAGE_kmod-jool is not set' -- fails to build - -config 'CONFIG_BUSYBOX_CUSTOM=y' -config '# CONFIG_BUSYBOX_CONFIG_FEATURE_PREFER_IPV4_ADDRESS is not set' - -config 'CONFIG_PACKAGE_ATH_DEBUG=y' - -config '# CONFIG_KERNEL_IP_MROUTE is not set' -config '# CONFIG_KERNEL_IPV6_MROUTE is not set' - -try_config 'CONFIG_TARGET_MULTI_PROFILE=y' -try_config 'CONFIG_TARGET_PER_DEVICE_ROOTFS=y' - -if envtrue.GLUON_MULTIDOMAIN then - config 'CONFIG_GLUON_MULTIDOMAIN=y' -end - if envtrue.GLUON_DEBUG then config 'CONFIG_DEBUG=y' config 'CONFIG_NO_STRIP=y' @@ -59,14 +23,3 @@ if envtrue.GLUON_DEBUG then try_config 'CONFIG_TARGET_ROOTFS_PARTSIZE=500' end - - -packages { - '-odhcpd-ipv6only', - '-ppp', - '-ppp-mod-pppoe', - '-wpad-mini', - '-wpad-basic', - 'gluon-core', - 'ip6tables', -} diff --git a/targets/generic_gluon b/targets/generic_gluon new file mode 100644 index 0000000000..e9c827710a --- /dev/null +++ b/targets/generic_gluon @@ -0,0 +1,45 @@ +assert(env.GLUON_LANGS) + +config('CONFIG_GLUON_SITEDIR="%s"', env.GLUON_SITEDIR) +config('CONFIG_GLUON_RELEASE="%s"', env.GLUON_RELEASE) +try_config('CONFIG_GLUON_BRANCH="%s"', env.GLUON_BRANCH or '') + +for lang in string.gmatch(env.GLUON_LANGS, '%S+') do + try_config('CONFIG_GLUON_WEB_LANG_%s=y', lang) +end + +-- Disable non-default feeds in distfeeds.conf +config('# CONFIG_FEED_gluon_base is not set') + +config '# CONFIG_TARGET_ROOTFS_INITRAMFS is not set' + +config 'CONFIG_ALL_NONSHARED=y' + +config '# CONFIG_PACKAGE_usbip is not set' -- fails to build +config '# CONFIG_PACKAGE_kmod-jool is not set' -- fails to build + +config 'CONFIG_BUSYBOX_CUSTOM=y' +config '# CONFIG_BUSYBOX_CONFIG_FEATURE_PREFER_IPV4_ADDRESS is not set' + +config 'CONFIG_PACKAGE_ATH_DEBUG=y' + +config '# CONFIG_KERNEL_IP_MROUTE is not set' +config '# CONFIG_KERNEL_IPV6_MROUTE is not set' + +try_config 'CONFIG_TARGET_MULTI_PROFILE=y' +try_config 'CONFIG_TARGET_PER_DEVICE_ROOTFS=y' + +if envtrue.GLUON_MULTIDOMAIN then + config 'CONFIG_GLUON_MULTIDOMAIN=y' +end + + +packages { + '-odhcpd-ipv6only', + '-ppp', + '-ppp-mod-pppoe', + '-wpad-mini', + '-wpad-basic', + 'gluon-core', + 'ip6tables', +} From 652a0c40c33b3485a4e0e3216774def84945b66f Mon Sep 17 00:00:00 2001 From: Sven Roederer Date: Sun, 27 Oct 2019 01:23:28 +0200 Subject: [PATCH 06/82] adapt gluon: Makefile improve add targets: * $(LUA): * gluon-config: define Vars: * GLUON_SITEDIR * GLUON_CONFIG_VARS --- Makefile | 74 ++++++++++++++++++++++++-------------------------------- 1 file changed, 32 insertions(+), 42 deletions(-) diff --git a/Makefile b/Makefile index d265b92166..1abd8d0e40 100644 --- a/Makefile +++ b/Makefile @@ -66,48 +66,38 @@ GLUON_PATCHESDIR ?= patches $(eval $(call mkabspath,GLUON_TMPDIR)) $(eval $(call mkabspath,GLUON_PATCHESDIR)) -export GLUON_TMPDIR GLUON_PATCHESDIR - -# use .stamp-gluon-module-openwrt and .stamp-gluon-module- of each feed to create modules-file -$(FW_DIR)/modules: $(addprefix .stamp-gluon-module-,$(FEEDS)) .stamp-gluon-module-openwrt - rm -f $@ - cat >>$@ .stamp-gluon-module-openwrt - cat >>$@ $(addprefix .stamp-gluon-module-,$(FEEDS)) - echo >>$@ GLUON_FEEDS=\'$(FEEDS)\' - -.stamp-gluon-module-openwrt: $(FW_DIR)/config.mk - rm -f $@ - echo >>$@ "OPENWRT_REPO=$(OPENWRT_SRC)" - echo >>$@ "OPENWRT_COMMIT=$(OPENWRT_COMMIT)" -# set the $FEED-Branch - git clone $$(grep _REPO $@ | cut -d "=" -f 2) $(GLUON_TMPDIR)/gluon_$@ - cd $(GLUON_TMPDIR)/gluon_$@; git name-rev --refs openwrt-* $$(grep _COMMIT $(FW_DIR)/$@ | \ - cut -d "=" -f 2) | cut -d / -f 2 | cut -d \~ -f 1 >branchname.txt - cd $(GLUON_TMPDIR)/gluon_$@; grep -q master branchname.txt || \ - printf >>$(FW_DIR)/$@ "OPENWRT_BRANCH=%s\n" \ - $$(echo $* | tr '[:lower:]' '[:upper:]') \ - $$(cat branchname.txt) - rm -rf $(GLUON_TMPDIR)/gluon_$@ - -.stamp-gluon-module-%: $(FW_DIR)/feeds.conf - rm -f $@ -# set the $FEED-REPO - @echo -n "PACKAGES_$*_REPO=" | tr '[:lower:]' '[:upper:]' >>$@ - @grep -E "^src-(git|svn)[[:space:]]$*[[:space:]].*" $(FW_DIR)/feeds.conf | \ - awk -F '([[:space:]|^])' '{ print $$3 }' >>$@ -# set the $FEED-COMMIT - @echo -n "PACKAGES_$*_COMMIT=" | tr '[:lower:]' '[:upper:]' >>$@ - @grep -E "^src-(git|svn)[[:space:]]$*[[:space:]].*" $(FW_DIR)/feeds.conf | \ - awk -F '([[:space:]|^])' '{ print $$4 }' >>$@ -# set the $FEED-Branch - git clone $$(grep _REPO $@ | cut -d "=" -f 2) $(GLUON_TMPDIR)/gluon_$@ - cd $(GLUON_TMPDIR)/gluon_$@; git name-rev $$(grep _COMMIT $(FW_DIR)/$@ | \ - cut -d "=" -f 2) | cut -d / -f 3 | cut -d \~ -f 1 >branchname.txt - cd $(GLUON_TMPDIR)/gluon_$@; grep -q master branchname.txt || \ - printf >>$(FW_DIR)/$@ "PACKAGES_%s_BRANCH=%s\n" \ - $$(echo $* | tr '[:lower:]' '[:upper:]') \ - $$(cat branchname.txt) - rm -rf $(GLUON_TMPDIR)/gluon_$@ +GLUON_SITEDIR ?= site +$(eval $(call mkabspath,GLUON_SITEDIR)) + +export GLUON_RELEASE GLUON_DEBUG GLUON_DEPRECATED GLUON_DEVICES \ + GLUON_TARGETSDIR GLUON_PATCHESDIR GLUON_TMPDIR GLUON_IMAGEDIR GLUON_PACKAGEDIR + +GLUON_CONFIG_VARS := \ + GLUON_SITEDIR='$(GLUON_SITEDIR)' \ + GLUON_RELEASE='$(GLUON_RELEASE)' \ + GLUON_BRANCH='$(GLUON_BRANCH)' \ + GLUON_LANGS='$(GLUON_LANGS)' \ + BOARD='$(BOARD)' \ + SUBTARGET='$(SUBTARGET)' + +LUA := openwrt/staging_dir/hostpkg/bin/lua + +$(LUA): + @$(CheckExternal) + + +@[ -e openwrt/.config ] || $(OPENWRTMAKE) defconfig + +@$(OPENWRTMAKE) tools/install + +@$(OPENWRTMAKE) package/lua/host/compile + +gluon-config: $(LUA) + @$(CheckExternal) + @$(GLUON_CONFIG_VARS) \ + $(LUA) scripts/target_config.lua '$(GLUON_TARGET)' '$(GLUON_PACKAGES)' \ + > openwrt/.config + +@$(OPENWRTMAKE) defconfig + + @$(GLUON_CONFIG_VARS) \ + $(LUA) scripts/target_config_check.lua '$(GLUON_TARGET)' '$(GLUON_PACKAGES)' ## Gluon - End From 5b4976784da293e71b85acdbb0a6a2b462603555 Mon Sep 17 00:00:00 2001 From: Sven Roederer Date: Wed, 19 Feb 2020 20:04:16 +0100 Subject: [PATCH 07/82] Makefile: gluon import more definitions * GLUON_TARGET * GLUON_PACKAGES * GLUON_TARGETSDIR * OPENWRTMAKE --- Makefile | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 1abd8d0e40..e5cba5bd49 100644 --- a/Makefile +++ b/Makefile @@ -61,9 +61,11 @@ endef # initialize (possibly already user set) directory variables GLUON_TMPDIR ?= tmp +GLUON_TARGETSDIR ?= targets GLUON_PATCHESDIR ?= patches $(eval $(call mkabspath,GLUON_TMPDIR)) +$(eval $(call mkabspath,GLUON_TARGETSDIR)) $(eval $(call mkabspath,GLUON_PATCHESDIR)) GLUON_SITEDIR ?= site @@ -77,9 +79,34 @@ GLUON_CONFIG_VARS := \ GLUON_RELEASE='$(GLUON_RELEASE)' \ GLUON_BRANCH='$(GLUON_BRANCH)' \ GLUON_LANGS='$(GLUON_LANGS)' \ - BOARD='$(BOARD)' \ + BOARD='$(MAINTARGET)' \ SUBTARGET='$(SUBTARGET)' + +GLUON_TARGET := $(TARGET) + + +OPENWRTMAKE = $(MAKE) -C openwrt + +GLUON_DEFAULT_PACKAGES := hostapd-mini + +GLUON_FEATURE_PACKAGES := $(shell scripts/features.sh '$(GLUON_FEATURES)' || echo '__ERROR__') +ifneq ($(filter __ERROR__,$(GLUON_FEATURE_PACKAGES)),) +$(error Error while evaluating GLUON_FEATURES) +endif + + +GLUON_PACKAGES := +define merge_packages + $(foreach pkg,$(1), + GLUON_PACKAGES := $$(strip $$(filter-out -$$(patsubst -%,%,$(pkg)) $$(patsubst -%,%,$(pkg)),$$(GLUON_PACKAGES)) $(pkg)) + ) +endef +$(eval $(call merge_packages,$(GLUON_DEFAULT_PACKAGES) $(GLUON_FEATURE_PACKAGES) $(GLUON_SITE_PACKAGES))) + +$(info package-src: $(GLUON_DEFAULT_PACKAGES) $(GLUON_FEATURE_PACKAGES) $(GLUON_SITE_PACKAGES)) +$(info packages: $(GLUON_PACKAGES)) + LUA := openwrt/staging_dir/hostpkg/bin/lua $(LUA): From 5502a64636d9e617a0033e6ce398b102d31c36e0 Mon Sep 17 00:00:00 2001 From: Sven Roederer Date: Wed, 19 Feb 2020 20:06:58 +0100 Subject: [PATCH 08/82] scripts: fix permissions --- scripts/features.sh | 0 scripts/filesize.sh | 0 scripts/target_config.lua | 0 scripts/target_config_check.lua | 0 scripts/update-patches.sh | 0 5 files changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 scripts/features.sh mode change 100644 => 100755 scripts/filesize.sh mode change 100644 => 100755 scripts/target_config.lua mode change 100644 => 100755 scripts/target_config_check.lua mode change 100644 => 100755 scripts/update-patches.sh diff --git a/scripts/features.sh b/scripts/features.sh old mode 100644 new mode 100755 diff --git a/scripts/filesize.sh b/scripts/filesize.sh old mode 100644 new mode 100755 diff --git a/scripts/target_config.lua b/scripts/target_config.lua old mode 100644 new mode 100755 diff --git a/scripts/target_config_check.lua b/scripts/target_config_check.lua old mode 100644 new mode 100755 diff --git a/scripts/update-patches.sh b/scripts/update-patches.sh old mode 100644 new mode 100755 From 522c465674794c4ff5a28ee9d6d98b775f4144a9 Mon Sep 17 00:00:00 2001 From: Sven Roederer Date: Wed, 19 Feb 2020 20:09:06 +0100 Subject: [PATCH 09/82] Makefile: gluon import setup of LANG and LC_ALL --- Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Makefile b/Makefile index e5cba5bd49..44a738368b 100644 --- a/Makefile +++ b/Makefile @@ -51,6 +51,10 @@ default: firmwares # * setup required makros and variables # * create the modules-file from config.mk and feeds.conf +LC_ALL:=C +LANG:=C +export LC_ALL LANG + # check for spaces & resolve possibly relative paths define mkabspath ifneq (1,$(words [$($(1))])) From 14b8844df26f88c633bcfd9f0d3ce224b85d08d3 Mon Sep 17 00:00:00 2001 From: Sven Roederer Date: Wed, 19 Feb 2020 22:11:15 +0100 Subject: [PATCH 10/82] MAkefile: [gluon] add target gluon-all which acts as all from original gluon --- Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Makefile b/Makefile index 44a738368b..f6ddb3974a 100644 --- a/Makefile +++ b/Makefile @@ -130,6 +130,9 @@ gluon-config: $(LUA) @$(GLUON_CONFIG_VARS) \ $(LUA) scripts/target_config_check.lua '$(GLUON_TARGET)' '$(GLUON_PACKAGES)' +gluon-all: gluon-config + +@$(OPENWRTMAKE) + ## Gluon - End # clean up openwrt working copy From bcd4e9629a310d3f7e06356c26b0a069c8faa8f1 Mon Sep 17 00:00:00 2001 From: Sven Roederer Date: Wed, 19 Feb 2020 22:47:34 +0100 Subject: [PATCH 11/82] extend FOREIGN_BUILD to include different target/generic --- Makefile | 4 ++-- scripts/target_config_lib.lua | 4 +--- targets/generic_ffberlin | 45 +++++++++++++++++++++++++++++++++++ 3 files changed, 48 insertions(+), 5 deletions(-) create mode 100644 targets/generic_ffberlin diff --git a/Makefile b/Makefile index f6ddb3974a..38ff4f2df1 100644 --- a/Makefile +++ b/Makefile @@ -122,12 +122,12 @@ $(LUA): gluon-config: $(LUA) @$(CheckExternal) - @$(GLUON_CONFIG_VARS) \ + @$(GLUON_CONFIG_VARS) FOREIGN_BUILD=ffberlin \ $(LUA) scripts/target_config.lua '$(GLUON_TARGET)' '$(GLUON_PACKAGES)' \ > openwrt/.config +@$(OPENWRTMAKE) defconfig - @$(GLUON_CONFIG_VARS) \ + @$(GLUON_CONFIG_VARS) FOREIGN_BUILD=ffberlin \ $(LUA) scripts/target_config_check.lua '$(GLUON_TARGET)' '$(GLUON_PACKAGES)' gluon-all: gluon-config diff --git a/scripts/target_config_lib.lua b/scripts/target_config_lib.lua index 7be10a3066..a800f07e47 100644 --- a/scripts/target_config_lib.lua +++ b/scripts/target_config_lib.lua @@ -28,9 +28,7 @@ END_MAKE end lib.include('generic') - if env.FOREIGN_BUILD == '' then - lib.include('generic_gluon') - end + lib.include('generic_' .. env.FOREIGN_BUILD) for pkg in string.gmatch(extra_packages, '%S+') do lib.packages {pkg} end diff --git a/targets/generic_ffberlin b/targets/generic_ffberlin new file mode 100644 index 0000000000..e9c827710a --- /dev/null +++ b/targets/generic_ffberlin @@ -0,0 +1,45 @@ +assert(env.GLUON_LANGS) + +config('CONFIG_GLUON_SITEDIR="%s"', env.GLUON_SITEDIR) +config('CONFIG_GLUON_RELEASE="%s"', env.GLUON_RELEASE) +try_config('CONFIG_GLUON_BRANCH="%s"', env.GLUON_BRANCH or '') + +for lang in string.gmatch(env.GLUON_LANGS, '%S+') do + try_config('CONFIG_GLUON_WEB_LANG_%s=y', lang) +end + +-- Disable non-default feeds in distfeeds.conf +config('# CONFIG_FEED_gluon_base is not set') + +config '# CONFIG_TARGET_ROOTFS_INITRAMFS is not set' + +config 'CONFIG_ALL_NONSHARED=y' + +config '# CONFIG_PACKAGE_usbip is not set' -- fails to build +config '# CONFIG_PACKAGE_kmod-jool is not set' -- fails to build + +config 'CONFIG_BUSYBOX_CUSTOM=y' +config '# CONFIG_BUSYBOX_CONFIG_FEATURE_PREFER_IPV4_ADDRESS is not set' + +config 'CONFIG_PACKAGE_ATH_DEBUG=y' + +config '# CONFIG_KERNEL_IP_MROUTE is not set' +config '# CONFIG_KERNEL_IPV6_MROUTE is not set' + +try_config 'CONFIG_TARGET_MULTI_PROFILE=y' +try_config 'CONFIG_TARGET_PER_DEVICE_ROOTFS=y' + +if envtrue.GLUON_MULTIDOMAIN then + config 'CONFIG_GLUON_MULTIDOMAIN=y' +end + + +packages { + '-odhcpd-ipv6only', + '-ppp', + '-ppp-mod-pppoe', + '-wpad-mini', + '-wpad-basic', + 'gluon-core', + 'ip6tables', +} From 81c3a4219ab0fcb87b2aa8f70fdaf4d3842dd8f7 Mon Sep 17 00:00:00 2001 From: Sven Roederer Date: Sat, 29 Feb 2020 13:15:51 +0100 Subject: [PATCH 12/82] Update upstream repos to openwrt-19.07.2 tag fixes: CVE-2020-8597, CVE-2013-1798, CVE-2019-14896, CVE-2019-14897 OpenWrt: 4668ae3bed OpenWrt v19.07.1: revert to branch defaults a229907150 ramips: remove duplicate DEVICE_PACKAGES for TP-Link Archer C20i aed6632d31 ramips: use tpt DTS trigger for TP-Link TL-MR3020 v3 and TL-WA801ND v5 3d1c84d424 ramips: reenable image creation for the D-Link DIR-645 eca8a2ee0d kernel: bump 4.14 to 4.14.169 2a844349fa kernel: add support for GD25D05 SPI NOR d91b52b1a2 kernel: add missing symbol 887eb669f9 mac80211: brcm: backport remaining 5.6 kernel patches cf2b042855 firmware-utils: add lxlfw tool for generating Luxul firmwares cff3795450 bcm53xx: build images for Luxul ABR-4500 and XBR-4500 routers 53cd2299ee ath79: WNDR3700 v1/v2: make u-boot env partition writable a0ca72d9ab uboot-envtools: ath79: add Netgear WNDR3700v2 5000fc53a1 ath79: fix DTS node names for Ubiquiti XW partitions b6c01fec92 hostapd: remove erroneous $(space) redefinition 2d21357b65 ath79: ar93xx/qca95xx: move gmac/wmac/pcie node out of apb bus 95d5cbdec3 ath79: add wmac migration for all ar93xx/qca95xx SoCs 6b7eeb74db ppp: backport security fixes 085f38351f ath79: enable forceless sysupgrade from ar71xx on fritz300e 7cbd39421e ath79: add gpio4 pinmux on TL-WR841N/ND v8, WR842N v2, MR3420 v2 6a950afde1 ath79: add support for Ubiquiti Nanostation Loco M (XM) 8fa6107aee ath79: add support for Ubiquiti Picostation M (XM) 2d3a93335a ramips: append tail to WF2881 initramfs image 21bf718b8c ath79: add support for Ubiquiti NanoStation Loco M (XW) b2660e67f0 Revert "ath79: add support for Ubiquiti NanoStation Loco M (XW)" c9b6bb43ce ath79: phy-ar7200-usb: adapt old behavior of arch/mips/ath79/dev-usb.c d0c8875faf ath79: ar934x: use reset for usb-phy-analog 191822b59f ipq806x: add missing core1 voltage tolerance bc0ca20ca9 ipq806x: fix bug in L2 cache scaling af79c3bccc kernel: bump 4.14 to 4.14.171 9e2a1af62f uhttpd: update to latest Git HEAD 0e9e5b1553 Revert "ppp: backport security fixes" cf118077cd ppp: backport security fixes 4edadfb997 ath79: add support for Ubiquiti NanoStation Loco M (XW) b33cfb7eb2 ath79: add missing reset-gpios for NanoStation Loco M (XW) 65030d81f3 libubox: update to latest Git HEAD 33732f4a9c OpenWrt v19.07.2: adjust config defaults packages: 30d0c2ee0 python: Replace utime with utimes a76dd0635 python: Fix float byte order detection ad50eb7c0 python3: Fix float byte order detection 36a1c0c5a python-certify: bump to 2019.11.28 265e444d3 mariadb: security bump to 10.2.31 cff7a04a6 Merge pull request #11176 from jefferyto/python-fix-float-byte-order-openwrt-19.07 f7b3d0062 Merge pull request #11184 from micmac1/19.07-maria-10.2.31 8b5c2901c nginx: backport master changes to 19.07 2c4e6a539 uwsgi: backport master changes to 19.07 266917ae5 Merge pull request #11197 from Ansuel/backport 752070f84 nextdns: Update to version 1.4.23 6e5977094 libxml2/host: revert xml2-config prefix fix 0eb7b3e4e libxml2: install xml2-config with host triplet e73b2a0a0 Merge pull request #11203 from micmac1/19.07-xml2 da3df8f6c hcxdumptool: update to 6.0.1 00a1294d0 wsdd2: fix typos 8dffab34b adblock: update 3.8.15 24c1ebc2b Merge pull request #11216 from dibdot/19.07-2 98499ee44 Merge pull request #11214 from Andy2244/wsdd2-fix_typos-(19.07) 9a792f41c golang: Update to 1.13.7, add PKG_CPE_ID to Makefile 3c95786ac Merge pull request #11219 from jefferyto/golang-1.13.7-openwrt-19.07 ba9262f04 dnscrypt-proxy2: update to version 2.0.36 afb4bb4c2 dnscrypt-proxy2: update to version 2.0.39 f828174de hcxtools: update to 5.3.0 + changes to Makefile to include latest binaries being compiled 0263d2273 sqlite3: update to version 3.31.1 6ac743909 Merge pull request #11226 from micmac1/sqlite3-19.07 1d7cda2ed golang: Improve build isolation from user environment f8999d963 Merge pull request #11229 from jefferyto/golang-env-fixes-openwrt-19.07 433264290 Merge pull request #11213 from adde88/openwrt-19.07 90e596693 shadow: update to 4.8.1 268ea7a78 python-importlib-metadata: add new package da2071507 syslog-ng: listen not globally but just locally 4d16e3ae3 freeradius3: Fix proxy.conf file conflict. c417bddda freeradius3: Enable the rlm_python and rlm_python3 modules. 3cf0c61f2 php7: update to 7.2.27 04da60f17 nano: update to 4.8 391f5f087 apr: bump to 1.7.0 & sync with master 4cba41ac1 apr-util: sync with master 623ae4614 apache: bump to 2.4.41 & sync with master 8b238c840 subversion: add libsqlite3 depend 019b8fd05 subversion: fix build failure 9e551f1b3 apache: add postinstall script 9be5706a7 Merge pull request #11245 from Robby-/openwrt-19.07-rlmpython_and_fixproxycfgconflict f815a7416 Merge pull request #11281 from micmac1/apache-19.07-up 490685093 dnsdist: fix compilation on PIE ARM64 1a503986f samba4: update to 4.11.6, add new UCI option f5be481a4 ksmbd: update to 3.1.3, ksmbd-tools: update to 3.2.1, add smb1 support, add avahi support package a0c00a213 Merge pull request #11297 from Andy2244/ksmbd-update-3.1.3-(19.07) 8640d243e Merge pull request #11296 from Andy2244/samba4-update-4.11.6-(19.07) 659b1b807 boost: Fix embarassing ARC typo 8e746461f measurement-kit: update to version 0.10.9 bdca0e7bf measurement-kit: Fix compilation with uClibc-ng c7e1106d1 nss: Fix compilation with uClibc-ng 5c856ff55 perl: Don't build InstallDev under ARC fc5935729 perl: define $sysroot for extensions b4febf32c liburcu: Don't build under ARC, not even InstallDev 78d7c8aef knot: Do not try to build under ARC 76947a8be boost: reintroduce uClibc-ng patch 2b15682da sshpass: add new package 403c98169 Merge pull request #11356 from neheb/boostkkk 2058e86fa zabbix: Fix compilation with uClibc-ng 1e97faf11 zabbix: remove configure patch 9d6855be1 ffmpeg: Fix pkgconfig files to be more cross compile friendly c53055aa1 ffmpeg: Fix fdkaac patches dbef69927 ffmpeg: update to 3.4.7 bd24f9bb3 ffmpeg: disable x86 asm for old CPU types 2f5b20987 haproxy: Update HAProxy to v2.0.13 156dd4ad0 Merge pull request #11360 from gladiac1337/haproxy-2.0.13-openwrt-19.07 12b84e6ac golang: Update to 1.13.8 3cf36f145 Merge pull request #11375 from jefferyto/golang-1.13.8-openwrt-19.07 1fbf3e179 Shorewall-core: Bump to version 5.2.3.6 7c8f5fd70 Shorewall-lite: Bump to version 5.2.3.6 4f0e5c49d Shorewall6-lite: Bump to version 5.2.3.6 481e63feb Shorewall: Bump to version 5.2.3.6 1c7b7cfdf Shorewall6: Bump to version 5.2.3.6 e29cc586f Merge pull request #11381 from wvdakker/openwrt-19.07 2c0a307ee acme: update to 2.8.5 3a4d88f5d youtube-dl: update to version 2020.1.15 7153a1f7f youtube-dl: update to version 2020.1.24 201ec1470 youtube-dl: update to version 2020.2.16 47dc62ba2 nnn: update to version 2.9 11b2c1ea1 nnn: update to version 3.0 e9ea875a1 zip: remove package 7fe207375 xl2tpd: bump to version 1.3.15 61970ece5 xl2tpd: fix building failure caused by pfc 95c72d8ab php7: update to 7.2.28 8b1101bbd gnutls: updated to 3.6.12 c3ff03a34 ocserv: updated to 0.12.6 13e8c6ffe pagekite: bump to v0.91.200218 42c7a7adb pagekite: avoid redundant information in syslog 99efce0cd pagekite: add simple websockets and update syntax LuCI: 66213ef61 luci-app-advanced-reboot: fix faulty ip.new() invocation 4f50a4fa8 luci-mod-network: dhcp.js: fix resolvefile option depends 159219787 luci-base: validation.js: fix integer and float type validation 8b1683524 luci-lib-ip: explicitly clear scope when allocating new userdata 2910f6e6b luci-base: extend rollback timeout to 90 seconds 920433457 rpcd-mod-luci: honour dhcp leases without ip address for host hints 405f5e837 luci-base: form.js: ButtonValue: pass sid as first onclick argument 1fdef8cb6 luci-base: form.js: pass section_id to Button onclick handler 2665c5fef treewide: merge master translation updates 69445fa25 luci-base: luci.js: L.dom.data(): gracefully handle non-node argument 49999e987 luci-base: cbi.js: avoid double-initialization of dropdowns c09e27639 luci-app-samba4: add support for new UCI option 0da47ff5c Merge pull request #3621 from Andy2244/luci-app-samba4_new-UCI-(19.07) bd38c30a3 luci-app-ksmbd: update for 3.2.1 version (usmbd -> ksmbd.mountd) b80daa1ab luci-app-ksmbd: support new UCI option "allow_legacy_protocols" 4dea7aedd Merge pull request #3622 from Andy2244/luci-app-ksmbd_new-UCI-(19.07) 85a6f0745 luci-mod-network, luci-mod-status: harmonize wifi signal indicators da80dcc40 luci-mod-network: explicitely configure "none" encryption in wifi join 29c29a6b4 luci-mod-network: wifi scan: add button to start/stop refreshes 4c8f0cdcc luci-mod-network: wifi join: add option to lock bssid 62be6eff0 luci-mod-network: wifi join: allow reclaiming empty wwan networks 657407f92 treewide: resync and backport translations 087e6acbf luci-app-firewall: snats.js: fix rewrite IP validation for SNAT target 02c68f283 luci-mod-status: hide DHCP status if dnsmasq/odhcpd aren't present 98ca75e91 luci-app-opkg: gracefully handle empty config files 13dd17fca treewide: merge master translations routing: f1b0476 luci-app-bmx6: bugfix format to query bmx6-info efa6e54 luci-app-bmx6: bugfix querying bmx6-info (p2) --- config.mk | 2 +- feeds.conf | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/config.mk b/config.mk index 2662d03b56..aac3b0eab2 100644 --- a/config.mk +++ b/config.mk @@ -3,6 +3,6 @@ SHELL:=$(shell which bash) TARGET=ar71xx-generic PACKAGES_LIST_DEFAULT=notunnel tunnel-berlin-tunneldigger manual OPENWRT_SRC=https://git.openwrt.org/openwrt/openwrt.git -OPENWRT_COMMIT=901bbe2ab97efd3af0eb00efc3b413617145d654 +OPENWRT_COMMIT=33732f4a9c17921b782167a0dcaba9703d4e6753 SET_BUILDBOT=env MAKE_ARGS= diff --git a/feeds.conf b/feeds.conf index 00d23f0092..5ca684a2bd 100644 --- a/feeds.conf +++ b/feeds.conf @@ -1,7 +1,7 @@ -src-git packages https://github.com/openwrt/packages.git^1ec76dd7ca647f76a75c4f88b3b70d154221e7e9 -src-git luci https://github.com/openwrt/luci.git^adbbd5cf690cf993e0de1e56266ac6fd2b2dfe91 +src-git packages https://github.com/openwrt/packages.git^99efce0cd27adfcc53384fba93f37e5ee2e517de +src-git luci https://github.com/openwrt/luci.git^13dd17fca148965d38f0d4e578b19679a7c4daa2 src-git freifunk https://github.com/freifunk/openwrt-packages.git^73454e6fe1bdc902c69ca0079d979fdb94d6fb1f -src-git routing https://github.com/openwrt-routing/packages.git^839ea37939ad1c6cbb4ac543962bbb66be4a2a3f +src-git routing https://github.com/openwrt-routing/packages.git^efa6e5445adda9c6545f551808829ec927cbade8 src-git packages_berlin https://github.com/freifunk-berlin/firmware-packages.git^b03e01ed5a3b691a19cf284627aab9820ce6c2b8 src-git packages_gluon https://github.com/freifunk-gluon/packages.git^033401c18ecbf5073f5330b4462af6e450e358ff From 24ad7e5de76d6ac2eb692ebf1cc99e1f863b203e Mon Sep 17 00:00:00 2001 From: Sven Roederer Date: Sat, 22 Feb 2020 00:42:27 +0100 Subject: [PATCH 13/82] profiles: add some NanoStation M devices to ath79 * NanoStation Loco M (XM) * PicoStation M (XM) These boards have been added to upstream with a dedicated profile. --- profiles/ath79-generic.profiles | 2 ++ 1 file changed, 2 insertions(+) diff --git a/profiles/ath79-generic.profiles b/profiles/ath79-generic.profiles index a4e9a34761..409995c787 100644 --- a/profiles/ath79-generic.profiles +++ b/profiles/ath79-generic.profiles @@ -6,5 +6,7 @@ tplink_archer-c7-v4 tplink_archer-c7-v5 tplink_tl-wr1043n-v5 ubnt_bullet-m-xw +ubnt_nanostation-loco-m +ubnt_picostation-m ubnt_unifiac-mesh ubnt_unifiac-pro From 62726240a86f8a926bd2c98f446a7b43f3d0f961 Mon Sep 17 00:00:00 2001 From: Sven Roederer Date: Sun, 1 Mar 2020 04:02:37 +0100 Subject: [PATCH 14/82] configs: remove explicit activation of ASLR In c271bc08edcaf25b14526a98b4fd5976a2f71aad we intended to enable PKG_ASLR, but after fixing a typo it turns out that this breaks some packages. Some addon kernel-packages failing with `mips-openwrt-linux-musl-ld: unrecognized option '-specs=include/hardened-ld-pie.specs'`. As ASLR also increases the size of the binaries upstream reworked this option in 19cbac7d264dfca1f75849de64beb98830fbb1e4 to be enabled by default for specific binaries on targets with plenty flash. --- configs/common.config | 1 - 1 file changed, 1 deletion(-) diff --git a/configs/common.config b/configs/common.config index df89bf324d..c55cb6fe4b 100644 --- a/configs/common.config +++ b/configs/common.config @@ -183,7 +183,6 @@ CONFIG_PACKAGE_usbutils=m CONFIG_PACKAGE_vnstat=m CONFIG_PACKAGE_wpad-basic=m CONFIG_PACKAGE_zlib=m -CONFIG_PKG_ASLR_PIE=y CONFIG_PREINITOPT=y CONFIG_SDK=y CONFIG_STRIP_KERNEL_EXPORTS=y From c24780e4d70d57d9b61a2a853af0678d7334f520 Mon Sep 17 00:00:00 2001 From: Sven Roederer Date: Thu, 20 Feb 2020 11:12:40 +0100 Subject: [PATCH 15/82] targets: update gerneric_ffberlin to pass CONFIG_settings check not failing --- targets/generic_ffberlin | 194 ++++++++++++++++++++++++++++++++++----- 1 file changed, 172 insertions(+), 22 deletions(-) diff --git a/targets/generic_ffberlin b/targets/generic_ffberlin index e9c827710a..bf6c754f02 100644 --- a/targets/generic_ffberlin +++ b/targets/generic_ffberlin @@ -1,45 +1,195 @@ -assert(env.GLUON_LANGS) - -config('CONFIG_GLUON_SITEDIR="%s"', env.GLUON_SITEDIR) -config('CONFIG_GLUON_RELEASE="%s"', env.GLUON_RELEASE) -try_config('CONFIG_GLUON_BRANCH="%s"', env.GLUON_BRANCH or '') - -for lang in string.gmatch(env.GLUON_LANGS, '%S+') do - try_config('CONFIG_GLUON_WEB_LANG_%s=y', lang) -end - --- Disable non-default feeds in distfeeds.conf -config('# CONFIG_FEED_gluon_base is not set') config '# CONFIG_TARGET_ROOTFS_INITRAMFS is not set' -config 'CONFIG_ALL_NONSHARED=y' - config '# CONFIG_PACKAGE_usbip is not set' -- fails to build config '# CONFIG_PACKAGE_kmod-jool is not set' -- fails to build config 'CONFIG_BUSYBOX_CUSTOM=y' config '# CONFIG_BUSYBOX_CONFIG_FEATURE_PREFER_IPV4_ADDRESS is not set' -config 'CONFIG_PACKAGE_ATH_DEBUG=y' +--config 'CONFIG_PACKAGE_ATH_DEBUG=y' config '# CONFIG_KERNEL_IP_MROUTE is not set' config '# CONFIG_KERNEL_IPV6_MROUTE is not set' try_config 'CONFIG_TARGET_MULTI_PROFILE=y' +try_config 'CONFIG_TARGET_ALL_PROFILES=y' try_config 'CONFIG_TARGET_PER_DEVICE_ROOTFS=y' -if envtrue.GLUON_MULTIDOMAIN then - config 'CONFIG_GLUON_MULTIDOMAIN=y' -end +config 'CONFIG_DEVEL=y' +config 'CONFIG_TOOLCHAINOPTS=y' +config 'CONFIG_ALFRED_NEEDS_lua=y' +--config 'CONFIG_ATH_USER_REGD=y' +config 'CONFIG_IB=y' +config 'CONFIG_IMAGEOPT=y' +config 'CONFIG_BUILD_LOG=y' +config '# CONFIG_KERNEL_DEBUG_INFO is not set' +config '# CONFIG_KERNEL_DEBUG_KERNEL is not set' +config '# CONFIG_KERNEL_KALLSYMS is not set' +--config 'CONFIG_KMOD_BATMAN_ADV_DAT=y' +--config 'CONFIG_KMOD_BATMAN_ADV_MCAST=y' +config 'CONFIG_BUSYBOX_CUSTOM=y' +config '# CONFIG_BUSYBOX_CONFIG_MKSWAP is not set' +config '# CONFIG_BUSYBOX_CONFIG_SWAPON is not set' +config '# CONFIG_BUSYBOX_CONFIG_SWAPOFF is not set' +config 'CONFIG_BUSYBOX_CONFIG_TELNET=y' +config 'CONFIG_BUSYBOX_CONFIG_FEATURE_TELNET_TTYPE=y' +config 'CONFIG_BUSYBOX_CONFIG_FEATURE_TRACEROUTE_USE_ICMP=y' +config 'CONFIG_PREINITOPT=y' +config 'CONFIG_SDK=y' +config 'CONFIG_STRIP_KERNEL_EXPORTS=y' +config 'CONFIG_TARGET_PREINIT_IP="192.168.42.1"' +config 'CONFIG_TARGET_PREINIT_NETMASK="255.255.255.0"' +config 'CONFIG_TARGET_PREINIT_BROADCAST="192.168.42.255"' +config 'CONFIG_VERSIONOPT=y' +config 'CONFIG_VERSION_FILENAMES=y' +config 'CONFIG_VERSION_CODE_FILENAMES=y' +config 'CONFIG_VERSION_DIST="Freifunk Berlin"' +config 'CONFIG_VERSION_HWREV=""' +config 'CONFIG_VERSION_MANUFACTURER=""' +config 'CONFIG_VERSION_NUMBER="Dev-daily-1907"' +config 'CONFIG_VERSION_CODE=""' +config 'CONFIG_VERSION_PRODUCT=""' +config 'CONFIG_LUCI_SRCDIET=y' +config 'CONFIG_LUCI_LANG_de=m' +config 'CONFIG_LUCI_LANG_en=m' + + +config 'CONFIG_PACKAGE_kmod-batman-adv=m' +config 'CONFIG_PACKAGE_kmod-crypto-crc32c=m' +config 'CONFIG_PACKAGE_kmod-crypto-hash=m' +config 'CONFIG_PACKAGE_kmod-fs-cifs=m' +config 'CONFIG_PACKAGE_kmod-fs-ext4=m' +config 'CONFIG_PACKAGE_kmod-fs-vfat=m' +--config 'CONFIG_PACKAGE_kmod-ifb=m' +--config 'CONFIG_PACKAGE_kmod-ipip=m' +--config 'CONFIG_PACKAGE_kmod-ipt-conntrack-extra=m' +--config 'CONFIG_PACKAGE_kmod-ipt-filter=m' +--config 'CONFIG_PACKAGE_kmod-ipt-ipopt=m' +--config 'CONFIG_PACKAGE_kmod-iptunnel=m' +--config 'CONFIG_PACKAGE_kmod-iptunnel4=m' +config 'CONFIG_PACKAGE_kmod-lib-crc-itu-t=m' +config 'CONFIG_PACKAGE_kmod-lib-crc16=m' +config 'CONFIG_PACKAGE_kmod-lib-crc32c=m' +--config 'CONFIG_PACKAGE_kmod-lib-textsearch=m' +config 'CONFIG_PACKAGE_kmod-nf-nathelper-extra=m' +config 'CONFIG_PACKAGE_kmod-nls-utf8=m' +config 'CONFIG_PACKAGE_kmod-nls-iso8859-1=m' +config 'CONFIG_PACKAGE_kmod-nls-iso8859-15=m' +config 'CONFIG_PACKAGE_kmod-ppp=m' +--config 'CONFIG_PACKAGE_kmod-rt2800-lib=m' +--config 'CONFIG_PACKAGE_kmod-rt2800-usb=m' +--config 'CONFIG_PACKAGE_kmod-rt2x00-lib=m' +--config 'CONFIG_PACKAGE_kmod-rt2x00-usb=m' +--config 'CONFIG_PACKAGE_kmod-sched-connmark=m' +--config 'CONFIG_PACKAGE_kmod-sched-core=m' +config 'CONFIG_PACKAGE_kmod-sit=m' +config 'CONFIG_PACKAGE_kmod-tun=m' +config 'CONFIG_PACKAGE_kmod-usb-acm=m' +config 'CONFIG_PACKAGE_kmod-usb-net=m' +config 'CONFIG_PACKAGE_kmod-usb-net-cdc-ether=m' +config 'CONFIG_PACKAGE_kmod-usb-net-rndis=m' +config 'CONFIG_PACKAGE_kmod-usb-ohci=m' +config 'CONFIG_PACKAGE_kmod-usb-serial=m' +config 'CONFIG_PACKAGE_kmod-usb-serial-option=m' +config 'CONFIG_PACKAGE_kmod-usb-serial-wwan=m' +config 'CONFIG_PACKAGE_kmod-usb-storage=m' +config 'CONFIG_PACKAGE_kmod-usb-uhci=m' +config 'CONFIG_PACKAGE_kmod-veth=m' + +config 'CONFIG_PACKAGE_ALFRED_BATHOSTS=y' +config 'CONFIG_PACKAGE_ALFRED_VIS=y' +--config 'CONFIG_PACKAGE_ATH_DFS=y' +config 'CONFIG_PACKAGE_luci-mod-failsafe=y' +config 'CONFIG_PACKAGE_luci-theme-bootstrap=y' +config 'CONFIG_PACKAGE_uhttpd=y' packages { + '-hostapd-mini', '-odhcpd-ipv6only', '-ppp', '-ppp-mod-pppoe', - '-wpad-mini', - '-wpad-basic', - 'gluon-core', - 'ip6tables', + 'freifunk-berlin-system-defaults', +'alfred', +'batctl-default', +'collectd', +'collectd-mod-conntrack', +'collectd-mod-cpu', +'collectd-mod-exec', +'collectd-mod-interface', +'collectd-mod-irq', +'collectd-mod-iwinfo', +'collectd-mod-load', +'collectd-mod-memory', +'collectd-mod-network', +'collectd-mod-olsrd', +'collectd-mod-ping', +'collectd-mod-routeros', +'collectd-mod-rrdtool', +'collectd-mod-snmp', +'collectd-mod-uptime', +'collectd-mod-wireless', +'collectd-snmp-templates', +'community-profiles', +'ethtool', +'freifunk-berlin-dhcp-defaults', +'freifunk-berlin-firewall-defaults', +'freifunk-berlin-freifunk-defaults', +'freifunk-berlin-lib-guard', +'freifunk-berlin-migration', +'freifunk-berlin-network-defaults', +'freifunk-berlin-olsrd-defaults', +'freifunk-berlin-system-defaults', +'freifunk-berlin-statistics-defaults', +'freifunk-berlin-tunneldigger', +'freifunk-berlin-uhttpd-defaults', +'freifunk-common', +'freifunk-firewall', +'freifunk-gwcheck', +'freifunk-policyrouting', +'horst', +--'ip', +'ipip', +'iptables-mod-conntrack-extra', +'iptables-mod-filter', +'iptables-mod-ipopt', +'iwinfo', +'libiwinfo-lua', +'libubus-lua', +'libuci-lua', +'libustream-mbedtls', +'luci-app-ffwizard-berlin', +'luci-app-firewall', +'luci-app-opkg', +'luci-app-olsr', +'luci-app-olsr-services', +'luci-app-olsr-viz', +'luci-app-owm', +'luci-app-owm-ant', +'luci-app-owm-cmd', +'luci-app-owm-gui', +'luci-app-statistics', +'luci-mod-admin-full', +'luci-proto-ipip', +'mtr', +'olsrd', +'olsrd-mod-arprefresh', +'olsrd-mod-dyn-gw', +'olsrd-mod-dyn-gw-plain', +'olsrd-mod-jsoninfo', +'olsrd-mod-nameservice', +'olsrd-mod-netjson', +'olsrd-mod-txtinfo', +'olsrd-mod-watchdog', +'om-watchdog', +'px5g-mbedtls', +'qos-scripts', +'rssileds', +'tc', +'terminfo', +'tmux', +'uhttpd-mod-ubus', +'vnstat', +--'wpad-basic', } From 681014411ae59e7195ed3d68f05f8fae1c642c5b Mon Sep 17 00:00:00 2001 From: Sven Roederer Date: Thu, 20 Feb 2020 12:14:18 +0100 Subject: [PATCH 16/82] debug: add some debug to the scripts --- scripts/target_config.lua | 1 + scripts/target_config_lib.lua | 2 ++ scripts/target_lib.lua | 3 +++ 3 files changed, 6 insertions(+) diff --git a/scripts/target_config.lua b/scripts/target_config.lua index 452d4f190c..249f3e5b65 100755 --- a/scripts/target_config.lua +++ b/scripts/target_config.lua @@ -15,6 +15,7 @@ local output = {} for config in pairs(lib.configs) do table.insert(output, config) + io.stderr:write(config, "\n") end -- The sort will make =y entries override =m ones diff --git a/scripts/target_config_lib.lua b/scripts/target_config_lib.lua index a800f07e47..b689dea141 100644 --- a/scripts/target_config_lib.lua +++ b/scripts/target_config_lib.lua @@ -66,6 +66,8 @@ END_MAKE device_pkgs = device_pkgs .. ' ' .. pkg end + io.stderr:write("debug: in for _, dev in ipairs(lib.devices) for profile " .. profile .. "\n") + for _, pkg in ipairs(dev.options.packages or {}) do handle_pkg(pkg) end diff --git a/scripts/target_lib.lua b/scripts/target_lib.lua index d5133b1ee2..13a65f7ab2 100644 --- a/scripts/target_lib.lua +++ b/scripts/target_lib.lua @@ -146,15 +146,18 @@ local function add_image(image) end function F.try_config(...) + io.stderr:write("try_config: " .. ... .. "\n") M.configs[string.format(...)] = 1 end function F.config(...) + io.stderr:write("config: " .. ... .. "\n") M.configs[string.format(...)] = 2 end function F.packages(pkgs) for _, pkg in ipairs(pkgs) do + io.stderr:write("packages: " .. pkg .. "\n") table.insert(M.target_packages, pkg) end end From 4a14111fed1aa628ac72cc38ac3f702104537c68 Mon Sep 17 00:00:00 2001 From: Sven Roederer Date: Sun, 23 Feb 2020 17:13:28 +0100 Subject: [PATCH 17/82] targets: remove some settings leftover from gloun --- targets/generic_ffberlin | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/targets/generic_ffberlin b/targets/generic_ffberlin index bf6c754f02..8bcc3f4f35 100644 --- a/targets/generic_ffberlin +++ b/targets/generic_ffberlin @@ -1,20 +1,6 @@ -config '# CONFIG_TARGET_ROOTFS_INITRAMFS is not set' - -config '# CONFIG_PACKAGE_usbip is not set' -- fails to build -config '# CONFIG_PACKAGE_kmod-jool is not set' -- fails to build - -config 'CONFIG_BUSYBOX_CUSTOM=y' -config '# CONFIG_BUSYBOX_CONFIG_FEATURE_PREFER_IPV4_ADDRESS is not set' - ---config 'CONFIG_PACKAGE_ATH_DEBUG=y' - -config '# CONFIG_KERNEL_IP_MROUTE is not set' -config '# CONFIG_KERNEL_IPV6_MROUTE is not set' - try_config 'CONFIG_TARGET_MULTI_PROFILE=y' try_config 'CONFIG_TARGET_ALL_PROFILES=y' -try_config 'CONFIG_TARGET_PER_DEVICE_ROOTFS=y' config 'CONFIG_DEVEL=y' config 'CONFIG_TOOLCHAINOPTS=y' From 5cc9e0a22b87595592200f32b473de9278b448b0 Mon Sep 17 00:00:00 2001 From: Sven Roederer Date: Sun, 23 Feb 2020 17:39:36 +0100 Subject: [PATCH 18/82] targets: remove "kmod-usb-net" from generic_ffberlin this module gets selected automatically; by its depenging modules --- targets/generic_ffberlin | 1 - 1 file changed, 1 deletion(-) diff --git a/targets/generic_ffberlin b/targets/generic_ffberlin index 8bcc3f4f35..729396b187 100644 --- a/targets/generic_ffberlin +++ b/targets/generic_ffberlin @@ -72,7 +72,6 @@ config 'CONFIG_PACKAGE_kmod-ppp=m' config 'CONFIG_PACKAGE_kmod-sit=m' config 'CONFIG_PACKAGE_kmod-tun=m' config 'CONFIG_PACKAGE_kmod-usb-acm=m' -config 'CONFIG_PACKAGE_kmod-usb-net=m' config 'CONFIG_PACKAGE_kmod-usb-net-cdc-ether=m' config 'CONFIG_PACKAGE_kmod-usb-net-rndis=m' config 'CONFIG_PACKAGE_kmod-usb-ohci=m' From 46bf5db0c25182fc442413121d7cc63bab681466 Mon Sep 17 00:00:00 2001 From: Sven Roederer Date: Mon, 24 Feb 2020 23:41:13 +0100 Subject: [PATCH 19/82] Makefile: have gluon-config also depend on .stamp-feeds-updated $(OPENWRT_DIR)/dl --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 38ff4f2df1..d9f0f3b8e8 100644 --- a/Makefile +++ b/Makefile @@ -120,7 +120,7 @@ $(LUA): +@$(OPENWRTMAKE) tools/install +@$(OPENWRTMAKE) package/lua/host/compile -gluon-config: $(LUA) +gluon-config: $(LUA) .stamp-feeds-updated $(OPENWRT_DIR)/dl @$(CheckExternal) @$(GLUON_CONFIG_VARS) FOREIGN_BUILD=ffberlin \ $(LUA) scripts/target_config.lua '$(GLUON_TARGET)' '$(GLUON_PACKAGES)' \ From b0ecf579f9042f47bc6f753e259fac289f83b783 Mon Sep 17 00:00:00 2001 From: Sven Roederer Date: Mon, 24 Feb 2020 23:42:45 +0100 Subject: [PATCH 20/82] targets/generic_ffberlin: add some more required packages --- targets/generic_ffberlin | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/targets/generic_ffberlin b/targets/generic_ffberlin index 729396b187..b566ddfc24 100644 --- a/targets/generic_ffberlin +++ b/targets/generic_ffberlin @@ -129,12 +129,15 @@ packages { 'freifunk-berlin-statistics-defaults', 'freifunk-berlin-tunneldigger', 'freifunk-berlin-uhttpd-defaults', +'freifunk-berlin-uplink-notunnel-files', +'freifunk-berlin-uplink-tunnelberlin-tunneldigger', 'freifunk-common', 'freifunk-firewall', 'freifunk-gwcheck', 'freifunk-policyrouting', 'horst', --'ip', +'iperf', 'ipip', 'iptables-mod-conntrack-extra', 'iptables-mod-filter', @@ -156,8 +159,10 @@ packages { 'luci-app-owm-gui', 'luci-app-statistics', 'luci-mod-admin-full', +'luci-mod-freifunk-ui', 'luci-proto-ipip', 'mtr', +'odhcpd-ipv6only', 'olsrd', 'olsrd-mod-arprefresh', 'olsrd-mod-dyn-gw', @@ -172,6 +177,7 @@ packages { 'qos-scripts', 'rssileds', 'tc', +'tcpdump', 'terminfo', 'tmux', 'uhttpd-mod-ubus', From 5bbf0ae2b93e7a6234ecb5e04ec79fac646e89df Mon Sep 17 00:00:00 2001 From: Sven Roederer Date: Tue, 25 Feb 2020 01:14:46 +0100 Subject: [PATCH 21/82] targets/generic_fberlin: keep up with renamed CONFIGs of BATMAN-adv https://github.com/freifunk-berlin/firmware/commit/51256a7c844189b750108ca984f9afd4fcfc31dc --- targets/generic_ffberlin | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/targets/generic_ffberlin b/targets/generic_ffberlin index b566ddfc24..51172d25c9 100644 --- a/targets/generic_ffberlin +++ b/targets/generic_ffberlin @@ -12,8 +12,9 @@ config 'CONFIG_BUILD_LOG=y' config '# CONFIG_KERNEL_DEBUG_INFO is not set' config '# CONFIG_KERNEL_DEBUG_KERNEL is not set' config '# CONFIG_KERNEL_KALLSYMS is not set' ---config 'CONFIG_KMOD_BATMAN_ADV_DAT=y' ---config 'CONFIG_KMOD_BATMAN_ADV_MCAST=y' +config 'CONFIG_BATMAN_ADV_BLA=y' +config 'CONFIG_BATMAN_ADV_DAT=y' +config 'CONFIG_BATMAN_ADV_MCAST=y' config 'CONFIG_BUSYBOX_CUSTOM=y' config '# CONFIG_BUSYBOX_CONFIG_MKSWAP is not set' config '# CONFIG_BUSYBOX_CONFIG_SWAPON is not set' From 398223c94d17aa8589102fde9d65aa631e12705b Mon Sep 17 00:00:00 2001 From: Sven Roederer Date: Tue, 25 Feb 2020 01:16:09 +0100 Subject: [PATCH 22/82] targets/generic_ffberlin: fix "CONFIG_ATH_USER_REGD" this option depends on kmod-ath, which is not avail on all targets. So use try_config() to set this option, to prevent error on check_config. --- targets/generic_ffberlin | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/targets/generic_ffberlin b/targets/generic_ffberlin index 51172d25c9..0b8cb2bb74 100644 --- a/targets/generic_ffberlin +++ b/targets/generic_ffberlin @@ -5,7 +5,7 @@ try_config 'CONFIG_TARGET_ALL_PROFILES=y' config 'CONFIG_DEVEL=y' config 'CONFIG_TOOLCHAINOPTS=y' config 'CONFIG_ALFRED_NEEDS_lua=y' ---config 'CONFIG_ATH_USER_REGD=y' +try_config 'CONFIG_ATH_USER_REGD=y' config 'CONFIG_IB=y' config 'CONFIG_IMAGEOPT=y' config 'CONFIG_BUILD_LOG=y' From 05f151999622106fdaf2b04bea994c0edb8ebc84 Mon Sep 17 00:00:00 2001 From: Sven Roederer Date: Tue, 25 Feb 2020 01:22:17 +0100 Subject: [PATCH 23/82] targets/generic_ffberlin: same for "CONFIG_PACKAGE_ATH_DFS" --- targets/generic_ffberlin | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/targets/generic_ffberlin b/targets/generic_ffberlin index 0b8cb2bb74..df21d54a6e 100644 --- a/targets/generic_ffberlin +++ b/targets/generic_ffberlin @@ -6,6 +6,7 @@ config 'CONFIG_DEVEL=y' config 'CONFIG_TOOLCHAINOPTS=y' config 'CONFIG_ALFRED_NEEDS_lua=y' try_config 'CONFIG_ATH_USER_REGD=y' +try_config 'CONFIG_PACKAGE_ATH_DFS=y' config 'CONFIG_IB=y' config 'CONFIG_IMAGEOPT=y' config 'CONFIG_BUILD_LOG=y' @@ -85,7 +86,6 @@ config 'CONFIG_PACKAGE_kmod-veth=m' config 'CONFIG_PACKAGE_ALFRED_BATHOSTS=y' config 'CONFIG_PACKAGE_ALFRED_VIS=y' ---config 'CONFIG_PACKAGE_ATH_DFS=y' config 'CONFIG_PACKAGE_luci-mod-failsafe=y' config 'CONFIG_PACKAGE_luci-theme-bootstrap=y' config 'CONFIG_PACKAGE_uhttpd=y' From ce75736a1b118f0690160f53a5b0cc2ca807adb7 Mon Sep 17 00:00:00 2001 From: Sven Roederer Date: Tue, 25 Feb 2020 01:31:31 +0100 Subject: [PATCH 24/82] targets/generic_ffberlin: shorten package-list by moving to site-config --- targets/generic_ffberlin | 90 +--------------------------------------- 1 file changed, 1 insertion(+), 89 deletions(-) diff --git a/targets/generic_ffberlin b/targets/generic_ffberlin index df21d54a6e..38bca3c541 100644 --- a/targets/generic_ffberlin +++ b/targets/generic_ffberlin @@ -93,95 +93,7 @@ config 'CONFIG_PACKAGE_uhttpd=y' packages { '-hostapd-mini', - '-odhcpd-ipv6only', '-ppp', '-ppp-mod-pppoe', - 'freifunk-berlin-system-defaults', -'alfred', -'batctl-default', -'collectd', -'collectd-mod-conntrack', -'collectd-mod-cpu', -'collectd-mod-exec', -'collectd-mod-interface', -'collectd-mod-irq', -'collectd-mod-iwinfo', -'collectd-mod-load', -'collectd-mod-memory', -'collectd-mod-network', -'collectd-mod-olsrd', -'collectd-mod-ping', -'collectd-mod-routeros', -'collectd-mod-rrdtool', -'collectd-mod-snmp', -'collectd-mod-uptime', -'collectd-mod-wireless', -'collectd-snmp-templates', -'community-profiles', -'ethtool', -'freifunk-berlin-dhcp-defaults', -'freifunk-berlin-firewall-defaults', -'freifunk-berlin-freifunk-defaults', -'freifunk-berlin-lib-guard', -'freifunk-berlin-migration', -'freifunk-berlin-network-defaults', -'freifunk-berlin-olsrd-defaults', -'freifunk-berlin-system-defaults', -'freifunk-berlin-statistics-defaults', -'freifunk-berlin-tunneldigger', -'freifunk-berlin-uhttpd-defaults', -'freifunk-berlin-uplink-notunnel-files', -'freifunk-berlin-uplink-tunnelberlin-tunneldigger', -'freifunk-common', -'freifunk-firewall', -'freifunk-gwcheck', -'freifunk-policyrouting', -'horst', ---'ip', -'iperf', -'ipip', -'iptables-mod-conntrack-extra', -'iptables-mod-filter', -'iptables-mod-ipopt', -'iwinfo', -'libiwinfo-lua', -'libubus-lua', -'libuci-lua', -'libustream-mbedtls', -'luci-app-ffwizard-berlin', -'luci-app-firewall', -'luci-app-opkg', -'luci-app-olsr', -'luci-app-olsr-services', -'luci-app-olsr-viz', -'luci-app-owm', -'luci-app-owm-ant', -'luci-app-owm-cmd', -'luci-app-owm-gui', -'luci-app-statistics', -'luci-mod-admin-full', -'luci-mod-freifunk-ui', -'luci-proto-ipip', -'mtr', -'odhcpd-ipv6only', -'olsrd', -'olsrd-mod-arprefresh', -'olsrd-mod-dyn-gw', -'olsrd-mod-dyn-gw-plain', -'olsrd-mod-jsoninfo', -'olsrd-mod-nameservice', -'olsrd-mod-netjson', -'olsrd-mod-txtinfo', -'olsrd-mod-watchdog', -'om-watchdog', -'px5g-mbedtls', -'qos-scripts', -'rssileds', -'tc', -'tcpdump', -'terminfo', -'tmux', -'uhttpd-mod-ubus', -'vnstat', ---'wpad-basic', + 'odhcpd-ipv6only', } From 382a77f9127a23857c39ffcd9a6aa0df23c979e5 Mon Sep 17 00:00:00 2001 From: Sven Roederer Date: Tue, 25 Feb 2020 01:35:04 +0100 Subject: [PATCH 25/82] targets/generic_ffberlin: move ordinary packages form config() to packages-list --- targets/generic_ffberlin | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/targets/generic_ffberlin b/targets/generic_ffberlin index 38bca3c541..f7ddbdf978 100644 --- a/targets/generic_ffberlin +++ b/targets/generic_ffberlin @@ -86,9 +86,6 @@ config 'CONFIG_PACKAGE_kmod-veth=m' config 'CONFIG_PACKAGE_ALFRED_BATHOSTS=y' config 'CONFIG_PACKAGE_ALFRED_VIS=y' -config 'CONFIG_PACKAGE_luci-mod-failsafe=y' -config 'CONFIG_PACKAGE_luci-theme-bootstrap=y' -config 'CONFIG_PACKAGE_uhttpd=y' packages { @@ -96,4 +93,7 @@ packages { '-ppp', '-ppp-mod-pppoe', 'odhcpd-ipv6only', + 'luci-mod-failsafe', + 'luci-theme-bootstrap', + 'uhttpd' } From 3e31737f91ab585751cf6b7015ad0c9aa8809f09 Mon Sep 17 00:00:00 2001 From: Sven Roederer Date: Tue, 25 Feb 2020 22:48:51 +0100 Subject: [PATCH 26/82] Makefile: [gluon] also import GLUON_SITEDIR --- Makefile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Makefile b/Makefile index d9f0f3b8e8..8bcfd44576 100644 --- a/Makefile +++ b/Makefile @@ -75,6 +75,11 @@ $(eval $(call mkabspath,GLUON_PATCHESDIR)) GLUON_SITEDIR ?= site $(eval $(call mkabspath,GLUON_SITEDIR)) +$(GLUON_SITEDIR)/site.mk: + $(error No site configuration was found. Please check out a site configuration to $(GLUON_SITEDIR)) + +include $(GLUON_SITEDIR)/site.mk + export GLUON_RELEASE GLUON_DEBUG GLUON_DEPRECATED GLUON_DEVICES \ GLUON_TARGETSDIR GLUON_PATCHESDIR GLUON_TMPDIR GLUON_IMAGEDIR GLUON_PACKAGEDIR From af9709b6aba5d662e302692314ab5473aa0d342e Mon Sep 17 00:00:00 2001 From: Sven Roederer Date: Fri, 28 Feb 2020 21:23:49 +0100 Subject: [PATCH 27/82] targets/generic_ffberlin: wrap ALFRED config-parameters in try_config() --- targets/generic_ffberlin | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/targets/generic_ffberlin b/targets/generic_ffberlin index f7ddbdf978..6bb67191b1 100644 --- a/targets/generic_ffberlin +++ b/targets/generic_ffberlin @@ -4,7 +4,6 @@ try_config 'CONFIG_TARGET_ALL_PROFILES=y' config 'CONFIG_DEVEL=y' config 'CONFIG_TOOLCHAINOPTS=y' -config 'CONFIG_ALFRED_NEEDS_lua=y' try_config 'CONFIG_ATH_USER_REGD=y' try_config 'CONFIG_PACKAGE_ATH_DFS=y' config 'CONFIG_IB=y' @@ -84,8 +83,9 @@ config 'CONFIG_PACKAGE_kmod-usb-storage=m' config 'CONFIG_PACKAGE_kmod-usb-uhci=m' config 'CONFIG_PACKAGE_kmod-veth=m' -config 'CONFIG_PACKAGE_ALFRED_BATHOSTS=y' -config 'CONFIG_PACKAGE_ALFRED_VIS=y' +try_config 'CONFIG_ALFRED_NEEDS_lua=y' +try_config 'CONFIG_PACKAGE_ALFRED_BATHOSTS=y' +try_config 'CONFIG_PACKAGE_ALFRED_VIS=y' packages { From a6f881223b4a9df9246f463fe2e1dd6bff12f941 Mon Sep 17 00:00:00 2001 From: Sven Roederer Date: Fri, 28 Feb 2020 21:25:02 +0100 Subject: [PATCH 28/82] targets/generic_ffberlin: add freifunk-berlin-system-defaults to packages --- targets/generic_ffberlin | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/targets/generic_ffberlin b/targets/generic_ffberlin index 6bb67191b1..e13e1c2f4a 100644 --- a/targets/generic_ffberlin +++ b/targets/generic_ffberlin @@ -95,5 +95,6 @@ packages { 'odhcpd-ipv6only', 'luci-mod-failsafe', 'luci-theme-bootstrap', - 'uhttpd' + 'uhttpd', + 'freifunk-berlin-system-defaults' } From e71bdb1e431f820c6e983b87bdd6c305a4f9ef96 Mon Sep 17 00:00:00 2001 From: Sven Roederer Date: Fri, 28 Feb 2020 21:28:47 +0100 Subject: [PATCH 29/82] scripts: improve debug-output of F.config(...) --- scripts/target_lib.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/target_lib.lua b/scripts/target_lib.lua index 13a65f7ab2..ee1a772609 100644 --- a/scripts/target_lib.lua +++ b/scripts/target_lib.lua @@ -151,7 +151,8 @@ function F.try_config(...) end function F.config(...) - io.stderr:write("config: " .. ... .. "\n") + local arg = {...} + io.stderr:write(string.format("config: %s; %i\n", ... , #arg)) M.configs[string.format(...)] = 2 end From 382f37baf8e70064bbb4f7200ab37d2e84607012 Mon Sep 17 00:00:00 2001 From: Sven Roederer Date: Fri, 28 Feb 2020 21:29:38 +0100 Subject: [PATCH 30/82] scripts: add F.config_m(...) as template from F.config() --- scripts/target_lib.lua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/target_lib.lua b/scripts/target_lib.lua index ee1a772609..a031925401 100644 --- a/scripts/target_lib.lua +++ b/scripts/target_lib.lua @@ -156,6 +156,12 @@ function F.config(...) M.configs[string.format(...)] = 2 end +function F.config_m(...) + local arg = {...} + io.stderr:write(string.format("config_m: %s; %i\n", ... , #arg)) + M.configs[string.format(...)] = 2 +end + function F.packages(pkgs) for _, pkg in ipairs(pkgs) do io.stderr:write("packages: " .. pkg .. "\n") From 1506d3be1621835e279853e71db5078d7537baa3 Mon Sep 17 00:00:00 2001 From: Sven Roederer Date: Fri, 28 Feb 2020 21:32:06 +0100 Subject: [PATCH 31/82] scripts: improve debug-output of site_packages(image) --- scripts/target_config_lib.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/target_config_lib.lua b/scripts/target_config_lib.lua index b689dea141..ee72257316 100644 --- a/scripts/target_config_lib.lua +++ b/scripts/target_config_lib.lua @@ -17,6 +17,7 @@ return function(funcs) local function site_packages(image) + io.stderr:write("site_packages(".. image ..")\n") return lib.exec_capture_raw(string.format([[ MAKEFLAGS= make print _GLUON_IMAGE_=%s --no-print-directory -s -f - <<'END_MAKE' include $(GLUON_SITEDIR)/site.mk From 4ac1fcd3c97f6e7e1804b64147c3c589e094a729 Mon Sep 17 00:00:00 2001 From: Sven Roederer Date: Fri, 28 Feb 2020 21:33:16 +0100 Subject: [PATCH 32/82] scripts: mark lib.target_packages as "m" modular --- scripts/target_config_lib.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/target_config_lib.lua b/scripts/target_config_lib.lua index ee72257316..dcfea04052 100644 --- a/scripts/target_config_lib.lua +++ b/scripts/target_config_lib.lua @@ -52,7 +52,7 @@ END_MAKE if string.sub(pkg, 1, 1) == '-' then lib.try_config('# CONFIG_PACKAGE_%s is not set', string.sub(pkg, 2)) else - funcs.config_package(lib.config, pkg, 'y') + funcs.config_package(lib.config, pkg, 'm') end end From bb9d38d91bb89e53d8321c018b0480ecad9da916 Mon Sep 17 00:00:00 2001 From: Sven Roederer Date: Sat, 29 Feb 2020 15:40:07 +0100 Subject: [PATCH 33/82] Makefile: [gluon] rename target gluon-all to gluon-compile to be more in sync with out current target-naming --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 8bcfd44576..b9d3441931 100644 --- a/Makefile +++ b/Makefile @@ -135,7 +135,7 @@ gluon-config: $(LUA) .stamp-feeds-updated $(OPENWRT_DIR)/dl @$(GLUON_CONFIG_VARS) FOREIGN_BUILD=ffberlin \ $(LUA) scripts/target_config_check.lua '$(GLUON_TARGET)' '$(GLUON_PACKAGES)' -gluon-all: gluon-config +gluon-compile: gluon-config +@$(OPENWRTMAKE) ## Gluon - End From bf91a7cd44b1c9d704a83bb0081e32ed97626fef Mon Sep 17 00:00:00 2001 From: Sven Roederer Date: Sat, 29 Feb 2020 17:31:26 +0100 Subject: [PATCH 34/82] targets/generic_ffberlin: change version-string to "gluon1907" --- targets/generic_ffberlin | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/targets/generic_ffberlin b/targets/generic_ffberlin index e13e1c2f4a..2bf3397c2c 100644 --- a/targets/generic_ffberlin +++ b/targets/generic_ffberlin @@ -34,7 +34,7 @@ config 'CONFIG_VERSION_CODE_FILENAMES=y' config 'CONFIG_VERSION_DIST="Freifunk Berlin"' config 'CONFIG_VERSION_HWREV=""' config 'CONFIG_VERSION_MANUFACTURER=""' -config 'CONFIG_VERSION_NUMBER="Dev-daily-1907"' +config 'CONFIG_VERSION_NUMBER="gluon1907"' config 'CONFIG_VERSION_CODE=""' config 'CONFIG_VERSION_PRODUCT=""' config 'CONFIG_LUCI_SRCDIET=y' From 79de75248aa0ed3c287ba63a4ebda1ae9b7a1e66 Mon Sep 17 00:00:00 2001 From: Sven Roederer Date: Sat, 29 Feb 2020 17:32:34 +0100 Subject: [PATCH 35/82] Revert "scripts: mark lib.target_packages as "m" modular" This reverts commit 4219f0e9af9ee7fec74b31b48c7bd615eec6847f. --- scripts/target_config_lib.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/target_config_lib.lua b/scripts/target_config_lib.lua index dcfea04052..ee72257316 100644 --- a/scripts/target_config_lib.lua +++ b/scripts/target_config_lib.lua @@ -52,7 +52,7 @@ END_MAKE if string.sub(pkg, 1, 1) == '-' then lib.try_config('# CONFIG_PACKAGE_%s is not set', string.sub(pkg, 2)) else - funcs.config_package(lib.config, pkg, 'm') + funcs.config_package(lib.config, pkg, 'y') end end From 424f334bcf71c5f60d2d97167778b6a4c0d08a41 Mon Sep 17 00:00:00 2001 From: Sven Roederer Date: Sat, 29 Feb 2020 18:07:12 +0100 Subject: [PATCH 36/82] scripts: improve debug-output --- scripts/target_config.lua | 3 ++- scripts/target_lib.lua | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/scripts/target_config.lua b/scripts/target_config.lua index 249f3e5b65..fa831f0880 100755 --- a/scripts/target_config.lua +++ b/scripts/target_config.lua @@ -15,11 +15,12 @@ local output = {} for config in pairs(lib.configs) do table.insert(output, config) - io.stderr:write(config, "\n") + io.stderr:write(string.format("target_config.lua:config# %s\n", config)) end -- The sort will make =y entries override =m ones table.sort(output) +io.stderr:write("target_config.lua: outputting openwrt-config ...\n") for _, line in ipairs(output) do io.stdout:write(line, '\n') end diff --git a/scripts/target_lib.lua b/scripts/target_lib.lua index a031925401..7808ad9f5c 100644 --- a/scripts/target_lib.lua +++ b/scripts/target_lib.lua @@ -152,19 +152,19 @@ end function F.config(...) local arg = {...} - io.stderr:write(string.format("config: %s; %i\n", ... , #arg)) + io.stderr:write(string.format("target_lib.lua:config# %s; %i\n", ... , #arg)) M.configs[string.format(...)] = 2 end function F.config_m(...) local arg = {...} - io.stderr:write(string.format("config_m: %s; %i\n", ... , #arg)) + io.stderr:write(string.format("target_lib.lua:config_m# %s; %i\n", ... , #arg)) M.configs[string.format(...)] = 2 end function F.packages(pkgs) for _, pkg in ipairs(pkgs) do - io.stderr:write("packages: " .. pkg .. "\n") + io.stderr:write("target_lib.lua:packages# " .. pkg .. "\n") table.insert(M.target_packages, pkg) end end From 11ea0b55d9cc97af96048f49badd80d123f89918 Mon Sep 17 00:00:00 2001 From: Sven Roederer Date: Sat, 29 Feb 2020 18:08:28 +0100 Subject: [PATCH 37/82] Makefile: [gluon] align debug-output --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index b9d3441931..fe3da3c13e 100644 --- a/Makefile +++ b/Makefile @@ -114,7 +114,7 @@ endef $(eval $(call merge_packages,$(GLUON_DEFAULT_PACKAGES) $(GLUON_FEATURE_PACKAGES) $(GLUON_SITE_PACKAGES))) $(info package-src: $(GLUON_DEFAULT_PACKAGES) $(GLUON_FEATURE_PACKAGES) $(GLUON_SITE_PACKAGES)) -$(info packages: $(GLUON_PACKAGES)) +$(info packages : $(GLUON_PACKAGES)) LUA := openwrt/staging_dir/hostpkg/bin/lua From 94b492f7326301a8e6d064a299f25aac01c0cca0 Mon Sep 17 00:00:00 2001 From: Sven Roederer Date: Sat, 29 Feb 2020 18:27:53 +0100 Subject: [PATCH 38/82] scripts/target_config_lib.lua: rename extra_packages to default_packages --- scripts/target_config_lib.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/target_config_lib.lua b/scripts/target_config_lib.lua index ee72257316..4b262fd0eb 100644 --- a/scripts/target_config_lib.lua +++ b/scripts/target_config_lib.lua @@ -6,7 +6,7 @@ return function(funcs) assert(env.SUBTARGET) local target = arg[1] - local extra_packages = arg[2] + local default_packages = arg[2] local openwrt_config_target if env.SUBTARGET ~= '' then @@ -30,7 +30,7 @@ END_MAKE lib.include('generic') lib.include('generic_' .. env.FOREIGN_BUILD) - for pkg in string.gmatch(extra_packages, '%S+') do + for pkg in string.gmatch(default_packages, '%S+') do lib.packages {pkg} end lib.include(target) From be30af9b47d6c7c330b6badd2a87db3955bcdf04 Mon Sep 17 00:00:00 2001 From: Sven Roederer Date: Thu, 26 Dec 2019 02:35:21 +0100 Subject: [PATCH 39/82] patches: add https://github.com/openwrt/luci/pull/2637 --- patches/packages/luci/0203-PR2637.patch | 650 ++++++++++++++++++++++++ 1 file changed, 650 insertions(+) create mode 100644 patches/packages/luci/0203-PR2637.patch diff --git a/patches/packages/luci/0203-PR2637.patch b/patches/packages/luci/0203-PR2637.patch new file mode 100644 index 0000000000..88fe7f2f3d --- /dev/null +++ b/patches/packages/luci/0203-PR2637.patch @@ -0,0 +1,650 @@ +From 43c3db8b04a7fff5818c09cb97a4831622040cd1 Mon Sep 17 00:00:00 2001 +From: Sven Roederer +Date: Thu, 21 Mar 2019 22:17:58 +0100 +Subject: [PATCH 1/3] luci.mk: reorder to have common-things in a block + +Signed-off-by: Sven Roederer +--- + luci.mk | 130 +++++++++++++++++++++++++++++--------------------------- + 1 file changed, 68 insertions(+), 62 deletions(-) + +diff --git a/luci.mk b/luci.mk +index d8fa02951..429422d8f 100644 +--- a/luci.mk ++++ b/luci.mk +@@ -11,6 +11,12 @@ LUCI_LANGUAGES:=$(sort $(filter-out templates,$(notdir $(wildcard ${CURDIR}/po/* + LUCI_DEFAULTS:=$(notdir $(wildcard ${CURDIR}/root/etc/uci-defaults/*)) + LUCI_PKGARCH?=$(if $(realpath src/Makefile),,all) + ++ ++PKG_NAME?=$(LUCI_NAME) ++ ++PKG_BUILD_DEPENDS += $(LUCI_BUILD_DEPENDS) ++ ++#-------------- common parts ---------------- + # Language code titles + LUCI_LANG.bg=български (Bulgarian) + LUCI_LANG.ca=Català (Catalan) +@@ -49,9 +55,6 @@ LUCI_MENU.theme=4. Themes + LUCI_MENU.proto=5. Protocols + LUCI_MENU.lib=6. Libraries + +- +-PKG_NAME?=$(LUCI_NAME) +- + PKG_VERSION?=$(if $(DUMP),x,$(strip $(shell \ + if svn info >/dev/null 2>/dev/null; then \ + revision="svn-r$$(LC_ALL=C svn info | sed -ne 's/^Revision: //p')"; \ +@@ -85,52 +88,16 @@ PKG_GITBRANCH?=$(if $(DUMP),x,$(strip $(shell \ + + PKG_RELEASE?=1 + PKG_INSTALL:=$(if $(realpath src/Makefile),1) +-PKG_BUILD_DEPENDS += lua/host luci-base/host LUCI_CSSTIDY:csstidy/host $(LUCI_BUILD_DEPENDS) ++PKG_BUILD_DEPENDS += lua/host luci-base/host LUCI_CSSTIDY:csstidy/host + PKG_CONFIG_DEPENDS += CONFIG_LUCI_SRCDIET CONFIG_LUCI_JSMIN CONFIG_LUCI_CSSTIDY + + PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) + + include $(INCLUDE_DIR)/package.mk + +-define Package/$(PKG_NAME) +- SECTION:=luci +- CATEGORY:=LuCI +- SUBMENU:=$(if $(LUCI_MENU.$(LUCI_TYPE)),$(LUCI_MENU.$(LUCI_TYPE)),$(LUCI_MENU.app)) +- TITLE:=$(if $(LUCI_TITLE),$(LUCI_TITLE),LuCI $(LUCI_NAME) $(LUCI_TYPE)) +- DEPENDS:=$(LUCI_DEPENDS) +- $(if $(LUCI_EXTRA_DEPENDS),EXTRA_DEPENDS:=$(LUCI_EXTRA_DEPENDS)) +- $(if $(LUCI_PKGARCH),PKGARCH:=$(LUCI_PKGARCH)) +-endef +- +-ifneq ($(LUCI_DESCRIPTION),) +- define Package/$(PKG_NAME)/description +- $(strip $(LUCI_DESCRIPTION)) +- endef +-endif +- +-# Language selection for luci-base +-ifeq ($(PKG_NAME),luci-base) +- define Package/luci-base/config +- config LUCI_SRCDIET +- bool "Minify Lua sources" +- default n +- +- config LUCI_JSMIN +- bool "Minify JavaScript sources" +- default y +- +- config LUCI_CSSTIDY +- bool "Minify CSS files" +- default y +- +- menu "Translations"$(foreach lang,$(LUCI_LANGUAGES), +- +- config LUCI_LANG_$(lang) +- tristate "$(shell echo '$(LUCI_LANG.$(lang))' | sed -e 's/^.* (\(.*\))$$/\1/') ($(lang))") +- +- endmenu +- endef +-endif ++HTDOCS = /www ++LUA_LIBRARYDIR = /usr/lib/lua ++LUCI_LIBRARYDIR = $(LUA_LIBRARYDIR)/luci + + define Build/Prepare + for d in luasrc htdocs root src; do \ +@@ -142,25 +109,6 @@ define Build/Prepare + $(call Build/Prepare/Default) + endef + +-define Build/Configure +-endef +- +-ifneq ($(wildcard ${CURDIR}/src/Makefile),) +- MAKE_PATH := src/ +- MAKE_VARS += FPIC="$(FPIC)" LUCI_VERSION="$(PKG_VERSION)" LUCI_GITBRANCH="$(PKG_GITBRANCH)" +- +- define Build/Compile +- $(call Build/Compile/Default,clean compile) +- endef +-else +- define Build/Compile +- endef +-endif +- +-HTDOCS = /www +-LUA_LIBRARYDIR = /usr/lib/lua +-LUCI_LIBRARYDIR = $(LUA_LIBRARYDIR)/luci +- + define SrcDiet + $(FIND) $(1) -type f -name '*.lua' | while read src; do \ + if LUA_PATH="$(STAGING_DIR_HOSTPKG)/lib/lua/5.1/?.lua" luasrcdiet --noopt-binequiv -o "$$$$src.o" "$$$$src"; \ +@@ -214,6 +162,64 @@ define Package/$(PKG_NAME)/install + else true; fi + endef + ++# End --- common parts ++ ++ ++define Package/$(PKG_NAME) ++ SECTION:=luci ++ CATEGORY:=LuCI ++ SUBMENU:=$(if $(LUCI_MENU.$(LUCI_TYPE)),$(LUCI_MENU.$(LUCI_TYPE)),$(LUCI_MENU.app)) ++ TITLE:=$(if $(LUCI_TITLE),$(LUCI_TITLE),LuCI $(LUCI_NAME) $(LUCI_TYPE)) ++ DEPENDS:=$(LUCI_DEPENDS) ++ $(if $(LUCI_EXTRA_DEPENDS),EXTRA_DEPENDS:=$(LUCI_EXTRA_DEPENDS)) ++ $(if $(LUCI_PKGARCH),PKGARCH:=$(LUCI_PKGARCH)) ++endef ++ ++ifneq ($(LUCI_DESCRIPTION),) ++ define Package/$(PKG_NAME)/description ++ $(strip $(LUCI_DESCRIPTION)) ++ endef ++endif ++ ++# Language selection for luci-base ++ifeq ($(PKG_NAME),luci-base) ++ define Package/luci-base/config ++ config LUCI_SRCDIET ++ bool "Minify Lua sources" ++ default n ++ ++ config LUCI_JSMIN ++ bool "Minify JavaScript sources" ++ default y ++ ++ config LUCI_CSSTIDY ++ bool "Minify CSS files" ++ default y ++ ++ menu "Translations"$(foreach lang,$(LUCI_LANGUAGES), ++ ++ config LUCI_LANG_$(lang) ++ tristate "$(shell echo '$(LUCI_LANG.$(lang))' | sed -e 's/^.* (\(.*\))$$/\1/') ($(lang))") ++ ++ endmenu ++ endef ++endif ++ ++define Build/Configure ++endef ++ ++ifneq ($(wildcard ${CURDIR}/src/Makefile),) ++ MAKE_PATH := src/ ++ MAKE_VARS += FPIC="$(FPIC)" LUCI_VERSION="$(PKG_VERSION)" LUCI_GITBRANCH="$(PKG_GITBRANCH)" ++ ++ define Build/Compile ++ $(call Build/Compile/Default,clean compile) ++ endef ++else ++ define Build/Compile ++ endef ++endif ++ + ifneq ($(LUCI_DEFAULTS),) + define Package/$(PKG_NAME)/postinst + [ -n "$${IPKG_INSTROOT}" ] || {$(foreach script,$(LUCI_DEFAULTS), +-- +2.20.1 + + +From d0e2a044c58cfc22335b267954d10cbc00c5e4a4 Mon Sep 17 00:00:00 2001 +From: Sven Roederer +Date: Sat, 23 Mar 2019 09:48:00 +0100 +Subject: [PATCH 2/3] luci.mk: split into luci-common.mk and luci.mk + +This splits common things which might relevant for other feeds out to +luci-common.mk. Any feed can include this new file and reuse our +definitions. + +Signed-off-by: Sven Roederer +--- + luci-common.mk | 150 +++++++++++++++++++++++++++++++++++++++++++++ + luci.mk | 163 +------------------------------------------------ + 2 files changed, 153 insertions(+), 160 deletions(-) + create mode 100644 luci-common.mk + +diff --git a/luci-common.mk b/luci-common.mk +new file mode 100644 +index 000000000..23e23cc6f +--- /dev/null ++++ b/luci-common.mk +@@ -0,0 +1,150 @@ ++# ++# Copyright (C) 2008-2015 The LuCI Team ++# ++# This is free software, licensed under the Apache License, Version 2.0 . ++# ++ ++# Language code titles ++LUCI_LANG.bg=български (Bulgarian) ++LUCI_LANG.ca=Català (Catalan) ++LUCI_LANG.cs=Čeština (Czech) ++LUCI_LANG.de=Deutsch (German) ++LUCI_LANG.el=Ελληνικά (Greek) ++LUCI_LANG.en=English ++LUCI_LANG.es=Español (Spanish) ++LUCI_LANG.fr=Français (French) ++LUCI_LANG.he=עִבְרִית (Hebrew) ++LUCI_LANG.hi=हिंदी (Hindi) ++LUCI_LANG.hu=Magyar (Hungarian) ++LUCI_LANG.it=Italiano (Italian) ++LUCI_LANG.ja=日本語 (Japanese) ++LUCI_LANG.ko=한국어 (Korean) ++LUCI_LANG.ms=Bahasa Melayu (Malay) ++LUCI_LANG.no=Norsk (Norwegian) ++LUCI_LANG.pl=Polski (Polish) ++LUCI_LANG.pt-br=Português do Brasil (Brazialian Portuguese) ++LUCI_LANG.pt=Português (Portuguese) ++LUCI_LANG.ro=Română (Romanian) ++LUCI_LANG.ru=Русский (Russian) ++LUCI_LANG.sk=Slovenčina (Slovak) ++LUCI_LANG.sv=Svenska (Swedish) ++LUCI_LANG.tr=Türkçe (Turkish) ++LUCI_LANG.uk=Українська (Ukrainian) ++LUCI_LANG.vi=Tiếng Việt (Vietnamese) ++LUCI_LANG.zh-cn=中文 (Chinese) ++LUCI_LANG.zh-tw=臺灣華語 (Taiwanese) ++ ++# Submenu titles ++LUCI_MENU.col=1. Collections ++LUCI_MENU.mod=2. Modules ++LUCI_MENU.app=3. Applications ++LUCI_MENU.theme=4. Themes ++LUCI_MENU.proto=5. Protocols ++LUCI_MENU.lib=6. Libraries ++ ++PKG_VERSION?=$(if $(DUMP),x,$(strip $(shell \ ++ if svn info >/dev/null 2>/dev/null; then \ ++ revision="svn-r$$(LC_ALL=C svn info | sed -ne 's/^Revision: //p')"; \ ++ elif git log -1 >/dev/null 2>/dev/null; then \ ++ revision="svn-r$$(LC_ALL=C git log -1 | sed -ne 's/.*git-svn-id: .*@\([0-9]\+\) .*/\1/p')"; \ ++ if [ "$$revision" = "svn-r" ]; then \ ++ set -- $$(git log -1 --format="%ct %h" --abbrev=7); \ ++ secs="$$(($$1 % 86400))"; \ ++ yday="$$(date --utc --date="@$$1" "+%y.%j")"; \ ++ revision="$$(printf 'git-%s.%05d-%s' "$$yday" "$$secs" "$$2")"; \ ++ fi; \ ++ else \ ++ revision="unknown"; \ ++ fi; \ ++ echo "$$revision" \ ++))) ++ ++PKG_GITBRANCH?=$(if $(DUMP),x,$(strip $(shell \ ++ variant="LuCI"; \ ++ if git log -1 >/dev/null 2>/dev/null; then \ ++ branch="$$(git branch --remote --verbose --no-abbrev --contains 2>/dev/null | \ ++ sed -rne 's|^[^/]+/([^ ]+) [a-f0-9]{40} .+$$|\1|p' | head -n1)"; \ ++ if [ "$$branch" != "master" ]; then \ ++ variant="LuCI $$branch branch"; \ ++ else \ ++ variant="LuCI Master"; \ ++ fi; \ ++ fi; \ ++ echo "$$variant" \ ++))) ++ ++PKG_RELEASE?=1 ++PKG_INSTALL:=$(if $(realpath src/Makefile),1) ++PKG_BUILD_DEPENDS += lua/host luci-base/host LUCI_CSSTIDY:csstidy/host ++PKG_CONFIG_DEPENDS += CONFIG_LUCI_SRCDIET CONFIG_LUCI_JSMIN CONFIG_LUCI_CSSTIDY ++ ++PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) ++ ++include $(INCLUDE_DIR)/package.mk ++ ++HTDOCS = /www ++LUA_LIBRARYDIR = /usr/lib/lua ++LUCI_LIBRARYDIR = $(LUA_LIBRARYDIR)/luci ++ ++define Build/Prepare ++ for d in luasrc htdocs root src; do \ ++ if [ -d ./$$$$d ]; then \ ++ mkdir -p $(PKG_BUILD_DIR)/$$$$d; \ ++ $(CP) ./$$$$d/* $(PKG_BUILD_DIR)/$$$$d/; \ ++ fi; \ ++ done ++ $(call Build/Prepare/Default) ++endef ++ ++define SrcDiet ++ $(FIND) $(1) -type f -name '*.lua' | while read src; do \ ++ if LUA_PATH="$(STAGING_DIR_HOSTPKG)/lib/lua/5.1/?.lua" luasrcdiet --noopt-binequiv -o "$$$$src.o" "$$$$src"; \ ++ then mv "$$$$src.o" "$$$$src"; fi; \ ++ done ++endef ++ ++define JsMin ++ $(FIND) $(1) -type f -name '*.js' | while read src; do \ ++ if jsmin < "$$$$src" > "$$$$src.o"; \ ++ then mv "$$$$src.o" "$$$$src"; fi; \ ++ done ++endef ++ ++define CssTidy ++ $(FIND) $(1) -type f -name '*.css' | while read src; do \ ++ if csstidy "$$$$src" --template=highest --remove_last_semicolon=true "$$$$src.o"; \ ++ then mv "$$$$src.o" "$$$$src"; fi; \ ++ done ++endef ++ ++define SubstituteVersion ++ $(FIND) $(1) -type f -name '*.htm' | while read src; do \ ++ $(SED) 's/<%# *\([^ ]*\)PKG_VERSION *%>/\1$(PKG_VERSION)/g' \ ++ -e 's/"\(<%= *\(media\|resource\) *%>[^"]*\.\(js\|css\)\)"/"\1?v=$(PKG_VERSION)"/g' \ ++ "$$$$src"; \ ++ done ++endef ++ ++define Package/$(PKG_NAME)/install ++ if [ -d $(PKG_BUILD_DIR)/luasrc ]; then \ ++ $(INSTALL_DIR) $(1)$(LUCI_LIBRARYDIR); \ ++ cp -pR $(PKG_BUILD_DIR)/luasrc/* $(1)$(LUCI_LIBRARYDIR)/; \ ++ $(FIND) $(1)$(LUCI_LIBRARYDIR)/ -type f -name '*.luadoc' | $(XARGS) rm; \ ++ $(if $(CONFIG_LUCI_SRCDIET),$(call SrcDiet,$(1)$(LUCI_LIBRARYDIR)/),true); \ ++ $(call SubstituteVersion,$(1)$(LUCI_LIBRARYDIR)/); \ ++ else true; fi ++ if [ -d $(PKG_BUILD_DIR)/htdocs ]; then \ ++ $(INSTALL_DIR) $(1)$(HTDOCS); \ ++ cp -pR $(PKG_BUILD_DIR)/htdocs/* $(1)$(HTDOCS)/; \ ++ $(if $(CONFIG_LUCI_JSMIN),$(call JsMin,$(1)$(HTDOCS)/),true); \ ++ $(if $(CONFIG_LUCI_CSSTIDY),$(call CssTidy,$(1)$(HTDOCS)/),true); \ ++ else true; fi ++ if [ -d $(PKG_BUILD_DIR)/root ]; then \ ++ $(INSTALL_DIR) $(1)/; \ ++ cp -pR $(PKG_BUILD_DIR)/root/* $(1)/; \ ++ else true; fi ++ if [ -d $(PKG_BUILD_DIR)/src ]; then \ ++ $(call Build/Install/Default) \ ++ $(CP) $(PKG_INSTALL_DIR)/* $(1)/; \ ++ else true; fi ++endef +diff --git a/luci.mk b/luci.mk +index 429422d8f..e1016b3fe 100644 +--- a/luci.mk ++++ b/luci.mk +@@ -4,166 +4,9 @@ + # This is free software, licensed under the Apache License, Version 2.0 . + # + +-LUCI_NAME?=$(notdir ${CURDIR}) +-LUCI_TYPE?=$(word 2,$(subst -, ,$(LUCI_NAME))) +-LUCI_BASENAME?=$(patsubst luci-$(LUCI_TYPE)-%,%,$(LUCI_NAME)) +-LUCI_LANGUAGES:=$(sort $(filter-out templates,$(notdir $(wildcard ${CURDIR}/po/*)))) +-LUCI_DEFAULTS:=$(notdir $(wildcard ${CURDIR}/root/etc/uci-defaults/*)) +-LUCI_PKGARCH?=$(if $(realpath src/Makefile),,all) +- +- +-PKG_NAME?=$(LUCI_NAME) +- +-PKG_BUILD_DEPENDS += $(LUCI_BUILD_DEPENDS) +- +-#-------------- common parts ---------------- +-# Language code titles +-LUCI_LANG.bg=български (Bulgarian) +-LUCI_LANG.ca=Català (Catalan) +-LUCI_LANG.cs=Čeština (Czech) +-LUCI_LANG.de=Deutsch (German) +-LUCI_LANG.el=Ελληνικά (Greek) +-LUCI_LANG.en=English +-LUCI_LANG.es=Español (Spanish) +-LUCI_LANG.fr=Français (French) +-LUCI_LANG.he=עִבְרִית (Hebrew) +-LUCI_LANG.hi=हिंदी (Hindi) +-LUCI_LANG.hu=Magyar (Hungarian) +-LUCI_LANG.it=Italiano (Italian) +-LUCI_LANG.ja=日本語 (Japanese) +-LUCI_LANG.ko=한국어 (Korean) +-LUCI_LANG.ms=Bahasa Melayu (Malay) +-LUCI_LANG.no=Norsk (Norwegian) +-LUCI_LANG.pl=Polski (Polish) +-LUCI_LANG.pt-br=Português do Brasil (Brazialian Portuguese) +-LUCI_LANG.pt=Português (Portuguese) +-LUCI_LANG.ro=Română (Romanian) +-LUCI_LANG.ru=Русский (Russian) +-LUCI_LANG.sk=Slovenčina (Slovak) +-LUCI_LANG.sv=Svenska (Swedish) +-LUCI_LANG.tr=Türkçe (Turkish) +-LUCI_LANG.uk=Українська (Ukrainian) +-LUCI_LANG.vi=Tiếng Việt (Vietnamese) +-LUCI_LANG.zh-cn=中文 (Chinese) +-LUCI_LANG.zh-tw=臺灣華語 (Taiwanese) +- +-# Submenu titles +-LUCI_MENU.col=1. Collections +-LUCI_MENU.mod=2. Modules +-LUCI_MENU.app=3. Applications +-LUCI_MENU.theme=4. Themes +-LUCI_MENU.proto=5. Protocols +-LUCI_MENU.lib=6. Libraries +- +-PKG_VERSION?=$(if $(DUMP),x,$(strip $(shell \ +- if svn info >/dev/null 2>/dev/null; then \ +- revision="svn-r$$(LC_ALL=C svn info | sed -ne 's/^Revision: //p')"; \ +- elif git log -1 >/dev/null 2>/dev/null; then \ +- revision="svn-r$$(LC_ALL=C git log -1 | sed -ne 's/.*git-svn-id: .*@\([0-9]\+\) .*/\1/p')"; \ +- if [ "$$revision" = "svn-r" ]; then \ +- set -- $$(git log -1 --format="%ct %h" --abbrev=7); \ +- secs="$$(($$1 % 86400))"; \ +- yday="$$(date --utc --date="@$$1" "+%y.%j")"; \ +- revision="$$(printf 'git-%s.%05d-%s' "$$yday" "$$secs" "$$2")"; \ +- fi; \ +- else \ +- revision="unknown"; \ +- fi; \ +- echo "$$revision" \ +-))) +- +-PKG_GITBRANCH?=$(if $(DUMP),x,$(strip $(shell \ +- variant="LuCI"; \ +- if git log -1 >/dev/null 2>/dev/null; then \ +- branch="$$(git branch --remote --verbose --no-abbrev --contains 2>/dev/null | \ +- sed -rne 's|^[^/]+/([^ ]+) [a-f0-9]{40} .+$$|\1|p' | head -n1)"; \ +- if [ "$$branch" != "master" ]; then \ +- variant="LuCI $$branch branch"; \ +- else \ +- variant="LuCI Master"; \ +- fi; \ +- fi; \ +- echo "$$variant" \ +-))) +- +-PKG_RELEASE?=1 +-PKG_INSTALL:=$(if $(realpath src/Makefile),1) +-PKG_BUILD_DEPENDS += lua/host luci-base/host LUCI_CSSTIDY:csstidy/host +-PKG_CONFIG_DEPENDS += CONFIG_LUCI_SRCDIET CONFIG_LUCI_JSMIN CONFIG_LUCI_CSSTIDY +- +-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) +- +-include $(INCLUDE_DIR)/package.mk +- +-HTDOCS = /www +-LUA_LIBRARYDIR = /usr/lib/lua +-LUCI_LIBRARYDIR = $(LUA_LIBRARYDIR)/luci +- +-define Build/Prepare +- for d in luasrc htdocs root src; do \ +- if [ -d ./$$$$d ]; then \ +- mkdir -p $(PKG_BUILD_DIR)/$$$$d; \ +- $(CP) ./$$$$d/* $(PKG_BUILD_DIR)/$$$$d/; \ +- fi; \ +- done +- $(call Build/Prepare/Default) +-endef +- +-define SrcDiet +- $(FIND) $(1) -type f -name '*.lua' | while read src; do \ +- if LUA_PATH="$(STAGING_DIR_HOSTPKG)/lib/lua/5.1/?.lua" luasrcdiet --noopt-binequiv -o "$$$$src.o" "$$$$src"; \ +- then mv "$$$$src.o" "$$$$src"; fi; \ +- done +-endef +- +-define JsMin +- $(FIND) $(1) -type f -name '*.js' | while read src; do \ +- if jsmin < "$$$$src" > "$$$$src.o"; \ +- then mv "$$$$src.o" "$$$$src"; fi; \ +- done +-endef +- +-define CssTidy +- $(FIND) $(1) -type f -name '*.css' | while read src; do \ +- if csstidy "$$$$src" --template=highest --remove_last_semicolon=true "$$$$src.o"; \ +- then mv "$$$$src.o" "$$$$src"; fi; \ +- done +-endef +- +-define SubstituteVersion +- $(FIND) $(1) -type f -name '*.htm' | while read src; do \ +- $(SED) 's/<%# *\([^ ]*\)PKG_VERSION *%>/\1$(PKG_VERSION)/g' \ +- -e 's/"\(<%= *\(media\|resource\) *%>[^"]*\.\(js\|css\)\)"/"\1?v=$(PKG_VERSION)"/g' \ +- "$$$$src"; \ +- done +-endef +- +-define Package/$(PKG_NAME)/install +- if [ -d $(PKG_BUILD_DIR)/luasrc ]; then \ +- $(INSTALL_DIR) $(1)$(LUCI_LIBRARYDIR); \ +- cp -pR $(PKG_BUILD_DIR)/luasrc/* $(1)$(LUCI_LIBRARYDIR)/; \ +- $(FIND) $(1)$(LUCI_LIBRARYDIR)/ -type f -name '*.luadoc' | $(XARGS) rm; \ +- $(if $(CONFIG_LUCI_SRCDIET),$(call SrcDiet,$(1)$(LUCI_LIBRARYDIR)/),true); \ +- $(call SubstituteVersion,$(1)$(LUCI_LIBRARYDIR)/); \ +- else true; fi +- if [ -d $(PKG_BUILD_DIR)/htdocs ]; then \ +- $(INSTALL_DIR) $(1)$(HTDOCS); \ +- cp -pR $(PKG_BUILD_DIR)/htdocs/* $(1)$(HTDOCS)/; \ +- $(if $(CONFIG_LUCI_JSMIN),$(call JsMin,$(1)$(HTDOCS)/),true); \ +- $(if $(CONFIG_LUCI_CSSTIDY),$(call CssTidy,$(1)$(HTDOCS)/),true); \ +- else true; fi +- if [ -d $(PKG_BUILD_DIR)/root ]; then \ +- $(INSTALL_DIR) $(1)/; \ +- cp -pR $(PKG_BUILD_DIR)/root/* $(1)/; \ +- else true; fi +- if [ -d $(PKG_BUILD_DIR)/src ]; then \ +- $(call Build/Install/Default) \ +- $(CP) $(PKG_INSTALL_DIR)/* $(1)/; \ +- else true; fi +-endef +- +-# End --- common parts +- ++# get the path of ourself, to find luci.mk in the same directory ++THIS_DIR=$(dir $(abspath $(lastword $(MAKEFILE_LIST)))) ++include $(THIS_DIR)/luci-common.mk + + define Package/$(PKG_NAME) + SECTION:=luci +-- +2.20.1 + + +From f9c11819baabf2b4f8dd88a0a9b22b75b5d36a31 Mon Sep 17 00:00:00 2001 +From: Sven Roederer +Date: Sat, 23 Mar 2019 10:29:30 +0100 +Subject: [PATCH 3/3] luci-common.mk: reorder some sections + +Have constant definitions at top, then helper-code and OpenWrt package related +sutff at the end. + +Signed-off-by: Sven Roederer +--- + luci-common.mk | 46 +++++++++++++++++++++++----------------------- + luci.mk | 12 ++++++++++++ + 2 files changed, 35 insertions(+), 23 deletions(-) + +diff --git a/luci-common.mk b/luci-common.mk +index 23e23cc6f..b11b81524 100644 +--- a/luci-common.mk ++++ b/luci-common.mk +@@ -42,6 +42,10 @@ LUCI_MENU.theme=4. Themes + LUCI_MENU.proto=5. Protocols + LUCI_MENU.lib=6. Libraries + ++HTDOCS = /www ++LUA_LIBRARYDIR = /usr/lib/lua ++LUCI_LIBRARYDIR = $(LUA_LIBRARYDIR)/luci ++ + PKG_VERSION?=$(if $(DUMP),x,$(strip $(shell \ + if svn info >/dev/null 2>/dev/null; then \ + revision="svn-r$$(LC_ALL=C svn info | sed -ne 's/^Revision: //p')"; \ +@@ -73,29 +77,6 @@ PKG_GITBRANCH?=$(if $(DUMP),x,$(strip $(shell \ + echo "$$variant" \ + ))) + +-PKG_RELEASE?=1 +-PKG_INSTALL:=$(if $(realpath src/Makefile),1) +-PKG_BUILD_DEPENDS += lua/host luci-base/host LUCI_CSSTIDY:csstidy/host +-PKG_CONFIG_DEPENDS += CONFIG_LUCI_SRCDIET CONFIG_LUCI_JSMIN CONFIG_LUCI_CSSTIDY +- +-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) +- +-include $(INCLUDE_DIR)/package.mk +- +-HTDOCS = /www +-LUA_LIBRARYDIR = /usr/lib/lua +-LUCI_LIBRARYDIR = $(LUA_LIBRARYDIR)/luci +- +-define Build/Prepare +- for d in luasrc htdocs root src; do \ +- if [ -d ./$$$$d ]; then \ +- mkdir -p $(PKG_BUILD_DIR)/$$$$d; \ +- $(CP) ./$$$$d/* $(PKG_BUILD_DIR)/$$$$d/; \ +- fi; \ +- done +- $(call Build/Prepare/Default) +-endef +- + define SrcDiet + $(FIND) $(1) -type f -name '*.lua' | while read src; do \ + if LUA_PATH="$(STAGING_DIR_HOSTPKG)/lib/lua/5.1/?.lua" luasrcdiet --noopt-binequiv -o "$$$$src.o" "$$$$src"; \ +@@ -125,6 +106,25 @@ define SubstituteVersion + done + endef + ++PKG_RELEASE?=1 ++PKG_INSTALL:=$(if $(realpath src/Makefile),1) ++PKG_BUILD_DEPENDS += lua/host luci-base/host LUCI_CSSTIDY:csstidy/host ++PKG_CONFIG_DEPENDS += CONFIG_LUCI_SRCDIET CONFIG_LUCI_JSMIN CONFIG_LUCI_CSSTIDY ++ ++PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) ++ ++include $(INCLUDE_DIR)/package.mk ++ ++define Build/Prepare ++ for d in luasrc htdocs root src; do \ ++ if [ -d ./$$$$d ]; then \ ++ mkdir -p $(PKG_BUILD_DIR)/$$$$d; \ ++ $(CP) ./$$$$d/* $(PKG_BUILD_DIR)/$$$$d/; \ ++ fi; \ ++ done ++ $(call Build/Prepare/Default) ++endef ++ + define Package/$(PKG_NAME)/install + if [ -d $(PKG_BUILD_DIR)/luasrc ]; then \ + $(INSTALL_DIR) $(1)$(LUCI_LIBRARYDIR); \ +diff --git a/luci.mk b/luci.mk +index e1016b3fe..fa5bedd56 100644 +--- a/luci.mk ++++ b/luci.mk +@@ -4,6 +4,18 @@ + # This is free software, licensed under the Apache License, Version 2.0 . + # + ++LUCI_NAME?=$(notdir ${CURDIR}) ++LUCI_TYPE?=$(word 2,$(subst -, ,$(LUCI_NAME))) ++LUCI_BASENAME?=$(patsubst luci-$(LUCI_TYPE)-%,%,$(LUCI_NAME)) ++LUCI_LANGUAGES:=$(sort $(filter-out templates,$(notdir $(wildcard ${CURDIR}/po/*)))) ++LUCI_DEFAULTS:=$(notdir $(wildcard ${CURDIR}/root/etc/uci-defaults/*)) ++LUCI_PKGARCH?=$(if $(realpath src/Makefile),,all) ++ ++ ++PKG_NAME?=$(LUCI_NAME) ++ ++PKG_BUILD_DEPENDS += $(LUCI_BUILD_DEPENDS) ++ + # get the path of ourself, to find luci.mk in the same directory + THIS_DIR=$(dir $(abspath $(lastword $(MAKEFILE_LIST)))) + include $(THIS_DIR)/luci-common.mk +-- +2.20.1 + From 855218fc7c76de3aa74292a505c1d99cf7ec4426 Mon Sep 17 00:00:00 2001 From: adminuser Date: Thu, 2 Jan 2020 03:30:33 +0100 Subject: [PATCH 40/82] patches/luci: update PR2637 for upstream-changes --- patches/packages/luci/0203-PR2637.patch | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/patches/packages/luci/0203-PR2637.patch b/patches/packages/luci/0203-PR2637.patch index 88fe7f2f3d..1c26519278 100644 --- a/patches/packages/luci/0203-PR2637.patch +++ b/patches/packages/luci/0203-PR2637.patch @@ -208,7 +208,7 @@ new file mode 100644 index 000000000..23e23cc6f --- /dev/null +++ b/luci-common.mk -@@ -0,0 +1,150 @@ +@@ -0,0 +1,151 @@ +# +# Copyright (C) 2008-2015 The LuCI Team +# @@ -230,6 +230,7 @@ index 000000000..23e23cc6f +LUCI_LANG.it=Italiano (Italian) +LUCI_LANG.ja=日本語 (Japanese) +LUCI_LANG.ko=한국어 (Korean) ++LUCI_LANG.mr=मराठी (Marathi) +LUCI_LANG.ms=Bahasa Melayu (Malay) +LUCI_LANG.no=Norsk (Norwegian) +LUCI_LANG.pl=Polski (Polish) @@ -363,7 +364,7 @@ diff --git a/luci.mk b/luci.mk index 429422d8f..e1016b3fe 100644 --- a/luci.mk +++ b/luci.mk -@@ -4,166 +4,9 @@ +@@ -4,167 +4,9 @@ # This is free software, licensed under the Apache License, Version 2.0 . # @@ -395,6 +396,7 @@ index 429422d8f..e1016b3fe 100644 -LUCI_LANG.it=Italiano (Italian) -LUCI_LANG.ja=日本語 (Japanese) -LUCI_LANG.ko=한국어 (Korean) +-LUCI_LANG.mr=मराठी (Marathi) -LUCI_LANG.ms=Bahasa Melayu (Malay) -LUCI_LANG.no=Norsk (Norwegian) -LUCI_LANG.pl=Polski (Polish) From 8c800590eabd212be71cfea6d73d285cffbae8cd Mon Sep 17 00:00:00 2001 From: Sven Roederer Date: Sun, 1 Mar 2020 15:17:52 +0100 Subject: [PATCH 41/82] patches/luci: update PR2637 to adapt to upstream changes --- patches/packages/luci/0203-PR2637.patch | 116 ++++++++++-------------- 1 file changed, 46 insertions(+), 70 deletions(-) diff --git a/patches/packages/luci/0203-PR2637.patch b/patches/packages/luci/0203-PR2637.patch index 1c26519278..8f0c35c0cf 100644 --- a/patches/packages/luci/0203-PR2637.patch +++ b/patches/packages/luci/0203-PR2637.patch @@ -1,4 +1,4 @@ -From 43c3db8b04a7fff5818c09cb97a4831622040cd1 Mon Sep 17 00:00:00 2001 +From 5fc8bf66e0d4d7086644a795fdb84e110b702570 Mon Sep 17 00:00:00 2001 From: Sven Roederer Date: Thu, 21 Mar 2019 22:17:58 +0100 Subject: [PATCH 1/3] luci.mk: reorder to have common-things in a block @@ -9,7 +9,7 @@ Signed-off-by: Sven Roederer 1 file changed, 68 insertions(+), 62 deletions(-) diff --git a/luci.mk b/luci.mk -index d8fa02951..429422d8f 100644 +index 2c1268884..f4ec9716c 100644 --- a/luci.mk +++ b/luci.mk @@ -11,6 +11,12 @@ LUCI_LANGUAGES:=$(sort $(filter-out templates,$(notdir $(wildcard ${CURDIR}/po/* @@ -25,9 +25,9 @@ index d8fa02951..429422d8f 100644 # Language code titles LUCI_LANG.bg=български (Bulgarian) LUCI_LANG.ca=Català (Catalan) -@@ -49,9 +55,6 @@ LUCI_MENU.theme=4. Themes - LUCI_MENU.proto=5. Protocols - LUCI_MENU.lib=6. Libraries +@@ -56,9 +62,6 @@ LUCI_LC_ALIAS.pt_BR=pt-br + LUCI_LC_ALIAS.zh_Hans=zh-cn + LUCI_LC_ALIAS.zh_Hant=zh-tw - -PKG_NAME?=$(LUCI_NAME) @@ -35,7 +35,7 @@ index d8fa02951..429422d8f 100644 PKG_VERSION?=$(if $(DUMP),x,$(strip $(shell \ if svn info >/dev/null 2>/dev/null; then \ revision="svn-r$$(LC_ALL=C svn info | sed -ne 's/^Revision: //p')"; \ -@@ -85,52 +88,16 @@ PKG_GITBRANCH?=$(if $(DUMP),x,$(strip $(shell \ +@@ -92,52 +95,16 @@ PKG_GITBRANCH?=$(if $(DUMP),x,$(strip $(shell \ PKG_RELEASE?=1 PKG_INSTALL:=$(if $(realpath src/Makefile),1) @@ -92,7 +92,7 @@ index d8fa02951..429422d8f 100644 define Build/Prepare for d in luasrc htdocs root src; do \ -@@ -142,25 +109,6 @@ define Build/Prepare +@@ -149,25 +116,6 @@ define Build/Prepare $(call Build/Prepare/Default) endef @@ -118,7 +118,7 @@ index d8fa02951..429422d8f 100644 define SrcDiet $(FIND) $(1) -type f -name '*.lua' | while read src; do \ if LUA_PATH="$(STAGING_DIR_HOSTPKG)/lib/lua/5.1/?.lua" luasrcdiet --noopt-binequiv -o "$$$$src.o" "$$$$src"; \ -@@ -214,6 +162,64 @@ define Package/$(PKG_NAME)/install +@@ -221,6 +169,64 @@ define Package/$(PKG_NAME)/install else true; fi endef @@ -187,7 +187,7 @@ index d8fa02951..429422d8f 100644 2.20.1 -From d0e2a044c58cfc22335b267954d10cbc00c5e4a4 Mon Sep 17 00:00:00 2001 +From 8fe5db7a6ed25fb51b6ca56b1220446f8dd8ee57 Mon Sep 17 00:00:00 2001 From: Sven Roederer Date: Sat, 23 Mar 2019 09:48:00 +0100 Subject: [PATCH 2/3] luci.mk: split into luci-common.mk and luci.mk @@ -198,17 +198,17 @@ definitions. Signed-off-by: Sven Roederer --- - luci-common.mk | 150 +++++++++++++++++++++++++++++++++++++++++++++ - luci.mk | 163 +------------------------------------------------ - 2 files changed, 153 insertions(+), 160 deletions(-) + luci-common.mk | 157 ++++++++++++++++++++++++++++++++++++++++++++++++ + luci.mk | 158 +------------------------------------------------ + 2 files changed, 160 insertions(+), 155 deletions(-) create mode 100644 luci-common.mk diff --git a/luci-common.mk b/luci-common.mk new file mode 100644 -index 000000000..23e23cc6f +index 000000000..dbbf521f3 --- /dev/null +++ b/luci-common.mk -@@ -0,0 +1,151 @@ +@@ -0,0 +1,157 @@ +# +# Copyright (C) 2008-2015 The LuCI Team +# @@ -232,9 +232,9 @@ index 000000000..23e23cc6f +LUCI_LANG.ko=한국어 (Korean) +LUCI_LANG.mr=मराठी (Marathi) +LUCI_LANG.ms=Bahasa Melayu (Malay) -+LUCI_LANG.no=Norsk (Norwegian) ++LUCI_LANG.nb_NO=Norsk (Norwegian) +LUCI_LANG.pl=Polski (Polish) -+LUCI_LANG.pt-br=Português do Brasil (Brazialian Portuguese) ++LUCI_LANG.pt_BR=Português do Brasil (Brazialian Portuguese) +LUCI_LANG.pt=Português (Portuguese) +LUCI_LANG.ro=Română (Romanian) +LUCI_LANG.ru=Русский (Russian) @@ -243,8 +243,8 @@ index 000000000..23e23cc6f +LUCI_LANG.tr=Türkçe (Turkish) +LUCI_LANG.uk=Українська (Ukrainian) +LUCI_LANG.vi=Tiếng Việt (Vietnamese) -+LUCI_LANG.zh-cn=中文 (Chinese) -+LUCI_LANG.zh-tw=臺灣華語 (Taiwanese) ++LUCI_LANG.zh_Hans=中文 (Chinese) ++LUCI_LANG.zh_Hant=臺灣華語 (Taiwanese) + +# Submenu titles +LUCI_MENU.col=1. Collections @@ -254,6 +254,12 @@ index 000000000..23e23cc6f +LUCI_MENU.proto=5. Protocols +LUCI_MENU.lib=6. Libraries + ++# Language aliases ++LUCI_LC_ALIAS.nb_NO=no ++LUCI_LC_ALIAS.pt_BR=pt-br ++LUCI_LC_ALIAS.zh_Hans=zh-cn ++LUCI_LC_ALIAS.zh_Hant=zh-tw ++ +PKG_VERSION?=$(if $(DUMP),x,$(strip $(shell \ + if svn info >/dev/null 2>/dev/null; then \ + revision="svn-r$$(LC_ALL=C svn info | sed -ne 's/^Revision: //p')"; \ @@ -361,25 +367,13 @@ index 000000000..23e23cc6f + else true; fi +endef diff --git a/luci.mk b/luci.mk -index 429422d8f..e1016b3fe 100644 +index f4ec9716c..2ade262b2 100644 --- a/luci.mk +++ b/luci.mk -@@ -4,167 +4,9 @@ - # This is free software, licensed under the Apache License, Version 2.0 . - # +@@ -16,161 +16,9 @@ PKG_NAME?=$(LUCI_NAME) + + PKG_BUILD_DEPENDS += $(LUCI_BUILD_DEPENDS) --LUCI_NAME?=$(notdir ${CURDIR}) --LUCI_TYPE?=$(word 2,$(subst -, ,$(LUCI_NAME))) --LUCI_BASENAME?=$(patsubst luci-$(LUCI_TYPE)-%,%,$(LUCI_NAME)) --LUCI_LANGUAGES:=$(sort $(filter-out templates,$(notdir $(wildcard ${CURDIR}/po/*)))) --LUCI_DEFAULTS:=$(notdir $(wildcard ${CURDIR}/root/etc/uci-defaults/*)) --LUCI_PKGARCH?=$(if $(realpath src/Makefile),,all) -- -- --PKG_NAME?=$(LUCI_NAME) -- --PKG_BUILD_DEPENDS += $(LUCI_BUILD_DEPENDS) -- -#-------------- common parts ---------------- -# Language code titles -LUCI_LANG.bg=български (Bulgarian) @@ -398,9 +392,9 @@ index 429422d8f..e1016b3fe 100644 -LUCI_LANG.ko=한국어 (Korean) -LUCI_LANG.mr=मराठी (Marathi) -LUCI_LANG.ms=Bahasa Melayu (Malay) --LUCI_LANG.no=Norsk (Norwegian) +-LUCI_LANG.nb_NO=Norsk (Norwegian) -LUCI_LANG.pl=Polski (Polish) --LUCI_LANG.pt-br=Português do Brasil (Brazialian Portuguese) +-LUCI_LANG.pt_BR=Português do Brasil (Brazialian Portuguese) -LUCI_LANG.pt=Português (Portuguese) -LUCI_LANG.ro=Română (Romanian) -LUCI_LANG.ru=Русский (Russian) @@ -409,8 +403,8 @@ index 429422d8f..e1016b3fe 100644 -LUCI_LANG.tr=Türkçe (Turkish) -LUCI_LANG.uk=Українська (Ukrainian) -LUCI_LANG.vi=Tiếng Việt (Vietnamese) --LUCI_LANG.zh-cn=中文 (Chinese) --LUCI_LANG.zh-tw=臺灣華語 (Taiwanese) +-LUCI_LANG.zh_Hans=中文 (Chinese) +-LUCI_LANG.zh_Hant=臺灣華語 (Taiwanese) - -# Submenu titles -LUCI_MENU.col=1. Collections @@ -420,6 +414,12 @@ index 429422d8f..e1016b3fe 100644 -LUCI_MENU.proto=5. Protocols -LUCI_MENU.lib=6. Libraries - +-# Language aliases +-LUCI_LC_ALIAS.nb_NO=no +-LUCI_LC_ALIAS.pt_BR=pt-br +-LUCI_LC_ALIAS.zh_Hans=zh-cn +-LUCI_LC_ALIAS.zh_Hant=zh-tw +- -PKG_VERSION?=$(if $(DUMP),x,$(strip $(shell \ - if svn info >/dev/null 2>/dev/null; then \ - revision="svn-r$$(LC_ALL=C svn info | sed -ne 's/^Revision: //p')"; \ @@ -539,7 +539,7 @@ index 429422d8f..e1016b3fe 100644 2.20.1 -From f9c11819baabf2b4f8dd88a0a9b22b75b5d36a31 Mon Sep 17 00:00:00 2001 +From aaa1d7addefb3b9504152d22757330b6988b8ce9 Mon Sep 17 00:00:00 2001 From: Sven Roederer Date: Sat, 23 Mar 2019 10:29:30 +0100 Subject: [PATCH 3/3] luci-common.mk: reorder some sections @@ -550,16 +550,15 @@ sutff at the end. Signed-off-by: Sven Roederer --- luci-common.mk | 46 +++++++++++++++++++++++----------------------- - luci.mk | 12 ++++++++++++ - 2 files changed, 35 insertions(+), 23 deletions(-) + 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/luci-common.mk b/luci-common.mk -index 23e23cc6f..b11b81524 100644 +index dbbf521f3..5e6382c71 100644 --- a/luci-common.mk +++ b/luci-common.mk -@@ -42,6 +42,10 @@ LUCI_MENU.theme=4. Themes - LUCI_MENU.proto=5. Protocols - LUCI_MENU.lib=6. Libraries +@@ -49,6 +49,10 @@ LUCI_LC_ALIAS.pt_BR=pt-br + LUCI_LC_ALIAS.zh_Hans=zh-cn + LUCI_LC_ALIAS.zh_Hant=zh-tw +HTDOCS = /www +LUA_LIBRARYDIR = /usr/lib/lua @@ -568,7 +567,7 @@ index 23e23cc6f..b11b81524 100644 PKG_VERSION?=$(if $(DUMP),x,$(strip $(shell \ if svn info >/dev/null 2>/dev/null; then \ revision="svn-r$$(LC_ALL=C svn info | sed -ne 's/^Revision: //p')"; \ -@@ -73,29 +77,6 @@ PKG_GITBRANCH?=$(if $(DUMP),x,$(strip $(shell \ +@@ -80,29 +84,6 @@ PKG_GITBRANCH?=$(if $(DUMP),x,$(strip $(shell \ echo "$$variant" \ ))) @@ -598,7 +597,7 @@ index 23e23cc6f..b11b81524 100644 define SrcDiet $(FIND) $(1) -type f -name '*.lua' | while read src; do \ if LUA_PATH="$(STAGING_DIR_HOSTPKG)/lib/lua/5.1/?.lua" luasrcdiet --noopt-binequiv -o "$$$$src.o" "$$$$src"; \ -@@ -125,6 +106,25 @@ define SubstituteVersion +@@ -132,6 +113,25 @@ define SubstituteVersion done endef @@ -624,29 +623,6 @@ index 23e23cc6f..b11b81524 100644 define Package/$(PKG_NAME)/install if [ -d $(PKG_BUILD_DIR)/luasrc ]; then \ $(INSTALL_DIR) $(1)$(LUCI_LIBRARYDIR); \ -diff --git a/luci.mk b/luci.mk -index e1016b3fe..fa5bedd56 100644 ---- a/luci.mk -+++ b/luci.mk -@@ -4,6 +4,18 @@ - # This is free software, licensed under the Apache License, Version 2.0 . - # - -+LUCI_NAME?=$(notdir ${CURDIR}) -+LUCI_TYPE?=$(word 2,$(subst -, ,$(LUCI_NAME))) -+LUCI_BASENAME?=$(patsubst luci-$(LUCI_TYPE)-%,%,$(LUCI_NAME)) -+LUCI_LANGUAGES:=$(sort $(filter-out templates,$(notdir $(wildcard ${CURDIR}/po/*)))) -+LUCI_DEFAULTS:=$(notdir $(wildcard ${CURDIR}/root/etc/uci-defaults/*)) -+LUCI_PKGARCH?=$(if $(realpath src/Makefile),,all) -+ -+ -+PKG_NAME?=$(LUCI_NAME) -+ -+PKG_BUILD_DEPENDS += $(LUCI_BUILD_DEPENDS) -+ - # get the path of ourself, to find luci.mk in the same directory - THIS_DIR=$(dir $(abspath $(lastword $(MAKEFILE_LIST)))) - include $(THIS_DIR)/luci-common.mk -- 2.20.1 From bf4909dfd0815c1c96e0b87465759b370be48780 Mon Sep 17 00:00:00 2001 From: Sven Roederer Date: Thu, 26 Dec 2019 22:47:08 +0100 Subject: [PATCH 42/82] patches/packages_berlin: let freifunk-generic-berlin.mk use luci-common.mk This include was added by PR https://github.com/openwrt/luci/pull/2637 (see the relating patch-file) --- ...01-generic.mk-include-luci-common.mk.patch | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 patches/packages/packages_berlin/101-generic.mk-include-luci-common.mk.patch diff --git a/patches/packages/packages_berlin/101-generic.mk-include-luci-common.mk.patch b/patches/packages/packages_berlin/101-generic.mk-include-luci-common.mk.patch new file mode 100644 index 0000000000..0f066e6ef7 --- /dev/null +++ b/patches/packages/packages_berlin/101-generic.mk-include-luci-common.mk.patch @@ -0,0 +1,25 @@ +From 73308be31a7311313646fdcfec03ffe1823dde97 Mon Sep 17 00:00:00 2001 +From: Sven Roederer +Date: Thu, 26 Dec 2019 02:38:38 +0100 +Subject: [PATCH] generic.mk: include luci-common.mk + +--- + freifunk-berlin-generic.mk | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/freifunk-berlin-generic.mk b/freifunk-berlin-generic.mk +index 82d5b60..a5dbd59 100644 +--- a/freifunk-berlin-generic.mk ++++ b/freifunk-berlin-generic.mk +@@ -2,7 +2,7 @@ + # This is free software, licensed under the GNU General Public License v3.0 . + # + +-LUCIMKFILE:=$(wildcard $(TOPDIR)/feeds/*/luci.mk) ++LUCIMKFILE:=$(wildcard $(TOPDIR)/feeds/*/luci-common.mk) + + # verify that there is only one single file returned + ifneq (1,$(words $(LUCIMKFILE))) +-- +2.20.1 + From 54b10696aa04048b966849f2e0ba8cf40e78dcdb Mon Sep 17 00:00:00 2001 From: Sven Roederer Date: Sun, 1 Mar 2020 21:54:43 +0100 Subject: [PATCH 43/82] scripts: improve debug-output --- scripts/target_config_lib.lua | 3 +++ scripts/target_lib.lua | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/target_config_lib.lua b/scripts/target_config_lib.lua index 4b262fd0eb..c8acdfb2c8 100644 --- a/scripts/target_config_lib.lua +++ b/scripts/target_config_lib.lua @@ -30,11 +30,14 @@ END_MAKE lib.include('generic') lib.include('generic_' .. env.FOREIGN_BUILD) + io.stderr:write(string.format("target_config_lib.lua:default_packages is: %s\n", default_packages)) for pkg in string.gmatch(default_packages, '%S+') do lib.packages {pkg} end + io.stderr:write(string.format("target_config_lib.lua: calling lib.include(target)\n")) lib.include(target) + io.stderr:write(string.format("target_config_lib.lua: calling lib.check_devices()\n")) lib.check_devices() diff --git a/scripts/target_lib.lua b/scripts/target_lib.lua index 7808ad9f5c..234f61fc57 100644 --- a/scripts/target_lib.lua +++ b/scripts/target_lib.lua @@ -164,7 +164,7 @@ end function F.packages(pkgs) for _, pkg in ipairs(pkgs) do - io.stderr:write("target_lib.lua:packages# " .. pkg .. "\n") + io.stderr:write("target_lib.lua:packages: adding to M.target_packages: " .. pkg .. "\n") table.insert(M.target_packages, pkg) end end From 6f2698002ea5f19e9a5f419cea494bd3753aac22 Mon Sep 17 00:00:00 2001 From: Sven Roederer Date: Sun, 1 Mar 2020 21:55:40 +0100 Subject: [PATCH 44/82] scripts: implement parsing of "EXTRA_PACKAGES" This will just build packages, without adding them into an image. --- scripts/target_config_lib.lua | 12 ++++++++++++ scripts/target_lib.lua | 8 ++++++++ 2 files changed, 20 insertions(+) diff --git a/scripts/target_config_lib.lua b/scripts/target_config_lib.lua index c8acdfb2c8..4c5be35784 100644 --- a/scripts/target_config_lib.lua +++ b/scripts/target_config_lib.lua @@ -7,6 +7,7 @@ return function(funcs) local target = arg[1] local default_packages = arg[2] + local extra_packages = arg[3] local openwrt_config_target if env.SUBTARGET ~= '' then @@ -47,6 +48,11 @@ END_MAKE lib.packages {'-opkg'} end + io.stderr:write(string.format("target_config_lib.lua: calling starting loop extra_packages\n")) + for pkg in string.gmatch(extra_packages, '%S+') do + lib.e_packages {pkg} + end + local default_pkgs = '' for _, pkg in ipairs(lib.target_packages) do @@ -87,5 +93,11 @@ END_MAKE end end + local extra_pkgs = '' + for _, pkg in ipairs(lib.extra_packages) do + extra_pkgs = extra_pkgs .. ' ' .. pkg + funcs.config_package(lib.config_m, pkg, "m") + end + return lib end diff --git a/scripts/target_lib.lua b/scripts/target_lib.lua index 234f61fc57..2690979d30 100644 --- a/scripts/target_lib.lua +++ b/scripts/target_lib.lua @@ -28,6 +28,7 @@ assert(env.GLUON_DEPRECATED) M.site_code = assert(assert(dofile('scripts/site_config.lua')('site.conf')).site_code) M.target_packages = {} +M.extra_packages = {} M.configs = {} M.devices = {} M.images = {} @@ -168,6 +169,13 @@ function F.packages(pkgs) table.insert(M.target_packages, pkg) end end + +function F.e_packages(pkgs) + for _, pkg in ipairs(pkgs) do + io.stderr:write("target_lib.lua:extra_packages# " .. pkg .. "\n") + table.insert(M.extra_packages, pkg) + end +end M.packages = F.packages function F.device(image, name, options) From 6d9354da02f76ae57956eb6b95f89b4750b9b33c Mon Sep 17 00:00:00 2001 From: Sven Roederer Date: Sun, 1 Mar 2020 21:57:29 +0100 Subject: [PATCH 45/82] Makefile: [gluon] - implement "EXTRA_PACKAGES" and disable check-image for now * the "EXTRA_PACKAGES" are configured in the site.mk * this code worked to build a initramfs for ERX-SFP --- Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index fe3da3c13e..9fb3d5bdc8 100644 --- a/Makefile +++ b/Makefile @@ -128,12 +128,12 @@ $(LUA): gluon-config: $(LUA) .stamp-feeds-updated $(OPENWRT_DIR)/dl @$(CheckExternal) @$(GLUON_CONFIG_VARS) FOREIGN_BUILD=ffberlin \ - $(LUA) scripts/target_config.lua '$(GLUON_TARGET)' '$(GLUON_PACKAGES)' \ + $(LUA) scripts/target_config.lua '$(GLUON_TARGET)' '$(GLUON_PACKAGES)' '$(GLUON_EXTRA_PACKAGES)'\ > openwrt/.config +@$(OPENWRTMAKE) defconfig - @$(GLUON_CONFIG_VARS) FOREIGN_BUILD=ffberlin \ - $(LUA) scripts/target_config_check.lua '$(GLUON_TARGET)' '$(GLUON_PACKAGES)' +# @$(GLUON_CONFIG_VARS) FOREIGN_BUILD=ffberlin \ +# $(LUA) scripts/target_config_check.lua '$(GLUON_TARGET)' '$(GLUON_PACKAGES)' gluon-compile: gluon-config +@$(OPENWRTMAKE) From 9b3abdb0d30b271ba0ac8c43968eef38358438dd Mon Sep 17 00:00:00 2001 From: Sven Roederer Date: Fri, 27 Dec 2019 04:33:43 +0100 Subject: [PATCH 46/82] patches/openwrt: backport "build: have scripts/feeds honor all toplevel .mk-files of a feed" original-commit: b81cee86e63d4421072839ec8a3780d8afff9337 backport-request: http://lists.infradead.org/pipermail/openwrt-devel/2019-December/020858.html --- ...ts-feeds-honor-all-toplevel-.mk-file.patch | 53 +++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 patches/openwrt/0008-build-have-scripts-feeds-honor-all-toplevel-.mk-file.patch diff --git a/patches/openwrt/0008-build-have-scripts-feeds-honor-all-toplevel-.mk-file.patch b/patches/openwrt/0008-build-have-scripts-feeds-honor-all-toplevel-.mk-file.patch new file mode 100644 index 0000000000..15cdee5a60 --- /dev/null +++ b/patches/openwrt/0008-build-have-scripts-feeds-honor-all-toplevel-.mk-file.patch @@ -0,0 +1,53 @@ +From c5c64b847937315efc3881c66c39afc67cc97cea Mon Sep 17 00:00:00 2001 +From: Sven Roederer +Date: Sat, 9 Mar 2019 15:00:15 +0100 +Subject: [PATCH] build: have scripts/feeds honor all toplevel .mk-files of a + feed + +The luci and freifunk feed having a common Makefile included by the +individual packages. Currently a change to this file will be ignored +when running "scripts/feeds update". +When we are updating for a feed, add a dependency for all .mk files +in the root of it. + +Signed-off-by: Sven Roederer +--- + include/scan.mk | 11 +++++++---- + 1 file changed, 7 insertions(+), 4 deletions(-) + +diff --git a/include/scan.mk b/include/scan.mk +index d9cd4f7e8c..7df5dc6486 100644 +--- a/include/scan.mk ++++ b/include/scan.mk +@@ -12,10 +12,17 @@ OVERRIDELIST:=$(TMP_DIR)/info/.overrides-$(SCAN_TARGET)-$(SCAN_COOKIE) + + export PATH:=$(TOPDIR)/staging_dir/host/bin:$(PATH) + ++define feedname ++$(if $(patsubst feeds/%,,$(1)),,$(word 2,$(subst /, ,$(1)))) ++endef ++ + ifeq ($(SCAN_NAME),target) + SCAN_DEPS=image/Makefile profiles/*.mk $(TOPDIR)/include/kernel*.mk $(TOPDIR)/include/target.mk image/*.mk + else + SCAN_DEPS=$(TOPDIR)/include/package*.mk ++ifneq ($(call feedname,$(SCAN_DIR)),) ++ SCAN_DEPS += $(TOPDIR)/feeds/$(call feedname,$(SCAN_DIR))/*.mk ++endif + endif + + ifeq ($(IS_TTY),1) +@@ -34,10 +41,6 @@ else + endef + endif + +-define feedname +-$(if $(patsubst feeds/%,,$(1)),,$(word 2,$(subst /, ,$(1)))) +-endef +- + define PackageDir + $(TMP_DIR)/.$(SCAN_TARGET): $(TMP_DIR)/info/.$(SCAN_TARGET)-$(1) + $(TMP_DIR)/info/.$(SCAN_TARGET)-$(1): $(SCAN_DIR)/$(2)/Makefile $(foreach DEP,$(DEPS_$(SCAN_DIR)/$(2)/Makefile) $(SCAN_DEPS),$(wildcard $(if $(filter /%,$(DEP)),$(DEP),$(SCAN_DIR)/$(2)/$(DEP)))) +-- +2.20.1 + From cd0820f7c0871375f138184d51fc831843d4b355 Mon Sep 17 00:00:00 2001 From: Sven Roederer Date: Mon, 2 Mar 2020 02:09:37 +0100 Subject: [PATCH 47/82] targets/generic_ffberlin: set CONFIG_kmod_usb_net as it's a predepend of usb_net_rndis --- targets/generic_ffberlin | 1 + 1 file changed, 1 insertion(+) diff --git a/targets/generic_ffberlin b/targets/generic_ffberlin index 2bf3397c2c..163227db52 100644 --- a/targets/generic_ffberlin +++ b/targets/generic_ffberlin @@ -73,6 +73,7 @@ config 'CONFIG_PACKAGE_kmod-ppp=m' config 'CONFIG_PACKAGE_kmod-sit=m' config 'CONFIG_PACKAGE_kmod-tun=m' config 'CONFIG_PACKAGE_kmod-usb-acm=m' +config 'CONFIG_PACKAGE_kmod-usb-net=m' config 'CONFIG_PACKAGE_kmod-usb-net-cdc-ether=m' config 'CONFIG_PACKAGE_kmod-usb-net-rndis=m' config 'CONFIG_PACKAGE_kmod-usb-ohci=m' From 7ced58b752eb86040a9db42f15bdf216addb7a7d Mon Sep 17 00:00:00 2001 From: Sven Roederer Date: Mon, 2 Mar 2020 02:13:29 +0100 Subject: [PATCH 48/82] scripts/target_config_check.lua:add some debug --- scripts/target_config_check.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/target_config_check.lua b/scripts/target_config_check.lua index 160c32a388..4b13f968f7 100755 --- a/scripts/target_config_check.lua +++ b/scripts/target_config_check.lua @@ -21,6 +21,7 @@ local function match_config(f) end local function check_config(pattern) + io.stderr:write(string.format("target_config_check.lua:check_config()# %s\n", pattern)) return match_config(function(line) return line == pattern end) end @@ -53,6 +54,8 @@ function funcs.config_package(_, pkg, value) end end +io.stderr:write("This is target_config_check.lua\n") + local lib = dofile('scripts/target_config_lib.lua')(funcs) for config, v in pairs(lib.configs) do From cf933e66aef3119fa280968b5e742fbd018d378b Mon Sep 17 00:00:00 2001 From: Sven Roederer Date: Mon, 2 Mar 2020 02:14:12 +0100 Subject: [PATCH 49/82] Makefile: [gluon] reenable target_check.lua and supply EXTRA_PACKAGES --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 9fb3d5bdc8..71f1c26a54 100644 --- a/Makefile +++ b/Makefile @@ -132,8 +132,8 @@ gluon-config: $(LUA) .stamp-feeds-updated $(OPENWRT_DIR)/dl > openwrt/.config +@$(OPENWRTMAKE) defconfig -# @$(GLUON_CONFIG_VARS) FOREIGN_BUILD=ffberlin \ -# $(LUA) scripts/target_config_check.lua '$(GLUON_TARGET)' '$(GLUON_PACKAGES)' + @$(GLUON_CONFIG_VARS) FOREIGN_BUILD=ffberlin \ + $(LUA) scripts/target_config_check.lua '$(GLUON_TARGET)' '$(GLUON_PACKAGES)' '$(GLUON_EXTRA_PACKAGES)' gluon-compile: gluon-config +@$(OPENWRTMAKE) From 8f1f1e3cbab5721950a9d94b67cb0115f8d7cdf9 Mon Sep 17 00:00:00 2001 From: Sven Roederer Date: Tue, 3 Mar 2020 22:46:02 +0100 Subject: [PATCH 50/82] scripts/target_config_lib.lua: make arg[3] optional by defaulting to nil --- scripts/target_config_lib.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/target_config_lib.lua b/scripts/target_config_lib.lua index 4c5be35784..443df3a723 100644 --- a/scripts/target_config_lib.lua +++ b/scripts/target_config_lib.lua @@ -7,7 +7,7 @@ return function(funcs) local target = arg[1] local default_packages = arg[2] - local extra_packages = arg[3] + local extra_packages = arg[3] or "" local openwrt_config_target if env.SUBTARGET ~= '' then From 91452d989af5ca6f0561ae5183e12ecfbf13a376 Mon Sep 17 00:00:00 2001 From: Sven Roederer Date: Tue, 3 Mar 2020 22:55:16 +0100 Subject: [PATCH 51/82] scripts/target_config_lib.lua: add debug-output for profile and package-lists --- scripts/target_config_lib.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/target_config_lib.lua b/scripts/target_config_lib.lua index 443df3a723..52f6a44097 100644 --- a/scripts/target_config_lib.lua +++ b/scripts/target_config_lib.lua @@ -91,6 +91,9 @@ END_MAKE lib.config('CONFIG_TARGET_DEVICE_PACKAGES_%s_DEVICE_%s="%s"', openwrt_config_target, profile, device_pkgs) end + io.stderr:write(string.format('setting profile: %s="%s"\n', + profile, device_pkgs)) + end local extra_pkgs = '' From 31b60ff4d5dcd1fdf30982121df71fd4b033efa7 Mon Sep 17 00:00:00 2001 From: Sven Roederer Date: Wed, 4 Mar 2020 23:09:18 +0100 Subject: [PATCH 52/82] targets/generic_ffberlin: move more usb-networking packages to site-conf --- targets/generic_ffberlin | 4 ---- 1 file changed, 4 deletions(-) diff --git a/targets/generic_ffberlin b/targets/generic_ffberlin index 163227db52..7299746ad2 100644 --- a/targets/generic_ffberlin +++ b/targets/generic_ffberlin @@ -72,10 +72,6 @@ config 'CONFIG_PACKAGE_kmod-ppp=m' --config 'CONFIG_PACKAGE_kmod-sched-core=m' config 'CONFIG_PACKAGE_kmod-sit=m' config 'CONFIG_PACKAGE_kmod-tun=m' -config 'CONFIG_PACKAGE_kmod-usb-acm=m' -config 'CONFIG_PACKAGE_kmod-usb-net=m' -config 'CONFIG_PACKAGE_kmod-usb-net-cdc-ether=m' -config 'CONFIG_PACKAGE_kmod-usb-net-rndis=m' config 'CONFIG_PACKAGE_kmod-usb-ohci=m' config 'CONFIG_PACKAGE_kmod-usb-serial=m' config 'CONFIG_PACKAGE_kmod-usb-serial-option=m' From 5239bd874905664e684ee541e1f2c8ea6f062155 Mon Sep 17 00:00:00 2001 From: Sven Roederer Date: Wed, 4 Mar 2020 23:12:09 +0100 Subject: [PATCH 53/82] targets/generic_ffberlin: drop explicit setup of kmod_crc* --- targets/generic_ffberlin | 3 --- 1 file changed, 3 deletions(-) diff --git a/targets/generic_ffberlin b/targets/generic_ffberlin index 7299746ad2..9f99c39aa9 100644 --- a/targets/generic_ffberlin +++ b/targets/generic_ffberlin @@ -55,9 +55,6 @@ config 'CONFIG_PACKAGE_kmod-fs-vfat=m' --config 'CONFIG_PACKAGE_kmod-ipt-ipopt=m' --config 'CONFIG_PACKAGE_kmod-iptunnel=m' --config 'CONFIG_PACKAGE_kmod-iptunnel4=m' -config 'CONFIG_PACKAGE_kmod-lib-crc-itu-t=m' -config 'CONFIG_PACKAGE_kmod-lib-crc16=m' -config 'CONFIG_PACKAGE_kmod-lib-crc32c=m' --config 'CONFIG_PACKAGE_kmod-lib-textsearch=m' config 'CONFIG_PACKAGE_kmod-nf-nathelper-extra=m' config 'CONFIG_PACKAGE_kmod-nls-utf8=m' From 1cfbdc32f21823689ab4f15287e1afa65de31162 Mon Sep 17 00:00:00 2001 From: Sven Roederer Date: Wed, 4 Mar 2020 23:13:14 +0100 Subject: [PATCH 54/82] targets/generic_ffberlin: BATMAN_ADV_BLA depends on kmod-lib-crc16 even the whole batman-adv package is build as module it still depends on crc16. As batman-adv is only modulear the lib-crc16 is also modular, bit this fails on build. --- targets/generic_ffberlin | 1 + 1 file changed, 1 insertion(+) diff --git a/targets/generic_ffberlin b/targets/generic_ffberlin index 9f99c39aa9..0bc48a5f5e 100644 --- a/targets/generic_ffberlin +++ b/targets/generic_ffberlin @@ -13,6 +13,7 @@ config '# CONFIG_KERNEL_DEBUG_INFO is not set' config '# CONFIG_KERNEL_DEBUG_KERNEL is not set' config '# CONFIG_KERNEL_KALLSYMS is not set' config 'CONFIG_BATMAN_ADV_BLA=y' +config 'CONFIG_PACKAGE_kmod-lib-crc16=y' config 'CONFIG_BATMAN_ADV_DAT=y' config 'CONFIG_BATMAN_ADV_MCAST=y' config 'CONFIG_BUSYBOX_CUSTOM=y' From 2a445c9e6beef2c7ed827ff9169796c000abdf99 Mon Sep 17 00:00:00 2001 From: Sven Roederer Date: Wed, 4 Mar 2020 23:24:48 +0100 Subject: [PATCH 55/82] scrtips/target_config_lib: add new function devpkgs(dev) this moves the transformation of "dev.options.packages" and "site_packages(dev.image)" to a string ps packages from the main code. As the main-code gets a single string with all packages, it does not need to evaluate the pkg-sources again. --- scripts/target_config_lib.lua | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/scripts/target_config_lib.lua b/scripts/target_config_lib.lua index 52f6a44097..73e4ec15c8 100644 --- a/scripts/target_config_lib.lua +++ b/scripts/target_config_lib.lua @@ -65,9 +65,24 @@ END_MAKE end end + local function devpkgs(dev) + io.stderr:write(string.format("called target_config_lib.lua:devpkgs(%s)\n", dev.name)) + local device_pkgs = default_pkgs + + for _, pkg in ipairs(dev.options.packages or {}) do + device_pkgs = device_pkgs .. ' ' .. pkg + end + for pkg in string.gmatch(site_packages(dev.image), '%S+') do + device_pkgs = device_pkgs .. ' ' .. pkg + end + +io.stderr:write(string.format("debug_a: %s\n", device_pkgs)) + return(device_pkgs) + end + for _, dev in ipairs(lib.devices) do local profile = dev.options.profile or dev.name - local device_pkgs = default_pkgs + local device_pkgs = devpkgs(dev) local function handle_pkg(pkg) if string.sub(pkg, 1, 1) ~= '-' then @@ -78,10 +93,7 @@ END_MAKE io.stderr:write("debug: in for _, dev in ipairs(lib.devices) for profile " .. profile .. "\n") - for _, pkg in ipairs(dev.options.packages or {}) do - handle_pkg(pkg) - end - for pkg in string.gmatch(site_packages(dev.image), '%S+') do + for pkg in string.gmatch(device_pkgs, '%S+') do handle_pkg(pkg) end From 2368233ab2ace85316b04d2a78a5f1692ab930c4 Mon Sep 17 00:00:00 2001 From: Sven Roederer Date: Wed, 4 Mar 2020 23:31:43 +0100 Subject: [PATCH 56/82] scripts/target_config_lib.lua: add new function get_pkglist() it returns a table with all boards of a target and a list of packages for each board. --- scripts/target_config_lib.lua | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/scripts/target_config_lib.lua b/scripts/target_config_lib.lua index 73e4ec15c8..eae5eb0566 100644 --- a/scripts/target_config_lib.lua +++ b/scripts/target_config_lib.lua @@ -114,5 +114,20 @@ io.stderr:write(string.format("debug_a: %s\n", device_pkgs)) funcs.config_package(lib.config_m, pkg, "m") end + function get_pkglist() + local adevice_pkgs = {} + io.stderr:write(string.format("called target_config_lib.lua:get_pkglist()\n")) + for _, dev in ipairs(lib.devices) do + local profile = dev.options.profile or dev.name + local pkgs = devpkgs(dev) + io.stderr:write(string.format("get_pkglist().profile: %s\n", profile)) + io.stderr:write(string.format("get_pkglist().pkgs: %s\n", pkgs)) + table.insert(adevice_pkgs, {profile, pkgs}) + io.stderr:write(string.format("get_pkglist().length: %i\n", #adevice_pkgs)) + end + io.stderr:write(string.format("get_pkglist().length_final: %i\n", #adevice_pkgs)) + return adevice_pkgs + end + return lib end From fd3ebf2a65af8d447f93202880de70403649225a Mon Sep 17 00:00:00 2001 From: Sven Roederer Date: Wed, 4 Mar 2020 23:37:20 +0100 Subject: [PATCH 57/82] scripts/target_config_lib.lua: improve debug --- scripts/target_config_lib.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/target_config_lib.lua b/scripts/target_config_lib.lua index eae5eb0566..9118614e91 100644 --- a/scripts/target_config_lib.lua +++ b/scripts/target_config_lib.lua @@ -84,6 +84,8 @@ io.stderr:write(string.format("debug_a: %s\n", device_pkgs)) local profile = dev.options.profile or dev.name local device_pkgs = devpkgs(dev) +io.stderr:write(string.format("debug: %s\n", device_pkgs)) + local function handle_pkg(pkg) if string.sub(pkg, 1, 1) ~= '-' then funcs.config_package(lib.config, pkg, 'm') @@ -103,8 +105,6 @@ io.stderr:write(string.format("debug_a: %s\n", device_pkgs)) lib.config('CONFIG_TARGET_DEVICE_PACKAGES_%s_DEVICE_%s="%s"', openwrt_config_target, profile, device_pkgs) end - io.stderr:write(string.format('setting profile: %s="%s"\n', - profile, device_pkgs)) end From 6dba8c36c95fb60b6492215510b92757d0317e82 Mon Sep 17 00:00:00 2001 From: Sven Roederer Date: Wed, 4 Mar 2020 23:40:08 +0100 Subject: [PATCH 58/82] scripts: add new script target_config_profile.lua MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit this script creates a file $GLUON_TMPDIR/§TARGET with following syntax: > board1: "packages" > board2: "packages" > ... this list can be used to build the final images with the imagebuilder --- scripts/target_config_profile.lua | 38 +++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100755 scripts/target_config_profile.lua diff --git a/scripts/target_config_profile.lua b/scripts/target_config_profile.lua new file mode 100755 index 0000000000..2b70857923 --- /dev/null +++ b/scripts/target_config_profile.lua @@ -0,0 +1,38 @@ +local funcs = {} + +function funcs.config_message(config, _, ...) +-- config(...) +end + +function funcs.config_package(config, pkg, value) +-- config('CONFIG_PACKAGE_%s=%s', pkg, value) +end + +local lib = dofile('scripts/target_config_lib.lua')(funcs) + + +local output = {} + +--for _,dev in pairs(lib.devices) do +-- io.stderr:write(string.format("target_config_profile.lua:device# %s\n", dev.name)) +-- table.insert(output, get_pkglist(dev)) +-- output[dev.name] = get_pkglist(dev) +--end +output = get_pkglist() +--table.sort(output) + +--io.stderr:write(string.format("target_config_profile.lua:final# %s\n", dev.name)) + pkglist = io.open(string.format("%s/%s-%s.packages", lib.env.GLUON_TMPDIR, lib.env.BOARD, lib.env.SUBTARGET), "w") +for _, dev in ipairs(output) do +-- io.stderr:write(string.format("target_config_profile.lua:final# %s\n", dev[1])) +-- for board, pkglist in pairs(dev) do +-- print('\t', board, pkglist) +-- end + io.stderr:write(string.format("target_config_profile.lua:final# device: '%s'; pkgs: '%s’\n", dev[1], dev[2])) +-- pkglist = io.open(string.format("%s/%s.packages", lib.env.GLUON_TMPDIR, dev[1]), "w") + pkglist:write(string.format("%s:%s\n", dev [1], dev[2])) + +end + pkglist:close() + + From 668914ddc9a62711962a802d1f9ebc3482cb9e1c Mon Sep 17 00:00:00 2001 From: Sven Roederer Date: Wed, 4 Mar 2020 23:42:38 +0100 Subject: [PATCH 59/82] Makefile: [gluon] add new target gluon-profiles this target uses teh new script "target_config_profile.lua" to generate the packages-list of a TARGET --- Makefile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Makefile b/Makefile index 71f1c26a54..4f0caf941e 100644 --- a/Makefile +++ b/Makefile @@ -138,6 +138,11 @@ gluon-config: $(LUA) .stamp-feeds-updated $(OPENWRT_DIR)/dl gluon-compile: gluon-config +@$(OPENWRTMAKE) +gluon-profiles: $(LUA) .stamp-feeds-updated + @$(CheckExternal) + @$(GLUON_CONFIG_VARS) FOREIGN_BUILD=ffberlin \ + $(LUA) scripts/target_config_profile.lua '$(GLUON_TARGET)' '$(GLUON_PACKAGES) luci-app-ffwizard-berlin' + ## Gluon - End # clean up openwrt working copy From 651118db03bce9d33e92ad2113c32876d7be27fb Mon Sep 17 00:00:00 2001 From: Sven Roederer Date: Tue, 29 Oct 2019 23:38:29 +0100 Subject: [PATCH 60/82] assemble_firmware.sh: adapt to new packagelist * individual package-list per board * new location of package-list --- .../assemble_firmware.sh | 52 ++++--------------- 1 file changed, 11 insertions(+), 41 deletions(-) rename assemble_firmware.sh => scripts/assemble_firmware.sh (71%) diff --git a/assemble_firmware.sh b/scripts/assemble_firmware.sh similarity index 71% rename from assemble_firmware.sh rename to scripts/assemble_firmware.sh index 105eec49da..9d37909147 100755 --- a/assemble_firmware.sh +++ b/scripts/assemble_firmware.sh @@ -61,20 +61,18 @@ parse_pkg_list_file() { usage() { echo " -$0 -i -p +$0 -i -b -d enable debug -i path to the image builder file --p profiles to build for. seperate multiple profiles by a space +-b board-list of openwrt-target -t destination directory where to save the files --l (optional) directory to the package lists -n (optional) path to a temp directory --u usecase. seperate multiple usecases by a space -e (optional) directory of files to directtly include into image " } -while getopts "di:l:n:p:t:u:e:" option; do +while getopts "di:n:b:t:e:" option; do case "$option" in d) DEBUG=y @@ -85,21 +83,15 @@ while getopts "di:l:n:p:t:u:e:" option; do e) MBED_DIR="$OPTARG" ;; - p) - PROFILES="$OPTARG" - ;; t) DEST_DIR="$OPTARG" ;; - l) - PKGLIST_DIR="$OPTARG" + b) + BOARDLIST="$OPTARG" ;; n) TEMP_DIR="$OPTARG" ;; - u) - USECASES="$OPTARG" - ;; *) echo "Invalid argument '-$OPTARG'." usage @@ -118,12 +110,7 @@ if [ -z "$TEMP_DIR" ] ; then TEMP_DIR=$(mktemp -d imgXXXXXX) fi -if [ -z "$USECASES" ] ; then - error "No usecase(s) given" - exit 1 -fi - -if [ -z "$PROFILES" ] ; then +if [ -z "$BOARDLIST" ] ; then error "No profile(s) given" exit 1 fi @@ -135,39 +122,22 @@ trap signal_handler 0 1 2 3 15 DEST_DIR=$(to_absolute_path "$DEST_DIR") info $DEST_DIR +PROFILES=$(cat ${BOARDLIST} | cut -d : -f 1) +info "generating images for this boards: $(echo $PROFILES)" + info "Extract image builder $IB_FILE" tar xf "$IB_FILE" --strip-components=1 -C "$TEMP_DIR" for profile in $PROFILES ; do info "Building a profile for $profile" - # profiles can have a suffix. like 4mb devices get a smaller package list pro use case - # UBNT:4MB -> profile "UBNT" suffix "4MB" - suffix="$(echo $profile | cut -d':' -f 2)" - profile="$(echo $profile | cut -d':' -f 1)" - + USECASES=default for usecase in $USECASES ; do package_list="" packages="" img_params="" - # check if packagelist with suffix exist - if [ -e "${PKGLIST_DIR}/${usecase}_${suffix}.txt" ] ; then - package_list="${usecase}_${suffix}" - else - package_list="${usecase}" - fi - - if [ -e "${PKGLIST_DIR}/${package_list}.txt" ]; then - info "Building usecase $usecase" - else - error "usecase $usecase not defined" - exit 1 - fi - - info "Using package list $package_list" - - packages=$(parse_pkg_list_file "${PKGLIST_DIR}/${package_list}.txt") + packages="$(grep ${profile} ${BOARDLIST} | cut -d : -f 2)" if [ -z "${packages}" ] ; then info "skipping this usecase, as package list is empty" From 11bc4b85117679734186ff31273e1f8c9bdaa691 Mon Sep 17 00:00:00 2001 From: Sven Roederer Date: Thu, 5 Mar 2020 00:18:18 +0100 Subject: [PATCH 61/82] Makefile: [gluon] add new target gluon-images this uses the imagebuilder --- Makefile | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 4f0caf941e..51dd18e81c 100644 --- a/Makefile +++ b/Makefile @@ -138,11 +138,19 @@ gluon-config: $(LUA) .stamp-feeds-updated $(OPENWRT_DIR)/dl gluon-compile: gluon-config +@$(OPENWRTMAKE) -gluon-profiles: $(LUA) .stamp-feeds-updated +gluon-profiles: $(GLUON_TMPDIR)/$(GLUON_TARGET).packages +$(GLUON_TMPDIR)/$(GLUON_TARGET).packages: $(LUA) .stamp-feeds-updated @$(CheckExternal) @$(GLUON_CONFIG_VARS) FOREIGN_BUILD=ffberlin \ $(LUA) scripts/target_config_profile.lua '$(GLUON_TARGET)' '$(GLUON_PACKAGES) luci-app-ffwizard-berlin' +gluon-images: $(GLUON_TMPDIR)/$(GLUON_TARGET).packages +# taken from original images target + $(eval IB_FILE := $(shell ls -tr $(OPENWRT_DIR)/bin/targets/$(MAINTARGET)/$(SUBTARGET)/*-imagebuilder-*.tar.xz | tail -n1)) + mkdir -p $(FW_TARGET_DIR) + ./scripts/assemble_firmware.sh -b "$(GLUON_TMPDIR)/$(GLUON_TARGET).packages" -i $(IB_FILE) \ + -e $(FW_DIR)/embedded-files -t $(FW_TARGET_DIR) + ## Gluon - End # clean up openwrt working copy From a16fbfb468e7cdd2bf0e491ff40e6a379542efb2 Mon Sep 17 00:00:00 2001 From: Sven Roederer Date: Thu, 5 Mar 2020 00:26:09 +0100 Subject: [PATCH 62/82] remove unneeded "configs", "profiles" and "image-types" this is not needed after switching to gluon-based buildframework --- configs/ar71xx-generic.config | 10 - configs/ar71xx-mikrotik.config | 7 - configs/ar71xx-tiny.config | 3 - configs/ath79-generic.config | 10 - configs/ath79-tiny.config | 4 - configs/brcm2708-bcm2708.config | 15 -- configs/brcm2708-bcm2710.config | 13 - configs/common-autobuild.config | 2 - configs/common.config | 222 ------------------ configs/ipq40xx-generic.config | 3 - configs/ipq806x-generic.config | 3 - configs/lantiq-xrx200.config | 6 - configs/mpc85xx-generic.config | 3 - configs/mvebu-cortexa9.config | 9 - configs/ramips-mt7620.config | 4 - configs/ramips-mt7621.config | 3 - configs/ramips-mt76x8.config | 4 - configs/x86-generic.config | 12 - imagetypes/manual.txt | 76 ------ imagetypes/manual_4MB.sh | 8 - imagetypes/manual_4MB.txt | 3 - imagetypes/mesh_4MB.txt | 42 ---- imagetypes/notunnel.txt | 86 ------- imagetypes/notunnel_4MB.sh | 63 ----- imagetypes/notunnel_4MB.txt | 3 - imagetypes/tunnel-berlin-openvpn.txt | 91 ------- imagetypes/tunnel-berlin-openvpn_4MB.sh | 63 ----- imagetypes/tunnel-berlin-openvpn_4MB.txt | 3 - imagetypes/tunnel-berlin-tunneldigger.txt | 86 ------- imagetypes/tunnel-berlin-tunneldigger_4MB.sh | 63 ----- imagetypes/tunnel-berlin-tunneldigger_4MB.txt | 3 - profiles/ar71xx-generic.profiles | 49 ---- profiles/ar71xx-mikrotik.profiles | 1 - profiles/ar71xx-tiny.profiles | 27 --- profiles/ath79-generic.profiles | 12 - profiles/ath79-tiny.profiles | 1 - profiles/brcm2708-bcm2708.profiles | 1 - profiles/brcm2708-bcm2710.profiles | 1 - profiles/ipq40xx-generic.profiles | 3 - profiles/ipq806x-generic.profiles | 1 - profiles/lantiq-xrx200.profiles | 5 - profiles/mpc85xx-generic.profiles | 1 - profiles/mvebu-cortexa9.profiles | 6 - profiles/ramips-mt7620.profiles | 10 - profiles/ramips-mt7621.profiles | 5 - profiles/ramips-mt76x8.profiles | 7 - profiles/x86-generic.profiles | 1 - 47 files changed, 1054 deletions(-) delete mode 100644 configs/ar71xx-generic.config delete mode 100644 configs/ar71xx-mikrotik.config delete mode 100644 configs/ar71xx-tiny.config delete mode 100644 configs/ath79-generic.config delete mode 100644 configs/ath79-tiny.config delete mode 100644 configs/brcm2708-bcm2708.config delete mode 100644 configs/brcm2708-bcm2710.config delete mode 100644 configs/common-autobuild.config delete mode 100644 configs/common.config delete mode 100644 configs/ipq40xx-generic.config delete mode 100644 configs/ipq806x-generic.config delete mode 100644 configs/lantiq-xrx200.config delete mode 100644 configs/mpc85xx-generic.config delete mode 100644 configs/mvebu-cortexa9.config delete mode 100644 configs/ramips-mt7620.config delete mode 100644 configs/ramips-mt7621.config delete mode 100644 configs/ramips-mt76x8.config delete mode 100644 configs/x86-generic.config delete mode 100644 imagetypes/manual.txt delete mode 100644 imagetypes/manual_4MB.sh delete mode 100644 imagetypes/manual_4MB.txt delete mode 100644 imagetypes/mesh_4MB.txt delete mode 100644 imagetypes/notunnel.txt delete mode 100644 imagetypes/notunnel_4MB.sh delete mode 100644 imagetypes/notunnel_4MB.txt delete mode 100644 imagetypes/tunnel-berlin-openvpn.txt delete mode 100644 imagetypes/tunnel-berlin-openvpn_4MB.sh delete mode 100644 imagetypes/tunnel-berlin-openvpn_4MB.txt delete mode 100644 imagetypes/tunnel-berlin-tunneldigger.txt delete mode 100644 imagetypes/tunnel-berlin-tunneldigger_4MB.sh delete mode 100644 imagetypes/tunnel-berlin-tunneldigger_4MB.txt delete mode 100644 profiles/ar71xx-generic.profiles delete mode 100644 profiles/ar71xx-mikrotik.profiles delete mode 100644 profiles/ar71xx-tiny.profiles delete mode 100644 profiles/ath79-generic.profiles delete mode 100644 profiles/ath79-tiny.profiles delete mode 100644 profiles/brcm2708-bcm2708.profiles delete mode 100644 profiles/brcm2708-bcm2710.profiles delete mode 100644 profiles/ipq40xx-generic.profiles delete mode 100644 profiles/ipq806x-generic.profiles delete mode 100644 profiles/lantiq-xrx200.profiles delete mode 100644 profiles/mpc85xx-generic.profiles delete mode 100644 profiles/mvebu-cortexa9.profiles delete mode 100644 profiles/ramips-mt7620.profiles delete mode 100644 profiles/ramips-mt7621.profiles delete mode 100644 profiles/ramips-mt76x8.profiles delete mode 100644 profiles/x86-generic.profiles diff --git a/configs/ar71xx-generic.config b/configs/ar71xx-generic.config deleted file mode 100644 index f1ec1f3714..0000000000 --- a/configs/ar71xx-generic.config +++ /dev/null @@ -1,10 +0,0 @@ -CONFIG_TARGET_ar71xx=y -CONFIG_TARGET_ar71xx_generic=y -CONFIG_PACKAGE_kmod-ath9k-htc=m -CONFIG_PACKAGE_kmod-ath10k=m -CONFIG_PACKAGE_kmod-ath10k-ct=m -CONFIG_PACKAGE_ath10k-firmware-qca988x=m -CONFIG_PACKAGE_ath10k-firmware-qca988x-ct=m -CONFIG_PACKAGE_ath10k-firmware-qca9888=m -CONFIG_PACKAGE_ath10k-firmware-qca9888-ct=m -CONFIG_TARGET_SQUASHFS_BLOCK_SIZE=512 diff --git a/configs/ar71xx-mikrotik.config b/configs/ar71xx-mikrotik.config deleted file mode 100644 index 1758f7e5cd..0000000000 --- a/configs/ar71xx-mikrotik.config +++ /dev/null @@ -1,7 +0,0 @@ -CONFIG_TARGET_ar71xx=y -CONFIG_TARGET_ar71xx_mikrotik=y -CONFIG_PACKAGE_kmod-ath9k-htc=m -CONFIG_TARGET_INITRAMFS_COMPRESSION_LZMA=y -CONFIG_TARGET_ROOTFS_INITRAMFS=y -CONFIG_TARGET_ROOTFS_SQUASHFS=y -CONFIG_TARGET_SQUASHFS_BLOCK_SIZE=256 diff --git a/configs/ar71xx-tiny.config b/configs/ar71xx-tiny.config deleted file mode 100644 index 3df6e31ae1..0000000000 --- a/configs/ar71xx-tiny.config +++ /dev/null @@ -1,3 +0,0 @@ -CONFIG_TARGET_ar71xx=y -CONFIG_TARGET_ar71xx_tiny=y -CONFIG_TARGET_SQUASHFS_BLOCK_SIZE=512 diff --git a/configs/ath79-generic.config b/configs/ath79-generic.config deleted file mode 100644 index 0011ca65b7..0000000000 --- a/configs/ath79-generic.config +++ /dev/null @@ -1,10 +0,0 @@ -CONFIG_TARGET_ath79=y -CONFIG_TARGET_ath79_generic=y -CONFIG_TARGET_SQUASHFS_BLOCK_SIZE=512 -CONFIG_PACKAGE_ath10k-firmware-qca988x=m -CONFIG_PACKAGE_ath10k-firmware-qca988x-ct=m -CONFIG_PACKAGE_ath10k-firmware-qca9887-ct=m -CONFIG_PACKAGE_ath10k-firmware-qca9888-ct=m -CONFIG_PACKAGE_kmod-ath9k-htc=m -CONFIG_PACKAGE_kmod-ath10k=m -CONFIG_PACKAGE_kmod-ath10k-ct=m diff --git a/configs/ath79-tiny.config b/configs/ath79-tiny.config deleted file mode 100644 index 574a9e52ff..0000000000 --- a/configs/ath79-tiny.config +++ /dev/null @@ -1,4 +0,0 @@ -CONFIG_TARGET_ath79=y -CONFIG_TARGET_ath79_tiny=y -CONFIG_TARGET_SQUASHFS_BLOCK_SIZE=512 -CONFIG_PACKAGE_kmod-ath9k-htc=m diff --git a/configs/brcm2708-bcm2708.config b/configs/brcm2708-bcm2708.config deleted file mode 100644 index b2fdfc8b80..0000000000 --- a/configs/brcm2708-bcm2708.config +++ /dev/null @@ -1,15 +0,0 @@ -CONFIG_TARGET_brcm2708=y -CONFIG_TARGET_brcm2708_bcm2708=y -CONFIG_KERNEL_RELAY=y -CONFIG_PACKAGE_MAC80211_DEBUGFS=y -CONFIG_PACKAGE_MAC80211_MESH=y -CONFIG_PACKAGE_kmod-ath=y -CONFIG_PACKAGE_kmod-ath10k=y -CONFIG_PACKAGE_kmod-ath10k-ct=y -CONFIG_PACKAGE_kmod-ath5k=y -CONFIG_PACKAGE_kmod-ath9k=y -CONFIG_PACKAGE_kmod-ath9k-common=y -CONFIG_PACKAGE_kmod-ath9k-htc=y - - - diff --git a/configs/brcm2708-bcm2710.config b/configs/brcm2708-bcm2710.config deleted file mode 100644 index 7db9ccb7ff..0000000000 --- a/configs/brcm2708-bcm2710.config +++ /dev/null @@ -1,13 +0,0 @@ -CONFIG_TARGET_brcm2708=y -CONFIG_TARGET_brcm2708_bcm2710=y -CONFIG_KERNEL_RELAY=y -CONFIG_PACKAGE_MAC80211_DEBUGFS=y -CONFIG_PACKAGE_MAC80211_MESH=y -CONFIG_PACKAGE_kmod-ath=y -CONFIG_PACKAGE_kmod-ath10k=y -CONFIG_PACKAGE_kmod-ath10k-ct=y -CONFIG_PACKAGE_kmod-ath5k=y -CONFIG_PACKAGE_kmod-ath9k=y -CONFIG_PACKAGE_kmod-ath9k-common=y -CONFIG_PACKAGE_kmod-ath9k-htc=y -# CONFIG_STRIP_KERNEL_EXPORTS is not set diff --git a/configs/common-autobuild.config b/configs/common-autobuild.config deleted file mode 100644 index 631c25afae..0000000000 --- a/configs/common-autobuild.config +++ /dev/null @@ -1,2 +0,0 @@ -CONFIG_AUTOREMOVE=y -CONFIG_VERSION_REPO="http://buildbot.berlin.freifunk.net/buildbot/stable/%V/%T/packages" diff --git a/configs/common.config b/configs/common.config deleted file mode 100644 index c55cb6fe4b..0000000000 --- a/configs/common.config +++ /dev/null @@ -1,222 +0,0 @@ -CONFIG_DEVEL=y -CONFIG_TOOLCHAINOPTS=y -CONFIG_ALFRED_NEEDS_lua=y -CONFIG_ATH_USER_REGD=y -CONFIG_IB=y -CONFIG_IMAGEOPT=y -CONFIG_TARGET_MULTI_PROFILE=y -CONFIG_TARGET_ALL_PROFILES=y -# CONFIG_KERNEL_DEBUG_INFO is not set -# CONFIG_KERNEL_DEBUG_KERNEL is not set -# CONFIG_KERNEL_KALLSYMS is not set -CONFIG_ALL_KMODS=y -CONFIG_KMOD_BATMAN_ADV_BLA=y -CONFIG_KMOD_BATMAN_ADV_DAT=y -CONFIG_KMOD_BATMAN_ADV_MCAST=y -CONFIG_BUSYBOX_CUSTOM=y -# CONFIG_BUSYBOX_CONFIG_MKSWAP is not set -# CONFIG_BUSYBOX_CONFIG_SWAPOFF is not set -# CONFIG_BUSYBOX_CONFIG_SWAPON is not set -CONFIG_BUSYBOX_CONFIG_TELNET=y -CONFIG_BUSYBOX_CONFIG_FEATURE_TELNET_TTYPE=y -CONFIG_BUSYBOX_CONFIG_FEATURE_TRACEROUTE_USE_ICMP=y -CONFIG_PACKAGE_6in4=m -CONFIG_PACKAGE_ALFRED_BATHOSTS=y -CONFIG_PACKAGE_ALFRED_VIS=y -CONFIG_PACKAGE_ATH_DFS=y -CONFIG_PACKAGE_alfred=m -CONFIG_PACKAGE_babeld=m -CONFIG_PACKAGE_batctl-default=m -CONFIG_PACKAGE_batctl-tiny=m -CONFIG_PACKAGE_bmx6=m -CONFIG_PACKAGE_bmx6-json=m -CONFIG_PACKAGE_bmx6-sms=m -CONFIG_PACKAGE_bmx6-table=m -CONFIG_PACKAGE_bmx6-uci-config=m -CONFIG_PACKAGE_bmx7=m -CONFIG_PACKAGE_bmx7-iwinfo=m -CONFIG_PACKAGE_bmx7-json=m -CONFIG_PACKAGE_bmx7-sms=m -CONFIG_PACKAGE_bmx7-table=m -CONFIG_PACKAGE_bmx7-topology=m -CONFIG_PACKAGE_bmx7-tun=m -CONFIG_PACKAGE_bmx7-uci-config=m -CONFIG_PACKAGE_collectd=m -CONFIG_PACKAGE_collectd-mod-conntrack=m -CONFIG_PACKAGE_collectd-mod-cpu=m -CONFIG_PACKAGE_collectd-mod-exec=m -CONFIG_PACKAGE_collectd-mod-interface=m -CONFIG_PACKAGE_collectd-mod-irq=m -CONFIG_PACKAGE_collectd-mod-iwinfo=m -CONFIG_PACKAGE_collectd-mod-load=m -CONFIG_PACKAGE_collectd-mod-memory=m -CONFIG_PACKAGE_collectd-mod-network=m -CONFIG_PACKAGE_collectd-mod-olsrd=m -CONFIG_PACKAGE_collectd-mod-ping=m -CONFIG_PACKAGE_collectd-mod-routeros=m -CONFIG_PACKAGE_collectd-mod-rrdtool=m -CONFIG_PACKAGE_collectd-mod-snmp=m -CONFIG_PACKAGE_collectd-mod-uptime=m -CONFIG_PACKAGE_collectd-mod-wireless=m -CONFIG_PACKAGE_collectd-dnsmasq-addon=m -CONFIG_PACKAGE_collectd-snmp-templates=m -CONFIG_PACKAGE_comgt=m -CONFIG_PACKAGE_community-profiles=m -CONFIG_PACKAGE_diffutils=m -CONFIG_PACKAGE_ethtool=m -CONFIG_PACKAGE_firewall=m -CONFIG_PACKAGE_freifunk-berlin-bbbdigger=m -CONFIG_PACKAGE_freifunk-berlin-configtools=m -CONFIG_PACKAGE_freifunk-berlin-dhcp-defaults=m -CONFIG_PACKAGE_freifunk-berlin-firewall-defaults=m -CONFIG_PACKAGE_freifunk-berlin-freifunk-defaults=m -CONFIG_PACKAGE_freifunk-berlin-lib-guard=m -CONFIG_PACKAGE_freifunk-berlin-migration=m -CONFIG_PACKAGE_freifunk-berlin-network-defaults=m -CONFIG_PACKAGE_freifunk-berlin-olsrd-defaults=m -CONFIG_PACKAGE_freifunk-berlin-openvpn-files=m -CONFIG_PACKAGE_freifunk-berlin-system-defaults=m -CONFIG_PACKAGE_freifunk-berlin-statistics-defaults=m -CONFIG_PACKAGE_freifunk-berlin-tunneldigger=m -CONFIG_PACKAGE_freifunk-berlin-uhttpd-defaults=m -CONFIG_PACKAGE_freifunk-berlin-uplink-notunnel-files=m -CONFIG_PACKAGE_freifunk-berlin-uplink-tunnelberlin-openvpn=m -CONFIG_PACKAGE_freifunk-berlin-uplink-tunnelberlin-tunneldigger=m -CONFIG_PACKAGE_freifunk-common=m -CONFIG_PACKAGE_freifunk-firewall=m -CONFIG_PACKAGE_freifunk-gwcheck=m -CONFIG_PACKAGE_freifunk-policyrouting=m -CONFIG_PACKAGE_horst=m -CONFIG_PACKAGE_huaweiaktbbo=m -CONFIG_PACKAGE_ip=m -CONFIG_PACKAGE_iperf=m -CONFIG_PACKAGE_iperf3=m -CONFIG_PACKAGE_ipip=m -CONFIG_PACKAGE_iptables-mod-conntrack-extra=m -CONFIG_PACKAGE_iptables-mod-filter=m -CONFIG_PACKAGE_iptables-mod-ipopt=m -CONFIG_PACKAGE_iwinfo=m -CONFIG_PACKAGE_l3roamd=m -CONFIG_PACKAGE_libevent2=m -CONFIG_PACKAGE_libiwinfo=m -CONFIG_PACKAGE_libiwinfo-lua=m -CONFIG_PACKAGE_libltdl=m -CONFIG_PACKAGE_liblua=m -CONFIG_PACKAGE_liblzo=m -CONFIG_PACKAGE_libncurses=m -CONFIG_PACKAGE_liboping=m -CONFIG_PACKAGE_libpcap=m -CONFIG_PACKAGE_libpthread=m -CONFIG_PACKAGE_librrd1=m -CONFIG_PACKAGE_librt=m -CONFIG_PACKAGE_libubus-lua=m -CONFIG_PACKAGE_libuci-lua=m -CONFIG_PACKAGE_libustream-mbedtls=m -CONFIG_PACKAGE_lua=m -CONFIG_PACKAGE_luci-app-bmx6=m -CONFIG_PACKAGE_luci-app-bmx7=m -CONFIG_PACKAGE_luci-app-ffwizard-berlin=m -CONFIG_PACKAGE_luci-app-firewall=m -CONFIG_PACKAGE_luci-app-opkg=m -CONFIG_PACKAGE_luci-app-olsr=m -CONFIG_PACKAGE_luci-app-olsr-services=m -CONFIG_PACKAGE_luci-app-olsr-viz=m -CONFIG_PACKAGE_luci-app-openvpn=m -CONFIG_PACKAGE_luci-app-owm=m -CONFIG_PACKAGE_luci-app-owm-ant=m -CONFIG_PACKAGE_luci-app-owm-cmd=m -CONFIG_PACKAGE_luci-app-owm-gui=m -CONFIG_PACKAGE_luci-app-splash=m -CONFIG_PACKAGE_luci-app-statistics=m -CONFIG_PACKAGE_luci-app-wifischedule=m -CONFIG_PACKAGE_luci-app-vpnbypass=m -CONFIG_PACKAGE_luci-base=m -CONFIG_PACKAGE_luci-lib-httpclient=m -CONFIG_PACKAGE_luci-lib-json=m -CONFIG_PACKAGE_luci-lib-luaneightbl=m -CONFIG_PACKAGE_luci-lib-nixio=m -CONFIG_PACKAGE_luci-mod-admin-full=m -CONFIG_PACKAGE_luci-mod-failsafe=y -CONFIG_PACKAGE_luci-mod-freifunk-ui=m -CONFIG_PACKAGE_luci-proto-3g=m -CONFIG_PACKAGE_luci-proto-ipip=m -CONFIG_PACKAGE_luci-proto-ppp=m -CONFIG_PACKAGE_luci-theme-bootstrap=y -CONFIG_PACKAGE_mtr=m -CONFIG_PACKAGE_olsrd=m -CONFIG_PACKAGE_olsrd-mod-arprefresh=m -CONFIG_PACKAGE_olsrd-mod-dot-draw=m -CONFIG_PACKAGE_olsrd-mod-dyn-gw=m -CONFIG_PACKAGE_olsrd-mod-dyn-gw-plain=m -CONFIG_PACKAGE_olsrd-mod-jsoninfo=m -CONFIG_PACKAGE_olsrd-mod-nameservice=m -CONFIG_PACKAGE_olsrd-mod-netjson=m -CONFIG_PACKAGE_olsrd-mod-txtinfo=m -CONFIG_PACKAGE_olsrd-mod-watchdog=m -CONFIG_PACKAGE_om-watchdog=m -CONFIG_PACKAGE_opkg=m -CONFIG_PACKAGE_oonf-dlep-proxy=m -CONFIG_PACKAGE_oonf-dlep-radio=m -CONFIG_PACKAGE_oonf-olsrd2=m -CONFIG_PACKAGE_openvpn-mbedtls=m -CONFIG_PACKAGE_openvpn-openssl=m -CONFIG_PACKAGE_patch=m -CONFIG_PACKAGE_ppp=m -CONFIG_PACKAGE_ppp-mod-pppoe=m -CONFIG_PACKAGE_px5g-mbedtls=m -CONFIG_PACKAGE_qos-scripts=m -CONFIG_PACKAGE_rrdtool1=m -CONFIG_PACKAGE_rssileds=m -CONFIG_PACKAGE_simple-tc=m -CONFIG_PACKAGE_snmp-utils=m -CONFIG_PACKAGE_tc=m -CONFIG_PACKAGE_tcpdump=m -CONFIG_PACKAGE_tcpdump-mini=m -CONFIG_PACKAGE_terminfo=m -CONFIG_PACKAGE_tmux=m -CONFIG_PACKAGE_uclibcxx=m -CONFIG_PACKAGE_uhttpd=y -CONFIG_PACKAGE_uhttpd-mod-ubus=m -CONFIG_PACKAGE_usb-modeswitch=m -CONFIG_PACKAGE_usb-modeswitch-data=m -CONFIG_PACKAGE_usbutils=m -CONFIG_PACKAGE_vnstat=m -CONFIG_PACKAGE_wpad-basic=m -CONFIG_PACKAGE_zlib=m -CONFIG_PREINITOPT=y -CONFIG_SDK=y -CONFIG_STRIP_KERNEL_EXPORTS=y -CONFIG_TARGET_PREINIT_IP="192.168.42.1" -CONFIG_TARGET_PREINIT_NETMASK="255.255.255.0" -CONFIG_TARGET_PREINIT_BROADCAST="192.168.42.255" -CONFIG_VERSIONOPT=y -CONFIG_VERSION_FILENAMES=y -CONFIG_VERSION_CODE_FILENAMES=y -CONFIG_VERSION_DIST="Freifunk Berlin" -CONFIG_VERSION_HWREV="" -CONFIG_VERSION_MANUFACTURER="" -CONFIG_VERSION_NUMBER="Development" -CONFIG_VERSION_CODE="" -CONFIG_VERSION_PRODUCT="" -CONFIG_LUCI_SRCDIET=y -CONFIG_LUCI_LANG_de=m -CONFIG_LUCI_LANG_en=m -# CONFIG_KERNEL_SWAP is not set -# CONFIG_OPENVPN_mbedtls_ENABLE_LZ4 is not set -# CONFIG_OPENVPN_mbedtls_ENABLE_SERVER is not set -# CONFIG_OPENVPN_mbedtls_ENABLE_HTTP is not set -# CONFIG_OPENVPN_mbedtls_ENABLE_SOCKS is not set -# CONFIG_OPENVPN_mbedtls_ENABLE_FRAGMENT is not set -# CONFIG_OPENVPN_mbedtls_ENABLE_MULTIHOME is not set -# CONFIG_OPENVPN_mbedtls_ENABLE_PORT_SHARE is not set -# CONFIG_OPENVPN_mbedtls_ENABLE_DEF_AUTH is not set -# CONFIG_OPENVPN_mbedtls_ENABLE_PF is not set -# CONFIG_OPENVPN_openssl_ENABLE_LZ4 is not set -# CONFIG_OPENVPN_openssl_ENABLE_SERVER is not set -# CONFIG_OPENVPN_openssl_ENABLE_HTTP is not set -# CONFIG_OPENVPN_openssl_ENABLE_SOCKS is not set -# CONFIG_OPENVPN_openssl_ENABLE_FRAGMENT is not set -# CONFIG_OPENVPN_openssl_ENABLE_MULTIHOME is not set -# CONFIG_OPENVPN_openssl_ENABLE_PORT_SHARE is not set -# CONFIG_OPENVPN_openssl_ENABLE_DEF_AUTH is not set -# CONFIG_OPENVPN_openssl_ENABLE_PF is not set diff --git a/configs/ipq40xx-generic.config b/configs/ipq40xx-generic.config deleted file mode 100644 index 58f8bdd29b..0000000000 --- a/configs/ipq40xx-generic.config +++ /dev/null @@ -1,3 +0,0 @@ -CONFIG_TARGET_ipq40xx=y -CONFIG_TARGET_ipq40xx_generic=y -CONFIG_PACKAGE_kmod-ath10k-ct=m diff --git a/configs/ipq806x-generic.config b/configs/ipq806x-generic.config deleted file mode 100644 index 3b78324f30..0000000000 --- a/configs/ipq806x-generic.config +++ /dev/null @@ -1,3 +0,0 @@ -CONFIG_TARGET_ipq806x=y -CONFIG_TARGET_ipq806x_generic=y -CONFIG_PACKAGE_ath10k-firmware-qca9984=m diff --git a/configs/lantiq-xrx200.config b/configs/lantiq-xrx200.config deleted file mode 100644 index b9640b46ed..0000000000 --- a/configs/lantiq-xrx200.config +++ /dev/null @@ -1,6 +0,0 @@ -CONFIG_TARGET_lantiq=y -CONFIG_TARGET_lantiq_xrx200=y -CONFIG_PACKAGE_kmod-ath9k=m - - - diff --git a/configs/mpc85xx-generic.config b/configs/mpc85xx-generic.config deleted file mode 100644 index fa6b3adbc4..0000000000 --- a/configs/mpc85xx-generic.config +++ /dev/null @@ -1,3 +0,0 @@ -CONFIG_TARGET_mpc85xx=y -CONFIG_TARGET_mpc85xx_generic=y -CONFIG_PACKAGE_kmod-ath9k-htc=m diff --git a/configs/mvebu-cortexa9.config b/configs/mvebu-cortexa9.config deleted file mode 100644 index b62cef4ce9..0000000000 --- a/configs/mvebu-cortexa9.config +++ /dev/null @@ -1,9 +0,0 @@ -CONFIG_TARGET_mvebu=y -CONFIG_TARGET_mvebu_cortexa9=y -CONFIG_PACKAGE_kmod-ath9k=m -CONFIG_PACKAGE_kmod-ath10k=m -CONFIG_PACKAGE_kmod-ath10k-ct=m -CONFIG_PACKAGE_mwlwifi-firmware-88w8864=m -CONFIG_PACKAGE_mwlwifi-firmware-88w8964=m -CONFIG_PACKAGE_ath10k-firmware-qca988x=m -CONFIG_PACKAGE_ath10k-firmware-qca988x-ct=m diff --git a/configs/ramips-mt7620.config b/configs/ramips-mt7620.config deleted file mode 100644 index 983c7f8b5d..0000000000 --- a/configs/ramips-mt7620.config +++ /dev/null @@ -1,4 +0,0 @@ -CONFIG_TARGET_ramips=y -CONFIG_TARGET_ramips_mt7620=y -CONFIG_PACKAGE_kmod-ath9k-htc=m -CONFIG_TARGET_SQUASHFS_BLOCK_SIZE=512 diff --git a/configs/ramips-mt7621.config b/configs/ramips-mt7621.config deleted file mode 100644 index b7a6813db3..0000000000 --- a/configs/ramips-mt7621.config +++ /dev/null @@ -1,3 +0,0 @@ -CONFIG_TARGET_ramips=y -CONFIG_TARGET_ramips_mt7621=y -# CONFIG_PACKAGE_kmod-ath9k-htc is not set diff --git a/configs/ramips-mt76x8.config b/configs/ramips-mt76x8.config deleted file mode 100644 index f889b4e1e0..0000000000 --- a/configs/ramips-mt76x8.config +++ /dev/null @@ -1,4 +0,0 @@ -CONFIG_TARGET_ramips=y -CONFIG_TARGET_ramips_mt76x8=y -CONFIG_PACKAGE_kmod-ath9k-htc=m -CONFIG_TARGET_SQUASHFS_BLOCK_SIZE=512 diff --git a/configs/x86-generic.config b/configs/x86-generic.config deleted file mode 100644 index 12838386ab..0000000000 --- a/configs/x86-generic.config +++ /dev/null @@ -1,12 +0,0 @@ -CONFIG_TARGET_x86=y -CONFIG_TARGET_x86_generic=y -CONFIG_KERNEL_RELAY=y -CONFIG_PACKAGE_MAC80211_DEBUGFS=y -CONFIG_PACKAGE_MAC80211_MESH=y -CONFIG_PACKAGE_kmod-ath=m -CONFIG_PACKAGE_kmod-ath10k=m -CONFIG_PACKAGE_kmod-ath10k-ct=m -CONFIG_PACKAGE_kmod-ath5k=m -CONFIG_PACKAGE_kmod-ath9k=m -CONFIG_PACKAGE_kmod-ath9k-common=m -CONFIG_PACKAGE_kmod-ath9k-htc=m diff --git a/imagetypes/manual.txt b/imagetypes/manual.txt deleted file mode 100644 index 259a847e43..0000000000 --- a/imagetypes/manual.txt +++ /dev/null @@ -1,76 +0,0 @@ --ppp --ppp-mod-pppoe --wpad-mini -wpad-basic - -# Defaults -freifunk-berlin-dhcp-defaults -freifunk-berlin-freifunk-defaults -freifunk-berlin-network-defaults -freifunk-berlin-olsrd-defaults -freifunk-berlin-statistics-defaults -freifunk-berlin-system-defaults -freifunk-berlin-uhttpd-defaults - -# Common -dnsmasq - -# Utils -tcpdump -mtr -ip -iperf -tmux -vnstat -ethtool -iwinfo -libiwinfo-lua - -# GUI-basics -uhttpd -uhttpd-mod-ubus -px5g-mbedtls -libustream-mbedtls -luci-mod-freifunk-ui -luci-app-olsr -luci-app-olsr-services -luci-app-opkg -luci-app-owm -luci-app-owm-ant -luci-app-owm-cmd -luci-app-owm-gui -luci-theme-bootstrap -# GUI addon -luci-i18n-base-de -luci-i18n-base-en -luci-i18n-olsr-de -luci-i18n-olsr-en -luci-i18n-statistics-de -luci-i18n-statistics-en - -# OLSR -olsrd -olsrd-mod-arprefresh -olsrd-mod-dyn-gw -olsrd-mod-jsoninfo -olsrd-mod-txtinfo -olsrd-mod-nameservice -olsrd-mod-watchdog -kmod-ipip - -# BATMAN -kmod-batman-adv -alfred -batctl-default - -# Statistics -luci-app-statistics -collectd -collectd-mod-interface -collectd-mod-iwinfo -collectd-mod-network -collectd-mod-olsrd -collectd-mod-rrdtool -collectd-mod-ping -collectd-mod-uptime -collectd-mod-memory diff --git a/imagetypes/manual_4MB.sh b/imagetypes/manual_4MB.sh deleted file mode 100644 index 50810be6fc..0000000000 --- a/imagetypes/manual_4MB.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash - -# This is a custom postinst script that gets run by a (patched) -# ImageBuilder Makefile in the target root after installing OpenWrt -# packages, just before building the SquashFS image. - -echo "Deleting OLSR i18n files..." -rm -vf usr/lib/lua/luci/i18n/olsr.* diff --git a/imagetypes/manual_4MB.txt b/imagetypes/manual_4MB.txt deleted file mode 100644 index 0d31b17380..0000000000 --- a/imagetypes/manual_4MB.txt +++ /dev/null @@ -1,3 +0,0 @@ -# the images will be to large for 4MB flash -# probably the "mesh" image is an alternative -# diff --git a/imagetypes/mesh_4MB.txt b/imagetypes/mesh_4MB.txt deleted file mode 100644 index e64c8afe63..0000000000 --- a/imagetypes/mesh_4MB.txt +++ /dev/null @@ -1,42 +0,0 @@ --kmod-usb-core --kmod-usb2 --kmod-usb-ledtrig-usbport --kmod-usb-ohci --kmod-ppp --kmod-usb-serial --ppp --ppp-mod-pppoe --wpad -opkg --usign - -# Defaults -freifunk-berlin-dhcp-defaults -freifunk-berlin-freifunk-defaults -freifunk-berlin-migration -freifunk-berlin-network-defaults -freifunk-berlin-olsrd-defaults -freifunk-berlin-system-defaults -community-profiles -luci-app-owm-cmd - -# Common -dnsmasq --firewall --iptables --ip6tables -iwinfo -libiwinfo-lua - -# OLSR -olsrd -#olsrd-mod-arprefresh -olsrd-mod-dyn-gw -olsrd-mod-jsoninfo -olsrd-mod-nameservice -olsrd-mod-watchdog -kmod-ipip - -# BATMAN -kmod-batman-adv -batctl-tiny diff --git a/imagetypes/notunnel.txt b/imagetypes/notunnel.txt deleted file mode 100644 index 4858d32fa3..0000000000 --- a/imagetypes/notunnel.txt +++ /dev/null @@ -1,86 +0,0 @@ --ppp --ppp-mod-pppoe --wpad-mini -wpad-basic - -# Defaults -freifunk-berlin-dhcp-defaults -freifunk-berlin-firewall-defaults -freifunk-berlin-freifunk-defaults -freifunk-berlin-migration -freifunk-berlin-network-defaults -freifunk-berlin-olsrd-defaults -freifunk-berlin-statistics-defaults -freifunk-berlin-system-defaults -freifunk-berlin-uhttpd-defaults -community-profiles - -# Common -mtr -ip -iperf -tmux -vnstat -ethtool -dnsmasq -qos-scripts -firewall -iwinfo -libiwinfo-lua -tcpdump - -# GUI-basics -uhttpd -uhttpd-mod-ubus -px5g-mbedtls -libustream-mbedtls -luci-app-ffwizard-berlin -luci-mod-freifunk-ui -luci-app-olsr -luci-app-firewall -luci-app-olsr-services -luci-app-opkg -luci-app-owm -luci-app-owm-ant -luci-app-owm-cmd -luci-app-owm-gui -luci-theme-bootstrap -# GUI addon -luci-i18n-base-de -luci-i18n-base-en -luci-i18n-firewall-de -luci-i18n-firewall-en -luci-i18n-olsr-de -luci-i18n-olsr-en -luci-i18n-statistics-de -luci-i18n-statistics-en - -# OLSR -olsrd -olsrd-mod-arprefresh -olsrd-mod-dyn-gw -olsrd-mod-jsoninfo -olsrd-mod-txtinfo -olsrd-mod-nameservice -olsrd-mod-watchdog -kmod-ipip - -# BATMAN -kmod-batman-adv -alfred -batctl-default - -# Uplink -freifunk-berlin-uplink-notunnel-files - -# Statistics -luci-app-statistics -collectd -collectd-mod-interface -collectd-mod-iwinfo -collectd-mod-network -collectd-mod-olsrd -collectd-mod-rrdtool -collectd-mod-ping -collectd-mod-uptime -collectd-mod-memory diff --git a/imagetypes/notunnel_4MB.sh b/imagetypes/notunnel_4MB.sh deleted file mode 100644 index 72f355ec30..0000000000 --- a/imagetypes/notunnel_4MB.sh +++ /dev/null @@ -1,63 +0,0 @@ -#!/bin/bash - -# This is a custom postinst script that gets run by a (patched) -# ImageBuilder Makefile in the target root after installing OpenWrt -# packages, just before building the SquashFS image. - -echo "Deleting OLSR i18n files..." -rm -vf usr/lib/lua/luci/i18n/olsr.* - -# see https://github.com/freifunk-berlin/firmware/pull/341 & -# https://github.com/freifunk-berlin/firmware/issues/262 -cat > lib/upgrade/freiunk-berlin_no-opkg-info-on-4mb-workaround.sh <<'KEEPLIST' -# check for opkg-conffiles that have changed -# this is a workaround for removing opkg from the image and having something -# similar to "opkg list-changed-conffiles" - -add_opkg_fix_conffiles() -{ - local filelist="$1" - - # find the separator line (### opkg conffiles ###) and check all files listed there - # it's just the list of conffiles extracted from opkg-/status during image-creation - content_separator_line=`sed -n '/^### opkg conffiles ###/=' /lib/upgrade/freiunk-berlin_no-opkg-info-on-4mb-workaround.sh` - let content_separator_line++ - # iterate over all lines after "separator line" - tail -n +$content_separator_line /lib/upgrade/freiunk-berlin_no-opkg-info-on-4mb-workaround.sh | \ - while read filename; do - file_has_changed ${filename} && echo ${filename} >> $filelist - done -} - -file_has_changed() { - if cmp -s "$@" "/rom/$@"; then - return 1 - else - # modified - return 0 - fi -} - -sysupgrade_init_conffiles="$sysupgrade_init_conffiles add_opkg_fix_conffiles" - -# to exit before going down to the filelist -return 0 - -### opkg conffiles ### -KEEPLIST - -# this is run during firmware-image creation -# add all conffiles known to opkg -echo "adding opkg-conffiles to sysupgrade-hook" -for file in `cat usr/lib/opkg/info/*.conffiles`; do - grep ${file} usr/lib/opkg/status | awk '{ print $1 }' >>lib/upgrade/freiunk-berlin_no-opkg-info-on-4mb-workaround.sh -done - -echo "deleting opkg status-files ..." -rm -rf usr/lib/opkg -rm -rf etc/opkg* -# as this will be included into image for some reason, even it's -# not listed for inclusion -echo "manually removing usign ..." -rm usr/bin/usign -rm usr/bin/signify diff --git a/imagetypes/notunnel_4MB.txt b/imagetypes/notunnel_4MB.txt deleted file mode 100644 index 0d31b17380..0000000000 --- a/imagetypes/notunnel_4MB.txt +++ /dev/null @@ -1,3 +0,0 @@ -# the images will be to large for 4MB flash -# probably the "mesh" image is an alternative -# diff --git a/imagetypes/tunnel-berlin-openvpn.txt b/imagetypes/tunnel-berlin-openvpn.txt deleted file mode 100644 index bf2fb01865..0000000000 --- a/imagetypes/tunnel-berlin-openvpn.txt +++ /dev/null @@ -1,91 +0,0 @@ --ppp --ppp-mod-pppoe --wpad-mini -wpad-basic - -# Defaults -freifunk-berlin-dhcp-defaults -freifunk-berlin-firewall-defaults -freifunk-berlin-freifunk-defaults -freifunk-berlin-migration -freifunk-berlin-network-defaults -freifunk-berlin-olsrd-defaults -freifunk-berlin-statistics-defaults -freifunk-berlin-system-defaults -freifunk-berlin-uhttpd-defaults -community-profiles - -# Common -mtr -ip -iperf -tmux -vnstat -ethtool -dnsmasq -qos-scripts -firewall -iwinfo -libiwinfo-lua -tcpdump - -# GUI-basics -uhttpd -uhttpd-mod-ubus -px5g-mbedtls -libustream-mbedtls -luci-app-ffwizard-berlin -luci-mod-freifunk-ui -luci-app-olsr -luci-app-firewall -luci-app-olsr-services -luci-app-opkg -luci-app-owm -luci-app-owm-ant -luci-app-owm-cmd -luci-app-owm-gui -luci-theme-bootstrap -# GUI addon -luci-i18n-base-de -luci-i18n-base-en -luci-i18n-firewall-de -luci-i18n-firewall-en -luci-i18n-olsr-de -luci-i18n-olsr-en -luci-i18n-openvpn-de -luci-i18n-openvpn-en -luci-i18n-statistics-de -luci-i18n-statistics-en - -# OLSR -olsrd -olsrd-mod-arprefresh -olsrd-mod-dyn-gw -olsrd-mod-jsoninfo -olsrd-mod-txtinfo -olsrd-mod-nameservice -olsrd-mod-watchdog -kmod-ipip - -# BATMAN -kmod-batman-adv -alfred -batctl-default - -# Uplink -luci-app-openvpn -openvpn-mbedtls -freifunk-berlin-uplink-tunnelberlin-openvpn -luci-app-vpnbypass - -# Statistics -luci-app-statistics -collectd -collectd-mod-interface -collectd-mod-iwinfo -collectd-mod-network -collectd-mod-olsrd -collectd-mod-rrdtool -collectd-mod-ping -collectd-mod-uptime -collectd-mod-memory diff --git a/imagetypes/tunnel-berlin-openvpn_4MB.sh b/imagetypes/tunnel-berlin-openvpn_4MB.sh deleted file mode 100644 index 72f355ec30..0000000000 --- a/imagetypes/tunnel-berlin-openvpn_4MB.sh +++ /dev/null @@ -1,63 +0,0 @@ -#!/bin/bash - -# This is a custom postinst script that gets run by a (patched) -# ImageBuilder Makefile in the target root after installing OpenWrt -# packages, just before building the SquashFS image. - -echo "Deleting OLSR i18n files..." -rm -vf usr/lib/lua/luci/i18n/olsr.* - -# see https://github.com/freifunk-berlin/firmware/pull/341 & -# https://github.com/freifunk-berlin/firmware/issues/262 -cat > lib/upgrade/freiunk-berlin_no-opkg-info-on-4mb-workaround.sh <<'KEEPLIST' -# check for opkg-conffiles that have changed -# this is a workaround for removing opkg from the image and having something -# similar to "opkg list-changed-conffiles" - -add_opkg_fix_conffiles() -{ - local filelist="$1" - - # find the separator line (### opkg conffiles ###) and check all files listed there - # it's just the list of conffiles extracted from opkg-/status during image-creation - content_separator_line=`sed -n '/^### opkg conffiles ###/=' /lib/upgrade/freiunk-berlin_no-opkg-info-on-4mb-workaround.sh` - let content_separator_line++ - # iterate over all lines after "separator line" - tail -n +$content_separator_line /lib/upgrade/freiunk-berlin_no-opkg-info-on-4mb-workaround.sh | \ - while read filename; do - file_has_changed ${filename} && echo ${filename} >> $filelist - done -} - -file_has_changed() { - if cmp -s "$@" "/rom/$@"; then - return 1 - else - # modified - return 0 - fi -} - -sysupgrade_init_conffiles="$sysupgrade_init_conffiles add_opkg_fix_conffiles" - -# to exit before going down to the filelist -return 0 - -### opkg conffiles ### -KEEPLIST - -# this is run during firmware-image creation -# add all conffiles known to opkg -echo "adding opkg-conffiles to sysupgrade-hook" -for file in `cat usr/lib/opkg/info/*.conffiles`; do - grep ${file} usr/lib/opkg/status | awk '{ print $1 }' >>lib/upgrade/freiunk-berlin_no-opkg-info-on-4mb-workaround.sh -done - -echo "deleting opkg status-files ..." -rm -rf usr/lib/opkg -rm -rf etc/opkg* -# as this will be included into image for some reason, even it's -# not listed for inclusion -echo "manually removing usign ..." -rm usr/bin/usign -rm usr/bin/signify diff --git a/imagetypes/tunnel-berlin-openvpn_4MB.txt b/imagetypes/tunnel-berlin-openvpn_4MB.txt deleted file mode 100644 index a19eddcd87..0000000000 --- a/imagetypes/tunnel-berlin-openvpn_4MB.txt +++ /dev/null @@ -1,3 +0,0 @@ -# as of required OpenVPN the image will be to large for 4MB flash -# -# so disable 4MB ... diff --git a/imagetypes/tunnel-berlin-tunneldigger.txt b/imagetypes/tunnel-berlin-tunneldigger.txt deleted file mode 100644 index 42c2c0be93..0000000000 --- a/imagetypes/tunnel-berlin-tunneldigger.txt +++ /dev/null @@ -1,86 +0,0 @@ --ppp --ppp-mod-pppoe --wpad-mini -wpad-basic - -# Defaults -freifunk-berlin-dhcp-defaults -freifunk-berlin-firewall-defaults -freifunk-berlin-freifunk-defaults -freifunk-berlin-migration -freifunk-berlin-network-defaults -freifunk-berlin-olsrd-defaults -freifunk-berlin-statistics-defaults -freifunk-berlin-system-defaults -freifunk-berlin-uhttpd-defaults -community-profiles - -# Common -mtr -ip -iperf -tmux -vnstat -ethtool -dnsmasq -qos-scripts -firewall -iwinfo -libiwinfo-lua -tcpdump - -# GUI-basics -uhttpd -uhttpd-mod-ubus -px5g-mbedtls -libustream-mbedtls -luci-app-ffwizard-berlin -luci-mod-freifunk-ui -luci-app-olsr -luci-app-firewall -luci-app-olsr-services -luci-app-opkg -luci-app-owm -luci-app-owm-ant -luci-app-owm-cmd -luci-app-owm-gui -luci-theme-bootstrap -# GUI addon -luci-i18n-base-de -luci-i18n-base-en -luci-i18n-firewall-de -luci-i18n-firewall-en -luci-i18n-olsr-de -luci-i18n-olsr-en -luci-i18n-statistics-de -luci-i18n-statistics-en - -# OLSR -olsrd -olsrd-mod-arprefresh -olsrd-mod-dyn-gw -olsrd-mod-jsoninfo -olsrd-mod-txtinfo -olsrd-mod-nameservice -olsrd-mod-watchdog -kmod-ipip - -# BATMAN -kmod-batman-adv -alfred -batctl-default - -# Uplink -freifunk-berlin-uplink-tunnelberlin-tunneldigger - -# Statistics -luci-app-statistics -collectd -collectd-mod-interface -collectd-mod-iwinfo -collectd-mod-network -collectd-mod-olsrd -collectd-mod-rrdtool -collectd-mod-ping -collectd-mod-uptime -collectd-mod-memory diff --git a/imagetypes/tunnel-berlin-tunneldigger_4MB.sh b/imagetypes/tunnel-berlin-tunneldigger_4MB.sh deleted file mode 100644 index 72f355ec30..0000000000 --- a/imagetypes/tunnel-berlin-tunneldigger_4MB.sh +++ /dev/null @@ -1,63 +0,0 @@ -#!/bin/bash - -# This is a custom postinst script that gets run by a (patched) -# ImageBuilder Makefile in the target root after installing OpenWrt -# packages, just before building the SquashFS image. - -echo "Deleting OLSR i18n files..." -rm -vf usr/lib/lua/luci/i18n/olsr.* - -# see https://github.com/freifunk-berlin/firmware/pull/341 & -# https://github.com/freifunk-berlin/firmware/issues/262 -cat > lib/upgrade/freiunk-berlin_no-opkg-info-on-4mb-workaround.sh <<'KEEPLIST' -# check for opkg-conffiles that have changed -# this is a workaround for removing opkg from the image and having something -# similar to "opkg list-changed-conffiles" - -add_opkg_fix_conffiles() -{ - local filelist="$1" - - # find the separator line (### opkg conffiles ###) and check all files listed there - # it's just the list of conffiles extracted from opkg-/status during image-creation - content_separator_line=`sed -n '/^### opkg conffiles ###/=' /lib/upgrade/freiunk-berlin_no-opkg-info-on-4mb-workaround.sh` - let content_separator_line++ - # iterate over all lines after "separator line" - tail -n +$content_separator_line /lib/upgrade/freiunk-berlin_no-opkg-info-on-4mb-workaround.sh | \ - while read filename; do - file_has_changed ${filename} && echo ${filename} >> $filelist - done -} - -file_has_changed() { - if cmp -s "$@" "/rom/$@"; then - return 1 - else - # modified - return 0 - fi -} - -sysupgrade_init_conffiles="$sysupgrade_init_conffiles add_opkg_fix_conffiles" - -# to exit before going down to the filelist -return 0 - -### opkg conffiles ### -KEEPLIST - -# this is run during firmware-image creation -# add all conffiles known to opkg -echo "adding opkg-conffiles to sysupgrade-hook" -for file in `cat usr/lib/opkg/info/*.conffiles`; do - grep ${file} usr/lib/opkg/status | awk '{ print $1 }' >>lib/upgrade/freiunk-berlin_no-opkg-info-on-4mb-workaround.sh -done - -echo "deleting opkg status-files ..." -rm -rf usr/lib/opkg -rm -rf etc/opkg* -# as this will be included into image for some reason, even it's -# not listed for inclusion -echo "manually removing usign ..." -rm usr/bin/usign -rm usr/bin/signify diff --git a/imagetypes/tunnel-berlin-tunneldigger_4MB.txt b/imagetypes/tunnel-berlin-tunneldigger_4MB.txt deleted file mode 100644 index 0d31b17380..0000000000 --- a/imagetypes/tunnel-berlin-tunneldigger_4MB.txt +++ /dev/null @@ -1,3 +0,0 @@ -# the images will be to large for 4MB flash -# probably the "mesh" image is an alternative -# diff --git a/profiles/ar71xx-generic.profiles b/profiles/ar71xx-generic.profiles deleted file mode 100644 index 8e6c2f2a3c..0000000000 --- a/profiles/ar71xx-generic.profiles +++ /dev/null @@ -1,49 +0,0 @@ -archer-c7-v1 -archer-c7-v2 -archer-c5-v1 -cpe210-v2 -cpe210-220-v1 -cpe510-520-v1 -DIR505A1 -fritz450e -gl-ar150 -gl-ar300m -gl-inet-6408A-v1 -gl-inet-6416A-v1 -OM2P -OM5PAC -OM5P -tl-wdr3500-v1 -tl-wdr3600-v1 -tl-wdr4300-v1 -tl-wdr4310-v1 -tl-wr710n-v1 -tl-wr710n-v2.1 -tl-wr842n-v1 -tl-wr842n-v2 -tl-wr842n-v3 -tl-wr1043nd-v1 -tl-wr1043nd-v2 -tl-wr1043nd-v3 -tl-wr1043nd-v4 -ubnt-air-gateway -ubnt-air-gateway-pro -ubnt-airrouter -ubnt-bullet-m -ubnt-lbe-m5 -ubnt-ls-sr71 -ubnt-loco-m-xw -ubnt-nano-m-xw -ubnt-nano-m -ubnt-rocket-m-ti -ubnt-rocket-m-xw -ubnt-rocket-m -ubnt-rs -ubnt-rspro -ubnt-unifi -ubnt-unifiac-lite -ubnt-unifi-outdoor -WZRHPG300NH2 -WZRHPAG300H -WZR600DHP -WZRHPG450H diff --git a/profiles/ar71xx-mikrotik.profiles b/profiles/ar71xx-mikrotik.profiles deleted file mode 100644 index 697bb66f2c..0000000000 --- a/profiles/ar71xx-mikrotik.profiles +++ /dev/null @@ -1 +0,0 @@ -Default diff --git a/profiles/ar71xx-tiny.profiles b/profiles/ar71xx-tiny.profiles deleted file mode 100644 index 045d38159d..0000000000 --- a/profiles/ar71xx-tiny.profiles +++ /dev/null @@ -1,27 +0,0 @@ -tl-mr3020-v1:4MB -tl-mr3220-v1:4MB -tl-mr3220-v2:4MB -tl-wa801nd-v1:4MB -tl-wa801nd-v2:4MB -tl-wa801nd-v3:4MB -tl-wr703n-v1:4MB -tl-wr710n-v2:4MB -tl-wr740n-v1:4MB -tl-wr740n-v3:4MB -tl-wr740n-v4:4MB -tl-wr740n-v5:4MB -tl-wr740n-v6:4MB -tl-wr741nd-v1:4MB -tl-wr741nd-v2:4MB -tl-wr741nd-v4:4MB -tl-wr741nd-v5:4MB -tl-wr743nd-v1:4MB -tl-wr743nd-v2:4MB -tl-wr841-v1.5:4MB -tl-wr841-v3:4MB -tl-wr841-v5:4MB -tl-wr841-v7:4MB -tl-wr841-v8:4MB -tl-wr841-v9:4MB -tl-wr841-v10:4MB -tl-wr841-v11:4MB diff --git a/profiles/ath79-generic.profiles b/profiles/ath79-generic.profiles deleted file mode 100644 index 409995c787..0000000000 --- a/profiles/ath79-generic.profiles +++ /dev/null @@ -1,12 +0,0 @@ -avm_fritz300e -avm_fritz4020 -glinet_gl-ar300m-lite -tplink_archer-c59-v1 -tplink_archer-c7-v4 -tplink_archer-c7-v5 -tplink_tl-wr1043n-v5 -ubnt_bullet-m-xw -ubnt_nanostation-loco-m -ubnt_picostation-m -ubnt_unifiac-mesh -ubnt_unifiac-pro diff --git a/profiles/ath79-tiny.profiles b/profiles/ath79-tiny.profiles deleted file mode 100644 index df13f9e07a..0000000000 --- a/profiles/ath79-tiny.profiles +++ /dev/null @@ -1 +0,0 @@ -# empty list, till ar71xx-tiny will be switched to ath79 target diff --git a/profiles/brcm2708-bcm2708.profiles b/profiles/brcm2708-bcm2708.profiles deleted file mode 100644 index 61aaae3538..0000000000 --- a/profiles/brcm2708-bcm2708.profiles +++ /dev/null @@ -1 +0,0 @@ -rpi diff --git a/profiles/brcm2708-bcm2710.profiles b/profiles/brcm2708-bcm2710.profiles deleted file mode 100644 index 3036895dc6..0000000000 --- a/profiles/brcm2708-bcm2710.profiles +++ /dev/null @@ -1 +0,0 @@ -rpi-3 diff --git a/profiles/ipq40xx-generic.profiles b/profiles/ipq40xx-generic.profiles deleted file mode 100644 index ef9b28eff2..0000000000 --- a/profiles/ipq40xx-generic.profiles +++ /dev/null @@ -1,3 +0,0 @@ -avm_fritzbox-4040 -glinet_gl-b1300 -netgear_ex6150v2 diff --git a/profiles/ipq806x-generic.profiles b/profiles/ipq806x-generic.profiles deleted file mode 100644 index c23d6e912e..0000000000 --- a/profiles/ipq806x-generic.profiles +++ /dev/null @@ -1 +0,0 @@ -netgear_r7800 diff --git a/profiles/lantiq-xrx200.profiles b/profiles/lantiq-xrx200.profiles deleted file mode 100644 index c00f842eb3..0000000000 --- a/profiles/lantiq-xrx200.profiles +++ /dev/null @@ -1,5 +0,0 @@ -avm_fritz7360sl - - - - diff --git a/profiles/mpc85xx-generic.profiles b/profiles/mpc85xx-generic.profiles deleted file mode 100644 index 18cdccf8f9..0000000000 --- a/profiles/mpc85xx-generic.profiles +++ /dev/null @@ -1 +0,0 @@ -tl-wdr4900-v1 diff --git a/profiles/mvebu-cortexa9.profiles b/profiles/mvebu-cortexa9.profiles deleted file mode 100644 index 902d5dcb76..0000000000 --- a/profiles/mvebu-cortexa9.profiles +++ /dev/null @@ -1,6 +0,0 @@ -linksys_wrt1200ac -linksys_wrt1900ac -linksys_wrt1900acs -linksys_wrt1900acv2 -linksys_wrt3200acm -cznic_turris-omnia diff --git a/profiles/ramips-mt7620.profiles b/profiles/ramips-mt7620.profiles deleted file mode 100644 index c69d57a958..0000000000 --- a/profiles/ramips-mt7620.profiles +++ /dev/null @@ -1,10 +0,0 @@ -ai-br100 -ArcherC50v1 -e1700 -gl-mt300a -gl-mt300n -mt7620a -microwrt -miwifi-mini -tplink_c2-v1 -wt3020-8M diff --git a/profiles/ramips-mt7621.profiles b/profiles/ramips-mt7621.profiles deleted file mode 100644 index feedaacc34..0000000000 --- a/profiles/ramips-mt7621.profiles +++ /dev/null @@ -1,5 +0,0 @@ -ew1200 -mikrotik_rb750gr3 -ubnt-erx -ubnt-erx-sfp -xiaomi_mir3g diff --git a/profiles/ramips-mt76x8.profiles b/profiles/ramips-mt76x8.profiles deleted file mode 100644 index f437833461..0000000000 --- a/profiles/ramips-mt76x8.profiles +++ /dev/null @@ -1,7 +0,0 @@ -gl-mt300n-v2 -miwifi-nano -netgear_r6120 -tl-wr841n-v13 -tplink_tl-wr842n-v5 -tplink_c50-v3 -tplink_c50-v4 diff --git a/profiles/x86-generic.profiles b/profiles/x86-generic.profiles deleted file mode 100644 index 8470d61195..0000000000 --- a/profiles/x86-generic.profiles +++ /dev/null @@ -1 +0,0 @@ -Generic From 020713e8c5be348d45bb20830b6b900482bcc9be Mon Sep 17 00:00:00 2001 From: Sven Roederer Date: Thu, 5 Mar 2020 00:34:02 +0100 Subject: [PATCH 63/82] Makefile: adapt tests for valid target --- Makefile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 51dd18e81c..a09f1f2c09 100644 --- a/Makefile +++ b/Makefile @@ -28,7 +28,7 @@ $(info special actions apply to builds on this host ...) endif # test for existing $TARGET-config or abort -ifeq ($(wildcard $(FW_DIR)/configs/$(TARGET).config),) +ifeq ($(wildcard $(FW_DIR)/targets/$(TARGET)),) $(error config for $(TARGET) not defined) endif @@ -92,6 +92,9 @@ GLUON_CONFIG_VARS := \ SUBTARGET='$(SUBTARGET)' +CheckTarget := [ '$(BOARD)' ] \ + || (echo 'Please set GLUON_TARGET to a valid target. Gluon supports the following targets:'; $(foreach target,$(GLUON_TARGETS),echo ' * $(target)';) false) + GLUON_TARGET := $(TARGET) @@ -120,6 +123,7 @@ LUA := openwrt/staging_dir/hostpkg/bin/lua $(LUA): @$(CheckExternal) + @$(CheckTarget) +@[ -e openwrt/.config ] || $(OPENWRTMAKE) defconfig +@$(OPENWRTMAKE) tools/install From a3b0073f7e814d10148303e91738527df0206739 Mon Sep 17 00:00:00 2001 From: Sven Roederer Date: Thu, 5 Mar 2020 09:54:40 +0100 Subject: [PATCH 64/82] partially revert "add FLAG "GLUON_FOREIGN" ot make the frmework usablefor other types of firmwares" reenable setting of * CONFIG_TARGET_DEVICE_%s_DEVICE_%s * CONFIG_TARGET_DEVICE_PACKAGES_%s_DEVICE_%s * CONFIG_TARGET_PER_DEVICE_ROOTFS=y to fix building of initramfs. This way we also honor the devices-packages, and e.g. remove the ath9k-ct drivers in favor of ath9k. Else it causes double inclusion of drivers and results in file-conflicts. --- scripts/target_config_lib.lua | 10 ++++------ targets/generic_ffberlin | 1 + 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/scripts/target_config_lib.lua b/scripts/target_config_lib.lua index 9118614e91..e62f32109b 100644 --- a/scripts/target_config_lib.lua +++ b/scripts/target_config_lib.lua @@ -99,12 +99,10 @@ io.stderr:write(string.format("debug: %s\n", device_pkgs)) handle_pkg(pkg) end - if env.FOREIGN_BUILD == '' then - funcs.config_message(lib.config, string.format("unable to enable device '%s'", profile), - 'CONFIG_TARGET_DEVICE_%s_DEVICE_%s=y', openwrt_config_target, profile) - lib.config('CONFIG_TARGET_DEVICE_PACKAGES_%s_DEVICE_%s="%s"', - openwrt_config_target, profile, device_pkgs) - end + funcs.config_message(lib.config, string.format("unable to enable device '%s'", profile), + 'CONFIG_TARGET_DEVICE_%s_DEVICE_%s=y', openwrt_config_target, profile) + lib.config('CONFIG_TARGET_DEVICE_PACKAGES_%s_DEVICE_%s="%s"', + openwrt_config_target, profile, device_pkgs) end diff --git a/targets/generic_ffberlin b/targets/generic_ffberlin index 0bc48a5f5e..c609ebf95a 100644 --- a/targets/generic_ffberlin +++ b/targets/generic_ffberlin @@ -1,6 +1,7 @@ try_config 'CONFIG_TARGET_MULTI_PROFILE=y' try_config 'CONFIG_TARGET_ALL_PROFILES=y' +try_config 'CONFIG_TARGET_PER_DEVICE_ROOTFS=y' config 'CONFIG_DEVEL=y' config 'CONFIG_TOOLCHAINOPTS=y' From c223b1444171ec7101a6f5fb95e31d1e7f6a3408 Mon Sep 17 00:00:00 2001 From: Sven Roederer Date: Thu, 5 Mar 2020 14:17:03 +0100 Subject: [PATCH 65/82] patches/packages_berlin: fix after split of luci.mk --- ...1-fix-Makefiles-after-luci-mk-split.patch} | 0 ...02-fix-Makefiles-after-luci-mk-split.patch | 101 ++++++++++++++++++ 2 files changed, 101 insertions(+) rename patches/packages/packages_berlin/{101-generic.mk-include-luci-common.mk.patch => 0001-fix-Makefiles-after-luci-mk-split.patch} (100%) create mode 100644 patches/packages/packages_berlin/0002-fix-Makefiles-after-luci-mk-split.patch diff --git a/patches/packages/packages_berlin/101-generic.mk-include-luci-common.mk.patch b/patches/packages/packages_berlin/0001-fix-Makefiles-after-luci-mk-split.patch similarity index 100% rename from patches/packages/packages_berlin/101-generic.mk-include-luci-common.mk.patch rename to patches/packages/packages_berlin/0001-fix-Makefiles-after-luci-mk-split.patch diff --git a/patches/packages/packages_berlin/0002-fix-Makefiles-after-luci-mk-split.patch b/patches/packages/packages_berlin/0002-fix-Makefiles-after-luci-mk-split.patch new file mode 100644 index 0000000000..1be5509464 --- /dev/null +++ b/patches/packages/packages_berlin/0002-fix-Makefiles-after-luci-mk-split.patch @@ -0,0 +1,101 @@ +From c0a2397a7fba300c6d1efe301a1f300abc9ed4f3 Mon Sep 17 00:00:00 2001 +From: Sven Roederer +Date: Thu, 5 Mar 2020 14:14:23 +0100 +Subject: [PATCH] fix Makefiles after luci-mk split + +--- + freifunk-berlin-generic.mk | 22 ++++++++++++++++++++ + utils/luci-app-ffwizard-berlin/Makefile | 5 +++++ + utils/luci-mod-freifunk-ui/Makefile | 27 +++++++++++++++++++++++++ + 3 files changed, 54 insertions(+) + +diff --git a/freifunk-berlin-generic.mk b/freifunk-berlin-generic.mk +index a5dbd59..b8f4d1d 100644 +--- a/freifunk-berlin-generic.mk ++++ b/freifunk-berlin-generic.mk +@@ -15,6 +15,17 @@ else + #$(info found luci.mk at $(LUCIMKFILE)) + endif + ++LUCI_NAME?=$(notdir ${CURDIR}) ++LUCI_TYPE?=$(word 2,$(subst -, ,$(LUCI_NAME))) ++LUCI_BASENAME?=$(patsubst luci-$(LUCI_TYPE)-%,%,$(LUCI_NAME)) ++LUCI_LANGUAGES:=$(sort $(filter-out templates,$(notdir $(wildcard ${CURDIR}/po/*)))) ++LUCI_DEFAULTS:=$(notdir $(wildcard ${CURDIR}/root/etc/uci-defaults/*)) ++LUCI_PKGARCH?=$(if $(realpath src/Makefile),,all) ++ ++PKG_NAME?=$(LUCI_NAME) ++ ++PKG_BUILD_DEPENDS += $(LUCI_BUILD_DEPENDS) ++ + PKG_VERSION?=$(if $(DUMP),x,$(strip $(shell \ + if svn info >/dev/null 2>/dev/null; then \ + revision="svn-r$$(LC_ALL=C svn info | sed -ne 's/^Revision: //p')"; \ +@@ -33,3 +44,14 @@ PKG_VERSION?=$(if $(DUMP),x,$(strip $(shell \ + ))) + + include $(LUCIMKFILE) ++ ++define Package/$(PKG_NAME) ++ SECTION:=luci ++ CATEGORY:=LuCI ++ SUBMENU:=$(if $(LUCI_MENU.$(LUCI_TYPE)),$(LUCI_MENU.$(LUCI_TYPE)),$(LUCI_MENU.app)) ++ TITLE:=$(if $(LUCI_TITLE),$(LUCI_TITLE),LuCI $(LUCI_NAME) $(LUCI_TYPE)) ++ DEPENDS:=$(LUCI_DEPENDS) ++ $(if $(LUCI_EXTRA_DEPENDS),EXTRA_DEPENDS:=$(LUCI_EXTRA_DEPENDS)) ++ $(if $(LUCI_PKGARCH),PKGARCH:=$(LUCI_PKGARCH)) ++endef ++ +diff --git a/utils/luci-app-ffwizard-berlin/Makefile b/utils/luci-app-ffwizard-berlin/Makefile +index d5236c9..69b99da 100644 +--- a/utils/luci-app-ffwizard-berlin/Makefile ++++ b/utils/luci-app-ffwizard-berlin/Makefile +@@ -10,4 +10,9 @@ include ../../freifunk-berlin-generic.mk + + # URL:=http://berlin.freifunk.net + ++define Build/Compile ++endef ++ + # call BuildPackage - OpenWrt buildroot signature ++$(eval $(call BuildPackage,$(PKG_NAME))) ++#$(eval $(call BuildPackage,luci-app-ffwizard-berlin)) +diff --git a/utils/luci-mod-freifunk-ui/Makefile b/utils/luci-mod-freifunk-ui/Makefile +index cf56bde..e6217cf 100644 +--- a/utils/luci-mod-freifunk-ui/Makefile ++++ b/utils/luci-mod-freifunk-ui/Makefile +@@ -14,4 +14,31 @@ PKG_RELEASE:=3 + + include ../../freifunk-berlin-generic.mk + ++define Build/Configure ++endef ++ ++ifneq ($(wildcard ${CURDIR}/src/Makefile),) ++ MAKE_PATH := src/ ++ MAKE_VARS += FPIC="$(FPIC)" LUCI_VERSION="$(PKG_VERSION)" LUCI_GITBRANCH="$(PKG_GITBRANCH)" ++ ++ define Build/Compile ++ $(call Build/Compile/Default,clean compile) ++ endef ++else ++ define Build/Compile ++ endef ++endif ++ ++ifneq ($(LUCI_DEFAULTS),) ++define Package/$(PKG_NAME)/postinst ++[ -n "$${IPKG_INSTROOT}" ] || {$(foreach script,$(LUCI_DEFAULTS), ++ (. /etc/uci-defaults/$(script)) && rm -f /etc/uci-defaults/$(script)) ++ exit 0 ++} ++endef ++endif ++ ++ + # call BuildPackage - OpenWrt buildroot signature ++#$(eval $(call BuildPackage,$(PKG_NAME))) ++$(eval $(call BuildPackage,luci-mod-freifunk-ui)) +-- +2.20.1 + From 63cb34ce4fef72c4388309ddeacbbf521897f604 Mon Sep 17 00:00:00 2001 From: Sven Roederer Date: Thu, 5 Mar 2020 22:00:12 +0100 Subject: [PATCH 66/82] targets: add NanoStation Loco (XM) to ath79-generic --- targets/ath79-generic | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/targets/ath79-generic b/targets/ath79-generic index 7caf65785f..671a109feb 100644 --- a/targets/ath79-generic +++ b/targets/ath79-generic @@ -64,3 +64,7 @@ device('tp-link-archer-c6-v2', 'tplink_archer-c6-v2', { packages = ATH10K_PACKAGES_QCA9888, }) +-- Ubiquiti + +device('ubnt_nanostation-loco-m', 'ubnt_nanostation-loco-m') + From 67ebdf96ebf5656d23dd1d9132d08fc1aec0c741 Mon Sep 17 00:00:00 2001 From: Sven Roederer Date: Fri, 6 Mar 2020 02:47:43 +0100 Subject: [PATCH 67/82] Makefile: [gluon] make gluon.packages depend on the relating target-definiton a change of targets/$GLUON_TARGET should trigger a regeneration of the packages-list --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index a09f1f2c09..a0929cd1f8 100644 --- a/Makefile +++ b/Makefile @@ -143,7 +143,7 @@ gluon-compile: gluon-config +@$(OPENWRTMAKE) gluon-profiles: $(GLUON_TMPDIR)/$(GLUON_TARGET).packages -$(GLUON_TMPDIR)/$(GLUON_TARGET).packages: $(LUA) .stamp-feeds-updated +$(GLUON_TMPDIR)/$(GLUON_TARGET).packages: $(LUA) .stamp-feeds-updated $(GLUON_TARGETSDIR)/$(GLUON_TARGET) @$(CheckExternal) @$(GLUON_CONFIG_VARS) FOREIGN_BUILD=ffberlin \ $(LUA) scripts/target_config_profile.lua '$(GLUON_TARGET)' '$(GLUON_PACKAGES) luci-app-ffwizard-berlin' From d6b67578a07935f3aaba0cce59b3ad882f2bb145 Mon Sep 17 00:00:00 2001 From: Sven Roederer Date: Fri, 6 Mar 2020 21:57:38 +0100 Subject: [PATCH 68/82] Makefile: remove deprecated stuff --- Makefile | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/Makefile b/Makefile index a0929cd1f8..0b5df4bc15 100644 --- a/Makefile +++ b/Makefile @@ -11,8 +11,6 @@ REVISION=git describe --always # set dir and file names FW_DIR=$(shell pwd) OPENWRT_DIR=$(FW_DIR)/openwrt -TARGET_CONFIG=$(FW_DIR)/configs/common.config $(FW_DIR)/configs/$(MAINTARGET)-$(SUBTARGET).config -TARGET_CONFIG_AUTOBUILD=$(FW_DIR)/configs/common-autobuild.config FW_TARGET_DIR=$(FW_DIR)/firmwares/$(MAINTARGET)-$(SUBTARGET) VERSION_FILE=$(FW_TARGET_DIR)/VERSION.txt UMASK=umask 022 @@ -35,9 +33,6 @@ endif # if any of the following files have been changed: clean up openwrt dir DEPS=$(TARGET_CONFIG) feeds.conf patches $(wildcard patches/*) -# profiles to be built (router models) -PROFILES=$(shell cat $(FW_DIR)/profiles/$(MAINTARGET)-$(SUBTARGET).profiles) - FW_REVISION=$(shell $(REVISION)) define FEEDS @@ -209,18 +204,6 @@ $(FW_DIR)/embedded-files: $(OPENWRT_DIR)/files: $(FW_DIR)/embedded-files ln -s $(FW_DIR)/embedded-files $(OPENWRT_DIR)/files -# openwrt config -$(OPENWRT_DIR)/.config: .stamp-feeds-updated $(TARGET_CONFIG) $(TARGET_CONFIG_AUTOBUILD) .stamp-build_rev $(OPENWRT_DIR)/dl -ifdef IS_BUILDBOT - cat $(TARGET_CONFIG) $(TARGET_CONFIG_AUTOBUILD) >$(OPENWRT_DIR)/.config -else - cat $(TARGET_CONFIG) >$(OPENWRT_DIR)/.config -endif - # always replace CONFIG_VERSION_CODE by FW_REVISION - sed -i "/^CONFIG_VERSION_CODE=/c\CONFIG_VERSION_CODE=\"$(FW_REVISION)\"" $(OPENWRT_DIR)/.config - $(UMASK); \ - $(MAKE) -C $(OPENWRT_DIR) defconfig - # prepare openwrt working copy prepare: stamp-clean-prepared .stamp-prepared .stamp-prepared: .stamp-feeds-updated $(OPENWRT_DIR)/.config $(OPENWRT_DIR)/files From 51e5446a3cf05ff0782d4080a74212b2e26e6352 Mon Sep 17 00:00:00 2001 From: Sven Roederer Date: Fri, 6 Mar 2020 22:12:23 +0100 Subject: [PATCH 69/82] Revert "Makefile: remove deprecated stuff" This reverts commit d6b67578a07935f3aaba0cce59b3ad882f2bb145. --- Makefile | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/Makefile b/Makefile index 0b5df4bc15..a0929cd1f8 100644 --- a/Makefile +++ b/Makefile @@ -11,6 +11,8 @@ REVISION=git describe --always # set dir and file names FW_DIR=$(shell pwd) OPENWRT_DIR=$(FW_DIR)/openwrt +TARGET_CONFIG=$(FW_DIR)/configs/common.config $(FW_DIR)/configs/$(MAINTARGET)-$(SUBTARGET).config +TARGET_CONFIG_AUTOBUILD=$(FW_DIR)/configs/common-autobuild.config FW_TARGET_DIR=$(FW_DIR)/firmwares/$(MAINTARGET)-$(SUBTARGET) VERSION_FILE=$(FW_TARGET_DIR)/VERSION.txt UMASK=umask 022 @@ -33,6 +35,9 @@ endif # if any of the following files have been changed: clean up openwrt dir DEPS=$(TARGET_CONFIG) feeds.conf patches $(wildcard patches/*) +# profiles to be built (router models) +PROFILES=$(shell cat $(FW_DIR)/profiles/$(MAINTARGET)-$(SUBTARGET).profiles) + FW_REVISION=$(shell $(REVISION)) define FEEDS @@ -204,6 +209,18 @@ $(FW_DIR)/embedded-files: $(OPENWRT_DIR)/files: $(FW_DIR)/embedded-files ln -s $(FW_DIR)/embedded-files $(OPENWRT_DIR)/files +# openwrt config +$(OPENWRT_DIR)/.config: .stamp-feeds-updated $(TARGET_CONFIG) $(TARGET_CONFIG_AUTOBUILD) .stamp-build_rev $(OPENWRT_DIR)/dl +ifdef IS_BUILDBOT + cat $(TARGET_CONFIG) $(TARGET_CONFIG_AUTOBUILD) >$(OPENWRT_DIR)/.config +else + cat $(TARGET_CONFIG) >$(OPENWRT_DIR)/.config +endif + # always replace CONFIG_VERSION_CODE by FW_REVISION + sed -i "/^CONFIG_VERSION_CODE=/c\CONFIG_VERSION_CODE=\"$(FW_REVISION)\"" $(OPENWRT_DIR)/.config + $(UMASK); \ + $(MAKE) -C $(OPENWRT_DIR) defconfig + # prepare openwrt working copy prepare: stamp-clean-prepared .stamp-prepared .stamp-prepared: .stamp-feeds-updated $(OPENWRT_DIR)/.config $(OPENWRT_DIR)/files From bc5920fbc56f858558049a5304ca1cddfd9a619c Mon Sep 17 00:00:00 2001 From: Sven Roederer Date: Fri, 6 Mar 2020 22:37:12 +0100 Subject: [PATCH 70/82] [gluon] switch from feeds.conf to modules --- Makefile | 4 ---- feeds.conf | 13 ------------- modules | 28 ++++++++++++++++++++++++++++ scripts/ffberlin_feeds.sh | 9 --------- 4 files changed, 28 insertions(+), 26 deletions(-) delete mode 100644 feeds.conf create mode 100644 modules delete mode 100755 scripts/ffberlin_feeds.sh diff --git a/Makefile b/Makefile index a0929cd1f8..6f3a49c6b4 100644 --- a/Makefile +++ b/Makefile @@ -40,10 +40,6 @@ PROFILES=$(shell cat $(FW_DIR)/profiles/$(MAINTARGET)-$(SUBTARGET).profiles) FW_REVISION=$(shell $(REVISION)) -define FEEDS - $(shell ./scripts/ffberlin_feeds.sh) -endef - default: firmwares ## Gluon - Begin diff --git a/feeds.conf b/feeds.conf deleted file mode 100644 index 5ca684a2bd..0000000000 --- a/feeds.conf +++ /dev/null @@ -1,13 +0,0 @@ -src-git packages https://github.com/openwrt/packages.git^99efce0cd27adfcc53384fba93f37e5ee2e517de -src-git luci https://github.com/openwrt/luci.git^13dd17fca148965d38f0d4e578b19679a7c4daa2 -src-git freifunk https://github.com/freifunk/openwrt-packages.git^73454e6fe1bdc902c69ca0079d979fdb94d6fb1f -src-git routing https://github.com/openwrt-routing/packages.git^efa6e5445adda9c6545f551808829ec927cbade8 -src-git packages_berlin https://github.com/freifunk-berlin/firmware-packages.git^b03e01ed5a3b691a19cf284627aab9820ce6c2b8 -src-git packages_gluon https://github.com/freifunk-gluon/packages.git^033401c18ecbf5073f5330b4462af6e450e358ff - -## -# just for reference (syntax of different feed-sources) -# see https://wiki.openwrt.org/doc/devel/feeds for more info -## -#src-git packages_berlin https://github.com/freifunk-berlin/firmware-packages.git;master -#src-link packages_berlin ../../../firmware-packages diff --git a/modules b/modules new file mode 100644 index 0000000000..d38150c117 --- /dev/null +++ b/modules @@ -0,0 +1,28 @@ +GLUON_FEEDS='packages routing luci freifunk ffberlin' + +OPENWRT_REPO=https://git.openwrt.org/openwrt/openwrt.git +OPENWRT_COMMIT=33732f4a9c17921b782167a0dcaba9703d4e6753 +OPENWRT_BRANCH=openwrt-19.07 + +PACKAGES_PACKAGES_REPO=https://github.com/openwrt/packages.git +PACKAGES_PACKAGES_COMMIT=99efce0cd27adfcc53384fba93f37e5ee2e517de +PACKAGES_PACKAGES_BRANCH=openwrt-19.07 + +PACKAGES_ROUTING_REPO=https://github.com/openwrt-routing/packages.git +PACKAGES_ROUTING_COMMIT=efa6e5445adda9c6545f551808829ec927cbade8 +PACKAGES_ROUTING_BRANCH=openwrt-19.07 + +PACKAGES_PACKAGES_GLUON_REPO=https://github.com/freifunk-gluon/packages.git +PACKAGES_PACKAGES_GLUON_COMMIT=033401c18ecbf5073f5330b4462af6e450e358ff + +PACKAGES_LUCI_REPO=https://github.com/openwrt/luci.git +PACKAGES_LUCI_COMMIT=13dd17fca148965d38f0d4e578b19679a7c4daa2 +PACKAGES_LUCI_BRANCH=openwrt-19.07 + +PACKAGES_FREIFUNK_REPO=https://github.com/freifunk/openwrt-packages.git +PACKAGES_FREIFUNK_COMMIT=73454e6fe1bdc902c69ca0079d979fdb94d6fb1f +PACKAGES_FREIFUNK_BRANCH=openwrt-19.07 + +PACKAGES_FFBERLIN_REPO=https://github.com/freifunk-berlin/firmware-packages.git +PACKAGES_FFBERLIN_COMMIT=88c57fafe24b465e02c2fa341c207a7df8e80952 +PACKAGES_FFBERLIN_BRANCH=for_gluon diff --git a/scripts/ffberlin_feeds.sh b/scripts/ffberlin_feeds.sh deleted file mode 100755 index a7a836371d..0000000000 --- a/scripts/ffberlin_feeds.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash - -set -e - -while IFS= read -r line -do -# echo "$line" - echo "${line}" | grep -v '^\#' | cut -d " " -f 2 | tr '\n' ' ' -done < feeds.conf From aeafec11a8746ca69125ea12f07d675511647a57 Mon Sep 17 00:00:00 2001 From: Sven Roederer Date: Fri, 6 Mar 2020 22:55:14 +0100 Subject: [PATCH 71/82] patches: rename directory "packages_berlin" to ffberlin to be referenced by modules-file --- .../0001-fix-Makefiles-after-luci-mk-split.patch | 0 .../0002-fix-Makefiles-after-luci-mk-split.patch | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename patches/packages/{packages_berlin => ffberlin}/0001-fix-Makefiles-after-luci-mk-split.patch (100%) rename patches/packages/{packages_berlin => ffberlin}/0002-fix-Makefiles-after-luci-mk-split.patch (100%) diff --git a/patches/packages/packages_berlin/0001-fix-Makefiles-after-luci-mk-split.patch b/patches/packages/ffberlin/0001-fix-Makefiles-after-luci-mk-split.patch similarity index 100% rename from patches/packages/packages_berlin/0001-fix-Makefiles-after-luci-mk-split.patch rename to patches/packages/ffberlin/0001-fix-Makefiles-after-luci-mk-split.patch diff --git a/patches/packages/packages_berlin/0002-fix-Makefiles-after-luci-mk-split.patch b/patches/packages/ffberlin/0002-fix-Makefiles-after-luci-mk-split.patch similarity index 100% rename from patches/packages/packages_berlin/0002-fix-Makefiles-after-luci-mk-split.patch rename to patches/packages/ffberlin/0002-fix-Makefiles-after-luci-mk-split.patch From 26fd40f39da89091014390ccbcdce48c995b49df Mon Sep 17 00:00:00 2001 From: Sven Roederer Date: Sat, 7 Mar 2020 00:28:37 +0100 Subject: [PATCH 72/82] Revert "targets: add NanoStation Loco (XM) to ath79-generic" This reverts commit 63cb34ce4fef72c4388309ddeacbbf521897f604 as NSM loco is not in OpenWrt --- targets/ath79-generic | 4 ---- 1 file changed, 4 deletions(-) diff --git a/targets/ath79-generic b/targets/ath79-generic index 671a109feb..7caf65785f 100644 --- a/targets/ath79-generic +++ b/targets/ath79-generic @@ -64,7 +64,3 @@ device('tp-link-archer-c6-v2', 'tplink_archer-c6-v2', { packages = ATH10K_PACKAGES_QCA9888, }) --- Ubiquiti - -device('ubnt_nanostation-loco-m', 'ubnt_nanostation-loco-m') - From 565689358db1df5ba0451eb7fd2220e0347c0273 Mon Sep 17 00:00:00 2001 From: Sven Roederer Date: Sat, 7 Mar 2020 16:58:22 +0100 Subject: [PATCH 73/82] targets/generic_ffberlin: add network-defaults package to default image --- targets/generic_ffberlin | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/targets/generic_ffberlin b/targets/generic_ffberlin index c609ebf95a..5bb7be787b 100644 --- a/targets/generic_ffberlin +++ b/targets/generic_ffberlin @@ -92,5 +92,5 @@ packages { 'luci-mod-failsafe', 'luci-theme-bootstrap', 'uhttpd', - 'freifunk-berlin-system-defaults' + 'freifunk-berlin-network-defaults' } From c794f4e432c847dcd02ce3b1f5496e3ab1a8641f Mon Sep 17 00:00:00 2001 From: Sven Roederer Date: Sat, 7 Mar 2020 16:59:25 +0100 Subject: [PATCH 74/82] features: drop unneeded gluon features from file --- package/features | 35 +---------------------------------- 1 file changed, 1 insertion(+), 34 deletions(-) diff --git a/package/features b/package/features index 1f0d825a39..ed0db3c6ce 100644 --- a/package/features +++ b/package/features @@ -1,34 +1 @@ -nodefault 'web-wizard' - -packages 'web-wizard' \ - 'gluon-config-mode-hostname' \ - 'gluon-config-mode-geo-location' \ - 'gluon-config-mode-contact-info' \ - 'gluon-config-mode-outdoor' - -packages 'web-wizard & autoupdater' \ - 'gluon-config-mode-autoupdater' - -packages 'web-wizard & (mesh-vpn-fastd | mesh-vpn-tunneldigger)' \ - 'gluon-config-mode-mesh-vpn' - - -nodefault 'web-advanced' - -packages 'web-advanced' \ - 'gluon-web-admin' \ - 'gluon-web-network' \ - 'gluon-web-wifi-config' - -packages 'web-advanced & autoupdater' \ - 'gluon-web-autoupdater' - -packages 'status-page & mesh-batman-adv-15' \ - 'gluon-status-page-mesh-batman-adv' - -packages 'mesh-batman-adv-15' \ - 'gluon-ebtables-limit-arp' \ - 'gluon-radvd' - -packages 'mesh-babel' \ - 'gluon-radvd' +# just a dummy-file From e5f7bc1f54706b36b690784c528c9dd02d36fa19 Mon Sep 17 00:00:00 2001 From: Sven Roederer Date: Sat, 7 Mar 2020 17:01:04 +0100 Subject: [PATCH 75/82] scripts/features.sh: fallback to "freifunk-berlin" prefix for features --- scripts/features.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/features.sh b/scripts/features.sh index 1d7184eeb0..d7902b1d73 100755 --- a/scripts/features.sh +++ b/scripts/features.sh @@ -35,7 +35,7 @@ vars=() for feature in $1; do if [ "$(type -t "gluon_feature_nodefault_${feature}")" != 'function' ]; then - echo "gluon-${feature}" + echo "freifunk-berlin-${feature}" fi vars+=("$(sanitize "$feature")=1") From a208e6eb7c6744eb71701954c4d26574b3e44bf7 Mon Sep 17 00:00:00 2001 From: Sven Roederer Date: Sat, 7 Mar 2020 18:19:43 +0100 Subject: [PATCH 76/82] Makefile: remove hardcoded "luci-app-ffwizard-berlin" --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 6f3a49c6b4..a3243dca90 100644 --- a/Makefile +++ b/Makefile @@ -142,7 +142,7 @@ gluon-profiles: $(GLUON_TMPDIR)/$(GLUON_TARGET).packages $(GLUON_TMPDIR)/$(GLUON_TARGET).packages: $(LUA) .stamp-feeds-updated $(GLUON_TARGETSDIR)/$(GLUON_TARGET) @$(CheckExternal) @$(GLUON_CONFIG_VARS) FOREIGN_BUILD=ffberlin \ - $(LUA) scripts/target_config_profile.lua '$(GLUON_TARGET)' '$(GLUON_PACKAGES) luci-app-ffwizard-berlin' + $(LUA) scripts/target_config_profile.lua '$(GLUON_TARGET)' '$(GLUON_PACKAGES)' gluon-images: $(GLUON_TMPDIR)/$(GLUON_TARGET).packages # taken from original images target From 910f5ee55614aff15e05651718894823c9f3e257 Mon Sep 17 00:00:00 2001 From: Sven Roederer Date: Sat, 7 Mar 2020 18:24:12 +0100 Subject: [PATCH 77/82] Makefile: use GLUON_FEATURES to build packages --- Makefile | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index a3243dca90..755d9ef8f4 100644 --- a/Makefile +++ b/Makefile @@ -110,7 +110,8 @@ define merge_packages GLUON_PACKAGES := $$(strip $$(filter-out -$$(patsubst -%,%,$(pkg)) $$(patsubst -%,%,$(pkg)),$$(GLUON_PACKAGES)) $(pkg)) ) endef -$(eval $(call merge_packages,$(GLUON_DEFAULT_PACKAGES) $(GLUON_FEATURE_PACKAGES) $(GLUON_SITE_PACKAGES))) +#$(eval $(call merge_packages,$(GLUON_DEFAULT_PACKAGES) $(GLUON_FEATURE_PACKAGES) $(GLUON_SITE_PACKAGES))) +$(eval $(call merge_packages,$(GLUON_DEFAULT_PACKAGES) $(GLUON_SITE_PACKAGES))) $(info package-src: $(GLUON_DEFAULT_PACKAGES) $(GLUON_FEATURE_PACKAGES) $(GLUON_SITE_PACKAGES)) $(info packages : $(GLUON_PACKAGES)) @@ -128,7 +129,7 @@ $(LUA): gluon-config: $(LUA) .stamp-feeds-updated $(OPENWRT_DIR)/dl @$(CheckExternal) @$(GLUON_CONFIG_VARS) FOREIGN_BUILD=ffberlin \ - $(LUA) scripts/target_config.lua '$(GLUON_TARGET)' '$(GLUON_PACKAGES)' '$(GLUON_EXTRA_PACKAGES)'\ + $(LUA) scripts/target_config.lua '$(GLUON_TARGET)' '$(GLUON_PACKAGES)' '$(GLUON_EXTRA_PACKAGES) $(GLUON_FEATURE_PACKAGES)'\ > openwrt/.config +@$(OPENWRTMAKE) defconfig @@ -139,10 +140,10 @@ gluon-compile: gluon-config +@$(OPENWRTMAKE) gluon-profiles: $(GLUON_TMPDIR)/$(GLUON_TARGET).packages -$(GLUON_TMPDIR)/$(GLUON_TARGET).packages: $(LUA) .stamp-feeds-updated $(GLUON_TARGETSDIR)/$(GLUON_TARGET) +$(GLUON_TMPDIR)/$(GLUON_TARGET).packages: $(LUA) .stamp-feeds-updated $(GLUON_TARGETSDIR)/$(GLUON_TARGET) $(GLUON_SITEDIR/site.mk) @$(CheckExternal) @$(GLUON_CONFIG_VARS) FOREIGN_BUILD=ffberlin \ - $(LUA) scripts/target_config_profile.lua '$(GLUON_TARGET)' '$(GLUON_PACKAGES)' + $(LUA) scripts/target_config_profile.lua '$(GLUON_TARGET)' '$(GLUON_PACKAGES) $(GLUON_FEATURE_PACKAGES)' gluon-images: $(GLUON_TMPDIR)/$(GLUON_TARGET).packages # taken from original images target From 0904ff2691a041060e36c3ab0569e69f5b59ad69 Mon Sep 17 00:00:00 2001 From: Sven Roederer Date: Sat, 7 Mar 2020 19:10:18 +0100 Subject: [PATCH 78/82] modules: update packages_berlin --- modules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules b/modules index d38150c117..2fea64255e 100644 --- a/modules +++ b/modules @@ -24,5 +24,5 @@ PACKAGES_FREIFUNK_COMMIT=73454e6fe1bdc902c69ca0079d979fdb94d6fb1f PACKAGES_FREIFUNK_BRANCH=openwrt-19.07 PACKAGES_FFBERLIN_REPO=https://github.com/freifunk-berlin/firmware-packages.git -PACKAGES_FFBERLIN_COMMIT=88c57fafe24b465e02c2fa341c207a7df8e80952 +PACKAGES_FFBERLIN_COMMIT=5b8ff61af1a1d027f6a9524543514df1636077bf PACKAGES_FFBERLIN_BRANCH=for_gluon From 75c9aaa5c39678b5e4624d783636288c50818048 Mon Sep 17 00:00:00 2001 From: Sven Roederer Date: Sat, 7 Mar 2020 19:10:59 +0100 Subject: [PATCH 79/82] patches/ffberlin: fix patch name --- ...k-split.patch => 0001-generic.mk-include-luci-common.mk.patch} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename patches/packages/ffberlin/{0001-fix-Makefiles-after-luci-mk-split.patch => 0001-generic.mk-include-luci-common.mk.patch} (100%) diff --git a/patches/packages/ffberlin/0001-fix-Makefiles-after-luci-mk-split.patch b/patches/packages/ffberlin/0001-generic.mk-include-luci-common.mk.patch similarity index 100% rename from patches/packages/ffberlin/0001-fix-Makefiles-after-luci-mk-split.patch rename to patches/packages/ffberlin/0001-generic.mk-include-luci-common.mk.patch From 6dbf8b13ca7ed6f5ab118bd1f170260119eaa785 Mon Sep 17 00:00:00 2001 From: Sven Roederer Date: Sat, 7 Mar 2020 19:12:19 +0100 Subject: [PATCH 80/82] patches/ffberlin: update package Makefiles after luci.mk split --- ...ve-package-definition-to-common-into.patch | 75 +++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 patches/packages/ffberlin/0003-luci-packages-move-package-definition-to-common-into.patch diff --git a/patches/packages/ffberlin/0003-luci-packages-move-package-definition-to-common-into.patch b/patches/packages/ffberlin/0003-luci-packages-move-package-definition-to-common-into.patch new file mode 100644 index 0000000000..82f63fa527 --- /dev/null +++ b/patches/packages/ffberlin/0003-luci-packages-move-package-definition-to-common-into.patch @@ -0,0 +1,75 @@ +From 4473a8e58cebae40499025dc898b7b658481d934 Mon Sep 17 00:00:00 2001 +From: Sven Roederer +Date: Sat, 7 Mar 2020 18:56:32 +0100 +Subject: [PATCH] luci-packages: move package-definition to common into + individual package + +this fixes double definitions in packages-list +--- + freifunk-berlin-generic.mk | 10 ---------- + utils/luci-app-ffwizard-berlin/Makefile | 10 ++++++++++ + utils/luci-mod-freifunk-ui/Makefile | 9 ++++++++- + 3 files changed, 18 insertions(+), 11 deletions(-) + +diff --git a/freifunk-berlin-generic.mk b/freifunk-berlin-generic.mk +index b8f4d1d..fa4d48b 100644 +--- a/freifunk-berlin-generic.mk ++++ b/freifunk-berlin-generic.mk +@@ -45,13 +45,3 @@ PKG_VERSION?=$(if $(DUMP),x,$(strip $(shell \ + + include $(LUCIMKFILE) + +-define Package/$(PKG_NAME) +- SECTION:=luci +- CATEGORY:=LuCI +- SUBMENU:=$(if $(LUCI_MENU.$(LUCI_TYPE)),$(LUCI_MENU.$(LUCI_TYPE)),$(LUCI_MENU.app)) +- TITLE:=$(if $(LUCI_TITLE),$(LUCI_TITLE),LuCI $(LUCI_NAME) $(LUCI_TYPE)) +- DEPENDS:=$(LUCI_DEPENDS) +- $(if $(LUCI_EXTRA_DEPENDS),EXTRA_DEPENDS:=$(LUCI_EXTRA_DEPENDS)) +- $(if $(LUCI_PKGARCH),PKGARCH:=$(LUCI_PKGARCH)) +-endef +- +diff --git a/utils/luci-app-ffwizard-berlin/Makefile b/utils/luci-app-ffwizard-berlin/Makefile +index 27bb77c..01fa759 100644 +--- a/utils/luci-app-ffwizard-berlin/Makefile ++++ b/utils/luci-app-ffwizard-berlin/Makefile +@@ -10,6 +10,16 @@ include ../../freifunk-berlin-generic.mk + + # URL:=http://berlin.freifunk.net + ++define Package/$(PKG_NAME) ++ SECTION:=luci ++ CATEGORY:=LuCI ++ SUBMENU:=$(if $(LUCI_MENU.$(LUCI_TYPE)),$(LUCI_MENU.$(LUCI_TYPE)),$(LUCI_MENU.app)) ++ TITLE:=$(if $(LUCI_TITLE),$(LUCI_TITLE),LuCI $(LUCI_NAME) $(LUCI_TYPE)) ++ DEPENDS:=$(LUCI_DEPENDS) ++ $(if $(LUCI_EXTRA_DEPENDS),EXTRA_DEPENDS:=$(LUCI_EXTRA_DEPENDS)) ++ $(if $(LUCI_PKGARCH),PKGARCH:=$(LUCI_PKGARCH)) ++endef ++ + define Build/Compile + endef + +diff --git a/utils/luci-mod-freifunk-ui/Makefile b/utils/luci-mod-freifunk-ui/Makefile +index e6217cf..c29f9b7 100644 +--- a/utils/luci-mod-freifunk-ui/Makefile ++++ b/utils/luci-mod-freifunk-ui/Makefile +@@ -14,7 +14,14 @@ PKG_RELEASE:=3 + + include ../../freifunk-berlin-generic.mk + +-define Build/Configure ++define Package/$(PKG_NAME) ++ SECTION:=luci ++ CATEGORY:=LuCI ++ SUBMENU:=$(if $(LUCI_MENU.$(LUCI_TYPE)),$(LUCI_MENU.$(LUCI_TYPE)),$(LUCI_MENU.app)) ++ TITLE:=$(if $(LUCI_TITLE),$(LUCI_TITLE),LuCI $(LUCI_NAME) $(LUCI_TYPE)) ++ DEPENDS:=$(LUCI_DEPENDS) ++ $(if $(LUCI_EXTRA_DEPENDS),EXTRA_DEPENDS:=$(LUCI_EXTRA_DEPENDS)) ++ $(if $(LUCI_PKGARCH),PKGARCH:=$(LUCI_PKGARCH)) + endef + + ifneq ($(wildcard ${CURDIR}/src/Makefile),) +-- +2.20.1 + From da61b1b8d3356650c7e3a64e361ae58a654b5597 Mon Sep 17 00:00:00 2001 From: Sven Roederer Date: Sat, 7 Mar 2020 22:37:22 +0100 Subject: [PATCH 81/82] modules: update berlin_packages --- modules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules b/modules index 2fea64255e..38c29f89d5 100644 --- a/modules +++ b/modules @@ -24,5 +24,5 @@ PACKAGES_FREIFUNK_COMMIT=73454e6fe1bdc902c69ca0079d979fdb94d6fb1f PACKAGES_FREIFUNK_BRANCH=openwrt-19.07 PACKAGES_FFBERLIN_REPO=https://github.com/freifunk-berlin/firmware-packages.git -PACKAGES_FFBERLIN_COMMIT=5b8ff61af1a1d027f6a9524543514df1636077bf +PACKAGES_FFBERLIN_COMMIT=a57996650a7308c63860158dd43b4598f261c033 PACKAGES_FFBERLIN_BRANCH=for_gluon From 5d9abcde08861081241644f49701becf1b2c125e Mon Sep 17 00:00:00 2001 From: Sven Roederer Date: Sun, 8 Mar 2020 12:33:41 +0100 Subject: [PATCH 82/82] targets/ath79-generic: add ath10k-based boards to sync with recent list add ath10k based boards * tp-link-archer-c59-v1 * tp-link-archer-c7-v4 * tp-link-archer-c7-v5 * ubnt_unifiac-mesh * ubnt_unifiac-pro --- targets/ath79-generic | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/targets/ath79-generic b/targets/ath79-generic index 7caf65785f..0eac5af863 100644 --- a/targets/ath79-generic +++ b/targets/ath79-generic @@ -60,7 +60,29 @@ device('ocedo-raccoon', 'ocedo_raccoon', { -- TP-Link +device('tp-link-archer-c59-v1', 'tplink_archer-c59-v1', { + packages = ATH10K_PACKAGES_QCA9888, +}) + device('tp-link-archer-c6-v2', 'tplink_archer-c6-v2', { packages = ATH10K_PACKAGES_QCA9888, }) +device('tp-link-archer-c7-v4', 'tplink_archer-c7-v4', { + packages = ATH10K_PACKAGES_QCA9880, +}) + +device('tp-link-archer-c7-v5', 'tplink_archer-c7-v5', { + packages = ATH10K_PACKAGES_QCA9880, +}) + +-- Ubiquiti + +device('ubnt_unifiac-mesh', 'ubnt_unifiac-mesh', { + packages = ATH10K_PACKAGES_QCA9880, +}) + +device('ubnt_unifiac-pro', 'ubnt_unifiac-pro', { + packages = ATH10K_PACKAGES_QCA9880, +}) +