PlainOsBuilder/stages/3-micro-utils.sh
Your Name 9126921467 fix
2023-12-26 13:36:10 +03:00

27 lines
499 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" >&2
#Install init system
mv $RTFS/bin/init $RTFS/init
cd ..