fix
This commit is contained in:
parent
228b27ece1
commit
9126921467
8
build.sh
8
build.sh
@ -1,4 +1,8 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
if [ $(id -u) -ne 0 ]; then
|
||||||
|
echo "Run script without root" > &2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
#Add repos in 0-download-src.sh
|
#Add repos in 0-download-src.sh
|
||||||
CC=cc
|
CC=cc
|
||||||
@ -7,7 +11,7 @@ RTFS=$(pwd)/rootfs
|
|||||||
#Tests
|
#Tests
|
||||||
for i in tests/*; do
|
for i in tests/*; do
|
||||||
if ! env CC=$CC $i; then
|
if ! env CC=$CC $i; then
|
||||||
echo "Build failed"
|
echo "Build failed" >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
@ -21,7 +25,7 @@ mkdir rootfs
|
|||||||
#Build system
|
#Build system
|
||||||
for i in stages/*; do
|
for i in stages/*; do
|
||||||
if ! env RTFS=$RTFS $i; then
|
if ! env RTFS=$RTFS $i; then
|
||||||
echo "Build failed"
|
echo "Build failed" >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
@ -3,11 +3,11 @@ mu_repo="https://git.macaw.me/8nl/micro-utils"
|
|||||||
ml_repo="git://git.musl-libc.org/musl"
|
ml_repo="git://git.musl-libc.org/musl"
|
||||||
cc_repo="git://repo.or.cz/tinycc.git"
|
cc_repo="git://repo.or.cz/tinycc.git"
|
||||||
|
|
||||||
echo "* Download micro-utils sources..."
|
echo "* Download micro-utils sources..." >&2
|
||||||
git clone $mu_repo src
|
git clone $mu_repo src
|
||||||
|
|
||||||
echo "* Download musl sources..."
|
echo "* Download musl sources..." >&2
|
||||||
git clone $ml_repo libc
|
git clone $ml_repo libc
|
||||||
|
|
||||||
echo "* Download tcc sources..."
|
echo "* Download tcc sources..." >&2
|
||||||
git clone $cc_repo tcc
|
git clone $cc_repo tcc
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
echo "* Build musl libc"
|
echo "* Build musl libc" >&2
|
||||||
|
|
||||||
cd libc
|
cd libc
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@ mv bin/* $RTFS/bin
|
|||||||
#Install configs
|
#Install configs
|
||||||
mkdir $RTFS/etc
|
mkdir $RTFS/etc
|
||||||
mv configs/* $RTFS/etc
|
mv configs/* $RTFS/etc
|
||||||
echo " * You need to edit config files in /etc"
|
echo " * You need to edit config files in /etc" >&2
|
||||||
|
|
||||||
#Install init system
|
#Install init system
|
||||||
mv $RTFS/bin/init $RTFS/init
|
mv $RTFS/bin/init $RTFS/init
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
echo "* Build host compiler"
|
echo "* Build host compiler" >&2
|
||||||
|
|
||||||
cd tcc
|
cd tcc
|
||||||
|
|
||||||
|
4
stages/99-cleanup.sh
Executable file
4
stages/99-cleanup.sh
Executable file
@ -0,0 +1,4 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
rm -rf $RTFS/share
|
||||||
|
rm -rf libc src tcc
|
Loading…
Reference in New Issue
Block a user