Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 29 additions & 19 deletions packages/b/bbswitch/package.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# yaml-language-server: $schema=/usr/share/ypkg/schema/schema.json
name : bbswitch
version : '0.8'
release : 398
release : 399
source :
- https://github.com/Bumblebee-Project/bbswitch/archive/v0.8.tar.gz : 76cabd3f734fb4fe6ebfe3ec9814138d0d6f47d47238521ecbd6a986b60d1477
homepage : https://github.com/Bumblebee-Project/bbswitch
Expand All @@ -21,45 +21,55 @@ builddeps :
- linux-lts
- linux-lts-headers
- zstd
environment: |
kernels=(
%kernel_version_current%
%kernel_version_lts%
)
setup : |
%patch -p1 -i $pkgfiles/0001-proc_ops-struct.patch
%patch -p1 -i $pkgfiles/linux-5.7.patch
%patch -p1 -i $pkgfiles/linux-5.18.patch
%patch -p1 -i ${pkgfiles}/0001-proc_ops-struct.patch
%patch -p1 -i ${pkgfiles}/linux-5.7.patch
%patch -p1 -i ${pkgfiles}/linux-5.18.patch

pushd ..
cp -a bbswitch-${version} lts-build
cp -a bbswitch-${version} current-build
for _kernel in "${kernels[@]}"; do
cp -a "bbswitch-${version}" "${_kernel}"
done
build : |
pushd lts-build
%make KVERSION="%kernel_version_lts%"

pushd ../current-build
%make KVERSION="%kernel_version_current%"
for _kernel in "${kernels[@]}"; do
pushd "${_kernel}"
%make KVERSION="${_kernel}"
popd
done
install : |
KVERSION_LTS="%kernel_version_lts%"
KVERSION_CURRENT="%kernel_version_current%"
install -D -m 00755 lts-build/bbswitch.ko $installdir/usr/lib64/modules/${KVERSION_LTS}/extra/misc/bbswitch.ko
install -D -m 00755 current-build/bbswitch.ko $installdir/usr/lib64/modules/${KVERSION_CURRENT}/extra/misc/bbswitch.ko
for _kernel in "${kernels[@]}"; do
%install_exe "${_kernel}/${package}.ko" -t "${installdir}/%libdir%/modules/${_kernel}/extra/misc"
%install_license "${_kernel}"/COPYING
done

%install_file ${installdir}/usr/share/licenses/${package}/COPYING -t ${installdir}/usr/share/licenses/${package}-current

# Compress modules with zstd
find "$installdir" -name '*.ko' -exec strip --strip-debug {} \; -exec zstd {} \; -exec rm -v {} \;

# Usr-merge
install -dm00755 $installdir/lib64
pushd $installdir/usr
%install_dir ${installdir}/lib64
pushd ${installdir}/usr
file_list=()
while IFS= read -r -d $'\0'; do
file_list+=("$REPLY")
done < <(find lib64/modules -type f -print0)
for file in "${file_list[@]}"; do
parent=$(dirname "$file")
install -dm00755 "$installdir/$parent"
ln -srv "$installdir/usr/$file" "$installdir/$file"
%install_dir "${installdir}/${parent}"
ln -srv "${installdir}/usr/${file}" "${installdir}/${file}"
done
popd
patterns :
- current :
- /lib64/modules/*.current
- /usr/lib64/modules/*.current
- /usr/share/licenses/bbswitch-current
permanent :
- /lib64/modules
- /usr/lib64/modules
22 changes: 12 additions & 10 deletions packages/b/bbswitch/pspec_x86_64.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<Name>bbswitch</Name>
<Homepage>https://github.com/Bumblebee-Project/bbswitch</Homepage>
<Packager>
<Name>Troy Harvey</Name>
<Email>harvey@getsol.us</Email>
<Name>Evan Maddock</Name>
<Email>maddock.evan@vivaldi.net</Email>
</Packager>
<License>GPL-2.0-or-later</License>
<PartOf>kernel.drivers</PartOf>
Expand All @@ -20,8 +20,9 @@
</Description>
<PartOf>kernel.drivers</PartOf>
<Files>
<Path fileType="data">/lib64/modules/6.18.48-307.lts/extra/misc/bbswitch.ko.zst</Path>
<Path fileType="library">/usr/lib64/modules/6.18.48-307.lts/extra/misc/bbswitch.ko.zst</Path>
<Path fileType="data">/lib64/modules/6.18.51-308.lts/extra/misc/bbswitch.ko.zst</Path>
<Path fileType="library">/usr/lib64/modules/6.18.51-308.lts/extra/misc/bbswitch.ko.zst</Path>
<Path fileType="data">/usr/share/licenses/bbswitch/COPYING</Path>
</Files>
</Package>
<Package>
Expand All @@ -31,17 +32,18 @@
</Description>
<PartOf>kernel.drivers</PartOf>
<Files>
<Path fileType="data">/lib64/modules/7.1.12-357.current/extra/misc/bbswitch.ko.zst</Path>
<Path fileType="library">/usr/lib64/modules/7.1.12-357.current/extra/misc/bbswitch.ko.zst</Path>
<Path fileType="data">/lib64/modules/7.2.5-358.current/extra/misc/bbswitch.ko.zst</Path>
<Path fileType="library">/usr/lib64/modules/7.2.5-358.current/extra/misc/bbswitch.ko.zst</Path>
<Path fileType="data">/usr/share/licenses/bbswitch-current/COPYING</Path>
</Files>
</Package>
<History>
<Update release="398">
<Date>2026-08-31</Date>
<Update release="399">
<Date>2026-09-12</Date>
<Version>0.8</Version>
<Comment>Packaging update</Comment>
<Name>Troy Harvey</Name>
<Email>harvey@getsol.us</Email>
<Name>Evan Maddock</Name>
<Email>maddock.evan@vivaldi.net</Email>
</Update>
</History>
</PISI>
43 changes: 43 additions & 0 deletions packages/b/broadcom-sta/files/debian/01-shipped-module.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
From: Ben Hutchings <ben@decadent.org.uk>
Date: Mon, 19 Nov 2012 04:51:39 +0000
Subject: Select wlc_hybrid.o based on the target kernel architecture

Origin: http://bugs.debian.org/651787
---
amd64/Makefile | 22 ++++++++++++++++++++--
1 file changed, 20 insertions(+), 2 deletions(-)

diff --git a/amd64/Makefile b/amd64/Makefile
index a323a0d..994a146 100644
--- a/amd64/Makefile
+++ b/amd64/Makefile
@@ -145,9 +145,27 @@ ifeq "$(GE_49)" "1"
EXTRA_CFLAGS += -Wno-date-time
endif

-EXTRA_LDFLAGS := $(src)/lib/wlc_hybrid.o_shipped
+# Look for kernel architecture.
+# Check for a config symbol that should always be defined, so we don't
+# fail on 'make clean' which doesn't include .config
+ifeq ($(CONFIG_NET),y)
+ ifeq ($(CONFIG_X86_32),y)
+ SHIPPED=wlc_hybrid.o_i386
+ $(info Kernel architecture is X86_32)
+ else
+ ifeq ($(CONFIG_X86_64),y)
+ SHIPPED=wlc_hybrid.o_amd64
+ $(info Kernel architecture is X86_64)
+ else # Error!
+ $(error Unsupported kernel architecture)
+ endif
+ endif
+endif
+
+EXTRA_LDFLAGS := $(src)/lib/$(SHIPPED)

-KBASE ?= /lib/modules/`uname -r`
+KVER ?= $(shell uname -r)
+KBASE ?= /lib/modules/$(KVER)
KBUILD_DIR ?= $(KBASE)/build
MDEST_DIR ?= $(KBASE)/kernel/drivers/net/wireless

Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
From: Roger Shimizu <rosh@debian.org>
Date: Fri, 17 Apr 2020 00:08:34 +0900
Subject: Parse KERNELRELEASE into VERSION, PATCHLEVEL, and SUBLEVEL

This fixes build error message:
====
/bin/sh: 1: [: Illegal number:
/bin/sh: 1: [: Illegal number:
Wireless Extension is the only possible API for this kernel version
Using Wireless Extension API
====

Closes: #886512
---
amd64/Makefile | 4 ++++
i386/Makefile | 4 ++++
2 files changed, 8 insertions(+)

diff --git a/amd64/Makefile b/amd64/Makefile
index 994a146..ed16dfc 100644
--- a/amd64/Makefile
+++ b/amd64/Makefile
@@ -20,6 +20,10 @@

ifneq ($(KERNELRELEASE),)

+ VERSION := $(shell echo $(KERNELRELEASE) | sed -e 's/\([0-9]*\)[.]\([0-9]*\)[.]\([0-9]*\)\(.*\)/\1/')
+ PATCHLEVEL := $(shell echo $(KERNELRELEASE) | sed -e 's/\([0-9]*\)[.]\([0-9]*\)[.]\([0-9]*\)\(.*\)/\2/')
+ SUBLEVEL := $(shell echo $(KERNELRELEASE) | sed -e 's/\([0-9]*\)[.]\([0-9]*\)[.]\([0-9]*\)\(.*\)/\3/')
+
LINUXVER_GOODFOR_CFG80211:=$(strip $(shell \
if [ "$(VERSION)" -ge "2" -a "$(PATCHLEVEL)" -ge "6" -a "$(SUBLEVEL)" -ge "32" -o "$(VERSION)" -ge "3" ]; then \
echo TRUE; \
diff --git a/i386/Makefile b/i386/Makefile
index a323a0d..ec947d9 100644
--- a/i386/Makefile
+++ b/i386/Makefile
@@ -20,6 +20,10 @@

ifneq ($(KERNELRELEASE),)

+ VERSION := $(shell echo $(KERNELRELEASE) | sed -e 's/\([0-9]*\)[.]\([0-9]*\)[.]\([0-9]*\)\(.*\)/\1/')
+ PATCHLEVEL := $(shell echo $(KERNELRELEASE) | sed -e 's/\([0-9]*\)[.]\([0-9]*\)[.]\([0-9]*\)\(.*\)/\2/')
+ SUBLEVEL := $(shell echo $(KERNELRELEASE) | sed -e 's/\([0-9]*\)[.]\([0-9]*\)[.]\([0-9]*\)\(.*\)/\3/')
+
LINUXVER_GOODFOR_CFG80211:=$(strip $(shell \
if [ "$(VERSION)" -ge "2" -a "$(PATCHLEVEL)" -ge "6" -a "$(SUBLEVEL)" -ge "32" -o "$(VERSION)" -ge "3" ]; then \
echo TRUE; \
48 changes: 44 additions & 4 deletions packages/b/broadcom-sta/files/debian/03-rename-to-wlan0.patch
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,53 @@ Origin: https://bugs.debian.org/648169
renames the interface ethX that the driver automatically
generates to another called wlanX like all the wireless drivers.
---
src/wl/sys/wl_linux.c | 2 +-
README.txt | 8 ++++----
amd64/src/wl/sys/wl_linux.c | 2 +-
2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/wl/sys/wl_linux.c b/src/wl/sys/wl_linux.c
diff --git a/README.txt b/README.txt
index 1068371..88f0d11 100644
--- a/README.txt
+++ b/README.txt
@@ -278,7 +278,7 @@ like this:

TX POWER EXPLAINED
------------------
-'iwconfig eth1 txpower' & 'iwlist eth1 txpower' set and get the drivers
+'iwconfig wlan0 txpower' & 'iwlist wlan0 txpower' set and get the drivers
user-requested transmit power level. This can go up to 32 dbm and allows
the user to lower the tx power to levels below the regulatory limit.
Internally, the actual tx power is always kept within regulatory limits
@@ -352,7 +352,7 @@ WHAT'S NEW IN RELEASE 5.60.48.36
+ Supports up to linux kernel 2.6.32
+ Supports hidden networks
+ Supports rfkill in kernels < 2.6.31
-+ Setting power level via 'iwconfig eth1 txpower X' now operational
++ Setting power level via 'iwconfig wlan0 txpower X' now operational
+ Support for bcm4313
+ Additional channels in both 2.4 and 5 Ghz bands
+ Fixed issue with tkip group keys that caused this message to repeat often:
@@ -391,14 +391,14 @@ KNOWN ISSUES AND LIMITATIONS IN EXTERNAL COMPONENTS

wpa_supplicant 0.6.3 + nl80211 + WEP - (Note: This would only affect you if
you are using wpa_supplicant directly from the command line and specify
-nl80211 interface, e.g. "wpa_supplicant -Dnl80211 -ieth1 ..". If you are using
+nl80211 interface, e.g. "wpa_supplicant -Dnl80211 -iwlan0 ..". If you are using
network manager GUI to connect it should work file.)
wpa_supplicant 0.6.3 might have a bug that affect WEP connections created
through nl80211. Upgrade to wpa_supplicant to 0.7.3 would solve this problem.

Ubuntu 10.10 kernel + nl80211 + WPA/WPA2 - (Note: This would only affect you if
you are using wpa_supplicant directly from the command line and specify
-nl80211 interface, e.g. "wpa_supplicant -Dnl80211 -ieth1 ..". If you are using
+nl80211 interface, e.g. "wpa_supplicant -Dnl80211 -iwlan0 ..". If you are using
network manager GUI to connect it should work file.)
Some kernel versions of Ubuntu such as 2.6.35-22 (released with Ubuntu
10.10) may have problems that affect WPA/WPA2 connections created through
diff --git a/amd64/src/wl/sys/wl_linux.c b/amd64/src/wl/sys/wl_linux.c
index 0d05100..947cef3 100644
--- a/src/wl/sys/wl_linux.c
+++ b/src/wl/sys/wl_linux.c
--- a/amd64/src/wl/sys/wl_linux.c
+++ b/amd64/src/wl/sys/wl_linux.c
@@ -217,7 +217,7 @@ module_param(nompc, int, 0);
#define to_str(s) #s
#define quote_str(s) to_str(s)
Expand Down
8 changes: 4 additions & 4 deletions packages/b/broadcom-sta/files/debian/04-user_ioctl.patch
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ Subject: Allow normal users to send ioctl requests

Origin: https://bugs.debian.org/672677
---
src/wl/sys/wl_linux.c | 6 +-----
amd64/src/wl/sys/wl_linux.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/src/wl/sys/wl_linux.c b/src/wl/sys/wl_linux.c
diff --git a/amd64/src/wl/sys/wl_linux.c b/amd64/src/wl/sys/wl_linux.c
index 947cef3..23d71c6 100644
--- a/src/wl/sys/wl_linux.c
+++ b/src/wl/sys/wl_linux.c
--- a/amd64/src/wl/sys/wl_linux.c
+++ b/amd64/src/wl/sys/wl_linux.c
@@ -1659,11 +1659,7 @@ wl_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
From: Cyril Lacoux <clacoux@easter-eggs.com>
Date: Wed, 13 Aug 2014 08:04:37 +0400
Subject: Remove __TIME__ and __DATE__ macros from code

Origin: https://bugs.debian.org/752864
Origin: https://bugs.debian.org/754434

---
src/wl/sys/wl_linux.c | 5 ++---
amd64/src/wl/sys/wl_linux.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/src/wl/sys/wl_linux.c b/src/wl/sys/wl_linux.c
diff --git a/amd64/src/wl/sys/wl_linux.c b/amd64/src/wl/sys/wl_linux.c
index 23d71c6..32a0ad5 100644
--- a/src/wl/sys/wl_linux.c
+++ b/src/wl/sys/wl_linux.c
--- a/amd64/src/wl/sys/wl_linux.c
+++ b/amd64/src/wl/sys/wl_linux.c
@@ -724,7 +724,7 @@ wl_attach(uint16 vendor, uint16 device, ulong regs,
WL_ALL_PASSIVE_ENAB(wl) ? ", Passive Mode" : "", EPI_VERSION_STR);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ Origin: https://bugs.debian.org/773713

Downloaded from https://gist.github.com/hobarrera/ac0e6225210ac5bb13f6#file-broadcom-sta-6-30-223-248-linux-3-18-null-pointer-crash-patch
---
src/wl/sys/wl_linux.c | 2 +-
amd64/src/wl/sys/wl_linux.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/wl/sys/wl_linux.c b/src/wl/sys/wl_linux.c
diff --git a/amd64/src/wl/sys/wl_linux.c b/amd64/src/wl/sys/wl_linux.c
index 32a0ad5..e2f1cb6 100644
--- a/src/wl/sys/wl_linux.c
+++ b/src/wl/sys/wl_linux.c
--- a/amd64/src/wl/sys/wl_linux.c
+++ b/amd64/src/wl/sys/wl_linux.c
@@ -2160,8 +2160,8 @@ wl_start(struct sk_buff *skb, struct net_device *dev)
wlif = WL_DEV_IF(dev);
wl = WL_INFO(dev);
Expand Down
8 changes: 4 additions & 4 deletions packages/b/broadcom-sta/files/debian/07-rdtscl.patch
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ new function. References:
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit?id=fe47ae6e1a5005b2e82f7eab57b5c3820453293a
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit?id=4ea1636b04dbd66536fa387bae2eea463efc705b
---
src/shared/linux_osl.c | 4 ++++
amd64/src/shared/linux_osl.c | 4 ++++
1 file changed, 4 insertions(+)

diff --git a/src/shared/linux_osl.c b/src/shared/linux_osl.c
diff --git a/amd64/src/shared/linux_osl.c b/amd64/src/shared/linux_osl.c
index 6157d18..9adc392 100644
--- a/src/shared/linux_osl.c
+++ b/src/shared/linux_osl.c
--- a/amd64/src/shared/linux_osl.c
+++ b/amd64/src/shared/linux_osl.c
@@ -932,7 +932,11 @@ osl_getcycles(void)
uint cycles;

Expand Down
Loading