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)
|
OBJ_LINK_LIST = $(CRTI_OBJ) $(CRTBEGIN_OBJ) $(OFILES) $(CRTEND_OBJ) $(CRTN_OBJ)
|
||||||
INTERNAL_OBJS = $(CRTI_OBJ) $(OFILES) $(CRTN_OBJ)
|
INTERNAL_OBJS = $(CRTI_OBJ) $(OFILES) $(CRTN_OBJ)
|
||||||
|
|
||||||
all: build
|
all: clean build
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm $(OBJ_DIR)/* -r
|
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
|
$(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
|
# 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
|
$(CPP) -c kernel.cpp -o $(OBJ_DIR)/kernel.o $(CFLAGS) -fno-exceptions -fno-rtti
|
||||||
|
|
||||||
$(OBJ_DIR)/kterm.o:
|
$(OBJ_DIR)/kterm.o:
|
||||||
|
21
run.sh
21
run.sh
@ -3,23 +3,24 @@ PROC=$$
|
|||||||
|
|
||||||
# Build the Corelib static library
|
# Build the Corelib static library
|
||||||
(cd CoreLib
|
(cd CoreLib
|
||||||
if ! make; then
|
if ! make 2> warnings.log 1> /dev/null ; then
|
||||||
echo "Build failed!"
|
echo "Build Corelib failed!"
|
||||||
kill -10 $PROC
|
kill -10 $PROC
|
||||||
fi)
|
fi)
|
||||||
|
|
||||||
# Build the kernel image
|
# Build the kernel image
|
||||||
(cd kernel
|
(cd kernel
|
||||||
make clean
|
# make clean
|
||||||
make
|
if ! make 2> warnings.log 1> /dev/null ; then
|
||||||
if ! make; then
|
echo "Build kernel failed!"
|
||||||
echo "Build failed!"
|
|
||||||
kill -10 $PROC
|
kill -10 $PROC
|
||||||
fi)
|
fi)
|
||||||
|
|
||||||
./scripts/update_harddrive.sh
|
./scripts/update_harddrive.sh
|
||||||
|
|
||||||
|
args="";
|
||||||
|
if [[ $1 == "-d" ]]
|
||||||
./scripts/run_qemu.sh
|
then
|
||||||
|
args="debug"
|
||||||
|
fi
|
||||||
|
./scripts/run_qemu.sh $args
|
||||||
|
@ -1,7 +1,13 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Run from harddisk
|
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
|
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 -d int -no-shutdown -no-reboot
|
||||||
|
|
||||||
# Run disk version
|
# 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
|
# 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