mirror of
https://github.com/ARM-software/devlib.git
synced 2025-09-02 01:51:53 +01:00
tools/buildroot: Add support for generating Linux target system images
Integrate buildroot into devlib in order to ease building kernel and root filesystem images via 'generate-kernel-initrd.sh' helper script. As its name suggests, the script builds kernel image which also includes an initial RAM disk per default config files located under configs/<arch>/. Provide config files for buildroot and Linux kernel as well as a post-build.sh script which tweaks (e.g., allowing root login on SSH) target's root filesystem. doc/tools.rst talks about details of kernel and rootfs configuration. Signed-off-by: Metin Kaya <metin.kaya@arm.com>
This commit is contained in:
@@ -25,6 +25,7 @@ Contents:
|
||||
derived_measurements
|
||||
platform
|
||||
connection
|
||||
tools
|
||||
|
||||
Indices and tables
|
||||
==================
|
||||
|
@@ -41,3 +41,45 @@ Android emulator:
|
||||
# After ~30 seconds, the emulated device will be ready:
|
||||
adb -s emulator-5554 shell "lsmod"
|
||||
|
||||
|
||||
Building buildroot
|
||||
------------------
|
||||
|
||||
``buildroot/generate-kernel-initrd.sh`` helper script downloads and builds
|
||||
``buildroot`` per config files located under ``tools/buildroot/configs``
|
||||
for the specified architecture.
|
||||
|
||||
The script roughly checks out ``2023.11.1`` tag of ``buildroot``, copies config
|
||||
files for buildroot (e.g., ``configs/aarch64/arm-power_aarch64_defconfig``) and
|
||||
kernel (e.g., ``configs/aarch64/linux.config``) to necessary places under
|
||||
buildroot directory, and runs ``make arm-power_aarch64_defconfig && make``
|
||||
commands.
|
||||
|
||||
As its name suggests, ``generate-kernel-initrd.sh`` builds kernel image with an
|
||||
initial RAM disk per default config files.
|
||||
|
||||
There is also ``post-build.sh`` script in order to make following tunings on
|
||||
root filesystem generated by ``buildroot``:
|
||||
- allow root login on SSH.
|
||||
- increase number of concurrent SSH connections/channels to let devlib
|
||||
consumers hammering the target system.
|
||||
|
||||
In order to keep rootfs minimal, only OpenSSH and util-linux packages
|
||||
are enabled in the default configuration files.
|
||||
|
||||
DHCP client and SSH server services are enabled on target system startup.
|
||||
|
||||
SCHED_MC, SCHED_SMT and UCLAMP_TASK scheduler features are enabled for aarch64
|
||||
kernel.
|
||||
|
||||
If you need to make changes on ``buildroot``, rootfs or kernel of target
|
||||
system, you may want to run commands similar to these:
|
||||
|
||||
.. code:: shell
|
||||
|
||||
$ cd tools/buildroot/buildroot-v2023.11.1-aarch64
|
||||
$ make menuconfig # or 'make linux-menuconfig' if you want to configure kernel
|
||||
$ make
|
||||
|
||||
See https://buildroot.org/downloads/manual/manual.html for details.
|
||||
|
||||
|
Reference in New Issue
Block a user