diff options
Diffstat (limited to 'testing/linux-tools')
-rw-r--r-- | testing/linux-tools/APKBUILD | 26 | ||||
-rw-r--r-- | testing/linux-tools/tools-iio-Correctly-add-make-dependency-for-iio_utils.patch | 77 |
2 files changed, 97 insertions, 6 deletions
diff --git a/testing/linux-tools/APKBUILD b/testing/linux-tools/APKBUILD index e4cfd75daa..5903bd49ad 100644 --- a/testing/linux-tools/APKBUILD +++ b/testing/linux-tools/APKBUILD @@ -4,20 +4,21 @@ pkgname=linux-tools pkgver=5.4.25 _kernver=${pkgver%.*} -pkgrel=1 +pkgrel=2 pkgdesc="Linux kernel tools meta package" url="https://www.kernel.org/" arch="all" license="GPL-2.0-only" -depends="cpupower perf" depends_dev="pciutils-dev readline-dev gettext-dev" makedepends="$depends_dev elfutils-dev bash linux-headers flex bison diffutils zlib-dev findutils" -subpackages="perf perf-bash-completion:bashcomp:noarch cpupower $pkgname-doc $pkgname-dev" +subpackages="perf perf-bash-completion:bashcomp:noarch cpupower + $pkgname-gpio $pkgname-iio $pkgname-doc $pkgname-dev" source="https://kernel.org/pub/linux/kernel/v5.x/linux-$_kernver.tar.xz https://kernel.org/pub/linux/kernel/v5.x/patch-$pkgver.xz cpupower-libs.patch disable-Werror.patch + tools-iio-Correctly-add-make-dependency-for-iio_utils.patch " builddir="$srcdir"/linux-$_kernver @@ -39,13 +40,13 @@ _make_tools() { } build() { - _make_tools perf cpupower + _make_tools perf cpupower gpio iio } package() { mkdir -p "$pkgdir" _make_tools DESTDIR="$pkgdir" \ - perf_install cpupower_install + perf_install cpupower_install gpio_install iio_install } cpupower() { @@ -72,6 +73,18 @@ perf() { mv "$pkgdir"/usr/libexec "$subpkgdir"/usr/ } +gpio() { + pkgdesc="Linux kernel GPIO tools" + mkdir -p "$subpkgdir"/usr/bin + mv "$pkgdir"/usr/bin/*gpio* "$subpkgdir"/usr/bin +} + +iio() { + pkgdesc="Linux kernel IIO tools" + mkdir -p "$subpkgdir"/usr/bin + mv "$pkgdir"/usr/bin/*iio* "$subpkgdir"/usr/bin +} + bashcomp() { replaces="$pkgname-bash-completion" # Backward compatibility pkgdesc="Bash autocompletion for $pkgname" @@ -83,4 +96,5 @@ bashcomp() { sha512sums="9f60f77e8ab972b9438ac648bed17551c8491d6585a5e85f694b2eaa4c623fbc61eb18419b2656b6795eac5deec0edaa04547fc6723fbda52256bd7f3486898f linux-5.4.tar.xz ba887634350a2fde67283241356c5f6fee1fd076b58051aa4df88da8bc60645e40b8b73dba3401415770a80f58d59546fc96b8b816b61da70177a3ef92c1bafa patch-5.4.25.xz a46e3a84b00a39a356618831d0ddfb7f0d10f0a3799d1307ba2cc832e73c01f8d637a4e801a6dd25025f6f13155c6ad8b836422ff72d365e51063ac0bf907f52 cpupower-libs.patch -a0b90cead5f80a7e785b2fdd8ac9faed1234f4aa5eebf658af8d8b4d3b8593147ff43810d0b28a95b057bb7781113a48723b9cf9432ec8d9510451b51416e3de disable-Werror.patch" +a0b90cead5f80a7e785b2fdd8ac9faed1234f4aa5eebf658af8d8b4d3b8593147ff43810d0b28a95b057bb7781113a48723b9cf9432ec8d9510451b51416e3de disable-Werror.patch +c47b3f9cad4ca427ab0dd59273cdb34c745db57b3afd596338012aefd477f1984071c6615e5a4cce7fdd5229ac4e008fb386d0fc4dcbf79382d4810c14588090 tools-iio-Correctly-add-make-dependency-for-iio_utils.patch" diff --git a/testing/linux-tools/tools-iio-Correctly-add-make-dependency-for-iio_utils.patch b/testing/linux-tools/tools-iio-Correctly-add-make-dependency-for-iio_utils.patch new file mode 100644 index 0000000000..e09a27b2cc --- /dev/null +++ b/testing/linux-tools/tools-iio-Correctly-add-make-dependency-for-iio_utils.patch @@ -0,0 +1,77 @@ +From: Laura Abbott <labbott@redhat.com> +Subject: [PATCH] tools: iio: Correctly add make dependency for iio_utils +Date: Fri, 18 Oct 2019 13:29:08 -0400 +Message-Id: <20191018172908.3761-1-labbott@redhat.com> +X-Mailer: git-send-email 2.21.0 +MIME-Version: 1.0 +Content-Transfer-Encoding: 8bit + +iio tools fail to build correctly with make parallelization: + +$ make -s -j24 +fixdep: error opening depfile: ./.iio_utils.o.d: No such file or directory +make[1]: *** [/home/labbott/linux_upstream/tools/build/Makefile.build:96: iio_utils.o] Error 2 +make: *** [Makefile:43: iio_event_monitor-in.o] Error 2 +make: *** Waiting for unfinished jobs.... + +This is because iio_utils.o is used across multiple targets. +Fix this by making iio_utils.o a proper dependency. + +Signed-off-by: Laura Abbott <labbott@redhat.com> +--- +I realize that we don't really need the parallelization for tools +because it's so small but when building with the distro we want to use +the same make command and -j wherever possible. + +This same issue also appears in the gpio tools so if this looks like an +okay approach I'll fix it there as well. +--- + tools/iio/Build | 1 + + tools/iio/Makefile | 10 +++++++--- + 2 files changed, 8 insertions(+), 3 deletions(-) + +diff --git a/tools/iio/Build b/tools/iio/Build +index f74cbda64710..8d0f3af3723f 100644 +--- a/tools/iio/Build ++++ b/tools/iio/Build +@@ -1,3 +1,4 @@ ++iio_utils-y += iio_utils.o + lsiio-y += lsiio.o iio_utils.o + iio_event_monitor-y += iio_event_monitor.o iio_utils.o + iio_generic_buffer-y += iio_generic_buffer.o iio_utils.o +diff --git a/tools/iio/Makefile b/tools/iio/Makefile +index e22378dba244..3de763d9ab70 100644 +--- a/tools/iio/Makefile ++++ b/tools/iio/Makefile +@@ -32,20 +32,24 @@ $(OUTPUT)include/linux/iio: ../../include/uapi/linux/iio + + prepare: $(OUTPUT)include/linux/iio + ++IIO_UTILS_IN := $(OUTPUT)iio_utils-in.o ++$(IIO_UTILS_IN): prepare FORCE ++ $(Q)$(MAKE) $(build)=iio_utils ++ + LSIIO_IN := $(OUTPUT)lsiio-in.o +-$(LSIIO_IN): prepare FORCE ++$(LSIIO_IN): prepare FORCE $(OUTPUT)iio_utils-in.o + $(Q)$(MAKE) $(build)=lsiio + $(OUTPUT)lsiio: $(LSIIO_IN) + $(QUIET_LINK)$(CC) $(CFLAGS) $(LDFLAGS) $< -o $@ + + IIO_EVENT_MONITOR_IN := $(OUTPUT)iio_event_monitor-in.o +-$(IIO_EVENT_MONITOR_IN): prepare FORCE ++$(IIO_EVENT_MONITOR_IN): prepare FORCE $(OUTPUT)iio_utils-in.o + $(Q)$(MAKE) $(build)=iio_event_monitor + $(OUTPUT)iio_event_monitor: $(IIO_EVENT_MONITOR_IN) + $(QUIET_LINK)$(CC) $(CFLAGS) $(LDFLAGS) $< -o $@ + + IIO_GENERIC_BUFFER_IN := $(OUTPUT)iio_generic_buffer-in.o +-$(IIO_GENERIC_BUFFER_IN): prepare FORCE ++$(IIO_GENERIC_BUFFER_IN): prepare FORCE $(OUTPUT)iio_utils-in.o + $(Q)$(MAKE) $(build)=iio_generic_buffer + $(OUTPUT)iio_generic_buffer: $(IIO_GENERIC_BUFFER_IN) + $(QUIET_LINK)$(CC) $(CFLAGS) $(LDFLAGS) $< -o $@ +-- +2.21.0 + + |