PlainOsBuilder/stages/3-micro-utils.sh
Your Name 228b27ece1 fix
2023-12-26 13:11:20 +03:00

27 lines
495 B
Bash
Executable File

#!/bin/sh
echo " * Build micro-utils"
echo " * Make rootfs "
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"
#Install init system
mv $RTFS/bin/init $RTFS/init
cd ..