Skip to content

Commit

Permalink
Fix compilation and generally improve things
Browse files Browse the repository at this point in the history
This project hasn't had a commit in awhile, so this is more of a messy
sweep-up job than anything else.
Months of negligence on a "nightly" versioned project leads to several
compilation failures, which have now been fixed. These include the
merging of `collections` and `alloc` crates. The change of the `Unique`
struct. And a new target option has been added, which made cross cross
compilation fail.
There have been also several general improvements. These include the new
use of the `x86_64` crate, instead of x86, which simplifies code (but
also requires a quite larger stack). This enables interrupt handling to
be greatly simplified when paired with the new "x86-interrupt" abi. Also
there is a small change to printing that allows for waiting for the
writer to flush. This is very useful for color switching.
Finally there have been a few minor changes, including changing the name
of the ugly `(ARCH)-unknown-none-gnu` to `(ARCH)-ESALP`. And a small
.gdbinit file has been added which should simplify debugging with qemu.

Many of these changes are better shown my themselves in Blog-OS. Please
see phil-opp/blog_os#289 phil-opp/blog_os#325 and phil-opp/blog_os#333
for more details.
  • Loading branch information
Calvin Lee committed Jun 27, 2017
1 parent 3f05746 commit eb7303a
Show file tree
Hide file tree
Showing 16 changed files with 99 additions and 365 deletions.
12 changes: 12 additions & 0 deletions .gdbinit
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
file ./build/kernel-x86_64.bin
target remote localhost:1234
set architecture i386:x86-64
set disassembly-flavor intel

display /i $pc

define longfix
disconnect
set architecture i386:x86-64:intel
target remote localhost:1234
end
15 changes: 1 addition & 14 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ once = "0.3.2"
rlibc = "0.1.4"
spin = "0.4.4"
multiboot2 = "0.3.0"
x86_64 = "0.1.2"

[dependencies.hole_list_allocator]
path = "libs/hole_list_allocator"
Expand All @@ -21,19 +22,5 @@ version = "0.2.1"
[dependencies.log_buffer]
git = "https://github.com/ESALP/rust-log_buffer"

[dependencies.x86]
default-features = false
version = "0.7.1"

[lib]
crate-type = ["staticlib"]

[profile]

[profile.dev]
panic = "abort"

[profile.release]
panic = "abort"

[workspace]
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

arch ?= x86_64
name ?= ESALP
target ?= $(arch)-unknown-none-gnu
target ?= $(arch)-ESALP
rust_os := target/$(target)/debug/lib$(name).a
kernel := build/kernel-$(arch).bin
iso := build/os-$(arch).iso
Expand Down
2 changes: 2 additions & 0 deletions Xargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[target.x86_64-ESALP.dependencies]
alloc = {}
1 change: 0 additions & 1 deletion libs/hole_list_allocator/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
use spin::Mutex;
use linked_list_allocator::Heap;

#[macro_use]
extern crate lazy_static;
extern crate linked_list_allocator;
extern crate spin;
Expand Down
2 changes: 1 addition & 1 deletion src/arch/x86_64/boot.asm
Original file line number Diff line number Diff line change
Expand Up @@ -351,5 +351,5 @@ kernel_table:
; undefined behavior.
align 16
stack_bottom:
resb 4096 * 2
resb 4096 * 6
stack_top:
79 changes: 0 additions & 79 deletions src/arch/x86_64/interrupts.asm

This file was deleted.

129 changes: 0 additions & 129 deletions src/interrupts/idt.rs

This file was deleted.

Loading

0 comments on commit eb7303a

Please sign in to comment.