Skip to content

Commit

Permalink
fix: os now linked with the correct output
Browse files Browse the repository at this point in the history
  • Loading branch information
Mrgoblings committed Nov 8, 2024
1 parent d60f745 commit 804f126
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 7 deletions.
2 changes: 2 additions & 0 deletions AnasOS/boot/grub/grub.cfg
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
set timeout=5

menuentry "AnasOS"{
multiboot /boot/kernel
boot
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ test:
echo "No tests for now"

kernel-rust:
@cd ./anasos-kernel && cargo +nightly build --release --target x86_64-unknown-none
@cd ./anasos-kernel && cargo build --release

image:
@cp ./anasos-kernel/target/x86_64-unknown-none/release/anasos-kernel AnasOS/boot/kernel
Expand Down
1 change: 0 additions & 1 deletion anasos-kernel/.cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
target = ["x86_64-unknown-none"]

[target.x86_64-unknown-none]
linker = "ld"
rustflags = [
"-C", "code-model=kernel",
"-C", "relocation-model=static",
Expand Down
11 changes: 6 additions & 5 deletions anasos-kernel/linker.ld
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
OUTPUT_FORMAT(elf32-i386)
OUTPUT_FORMAT(binary)
ENTRY(start)
SECTIONS
{
. = 0x100000;
.text : {*(.text)}
.data : {*(.data)}
.bss : {*(.bss)}
}
.multiboot : { *(.multiboot) }
.text : { *(.text) }
.data : { *(.data) }
.bss : { *(.bss) }
}
1 change: 1 addition & 0 deletions anasos-kernel/rust-toolchain
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
nightly

0 comments on commit 804f126

Please sign in to comment.