This article:
These instructions were written using the Armv8 Base Platform FVP but can be easily adapted for other platforms.
Follow the Arm Platforms instructions for Armv8-A FVPs to initialize an Arm Platforms workspace for a configuration of your choice. In this article we will use a build from source Busybox configuration for the Armv8-A Base Platform FVP:
+-------------+--------------------------------------------------+ | Workspace | <workspace> | | Platform | Armv8-A Base Platform with 64-bit software stack | | Type | Built from source | | Environment | Linux kernel + filesystem | | Kernel | latest-armlt (4.17 commit 9b2769768c) | | Filesystem | Busybox commit 111cdcf295 | +-------------+--------------------------------------------------+
Install the Armv8 Base Platform model from Arm Developer.
Install the libncurses5 package.
libncurses5
Upstream kernel.org kernels are typically configured using `make menuconfig' to generate a `.config' file listing which flags to set and with what values; the kernel is then built against this config. Users wishing to modify the Linux kernel shipped with the Arm Platforms deliverables will notice that this method of configuring the kernel does not work; the `.config' will be ignored.
`make menuconfig'
`.config'
This is because the build scripts copy the kernel sources into a platform-specific directory and then generate a new `.config' in that directory by combining a number of configuration "fragments":
The solution is to:
`make'
### Generate platform-specific sources and .config cd <workspace> ./build-scripts/build-all.sh all ### Enter platform-specific source directory ### For Armv8-A FVP using Busybox: cd ./linux/out/fvp/mobile_bb/ ### Modify platform-specific .config make ARCH=arm64 menuconfig ### Re-build kernel using modified .config ### Note: replace `[...]' with the correct version info for your workspace release make -j8 ARCH=arm64 CROSS_COMPILE=<workspace>/tools/gcc/gcc-linaro-[...]_aarch64-linux-gnu/bin/aarch64-linux-gnu- ### Re-package Arm Platforms deliverables to include the modified kernel cd <workspace> ./build-scripts/build-all.sh package
WARNING: Do not run `./build-scripts/build-linux.sh package' as this will not package the re-built kernel; also avoid running `./build-scripts/build-all.sh all' as this will trample over your modified `.config'.
`./build-scripts/build-linux.sh package'
`./build-scripts/build-all.sh all'
To check your changes have been applied, run the kernel on your target platform and then zcat its configuration at runtime:
zcat
zcat /proc/config.gz | grep "CONFIG_VIRTUALIZATION"
In this example we have enabled the CONFIG_VIRTUALIZATION flag:
CONFIG_VIRTUALIZATION
Before:
After: