Basically I Removed the need for multiboot lol
This commit is contained in:
parent
7adc6757e8
commit
10069f8263
5
CoC.md
Normal file
5
CoC.md
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
# NANITE CODE OF CONDUCT (CoC)
|
||||||
|
Its simple really... just a few rules.
|
||||||
|
## Rules
|
||||||
|
- Don't use AI (For anything, ever. Not code. not translations. NOTHING)
|
||||||
|
- Be a decent human being (don't be a dick)
|
||||||
9
LICENSE
9
LICENSE
@ -1,6 +1,6 @@
|
|||||||
BSD 3-Clause License
|
NANITE Licence (Modified BSD 3-Clause)
|
||||||
|
|
||||||
Copyright (c) 2025, Tyler McGurrin
|
Copyright (c) 2026, Xircon
|
||||||
|
|
||||||
Redistribution and use in source and binary forms, with or without
|
Redistribution and use in source and binary forms, with or without
|
||||||
modification, are permitted provided that the following conditions are met:
|
modification, are permitted provided that the following conditions are met:
|
||||||
@ -16,6 +16,11 @@ modification, are permitted provided that the following conditions are met:
|
|||||||
contributors may be used to endorse or promote products derived from
|
contributors may be used to endorse or promote products derived from
|
||||||
this software without specific prior written permission.
|
this software without specific prior written permission.
|
||||||
|
|
||||||
|
4. This Software Shall NEVER be used For Training an AI Model.
|
||||||
|
|
||||||
|
5. Any device this software ships with MUST allow the user to reinstall the base
|
||||||
|
version of the software with ZERO RESTRICTIONS on Functionality.
|
||||||
|
|
||||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
|
|||||||
@ -25,7 +25,7 @@ Note: Kernel is currently under very heavy development.
|
|||||||
All things are subject to change at any time.
|
All things are subject to change at any time.
|
||||||
|
|
||||||
## Building
|
## Building
|
||||||
Run `./build.sh` inside main directory of repo
|
Run `./build.sh` inside main directory of repo, however you may first need to run `make toolchain` i would DEFINITELY use more than one job (building GCC takes forever)
|
||||||
|
|
||||||
To write to a disk, use `./write.sh` WARNING: **is hard coded to /dev/sdb** (sorry i suck at scripting)
|
To write to a disk, use `./write.sh` WARNING: **is hard coded to /dev/sdb** (sorry i suck at scripting)
|
||||||
|
|
||||||
@ -43,6 +43,7 @@ You could also run `make all` but the scripts a bit better tbh, it even automate
|
|||||||
|
|
||||||
## How is Testing Done
|
## How is Testing Done
|
||||||
Testing is mostly done with QEMU These days, but I do sometimes pull out my Dell Latitude D610 to test on real hardware (for anyone wondering its completely maxed out. [2GB of ram Pentium M @ 2.23GHz])
|
Testing is mostly done with QEMU These days, but I do sometimes pull out my Dell Latitude D610 to test on real hardware (for anyone wondering its completely maxed out. [2GB of ram Pentium M @ 2.23GHz])
|
||||||
|
I Also do some testing on a Dell Dimension 8110 (its at my desk 24/7 and has its serial port hooked to my desktop, lol)
|
||||||
|
|
||||||
## Thanks!
|
## Thanks!
|
||||||
Resources I've Used Throughout the Project
|
Resources I've Used Throughout the Project
|
||||||
|
|||||||
6
build.sh
6
build.sh
@ -11,7 +11,7 @@ case $yn in
|
|||||||
echo Removing Old Build Files...;
|
echo Removing Old Build Files...;
|
||||||
echo ---------------------------;
|
echo ---------------------------;
|
||||||
|
|
||||||
make clean;
|
make -j24 clean;
|
||||||
echo -----;
|
echo -----;
|
||||||
echo Done!;
|
echo Done!;
|
||||||
echo -----;
|
echo -----;
|
||||||
@ -26,7 +26,7 @@ echo ------------
|
|||||||
echo COMPILING OS
|
echo COMPILING OS
|
||||||
echo ------------
|
echo ------------
|
||||||
|
|
||||||
make -s
|
make -j24 -s
|
||||||
|
|
||||||
echo ---------
|
echo ---------
|
||||||
echo Finished!
|
echo Finished!
|
||||||
@ -87,7 +87,7 @@ case $yn in
|
|||||||
-audiodev pa,id=speaker \
|
-audiodev pa,id=speaker \
|
||||||
-machine pcspk-audiodev=speaker \
|
-machine pcspk-audiodev=speaker \
|
||||||
-hda build/main.img \
|
-hda build/main.img \
|
||||||
-m size=512M
|
-m size=16M
|
||||||
echo --------
|
echo --------
|
||||||
echo Finshed!
|
echo Finshed!
|
||||||
echo --------
|
echo --------
|
||||||
|
|||||||
@ -7,13 +7,11 @@ set root='hd0,1'
|
|||||||
|
|
||||||
set gfxmode=800x600
|
set gfxmode=800x600
|
||||||
insmod all_video
|
insmod all_video
|
||||||
insmod gfxterm
|
|
||||||
set locale_dir=$prefix/locale
|
set locale_dir=$prefix/locale
|
||||||
set lang=en_CA
|
set lang=en_CA
|
||||||
insmod gettext
|
insmod gettext
|
||||||
|
|
||||||
terminal_input console
|
terminal_input console
|
||||||
terminal_output gfxterm
|
|
||||||
|
|
||||||
insmod gfxmenu
|
insmod gfxmenu
|
||||||
# loadfont /boot/grub/themes/nanite/font10.pf2
|
# loadfont /boot/grub/themes/nanite/font10.pf2
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
;/////////////////////;
|
;/////////////////////;
|
||||||
;Nanite OS ;
|
;Nanite OS ;
|
||||||
;COPYRIGHT (C) 2025 ;
|
;COPYRIGHT (C) 2026 ;
|
||||||
;Tyler McGurrin ;
|
;Tyler McGurrin ;
|
||||||
;/////////////////////;
|
;/////////////////////;
|
||||||
[bits 32]
|
[bits 32]
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
/*----------------*\
|
/*----------------*\
|
||||||
|Nanite OS |
|
|Nanite OS |
|
||||||
|Copyright (C) 2024|
|
|Copyright (C) 2026|
|
||||||
|Tyler McGurrin |
|
|Tyler McGurrin |
|
||||||
\*----------------*/
|
\*----------------*/
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
/*----------------*\
|
/*----------------*\
|
||||||
|Nanite OS |
|
|Nanite OS |
|
||||||
|Copyright (C) 2025|
|
|Copyright (C) 2026|
|
||||||
|Tyler McGurrin |
|
|Tyler McGurrin |
|
||||||
\*----------------*/
|
\*----------------*/
|
||||||
#include "dma.h"
|
#include "dma.h"
|
||||||
|
|||||||
@ -1,9 +1,9 @@
|
|||||||
/*----------------*\
|
/*----------------*\
|
||||||
|Nanite OS |
|
|Nanite OS |
|
||||||
|Copyright (C) 2024|
|
|Copyright (C) 2026|
|
||||||
|Tyler McGurrin |
|
|Tyler McGurrin |
|
||||||
\*----------------*/
|
\*----------------*/
|
||||||
#include "allocator.h"
|
#include "alloc.h"
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
@ -11,6 +11,10 @@
|
|||||||
|
|
||||||
extern uint16_t DEBUG_COM_PORT;
|
extern uint16_t DEBUG_COM_PORT;
|
||||||
|
|
||||||
void alloc(size_t size) {
|
void malloc(size_t size) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void free() {
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -1,6 +1,6 @@
|
|||||||
/*----------------*\
|
/*----------------*\
|
||||||
|Nanite OS |
|
|Nanite OS |
|
||||||
|Copyright (C) 2024|
|
|Copyright (C) 2026|
|
||||||
|Tyler McGurrin |
|
|Tyler McGurrin |
|
||||||
\*----------------*/
|
\*----------------*/
|
||||||
#pragma once
|
#pragma once
|
||||||
@ -1,6 +1,6 @@
|
|||||||
/*----------------*\
|
/*----------------*\
|
||||||
|Nanite OS |
|
|Nanite OS |
|
||||||
|Copyright (C) 2024|
|
|Copyright (C) 2026|
|
||||||
|Tyler McGurrin |
|
|Tyler McGurrin |
|
||||||
\*----------------*/
|
\*----------------*/
|
||||||
#include "page.h"
|
#include "page.h"
|
||||||
|
|||||||
@ -1,8 +1,15 @@
|
|||||||
/*----------------*\
|
/*----------------*\
|
||||||
|Nanite OS |
|
|Nanite OS |
|
||||||
|Copyright (C) 2024|
|
|Copyright (C) 2026|
|
||||||
|Tyler McGurrin |
|
|Tyler McGurrin |
|
||||||
\*----------------*/
|
\*----------------*/
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
void Memory_Page_Init();
|
void Memory_Page_Init();
|
||||||
|
|
||||||
|
struct page {
|
||||||
|
char value[4096];
|
||||||
|
uint32_t page_number;
|
||||||
|
};
|
||||||
@ -1,6 +1,6 @@
|
|||||||
/*----------------*\
|
/*----------------*\
|
||||||
|Nanite OS |
|
|Nanite OS |
|
||||||
|Copyright (C) 2025|
|
|Copyright (C) 2026|
|
||||||
|Tyler McGurrin |
|
|Tyler McGurrin |
|
||||||
\*----------------*/
|
\*----------------*/
|
||||||
#include "cmos.h"
|
#include "cmos.h"
|
||||||
@ -85,3 +85,13 @@ int Slave_FDD_Detect()
|
|||||||
}
|
}
|
||||||
return FDDType;
|
return FDDType;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Basic, However Good Enough. Not like i'll ever support UEFI Lol
|
||||||
|
int Detect_Memory() {
|
||||||
|
outb(CMOS_ADDPORT, 0x30);
|
||||||
|
int lowmem = inb(CMOS_DATAPORT);
|
||||||
|
outb(CMOS_ADDPORT, 0x31);
|
||||||
|
int highmem = inb(CMOS_DATAPORT);
|
||||||
|
|
||||||
|
return lowmem | highmem << 8;
|
||||||
|
}
|
||||||
@ -1,6 +1,6 @@
|
|||||||
/*----------------*\
|
/*----------------*\
|
||||||
|Nanite OS |
|
|Nanite OS |
|
||||||
|Copyright (C) 2025|
|
|Copyright (C) 2026|
|
||||||
|Tyler McGurrin |
|
|Tyler McGurrin |
|
||||||
\*----------------*/
|
\*----------------*/
|
||||||
#pragma once
|
#pragma once
|
||||||
@ -10,6 +10,8 @@
|
|||||||
void CMOS_RTC_Handler();
|
void CMOS_RTC_Handler();
|
||||||
int Master_FDD_Detect();
|
int Master_FDD_Detect();
|
||||||
int Slave_FDD_Detect();
|
int Slave_FDD_Detect();
|
||||||
|
|
||||||
|
int Detect_Memory();
|
||||||
uint8_t Read_CMOS(uint8_t Register);
|
uint8_t Read_CMOS(uint8_t Register);
|
||||||
|
|
||||||
enum CMOSRegisters
|
enum CMOSRegisters
|
||||||
|
|||||||
@ -49,8 +49,10 @@ extern uint8_t __end;
|
|||||||
|
|
||||||
extern int uptime;
|
extern int uptime;
|
||||||
|
|
||||||
|
int Memory; // Amount of Available RAM To OS
|
||||||
|
|
||||||
uint16_t DEBUG_COM_PORT = COM1_PORT;
|
uint16_t DEBUG_COM_PORT = COM1_PORT;
|
||||||
void start(unsigned long multiboot_magic, unsigned long multiboot_addr) {
|
void start() {
|
||||||
|
|
||||||
// Print logo
|
// Print logo
|
||||||
clrscr();
|
clrscr();
|
||||||
@ -75,13 +77,11 @@ void start(unsigned long multiboot_magic, unsigned long multiboot_addr) {
|
|||||||
printf("Done!\n");
|
printf("Done!\n");
|
||||||
|
|
||||||
printf("Initializing Memory Paging...");
|
printf("Initializing Memory Paging...");
|
||||||
|
Memory = Detect_Memory();
|
||||||
|
Serial_Printf(DEBUG_COM_PORT, "MEMORY:> There is %dKB of Memory Available\n", Memory);
|
||||||
Memory_Page_Init();
|
Memory_Page_Init();
|
||||||
printf("Done!\n");
|
printf("Done!\n");
|
||||||
|
|
||||||
// Multiboot Debug Info
|
|
||||||
Serial_Printf(DEBUG_COM_PORT, "Multiboot Magic: %d\n", multiboot_magic);
|
|
||||||
Serial_Printf(DEBUG_COM_PORT, "Multiboot Address: %d\n", multiboot_addr);
|
|
||||||
|
|
||||||
// Finish Up
|
// Finish Up
|
||||||
printf("The Current Time and Date Is: %d:%d:%d %d/%d/%d%d\n",
|
printf("The Current Time and Date Is: %d:%d:%d %d/%d/%d%d\n",
|
||||||
BCD2BIN(Read_CMOS(CMOS_RTC_Hours)),
|
BCD2BIN(Read_CMOS(CMOS_RTC_Hours)),
|
||||||
|
|||||||
@ -1,9 +1,9 @@
|
|||||||
/*----------------*\
|
/*----------------*\
|
||||||
|Nanite OS |
|
|Nanite OS |
|
||||||
|Copyright (C) 2024|
|
|Copyright (C) 2026|
|
||||||
|Tyler McGurrin |
|
|Tyler McGurrin |
|
||||||
\*----------------*/
|
\*----------------*/
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#define LOGO " _ _____ _ __________________\n / | / / | / | / / _/_ __/ ____/\n / |/ / /| | / |/ // / / / / __/ \n / /| / ___ |/ /| // / / / / /___ \n/_/ |_/_/ |_/_/ |_/___/ /_/ /_____/ \n"
|
#define LOGO " _ _____ _ __________________\n / | / / | / | / / _/_ __/ ____/\n / |/ / /| | / |/ // / / / / __/ \n / /| / ___ |/ /| // / / / / /___ \n/_/ |_/_/ |_/_/ |_/___/ /_/ /_____/ \n"
|
||||||
#define VERSION "RD-00052"
|
#define VERSION "RD-00053"
|
||||||
Loading…
x
Reference in New Issue
Block a user