Compare commits

..

No commits in common. "891085e151966f1b21363e80139501137622eb88" and "2e2693d1ea64eaca8e3e358bfd627c2483f580b8" have entirely different histories.

80 changed files with 8 additions and 105 deletions

View File

@ -27,7 +27,7 @@ $(BUILD_DIR)/sv-terminal.o \
SRC_DIR = source
SRC_DIR = src
BUILD_DIR = build
CRTBEGIN_OBJ = $(shell $(CC) $(CFLAGS) -print-file-name=crtbegin.o)
@ -50,7 +50,7 @@ clean_iso:
iso: clean_iso clean build
mkdir -p root/boot/grub
cp build/myos.bin root/boot/myos.bin
cp source/grub.cfg root/boot/grub/grub.cfg
cp src/grub.cfg root/boot/grub/grub.cfg
grub-mkrescue -o build/barinkOS.iso root
run: all
virtualboxvm --startvm "BarinkOS_test"
@ -60,12 +60,9 @@ test:
test_iso:
$(EMULATOR) -boot d -cdrom $(BUILD_DIR)/barinkOS.iso -serial stdio -vga std -display gtk -m 2G -cpu core2duo
test_disk:
$(EMULATOR) -boot d -drive format=raw,file=disk.img -serial stdio -vga std -display gtk -m 2G -cpu core2duo
build_kernel: $(OBJ_LINK_LIST)
$(CC) -T $(SRC_DIR)/kernel/linker.ld -o $(BUILD_DIR)/myos.bin \
$(CC) -T $(SRC_DIR)/kernel//linker.ld -o $(BUILD_DIR)/myos.bin \
-ffreestanding -O2 -nostdlib $(OBJ_LINK_LIST) -lgcc
build_x86_64:

View File

@ -1,25 +0,0 @@
#!/usr/bin/python3
import os
import subprocess
print("Building BarinkOS")
# list and run build scripts
print("Running build-scripts")
os.chdir("scripts")
scripts=os.listdir()
currentScript=os.path.basename(__file__)
if currentScript in scripts:
scripts.remove(currentScript)
for script in scripts:
print(os.getcwd())
print("Running:" + script)
subprocess.call(script, cwd=os.getcwd())
os.chdir("..")

View File

@ -1,64 +0,0 @@
#!/bin/bash
#
# How to build a boot image
# NOTE: This script cant run properly yet
# Things described here should be done manually for now
#
# COPYRIGHT © Nigel Barink 2023
#
echo "Building a FAT16 filesystem"
su
# dd if=/dev/zero of=diks.img bs=512 count=131072
# fdisk disk.img
# Use the following options in fdisk (Format Disk Tool)
# We want to create a MBR (NOT GPT) Partition table containing 1 logical disk
# with a primary FAT16 partition marked bootable
#OPTIONs
# Create new DOS disklabel
# o
# Create new partition
# n
# Choose Primary as partition type
# p
# hit enter to choose default for the other options
# Mark partition 1 as bootable
# a
# Change partition type to FAT16
# t
# Choose Partition 1
# 1
# Choose HEX 6 for FAT16
# 6
# Sync and write changes to disk
# w
# Create a "block" device from the disk.img
# losetup /dev/loop9 disk.img
# Format the partition on the disk as FAT16
# mkdosfs -F16 /dev/loop9
# Mount the disk to a folder on our dev machine
# mount /dev/loop9 /mnt
# Install the grub bootloader onto the disk
# grub-install --no-floppy --modules="normal multiboot" /dev/loop9 --target=i386-pc --boot-directory=/mnt/boot --force
# copy the necessary OS files
# cp root/boot/myos.bin /mnt/boot/myos.bin
# cp root/boot/grub/grub.cfg /mnt/boot/grub/grub.cfg
# Unmount the device
# umount /mnt
# Destroy the loop device
# losetup -d /dev/loop9

View File

@ -1,5 +0,0 @@
#!/bin/bash
start=`date +%s`
end=`date +%s`
echo That took $((end-start)) seconds
date +"%c" -d195440409

View File

@ -21,11 +21,11 @@ stack_bottom:
stack_top:
.section .text
.include "./source/kernel/gdt/gdt.s"
.include "./source/kernel/irs_table.s"
.include "./source/kernel/irq_table.s"
.include "./source/kernel/idt/idt.s"
.include "./source/kernel/memory/paging.s"
.include "./src/kernel/gdt/gdt.s"
.include "./src/kernel/irs_table.s"
.include "./src/kernel/irq_table.s"
.include "./src/kernel/idt/idt.s"
.include "./src/kernel/memory/paging.s"
.global _start