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 #!/bin/sh
#Add repos in 0-download-src.sh
CC=cc CC=cc
RTFS=$(pwd)/rootfs 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 #Tests
for i in tests/*; do for i in tests/*; do
@ -22,7 +20,7 @@ mkdir rootfs
#Build system #Build system
for i in stages/*; do 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" echo "Build failed"
exit 1 exit 1
fi fi

View File

@ -1,4 +1,8 @@
#!/bin/sh #!/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..." echo "* Download micro-utils sources..."
git clone $mu_repo src git clone $mu_repo src
@ -8,3 +12,6 @@ git clone $ml_repo libc
echo "* Download tcc sources..." echo "* Download tcc sources..."
git clone $cc_repo tcc git clone $cc_repo tcc
echo "* Download sh sources..."
git clone $sh_repo sh

View File

@ -1,9 +1,27 @@
#!/bin/sh #!/bin/sh
echo " * Build micro-utils" 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 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 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 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 .. cd ..