...
 
Commits (2)
......@@ -2,8 +2,8 @@
A Linux ISO image build script based on [Minimal Linux Script](https://github.com/ivandavidov/minimal-linux-script).
The source bundles are downloaded and compiled automatically. If you are using [Pardus](https://www.pardus.org.tr), you should be able to resolve all build dependencies by executing the following command:
The source bundles are downloaded and compiled automatically. The script requires cross musl-based toolchain. If you are using [Pardus](https://www.pardus.org.tr), you should be able to resolve all build dependencies by executing the following command:
sudo apt install wget make gawk gcc-i686-linux-gnu g++-i686-linux-gnu linux-headers-4.19.0-16-686 bc bison flex xorriso libelf-dev libssl-dev libc-dev-i386-cross
sudo apt install wget make gawk gcc bc bison flex xorriso libelf-dev libssl-dev
The script doesn't require root privileges. In the end you should have a bootable ISO image named `ersoy_kardesler_linux.iso` in the same directory where you executed the script.
......@@ -23,15 +23,15 @@ set -ex
# Build Configuration
ARCH=i386
PREFIX_HOST=i686-linux-gnu
PREFIX=i686-linux-gnu-
PREFIX=i686-linux-musl-
HOST=i686-linux-musl
# Package versions
KERNEL_VERSION=5.10.31-gnu
KERNEL_VERSION_NOT_GNU=5.10.31
BUSYBOX_VERSION=1.32.1
LIBC_VERSION=2.33
MUSL_VERSION=1.2.2
NCURSES_VERSION=6.2
SYSLINUX_VERSION=6.03
......@@ -53,7 +53,7 @@ cd packages
wget -nc http://linux-libre.fsfla.org/pub/linux-libre/releases/${KERNEL_VERSION}/linux-libre-${KERNEL_VERSION}.tar.xz
wget -nc https://busybox.net/downloads/busybox-${BUSYBOX_VERSION}.tar.bz2
wget -nc http://ftpmirror.gnu.org/libc/glibc-${LIBC_VERSION}.tar.gz
wget -nc https://musl.libc.org/releases/musl-${MUSL_VERSION}.tar.gz
wget -nc https://invisible-island.net/datafiles/release/ncurses.tar.gz
wget -nc http://mirrors.edge.kernel.org/pub/linux/utils/boot/syslinux/syslinux-${SYSLINUX_VERSION}.tar.xz
......@@ -100,16 +100,12 @@ cp -r _install/* ../../rootfs
cd ../..
# Configure and install libc (glibc)
cd packages_extracted/glibc-${LIBC_VERSION}
# Configure and install musl
cd packages_extracted/musl-${MUSL_VERSION}
DESTDIR=$(pwd)/_install/usr
mkdir _install
cd _install
../configure --prefix=$(pwd)/usr --host=${PREFIX_HOST} --build=${PREFIX_HOST}
ARCH=${ARCH} CROSS_COMPILE=${PREFIX} ./configure --prefix=./_install
make
make install DESTDIR=${DESTDIR}
cd ..
make install
cp -r _install/* ../../rootfs
......@@ -119,7 +115,7 @@ cd ../..
# Configure and install ncurses
cd packages_extracted/ncurses-${NCURSES_VERSION}
./configure --host=${PREFIX_HOST} --prefix=$(pwd)/_install
./configure --host=${HOST} --prefix=$(pwd)/_install
make
make install
......