GithubHelp home page GithubHelp logo

ullusparvus / bootloader Goto Github PK

View Code? Open in Web Editor NEW

This project forked from rust-osdev/bootloader

0.0 1.0 0.0 91 KB

An experimental pure-Rust x86 bootloader

License: Apache License 2.0

Assembly 36.22% Rust 63.78%

bootloader's Introduction

rustboot

Join the chat at https://gitter.im/rust-osdev/bootloader

An experimental pure-Rust x86 bootloader for the planned second edition of the Writing an OS in Rust series.

This is still work in progress.

The idea is to build the kernel as a no_std longmode executable and then build the bootloader with the kernel ELF file in kernel.bin. The output is a flat binary disk image (including a basic MBR) that can be run in QEMU or burned to an USB flash drive (CDs require a different kind of bootloader, which is not supported at the moment). The plan is to create a custom tool (or cargo subcommand) that performs these steps automatically.

Build and Run

You need a nightly Rust compiler, xargo, objcopy (or a similar tool), and QEMU (for running it).

Mac OS

If you are building on Mac OS and get a error saying ld.bfd not found you first need to cross compile binutils and then adjust the linker name in the x86_64-bootloader.json file. The reason for this is the default rust LLVM linker doesn't support some features this project needs.

After doing that continue with the instructions for Linux.

Linux

> RUST_TARGET_PATH=$(pwd) xargo build --target x86_64-bootloader --release
> objcopy -O binary -S target/x86_64-bootloader/release/bootloader bootimage.bin
> qemu-system-x86_64 -hda bootimage.bin -d int -s

bootloader's People

Contributors

andre-richter avatar gitter-badger avatar lachlansneff avatar phil-opp avatar xacrimon avatar

Watchers

 avatar

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.