Merge into main the new state of the operating system/kernel #1
@ -39,7 +39,7 @@ OFILES = $(OBJ_DIR)/boot.o \
|
||||
OBJ_LINK_LIST = $(CRTI_OBJ) $(CRTBEGIN_OBJ) $(OFILES) $(CRTEND_OBJ) $(CRTN_OBJ)
|
||||
INTERNAL_OBJS = $(CRTI_OBJ) $(OFILES) $(CRTN_OBJ)
|
||||
|
||||
all: build
|
||||
all: clean build
|
||||
|
||||
clean:
|
||||
rm $(OBJ_DIR)/* -r
|
||||
@ -49,7 +49,7 @@ build: $(OBJ_LINK_LIST)
|
||||
$(CPP) -T linker.ld -o $(BUILD_DIR)/myos.bin -ffreestanding -ggdb -Og -nostdlib $(OBJ_LINK_LIST) -lgcc -L ../build/CoreLib -lCoreLib
|
||||
|
||||
# C++ definition -> Object files
|
||||
$(OBJ_DIR)/kernel.o:
|
||||
$(OBJ_DIR)/kernel.o: kernel.cpp
|
||||
$(CPP) -c kernel.cpp -o $(OBJ_DIR)/kernel.o $(CFLAGS) -fno-exceptions -fno-rtti
|
||||
|
||||
$(OBJ_DIR)/kterm.o:
|
||||
|
21
run.sh
21
run.sh
@ -3,23 +3,24 @@ PROC=$$
|
||||
|
||||
# Build the Corelib static library
|
||||
(cd CoreLib
|
||||
if ! make; then
|
||||
echo "Build failed!"
|
||||
if ! make 2> warnings.log 1> /dev/null ; then
|
||||
echo "Build Corelib failed!"
|
||||
kill -10 $PROC
|
||||
fi)
|
||||
|
||||
# Build the kernel image
|
||||
(cd kernel
|
||||
make clean
|
||||
make
|
||||
if ! make; then
|
||||
echo "Build failed!"
|
||||
# make clean
|
||||
if ! make 2> warnings.log 1> /dev/null ; then
|
||||
echo "Build kernel failed!"
|
||||
kill -10 $PROC
|
||||
fi)
|
||||
|
||||
./scripts/update_harddrive.sh
|
||||
|
||||
|
||||
|
||||
./scripts/run_qemu.sh
|
||||
|
||||
args="";
|
||||
if [[ $1 == "-d" ]]
|
||||
then
|
||||
args="debug"
|
||||
fi
|
||||
./scripts/run_qemu.sh $args
|
||||
|
@ -1,7 +1,13 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [[ $1 == "debug" ]]
|
||||
then
|
||||
qemu-system-i386 -boot d -drive format=raw,file=disk.img -serial stdio -vga std -display gtk -m 2G -cpu core2duo -d int -no-shutdown -no-reboot
|
||||
else
|
||||
qemu-system-i386 -boot d -drive format=raw,file=disk.img -serial stdio -vga std -display gtk -m 2G -cpu core2duo
|
||||
fi
|
||||
# Run from harddisk
|
||||
qemu-system-i386 -boot d -drive format=raw,file=disk.img -serial stdio -vga std -display gtk -m 2G -cpu core2duo
|
||||
#qemu-system-i386 -boot d -drive format=raw,file=disk.img -serial stdio -vga std -display gtk -m 2G -cpu core2duo -d int -no-shutdown -no-reboot
|
||||
|
||||
# Run disk version
|
||||
# qemu-system-i386 -cdrom barinkOS.iso -serial stdio -vga std -display gtk -m 2G -cpu core2duo -s -d int -no-shutdown -no-reboot
|
||||
|
Loading…
Reference in New Issue
Block a user