blob: 2789a0e167353aa9596af2d247dd9203c67e0010 (
plain) (
blame)
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
|
#!/bin/bash
set -e
LINUX=linux-6.6.2
wget https://cdn.kernel.org/pub/linux/kernel/v6.x/$LINUX.tar.xz
unxz $LINUX.tar.xz && tar xf $LINUX.tar
cd $LINUX
cat <<EOF > kernel_fragment.config
# 64bit kernel
CONFIG_64BIT=y
# enable support for compressed initrd (gzip)
CONFIG_BLK_DEV_INITRD=y
CONFIG_RD_GZIP=y
# support for ELF and #! binary format
CONFIG_BINFMT_ELF=y
CONFIG_BINFMT_SCRIPT=y
# /dev
CONFIG_DEVTMPFS=y
CONFIG_DEVTMPFS_MOUNT=y
# tty & console
CONFIG_TTY=y
CONFIG_SERIAL_8250=y
CONFIG_SERIAL_8250_CONSOLE=y
# pseudo fs
CONFIG_PROC_FS=y
CONFIG_SYSFS=y
# debugging
CONFIG_DEBUG_KERNEL=y
CONFIG_DEBUG_INFO=y
## tinyconfig sets DEBUG_INFO_NONE, overwrite with toolchain default else
## DEBUG_INFO will not be enabled.
CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=y
CONFIG_PRINTK=y
CONFIG_EARLY_PRINTK=y
EOF
make tinyconfig
./scripts/kconfig/merge_config.sh -n ./kernel_fragment.config
make -j$(nproc --ignore=2)
|