summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO15
-rw-r--r--0013-kernel-6.0-set_termios-const-ktermios.patch4
-rw-r--r--0014-kernel-6.6-struct-tty_operations-size_t.patch35
-rw-r--r--0015-kernel-6.4-class_create-1arg.patch19
-rw-r--r--0016-0006-kernel-5.10-dropped-tty_check_change.patch16
-rw-r--r--PKGBUILD39
6 files changed, 117 insertions, 11 deletions
diff --git a/.SRCINFO b/.SRCINFO
index d2b780c2a0db..172e0a23d44e 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = dgrp
pkgdesc = tty driver for Digi RealPort ConnectPort EtherLite Flex One CM PortServer TS IBM RAN serial console terminal servers
pkgver = 1.9.41
- pkgrel = 1
+ pkgrel = 2
url = https://www.digi.com/
install = dgrp-install.sh
arch = i686
@@ -72,6 +72,9 @@ pkgbase = dgrp
source = 0011-kernel-6.1-remove-TTY_MAGIC.patch
source = 0012-kernel-6.1-INIT_C_CC-termios_internal.patch
source = 0013-kernel-6.0-set_termios-const-ktermios.patch
+ source = 0014-kernel-6.6-struct-tty_operations-size_t.patch
+ source = 0015-kernel-6.4-class_create-1arg.patch
+ source = 0016-0006-kernel-5.10-dropped-tty_check_change.patch
md5sums = df7d7093759350208fbe5abf5ceb27de
md5sums = b4af5022ba96fcc2429263cfbbe85bae
md5sums = 9feebec170552c9186e713e7f5852e14
@@ -119,7 +122,10 @@ pkgbase = dgrp
md5sums = a841defc71b4b1da33ac9b24cdff52ca
md5sums = 18dad6ca1c3bc2dd5206fe8caf4bcdf1
md5sums = bca5ff7935af3fe539ec30f1e9f59190
- md5sums = 40cf223579346f664c113cb7adcba434
+ md5sums = 26d60834e4804c1c8af826e4f2a45503
+ md5sums = dc163d401cf3db6e07ff66793d3ec7ca
+ md5sums = 762d49459368bb78da084e57ffc25d7c
+ md5sums = 8aeeb382e88b712c163e149bea6c5e1a
sha256sums = 9ab56e0c841a1eab13e9ced8f1ff6943be6643773dbbbb7b189462950b9f2113
sha256sums = 42898b9d24262de27e9b1f3067d51d01373810b7c9e4991403a7f0a5dd7a26cf
sha256sums = 66f8b106a052b4807513ace92978e5e6347cef08eee39e4b4ae31c60284cc0a3
@@ -167,6 +173,9 @@ pkgbase = dgrp
sha256sums = d1c641d3f024e8e11c4a36bf58570afb4b63fcaa4a22f05c59b513a35a6a4af7
sha256sums = 2b9ccbe92e4e1cbeafd16208ef011209bce30b6d3f9b4f288d0b83418479b1bc
sha256sums = 2ac185b8a27855c22d64d2e3f56e28f6a4442b1141ad46e4a0a078e0e22adc53
- sha256sums = a23535a5681516931d7de12e35c49086cb38b5a44f831acd5840640e5f26ce09
+ sha256sums = 3afe6487f26f7393aa1a05b1cd307b3bd29d164a49596e199a681b4432f6e23e
+ sha256sums = 5787763cac47a3ba5df203f75d57c9d7d8d4364c7cd32db426b268f77f17247a
+ sha256sums = df2c6cf5943ca26f282b96f22cf7301cffa6521a273c8301199840b5dca57e8a
+ sha256sums = 26022e04543aa8ccebe1b9c698c452e2dccc98d5bf1fd8c4f0dba000067e899a
pkgname = dgrp
diff --git a/0013-kernel-6.0-set_termios-const-ktermios.patch b/0013-kernel-6.0-set_termios-const-ktermios.patch
index d82721f19b5c..c499262e9cac 100644
--- a/0013-kernel-6.0-set_termios-const-ktermios.patch
+++ b/0013-kernel-6.0-set_termios-const-ktermios.patch
@@ -7,7 +7,7 @@ diff -pNaru5 a/driver/2.6.27/dgrp_tty.c b/driver/2.6.27/dgrp_tty.c
#else
static int dgrp_tty_ioctl(struct tty_struct *, unsigned int, unsigned long);
#endif
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(6,0,0)
++#if LINUX_VERSION_CODE < KERNEL_VERSION(6,1,0)
static void dgrp_tty_set_termios(struct tty_struct *, struct ktermios *);
+#else
+static void dgrp_tty_set_termios(struct tty_struct *, const struct ktermios *);
@@ -23,7 +23,7 @@ diff -pNaru5 a/driver/2.6.27/dgrp_tty.c b/driver/2.6.27/dgrp_tty.c
* So we need to make sure that our copies of ch_oflag,
* ch_clag, and ch_iflag reflect the tty->termios flags.
*/
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(6,0,0)
++#if LINUX_VERSION_CODE < KERNEL_VERSION(6,1,0)
static void dgrp_tty_set_termios(struct tty_struct *tty, struct ktermios *old)
+#else
+static void dgrp_tty_set_termios(struct tty_struct *tty, const struct ktermios *old)
diff --git a/0014-kernel-6.6-struct-tty_operations-size_t.patch b/0014-kernel-6.6-struct-tty_operations-size_t.patch
new file mode 100644
index 000000000000..bdb43c99f995
--- /dev/null
+++ b/0014-kernel-6.6-struct-tty_operations-size_t.patch
@@ -0,0 +1,35 @@
+diff -pNaru5 a/driver/2.6.27/dgrp_tty.c b/driver/2.6.27/dgrp_tty.c
+--- a/driver/2.6.27/dgrp_tty.c 2023-12-18 20:56:27.737442928 -0500
++++ b/driver/2.6.27/dgrp_tty.c 2023-12-18 20:56:42.854022036 -0500
+@@ -110,11 +110,15 @@ static void dgrp_tty_input_stop(struct t
+
+ static void drp_wmove(struct ch_struct *, int, void*, int);
+
+ static int dgrp_tty_open(struct tty_struct *, struct file *);
+ static void dgrp_tty_close(struct tty_struct *, struct file *);
++#if LINUX_VERSION_CODE < KERNEL_VERSION(6,6,0)
+ static int dgrp_tty_write(struct tty_struct *, const unsigned char *, int);
++#else
++static ssize_t dgrp_tty_write(struct tty_struct *, const unsigned char *, size_t);
++#endif
+ #if LINUX_VERSION_CODE < KERNEL_VERSION(5,14,0)
+ static int dgrp_tty_write_room(struct tty_struct *);
+ static int dgrp_tty_chars_in_buffer(struct tty_struct *);
+ #else
+ static unsigned int dgrp_tty_write_room(struct tty_struct *);
+@@ -1963,11 +1967,15 @@ static int dgrp_calculate_txprint_bounds
+
+ return space;
+ }
+
+
++#if LINUX_VERSION_CODE < KERNEL_VERSION(6,6,0)
+ static int dgrp_tty_write(struct tty_struct *tty, const unsigned char *buf, int count)
++#else
++static ssize_t dgrp_tty_write(struct tty_struct *tty, const unsigned char *buf, size_t count)
++#endif
+ {
+ struct nd_struct *nd;
+ struct un_struct *un;
+ struct ch_struct *ch;
+ int space;
diff --git a/0015-kernel-6.4-class_create-1arg.patch b/0015-kernel-6.4-class_create-1arg.patch
new file mode 100644
index 000000000000..3af095139d60
--- /dev/null
+++ b/0015-kernel-6.4-class_create-1arg.patch
@@ -0,0 +1,19 @@
+diff -pNaru5 a/driver/2.6.27/dgrp_sysfs.c b/driver/2.6.27/dgrp_sysfs.c
+--- a/driver/2.6.27/dgrp_sysfs.c 2022-11-02 12:57:58.000000000 -0400
++++ b/driver/2.6.27/dgrp_sysfs.c 2023-12-18 21:02:23.102079937 -0500
+@@ -189,11 +189,15 @@ static struct attribute_group dgrp_globa
+ void dgrp_create_class_sysfs_files(void)
+ {
+ int ret = 0;
+ int max_majors = 1U << (32 - MINORBITS);
+
++#if LINUX_VERSION_CODE < KERNEL_VERSION(6,4,0)
+ dgrp_class = class_create(THIS_MODULE, "digi_realport");
++#else
++ dgrp_class = class_create("digi_realport");
++#endif
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(4,13,0)
+ ret = class_create_file(dgrp_class, &class_attr_driver_version.attr);
+ #else
+ ret = class_create_file(dgrp_class, &class_attr_driver_version);
+ #endif
diff --git a/0016-0006-kernel-5.10-dropped-tty_check_change.patch b/0016-0006-kernel-5.10-dropped-tty_check_change.patch
new file mode 100644
index 000000000000..e9057f7139df
--- /dev/null
+++ b/0016-0006-kernel-5.10-dropped-tty_check_change.patch
@@ -0,0 +1,16 @@
+diff -pNaru5 a/driver/2.6.27/dgrp_tty.c b/driver/2.6.27/dgrp_tty.c
+--- a/driver/2.6.27/dgrp_tty.c 2023-12-18 21:37:04.585172106 -0500
++++ b/driver/2.6.27/dgrp_tty.c 2023-12-18 21:38:48.197717779 -0500
+@@ -149,11 +149,11 @@ static int dgrp_tty_tiocmget(struct tty_
+ static int dgrp_tty_tiocmset(struct tty_struct *, unsigned int, unsigned int);
+ #endif
+ static int dgrp_tty_send_break(struct tty_struct *, int);
+ static void dgrp_tty_send_xchar(struct tty_struct *, char);
+
+-#if LINUX_VERSION_CODE > KERNEL_VERSION(5,12,19)
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,10,180)
+ /* they decided that tty_check_change was internal to tty subsystem and
+ * no longer export it; now its down in kernel/driver/tty/.. So far the symbol is still
+ * visible though, so can get away with a local decl.
+ */
+ int tty_check_change(struct tty_struct *t);
diff --git a/PKGBUILD b/PKGBUILD
index 20e0a533e81b..90a14144f4eb 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -57,6 +57,8 @@ _opt_RealPort='RealPort' # Can also be Realport
_opt_DKMS=1 # This can be toggled between installs
+#export KERNELRELEASE="$(basename $(dirname /usr/lib/modules/5.10.*/modules.alias))"
+
# Since the kernel module isn't loaded until you have a device
# configured, these services are automatically enabled and started
# for immediate hardware support. They will be reenabled each time the
@@ -106,7 +108,7 @@ pkgname='dgrp'
#_pkgver='1.9-40'; _dl='40002086_AA.tgz'
_pkgver='1.9-41'; _dl='40002086_AB.tgz'
pkgver="${_pkgver//-/.}"
-pkgrel='1'
+pkgrel='2'
pkgdesc="tty driver for Digi ${_opt_RealPort} ConnectPort EtherLite Flex One CM PortServer TS IBM RAN serial console terminal servers"
#_pkgdescshort="Digi ${_opt_RealPort} driver for Ethernet serial servers" # For when we used to generate the autorebuild from here
arch=('i686' 'x86_64')
@@ -203,6 +205,9 @@ source=(
'0011-kernel-6.1-remove-TTY_MAGIC.patch'
'0012-kernel-6.1-INIT_C_CC-termios_internal.patch'
'0013-kernel-6.0-set_termios-const-ktermios.patch'
+ '0014-kernel-6.6-struct-tty_operations-size_t.patch'
+ '0015-kernel-6.4-class_create-1arg.patch'
+ '0016-0006-kernel-5.10-dropped-tty_check_change.patch'
)
unset _mibsrc
#source_i686=('http://ftp1.digi.com/support/utilities/40002890_A.tgz')
@@ -255,7 +260,10 @@ md5sums=('df7d7093759350208fbe5abf5ceb27de'
'a841defc71b4b1da33ac9b24cdff52ca'
'18dad6ca1c3bc2dd5206fe8caf4bcdf1'
'bca5ff7935af3fe539ec30f1e9f59190'
- '40cf223579346f664c113cb7adcba434')
+ '26d60834e4804c1c8af826e4f2a45503'
+ 'dc163d401cf3db6e07ff66793d3ec7ca'
+ '762d49459368bb78da084e57ffc25d7c'
+ '8aeeb382e88b712c163e149bea6c5e1a')
sha256sums=('9ab56e0c841a1eab13e9ced8f1ff6943be6643773dbbbb7b189462950b9f2113'
'42898b9d24262de27e9b1f3067d51d01373810b7c9e4991403a7f0a5dd7a26cf'
'66f8b106a052b4807513ace92978e5e6347cef08eee39e4b4ae31c60284cc0a3'
@@ -303,7 +311,10 @@ sha256sums=('9ab56e0c841a1eab13e9ced8f1ff6943be6643773dbbbb7b189462950b9f2113'
'd1c641d3f024e8e11c4a36bf58570afb4b63fcaa4a22f05c59b513a35a6a4af7'
'2b9ccbe92e4e1cbeafd16208ef011209bce30b6d3f9b4f288d0b83418479b1bc'
'2ac185b8a27855c22d64d2e3f56e28f6a4442b1141ad46e4a0a078e0e22adc53'
- 'a23535a5681516931d7de12e35c49086cb38b5a44f831acd5840640e5f26ce09')
+ '3afe6487f26f7393aa1a05b1cd307b3bd29d164a49596e199a681b4432f6e23e'
+ '5787763cac47a3ba5df203f75d57c9d7d8d4364c7cd32db426b268f77f17247a'
+ 'df2c6cf5943ca26f282b96f22cf7301cffa6521a273c8301199840b5dca57e8a'
+ '26022e04543aa8ccebe1b9c698c452e2dccc98d5bf1fd8c4f0dba000067e899a')
if [ "${_opt_DKMS}" -ne 0 ]; then
depends+=('linux' 'dkms' 'linux-headers')
@@ -461,6 +472,18 @@ prepare() {
#cd '..'; cp -pr "${_srcdir}" 'a'; ln -s "${_srcdir}" 'b'; false
# diff -pNaru5 'a' 'b' > '0013-kernel-6.0-set_termios-const-ktermios.patch'
patch -Nup1 -i "${startdir}/0013-kernel-6.0-set_termios-const-ktermios.patch"
+
+ #cd '..'; cp -pr "${_srcdir}" 'a'; ln -s "${_srcdir}" 'b'; false
+ # diff -pNaru5 'a' 'b' > '0014-kernel-6.6-struct-tty_operations-size_t.patch'
+ patch -Nup1 -i "${startdir}/0014-kernel-6.6-struct-tty_operations-size_t.patch"
+
+ #cd '..'; cp -pr "${_srcdir}" 'a'; ln -s "${_srcdir}" 'b'; false
+ # diff -pNaru5 'a' 'b' > '0015-kernel-6.4-class_create-1arg.patch'
+ patch -Nup1 -i "${startdir}/0015-kernel-6.4-class_create-1arg.patch"
+
+ #cd '..'; cp -pr "${_srcdir}" 'a'; ln -s "${_srcdir}" 'b'; false
+ # diff -pNaru5 'a' 'b' > '0016-0006-kernel-5.10-dropped-tty_check_change.patch'
+ patch -Nup1 -i "${srcdir}/0016-0006-kernel-5.10-dropped-tty_check_change.patch"
fi
# Standardize name of RealPort
@@ -537,6 +560,10 @@ prepare() {
sed -e 's/^clean:$/&\n\trm -f .cache.mk/g' \
-e '# Switch SUBDIRS= to M= for Kernel 5.4' \
-e 's:SUBDIRS=:M=:g' \
+ -e '# Build with any specified kernel, not just the current one' \
+ -e 's:@MODDIR@:/usr/lib/modules/$(KERNELRELEASE):g' \
+ -e 's:@KERNEL_HEADERS@:/usr/lib/modules/$(KERNELRELEASE)/build:g' \
+ -e '1i KERNELRELEASE?=$(shell uname -r)' \
-i driver/*/Makefile*
# Branding in dmesg
@@ -568,7 +595,7 @@ build() {
_configure
#. 'config/file_locations.Arch'
- make -s all -j1 # This package doesn't support threaded make and it's too small to fix
+ make all -j1 # This package doesn't support threaded make and it's too small to fix
set +u
}
@@ -745,8 +772,8 @@ EOF
cp -pr 'driver/build/' "${_dkms}/driver/"
cp -pr 'commoninc/' "${_dkms}/"
install -pm644 'Makefile.inc' -t "${_dkms}/"
- sed -e 's:/usr/lib/modules/[^/]\+/:/usr/lib/modules/$(KERNELRELEASE)/:g' \
- -i "${_dkms}/driver/build/Makefile"
+ #sed -e 's:/usr/lib/modules/[^/]\+/:/usr/lib/modules/$(KERNELRELEASE)/:g' \
+ # -i "${_dkms}/driver/build/Makefile"
make -C "${_dkms}/driver/build/" clean
fi
set +u