summaryrefslogtreecommitdiff
path: root/repo/linux
diff options
context:
space:
mode:
authordavidovski <david@davidovski.xyz>2022-04-14 22:28:41 +0100
committerdavidovski <david@davidovski.xyz>2022-04-14 22:28:41 +0100
commit7cc715c1249422ddf91987be64a35eef43e3e62d (patch)
treefd706e77c0eaec256acf3dc24e781b5fc9f59d09 /repo/linux
parent734e13526a2ec3ced7f085e444fc9525dfad348b (diff)
added auto create file
Diffstat (limited to 'repo/linux')
-rw-r--r--repo/linux/b43-firmware.xibuild14
-rw-r--r--repo/linux/b43-fwcutter.xibuild18
-rw-r--r--repo/linux/broadcom-wl.xibuild43
-rw-r--r--repo/linux/linux-src.xibuild33
-rw-r--r--repo/linux/linux.xibuild31
5 files changed, 131 insertions, 8 deletions
diff --git a/repo/linux/b43-firmware.xibuild b/repo/linux/b43-firmware.xibuild
new file mode 100644
index 0000000..b0a32d2
--- /dev/null
+++ b/repo/linux/b43-firmware.xibuild
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+MAKEDEPS="b43-fwcutter"
+DEPS="linux"
+
+PKG_VER=6.30.163.46
+SOURCE=http://www.lwfinger.com/b43-firmware/broadcom-wl-$PKG_VER.tar.bz2
+
+DESC="Firmware for Broadcom B43 wireless networking chips - latest release"
+
+package () {
+ install -d "$PKG_DEST"/usr/lib/firmware/
+ b43-fwcutter -w "$PKG_DEST"/usr/lib/firmware/ broadcom-wl-$PKG_VER.wl_apsta.o
+}
diff --git a/repo/linux/b43-fwcutter.xibuild b/repo/linux/b43-fwcutter.xibuild
new file mode 100644
index 0000000..68394f5
--- /dev/null
+++ b/repo/linux/b43-fwcutter.xibuild
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+MAKEDEPS="make"
+DEPS="musl"
+
+PKG_VER=019
+SOURCE=https://bues.ch/b43/fwcutter/b43-fwcutter-$PKG_VER.tar.bz2
+
+DESC="firmware extractor for the b43 kernel module"
+
+build () {
+ make
+}
+
+package () {
+ install -D -m755 b43-fwcutter "$PKG_DEST"/usr/bin/b43-fwcutter
+ install -D -m644 b43-fwcutter.1 "$PKG_DEST"/usr/share/man/man1/b43-fwcutter.1
+}
diff --git a/repo/linux/broadcom-wl.xibuild b/repo/linux/broadcom-wl.xibuild
new file mode 100644
index 0000000..948c9bd
--- /dev/null
+++ b/repo/linux/broadcom-wl.xibuild
@@ -0,0 +1,43 @@
+#!/bin/sh
+
+MAKEDEPS="linux-src linux-headers"
+DEPS="linux"
+
+PKG_VER=6.30.223.271
+SOURCE=https://docs.broadcom.com/docs-and-downloads/docs/linux_sta/hybrid-v35_64-nodebug-pcoem-$(echo $PKG_VER | sed "s,\.,_,g").tar.gz
+
+DESC="Broadcom's IEEE 802.11a/b/g/n hybrid Linux device driver"
+ADDITIONAL="
+ 001-null-pointer-fix.patch
+ 002-rdtscl.patch
+ 003-linux47.patch
+ 004-linux48.patch
+ 005-debian-fix-kernel-warnings.patch
+ 006-linux411.patch
+ 007-linux412.patch
+ 008-linux415.patch
+ 009-fix_mac_profile_discrepancy.patch
+ 010-linux56.patch
+ 011-linux59.patch
+ 012-linux517.patch
+"
+
+prepare () {
+ apply_patches
+ sed -i -e '/BRCM_WLAN_IFNAME/s/eth/wlan/' src/wl/sys/wl_linux.c
+ sed -i -e "/EXTRA_LDFLAGS/s|\$(src)/lib|/usr/lib/broadcom-wl|" Makefile
+ sed -i '/GE_49 :=/s|:= .*|:= 1|' Makefile
+}
+
+build () {
+ KVER=$(cat /usr/src/linux/version)
+ #KBASE=/lib/modules/$KVER
+ make -C /usr/src/linux timeconst-file
+ make -C /usr/src/linux M=$PWD
+}
+
+
+package () {
+ ls
+ read wait
+}
diff --git a/repo/linux/linux-src.xibuild b/repo/linux/linux-src.xibuild
new file mode 100644
index 0000000..d4d704e
--- /dev/null
+++ b/repo/linux/linux-src.xibuild
@@ -0,0 +1,33 @@
+#!/bin/sh
+
+MAKEDEPS="make bc"
+DEPS="sbase kmod"
+
+PKG_VER=5.17.2
+SOURCE=https://cdn.kernel.org/pub/linux/kernel/v${PKG_VER%%.*}.x/linux-$PKG_VER.tar.xz
+ADDITIONAL="
+ fix-sbase-coreutils.patch
+ config
+"
+
+DESC="The latest linux kernel (source)"
+
+prepare () {
+ rm linux-$PKG_VER.tar.xz
+ apply_patches
+
+ make mrproper
+ make headers
+
+ mv config .config
+ make olddefconfig
+ make -s kernelrelease > version
+}
+
+package () {
+ local kernver="$(cat version)"
+ srcdir=$PKG_DEST/usr/src/linux
+ mkdir -p $srcdir
+ cp -r ./ $srcdir/
+}
+
diff --git a/repo/linux/linux.xibuild b/repo/linux/linux.xibuild
index 72bd22d..1abf645 100644
--- a/repo/linux/linux.xibuild
+++ b/repo/linux/linux.xibuild
@@ -27,17 +27,17 @@ build () {
package () {
local kernver="$(cat version)"
- local modulesdir="$PKG_DEST/usr/lib/modules/$PKG_VER"
+ local modulesdir="$PKG_DEST/usr/lib/modules/$kernver"
echo "Installing boot image..."
mkdir -p $PKG_DEST/boot
- cp arch/x86/boot/bzImage $PKG_DEST/boot/vmlinuz-$PKG_VER
- cp System.map $PKG_DEST/boot/System.map-$PKG_VER
- cp .config $PKG_DEST/boot/config-$PKG_VER
+ cp arch/x86/boot/bzImage $PKG_DEST/boot/vmlinuz-$kernver
+ cp System.map $PKG_DEST/boot/System.map-$kernver
+ cp .config $PKG_DEST/boot/config-$kernver
- install -d $PKG_DEST/usr/share/doc/linux-$PKG_VER
- cp -r Documentation/* $PKG_DEST/usr/share/doc/linux-$PKG_VER
+ install -d $PKG_DEST/usr/share/doc/linux-$kernver
+ cp -r Documentation/* $PKG_DEST/usr/share/doc/linux-$kernver
install -m755 -d $PKG_DEST/etc/modprobe.d
cat > $PKG_DEST/etc/modprobe.d/usb.conf << "EOF"
@@ -51,7 +51,22 @@ EOF
echo "Installing modules..."
make INSTALL_MOD_PATH="$PKG_DEST/usr" INSTALL_MOD_STRIP=1 modules_install
- #rm "$modulesdir"/source
- #rm "$modulesdir"/build
+ builddir=$modulesdir/build
+ rm $modulesdir/source
+ rm $builddir
+ mkdir $builddir
+ echo "Installing build files..."
+ install -D -m644 .config "$builddir"
+ install -D -m644 Makefile "$builddir"
+ install -D -m644 Module.symvers "$builddir"
+ install -D -m644 System.map "$builddir"
+ install -D -m644 version "$builddir"
+ install -D -m644 vmlinux "$builddir"
+ install -D -m644 kernel/Makefile "$builddir/kernel/Makefile"
+ install -D -m644 arch/x86/Makefile "$builddir/arch/x86/Makefile"
+ cp -r scripts "$builddir"
+
+ install -D tools/objtool/objtool "$builddir/tools/objtool"
+ install -D tools/bpf/resolve_btfids/resolve_btfids "$builddir/tools/bpf/resolve_btfids"
}