summaryrefslogtreecommitdiff
path: root/libre/linux-libre-firmware
diff options
context:
space:
mode:
authorDavid P <megver83@parabola.nu>2018-05-24 12:08:26 -0400
committerDavid P <megver83@parabola.nu>2018-05-24 12:12:22 -0400
commit228470cb4f942809db81c84dbd5f7fc5947cd5b6 (patch)
tree5886ce0be21190dd3d20c7a2403d33b1953131c1 /libre/linux-libre-firmware
parent1f91f3528e8c69ce410801a129d7088a522af34f (diff)
downloadabslibre-228470cb4f942809db81c84dbd5f7fc5947cd5b6.tar.gz
abslibre-228470cb4f942809db81c84dbd5f7fc5947cd5b6.tar.bz2
abslibre-228470cb4f942809db81c84dbd5f7fc5947cd5b6.zip
libre/linux-libre-firmware: add install-ath9k_htc-on-prefix-ath9k_htc-too.patch patch
And pass !buildflags instead of !strip in options=() to do not affect the ath9k_htc compilation, which fails when using -mtune and -march (from makepkg.conf's CFLAGS variable). Plus, there used to be an error when building with makepkg's CFLAGS, in x86_64, when passing -O2 it made the as31 compilation fail, but then jxself fixed that. Anyways, this will make the firmwares use its own CFLAGS, CXXFLAGS, LDFLAGS, etc. (if there are any) which is more convinient since cross-compilers and assemblers might prefer that. Signed-off-by: David P <megver83@parabola.nu>
Diffstat (limited to 'libre/linux-libre-firmware')
-rw-r--r--libre/linux-libre-firmware/PKGBUILD12
-rw-r--r--libre/linux-libre-firmware/install-ath9k_htc-on-prefix-ath9k_htc-too.patch45
-rw-r--r--libre/linux-libre-firmware/remove-external-toolchains.patch22
3 files changed, 62 insertions, 17 deletions
diff --git a/libre/linux-libre-firmware/PKGBUILD b/libre/linux-libre-firmware/PKGBUILD
index fbd16f431..cb6ebb17d 100644
--- a/libre/linux-libre-firmware/PKGBUILD
+++ b/libre/linux-libre-firmware/PKGBUILD
@@ -5,7 +5,7 @@
pkgname=linux-libre-firmware
pkgver=1.2.1
-pkgrel=1
+pkgrel=2
epoch=1
pkgdesc='Firmware files for Linux-libre'
arch=('any')
@@ -30,11 +30,12 @@ conflicts=('linux-firmware'
'openfwwf'
'ath9k-htc-firmware')
replaces=(${conflicts[@]})
-options=(!strip)
-source=("$url/$pkgname-$pkgver.tar.lz"{,.asc} 'remove-external-toolchains.patch')
+options=(!buildflags)
+source=("$url/$pkgname-$pkgver.tar.lz"{,.asc} 'remove-external-toolchains.patch' 'install-ath9k_htc-on-prefix-ath9k_htc-too.patch')
sha512sums=('dc4f2e931b4dde217f2e3430e7a0c1a5f42f0844087bf9a771c7e40dbdd8050205d7a80495bd130f87a02a823db7514241d68bfded19548132b3620d4c7e630a'
'SKIP'
- '19732ee8e8320a143fee462ae79ca4551672bebc425e71dffd0a8d01fb7a7a02c822966c57072becfff5da11e2a6abe4a0f6de93e9c218bba0b594421a541150')
+ '474fcfad6c447fded19c8d678b5e29e21d6e1406a3350453e483fd1fe4031c5b3da754fdb94174a538c026ab0b266f7f794f60868c5d6b438aacbdbd214c1046'
+ '9aea747fe09593ca407cb638964613720f871cbf2ae480b300e881d3f209692dace6f7c3ee65478a8f3715949bc8b41460dbd25344433df9facdcf318815a177')
validpgpkeys=('F611A908FFA165C699584ED49D0DB31B545A3198') # Jason Self
prepare() {
@@ -42,6 +43,9 @@ prepare() {
# do not download toolchains so we can build offline
patch -p1 -i $srcdir/remove-external-toolchains.patch
+
+ # https://labs.parabola.nu/issues/1445
+ patch -p1 -i $srcdir/install-ath9k_htc-on-prefix-ath9k_htc-too.patch
}
build() {
diff --git a/libre/linux-libre-firmware/install-ath9k_htc-on-prefix-ath9k_htc-too.patch b/libre/linux-libre-firmware/install-ath9k_htc-on-prefix-ath9k_htc-too.patch
new file mode 100644
index 000000000..2d2f82574
--- /dev/null
+++ b/libre/linux-libre-firmware/install-ath9k_htc-on-prefix-ath9k_htc-too.patch
@@ -0,0 +1,45 @@
+From 432e85147a167f1fec75464f97e28326c9b95c3c Mon Sep 17 00:00:00 2001
+From: David P <megver83@parabola.nu>
+Date: Fri, 18 May 2018 13:22:54 -0400
+Subject: [PATCH] install ath9k_htc on $(prefix)/ath9k_htc too
+
+Having ath9k_htc fw files installed at $(prefix)/ makes it work, but not having them in $(prefix)/ath9k_htc
+causes the following:
+
+[ 8.952592] usb 3-2: ath9k_htc: Firmware ath9k_htc/htc_9271-1.4.0.fw requested
+[ 8.952652] usb 3-2: Direct firmware load for ath9k_htc/htc_9271-1.4.0.fw failed with error -2
+[ 8.952655] usb 3-2: ath9k_htc: Firmware htc_9271.fw requested
+
+Although the firmware works, it throws that (benign) error, that's why linux-firmware installs it in both,
+/lib/firmware and /lib/firmware/ath9k_htc, and this patch fixes this.
+
+[ 3.929726] Workqueue: events request_firmware_work_func
+[ 3.929769] ? _request_firmware+0x423/0xcc0
+[ 3.929772] request_firmware_work_func+0x47/0x90
+[ 5.408573] usb 3-2: ath9k_htc: Firmware ath9k_htc/htc_9271-1.4.0.fw requested
+
+Signed-off-by: David P <megver83@parabola.nu>
+---
+ src/Makefile | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git src/Makefile src/Makefile
+index c2b8451..2a78f98 100644
+--- src/Makefile
++++ src/Makefile
+@@ -83,8 +83,10 @@ clean:
+ cd usbdux && $(MAKE) -f Makefile_dux clean
+
+ install:
+- if [ -a ath9k_htc/target_firmware/htc_9271.fw ]; then $(install_program) -D ath9k_htc/target_firmware/htc_9271.fw $(prefix)/htc_9271.fw; fi;
+- if [ -a ath9k_htc/target_firmware/htc_7010.fw ]; then $(install_program) -D ath9k_htc/target_firmware/htc_7010.fw $(prefix)/htc_7010.fw; fi;
++ if [ -a ath9k_htc/target_firmware/htc_9271.fw ]; then $(install_program) -D ath9k_htc/target_firmware/htc_9271.fw $(prefix)/ath9k_htc/htc_9271-1.4.0.fw && \
++ ln -s ath9k_htc/htc_9271-1.4.0.fw $(prefix)/htc_9271.fw; fi;
++ if [ -a ath9k_htc/target_firmware/htc_7010.fw ]; then $(install_program) -D ath9k_htc/target_firmware/htc_7010.fw $(prefix)/ath9k_htc/htc_7010-1.4.0.fw && \
++ ln -s ath9k_htc/htc_7010-1.4.0.fw $(prefix)/htc_7010.fw; fi;
+ if [ -a av7110/bootcode.bin ]; then $(install_program) -D av7110/bootcode.bin $(prefix)/av7110/bootcode.bin; fi;
+ if [ -a cis/3CCFEM556.cis ]; then $(install_program) -D cis/3CCFEM556.cis $(prefix)/cis/3CCFEM556.cis; fi;
+ if [ -a cis/3CXEM556.cis ]; then $(install_program) -D cis/3CXEM556.cis $(prefix)/cis/3CXEM556.cis; fi;
+--
+2.17.0
+
diff --git a/libre/linux-libre-firmware/remove-external-toolchains.patch b/libre/linux-libre-firmware/remove-external-toolchains.patch
index a216c65bb..c38a20821 100644
--- a/libre/linux-libre-firmware/remove-external-toolchains.patch
+++ b/libre/linux-libre-firmware/remove-external-toolchains.patch
@@ -1,6 +1,6 @@
-From 9b5cc4a22720dd6f7486da3fa1f64e7ecf6f72a7 Mon Sep 17 00:00:00 2001
+From 56777561f6ff815ba8a8010ced3612997690e458 Mon Sep 17 00:00:00 2001
From: David P <megver83@parabola.nu>
-Date: Sun, 29 Apr 2018 13:54:13 -0300
+Date: Thu, 10 May 2018 22:27:41 -0300
Subject: [PATCH] remove external toolchains
Make ath9k_htc and carl9170fw build without depending on downloading compilers, and
@@ -10,7 +10,6 @@ Changes to src:
- ath9k_htc:
* target_firmware/configure: use the system's xtensa-elf cross-compiler
- * Makefile: set CFLAGS
* README: ommit the toolchain building instructions
* .travis.yml: remove `make toolchain' from script
* local: delete directory
@@ -30,7 +29,7 @@ Signed-off-by: David P <megver83@parabola.nu>
src/INSTALL | 10 +-
src/Makefile | 19 +-
src/ath9k_htc/.travis.yml | 1 -
- src/ath9k_htc/Makefile | 150 +-
+ src/ath9k_htc/Makefile | 146 +-
src/ath9k_htc/README | 14 +-
src/ath9k_htc/local/patches/binutils-2.27_fixup.patch | 13 -
src/ath9k_htc/local/patches/binutils.patch | 28962 ------------------------------------
@@ -42,7 +41,7 @@ Signed-off-by: David P <megver83@parabola.nu>
src/carl9170fw/extra/sh-elf-linux.cmake | 16 +-
src/carl9170fw/toolchain/Makefile | 104 -
src/carl9170fw/toolchain/SHA256SUMS | 14 -
- 15 files changed, 31 insertions(+), 29439 deletions(-)
+ 15 files changed, 28 insertions(+), 29438 deletions(-)
diff --git src/INSTALL src/INSTALL
index dfabf2a..be6c905 100644
@@ -134,17 +133,16 @@ index cfb0ee1..5a8db8f 100644
- make -C target_firmware
- make -C target_firmware clean
diff --git src/ath9k_htc/Makefile src/ath9k_htc/Makefile
-index ee5e61b..3f9c66d 100644
+index ee5e61b..f92feb8 100644
--- src/ath9k_htc/Makefile
+++ src/ath9k_htc/Makefile
-@@ -1,149 +1,11 @@
+@@ -1,149 +1,9 @@
-GMP_VER=6.1.1
-GMP_URL=https://ftp.gnu.org/gnu/gmp/gmp-$(GMP_VER).tar.bz2
-GMP_TAR=gmp-$(GMP_VER).tar.bz2
-GMP_DIR=gmp-$(GMP_VER)
-GMP_SUM=a8109865f2893f1373b0a8ed5ff7429de8db696fc451b1036bd7bdf95bbeffd6
-+CFLAGS = -mtext-section-literals -O2 -pipe --param=ssp-buffer-size=4 -fno-aggressive-loop-optimizations -Wno-implicit-function-declaration
-
+-
-MPFR_VER=3.1.4
-MPFR_URL=https://ftp.gnu.org/gnu/mpfr/mpfr-$(MPFR_VER).tar.bz2
-MPFR_TAR=mpfr-$(MPFR_VER).tar.bz2
@@ -278,12 +276,11 @@ index ee5e61b..3f9c66d 100644
clean:
$(MAKE) -C target_firmware clean
--
+
-firmware: toolchain
-+
+firmware:
+$(MAKE) -C target_firmware
--
+
-.PHONY: all toolchain-clean clean clean-dl download toolchain firmware
-
-$(eval $(call Build,GMP))
@@ -291,7 +288,6 @@ index ee5e61b..3f9c66d 100644
-$(eval $(call Build,MPC,GMP MPFR))
-$(eval $(call Build,BINUTILS))
-$(eval $(call Build,GCC,MPC MPFR))
-+
+.PHONY: all clean firmware
diff --git src/ath9k_htc/README src/ath9k_htc/README
index 93823e4..bd14e8f 100644