Links
Compile (custom) kernel
Loosely following the .gitlab-ci.yml of https://git.beagleboard.org/beagleboard/linux, we need the following steps for cross-compilation:
CORES=$(getconf _NPROCESSORS_ONLN)
REV=elak-spl
export ARCH=arm64
export CROSS_COMPILE=aarch64-linux-gnu-
make clean
make bb.org_defconfig
make -j${CORES} KBUILD_DEBARCH=arm64 KDEB_PKGVERSION=bb-ai64 LOCALVERSION=-ti-rt-${REV} KDEB_SOURCENAME=linux-upstream KDEB_COMPRESS=xz bindeb-pkg
Resulting debian packages are linux-image-*-ti-rt-elak-spl_bb-ai64_arm64.deb, linux-headers-*-ti-rt-elak-spl_bb-ai64_arm64.deb, and linux-libc-dev_bb-ai64_arm64.deb