diff --git a/FHS b/FHS index dbead3a..24d2e5e 100644 --- a/FHS +++ b/FHS @@ -6,3 +6,4 @@ * /usr/ - users * /mnt/ - mounted devices * /kernel - Kernel + * /var - trash diff --git a/final.sh b/final.sh new file mode 100755 index 0000000..7fa9d4a --- /dev/null +++ b/final.sh @@ -0,0 +1,4 @@ +#!/bin/sh + +chown -R root:root rootfs +chmod ao+s rootfs/bin/login rootfs/bin/su diff --git a/stages/0-download-src.sh b/stages/0-download-src.sh old mode 100755 new mode 100644 diff --git a/stages/1-libc.sh b/stages/1-libc.sh old mode 100755 new mode 100644 diff --git a/stages/2-cross-compiler.sh b/stages/2-cross-compiler.sh old mode 100755 new mode 100644 diff --git a/stages/3-micro-utils.sh b/stages/3-micro-utils.sh old mode 100755 new mode 100644 diff --git a/stages/4-host-compiler.sh b/stages/4-host-compiler.sh old mode 100755 new mode 100644 index ab2b21e..fc3530e --- a/stages/4-host-compiler.sh +++ b/stages/4-host-compiler.sh @@ -3,7 +3,7 @@ echo "* Build host compiler" >&2 cd tcc -./configure --extra-cflags="-Os -s" --prefix=$RTFS/ --elfinterp=/lib/libc.so --config-musl --config-bcheck=no --enable-static --cc=$RTFS/bin/tcc +./configure --extra-cflags="-Os -s" --prefix=$RTFS/ --elfinterp=/lib/libc.so --config-musl --config-bcheck=no --enable-static --cc=$RTFS/bin/tcc --crtprefix=/lib --libpaths=/lib:/lib/tcc --sysincludepaths=/include make -j $(nproc) make install diff --git a/stages/99-cleanup.sh b/stages/99-cleanup.sh old mode 100755 new mode 100644 diff --git a/test.sh b/test.sh index 63503bc..eda90ed 100755 --- a/test.sh +++ b/test.sh @@ -22,20 +22,17 @@ if ! makeinfo -h > /dev/null; then fi #C -out_name=$(mktemp XXXXXX) echo -e "#include \nint main(void){return 0;}" > test.c -$CC test.c -o $out_name -chmod +x $out_name +$CC test.c rm test.c if ! ./$out_name; then echo "[FAILED] Fix c compiler or headers..." - rm $out_name + rm a.out exit 1 - -rm $out_name fi +rm a.out exit 0