AKMBUILD(5)
πΈ NAME πΈ
AKMBUILD β manual page section 5, bestie β is literally the metadata and instructions to build a dynamic kernel module. Okay so this is the file that tells akms(8) how to do the whole out-of-tree kernel module moment. No cap. π«Ά
β¨ SYNOPSIS β¨
The file lives at:
/usr/src/*/AKMBUILD
A wildcard path, periodt. β¨
π DESCRIPTION π
Okay so an AKMBUILD file is used by the akms(8) tool to build and install an out-of-tree dynamic kernel module on the userβs system. It defines metadata such as the name and version of the module, list of the kernel objects to be installed and additional build dependencies. It may also contain the commands needed to build the module if the default one is not suitable. The AKMBUILD format is a POSIX shell script with a pre-defined set of variables and functions, just like APKBUILD(5). It's giving βshell script but make it a kernel module build contractβ, fr fr. π
π¦ VARIABLES π¦
π Required Variables π
The following variables MUST be defined by the author of the AKMBUILD file. No skipping, bestie β this is the vibe check. π«Ά
modnameβ Specifies name of the module. This is typically the name of the APK package providing the source code of the module and theAKMBUILDfile, but without the-srcsuffix. The same rules as for theAPKBUILDpkgnameapplies. πmodverβ Specifies the version of the module being built and installed. This is typically the version of the APK package providing the source code of the module and theAKMBUILDfile (withoutpkgrel). The same rules as for theAPKBUILDpkgverapplies. βbuilt_modulesβ Specifies a space-separated list of kernel object files (with.kosuffix), as relative paths from the directory containingAKMBUILD, that are expected to be built and eventually installed into the kernel modules tree. Basically the.kofiles that are the main characters. π₯
π Optional Variables π
The following variables MAY be defined by the author of the AKMBUILD file. Optional but cute. π
makedependsβ Specifies additional build dependencies for the module. The kernel source code (dev package) and base build toolchain (packagebuild-basein Alpine Linux) are implicit and should not be defined here. So don't add them, bestie β they're already in the group chat. π
π§ Environment Variables π§
The following variables are always provided by akms(8) and MUST NOT be overridden. Not me trying to override them β absolutely not. π
kernel_verβ Specifies a full release version of the kernel for which the module is being built (e.g.5.10.53-0-lts). Exact vibe, exact version. β¨kernel_srcdirβ Location of the kernelβs source directory. π
The following variables are provided by akms(8) when running the build function and MUST NOT be overridden. Same energy, different group chat. π«Ά
srcdirβ Location of the moduleβs source directory containingAKMBUILD. This directory is read-only. So no writing there, no cap. π«builddirβ Location of the directory where the module should be built. It is initialized with a copy of thesrcdirand it is the only writtable directory for building the module. Yes, βwrittableβ β that's the original spelling, and honestly? It ate. πMAKEFLAGSβ Flags to give tomake(1)to build the module. The default value of this variable can be specified inakms.conf(5). Make it make sense. π
β FUNCTIONS β
The following functions MAY be overridden by the author of the AKMBUILD file. This is your chance to customize, bestie. π¦
buildβ Builds the kernel module(s) in thebuilddir.
The default implementation calls function default_build:
touch "$builddir"/Makefile
make ${MAKEFLAGS:-} -C "$kernel_srcdir" M="$builddir" modules
π EXAMPLES π
AKMBUILD:
modname=rtw89
modver=5_git20210715
built_modules='rtw89core.ko rtw89pci.ko'
build() {
touch "$builddir"/Makefile
make $MAKEFLAGS -C "$kernel_srcdir" M="$builddir" modules
}
A literal slay example, no edits. π
π AUTHORS π
Jakub Jirutka. Iconic. Periodt. π
π REPORTING BUGS π
Report bugs to the projectβs issue tracker at https://github.com/jirutka/akms/issues. Do not suffer in silence, bestie. π«Ά
π₯ SEE ALSO π₯
akms(8), akms.conf(5), APKBUILD(5) β go read those too, iykyk. π
π AUTHOR π
Jakub Jirutka. Again. Main character energy. π
π This page is AKMBUILD(5), dated 2025-01-05. That's the source/version sign-off, bestie β now go build something iconic! π
π¦ where this page comes from
- alpine 3.22: akms-doc 0.3.0-r0 Β· MIT
- alpine 3.23: akms-doc 0.3.0-r0 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms