Reverted to previous state
This commit is contained in:
parent
e430178c82
commit
b0f4c8a4fd
18
.github/workflows/vulcanos.yml
vendored
Normal file
18
.github/workflows/vulcanos.yml
vendored
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
name: vulcanos
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [master]
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: checkout repo
|
||||||
|
uses: actions/checkout@main
|
||||||
|
- name: Build vulcanos
|
||||||
|
run: |
|
||||||
|
sudo apt update && sudo apt install -y nasm grub-pc-bin mtools
|
||||||
|
sudo ln -s /usr/bin/gcc /usr/bin/i686-elf-gcc
|
||||||
|
sudo ln -s /usr/bin/ld /usr/bin/i686-elf-ld
|
||||||
|
make clean all
|
@ -1,9 +0,0 @@
|
|||||||
language: C
|
|
||||||
|
|
||||||
before_install:
|
|
||||||
- sudo apt-get update
|
|
||||||
- sudo apt-get install -y nasm grub-pc-bin
|
|
||||||
- sudo ln -s /usr/bin/gcc /usr/bin/i686-elf-gcc
|
|
||||||
- sudo ln -s /usr/bin/ld /usr/bin/i686-elf-ld
|
|
||||||
|
|
||||||
script: make clean all
|
|
@ -1,4 +1,4 @@
|
|||||||
# VulcanOS [![Build Status](https://travis-ci.com/ice-bit/vulcanos.svg?branch=master)](https://travis-ci.com/ice-bit/vulcanos)
|
# VulcanOS ![](https://github.com/ceticamarco/vulcanos/actions/workflows/vulcanos.yml/badge.svg)
|
||||||
**VulcanOS** is a x86 monolithic kernel written in C from scratch following the UNIX philosophy. This project is just a student learning tool to know more about operating systems, do not expect nothing more than a toy.
|
**VulcanOS** is a x86 monolithic kernel written in C from scratch following the UNIX philosophy. This project is just a student learning tool to know more about operating systems, do not expect nothing more than a toy.
|
||||||
<div align="center">
|
<div align="center">
|
||||||
<img src="imgs/screenshot.png" />
|
<img src="imgs/screenshot.png" />
|
||||||
|
@ -10,7 +10,6 @@
|
|||||||
#include "drivers/idt.h"
|
#include "drivers/idt.h"
|
||||||
#include "drivers/timer.h"
|
#include "drivers/timer.h"
|
||||||
#include "drivers/keyboard.h"
|
#include "drivers/keyboard.h"
|
||||||
#include "drivers/initrd.h"
|
|
||||||
#include "mem/paging.h"
|
#include "mem/paging.h"
|
||||||
#include "mem/kheap.h"
|
#include "mem/kheap.h"
|
||||||
#include "mem/multiboot.h"
|
#include "mem/multiboot.h"
|
||||||
@ -24,22 +23,7 @@
|
|||||||
#define PRTAT printf("\n["); printf_color(" ** ", LIGHT_BROWN, BLACK); printf("]"); // Ugly hack to print "[ * ]"
|
#define PRTAT printf("\n["); printf_color(" ** ", LIGHT_BROWN, BLACK); printf("]"); // Ugly hack to print "[ * ]"
|
||||||
#define PRTER printf("\n["); printf_color(" ERR ", LIGHT_RED, BLACK); printf("]"); // Ugly hack to print "[ ER ]"
|
#define PRTER printf("\n["); printf_color(" ERR ", LIGHT_RED, BLACK); printf("]"); // Ugly hack to print "[ ER ]"
|
||||||
|
|
||||||
uint32_t initrd_setup( struct multiboot *mboot_ptr) {
|
void kernel_main(uint32_t magic, uint32_t addr) {
|
||||||
if(mboot_ptr->mods_count < 0) { // Assert that initrd image is available
|
|
||||||
PRTER
|
|
||||||
puts(" - initrd not found!");
|
|
||||||
PANIC("Cannot find initrd");
|
|
||||||
}
|
|
||||||
|
|
||||||
extern uint32_t placement_addr;
|
|
||||||
uint32_t initrd_location = *((uint32_t*)mboot_ptr->mods_addr);
|
|
||||||
uint32_t initrd_end = *(uint32_t*)(mboot_ptr->mods_addr+4);
|
|
||||||
placement_addr = initrd_end;
|
|
||||||
|
|
||||||
return initrd_location;
|
|
||||||
}
|
|
||||||
|
|
||||||
void kernel_main(unsigned long magic, uint32_t addr, struct multiboot *mboot_ptr) {
|
|
||||||
// First of all, check if we're booted by a Multiboot-compliant boot loader
|
// First of all, check if we're booted by a Multiboot-compliant boot loader
|
||||||
if(magic != MULTIBOOT2_BOOTLOADER_MAGIC) {
|
if(magic != MULTIBOOT2_BOOTLOADER_MAGIC) {
|
||||||
PRTER
|
PRTER
|
||||||
@ -72,16 +56,9 @@ void kernel_main(unsigned long magic, uint32_t addr, struct multiboot *mboot_ptr
|
|||||||
PRTOK
|
PRTOK
|
||||||
printf(" - Loaded PS/2 driver");
|
printf(" - Loaded PS/2 driver");
|
||||||
|
|
||||||
uint32_t loc = initrd_setup(mboot_ptr); // Setup initial ramdisk
|
|
||||||
|
|
||||||
init_paging(); // Initialize paging
|
init_paging(); // Initialize paging
|
||||||
PRTOK
|
PRTOK
|
||||||
printf(" - Loaded Paging");
|
printf(" - Loaded Paging");
|
||||||
|
|
||||||
// Now we can start initrd
|
|
||||||
fs_root = init_ramdisk(loc);
|
|
||||||
PRTOK
|
|
||||||
printf(" - Loaded Initrd");
|
|
||||||
|
|
||||||
PRTAT
|
PRTAT
|
||||||
printf(" - Testing heap...\t");
|
printf(" - Testing heap...\t");
|
||||||
|
Loading…
Reference in New Issue
Block a user