fixed
This commit is contained in:
parent
00cc9d8cc2
commit
52cff7c957
1
FHS
1
FHS
@ -6,3 +6,4 @@
|
|||||||
* /usr/ - users
|
* /usr/ - users
|
||||||
* /mnt/ - mounted devices
|
* /mnt/ - mounted devices
|
||||||
* /kernel - Kernel
|
* /kernel - Kernel
|
||||||
|
* /var - trash
|
||||||
|
4
final.sh
Executable file
4
final.sh
Executable file
@ -0,0 +1,4 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
chown -R root:root rootfs
|
||||||
|
chmod ao+s rootfs/bin/login rootfs/bin/su
|
0
stages/0-download-src.sh
Executable file → Normal file
0
stages/0-download-src.sh
Executable file → Normal file
0
stages/1-libc.sh
Executable file → Normal file
0
stages/1-libc.sh
Executable file → Normal file
0
stages/2-cross-compiler.sh
Executable file → Normal file
0
stages/2-cross-compiler.sh
Executable file → Normal file
0
stages/3-micro-utils.sh
Executable file → Normal file
0
stages/3-micro-utils.sh
Executable file → Normal file
2
stages/4-host-compiler.sh
Executable file → Normal file
2
stages/4-host-compiler.sh
Executable file → Normal file
@ -3,7 +3,7 @@ echo "* Build host compiler" >&2
|
|||||||
|
|
||||||
cd tcc
|
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 -j $(nproc)
|
||||||
make install
|
make install
|
||||||
|
|
||||||
|
0
stages/99-cleanup.sh
Executable file → Normal file
0
stages/99-cleanup.sh
Executable file → Normal file
9
test.sh
9
test.sh
@ -22,20 +22,17 @@ if ! makeinfo -h > /dev/null; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
#C
|
#C
|
||||||
out_name=$(mktemp XXXXXX)
|
|
||||||
|
|
||||||
echo -e "#include <stdio.h>\nint main(void){return 0;}" > test.c
|
echo -e "#include <stdio.h>\nint main(void){return 0;}" > test.c
|
||||||
|
|
||||||
$CC test.c -o $out_name
|
$CC test.c
|
||||||
chmod +x $out_name
|
|
||||||
rm test.c
|
rm test.c
|
||||||
|
|
||||||
if ! ./$out_name; then
|
if ! ./$out_name; then
|
||||||
echo "[FAILED] Fix c compiler or headers..."
|
echo "[FAILED] Fix c compiler or headers..."
|
||||||
rm $out_name
|
rm a.out
|
||||||
exit 1
|
exit 1
|
||||||
|
|
||||||
rm $out_name
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
rm a.out
|
||||||
exit 0
|
exit 0
|
||||||
|
Loading…
Reference in New Issue
Block a user