# MinimalLinux **Repository Path**: ChenPi12/mlinux-minimal ## Basic Information - **Project Name**: MinimalLinux - **Description**: A tiny Linux distribution. (DEPRECATED) - **Primary Language**: Python - **License**: GPL-2.0 - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 10 - **Forks**: 4 - **Created**: 2024-03-09 - **Last Updated**: 2025-04-11 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # DEPRECATED! DEPRECATED! DEPRECATED! ## minimal-linux is merged into the MLinux project, https://github.com/mlinux-project/minimal is the latest repo.






# MinimalLinux - Minimal Linux filesystem ## Dependencies ### For building binary - A C runtime, compiler, linker, etc. - Mandatory. - Either the platform's native 'cc', or GCC 4.2 or newer. For building BusyBox and Linux. - GCC Homepage: - Download: - A shell - Mandatory. - Either the platform's native 'sh', or GNU Bash. - GNU Bash Homepage: - Download: - Awk - Mandatory. - Either the platform's native awk, mawk, or nawk, or GNU awk. - GNU awk Homepage: - Download: - Bc - Mandatory. - Either the platform's native bc, or GNU bc. For building Linux. - GNU bc Homepage: - Download: - Bison - Mandatory. - Either the platform's native bison, or GNU bison. For building Linux. - GNU Bison Homepace: - Download: - Core POSIX utilities - Mandatory. - Either the platform's native utilities, or GNU coreutils. - GNU coreutils Homepage: - Download: - Cpio - Mandatory. - Either the platfrom's native cpio, or GNU cpio. - GNU cpio Homepage: - Download: - Flex - Mandatory. - For building Linux. - Homepage: - Download: - GNU Grub - Mandatory. - GNU Grub 2.x. For install grub in the image file. - Homepage: - Download: - GNU Make - Mandatory. - GNU Make 3.79.1 or newer. - GNU Make Homepage: - Download: - Grep - Mandatory. - Either the platform's native grep, or GNU grep. - Homepage: - Download: - Kpartx - Mandatory. - For mounting filesystem. - Homepage: - libelf - Mandatory. - Must be libelf-dev. For building Linux. - libssl - Mandatory. - Must be libssl-dev. For building Linux. - QEMU Utils - Mandatory. - For creating disk image. - Homepage: - Download: - Sed - Mandatory. - Either the platform's native sed, or GNU sed. - Homepage: - Download: - Sudo - Mandatory. - Homepage: - Download: - Util-linux - Mandatory. - Homepage: - Download: - Wget - Mandatory. - Either the platform's native 'wget', or GNU Wget. For getting source codes. - GNU Wget Homepage: - Download: - XZ Utils - Mandatory. - For compressing image file and Linux kernel. - XZ Utils Homepage: - Download: #### Install binary building dependencies on Debian ```shell sudo apt-get update && sudo apt-get install gcc cpio xz-utils gawk grub2 make grep kpartx qemu-utils sed util-linux wget binutils libelf-dev libssl-dev bc flex bison -y ``` ### For building tarball - GNU Autoconf - Mandatory. - Homepage: - Download: - GNU Automake - Mandatory. - Homepage: - Download: #### Install tarball building dependencies Debian ```shell sudo apt-get update && sudo apt-get autoconf automake -y ``` ### For generating picture - Python - Mandatory. - For `make picture` command. - Homepage: - Download: - Python Pillow - Mandatory. - For `make picture` command. - Homepage: - Download: #### Install picture-generating dependencies on Debian ```shell sudo apt-get update && sudo apt-get install python3 python3-pillow -y ``` Or you can using pip to install Pillow. ```shell pip install Pillow ``` ### For testing - Tree - Mandatory. - For `make check` command. - Homepage: - QEMU System - Mandatory. - For `make check` command. - Homepage: - Download: #### Install testing dependencies on Debian ```shell sudo apt-get update && sudo apt-get install tree qemu-system -y ``` ## Build source tarball **You need to install the dependencies first, and make sure you are in source directory.** ```shell make -f Makefile.devel dist ``` ## Build rootfs, linux kernel and disk image ```shell ./configure make -j$(nproc) ``` The compressed rootfs will be name to `rootfs.tar.xz`. The compressed linux kernel will be name to `vmlinuz.xz`. The compressed disk image will be name to `disk.img`. ## Configuration options - `--with-busybox-version=X.X.X` - Specify the version of Busybox. - Default is `1.36.1`. - `--with-linux-version=X.X.X` - Specify the version of Linux kernel. - Default is `6.7.5`. - `--with-busybox-mirror=OFFICIAL | ` - Specify the mirror of Busybox. If you want to use the official mirror, set it to `OFFICIAL`. Otherwise, set it to the URL of the mirror. - Default is `OFFICIAL`. - `--with-linux-mirror=OFFICIAL | CDN | TSINGHUA | ALIYUN | USTC | ` - Specify the mirror of Linux kernel. If you want to use the Tsinghua mirror, set it to `TSINGHUA`. Otherwise, set it to the URL of the mirror. - Default is `OFFICIAL`. Like this: ```shell ./configure --with-busybox-version=1.36.1 --with-linux-version=6.7.5 --with-busybox-mirror=OFFICIAL --with-linux-mirror=TSINGHUA ``` ## Run **You should use origin binary file instead of XZ compressed one!!!** Using this command to run `disk.img`. ```shell qemu-system-x86_64 -m 1024 -hda disk.img ``` Using this command to run `vmlinuz`. ```shell qemu-system-x86_64 -m 1024 -kernel vmlinuz ``` **This vmlinuz contians initramfs, so you can execute it directly using QEMU.** ## Copyright The MinimalLinux is under GPL 2.0, see file [LICENSE](./LICENSE). ## Download ## Homepage