Did cool stuff!
git-svn-id: https://spexeah.com:8443/svn/Asuro@2 6dbc8c32-bb84-406f-8558-d1cf31a0ab0c
This commit is contained in:
parent
eaa8b0914d
commit
37d3addb47
72
compile.sh
Executable file
72
compile.sh
Executable file
@ -0,0 +1,72 @@
|
||||
#!/bin/sh
|
||||
ERRCOUNT=0
|
||||
echo "======================="
|
||||
echo "== ASURO COMPILATION =="
|
||||
echo "======================="
|
||||
echo " "
|
||||
echo "Compiling ASM Stub..."
|
||||
echo " "
|
||||
nasm -f elf src/stub.asm -o lib/stub.o
|
||||
if [ $? -ne 0 ]
|
||||
then
|
||||
echo "Failed to compile stub!"
|
||||
ERRCOUNT=$((ERRCOUNT+1))
|
||||
else
|
||||
echo "Success."
|
||||
fi
|
||||
|
||||
echo " "
|
||||
echo "======================="
|
||||
echo " "
|
||||
echo "Compiling FPC Sources..."
|
||||
echo " "
|
||||
fpc -Aelf -n -O3 -Op3 -Si -Sc -Sg -Xd -CX -XXs -Rintel -Tlinux -FElib/ src/kernel.pas
|
||||
if [ $? -ne 0 ]
|
||||
then
|
||||
echo "Failed to compile FPC Sources!"
|
||||
ERRCOUNT=$((ERRCOUNT+1))
|
||||
else
|
||||
echo "Success."
|
||||
fi
|
||||
|
||||
echo " "
|
||||
echo "======================="
|
||||
echo " "
|
||||
echo "Linking..."
|
||||
echo " "
|
||||
ld -m elf_i386 -s --gc-sections -Tlinker.script -o bin/kernel.bin lib/stub.o lib/kernel.o lib/multiboot.o lib/system.o lib/console.o
|
||||
if [ $? -ne 0 ]
|
||||
then
|
||||
echo "Failed linking!"
|
||||
ERRCOUNT=$((ERRCOUNT+1))
|
||||
else
|
||||
echo "Success."
|
||||
fi
|
||||
|
||||
echo " "
|
||||
echo "======================="
|
||||
echo " "
|
||||
echo "Creating ISO..."
|
||||
echo " "
|
||||
cp bin/kernel.bin iso/boot/asuro.bin
|
||||
grub-mkrescue -o Asuro.iso iso
|
||||
if [ $? -ne 0 ]
|
||||
then
|
||||
echo "Failed to create ISO!"
|
||||
ERRCOUNT=$((ERRCOUNT+1))
|
||||
else
|
||||
echo "Success."
|
||||
fi
|
||||
|
||||
echo " "
|
||||
echo "======================="
|
||||
echo " "
|
||||
if [ "$ERRCOUNT" -ne "0" ]
|
||||
then
|
||||
echo "$ERRCOUNT Errors Occurred, please review."
|
||||
else
|
||||
echo "No errors."
|
||||
fi
|
||||
echo " "
|
||||
echo "======================="
|
||||
echo " "
|
72
compile.sh~
Executable file
72
compile.sh~
Executable file
@ -0,0 +1,72 @@
|
||||
#!/bin/sh
|
||||
ERRCOUNT=0
|
||||
echo "======================="
|
||||
echo "== ASURO COMPILATION =="
|
||||
echo "======================="
|
||||
echo " "
|
||||
echo "Compiling ASM Stub..."
|
||||
echo " "
|
||||
nasm -f elf src/stub.asm -o lib/stub.o
|
||||
if [ $? -ne 0 ]
|
||||
then
|
||||
echo "Failed to compile stub!"
|
||||
ERRCOUNT=$((ERRCOUNT+1))
|
||||
else
|
||||
echo "Success."
|
||||
fi
|
||||
|
||||
echo " "
|
||||
echo "======================="
|
||||
echo " "
|
||||
echo "Compiling FPC Sources..."
|
||||
echo " "
|
||||
fpc -Aelf -n -O3 -Op3 -Si -Sc -Sg -Xd -CX -XXs -Rintel -Tlinux -FElib/ src/kernel.pas
|
||||
if [ $? -ne 0 ]
|
||||
then
|
||||
echo "Failed to compile FPC Sources!"
|
||||
ERRCOUNT=$((ERRCOUNT+1))
|
||||
else
|
||||
echo "Success."
|
||||
fi
|
||||
|
||||
echo " "
|
||||
echo "======================="
|
||||
echo " "
|
||||
echo "Linking..."
|
||||
echo " "
|
||||
ld -m elf_i386 -s --gc-sections -Tlinker.script -o bin/kernel.bin lib/stub.o lib/kernel.o lib/multiboot.o lib/system.o lib/console.o
|
||||
if [ $? -ne 0 ]
|
||||
then
|
||||
echo "Failed linking!"
|
||||
ERRCOUNT=$((ERRCOUNT+1))
|
||||
else
|
||||
echo "Success."
|
||||
fi
|
||||
|
||||
echo " "
|
||||
echo "======================="
|
||||
echo " "
|
||||
echo "Creating ISO..."
|
||||
echo " "
|
||||
cp bin/kernel.bin iso/boot/asuro.bin
|
||||
grub-mkrescue -o Asuro.iso iso
|
||||
if [ $? -ne 0 ]
|
||||
then
|
||||
echo "Failed to create ISO!"
|
||||
ERRCOUNT=$((ERRCOUNT+1))
|
||||
else
|
||||
echo "Success."
|
||||
fi
|
||||
|
||||
echo " "
|
||||
echo "======================="
|
||||
echo " "
|
||||
if [ "$ERRCOUNT" -ne "0" ]
|
||||
then
|
||||
echo "$ERRCOUNT Errors Occurred, please review."
|
||||
else
|
||||
echo "No errors."
|
||||
fi
|
||||
echo " "
|
||||
echo "======================="
|
||||
echo " "
|
BIN
iso/boot/asuro.bin
Executable file
BIN
iso/boot/asuro.bin
Executable file
Binary file not shown.
3
iso/boot/grub/grub.cfg
Normal file
3
iso/boot/grub/grub.cfg
Normal file
@ -0,0 +1,3 @@
|
||||
menuentry "Asuro" {
|
||||
multiboot /boot/asuro.bin
|
||||
}
|
BIN
lib/console.ppu
BIN
lib/console.ppu
Binary file not shown.
BIN
lib/kernel.ppu
BIN
lib/kernel.ppu
Binary file not shown.
Binary file not shown.
BIN
lib/libpkernel.a
BIN
lib/libpkernel.a
Binary file not shown.
Binary file not shown.
BIN
lib/libpsystem.a
BIN
lib/libpsystem.a
Binary file not shown.
Binary file not shown.
BIN
lib/stub.o
BIN
lib/stub.o
Binary file not shown.
BIN
lib/system.ppu
BIN
lib/system.ppu
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user