Skip to content

Instantly share code, notes, and snippets.

@aut0
Last active March 21, 2022 04:41
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aut0/4c90231e9cf3d977f3bab39040f093ce to your computer and use it in GitHub Desktop.
Save aut0/4c90231e9cf3d977f3bab39040f093ce to your computer and use it in GitHub Desktop.
Cross-compile Ubuntu arm64 mainline kernel v5.7.6

I used an ubuntu docker container for the build process

docker run -it -v $(pwd):/root ubuntu:groovy /bin/bash

Inside the container

apt update
apt install rsync dwarves bc kmod cpio flex cpio libncurses5-dev libssl-dev gcc-aarch64-linux-gnu bison kernel-wedge build-essential wget fakeroot git
cd /root
git clone https://git.launchpad.net/~ubuntu-kernel-test/ubuntu/+source/linux/+git/mainline-crack
cd mainline-crack
wget https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.7.6/crack.bundle
git bundle unbundle crack.bundle
git checkout 68a395e93c3ae2165136f437ce5210f32b6d9dd9
fakeroot debian/rules clean
dpkg-buildpackage -uc -ui -aarm64 -b -d

.deb files are found in /root afterwards. I am not sure if you really need all the dependencies.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment