Monolinux
Create embedded Linux systems with a single statically linked executable, because smaller is better!
Monolinux is primarily targeting the C programming language.
Features:
- Everything the Linux kernel provides.
- File systems.
- Networking.
- Device drivers.
- ...
- Libraries to statically link with your application.
- async (asynchronous framework)
- bitstream (bit packing and unpacking)
- bunga (OAM over TCP/IP)
- curl (HTTP, FTP, ...)
- dbg-macro (printf debugging)
- detools (delta encoding)
- heatshrink (a compression algorithm)
- humanfriendly (various utilities)
- mbedTLS (TLS, SSL, crypto, ...)
- messi (message passing in distributed systems)
- monolinux-c-library (the Monolinux C library)
- pbtools (Google Protocol Buffers)
- xz (LZMA)
- zlib
Creating a project
A minimal Monolinux project's file tree looks like below. Add needed software packages to the 3pp folder.
my-project/
├── 3pp/
│ ├── arm-linux-musleabi-cross.tgz - a toolchain (if needed)
│ ├── linux/ - the linux kernel
│ └── monolinux/ - this repository as a submodule
├── app/ - your application
│ ├── main.c
│ └── Makefile
├── LICENSE
├── Makefile
└── setup.sh - development environment setup script
Here are more example projects:
Tips and tricks
See man procfs
for details of the following commands.
$ cat /proc/devices
$ cat /proc/meminfo
$ cat /proc/modules
$ cat /proc/net/arp
$ cat /proc/net/dev
$ cat /proc/net/protocols
$ cat /proc/net/route
$ cat /proc/uptime
$ cat /proc/version
$ cat /proc/mounts
Disk commands.
$ ls /sys/block
$ mount /dev/sda1 /mnt/disk ext4
$ ls /mnt/disk
$ cat /mnt/disk/README
Configuration.
# DNS.
$ cat /etc/resolv.conf
Device tree.
$ cat /sys/firmware/devicetree/base/...