Skip to content

linux

  • SLOB and SLAB are deprecated; use SLUB instead
  • bsdtar patch: https://lore.kernel.org/lkml/[email protected]/T/
  • INSTALL_MOD_STRIP=1 for make install
  • Check linux/kernel/gen_kheaders.sh
  • Check linux/scripts/package/buildtar
  • modules.*.bin and modules.pcimap should be automatically generated
  • Check CONFIG_UEVENT_HELPER for hotplug
  • Consider stripping the kernel with:
strip --strip-debug -o vmlinux.stripped vmlinux
  • To strip kernel modules use INSTALL_MOD_STRIP=1 (which does a --strip-debug):
make modules_install INSTALL_MOD_STRIP=1
  • Do not use INSTALL_MOD_STRIP="--strip-all" as it breaks the modules
  • headers_check is obsolete (no-op)
  • make xconfig is a bit more ergonomic but it requires qt; check make gconfig
  • Kernel builds can be further optimized with KCFLAGS?
  • libelf (or elfutils-libelf) is required for kernel orc unwinding
  • Examine:
Terminal window
dmesg -t > dmesg_current
dmesg -t -k > dmesg_kernel
for i in emerg alert crit err warn; do
dmesg -t -l $i > dmesg_current_$i
done
  • Previous build command:
Terminal window
CROSS_COMPILE=x86_64-glaucus-linux-musl- \
CC="$toolchain/bin/x86_64-glaucus-linux-musl-gcc" \
HOSTCC="$toolchain/bin/x86_64-glaucus-linux-musl-gcc" \
PATH="$toolchain/bin:/usr/bin" \
make \
O=$PWD/../build \ # needs to be changed
ARCH=x86_64 \
menuconfig