-
Overview
-
redpesk OS releases
-
Security updates
-
Application Framework Manager
-
Application Framework Binder
-
APIs & Services
-
Security manager
-
Trusted Boot
-
Recovery features
-
redpak
-
Minimal image
- Reduce image size
- Optimizing boot time
-
kernel fragments description
- Introduction to Linux Kernel Configuration
- 01 Disable IPC, Timers and Audit
- 02 Disable Kconfig, Scheduler and Initrd
- 03 Disable Perf, Profiling and Errata
- 04 Disable EFI, Power Management Debug and Energy Model
- 05 Disable Schedutil, CPUFreq Governors and Virtualization
- 06 Disable Kprobes and Jump Labels
- 07 Disable GCC Plugins and Function Alignment
- 08 Disable Partition Parsers
- 09 Enable Inline Spinlocks and Kernel Operations
- 10 Disable Swap, Memory Hotplug and KSM
- 11 Disable Networking IPv4, IPv6, Netfilter
- 12 Disable SCTP, VLAN, TIPC, BATMAN
- 13 Disable Wireless, Bluetooth, CAN and RFKILL
- 14 Disable PCI and Firmware
- 15 Disable GNSS and ProcEvents
- 16 Disable Block Storage NBD and AoE
- 17 Disable EEPROM and Misc Drivers
- 18 Disable Network Device Drivers
- 19 Disable PHY Drivers
- 20 Disable PPP, WLAN Coexistence, and Failover
- 21 Disable Input Devices
- 22 Disable Serial, TTY and TPM
- 23 Disable I2C, Power and Sensor Drivers
- 24 Disable MFD, Display and Media Drivers
- 25 Disable USB, Sound, RTC and VirtIO
- 26 Disable Filesystem Encodings and Compatibility
- 27 Enable Minimal Cryptographic Core with SHA3 and XTS
- 28 Disable Hardware Cryptography, Keep DRBG and Jitter Entropy
- 29 Disable Kernel Debugging Features
- 30 Disable Filesystem Verity and SecurityFS
-
Zephyr in Redpesk
-
Mender redpesk (OTA)
-
Hardware support
- Download images
- Image metrics
- Trusted Boot
- Boards - ARM64
- Boards - x86_64
- Boards - Virtual
- Miscs
Configure Linux Kernel
- Kernel-specific optimizations: minimal modules, kernel parameters, initrd, and others
- Building a reduced kernel (with less modules for examples) for faster boot time
Please note in our usecase, we used the BeagleBoard BeaglePlay as our reference.
We used Linux kernel version 6.6, you can check some of our sources here
Generating a .cfg file for Linux Kernel configuration
You may want to customize your Linux Kernel configuration with a configuration fragment (called cfg
).
An easy way to do that is to:
cd ${KERNEL_SOURCE}
cp .config .config.sav
make menuconfig
diff --unchanged-line-format= --old-line-format= --new-line-format="%L" ./.config.sav ./.config > 01-my-file.cfg
Merge a .cfg file to Linux Kernel configuration
If you want to merge a cfg configuration fragment to your Linux Kernel configuration just:
scripts/kconfig/merge_config.sh -m -r .config 01-my-file.cfg
If you have more than one cfg files:
for CFG in *.cfg; do
scripts/kconfig/merge_config.sh -m -r .config ${CFG}
done
Test your new Kernel
After the build of your kernel packages, you can simply copy them to your board and install them.
scp ./kernel-modules-extra-${VER}-${REL}.rpbatz.aarch64.rpm \
./kernel-modules-${VER}-${REL}.rpbatz.aarch64.rpm \
./kernel-core-${VER}-${REL}.rpbatz.aarch64.rpm \
./kernel-${VER}-${REL}.rpbatz.aarch64.rpm \
root@X.X.X.X:/;
ssh root@X.X.X.X dnf install -y /*;
Disable unused drivers
Disabling unused drivers is a key step in optimizing the boot time of a Linux Kernel, especially for embedded or industrial systems where specific hardware configurations are well-defined.
Use make menuconfig
to go to the configuration of the Kernel!
This requires to already have your defconfig declared and used. For more reference, go here!
So our goal is to disable unnecessary drivers. Navigate to Device Drivers
and uncheck drivers not required for the system. See our examples below!
Tips for safe optimization
- Start with known requirements
- Clearly define the hardware and peripherals your system uses
- Disable features incrementally
- Test the system after disabling each set of features to verify functionality