aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xpersonal/linux/build72
-rw-r--r--personal/linux/checksums4
-rw-r--r--personal/linux/depends4
-rw-r--r--personal/linux/files/.config28
-rw-r--r--personal/linux/sources2
-rw-r--r--personal/linux/version2
6 files changed, 99 insertions, 13 deletions
diff --git a/personal/linux/build b/personal/linux/build
index 1747214..6f77fd3 100755
--- a/personal/linux/build
+++ b/personal/linux/build
@@ -1,16 +1,76 @@
#!/bin/sh -e
+# POSIX install functions, similar to 'install -Dm'
+# and 'install -Dm* -t'
+kinstall() {
+ # usage: kinstall 644 file /usr/bin/prog
+ mkdir -p "${3%/*}"; rmdir "$3" 2>/dev/null ||:
+ cp "$2" "$3"
+ [ -d "$3" ] && set -- "$1" "$3/${2##*/}"
+ chmod "$1" "${3:-$2}"
+}
+
+kinstall_t() {
+ # usage: kinstall_t 644 /usr/bin prog1 prog2
+ mod=$1 dir=$2; mkdir -p "$dir"
+ shift 2
+ for file; do
+ cp "$file" "$dir"
+ chmod "$mod" "$dir/${file##*/}"
+ done
+}
+
+# Use an out function similar to KISS' log.
+out() { printf '\033[1;33m-> \033[1;36mlinux \033[m%s\n' "$@" >&2 ;}
+
patch -p1 < kernel-no-perl.patch
cp .config oldconfig
make olddefconfig
# Store the build version in a file and a variable.
-read -r ver <<EOF
-$(make -s kernelrelease)
-EOF
+make kernelrelease > version
+read ver < version
+
+modulepath="$1/usr/lib/modules/$ver/build"
+out "Compiling the kernel"
make
-install -Dm644 "$(make -s image_name)" "$1/boot/vmlinuz-$ver"
-install -Dm644 System.map "$1/boot/System.map-$ver"
-install -Dm644 .config "$1/boot/Config-$ver"
+
+out "Installing the kernel"
+kinstall 644 "$(make -s image_name)" "$1/boot/vmlinuz-$ver"
+kinstall 644 System.map "$1/boot/System.map-$ver"
+kinstall 644 .config "$1/boot/Config-$ver"
+
+out "Installing kernel modules"
+make INSTALL_MOD_PATH="$1/usr" modules_install
+
+out "Creating module source directory"
+rm -f "${modulepath%/*}/build" "${modulepath%/*}/source"
+kinstall_t 644 "$modulepath/arch/x86" arch/x86/Makefile
+kinstall_t 644 "$modulepath/arch/x86/kernel" arch/x86/kernel/asm-offsets.s
+kinstall_t 644 "$modulepath/kernel" kernel/Makefile
+kinstall_t 644 "$modulepath/drivers/md" drivers/md/*.h
+kinstall_t 644 "$modulepath/net/mac80211" net/mac80211/*.h
+kinstall_t 755 "$modulepath/tools/objtool" tools/objtool/objtool
+kinstall_t 644 "$modulepath" .config Makefile Module.symvers \
+ System.map version vmlinux
+
+
+cp -a scripts "$modulepath/scripts"
+cp -a include "$modulepath/include"
+cp -a arch/x86/include "$modulepath/arch/x86/include"
+
+find . -name 'Kconfig*' | while read -r file; do
+ kinstall 644 "$file" "$modulepath/$file"
+done
+
+out "Removing junk"
+find -L "${modulepath%/*}" -type l -exec rm -rf {} +
+find "${modulepath%/*}" -type f -name '*.o' -exec rm -rf {} +
+
+out "Linking /usr/src/linux to the module directory"
+mkdir -p "$1/usr/src"
+ln -sf "${modulepath#$1}" "$1/usr/src/linux"
+
+out Done.
diff --git a/personal/linux/checksums b/personal/linux/checksums
index db72931..e637c05 100644
--- a/personal/linux/checksums
+++ b/personal/linux/checksums
@@ -1,3 +1,3 @@
-8ea27e1ed38981f772cc6d5f16ab8dbb8052c3800ba0494bd798fbb95dcc1779 linux-5.8.3.tar.xz
-53355eb7cee9c7e391666ce16456728f949c11eb0bfc574fe0b051d94b1686e0 .config
+99d8bc1b82f17d7d79f9af4a94af4c0e3772159e9e6e278761bde8569f93e15f linux-5.8.9.tar.xz
+e32390b867671fe06e495b9d6faa727c0e26a8898c6ed57f1914d210a842bc17 .config
fa48e2d147774cd921f52e0a4e04e53d654789bc5df9784511617c780f261e9e kernel-no-perl.patch
diff --git a/personal/linux/depends b/personal/linux/depends
index d40cfed..790127c 100644
--- a/personal/linux/depends
+++ b/personal/linux/depends
@@ -1 +1,3 @@
-libelf make
+libelf
+libressl
+zlib
diff --git a/personal/linux/files/.config b/personal/linux/files/.config
index 5eb2137..6810135 100644
--- a/personal/linux/files/.config
+++ b/personal/linux/files/.config
@@ -1,6 +1,6 @@
#
# Automatically generated file; DO NOT EDIT.
-# Linux/x86 5.8.1 Kernel Configuration
+# Linux/x86 5.8.3 Kernel Configuration
#
CONFIG_CC_VERSION_TEXT="gcc (GCC) 10.2.0"
CONFIG_CC_IS_GCC=y
@@ -649,6 +649,7 @@ CONFIG_HOTPLUG_SMT=y
# CONFIG_OPROFILE is not set
CONFIG_HAVE_OPROFILE=y
CONFIG_OPROFILE_NMI_TIMER=y
+# CONFIG_KPROBES is not set
CONFIG_JUMP_LABEL=y
# CONFIG_STATIC_KEYS_SELFTEST is not set
CONFIG_UPROBES=y
@@ -726,6 +727,7 @@ CONFIG_VMAP_STACK=y
CONFIG_ARCH_HAS_STRICT_KERNEL_RWX=y
CONFIG_STRICT_KERNEL_RWX=y
CONFIG_ARCH_HAS_STRICT_MODULE_RWX=y
+CONFIG_STRICT_MODULE_RWX=y
CONFIG_HAVE_ARCH_PREL32_RELOCATIONS=y
CONFIG_ARCH_USE_MEMREMAP_PROT=y
# CONFIG_LOCK_EVENT_COUNTS is not set
@@ -743,7 +745,15 @@ CONFIG_HAVE_GCC_PLUGINS=y
CONFIG_RT_MUTEXES=y
CONFIG_BASE_SMALL=0
-# CONFIG_MODULES is not set
+CONFIG_MODULES=y
+# CONFIG_MODULE_FORCE_LOAD is not set
+# CONFIG_MODULE_UNLOAD is not set
+# CONFIG_MODVERSIONS is not set
+# CONFIG_MODULE_SRCVERSION_ALL is not set
+# CONFIG_MODULE_SIG is not set
+# CONFIG_MODULE_COMPRESS is not set
+# CONFIG_MODULE_ALLOW_MISSING_NAMESPACE_IMPORTS is not set
+CONFIG_UNUSED_SYMBOLS=y
CONFIG_MODULES_TREE_LOOKUP=y
CONFIG_BLOCK=y
CONFIG_BLK_SCSI_REQUEST=y
@@ -1167,6 +1177,7 @@ CONFIG_XPS=y
# CONFIG_CGROUP_NET_CLASSID is not set
CONFIG_NET_RX_BUSY_POLL=y
CONFIG_BQL=y
+# CONFIG_BPF_JIT is not set
CONFIG_NET_FLOW_LIMIT=y
#
@@ -1340,6 +1351,7 @@ CONFIG_DEV_COREDUMP=y
# CONFIG_DEBUG_DRIVER is not set
CONFIG_DEBUG_DEVRES=y
# CONFIG_DEBUG_TEST_DRIVER_REMOVE is not set
+# CONFIG_TEST_ASYNC_DRIVER_PROBE is not set
CONFIG_GENERIC_CPU_AUTOPROBE=y
CONFIG_GENERIC_CPU_VULNERABILITIES=y
CONFIG_REGMAP=y
@@ -2453,6 +2465,7 @@ CONFIG_I2C_I801=y
# CONFIG_I2C_MLXCPLD is not set
# end of I2C Hardware Bus support
+# CONFIG_I2C_STUB is not set
# CONFIG_I2C_SLAVE is not set
# CONFIG_I2C_DEBUG_CORE is not set
# CONFIG_I2C_DEBUG_ALGO is not set
@@ -4606,6 +4619,7 @@ CONFIG_CRYPTO_NULL2=y
# CONFIG_CRYPTO_PCRYPT is not set
CONFIG_CRYPTO_CRYPTD=y
CONFIG_CRYPTO_AUTHENC=y
+# CONFIG_CRYPTO_TEST is not set
CONFIG_CRYPTO_SIMD=y
CONFIG_CRYPTO_GLUE_HELPER_X86=y
@@ -5096,6 +5110,7 @@ CONFIG_PROBE_EVENTS=y
# CONFIG_TRACE_EVAL_MAP_FILE is not set
# CONFIG_FTRACE_STARTUP_TEST is not set
# CONFIG_RING_BUFFER_STARTUP_TEST is not set
+# CONFIG_PREEMPTIRQ_DELAY_TEST is not set
CONFIG_PROVIDE_OHCI1394_DMA_INIT=y
# CONFIG_SAMPLES is not set
CONFIG_HAVE_ARCH_KCSAN=y
@@ -5148,6 +5163,7 @@ CONFIG_RUNTIME_TESTING_MENU=y
# CONFIG_RBTREE_TEST is not set
# CONFIG_REED_SOLOMON_TEST is not set
# CONFIG_INTERVAL_TREE_TEST is not set
+# CONFIG_PERCPU_TEST is not set
# CONFIG_ATOMIC64_SELFTEST is not set
# CONFIG_TEST_HEXDUMP is not set
# CONFIG_TEST_STRING_HELPERS is not set
@@ -5162,10 +5178,18 @@ CONFIG_RUNTIME_TESTING_MENU=y
# CONFIG_TEST_RHASHTABLE is not set
# CONFIG_TEST_HASH is not set
# CONFIG_TEST_IDA is not set
+# CONFIG_TEST_LKM is not set
+# CONFIG_TEST_BITOPS is not set
+# CONFIG_TEST_VMALLOC is not set
+# CONFIG_TEST_USER_COPY is not set
+# CONFIG_TEST_BPF is not set
+# CONFIG_TEST_BLACKHOLE_DEV is not set
# CONFIG_FIND_BIT_BENCHMARK is not set
# CONFIG_TEST_FIRMWARE is not set
# CONFIG_TEST_SYSCTL is not set
# CONFIG_TEST_UDELAY is not set
+# CONFIG_TEST_STATIC_KEYS is not set
+# CONFIG_TEST_KMOD is not set
# CONFIG_TEST_MEMCAT_P is not set
# CONFIG_TEST_STACKINIT is not set
# CONFIG_TEST_MEMINIT is not set
diff --git a/personal/linux/sources b/personal/linux/sources
index 3041088..1ba4278 100644
--- a/personal/linux/sources
+++ b/personal/linux/sources
@@ -1,3 +1,3 @@
-https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.8.3.tar.xz
+https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.8.9.tar.xz
files/.config
patches/kernel-no-perl.patch
diff --git a/personal/linux/version b/personal/linux/version
index 155c18c..abdda96 100644
--- a/personal/linux/version
+++ b/personal/linux/version
@@ -1 +1 @@
-5.8.3 1
+5.8.9 1