# MLinux Minimal **Repository Path**: mlinux-project/minimal ## Basic Information - **Project Name**: MLinux Minimal - **Description**: MLinux Minimal is a minimalized Linux distro. - **Primary Language**: 其他 - **License**: GPL-2.0 - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2024-03-31 - **Last Updated**: 2024-04-27 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # MLinux Minimal - A Tiny Linux distro MLinux Minimal ## Dependencies ### For building binary - A x86_64 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 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: - 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: - Syslinux - Mandatory. - For creating disk image. - 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: - rsync - Mandatory - For installing Linux header. - rsync Homepage: - Download: #### Install binary building dependencies on Debian ```shell sudo apt-get update && sudo apt-get install gcc cpio xz-utils gawk make grep qemu-utils sed util-linux wget binutils libelf-dev libssl-dev bc flex bison rsync -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 install autoconf automake -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 MLinux Minimal is under GPL 2.0, see file [LICENSE](./LICENSE). ## Download ## Homepage