From 4bd18560ddaf2961e5f2b92b7154cf31c8bff146 Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Sun, 15 Jul 2018 23:45:32 +0200 Subject: [PATCH] Add wifi command line tools Signed-off-by: David Oberhollenzer --- board/rpi3/ROOTFS | 1 + pkg/iw/build | 35 +++++++++++++++++++++++++++++++++++ pkg/iw/rootfs_files.txt | 1 + pkg/libnl3/build | 31 +++++++++++++++++++++++++++++++ pkg/libnl3/rootfs_files.txt | 18 ++++++++++++++++++ 5 files changed, 86 insertions(+) create mode 100755 pkg/iw/build create mode 100644 pkg/iw/rootfs_files.txt create mode 100644 pkg/libnl3/build create mode 100644 pkg/libnl3/rootfs_files.txt diff --git a/board/rpi3/ROOTFS b/board/rpi3/ROOTFS index e1d31ff..c62f758 100644 --- a/board/rpi3/ROOTFS +++ b/board/rpi3/ROOTFS @@ -9,5 +9,6 @@ nftables kbd firmware-rpi3 dhcpcd +iw linux-firmware-rpi3 linux-rpi3 diff --git a/pkg/iw/build b/pkg/iw/build new file mode 100755 index 0000000..4aaa44a --- /dev/null +++ b/pkg/iw/build @@ -0,0 +1,35 @@ +VERSION="4.14" +SRCDIR="iw-${VERSION}" +TARBALL="${SRCDIR}.tar.xz" +URL="https://mirrors.edge.kernel.org/pub/software/network/iw" +SHA256SUM="f01671c0074bfdec082a884057edba1b9efd35c89eda554638496f03b769ad89" +DEPENDS="libnl3" + +prepare() { + return +} + +build() { + cp -r ${1}/* ${PKGBUILDDIR} + + export PKG_CONFIG_SYSROOT_DIR="$TCDIR/$TARGET" + make CC="${TARGET}-gcc" PKG_CONFIG="${TARGET}-pkg-config" PREFIX= \ + SBINDIR=/bin DESTDIR="$2" -j $NUMJOBS +} + +deploy() { + local SOURCE="$1" + local DEPLOY="$2" + + export PKG_CONFIG_SYSROOT_DIR="$TCDIR/$TARGET" + make CC="${TARGET}-gcc" PKG_CONFIG="${TARGET}-pkg-config" PREFIX= \ + SBINDIR=/bin DESTDIR="$DEPLOY" install + + cp "$SCRIPTDIR/pkg/$PKGNAME/rootfs_files.txt" "$DEPLOY" +} + +check_update() { + curl --silent -L $URL | grep -o "iw-[0-9.]*tar.xz" | \ + sed 's/iw-//g' | sed 's/.tar.xz//g' | \ + verson_find_greatest "$VERSION" +} diff --git a/pkg/iw/rootfs_files.txt b/pkg/iw/rootfs_files.txt new file mode 100644 index 0000000..d430222 --- /dev/null +++ b/pkg/iw/rootfs_files.txt @@ -0,0 +1 @@ +bin/iw m 555 0 0 diff --git a/pkg/libnl3/build b/pkg/libnl3/build new file mode 100644 index 0000000..a377a3c --- /dev/null +++ b/pkg/libnl3/build @@ -0,0 +1,31 @@ +VERSION="3.2.25" +SRCDIR="libnl-${VERSION}" +TARBALL="${SRCDIR}.tar.gz" +URL="https://www.infradead.org/~tgr/libnl/files" +SHA256SUM="8beb7590674957b931de6b7f81c530b85dc7c1ad8fbda015398bc1e8d1ce8ec5" +DEPENDS="toolchain" + +prepare() { + return +} + +build() { + $1/configure --prefix="" --host="$TARGET" --disable-static \ + --disable-cli + + make -j $NUMJOBS +} + +deploy() { + local SOURCE="$1" + local DEPLOY="$2" + + make DESTDIR="$DEPLOY" install + cp "$SCRIPTDIR/pkg/$PKGNAME/rootfs_files.txt" "$DEPLOY" +} + +check_update() { + curl --silent -L "$URL" | grep -o ">libnl-[0-9.]*tar.gz<" | \ + sed 's/>libnl-//g' | sed 's/.tar.gz