This commit is contained in:
Your Name 2023-12-23 20:19:18 +03:00
parent 6c652ea22b
commit 3ea8dfe675
3 changed files with 27 additions and 4 deletions

View File

@ -1,10 +1,8 @@
#!/bin/sh
#Add repos in 0-download-src.sh
CC=cc
RTFS=$(pwd)/rootfs
mu_repo="https://git.macaw.me/8nl/micro-utils"
ml_repo="git://git.musl-libc.org/musl"
cc_repo="git://repo.or.cz/tinycc.git"
#Tests
for i in tests/*; do
@ -22,7 +20,7 @@ mkdir rootfs
#Build system
for i in stages/*; do
if ! env mu_repo=$mu_repo ml_repo=$ml_repo cc_repo=$cc_repo RTFS=$RTFS $i; then
if ! env RTFS=$RTFS $i; then
echo "Build failed"
exit 1
fi

View File

@ -1,4 +1,8 @@
#!/bin/sh
mu_repo="https://git.macaw.me/8nl/micro-utils"
ml_repo="git://git.musl-libc.org/musl"
cc_repo="git://repo.or.cz/tinycc.git"
sh_repo=""
echo "* Download micro-utils sources..."
git clone $mu_repo src
@ -8,3 +12,6 @@ git clone $ml_repo libc
echo "* Download tcc sources..."
git clone $cc_repo tcc
echo "* Download sh sources..."
git clone $sh_repo sh

View File

@ -1,9 +1,27 @@
#!/bin/sh
echo " * Build micro-utils"
echo " * Make rootfs "
mkdir $RTFS/bin
mkdir $RTFS/etc
mkdir $RTFS/dev
mkdir $RTFS/sys
mkdir $RTFS/proc
mkdir $RTFS/media
mkdir -p $RTFS/usr/root
mkdir $RTFS/boot
cd src
#Compile
env CC="$RTFS/bin/tcc" CFLAGS="-pedantic -Os -s -Wall -I $RTFS/include -L $RTFS/lib/tcc -L $RTFS/lib" ./build.sh
mv bin/* $RTFS/bin
#Install configs
mkdir $RTFS/etc
mv configs/* $RTFS/etc
echo " * You need to edit config files in /etc"
#Install init system
mv $RTFS/bin/init $RTFS/init
cd ..