2019-01-15 01:15:58 +01:00
|
|
|
DEBUG=exec gnome-terminal --geometry=120x55+1+1 -x ./debug/debug.sh
|
2019-01-12 20:46:00 +01:00
|
|
|
REMOVE=rm -f
|
|
|
|
INSTALL=sudo apt-get install
|
|
|
|
COPY=cp
|
|
|
|
EMULATOR=bochs -f
|
|
|
|
GIT=git status
|
|
|
|
MAKECALL=python makesyscall.py
|
|
|
|
|
2018-12-27 14:24:47 +01:00
|
|
|
all: tools programs bits32 bits64 harddisk uefi
|
2018-09-27 17:12:12 +02:00
|
|
|
sync
|
|
|
|
|
|
|
|
bits32: ARCH=bits32
|
2018-09-27 17:32:25 +02:00
|
|
|
bits32: lib/libs.o system/system.sys
|
2018-09-27 17:12:12 +02:00
|
|
|
sync
|
2007-04-02 14:52:01 +02:00
|
|
|
|
2018-09-27 17:12:12 +02:00
|
|
|
bits64: ARCH=bits64
|
2018-09-27 17:32:25 +02:00
|
|
|
bits64: lib/libs.o system/system.sys
|
2007-04-02 14:52:01 +02:00
|
|
|
sync
|
|
|
|
|
2018-12-27 14:24:47 +01:00
|
|
|
tools: tools/build
|
|
|
|
|
|
|
|
tools/build:
|
|
|
|
make -C tools
|
|
|
|
|
2018-12-16 01:50:03 +01:00
|
|
|
syscall: clean remakeapi all
|
|
|
|
|
|
|
|
remakeapi:
|
2019-01-12 20:46:00 +01:00
|
|
|
$(MAKECALL)
|
2018-12-16 01:50:03 +01:00
|
|
|
|
2018-12-20 16:29:04 +01:00
|
|
|
programs: programs/test lib/TEST/test.c lib/TEST/test2.c
|
2018-12-12 17:57:23 +01:00
|
|
|
|
|
|
|
lib/TEST/test.c:
|
|
|
|
xxd -i programs/test lib/TEST/test.c
|
2018-12-09 13:44:32 +01:00
|
|
|
|
2018-12-20 16:29:04 +01:00
|
|
|
lib/TEST/test2.c:
|
|
|
|
xxd -i programs/test2 lib/TEST/test2.c
|
|
|
|
|
2018-12-09 13:44:32 +01:00
|
|
|
programs/test:
|
|
|
|
make -C programs
|
|
|
|
|
2018-09-27 07:55:24 +02:00
|
|
|
harddisk: final/harddisk.img.final
|
|
|
|
|
2018-09-27 11:13:27 +02:00
|
|
|
uefi: final/harddiskuefi.img.final
|
|
|
|
|
2018-07-24 04:04:07 +02:00
|
|
|
install:
|
2019-01-12 20:46:00 +01:00
|
|
|
$(INSTALL) gcc qemu fusefat fuseext2 gdb ovmf bsdmainutils tar bsdmainutils indent binutils bochs bochs-x bochsbios dos2unix gnome-terminal
|
2018-07-24 04:04:07 +02:00
|
|
|
|
2018-12-12 12:31:30 +01:00
|
|
|
togit:
|
|
|
|
make -C system togit
|
|
|
|
make -C lib togit
|
|
|
|
make -C final togit
|
|
|
|
make -C programs togit
|
2018-12-27 14:24:47 +01:00
|
|
|
make -C tools togit
|
2019-01-12 20:46:00 +01:00
|
|
|
$(GIT)
|
2018-12-12 12:31:30 +01:00
|
|
|
sync
|
|
|
|
|
2007-04-02 14:52:01 +02:00
|
|
|
clean:
|
2019-01-12 20:46:00 +01:00
|
|
|
$(RM) -f .gdb_history
|
2018-12-09 13:44:32 +01:00
|
|
|
make -C system clean
|
|
|
|
make -C lib clean
|
|
|
|
make -C final clean
|
|
|
|
make -C programs clean
|
2018-12-27 14:24:47 +01:00
|
|
|
make -C tools clean
|
2007-04-02 14:52:01 +02:00
|
|
|
sync
|
|
|
|
|
2018-09-27 07:55:24 +02:00
|
|
|
littleclean:
|
2018-12-09 13:44:32 +01:00
|
|
|
make -C system clean
|
|
|
|
make -C lib clean
|
2018-12-10 17:03:52 +01:00
|
|
|
make -C final littleclean
|
2018-12-09 13:44:32 +01:00
|
|
|
make -C programs clean
|
2018-09-27 07:55:24 +02:00
|
|
|
sync
|
|
|
|
|
2018-09-27 17:12:12 +02:00
|
|
|
indent:
|
2018-12-09 13:44:32 +01:00
|
|
|
make -C system indent
|
|
|
|
make -C lib indent
|
2018-12-12 12:31:30 +01:00
|
|
|
make -C programs indent
|
2018-12-27 14:24:47 +01:00
|
|
|
make -C tools indent
|
2018-09-27 17:12:12 +02:00
|
|
|
sync
|
|
|
|
|
2007-04-02 14:52:01 +02:00
|
|
|
backup: clean
|
2019-01-12 20:46:00 +01:00
|
|
|
cd ..
|
|
|
|
tar cf - Source\ C | gzip -f - > backup.tar.gz
|
2018-09-27 07:55:24 +02:00
|
|
|
|
2019-01-15 01:15:58 +01:00
|
|
|
test: tools programs bits32 harddisk qemu
|
2018-07-24 04:04:07 +02:00
|
|
|
|
2019-01-15 01:15:58 +01:00
|
|
|
test64: tools programs bits64 uefi qemu64
|
2018-09-27 11:13:27 +02:00
|
|
|
|
2018-09-27 07:55:24 +02:00
|
|
|
retest: littleclean test
|
2018-07-24 04:04:07 +02:00
|
|
|
|
2018-09-27 17:12:12 +02:00
|
|
|
retest64: littleclean test64
|
2018-09-27 11:13:27 +02:00
|
|
|
|
2019-01-15 01:15:58 +01:00
|
|
|
testbochs: tools programs bits32 harddisk bochs-debug
|
2018-09-27 21:01:02 +02:00
|
|
|
|
2018-07-24 04:04:07 +02:00
|
|
|
view:
|
2019-01-12 20:46:00 +01:00
|
|
|
hexdump -C ./final/harddisk.img.final|head -c10000
|
2018-07-24 04:04:07 +02:00
|
|
|
|
2018-08-22 18:39:06 +02:00
|
|
|
debug: debug-system
|
|
|
|
|
2018-10-02 17:16:23 +02:00
|
|
|
redebug: littleclean debug-system
|
|
|
|
|
2018-09-27 11:13:27 +02:00
|
|
|
debug64: debug-system64
|
|
|
|
|
2018-10-13 17:17:40 +02:00
|
|
|
redebug64: littleclean debug-system64
|
|
|
|
|
2019-01-11 14:25:48 +01:00
|
|
|
kernel: debug-kernel
|
|
|
|
|
2019-01-15 01:15:58 +01:00
|
|
|
debug-boot: tools programs bits32 harddisk qemu-debug
|
2019-01-12 20:46:00 +01:00
|
|
|
sleep 2
|
|
|
|
$(DEBUG) ./debug/boot.txt
|
2018-07-24 04:04:07 +02:00
|
|
|
|
2019-01-15 01:15:58 +01:00
|
|
|
debug-system: tools programs bits32 harddisk qemu-debug
|
2019-01-12 20:46:00 +01:00
|
|
|
sleep 2
|
|
|
|
$(DEBUG) ./debug/system.txt
|
2018-07-24 04:04:07 +02:00
|
|
|
|
2019-01-15 01:15:58 +01:00
|
|
|
debug-system64: tools programs bits64 uefi qemu-debug64
|
2019-01-12 20:46:00 +01:00
|
|
|
sleep 2
|
|
|
|
$(DEBUG) ./debug/system.txt
|
2018-09-27 11:13:27 +02:00
|
|
|
|
2019-01-12 20:46:00 +01:00
|
|
|
bochs-debug: killer
|
|
|
|
$(EMULATOR) ./debug/config.bochs
|
2018-11-29 16:45:40 +01:00
|
|
|
|
2019-01-12 20:46:00 +01:00
|
|
|
killer:
|
|
|
|
killall bochs-debug || true
|
|
|
|
killall qemu-system-x86_64 || true
|
|
|
|
killall qemu-system-i386 || true
|
|
|
|
killall gnome-terminal-server || true
|
|
|
|
tmux kill-session -t debug || true
|
2019-01-11 14:25:48 +01:00
|
|
|
|
2019-01-12 20:46:00 +01:00
|
|
|
qemu-debug: killer
|
|
|
|
qemu-system-i386 -monitor telnet:127.0.0.1:6666,server,nowait -m 1G -drive format=raw,file=./final/harddisk.img.final -s -S &
|
2018-07-24 04:04:07 +02:00
|
|
|
|
2019-01-12 20:46:00 +01:00
|
|
|
qemu-debug64: killer
|
|
|
|
qemu-system-x86_64 -monitor telnet:127.0.0.1:6666,server,nowait -m 5G -drive format=raw,file=./final/harddiskuefi.img.final --bios /usr/share/qemu/OVMF.fd -s -S &
|
2018-09-27 11:13:27 +02:00
|
|
|
|
2019-01-12 20:46:00 +01:00
|
|
|
qemu: killer
|
|
|
|
qemu-system-i386 -m 1G -drive format=raw,file=./final/harddisk.img.final --enable-kvm -cpu host -s &
|
2018-09-27 07:55:24 +02:00
|
|
|
|
2019-01-12 20:46:00 +01:00
|
|
|
qemu64: killer
|
|
|
|
qemu-system-x86_64 -m 5G -drive format=raw,file=./final/harddiskuefi.img.final --bios /usr/share/qemu/OVMF.fd --enable-kvm -cpu host -s &
|
2007-04-02 14:52:01 +02:00
|
|
|
|
|
|
|
system/system.sys:
|
2018-12-09 13:44:32 +01:00
|
|
|
make -C system VESA=$(VESA)
|
2018-09-27 07:55:24 +02:00
|
|
|
|
|
|
|
final/harddisk.img.final:
|
2018-12-09 13:44:32 +01:00
|
|
|
make -C final harddisk.img.final
|
2018-09-27 11:13:27 +02:00
|
|
|
|
|
|
|
final/harddiskuefi.img.final:
|
2018-12-09 13:44:32 +01:00
|
|
|
make -C final harddiskuefi.img.final
|
2018-09-27 07:55:24 +02:00
|
|
|
|
2007-04-02 14:52:01 +02:00
|
|
|
lib/libs.o:
|
2018-12-09 13:44:32 +01:00
|
|
|
make -C lib
|