Monolinux — a single-file distribution that boots on ARMv7 528 MHz CPUs in 0.37 seconds

Erik Moqvist, the author of the platform Simba and tools cantools, is developing a new distribution Monolinux, focused on creating embedded Linux systems for isolated execution of specific applications written in C. The distribution is notable for packaging the software into a single statically linked executable file, which includes all components necessary for the application's operation (essentially, the distribution consists of a Linux kernel and a ram-disk with a statically compiled init process that encompasses the application and the required libraries). The code is distributed is licensed under the MIT License.

In the environment, all subsystems and system calls of the Linux kernel are provided, including access to the file system, network stack, and device drivers. Libraries available for binding with the application include ml (the Monolinux C library with shell, DHCP and NTP clients, Device-mapper, etc.), async (asynchronous framework), bitstream, curl (HTTP, FTP, …), detools (delta patches), heatshrink (compression algorithm), humanfriendly (helper tools), mbedTLS, xz and zlib. A rapid development cycle is supported, allowing new versions to be evaluated within seconds after changes are made to the code.

Monolinux variants are prepared for the Raspberry Pi 3 and Jiffy. The final size of the builds is about 800 KB. The board Jiffy features an i.MX6UL SoC with a 528 MHz ARMv7-A CPU, 1 GB DDR3 RAM, and 4 GB eMMC. The boot time on the Jiffy board is just 0.37 seconds — from power on to readiness of the Ext4 file system. Of this, 1 ms is spent on hardware initialization of the SoC, 184 ms for executing the boot code, 86 ms for the bootloader operation, 62 ms for the launch of the Linux kernel, and 40 ms for activating Ext4. The reboot time is 0.26 seconds. In the case of using the network stack, due to delays in establishing the Ethernet channel and obtaining network parameters, the system becomes ready for network interaction after 2.2 seconds.

The system uses Linux kernel 4.14.78 in a minimal configuration with additional patches, eliminating extra delays in the MMC driver (the MMC is connected via board firmware and is already activated when the driver starts) and initiating the MMC and FEC (Ethernet) driver initializations in parallel.

Source: opennet.ru

Buy reliable website hosting with DDoS protection, VPS VDS servers 🔥 Buy reliable website hosting with DDoS protection, VPS VDS servers | ProHoster