Merge into main the new state of the operating system/kernel #1
@ -1,4 +1,3 @@
 | 
				
			|||||||
EMULATOR = qemu-system-i386
 | 
					 | 
				
			||||||
AS = ${HOME}/opt/cross/bin/i686-elf-as
 | 
					AS = ${HOME}/opt/cross/bin/i686-elf-as
 | 
				
			||||||
CC = ${HOME}/opt/cross/bin/i686-elf-gcc
 | 
					CC = ${HOME}/opt/cross/bin/i686-elf-gcc
 | 
				
			||||||
CPP = ${HOME}/opt/cross/bin/i686-elf-g++ 
 | 
					CPP = ${HOME}/opt/cross/bin/i686-elf-g++ 
 | 
				
			||||||
 | 
				
			|||||||
@ -2,24 +2,23 @@
 | 
				
			|||||||
import os
 | 
					import os
 | 
				
			||||||
import subprocess
 | 
					import subprocess
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					print("Give BarinkOS A Test Run")
 | 
				
			||||||
print("Building BarinkOS")
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
# list and run build scripts
 | 
					# list and run build scripts
 | 
				
			||||||
print("Running build-scripts")
 | 
					print("Running build-scripts")
 | 
				
			||||||
os.chdir("scripts")
 | 
					os.chdir("scripts")
 | 
				
			||||||
 | 
					 | 
				
			||||||
scripts=os.listdir()
 | 
					scripts=os.listdir()
 | 
				
			||||||
currentScript=os.path.basename(__file__)
 | 
					currentScript=os.path.basename(__file__)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if currentScript in scripts:
 | 
					os.chdir("../CoreLib")
 | 
				
			||||||
    scripts.remove(currentScript)
 | 
					print("Building CoreLib")
 | 
				
			||||||
 | 
					subprocess.call("make")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					os.chdir("../kernel")
 | 
				
			||||||
 | 
					print("Building kernel")
 | 
				
			||||||
 | 
					subprocess.call("make")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
for script in scripts:
 | 
					os.chdir("..")
 | 
				
			||||||
    print(os.getcwd())
 | 
					subprocess.call("scripts/update_harddrive.sh", cwd=os.getcwd())
 | 
				
			||||||
    print("Running:" + script)
 | 
					subprocess.call("scripts/create_symbol_lookup.sh", cwd=os.getcwd())
 | 
				
			||||||
    subprocess.call(script, cwd=os.getcwd())
 | 
					subprocess.call("scripts/run_qemu.sh", cwd=os.getcwd())
 | 
				
			||||||
 | 
					 | 
				
			||||||
os.chdir("..")
 | 
					 | 
				
			||||||
							
								
								
									
										5
									
								
								scripts/create_iso.sh
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										5
									
								
								scripts/create_iso.sh
									
									
									
									
									
										Executable file
									
								
							@ -0,0 +1,5 @@
 | 
				
			|||||||
 | 
					#!/bin/bash
 | 
				
			||||||
 | 
					mkdir -p root/boot/grub
 | 
				
			||||||
 | 
					cp build/kernel/myos.bin root/boot/myos.bin
 | 
				
			||||||
 | 
					cp kernel/grub.cfg root/boot/grub/grub.cfg
 | 
				
			||||||
 | 
					grub-mkrescue -o barinkOS.iso root
 | 
				
			||||||
							
								
								
									
										3
									
								
								scripts/create_symbol_lookup.sh
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										3
									
								
								scripts/create_symbol_lookup.sh
									
									
									
									
									
										Executable file
									
								
							@ -0,0 +1,3 @@
 | 
				
			|||||||
 | 
					#!/bin/bash
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					objcopy --only-keep-debug build/kernel/myos.bin kernel.sym
 | 
				
			||||||
@ -1,5 +1,2 @@
 | 
				
			|||||||
#!/bin/bash
 | 
					#!/bin/bash
 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# Run clang-tidy 
 | 
					# Run clang-tidy 
 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										12
									
								
								scripts/run_qemu.sh
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										12
									
								
								scripts/run_qemu.sh
									
									
									
									
									
										Executable file
									
								
							@ -0,0 +1,12 @@
 | 
				
			|||||||
 | 
					#!/bin/bash
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Run from harddisk
 | 
				
			||||||
 | 
					qemu-system-i386 -boot d -drive format=raw,file=disk.img -serial stdio -vga std -display gtk -m 2G -cpu core2duo
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# 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
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Run the raw kernel image
 | 
				
			||||||
 | 
					# qemu-system-i386  -kernel build/kernel/myos.bin -serial stdio -vga std -display gtk -m 2G -cpu core2duo -d int -no-shutdown -no-reboot
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
							
								
								
									
										2
									
								
								scripts/run_virtualbox.sh
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										2
									
								
								scripts/run_virtualbox.sh
									
									
									
									
									
										Executable file
									
								
							@ -0,0 +1,2 @@
 | 
				
			|||||||
 | 
					#!/bin/bash
 | 
				
			||||||
 | 
					virtualboxvm --startvm "BarinkOS_test"
 | 
				
			||||||
@ -1,5 +0,0 @@
 | 
				
			|||||||
#!/bin/bash
 | 
					 | 
				
			||||||
start=`date +%s`
 | 
					 | 
				
			||||||
end=`date +%s`
 | 
					 | 
				
			||||||
echo That took $((end-start)) seconds
 | 
					 | 
				
			||||||
date +"%c" -d195440409
 | 
					 | 
				
			||||||
							
								
								
									
										11
									
								
								scripts/update_harddrive.sh
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										11
									
								
								scripts/update_harddrive.sh
									
									
									
									
									
										Executable file
									
								
							@ -0,0 +1,11 @@
 | 
				
			|||||||
 | 
					#!/bin/bash
 | 
				
			||||||
 | 
					echo "Mount harddrive image as block device"
 | 
				
			||||||
 | 
					sudo losetup /dev/loop9 disk.img
 | 
				
			||||||
 | 
					sudo mount /dev/loop9 /mnt
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					echo "Copy over kernel binary"
 | 
				
			||||||
 | 
					sudo cp build/kernel/myos.bin /mnt/boot/myos.bin
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					echo "unmount image"
 | 
				
			||||||
 | 
					sudo umount /mnt
 | 
				
			||||||
 | 
					sudo losetup -d /dev/loop9
 | 
				
			||||||
		Reference in New Issue
	
	Block a user