Skip to content
Snippets Groups Projects
Unverified Commit 210d97c5 authored by Matthias Schiffer's avatar Matthias Schiffer
Browse files

Switch to OpenWrt 18.06 branch

parent fcd5f183
No related branches found
No related tags found
No related merge requests found
Showing
with 67 additions and 430 deletions
*~ *~
/lede /openwrt
/output /output
/site /site
/tmp /tmp
......
The code of Project Gluon may be distributed under the following terms, unless The code of Project Gluon may be distributed under the following terms, unless
noted otherwise in individual files or subtrees. noted otherwise in individual files or subtrees.
Copyright (c) 2013-2017, Project Gluon Copyright (c) 2013-2018, Project Gluon
All rights reserved. All rights reserved.
Redistribution and use in source and binary forms, with or without Redistribution and use in source and binary forms, with or without
...@@ -25,10 +25,11 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE ...@@ -25,10 +25,11 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
LEDE and OpenWrt are licensed under the terms of the GNU General Public License OpenWrt is licensed under the terms of the GNU General Public License Version 2,
Version 2, which can be found at lede/LICENSE after the lede repository has been which can be found at openwrt/LICENSE after the OpenWrt repository has been
obtained. This applies to the following repositories: obtained. This applies to the following repositories:
* lede
* openwrt
* packages/openwrt * packages/openwrt
* packages/routing * packages/routing
* packages/luci * packages/luci
...@@ -67,13 +67,13 @@ define GluonTarget ...@@ -67,13 +67,13 @@ define GluonTarget
gluon_target := $(1)$$(if $(2),-$(2)) gluon_target := $(1)$$(if $(2),-$(2))
GLUON_TARGETS += $$(gluon_target) GLUON_TARGETS += $$(gluon_target)
GLUON_TARGET_$$(gluon_target)_BOARD := $(1) GLUON_TARGET_$$(gluon_target)_BOARD := $(1)
GLUON_TARGET_$$(gluon_target)_SUBTARGET := $(if $(3),$(3),$(2)) GLUON_TARGET_$$(gluon_target)_SUBTARGET := $(2)
endef endef
include targets/targets.mk include targets/targets.mk
LEDEMAKE = $(MAKE) -C lede OPENWRTMAKE = $(MAKE) -C openwrt
BOARD := $(GLUON_TARGET_$(GLUON_TARGET)_BOARD) BOARD := $(GLUON_TARGET_$(GLUON_TARGET)_BOARD)
SUBTARGET := $(GLUON_TARGET_$(GLUON_TARGET)_SUBTARGET) SUBTARGET := $(GLUON_TARGET_$(GLUON_TARGET)_SUBTARGET)
...@@ -86,15 +86,15 @@ GLUON_CONFIG_VARS := \ ...@@ -86,15 +86,15 @@ GLUON_CONFIG_VARS := \
BOARD='$(BOARD)' \ BOARD='$(BOARD)' \
SUBTARGET='$(SUBTARGET)' SUBTARGET='$(SUBTARGET)'
LEDE_TARGET := $(BOARD)$(if $(SUBTARGET),-$(SUBTARGET)) OPENWRT_TARGET := $(BOARD)$(if $(SUBTARGET),-$(SUBTARGET))
export LEDE_TARGET export OPENWRT_TARGET
CheckTarget := [ '$(LEDE_TARGET)' ] \ CheckTarget := [ '$(OPENWRT_TARGET)' ] \
|| (echo 'Please set GLUON_TARGET to a valid target. Gluon supports the following targets:'; $(foreach target,$(GLUON_TARGETS),echo ' * $(target)';) false) || (echo 'Please set GLUON_TARGET to a valid target. Gluon supports the following targets:'; $(foreach target,$(GLUON_TARGETS),echo ' * $(target)';) false)
CheckExternal := test -d lede || (echo 'You don'"'"'t seem to have obtained the external repositories needed by Gluon; please call `make update` first!'; false) CheckExternal := test -d openwrt || (echo 'You don'"'"'t seem to have obtained the external repositories needed by Gluon; please call `make update` first!'; false)
define CheckSite define CheckSite
@GLUON_SITEDIR='$(GLUON_SITEDIR)' GLUON_SITE_CONFIG='$(1).conf' $(LUA) scripts/site_config.lua \ @GLUON_SITEDIR='$(GLUON_SITEDIR)' GLUON_SITE_CONFIG='$(1).conf' $(LUA) scripts/site_config.lua \
...@@ -126,21 +126,21 @@ config: FORCE ...@@ -126,21 +126,21 @@ config: FORCE
@$(GLUON_CONFIG_VARS) \ @$(GLUON_CONFIG_VARS) \
scripts/target_config.sh '$(GLUON_TARGET)' '$(GLUON_PACKAGES)' \ scripts/target_config.sh '$(GLUON_TARGET)' '$(GLUON_PACKAGES)' \
> lede/.config > openwrt/.config
+@$(LEDEMAKE) defconfig +@$(OPENWRTMAKE) defconfig
@$(GLUON_CONFIG_VARS) \ @$(GLUON_CONFIG_VARS) \
scripts/target_config_check.sh '$(GLUON_TARGET)' '$(GLUON_PACKAGES)' scripts/target_config_check.sh '$(GLUON_TARGET)' '$(GLUON_PACKAGES)'
LUA := lede/staging_dir/hostpkg/bin/lua LUA := openwrt/staging_dir/hostpkg/bin/lua
$(LUA): $(LUA):
@$(CheckExternal) @$(CheckExternal)
+@[ -e lede/.config ] || $(LEDEMAKE) defconfig +@[ -e openwrt/.config ] || $(OPENWRTMAKE) defconfig
+@$(LEDEMAKE) tools/install +@$(OPENWRTMAKE) tools/install
+@$(LEDEMAKE) package/lua/host/install +@$(OPENWRTMAKE) package/lua/host/compile
prepare-target: config $(LUA) ; prepare-target: config $(LUA) ;
...@@ -148,15 +148,15 @@ all: prepare-target ...@@ -148,15 +148,15 @@ all: prepare-target
$(foreach conf,site $(patsubst $(GLUON_SITEDIR)/%.conf,%,$(wildcard $(GLUON_SITEDIR)/domains/*.conf)),$(call CheckSite,$(conf))) $(foreach conf,site $(patsubst $(GLUON_SITEDIR)/%.conf,%,$(wildcard $(GLUON_SITEDIR)/domains/*.conf)),$(call CheckSite,$(conf)))
@scripts/clean_output.sh @scripts/clean_output.sh
+@$(LEDEMAKE) +@$(OPENWRTMAKE)
@GLUON_SITEDIR='$(GLUON_SITEDIR)' scripts/copy_output.sh '$(GLUON_TARGET)' @GLUON_SITEDIR='$(GLUON_SITEDIR)' scripts/copy_output.sh '$(GLUON_TARGET)'
clean download: config clean download: config
+@$(LEDEMAKE) $@ +@$(OPENWRTMAKE) $@
dirclean: FORCE dirclean: FORCE
+@[ -e lede/.config ] || $(LEDEMAKE) defconfig +@[ -e openwrt/.config ] || $(OPENWRTMAKE) defconfig
+@$(LEDEMAKE) dirclean +@$(OPENWRTMAKE) dirclean
@rm -rf $(GLUON_TMPDIR) $(GLUON_OUTPUTDIR) @rm -rf $(GLUON_TMPDIR) $(GLUON_OUTPUTDIR)
manifest: $(LUA) FORCE manifest: $(LUA) FORCE
......
...@@ -14,7 +14,7 @@ is a requirement. ...@@ -14,7 +14,7 @@ is a requirement.
Adding profiles Adding profiles
--------------- ---------------
The vast majority of devices with ath9k WLAN is based on the ar71xx target of LEDE. The vast majority of devices with ath9k WLAN is based on the ar71xx target of OpenWrt.
If the hardware you want to add support for is ar71xx, adding a new profile If the hardware you want to add support for is ar71xx, adding a new profile
is sufficient. is sufficient.
...@@ -35,9 +35,9 @@ While porting Gluon to a new device, it might happen that the profile name is un ...@@ -35,9 +35,9 @@ While porting Gluon to a new device, it might happen that the profile name is un
known. Best practise is to generate an image first by using an arbitrary value known. Best practise is to generate an image first by using an arbitrary value
and then executing the lua command on the device and use its output from then on. and then executing the lua command on the device and use its output from then on.
The second parameter defines the name of the image files generated by LEDE. Usually, The second parameter defines the name of the image files generated by OpenWrt. Usually,
it is also the LEDE profile name; for devices that still use the old image build it is also the OpenWrt profile name; for devices that still use the old image build
code, a third parameter with the LEDE profile name can be passed. The profile names code, a third parameter with the OpenWrt profile name can be passed. The profile names
can be found in the image Makefiles in ``lede/target/linux/<target>/image/Makefile``. can be found in the image Makefiles in ``lede/target/linux/<target>/image/Makefile``.
Examples:: Examples::
...@@ -49,7 +49,7 @@ Suffixes and extensions ...@@ -49,7 +49,7 @@ Suffixes and extensions
''''''''''''''''''''''' '''''''''''''''''''''''
By default, image files are expected to have the extension ``.bin``. In addition, By default, image files are expected to have the extension ``.bin``. In addition,
the images generated by LEDE have a suffix before the extension that defaults to the images generated by OpenWrt have a suffix before the extension that defaults to
``-squashfs-factory`` and ``-squashfs-sysupgrade``. ``-squashfs-factory`` and ``-squashfs-sysupgrade``.
This can be changed using the ``factory`` and ``sysupgrade`` commands, either at This can be changed using the ``factory`` and ``sysupgrade`` commands, either at
...@@ -66,14 +66,14 @@ are given, this signals that no factory (or sysupgrade) image exists. ...@@ -66,14 +66,14 @@ are given, this signals that no factory (or sysupgrade) image exists.
Aliases Aliases
''''''' '''''''
Sometimes multiple models use the same LEDE images. In this case, the ``alias`` Sometimes multiple models use the same OpenWrt images. In this case, the ``alias``
command can be used to create symlinks and additional entries in the autoupdater command can be used to create symlinks and additional entries in the autoupdater
manifest for the alternative models. manifest for the alternative models.
Standalone images Standalone images
''''''''''''''''' '''''''''''''''''
On targets without *per-device rootfs* support in LEDE, the commands described above On targets without *per-device rootfs* support in OpenWrt, the commands described above
can't be used. Instead, ``factory_image`` and ``sysupgrade_image`` are used:: can't be used. Instead, ``factory_image`` and ``sysupgrade_image`` are used::
factory_image PROFILE IMAGE .EXT factory_image PROFILE IMAGE .EXT
...@@ -81,14 +81,14 @@ can't be used. Instead, ``factory_image`` and ``sysupgrade_image`` are used:: ...@@ -81,14 +81,14 @@ can't be used. Instead, ``factory_image`` and ``sysupgrade_image`` are used::
Again, the profile name must match the value printed by the aforementioned Lua Again, the profile name must match the value printed by the aforementioned Lua
command. The image name must match the part between the target name and the extension command. The image name must match the part between the target name and the extension
as generated by LEDE and is to be omitted when no such part exists. as generated by OpenWrt and is to be omitted when no such part exists.
Packages Packages
'''''''' ''''''''
The ``packages`` command takes an arbitrary number of arguments. Each argument The ``packages`` command takes an arbitrary number of arguments. Each argument
defines an additional package to include in the images in addition to the default defines an additional package to include in the images in addition to the default
package sets defined by LEDE. When a package name is prefixed by a minus sign, the package sets defined by OpenWrt. When a package name is prefixed by a minus sign, the
packages are excluded instead. packages are excluded instead.
The ``packages`` command may be used at the top of a target definition to modify The ``packages`` command may be used at the top of a target definition to modify
...@@ -99,7 +99,7 @@ target supports *per-default rootfs*). ...@@ -99,7 +99,7 @@ target supports *per-default rootfs*).
Configuration Configuration
''''''''''''' '''''''''''''
The ``config`` command allows to add arbitary target-specific LEDE configuration The ``config`` command allows to add arbitary target-specific OpenWrt configuration
to be emitted to ``.config``. to be emitted to ``.config``.
Notes Notes
...@@ -109,7 +109,7 @@ On devices with multiple WLAN adapters, care must also be taken that the primary ...@@ -109,7 +109,7 @@ On devices with multiple WLAN adapters, care must also be taken that the primary
configured correctly. ``/lib/gluon/core/sysconfig/primary_mac`` should contain the MAC address which configured correctly. ``/lib/gluon/core/sysconfig/primary_mac`` should contain the MAC address which
can be found on a label on most hardware; if it does not, ``/lib/gluon/upgrade/010-primary-mac`` can be found on a label on most hardware; if it does not, ``/lib/gluon/upgrade/010-primary-mac``
in ``gluon-core`` might need a fix. (There have also been cases in which the address was incorrect in ``gluon-core`` might need a fix. (There have also been cases in which the address was incorrect
even on devices with only one WLAN adapter, in these cases a LEDE bug was the cause). even on devices with only one WLAN adapter, in these cases a OpenWrt bug was the cause).
Adding support for new hardware targets Adding support for new hardware targets
...@@ -137,8 +137,8 @@ Build system support ...@@ -137,8 +137,8 @@ Build system support
A definition for the new target must be created under ``targets``, and it must be added A definition for the new target must be created under ``targets``, and it must be added
to ``targets/targets.mk``. The ``GluonTarget`` macro takes one to three arguments: to ``targets/targets.mk``. The ``GluonTarget`` macro takes one to three arguments:
the target name, the Gluon subtarget name (if the target has subtargets), and the the target name, the Gluon subtarget name (if the target has subtargets), and the
LEDE subtarget name (if it differs from the Gluon subtarget). The third argument OpenWrt subtarget name (if it differs from the Gluon subtarget). The third argument
can be used to define multiple Gluon targets with different configuration for the can be used to define multiple Gluon targets with different configuration for the
same LEDE target, like it is done for the ``ar71xx-tiny`` target. same OpenWrt target, like it is done for the ``ar71xx-tiny`` target.
After this, is should be sufficient to call ``make GLUON_TARGET=<target>`` to build the images for the new target. After this, is should be sufficient to call ``make GLUON_TARGET=<target>`` to build the images for the new target.
...@@ -58,7 +58,7 @@ script in the ``contrib`` directory: ...@@ -58,7 +58,7 @@ script in the ``contrib`` directory:
The same command can be run again to update the template. The same command can be run again to update the template.
In addition, the Makefile must be adjusted. Instead of LEDE's default *package.mk*, In addition, the Makefile must be adjusted. Instead of OpenWrt's default *package.mk*,
the Gluon version (``../gluon.mk`` for core packages) must be used. The i18n files must be installed the Gluon version (``../gluon.mk`` for core packages) must be used. The i18n files must be installed
and PKG_CONFIG_DEPENDS must be added:: and PKG_CONFIG_DEPENDS must be added::
......
...@@ -19,7 +19,7 @@ GLUON_FEATURES := \ ...@@ -19,7 +19,7 @@ GLUON_FEATURES := \
web-wizard web-wizard
## GLUON_SITE_PACKAGES ## GLUON_SITE_PACKAGES
# Specify additional Gluon/LEDE packages to include here; # Specify additional Gluon/OpenWrt packages to include here;
# A minus sign may be prepended to remove a packages from the # A minus sign may be prepended to remove a packages from the
# selection that would be enabled by default or due to the # selection that would be enabled by default or due to the
# chosen feature flags # chosen feature flags
......
...@@ -94,7 +94,7 @@ You should generally reserve 5GB of disk space and additionally about 10GB for e ...@@ -94,7 +94,7 @@ You should generally reserve 5GB of disk space and additionally about 10GB for e
The built images can be found in the directory `output/images`. Of these, the `factory` The built images can be found in the directory `output/images`. Of these, the `factory`
images are to be used when flashing from the original firmware a device came with, images are to be used when flashing from the original firmware a device came with,
and `sysupgrade` is to upgrade from other versions of Gluon or any other OpenWrt/LEDE-based and `sysupgrade` is to upgrade from other versions of Gluon or any other OpenWrt-based
system. system.
**Note:** The images for some models are identical; to save disk space, symlinks are generated instead **Note:** The images for some models are identical; to save disk space, symlinks are generated instead
...@@ -122,12 +122,12 @@ will clean the entire tree, so the toolchain will be rebuilt as well, which will ...@@ -122,12 +122,12 @@ will clean the entire tree, so the toolchain will be rebuilt as well, which will
opkg repositories opkg repositories
----------------- -----------------
Gluon is mostly compatible with LEDE, so the normal LEDE package repositories Gluon is mostly compatible with OpenWrt, so the normal OpenWrt package repositories
can be used for Gluon as well. can be used for Gluon as well.
This is not true for kernel modules; the Gluon kernel is incompatible with the This is not true for kernel modules; the Gluon kernel is incompatible with the
kernel of the default LEDE images. Therefore, Gluon will not only generate images, kernel of the default OpenWrt images. Therefore, Gluon will not only generate images,
but also an opkg repository containing all core packages provided by LEDE, but also an opkg repository containing all core packages provided by OpenWrt,
including modules for the kernel of the generated images. including modules for the kernel of the generated images.
Signing keys Signing keys
...@@ -136,11 +136,11 @@ Signing keys ...@@ -136,11 +136,11 @@ Signing keys
Gluon does not support HTTPS for downloading packages; fortunately, opkg deploys Gluon does not support HTTPS for downloading packages; fortunately, opkg deploys
public-key cryptography to ensure package integrity. public-key cryptography to ensure package integrity.
The Gluon images will contain public keys from two sources: the official LEDE keyring The Gluon images will contain public keys from two sources: the official OpenWrt keyring
(to allow installing userspace packages) and a Gluon-specific key (which is used (to allow installing userspace packages) and a Gluon-specific key (which is used
to sign the generated package repository). to sign the generated package repository).
LEDE will handle the generation and handling of the keys itself. OpenWrt will handle the generation and handling of the keys itself.
When making firmware releases based on Gluon, it might make sense to store When making firmware releases based on Gluon, it might make sense to store
the keypair, so updating the module repository later is possible. the keypair, so updating the module repository later is possible.
......
...@@ -67,8 +67,8 @@ opkg \: optional ...@@ -67,8 +67,8 @@ opkg \: optional
There are two optional fields in the ``opkg`` section: There are two optional fields in the ``opkg`` section:
- ``lede`` overrides the default LEDE repository URL. The default URL would - ``openwrt`` overrides the default OpenWrt repository URL. The default URL would
correspond to ``http://downloads.lede-project.org/snapshots/packages/%A`` correspond to ``http://downloads.openwrt.org/snapshots/packages/%A``
and usually doesn't need to be changed when nodes are expected to have IPv6 and usually doesn't need to be changed when nodes are expected to have IPv6
internet connectivity. internet connectivity.
- ``extra`` specifies a table of additional repositories (with arbitrary keys) - ``extra`` specifies a table of additional repositories (with arbitrary keys)
...@@ -76,7 +76,7 @@ opkg \: optional ...@@ -76,7 +76,7 @@ opkg \: optional
:: ::
opkg = { opkg = {
lede = 'http://opkg.services.ffac/lede/snapshots/packages/%A', openwrt = 'http://opkg.services.ffac/openwrt/snapshots/packages/%A',
extra = { extra = {
gluon = 'http://opkg.services.ffac/modules/gluon-%GS-%GR/%S', gluon = 'http://opkg.services.ffac/modules/gluon-%GS-%GR/%S',
}, },
...@@ -84,8 +84,8 @@ opkg \: optional ...@@ -84,8 +84,8 @@ opkg \: optional
There are various patterns which can be used in the URLs: There are various patterns which can be used in the URLs:
- ``%n`` is replaced by the LEDE version codename - ``%d`` is replaced by the OpenWrt distribution name ("openwrt")
- ``%v`` is replaced by the LEDE version number (e.g. "17.01") - ``%v`` is replaced by the OpenWrt version number (e.g. "17.01")
- ``%S`` is replaced by the target board (e.g. "ar71xx/generic") - ``%S`` is replaced by the target board (e.g. "ar71xx/generic")
- ``%A`` is replaced by the target architecture (e.g. "mips_24kc") - ``%A`` is replaced by the target architecture (e.g. "mips_24kc")
- ``%GS`` is replaced by the Gluon site code (as specified in ``site.conf``) - ``%GS`` is replaced by the Gluon site code (as specified in ``site.conf``)
......
GLUON_FEEDS='openwrt gluon routing luci' GLUON_FEEDS='packages routing luci gluon'
LEDE_REPO=https://git.openwrt.org/openwrt/openwrt.git OPENWRT_REPO=https://git.openwrt.org/openwrt/openwrt.git
LEDE_BRANCH=lede-17.01 OPENWRT_BRANCH=openwrt-18.06
LEDE_COMMIT=b6a1f43075f96b0028e33ed1af1fe31068791d24 OPENWRT_COMMIT=b84a07b3803bd39d0a1eb1b040718a023b8f7971
PACKAGES_OPENWRT_REPO=https://github.com/openwrt/packages.git PACKAGES_PACKAGES_REPO=https://github.com/openwrt/packages.git
PACKAGES_OPENWRT_BRANCH=lede-17.01 PACKAGES_PACKAGES_BRANCH=openwrt-18.06
PACKAGES_OPENWRT_COMMIT=338690b2f79e2c7090be4e9adbb19b452c9e3c36 PACKAGES_PACKAGES_COMMIT=05b9aceb00725b69220defaaad11f24b63731ac3
PACKAGES_GLUON_REPO=https://github.com/freifunk-gluon/packages.git
PACKAGES_GLUON_COMMIT=be2c35785994e443d895225c7240474a46f64f5e
PACKAGES_ROUTING_REPO=https://github.com/openwrt-routing/packages.git PACKAGES_ROUTING_REPO=https://github.com/openwrt-routing/packages.git
PACKAGES_ROUTING_BRANCH=openwrt-18.06 PACKAGES_ROUTING_BRANCH=openwrt-18.06
PACKAGES_ROUTING_COMMIT=1b9d1c419f0ecefda51922a7845ab2183d6acd76 PACKAGES_ROUTING_COMMIT=1b9d1c419f0ecefda51922a7845ab2183d6acd76
PACKAGES_LUCI_REPO=https://github.com/openwrt/luci.git PACKAGES_LUCI_REPO=https://github.com/openwrt/luci.git
PACKAGES_LUCI_BRANCH=lede-17.01 PACKAGES_LUCI_BRANCH=openwrt-18.06
PACKAGES_LUCI_COMMIT=1f014bd2180b364bec4c3f6457f72a0621884f9a PACKAGES_LUCI_COMMIT=4ba85e3d82b684262c570e38a72d2dc3bb712a13
PACKAGES_GLUON_REPO=https://github.com/freifunk-gluon/packages.git
PACKAGES_GLUON_COMMIT=be2c35785994e443d895225c7240474a46f64f5e
# LEDE doesn't have a nice way to set the list of feeds in
# /etc/opkg/distfeeds.conf, so we use this overlay file (which is included by
# the opkg package Makefile though LEDE's IncludeOverlay mechanism).
# The following definitions make /etc/opkg/distfeeds.conf match the one included
# in official LEDE builds (by default, FEEDS_DISABLED contains the original list
# of feeds (which are unused by Gluon), and FEEDS_ENABLED our own feed list).
FEEDS_ENABLED := $(FEEDS_DISABLED)
FEEDS_DISABLED :=
...@@ -23,7 +23,7 @@ end ...@@ -23,7 +23,7 @@ end
need_string_match(in_domain({'domain_seed'}), '^' .. ('%x'):rep(64) .. '$') need_string_match(in_domain({'domain_seed'}), '^' .. ('%x'):rep(64) .. '$')
need_string({'opkg', 'lede'}, false) need_string({'opkg', 'openwrt'}, false)
need_table({'opkg', 'extra'}, function(extra_repo) need_table({'opkg', 'extra'}, function(extra_repo)
need_alphanumeric_key(extra_repo) need_alphanumeric_key(extra_repo)
need_string(extra_repo) need_string(extra_repo)
......
...@@ -14,8 +14,8 @@ local util = require 'gluon.util' ...@@ -14,8 +14,8 @@ local util = require 'gluon.util'
local subst = {} local subst = {}
local f = io.popen('. /etc/openwrt_release; echo "$DISTRIB_CODENAME"; echo "$DISTRIB_RELEASE"; echo "$DISTRIB_TARGET"; echo "$DISTRIB_ARCH"') local f = io.popen('. /etc/os-release; echo "$ID"; echo "$VERSION_ID"; echo "$LEDE_BOARD"; echo "$LEDE_ARCH"')
subst['%%n'] = f:read() subst['%%d'] = f:read()
subst['%%v'] = f:read():gsub('-SNAPSHOT', '') subst['%%v'] = f:read():gsub('-SNAPSHOT', '')
subst['%%S'] = f:read() subst['%%S'] = f:read()
subst['%%A'] = f:read() subst['%%A'] = f:read()
...@@ -25,7 +25,7 @@ subst['%%GS'] = site.site_code() ...@@ -25,7 +25,7 @@ subst['%%GS'] = site.site_code()
subst['%%GV'] = util.trim(fs.readfile('/lib/gluon/gluon-version')) subst['%%GV'] = util.trim(fs.readfile('/lib/gluon/gluon-version'))
subst['%%GR'] = util.trim(fs.readfile('/lib/gluon/release')) subst['%%GR'] = util.trim(fs.readfile('/lib/gluon/release'))
local prefix = subst['%%n'] .. '_' local prefix = subst['%%d'] .. '_'
local function replace_patterns(url) local function replace_patterns(url)
...@@ -37,7 +37,7 @@ local function replace_patterns(url) ...@@ -37,7 +37,7 @@ local function replace_patterns(url)
end end
local lede = site.opkg.lede() local openwrt = site.opkg.openwrt()
local extra = site.opkg.extra({}) local extra = site.opkg.extra({})
...@@ -52,8 +52,8 @@ for _, line in ipairs(distfeeds) do ...@@ -52,8 +52,8 @@ for _, line in ipairs(distfeeds) do
local name = line:match('^src/gz%s' .. prefix .. '(%S+)%s') local name = line:match('^src/gz%s' .. prefix .. '(%S+)%s')
if name == 'core' then if name == 'core' then
f:write('# ' .. line .. '\n') f:write('# ' .. line .. '\n')
elseif name and lede then elseif name and openwrt then
f:write(string.format('src/gz %s %s/%s\n', prefix .. name, replace_patterns(lede), name)) f:write(string.format('src/gz %s %s/%s\n', prefix .. name, replace_patterns(openwrt), name))
else else
f:write(line .. '\n') f:write(line .. '\n')
end end
......
From: Matthias Schiffer <mschiffer@universe-factory.net>
Date: Sat, 14 Jan 2017 18:13:14 +0100
Subject: build: move STAGING_DIR_HOSTPKG and BUILD_DIR_HOST back to a common directory for all targets
$(STAGING_DIR)/host is kept in addition to $(STAGING_DIR_HOSTPKG) in most
places; it is still used as destination for host files in Build/InstallDev.
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
diff --git a/Makefile b/Makefile
index b220dfd3c56a11f3e27d70e3d6e58cc6448abd2f..c1a7285c83df310e987eaef8376500d2b614eafb 100644
--- a/Makefile
+++ b/Makefile
@@ -55,7 +55,7 @@ clean: FORCE
rm -rf $(BUILD_DIR) $(STAGING_DIR) $(BIN_DIR) $(OUTPUT_DIR)/packages/$(ARCH_PACKAGES) $(BUILD_LOG_DIR) $(TOPDIR)/staging_dir/packages
dirclean: clean
- rm -rf $(STAGING_DIR_HOST) $(TOOLCHAIN_DIR) $(BUILD_DIR_HOST) $(BUILD_DIR_TOOLCHAIN)
+ rm -rf $(STAGING_DIR_HOST) $(STAGING_DIR_HOSTPKG) $(TOOLCHAIN_DIR) $(BUILD_DIR_BASE)/host $(BUILD_DIR_BASE)/hostpkg $(BUILD_DIR_TOOLCHAIN)
rm -rf $(TMP_DIR)
ifndef DUMP_TARGET_DB
diff --git a/include/autotools.mk b/include/autotools.mk
index c6aa47e0bef311697b4def7a7183d1ac59dcf599..7bd400ab36d052b39fcb76a66873c8673eb189a0 100644
--- a/include/autotools.mk
+++ b/include/autotools.mk
@@ -75,7 +75,7 @@ define autoreconf_target
$(strip $(call autoreconf, \
$(PKG_BUILD_DIR), $(PKG_REMOVE_FILES), \
$(PKG_AUTOMAKE_PATHS), $(PKG_LIBTOOL_PATHS), \
- $(STAGING_DIR)/host/share/aclocal $(STAGING_DIR)/usr/share/aclocal $(PKG_MACRO_PATHS)))
+ $(STAGING_DIR)/host/share/aclocal $(STAGING_DIR_HOSTPKG)/share/aclocal $(STAGING_DIR)/usr/share/aclocal $(PKG_MACRO_PATHS)))
endef
define patch_libtool_target
diff --git a/include/cmake.mk b/include/cmake.mk
index 5a403cbf41e2bbd6bdb843492639a01aff8cf75b..900dae1d4afc6007f8ac04179dd7f0922a07d4fa 100644
--- a/include/cmake.mk
+++ b/include/cmake.mk
@@ -34,7 +34,7 @@ CMAKE_NM:=$(call cmake_tool,$(TARGET_NM))
CMAKE_RANLIB:=$(call cmake_tool,$(TARGET_RANLIB))
CMAKE_FIND_ROOT_PATH:=$(STAGING_DIR)/usr;$(TOOLCHAIN_DIR)$(if $(CONFIG_EXTERNAL_TOOLCHAIN),;$(CONFIG_TOOLCHAIN_ROOT))
-CMAKE_HOST_FIND_ROOT_PATH:=$(STAGING_DIR)/host;$(STAGING_DIR_HOST)
+CMAKE_HOST_FIND_ROOT_PATH:=$(STAGING_DIR)/host;$(STAGING_DIR_HOSTPKG);$(STAGING_DIR_HOST)
CMAKE_SHARED_LDFLAGS:=-Wl,-Bsymbolic-functions
define Build/Configure/Default
diff --git a/include/host-build.mk b/include/host-build.mk
index 5fcec7ebf48361100d29c5925beaae4f36d5ac7b..485f09a6b71b881692b5ee575927397259bbac24 100644
--- a/include/host-build.mk
+++ b/include/host-build.mk
@@ -126,7 +126,7 @@ ifneq ($(if $(HOST_QUILT),,$(CONFIG_AUTOREBUILD)),)
endif
define Host/Exports/Default
- $(1) : export ACLOCAL_INCLUDE=$$(foreach p,$$(wildcard $$(STAGING_DIR_HOST)/share/aclocal $$(STAGING_DIR_HOST)/share/aclocal-* $(if $(IS_PACKAGE_BUILD),$$(STAGING_DIR)/host/share/aclocal $$(STAGING_DIR)/host/share/aclocal-*)),-I $$(p))
+ $(1) : export ACLOCAL_INCLUDE=$$(foreach p,$$(wildcard $$(STAGING_DIR_HOST)/share/aclocal $$(STAGING_DIR_HOST)/share/aclocal-* $(if $(IS_PACKAGE_BUILD),$$(STAGING_DIR)/host/share/aclocal $$(STAGING_DIR_HOSTPKG)/share/aclocal $$(STAGING_DIR)/host/share/aclocal-*)),-I $$(p))
$(1) : export STAGING_PREFIX=$$(HOST_BUILD_PREFIX)
$(1) : export PKG_CONFIG_PATH=$$(STAGING_DIR_HOST)/lib/pkgconfig:$$(HOST_BUILD_PREFIX)/lib/pkgconfig
$(1) : export PKG_CONFIG_LIBDIR=$$(HOST_BUILD_PREFIX)/lib/pkgconfig
diff --git a/include/package.mk b/include/package.mk
index e9989ab13ec81a8751ee7245639ee0b82b9a87b2..7f77c4e99b1e9b79503963c497c4c87d7af9d71a 100644
--- a/include/package.mk
+++ b/include/package.mk
@@ -130,7 +130,7 @@ ifdef USE_SOURCE_DIR
endif
define Build/Exports/Default
- $(1) : export ACLOCAL_INCLUDE=$$(foreach p,$$(wildcard $$(STAGING_DIR)/usr/share/aclocal $$(STAGING_DIR)/usr/share/aclocal-* $$(STAGING_DIR)/host/share/aclocal $$(STAGING_DIR)/host/share/aclocal-*),-I $$(p))
+ $(1) : export ACLOCAL_INCLUDE=$$(foreach p,$$(wildcard $$(STAGING_DIR)/usr/share/aclocal $$(STAGING_DIR)/usr/share/aclocal-* $$(STAGING_DIR_HOSTPKG)/share/aclocal $$(STAGING_DIR_HOSTPKG)/share/aclocal-* $$(STAGING_DIR)/host/share/aclocal $$(STAGING_DIR)/host/share/aclocal-*),-I $$(p))
$(1) : export STAGING_PREFIX=$$(STAGING_DIR)/usr
$(1) : export PATH=$$(TARGET_PATH_PKG)
$(1) : export CONFIG_SITE:=$$(CONFIG_SITE)
diff --git a/rules.mk b/rules.mk
index 5710a84fe7ad24e45acb2ef62ee29eab37e8de06..b678e9bea5bc146a3c515d93003415cd21882068 100644
--- a/rules.mk
+++ b/rules.mk
@@ -147,9 +147,9 @@ STAGING_DIR_ROOT:=$(STAGING_DIR)/root-$(BOARD)
BUILD_LOG_DIR:=$(TOPDIR)/logs
PKG_INFO_DIR := $(STAGING_DIR)/pkginfo
-BUILD_DIR_HOST:=$(if $(IS_PACKAGE_BUILD),$(BUILD_DIR)/host,$(BUILD_DIR_BASE)/host)
+BUILD_DIR_HOST:=$(if $(IS_PACKAGE_BUILD),$(BUILD_DIR_BASE)/hostpkg,$(BUILD_DIR_BASE)/host)
STAGING_DIR_HOST:=$(TOPDIR)/staging_dir/host
-STAGING_DIR_HOSTPKG:=$(STAGING_DIR)/host
+STAGING_DIR_HOSTPKG:=$(TOPDIR)/staging_dir/hostpkg
TARGET_PATH:=$(subst $(space),:,$(filter-out .,$(filter-out ./,$(subst :,$(space),$(PATH)))))
TARGET_INIT_PATH:=$(call qstrip,$(CONFIG_TARGET_INIT_PATH))
@@ -208,7 +208,7 @@ ifndef DUMP
endif
endif
endif
-TARGET_PATH_PKG:=$(STAGING_DIR)/host/bin:$(TARGET_PATH)
+TARGET_PATH_PKG:=$(STAGING_DIR)/host/bin:$(STAGING_DIR_HOSTPKG)/bin:$(TARGET_PATH)
ifeq ($(CONFIG_SOFT_FLOAT),y)
SOFT_FLOAT_CONFIG_OPTION:=--with-float=soft
@@ -234,9 +234,9 @@ export PKG_CONFIG
HOSTCC:=gcc
HOSTCXX:=g++
-HOST_CPPFLAGS:=-I$(STAGING_DIR_HOST)/include -I$(STAGING_DIR_HOST)/usr/include $(if $(IS_PACKAGE_BUILD),-I$(STAGING_DIR)/host/include)
+HOST_CPPFLAGS:=-I$(STAGING_DIR_HOST)/include -I$(STAGING_DIR_HOST)/usr/include $(if $(IS_PACKAGE_BUILD),-I$(STAGING_DIR_HOSTPKG)/include -I$(STAGING_DIR)/host/include)
HOST_CFLAGS:=-O2 $(HOST_CPPFLAGS)
-HOST_LDFLAGS:=-L$(STAGING_DIR_HOST)/lib -L$(STAGING_DIR_HOST)/usr/lib $(if $(IS_PACKAGE_BUILD),-L$(STAGING_DIR)/host/lib)
+HOST_LDFLAGS:=-L$(STAGING_DIR_HOST)/lib -L$(STAGING_DIR_HOST)/usr/lib $(if $(IS_PACKAGE_BUILD),-L$(STAGING_DIR_HOSTPKG)/lib -L$(STAGING_DIR)/host/lib)
ifeq ($(CONFIG_EXTERNAL_TOOLCHAIN),)
TARGET_AR:=$(TARGET_CROSS)gcc-ar
From: Matthias Schiffer <mschiffer@universe-factory.net>
Date: Thu, 19 Jan 2017 00:03:32 +0100
Subject: rules.mk: export STAGING_DIR_HOSTPKG
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
diff --git a/rules.mk b/rules.mk
index b678e9bea5bc146a3c515d93003415cd21882068..16cab67d5d1b8b130a0ffddc81789e798cda338e 100644
--- a/rules.mk
+++ b/rules.mk
@@ -225,7 +225,7 @@ else
endif
export PATH:=$(TARGET_PATH)
-export STAGING_DIR STAGING_DIR_HOST
+export STAGING_DIR STAGING_DIR_HOST STAGING_DIR_HOSTPKG
export SH_FUNC:=. $(INCLUDE_DIR)/shell.sh;
PKG_CONFIG:=$(STAGING_DIR_HOST)/bin/pkg-config
From: Matthias Schiffer <mschiffer@universe-factory.net>
Date: Thu, 19 Jan 2017 00:04:09 +0100
Subject: gettext-full: fix to use $STAGING_DIR_HOSTPKG instead of $STAGING_DIR/host
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
diff --git a/package/libs/gettext-full/patches/000-relocatable.patch b/package/libs/gettext-full/patches/000-relocatable.patch
index c14be728367b57c08024d848cf8ff847cfe865be..a95c268f5bc94ed8ec3784ae2044aa77e0322491 100644
--- a/package/libs/gettext-full/patches/000-relocatable.patch
+++ b/package/libs/gettext-full/patches/000-relocatable.patch
@@ -5,8 +5,8 @@
# Set variables
# - gettext_datadir directory where the data files are stored.
-prefix="@prefix@"
-+if [ -n "$STAGING_DIR" ]; then
-+ prefix="$STAGING_DIR/host"
++if [ -n "$STAGING_DIR_HOSTPKG" ]; then
++ prefix="$STAGING_DIR_HOSTPKG"
+else
+ prefix="@prefix@"
+fi
@@ -20,8 +20,8 @@
# Set variables
# - gettext_datadir directory where the data files are stored.
-prefix="@prefix@"
-+if [ -n "$STAGING_DIR" ]; then
-+ prefix="$STAGING_DIR/host"
++if [ -n "$STAGING_DIR_HOSTPKG" ]; then
++ prefix="$STAGING_DIR_HOSTPKG"
+else
+ prefix="@prefix@"
+fi
From: Matthias Schiffer <mschiffer@universe-factory.net>
Date: Fri, 10 Mar 2017 01:58:42 +0100
Subject: netifd: update to git HEAD version
91810ec system-linux: add VXLAN support
f107656 netifd: Add option to configure locktime for each device
cdc0e80 interface: add prefix assignment priority support
6397f5e device: add veth support
6228d0f wireless: fix _wireless_add_process
7cc2f10 treewide: fix white space errors
diff --git a/package/network/config/netifd/Makefile b/package/network/config/netifd/Makefile
index fb035864017df739a0d0b0c0451fe8488a40c77c..d6d91ba014c67f126176eba8acae5fd2c8b007ba 100644
--- a/package/network/config/netifd/Makefile
+++ b/package/network/config/netifd/Makefile
@@ -5,9 +5,9 @@ PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL=$(LEDE_GIT)/project/netifd.git
-PKG_SOURCE_DATE:=2017-01-25
-PKG_SOURCE_VERSION:=650758b16e5185505a3fbc1307949340af70b611
-PKG_MIRROR_HASH:=d09c740bc1bf6269678bd75c9af52ecd4be3d1d59402a543ceb9d4459cecfa2b
+PKG_SOURCE_DATE:=2017-03-07
+PKG_SOURCE_VERSION:=91810ecc13239f3b18c8299de265b4f3531c0017
+PKG_MIRROR_HASH:=51d0a8866c6b004185f1fb83f37e7aed33fc94b72bd85954c773549a57c3c761
PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
PKG_LICENSE:=GPL-2.0
From: Matthias Schiffer <mschiffer@universe-factory.net>
Date: Wed, 12 Apr 2017 02:31:12 +0200
Subject: netifd: ubus: add interface method to trigger renew event
diff --git a/package/network/config/netifd/patches/0001-ubus-add-interface-method-to-trigger-renew-event.patch b/package/network/config/netifd/patches/0001-ubus-add-interface-method-to-trigger-renew-event.patch
new file mode 100644
index 0000000000000000000000000000000000000000..1f59498d421b7e1d3e76a1a38f604181d11c4649
--- /dev/null
+++ b/package/network/config/netifd/patches/0001-ubus-add-interface-method-to-trigger-renew-event.patch
@@ -0,0 +1,73 @@
+From 8b39c2fce4c1da3f3dcd4c6fd305c124714839e8 Mon Sep 17 00:00:00 2001
+Message-Id: <8b39c2fce4c1da3f3dcd4c6fd305c124714839e8.1491956920.git.mschiffer@universe-factory.net>
+From: Matthias Schiffer <mschiffer@universe-factory.net>
+Date: Wed, 12 Apr 2017 02:25:33 +0200
+Subject: [PATCH] ubus: add interface method to trigger renew event
+
+proto-shell handlers may implement all kinds of renew handlers, there
+should be a way to explicitly trigger such a renew.
+
+Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
+---
+ interface.c | 8 ++++++++
+ interface.h | 1 +
+ ubus.c | 14 ++++++++++++++
+ 3 files changed, 23 insertions(+)
+
+--- a/interface.c
++++ b/interface.c
+@@ -1076,6 +1076,14 @@ interface_set_down(struct interface *ifa
+ return 0;
+ }
+
++int interface_renew(struct interface *iface)
++{
++ if (iface->state == IFS_TEARDOWN || iface->state == IFS_DOWN)
++ return -1;
++
++ return interface_proto_event(iface->proto, PROTO_CMD_RENEW, false);
++}
++
+ void
+ interface_start_pending(void)
+ {
+--- a/interface.h
++++ b/interface.h
+@@ -184,6 +184,7 @@ void interface_set_available(struct inte
+ int interface_set_up(struct interface *iface);
+ int interface_set_down(struct interface *iface);
+ void __interface_set_down(struct interface *iface, bool force);
++int interface_renew(struct interface *iface);
+
+ void interface_set_main_dev(struct interface *iface, struct device *dev);
+ void interface_set_l3_dev(struct interface *iface, struct device *dev);
+--- a/ubus.c
++++ b/ubus.c
+@@ -376,6 +376,19 @@ netifd_handle_down(struct ubus_context *
+ return 0;
+ }
+
++static int
++netifd_handle_renew(struct ubus_context *ctx, struct ubus_object *obj,
++ struct ubus_request_data *req, const char *method,
++ struct blob_attr *msg)
++{
++ struct interface *iface;
++
++ iface = container_of(obj, struct interface, ubus);
++ interface_renew(iface);
++
++ return 0;
++}
++
+ static void
+ netifd_add_interface_errors(struct blob_buf *b, struct interface *iface)
+ {
+@@ -912,6 +925,7 @@ netifd_handle_set_data(struct ubus_conte
+ static struct ubus_method iface_object_methods[] = {
+ { .name = "up", .handler = netifd_handle_up },
+ { .name = "down", .handler = netifd_handle_down },
++ { .name = "renew", .handler = netifd_handle_renew },
+ { .name = "status", .handler = netifd_handle_status },
+ { .name = "prepare", .handler = netifd_handle_iface_prepare },
+ { .name = "dump", .handler = netifd_handle_dump },
From: Matthias Schiffer <mschiffer@universe-factory.net>
Date: Thu, 13 Jul 2017 17:15:21 +0200
Subject: procd: switch to latest master
diff --git a/package/system/procd/Makefile b/package/system/procd/Makefile
index b905cb25aa02c4c3f82cbc288ef15648dfd66444..5b92d79332f2ea400041586b92b570d8b633218a 100644
--- a/package/system/procd/Makefile
+++ b/package/system/procd/Makefile
@@ -12,9 +12,9 @@ PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL=$(LEDE_GIT)/project/procd.git
-PKG_SOURCE_DATE:=2018-01-22
-PKG_SOURCE_VERSION:=9a4036fb1b7412ab2ea4f360d2cc7e6a5e0fa6b5
-PKG_MIRROR_HASH:=669f062e9c5228ef9d09cc9904d8ce4651f0b8506a6c2fff27b21e83b26f0abb
+PKG_SOURCE_DATE:=2018-01-23
+PKG_SOURCE_VERSION:=653629f19e591a0827ab39de07b4526bb119a57a
+PKG_MIRROR_HASH:=2e0c3ae45521eea456a8411c8d9ef19ed9a5ed6c0ab38b9496555625fb4ba6a2
CMAKE_INSTALL:=1
PKG_LICENSE:=GPL-2.0
From: Matthias Schiffer <mschiffer@universe-factory.net>
Date: Wed, 3 May 2017 08:27:40 +0200
Subject: procd: clean up trailing whitespace in nand.sh
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
diff --git a/package/system/procd/files/nand.sh b/package/system/procd/files/nand.sh
index ebaaf2aa16009cc1431dbb79ba9f689c8b636069..8a164ee08537014936a8608f5a60fe0e27dcabd6 100644
--- a/package/system/procd/files/nand.sh
+++ b/package/system/procd/files/nand.sh
@@ -194,7 +194,7 @@ nand_upgrade_prepare_ubi() {
nand_do_upgrade_success() {
local conf_tar="/tmp/sysupgrade.tgz"
-
+
sync
[ -f "$conf_tar" ] && nand_restore_config "$conf_tar"
echo "sysupgrade successful"
@@ -231,7 +231,7 @@ nand_upgrade_ubifs() {
local rootfs_length=`(cat $1 | wc -c) 2> /dev/null`
nand_upgrade_prepare_ubi "$rootfs_length" "ubifs" "0" "0"
-
+
local ubidev="$( nand_find_ubi "$CI_UBIPART" )"
local root_ubivol="$(nand_find_volume $ubidev rootfs)"
ubiupdatevol /dev/$root_ubivol -s $rootfs_length $1
From: Matthias Schiffer <mschiffer@universe-factory.net>
Date: Wed, 3 May 2017 08:28:05 +0200
Subject: procd: prepare NAND sysupgrade for making upgraded dynamically linked
Use install_bin to copy upgraded with all dependencies. The old name
/tmp/upgraded is temporarily retained as a symlink to avoid breaking
things.
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
diff --git a/package/system/procd/files/nand.sh b/package/system/procd/files/nand.sh
index 8a164ee08537014936a8608f5a60fe0e27dcabd6..6bd2005344c081df20e5a330a69e49e37225c39f 100644
--- a/package/system/procd/files/nand.sh
+++ b/package/system/procd/files/nand.sh
@@ -333,7 +333,7 @@ nand_upgrade_stage1() {
[ "$SAVE_CONFIG" != 1 -a -f "$CONF_TAR" ] &&
rm $CONF_TAR
- ubus call system nandupgrade "{\"path\": \"$path\" }"
+ ubus call system nandupgrade "{\"prefix\": \"$RAM_ROOT\", \"path\": \"$path\" }"
exit 0
}
}
@@ -370,6 +370,7 @@ nand_do_platform_check() {
# $(1): file to be used for upgrade
nand_do_upgrade() {
echo -n $1 > /tmp/sysupgrade-nand-path
- cp /sbin/upgraded /tmp/
+ install_bin /sbin/upgraded
+ ln -s "$RAM_ROOT"/sbin/upgraded /tmp/upgraded
nand_upgrade_stage1
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment