Skip to content

Linux kernel based on the mainline 5.17.5 kernel for BananaPi M2 Zero with WiFi (and wireguard)

License

Notifications You must be signed in to change notification settings

mo3rfan/bpi-m2z-kernel

Repository files navigation

BPI-M2 Zero kernel

Linux kernel based on the mainline 5.17.5 kernel for Banana Pi M2 Zero with WiFi (and wireguard)

Build & Install

  1. I built this on Ubuntu 22.04 x86_64 with the Arm GNU Toolchain (arm-none-linux-gnueabihf), so download and extract it and set the bin dir to PATH:
export PATH=$PATH:/opt/gcc-arm-10.3-2021.07-x86_64-arm-none-linux-gnueabihf/bin
  1. Install the following tools and libs:
sudo apt-get install flex bison g++ libgmp3-dev libmpc-dev
  1. Build from this project root.
make INSTALL_MOD_PATH=output ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabihf- m2z_lima_defconfig zImage modules modules_install dtbs -j$(nproc)
  1. Copy over the output/* (lib/modules) into rootfs of memory card (Follow the instructions here to install ubuntu in the memory card):
sudo cp -vfr ./output/* /
sync
  1. Install into the /boot dir of the memory card:
export KV=$(strings ./arch/arm/boot/Image | grep "Linux version" -m 1 | awk '{print $3}')
sudo cp -fv ./arch/arm/boot/zImage /boot/zImage_${KV}
sync
sudo cp -fv ./arch/arm/boot/dts/bpi-m2-zero-v4.dtb /boot/bpi-m2-zero.dtb_${KV}
sync
  1. Update the symlinks to point to new dtb and zImage inside /boot
cd /boot/
sudo ln -sf bpi-m2-zero.dtb_${KV} bpi-m2-zero.dtb
sudo ln -sf zImage_${KV} zImage

Changes from mainline

About

Linux kernel based on the mainline 5.17.5 kernel for BananaPi M2 Zero with WiFi (and wireguard)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published