PlainOsBuilder/stages/3-micro-utils.sh

28 lines
514 B
Bash
Raw Normal View History

2023-12-20 18:18:01 +00:00
#!/bin/sh
echo " * Build micro-utils"
2023-12-23 17:19:18 +00:00
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
2023-12-20 18:18:01 +00:00
cd src
2023-12-23 17:19:18 +00:00
#Compile
2023-12-20 18:18:01 +00:00
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
2023-12-23 17:19:18 +00:00
#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
2023-12-20 18:18:01 +00:00
cd ..