27 lines
507 B
Bash
Executable File
27 lines
507 B
Bash
Executable File
#!/bin/sh
|
|
echo " * Build micro-utils" >&2
|
|
echo " * Make rootfs " >&2
|
|
mkdir $RTFS/bin
|
|
mkdir $RTFS/etc
|
|
mkdir $RTFS/mnt
|
|
mkdir $RTFS/dev
|
|
mkdir $RTFS/sys
|
|
mkdir $RTFS/proc
|
|
mkdir -p $RTFS/usr/root
|
|
|
|
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" >&2
|
|
|
|
#Install init system
|
|
mv $RTFS/bin/init $RTFS/init
|
|
|
|
cd ..
|