PlainOsBuilder/stages/3-micro-utils.sh

27 lines
507 B
Bash
Raw Normal View History

2023-12-20 18:18:01 +00:00
#!/bin/sh
2024-01-12 08:36:21 +00:00
echo " * Build micro-utils" >&2
echo " * Make rootfs " >&2
2023-12-23 17:19:18 +00:00
mkdir $RTFS/bin
mkdir $RTFS/etc
2023-12-26 10:11:20 +00:00
mkdir $RTFS/mnt
2023-12-23 17:19:18 +00:00
mkdir $RTFS/dev
mkdir $RTFS/sys
mkdir $RTFS/proc
mkdir -p $RTFS/usr/root
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
2023-12-26 10:36:10 +00:00
echo " * You need to edit config files in /etc" >&2
2023-12-23 17:19:18 +00:00
#Install init system
mv $RTFS/bin/init $RTFS/init
2023-12-20 18:18:01 +00:00
cd ..