Code Monkey home page Code Monkey logo

rust-barebones-kernel's People

Contributors

ericson2314 avatar liamzdenek avatar michaelsippel avatar parched avatar phil-opp avatar steveklabnik avatar thepowersgang avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rust-barebones-kernel's Issues

VGA Text Mode double faults

It might be because the kernel is in UEFI mode, but if you know some way to get VGA Text Mode to work please tell me.

Problem with naming of binutils tools

Hi

When running make I get the following error

x86_64-none-elf-as  -o .obj/amd64/start.o arch/amd64/start.S
make: x86_64-none-elf-as: Command not found
Makefile:75: recipe for target '.obj/amd64/start.o' failed
make: *** [.obj/amd64/start.o] Error 127

I realized this is the name given in the Makefile to as:

ifeq ($(ARCH),amd64)
    LD := x86_64-none-elf-ld
    AS := x86_64-none-elf-as
    OBJDUMP := x86_64-none-elf-objdump
    OBJCOPY := x86_64-none-elf-objcopy
else ifeq ($(ARCH),x86)
    LD := i686-elf-ld
    AS := i686-elf-as
    OBJDUMP := i686-elf-objdump
else
     $(error Unknown architecture $(ARCH))
endif

If I change the Makefile ot set the name of the tools, the make process continues normally

LD := ld
AS := as
OBJDUMP := objdump
OBJCOPY := objcopy

Pass multiboot address to kmain function

I'm trying to pass the multiboot header (or pointer) into the kmain function by using push. Everytime I try the compiler complains that I can't push 32-bit registers on to a 64-bit stack, is there a workaround or fix to this?

Issue when building

when i try to build i got first error regarding "make: x86_64-none-elf-as: Command not found" which got around by changing makefile "make: x86_64-none-elf-as" to "make: x86_64-elf-as" but then got another one : http://termbin.com/bg8n

error: unresolved import `num::dec2flt::ParseFloatError`

After applying the patch for float point in libcore, the make process generates this error:

as  -o .obj/amd64/start.o arch/amd64/start.S
rustc -O --cfg arch__amd64 --target=arch/amd64/target.json --cfg disable_float -C soft-float -o .obj/amd64/libcore.rlib --crate-type=lib --emit=link,dep-info ../libcore/lib.rs
warning: ignoring specified output filename because multiple outputs were requested
../libcore/num/mod.rs:1474:9: 1474:38 error: unresolved import `num::dec2flt::ParseFloatError`. Could         not find `dec2flt` in `num` [E0432]
../libcore/num/mod.rs:1474 pub use num::dec2flt::ParseFloatError;
                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../libcore/num/mod.rs:1474:9: 1474:38 help: run `rustc --explain E0432` to see a detailed explanation
error: aborting due to previous error
Makefile:65: recipe for target '.obj/amd64/libcore.rlib' failed
make: *** [.obj/amd64/libcore.rlib] Error 101

Why use libcore

Just curious, why is it necessary to use libcore & rust nightly?

Possibly broken by update?

I can't compile the kernel for this reason.

rustc -O --cfg arch__amd64 --target=arch/amd64/target.json --cfg disable_float -C soft-float -o .obj/amd64/libcore.rlib --crate-type=lib --emit=link,dep-info ../libcore/lib.rs
../libcore/option.rs:172:10: 172:11 error: expected type, found `#`
../libcore/option.rs:172     Some(#[cfg_attr(not(stage0), stable(feature = "rust1", since = "1.0.0"))] T)
                                  ^
Makefile:72: recipe for target '.obj/amd64/libcore.rlib' failed
make: *** [.obj/amd64/libcore.rlib] Error 101

Everything seemed fine but I got this error. I used TRIPLE = make
This seems to have nothing to do with that though.

Can't compile with 1.2 nightly

I know that 1.0 nightly is recommended but I wanted to try 1.2 nightly. Get the following:

x86_64-elf-ld -o ../kernel.amd64.bin -T arch/amd64/link.ld -Map .obj/amd64/map.txt --gc-sections -z max-page-size=0x1000 .obj/amd64/start.o .obj/amd64/kernel.o .obj/amd64/libcore.rlib
.obj/amd64/kernel.o: In function `fmt::Write::write_fmt::Adapter$LT$$u27$a$C$$u20$T$GT$.Write::write_fmt::h12553647585220172932':
main.0.rs:(.text._ZN3fmt5Write9write_fmt36Adapter$LT$$u27$a$C$$u20$T$GT$.Write9write_fmt21h12553647585220172932E+0x5a): undefined reference to `fmt::write::he06a9e58235fa9d6i5M'
.obj/amd64/kernel.o: In function `fmt::_$RF$$u27$a$u20$T.Display::fmt::h317396037922038184':
main.0.rs:(.text._ZN3fmt25_$RF$$u27$a$u20$T.Display3fmt19h317396037922038184E+0x1c): undefined reference to `fmt::str.Display::fmt::h2af2fe2576bb6edfMGN'
.obj/amd64/kernel.o: In function `kmain':
main.0.rs:(.text.kmain+0x127): undefined reference to `fmt::write::he06a9e58235fa9d6i5M'
main.0.rs:(.text.kmain+0x13c): undefined reference to `fmt::num::i32.fmt..Display::fmt::h3c80d6522088f321zaM'
main.0.rs:(.text.kmain+0x204): undefined reference to `fmt::write::he06a9e58235fa9d6i5M'
main.0.rs:(.text.kmain+0x2a9): undefined reference to `fmt::write::he06a9e58235fa9d6i5M'
main.0.rs:(.text.kmain+0x37d): undefined reference to `fmt::write::he06a9e58235fa9d6i5M'
main.0.rs:(.text.kmain+0x422): undefined reference to `fmt::write::he06a9e58235fa9d6i5M'
make: *** [../kernel.amd64.bin] Error 1

If I remove the calls to log! everything compiles and runs. New to Rust and would like to try and get this compiling with 1.2 as a way to start learning Rust. Any ideas?

Couldn't build with rustc-1.4.0-nightly

I've tried to build kernel like in your README, but with some differences.

Firstly, I've tried to do make, but it fails with this error:

rustc -O --cfg arch__amd64 --target=arch/amd64/target.json --cfg disable_float -C soft-float -o .obj/amd64/libcore.rlib --crate-type=lib --emit=link,dep-info ../libcore/lib.rs
warning: ignoring specified output filename because multiple outputs were requested
LLVM ERROR: SSE register return with SSE disabled
Makefile:61: recipe for target '.obj/amd64/libcore.rlib' failed
make: *** [.obj/amd64/libcore.rlib] Error 1

So, I decided to apply patch from the root of repo (libcore_nofp.patch). It also fails:

patching file clone.rs
patching file default.rs
patching file fmt/mod.rs
patching file intrinsics.rs
patching file lib.rs
patching file num/flt2dec/decoder.rs
Hunk #1 succeeded at 12 with fuzz 2.
patching file num/mod.rs
Hunk #1 succeeded at 94 (offset 1 line).
Hunk #2 FAILED at 1403.
1 out of 2 hunks FAILED -- saving rejects to file num/mod.rs.rej
patching file ops.rs

And if I built it with wrong-applied patch it says me about 12 errors like ../libcore/num/dec2flt/rawfp.rs:144:1: 189:2 error: the traitnum::Floatis not implemented for the typef32[E0277]

I am using latest (today) nightly:
rustc --version
rustc 1.4.0-nightly (e2bebf32f 2015-08-14)

And libcore from rust-lang/rust repo.

Could you fix the patch, please?

Formatted output not working correctly

Replacing
log!("Hello world!\n");
with
log!("Hello world! {}\n", 1);
currently reboots the machine.
Looks to me like a triple fault is produced somehow. I have not investigated further. Doing
log!("Hello world! {}\n", "asdf");
seems to work tough.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.