aboutsummaryrefslogtreecommitdiff
path: root/linux-libre-lts-source
diff options
context:
space:
mode:
authorWojtek Kosior <wk@koszkonutek-tmp.pl.eu.org>2021-05-01 17:24:39 +0200
committerWojtek Kosior <wk@koszkonutek-tmp.pl.eu.org>2021-05-01 17:24:39 +0200
commit92d96da3407d9c357e8c70ee0676a740a953e7b0 (patch)
tree99756226f72d98c2a9f1c9d15f7e852328a71183 /linux-libre-lts-source
downloadgcc-arm-PKGBUILDs-92d96da3407d9c357e8c70ee0676a740a953e7b0.tar.gz
gcc-arm-PKGBUILDs-92d96da3407d9c357e8c70ee0676a740a953e7b0.zip
Initial/Final commitHEADmaster
Diffstat (limited to 'linux-libre-lts-source')
-rw-r--r--linux-libre-lts-source/0001-usb-serial-gadget-no-TTY-hangup-on-USB-disconnect-WI.patch39
-rw-r--r--linux-libre-lts-source/0002-fix-Atmel-maXTouch-touchscreen-support.patch37
-rw-r--r--linux-libre-lts-source/PKGBUILD91
-rw-r--r--linux-libre-lts-source/change-default-console-loglevel.patch11
-rw-r--r--linux-libre-lts-source/radeon_hack.patch53
5 files changed, 231 insertions, 0 deletions
diff --git a/linux-libre-lts-source/0001-usb-serial-gadget-no-TTY-hangup-on-USB-disconnect-WI.patch b/linux-libre-lts-source/0001-usb-serial-gadget-no-TTY-hangup-on-USB-disconnect-WI.patch
new file mode 100644
index 0000000..e9de435
--- /dev/null
+++ b/linux-libre-lts-source/0001-usb-serial-gadget-no-TTY-hangup-on-USB-disconnect-WI.patch
@@ -0,0 +1,39 @@
+From 716120e8010a7f400c6bed7384000e95e1465c94 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ky=C3=B6sti=20M=C3=A4lkki?= <kyosti.malkki@gmail.com>
+Date: Mon, 26 Aug 2013 19:19:44 +0300
+Subject: [PATCH 1/2] usb serial gadget: no TTY hangup on USB disconnect [WIP]
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+We may want to maintain the TTY over USB disconnects.
+
+This is useful when we have a terminal console to a host which
+power-cycles or for other reasons resets the USB host controller.
+
+Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
+---
+ drivers/usb/gadget/function/u_serial.c | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/drivers/usb/gadget/function/u_serial.c b/drivers/usb/gadget/function/u_serial.c
+index b369292..d156a28 100644
+--- a/drivers/usb/gadget/function/u_serial.c
++++ b/drivers/usb/gadget/function/u_serial.c
+@@ -1258,8 +1258,13 @@ void gserial_disconnect(struct gserial *gser)
+ gser->ioport = NULL;
+ if (port->port.count > 0 || port->openclose) {
+ wake_up_interruptible(&port->drain_wait);
++#if 0
+ if (port->port.tty)
+ tty_hangup(port->port.tty);
++#else
++ if (port->port.tty)
++ stop_tty(port->port.tty);
++#endif
+ }
+ spin_unlock_irqrestore(&port->port_lock, flags);
+
+--
+1.8.1.1
+
diff --git a/linux-libre-lts-source/0002-fix-Atmel-maXTouch-touchscreen-support.patch b/linux-libre-lts-source/0002-fix-Atmel-maXTouch-touchscreen-support.patch
new file mode 100644
index 0000000..5ad26fc
--- /dev/null
+++ b/linux-libre-lts-source/0002-fix-Atmel-maXTouch-touchscreen-support.patch
@@ -0,0 +1,37 @@
+From ab8cc1b2dc1b716d5c08f72dacbe1eded269f304 Mon Sep 17 00:00:00 2001
+From: André Silva <emulatorman@parabola.nu>
+Date: Tue, 22 Mar 2016 17:58:59 -0300
+Subject: [PATCH 2/2] fix Atmel maXTouch touchscreen support
+
+The Atmel maXTouch touchscreen works with Linux-libre 3.13-gnu,
+but not with the current longterm and mainline kernels in
+Parabola.
+
+Now it needs to load nonfree firmware in mxt_initialize(),
+which is in drivers/input/touchscreen/atmel_mxt_ts.c, and the
+atmel_mxt_ts driver fails to work.
+
+This driver works if changing reject_firmware_nowait to
+request_firmware_nowait in atmel_mxt_ts.c. This line is
+requesting the file named MXT_CFG_NAME, and it's a config file,
+not the firmware blob.
+
+Signed-off-by: André Silva <emulatorman@parabola.nu>
+Signed-off-by: mytbk <mytbk920423@gmail.com>
+---
+ drivers/input/touchscreen/atmel_mxt_ts.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c
+index 726a83e..d818834 100644
+--- a/drivers/input/touchscreen/atmel_mxt_ts.c
++++ b/drivers/input/touchscreen/atmel_mxt_ts.c
+@@ -1989,7 +1989,7 @@ static int mxt_initialize(struct mxt_data *data)
+ if (error)
+ goto err_free_object_table;
+
+- error = reject_firmware_nowait(THIS_MODULE, true, MXT_CFG_NAME,
++ error = request_firmware_nowait(THIS_MODULE, true, MXT_CFG_NAME,
+ &client->dev, GFP_KERNEL, data,
+ mxt_config_cb);
+ if (error) {
diff --git a/linux-libre-lts-source/PKGBUILD b/linux-libre-lts-source/PKGBUILD
new file mode 100644
index 0000000..c1a757b
--- /dev/null
+++ b/linux-libre-lts-source/PKGBUILD
@@ -0,0 +1,91 @@
+# Contributor: Wojtek Kosior <kwojtus@protonmail.com>
+
+# Loosely based on Hyperbola's linux-libre-lts package
+
+_kernelname=linux-libre-lts
+pkgname=${_kernelname}-source
+_pkgbasever=4.9-gnu
+_pkgver=${_pkgbasever%-*}.176-gnu
+
+
+_srcname=linux-${_pkgbasever%-*}
+pkgver=${_pkgver//-/_}
+pkgrel=1
+pkgdesc="Source of the Linux-libre kernel - Long Term Support (LTS)"
+arch=('any')
+url="https://linux-libre.fsfla.org/"
+license=('GPL-2')
+source=("https://linux-libre.fsfla.org/pub/linux-libre/releases/${_pkgbasever}/linux-libre-${_pkgbasever}.tar.xz"{,.sign}
+ "https://linux-libre.fsfla.org/pub/linux-libre/releases/${_pkgver}/patch-${_pkgbasever}-${_pkgver}.xz"{,.sign}
+ 'change-default-console-loglevel.patch'
+ 'radeon_hack.patch'
+ '0001-usb-serial-gadget-no-TTY-hangup-on-USB-disconnect-WI.patch'
+ '0002-fix-Atmel-maXTouch-touchscreen-support.patch')
+sha512sums=('885eb0a7fab45dc749acb4329b4330a43b704df2d5f2f5aac1811503c132ca53ca49452f9b1cc80b0826c7a4962dbe4937aecb697aa823b2543ba2cabc704816'
+ 'SKIP'
+ '2c92d52f33ecb1d5c6aa26a0b14b022f6908c4fa69d8ab52475fb11405fcbc890bb4d7f688936f8458c35d596e3b818e4632b7669e177f527247117c1934d47e'
+ 'SKIP'
+ 'd9d28e02e964704ea96645a5107f8b65cae5f4fb4f537e224e5e3d087fd296cb770c29ac76e0ce95d173bc420ea87fb8f187d616672a60a0cae618b0ef15b8c8'
+ 'f4c6deb6f3f7467ba4de303542d9c786287caeab7ef7bbd976056fc9c4fae3469884cae0f44533c6d86022d9887176b90e654ffd5b68dbe10ce465d303712357'
+ '02af4dd2a007e41db0c63822c8ab3b80b5d25646af1906dc85d0ad9bb8bbf5236f8e381d7f91cf99ed4b0978c50aee37cb9567cdeef65b7ec3d91b882852b1af'
+ 'b8fe56e14006ab866970ddbd501c054ae37186ddc065bb869cf7d18db8c0d455118d5bda3255fb66a0dde38b544655cfe9040ffe46e41d19830b47959b2fb168')
+validpgpkeys=('474402C8C582DAFBE389C427BCB7CF877E7D47A7') # Alexandre Oliva
+
+noextract=("linux-libre-${_pkgbasever}.tar.xz" "patch-${_pkgbasever}-${_pkgver}.xz")
+
+prepare() {
+ cd "${srcdir}/"
+
+ # Here we create script to be used for unpacking the sources we'll install.
+ # This scripts assumes patches went to /usr/src/${_kernelname}/patches
+ echo -n "\
+#!/bin/sh
+
+mkdir -p \"\$1\" && cd \"\$1\"
+
+bsdtar -xf /usr/src/${_kernelname}/linux-libre-${_pkgbasever}.tar.xz
+
+cd ${_srcname}
+
+# add upstream patch
+xzcat /usr/src/${_kernelname}/patches/patch-${_pkgbasever}-${_pkgver}.xz | patch -p1
+
+# Hyperbola's PKGBUILD mentions possibility of adding latest fixes from stable queue.
+# Idk how this works, so I just leave the link:
+# http://git.kernel.org/?p=linux/kernel/git/stable/stable-queue.git
+
+# set DEFAULT_CONSOLE_LOGLEVEL to 4 (same value as the 'quiet' kernel param)
+# remove this when a Kconfig knob is made available by upstream
+# (relevant patch sent upstream: https://lkml.org/lkml/2011/7/26/227)
+patch -p1 -i /usr/src/${_kernelname}/patches/change-default-console-loglevel.patch
+
+# hack to enable Radeon R600 evergreen GPUs
+# https://www.fsfla.org/pipermail/linux-libre/2016-July/003224.html
+patch -p1 -i /usr/src/${_kernelname}/patches/radeon_hack.patch
+
+# maintain the TTY over USB disconnects
+# http://www.coreboot.org/EHCI_Gadget_Debug
+patch -p1 -i /usr/src/${_kernelname}/patches/0001-usb-serial-gadget-no-TTY-hangup-on-USB-disconnect-WI.patch
+
+# fix Atmel maXTouch touchscreen support
+# https://labs.parabola.nu/issues/877
+# http://www.fsfla.org/pipermail/linux-libre/2015-November/003202.html
+patch -p1 -i /usr/src/${_kernelname}/patches/0002-fix-Atmel-maXTouch-touchscreen-support.patch
+" > prepare-linux-libre-lts-source
+}
+
+package() {
+ install -m755 -d ${pkgdir}/usr/src/${_kernelname}/patches
+
+ # install patches
+ cd ${srcdir}
+ install -m644 *.patch patch-${_pkgbasever}-${_pkgver}.xz \
+ ${pkgdir}/usr/src/${_kernelname}/patches/
+
+ #install tarball
+ install -m644 linux-libre-${_pkgbasever}.tar.xz ${pkgdir}/usr/src/${_kernelname}/
+
+ # install our script
+ install -m755 -d ${pkgdir}/usr/bin
+ install -m755 ${srcdir}/prepare-linux-libre-lts-source ${pkgdir}/usr/bin
+}
diff --git a/linux-libre-lts-source/change-default-console-loglevel.patch b/linux-libre-lts-source/change-default-console-loglevel.patch
new file mode 100644
index 0000000..11da2a9
--- /dev/null
+++ b/linux-libre-lts-source/change-default-console-loglevel.patch
@@ -0,0 +1,11 @@
+--- linux-3.16/include/linux/printk.h.old 2014-08-04 18:48:30.686043266 +0200
++++ linux-3.16/include/linux/printk.h 2014-08-04 18:48:47.706218528 +0200
+@@ -37,7 +37,7 @@
+ #define CONSOLE_LOGLEVEL_SILENT 0 /* Mum's the word */
+ #define CONSOLE_LOGLEVEL_MIN 1 /* Minimum loglevel we let people use */
+ #define CONSOLE_LOGLEVEL_QUIET 4 /* Shhh ..., when booted with "quiet" */
+-#define CONSOLE_LOGLEVEL_DEFAULT 7 /* anything MORE serious than KERN_DEBUG */
++#define CONSOLE_LOGLEVEL_DEFAULT 4 /* anything MORE serious than KERN_DEBUG */
+ #define CONSOLE_LOGLEVEL_DEBUG 10 /* issue debug messages */
+ #define CONSOLE_LOGLEVEL_MOTORMOUTH 15 /* You can't shut this one up */
+
diff --git a/linux-libre-lts-source/radeon_hack.patch b/linux-libre-lts-source/radeon_hack.patch
new file mode 100644
index 0000000..48f28c2
--- /dev/null
+++ b/linux-libre-lts-source/radeon_hack.patch
@@ -0,0 +1,53 @@
+diff --git a/drivers/gpu/drm/radeon/evergreen.c b/drivers/gpu/drm/radeon/evergreen.c
+index e5e26e8..cf6e4f1 100644
+--- a/drivers/gpu/drm/radeon/evergreen.c
++++ b/drivers/gpu/drm/radeon/evergreen.c
+@@ -5831,7 +5831,7 @@ int evergreen_init(struct radeon_device *rdev)
+ r = ni_init_microcode(rdev);
+ if (r) {
+ DRM_ERROR("Failed to load firmware!\n");
+- return r;
++ /*(DEBLOBBED)*/
+ }
+ }
+ } else {
+@@ -5885,7 +5885,7 @@ int evergreen_init(struct radeon_device *rdev)
+ if (ASIC_IS_DCE5(rdev)) {
+ if (!rdev->mc_fw && !(rdev->flags & RADEON_IS_IGP)) {
+ DRM_ERROR("radeon: MC ucode required for NI+.\n");
+- return -EINVAL;
++ /*(DEBLOBBED)*/
+ }
+ }
+
+diff --git a/drivers/gpu/drm/radeon/ni.c b/drivers/gpu/drm/radeon/ni.c
+index c2ed7fd..cfef588 100644
+--- a/drivers/gpu/drm/radeon/ni.c
++++ b/drivers/gpu/drm/radeon/ni.c
+@@ -2389,7 +2389,7 @@ int cayman_init(struct radeon_device *rdev)
+ r = ni_init_microcode(rdev);
+ if (r) {
+ DRM_ERROR("Failed to load firmware!\n");
+- return r;
++ /*(DEBLOBBED)*/
+ }
+ }
+ } else {
+@@ -2397,7 +2397,7 @@ int cayman_init(struct radeon_device *rdev)
+ r = ni_init_microcode(rdev);
+ if (r) {
+ DRM_ERROR("Failed to load firmware!\n");
+- return r;
++ /*(DEBLOBBED)*/
+ }
+ }
+ }
+@@ -2452,7 +2452,7 @@ int cayman_init(struct radeon_device *rdev)
+ */
+ if (!rdev->mc_fw && !(rdev->flags & RADEON_IS_IGP)) {
+ DRM_ERROR("radeon: MC ucode required for NI+.\n");
+- return -EINVAL;
++ /*(DEBLOBBED)*/
+ }
+
+ return 0;