summaryrefslogtreecommitdiff
path: root/repo/linux/linux.xibuild
diff options
context:
space:
mode:
authordavidovski <david@davidovski.xyz>2022-01-17 22:43:31 +0000
committerdavidovski <david@davidovski.xyz>2022-01-17 22:43:31 +0000
commit319ca03a33f9ec728ea87349ebd627ba02aab56f (patch)
treef1e7ded7d541073203ad488dfea6ecddbd222f35 /repo/linux/linux.xibuild
parent93efc21a715ecbc4f2a0c1325488369697c2ff8d (diff)
added linux and system configs
Diffstat (limited to 'repo/linux/linux.xibuild')
-rw-r--r--repo/linux/linux.xibuild46
1 files changed, 46 insertions, 0 deletions
diff --git a/repo/linux/linux.xibuild b/repo/linux/linux.xibuild
new file mode 100644
index 0000000..f84e95a
--- /dev/null
+++ b/repo/linux/linux.xibuild
@@ -0,0 +1,46 @@
+#!/bin/bash
+
+DEPS=()
+
+PKG_VER=5.15.14
+SOURCE=https://cdn.kernel.org/pub/linux/kernel/v$(echo $PKG_VER | cut -d. -f1).x/linux-$PKG_VER.tar.xz
+
+prepare () {
+ curl https://raw.githubusercontent.com/archlinux/svntogit-packages/packages/linux/trunk/config > .config
+
+ make olddefconfig
+ make -s kernelrelease > version
+ echo "Prepared linux version $(<version)"
+}
+
+build () {
+ make all
+}
+
+package () {
+ local kernver="$(<version)"
+ local modulesdir="$PKG_DEST/usr/lib/modules/$kernver"
+
+ echo "Installing boot image..."
+ cp -iv arch/x86/boot/bzImage $PKG_DEST/boot/vmlinuz-$PKG_VER
+ cp -iv System.map $PKG_DEST/boot/System.map-$PKG_VER
+ cp -iv .config $PKG_DEST/boot/config-$PKG_VER
+ install -Dm644 "$(make -s image_name)" "$PKG_DEST/vmlinuz-$PKG_VER-xi"
+ install -Dm644 "$(make -s image_name)" "$PKG_DEST/vmlinuz-$PKG_VER-xi"
+
+ install -d $PKG_DEST/usr/share/doc/linux-$PKG_VER
+ cp -r Documentation/* $PKG_DEST/usr/share/doc/linux-$PKG_VER
+
+
+ install -v -m755 -d $PKG_DEST/etc/modprobe.d
+ cat > $PKG_DEST/etc/modprobe.d/usb.conf << "EOF"
+# Begin /etc/modprobe.d/usb.conf
+
+install ohci_hcd /sbin/modprobe ehci_hcd ; /sbin/modprobe -i ohci_hcd ; true
+install uhci_hcd /sbin/modprobe ehci_hcd ; /sbin/modprobe -i uhci_hcd ; true
+
+# End /etc/modprobe.d/usb.conf
+EOF
+
+}
+