fixed
This commit is contained in:
parent
6c652ea22b
commit
3ea8dfe675
6
build.sh
6
build.sh
@ -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
|
||||
|
@ -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
|
||||
|
@ -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 ..
|
||||
|
Loading…
Reference in New Issue
Block a user