Add 'iw' recipe and include in packagegroup-base
v2 cover Add 'iw' recipe and include in packagegroup-base
From: Christopher Larson <[email protected]>
iw uses cfg80211/nl80211, which is the way of the future. wireless-tools uses WEXT, which uses ioctl, which is in deep maintenance mode. See
http://wireless.kernel.org/en/developers/Documentation/Wireless-Extensions.
Also https://wireless.wiki.kernel.org/en/users/Documentation/iw indicates "The old tool iwconfing, which uses Wireless Extensions interface, is deprecated and it's strongly recommended to switch to iw and nl80211."
See also the mailing list thread '[OE-core] iw in place of wireless-tools'.
v2 changes: add Upstream-Status to patch, remove duplicate VIRTUAL-RUNTIME_wireless-tools definition.
The following changes since commit f07045fcae859c902434062d1725f1348f42d1dd:
oeqa/oetest.py: add better package search for hasPackage() (2015-08-26 08:26:37 +0100)
are available in the git repository at:
git://github.com/kergoth/openembedded-core add-iw
https://github.com/kergoth/openembedded-core/tree/add-iw
Christopher Larson (5):
iw: add recipe from meta-networking
iw: inherit pkgconfig
iw: obey our target path variables
iw: support and enable separate build dir
packagegroup-base: pull in iw as well as wireless-tools
meta/conf/distro/include/default-providers.inc | 1 + ....sh-don-t-use-git-describe-for-versioning.patch | 43 ++++++++++++++++ .../iw/iw/separate-objdir.patch | 57 ++++++++++++++++++++++ meta/recipes-connectivity/iw/iw_4.1.bb | 33 +++++++++++++ .../packagegroups/packagegroup-base.bb | 2 +- 5 files changed, 135 insertions(+), 1 deletion(-) create mode 100644 meta/recipes-connectivity/iw/iw/0001-iw-version.sh-don-t-use-git-describe-for-versioning.patch create mode 100644 meta/recipes-connectivity/iw/iw/separate-objdir.patch create mode 100644 meta/recipes-connectivity/iw/iw_4.1.bb
Signature · 1 line
2.2.1
PATCH v2 1/5 iw: add recipe from meta-networking
From: Christopher Larson <[email protected]>
iw uses cfg80211/nl80211, which is the way of the future. wireless-tools uses WEXT, which uses ioctl, which is in deep maintenance mode. See
http://wireless.kernel.org/en/developers/Documentation/Wireless-Extensions.
Also https://wireless.wiki.kernel.org/en/users/Documentation/iw indicates "The old tool iwconfing, which uses Wireless Extensions interface, is deprecated and it's strongly recommended to switch to iw and nl80211."
--- ....sh-don-t-use-git-describe-for-versioning.patch | 43 ++++++++++++++++++++++ meta/recipes-connectivity/iw/iw_4.1.bb | 23 ++++++++++++ 2 files changed, 66 insertions(+) create mode 100644 meta/recipes-connectivity/iw/iw/0001-iw-version.sh-don-t-use-git-describe-for-versioning.patch create mode 100644 meta/recipes-connectivity/iw/iw_4.1.bb
meta/recipes-connectivity/iw/iw/0001-iw-version.sh-don-t-use-git-describe-for-versioning.patch new file +43 -0
@@ -0,0 +1,43 @@ +From 5310abba864cfe3a8b65af130729447604190b29 Mon Sep 17 00:00:00 2001 +From: Koen Kooi <[email protected]> +Date: Tue, 29 Nov 2011 17:03:27 +0100 +Subject: [PATCH] iw: version.sh: don't use git describe for versioning + +It will detect top-level git repositories like the Angstrom setup-scripts and break. + +Upstream-Status: Unknown + +Signed-off-by: Koen Kooi <[email protected]> +--- + version.sh | 16 +--------------- + 1 file changed, 1 insertion(+), 15 deletions(-) + +diff --git a/version.sh b/version.sh +index 11d124b..5d423c4 100755 +--- a/version.sh ++++ b/version.sh +@@ -3,21 +3,7 @@ + VERSION="3.15" + OUT="$1" + +-if [ -d .git ] && head=`git rev-parse --verify HEAD 2>/dev/null`; then +- git update-index --refresh --unmerged > /dev/null +- descr=$(git describe) +- +- # on git builds check that the version number above +- # is correct... +- [ "${descr%%-*}" = "v$VERSION" ] || exit 2 +- +- v="${descr#v}" +- if git diff-index --name-only HEAD | read dummy ; then +- v="$v"-dirty +- fi +-else +- v="$VERSION" +-fi ++v="$VERSION" + + echo '#include "iw.h"' > "$OUT" + echo "const char iw_version[] = \"$v\";" >> "$OUT" +-- +1.7.7.3
meta/recipes-connectivity/iw/iw_4.1.bb new file +23 -0
@@ -0,0 +1,23 @@ +SUMMARY = "nl80211 based CLI configuration utility for wireless devices" +DESCRIPTION = "iw is a new nl80211 based CLI configuration utility for \ +wireless devices. It supports almost all new drivers that have been added \ +to the kernel recently. " +HOMEPAGE = "http://wireless.kernel.org/en/users/Documentation/iw" +SECTION = "base" +LICENSE = "BSD" +LIC_FILES_CHKSUM = "file://COPYING;md5=878618a5c4af25e9b93ef0be1a93f774" + +DEPENDS = "libnl pkgconfig" + +SRC_URI = "http://www.kernel.org/pub/software/network/iw/${BP}.tar.gz \ + file://0001-iw-version.sh-don-t-use-git-describe-for-versioning.patch \ +" + +SRC_URI[md5sum] = "68c282285c71c956069957e9ca10a6a7" +SRC_URI[sha256sum] = "14bfc627b37f7f607e4ffa63a70ded15fa2ea85177f703cb17d7fe36f9c8f33d" + +EXTRA_OEMAKE = "" + +do_install() { + oe_runmake DESTDIR=${D} install +}
Signature · 1 line
2.2.1
PATCH v2 2/5 iw: inherit pkgconfig
From: Christopher Larson <[email protected]>
We want the dep on pkgconfig-native, not pkgconfig, and the convention is to inherit pkgconfig when running pkg-config at build time.
--- meta/recipes-connectivity/iw/iw_4.1.bb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
meta/recipes-connectivity/iw/iw_4.1.bb +3 -1
@@ -7,7 +7,7 @@ SECTION = "base" LICENSE = "BSD" LIC_FILES_CHKSUM = "file://COPYING;md5=878618a5c4af25e9b93ef0be1a93f774" -DEPENDS = "libnl pkgconfig" +DEPENDS = "libnl" SRC_URI = "http://www.kernel.org/pub/software/network/iw/${BP}.tar.gz \ file://0001-iw-version.sh-don-t-use-git-describe-for-versioning.patch \
@@ -16,6 +16,8 @@ SRC_URI = "http://www.kernel.org/pub/software/network/iw/${BP}.tar.gz \ SRC_URI[md5sum] = "68c282285c71c956069957e9ca10a6a7" SRC_URI[sha256sum] = "14bfc627b37f7f607e4ffa63a70ded15fa2ea85177f703cb17d7fe36f9c8f33d" +inherit pkgconfig + EXTRA_OEMAKE = "" do_install() {
Signature · 1 line
2.2.1
PATCH v2 3/5 iw: obey our target path variables
In reply to Christopher LarsonFrom: Christopher Larson <[email protected]>
--- meta/recipes-connectivity/iw/iw_4.1.bb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
meta/recipes-connectivity/iw/iw_4.1.bb +6 -2
@@ -18,8 +18,12 @@ SRC_URI[sha256sum] = "14bfc627b37f7f607e4ffa63a70ded15fa2ea85177f703cb17d7fe36f9 inherit pkgconfig -EXTRA_OEMAKE = "" +EXTRA_OEMAKE = "\ + 'PREFIX=${prefix}' \ + 'SBINDIR=${sbindir}' \ + 'MANDIR=${mandir}' \ +" do_install() { - oe_runmake DESTDIR=${D} install + oe_runmake 'DESTDIR=${D}' install }
Signature · 1 line
2.2.1
PATCH v2 4/5 iw: support and enable separate build dir
In reply to Christopher LarsonFrom: Christopher Larson <[email protected]>
--- .../iw/iw/separate-objdir.patch | 57 ++++++++++++++++++++++ meta/recipes-connectivity/iw/iw_4.1.bb | 4 ++ 2 files changed, 61 insertions(+) create mode 100644 meta/recipes-connectivity/iw/iw/separate-objdir.patch
meta/recipes-connectivity/iw/iw/separate-objdir.patch new file +57 -0
@@ -0,0 +1,57 @@ +From 9e27fc2e1b3dc8c36ef6a502edffc3a3d84d9dd9 Mon Sep 17 00:00:00 2001 +From: Christopher Larson <[email protected]> +Date: Wed, 26 Aug 2015 17:23:48 -0700 +Subject: [PATCH] Support separation of SRCDIR and OBJDIR + +Typical use of VPATH to locate the sources. + +Upstream-Status: Pending + +Signed-off-by: Christopher Larson <[email protected]> + +--- + Makefile | 7 +++++-- + version.sh | 2 +- + 2 files changed, 6 insertions(+), 3 deletions(-) + +diff --git a/Makefile b/Makefile +index 548591a..da8d33a 100644 +--- a/Makefile ++++ b/Makefile +@@ -1,5 +1,8 @@ + MAKEFLAGS += --no-print-directory + ++SRCDIR ?= $(dir $(lastword $(MAKEFILE_LIST))) ++OBJDIR ?= $(PWD) ++VPATH = $(SRCDIR) + PREFIX ?= /usr + SBINDIR ?= $(PREFIX)/sbin + MANDIR ?= $(PREFIX)/share/man +@@ -95,11 +98,11 @@ VERSION_OBJS := $(filter-out version.o, $(OBJS)) + version.c: version.sh $(patsubst %.o,%.c,$(VERSION_OBJS)) nl80211.h iw.h Makefile \ + $(wildcard .git/index .git/refs/tags) + @$(NQ) ' GEN ' $@ +- $(Q)./version.sh $@ ++ $(Q)cd $(SRCDIR) && ./version.sh $(OBJDIR)/$@ + + %.o: %.c iw.h nl80211.h + @$(NQ) ' CC ' $@ +- $(Q)$(CC) $(CFLAGS) -c -o $@ $< ++ $(Q)$(CC) -I$(SRCDIR) $(CFLAGS) -c -o $@ $< + + ifeq ($(IW_ANDROID_BUILD),) + iw: $(OBJS) +diff --git a/version.sh b/version.sh +index 5354383..fa954cf 100755 +--- a/version.sh ++++ b/version.sh +@@ -5,5 +5,5 @@ OUT="$1" + + v="$VERSION" + +-echo '#include "iw.h"' > "$OUT" ++echo '#include <iw.h>' > "$OUT" + echo "const char iw_version[] = \"$v\";" >> "$OUT" +-- +2.2.1 +
meta/recipes-connectivity/iw/iw_4.1.bb +4 -0
@@ -11,6 +11,7 @@ DEPENDS = "libnl" SRC_URI = "http://www.kernel.org/pub/software/network/iw/${BP}.tar.gz \ file://0001-iw-version.sh-don-t-use-git-describe-for-versioning.patch \ + file://separate-objdir.patch \ " SRC_URI[md5sum] = "68c282285c71c956069957e9ca10a6a7"
@@ -19,10 +20,13 @@ SRC_URI[sha256sum] = "14bfc627b37f7f607e4ffa63a70ded15fa2ea85177f703cb17d7fe36f9 inherit pkgconfig EXTRA_OEMAKE = "\ + -f '${S}/Makefile' \ + \ 'PREFIX=${prefix}' \ 'SBINDIR=${sbindir}' \ 'MANDIR=${mandir}' \ " +B = "${WORKDIR}/build" do_install() { oe_runmake 'DESTDIR=${D}' install
Signature · 1 line
2.2.1
PATCH v2 5/5 packagegroup-base: pull in iw as well as wireless-tools
In reply to Christopher LarsonFrom: Christopher Larson <[email protected]>
As was discussed in the commit which adds iw:
iw uses cfg80211/nl80211, which is the way of the future. wireless-tools uses WEXT, which uses ioctl, which is in deep maintenance mode. See
http://wireless.kernel.org/en/developers/Documentation/Wireless-Extensions.
Also https://wireless.wiki.kernel.org/en/users/Documentation/iw indicates "The old tool iwconfing, which uses Wireless Extensions interface, is deprecated and it's strongly recommended to switch to iw and nl80211."
wireless-tools is kept as well for now for compatibility reasons, until we have verified that all the network configuration mechanisms are using iw.
This adds VIRTUAL-RUNTIME_wireless-tools as a distro convenience.
--- meta/conf/distro/include/default-providers.inc | 1 + meta/recipes-core/packagegroups/packagegroup-base.bb | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-)
meta/conf/distro/include/default-providers.inc +1 -0
@@ -22,6 +22,7 @@ VIRTUAL-RUNTIME_update-alternatives ?= "update-alternatives-opkg" VIRTUAL-RUNTIME_apm ?= "apm" VIRTUAL-RUNTIME_alsa-state ?= "alsa-state" VIRTUAL-RUNTIME_getopt ?= "util-linux-getopt" +VIRTUAL-RUNTIME_wireless-tools ?= "iw wireless-tools" # # Default recipe providers
meta/recipes-core/packagegroups/packagegroup-base.bb +1 -1
@@ -292,7 +292,7 @@ RRECOMMENDS_packagegroup-base-ipsec = "\ # SUMMARY_packagegroup-base-wifi = "WiFi support" RDEPENDS_packagegroup-base-wifi = "\ - wireless-tools \ + ${VIRTUAL-RUNTIME_wireless-tools} \ ${@bb.utils.contains('COMBINED_FEATURES', 'pcmcia', 'hostap-utils', '',d)} \ ${@bb.utils.contains('COMBINED_FEATURES', 'pci', 'hostap-utils', '',d)} \ wpa-supplicant"
Signature · 1 line
2.2.1