repl.it
Bash

No description

fork
loading
Files
  • main.sh
  • iso
  • bochsrc.txt
  • io.h
  • Kernel.c
  • Link.ld
  • Loader.o
  • Loader.s
  • main.o
  • multiboot.h
  • os.iso
  • Paging.c
  • paging.h
main.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# Must have or install the following packages: 
# nasm (assembler)
# genisoimage (packages into iso file)
# bochs (emulator so you don't have to restart computer and or run it on the physical hardware)
install-pkg brlapi
install-pkg qemu
clear
nasm -f elf32 Loader.s -o Loader.o # Assemble

gcc -c Kernel.c -o main.o -m32 -nostdlib -nostdinc -fno-builtin -fno-stack-protector -nostartfiles -nodefaultlibs # Compile kernel

ld -T Link.ld -melf_i386 Loader.o main.o -o ./iso/boot/kernel # Link

genisoimage -R -b boot/grub/stage2_eltorito -no-emul-boot -boot-load-size 4 -A os -input-charset utf8 -quiet -boot-info-table -o os.iso iso # Package

clear

qemu-system-x86_64 -chardev stdio,id=char0, logfile=serial.log,signal=off -serial chardev:com1

# WILL NOT WORK IN REPLIT
# Intended for unix systems so this process may be different on windows
Fetching token
?