This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Basic Info | |
OS_NAME := SawayakanaOS | |
CUSTOM_TARGET := i386-sawayakanaos | |
# Commands | |
MAKE := make | |
LD_FLAG := -m elf_i386 -n | |
# Directories |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set timeout=5 | |
set default=0 | |
menuentry "SawayaknaOS" { | |
multiboot2 /boot/sawayakanaos.bin | |
boot | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Basic Info | |
CUSTOM_TARGET := i386-sawayakanaos | |
# Directories | |
SRC_DIR := src | |
TARGET_DIR := target | |
DEBUG_BUILD_DIR := $(TARGET_DIR)/$(CUSTOM_TARGET)/debug/ | |
# Files | |
SRCS := $(SRC_DIR)/lib.rs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#![feature(panic_implementation)] | |
#![no_std] | |
use core::panic::PanicInfo; | |
#[panic_implementation] | |
#[no_mangle] | |
pub extern "C" fn panic(_info: &PanicInfo) -> ! { | |
loop {} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"llvm-target": "i386-unknown-none", | |
"data-layout": "e-m:e-p:32:32-f64:32:64-f80:32-n8:16:32-S128", | |
"arch": "x86", | |
"target-endian": "little", | |
"target-pointer-width": "32", | |
"target-c-int-width": "32", | |
"os": "none", | |
"executables": false, | |
"linker-flavor": "ld.lld", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[package] | |
name = "kernel" | |
version = "0.1.0" | |
authors = ["Ittoh Kimura <kimura.itto.kd3@gmail.com>"] | |
[dependencies] | |
[lib] | |
crate-type = ["staticlib"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SECTIONS { | |
. = 1M; | |
.boot : { KEEP(*(.multiboot_header)) } | |
.text : { *(.text) } | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NASM := nasm | |
NASM_FLAG := -f elf32 | |
SRCS := $(wildcard *.S) | |
OBJS := $(patsubst %.S, %.o, $(SRCS)) | |
.PHONY: build clean | |
build: $(OBJS) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
section .text | |
bits 32 | |
extern kernel_main | |
boot: | |
call kernel_main | |
hlt |
NewerOlder