blob: f35ffdf449f2f26fdbfefe60acdcd3427c70bc37 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
#!/bin/bash
MAKEDEPS=(make bc)
DEPS=(coreutils kmod)
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
ADDITIONAL=(
https://raw.githubusercontent.com/archlinux/svntogit-packages/packages/linux/trunk/config
)
prepare () {
mv 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/$PKG_VER"
echo "Installing boot image..."
mkdir -pv $PKG_DEST/boot
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 -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
echo "Installing modules..."
make INSTALL_MOD_PATH="$PKG_DEST/usr" INSTALL_MOD_STRIP=1 modules_install
rm "$modulesdir"/{source,build}
}
|