PlainOsBuilder/stages/3-micro-utils.sh
2023-12-23 20:19:18 +03:00

28 lines
514 B
Bash
Executable File

#!/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 ..