mo3rfan / bpi-m2z-kernel

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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)

License:Other


Languages

Language:C 98.2%Language:Assembly 0.9%Language:Shell 0.3%Language:Makefile 0.2%Language:Python 0.1%Language:Perl 0.1%Language:C++ 0.0%Language:Roff 0.0%Language:SmPL 0.0%Language:Yacc 0.0%Language:Lex 0.0%Language:Awk 0.0%Language:UnrealScript 0.0%Language:Gherkin 0.0%Language:Raku 0.0%Language:M4 0.0%Language:Clojure 0.0%Language:XS 0.0%Language:sed 0.0%