Skip to content

customConfig

Michael Neises edited this page Jul 14, 2021 · 1 revision

Cross-Compiling Kernel Modules for use with seL4's Linux VM using qemu-arm-virt from Debian 10

  1. download linux kernel repo
git clone git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
cd linux-stable
git checkout linux-4.9.y
git fetch
  1. choose the arm64 defconfig, for use with qemu-arm-virt
make ARCH=arm64 defconfig
  1. install ncurses-dev in order to use make menuconfig
sudo apt-get install ncurses-dev
  1. ensure loadable module support is enabled
make menuconfig
  1. prepare kernel for cross-compilation
make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- prepare
  1. prepare for module build (optional... might as well just build the kernel, right?)
make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- modules_prepare
  1. build linux kernel
make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- 

This results in a vmlinux file, which is the uncompressed kernel. I'm not sure whether this is useful to us, or if we need a compressed version, like a bzImage, for instance.

Clone this wiki locally