Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rewrite build system #51

Merged
merged 10 commits into from
Apr 1, 2019
Merged

Rewrite build system #51

merged 10 commits into from
Apr 1, 2019

Conversation

phil-opp
Copy link
Member

@phil-opp phil-opp commented Mar 23, 2019

This implements a new build system for the bootloader. Instead of using a builder executable, we now use a build script that expects a KERNEL environment variable that points to the kernel ELF file. This way, we can directly access the kernel binary in the linker script and don't need hacks to append the kernel manually (see #33 for the original proposal).

Instead of converting the kernel ELF file to a binary manually, we use the llvm-objcopy tool to perform the conversion. This tool ships with the llvm-tools-preview rustup component, which is now required for building this crate.

This is a breaking change, so this requires a bump of the minor version number.

Fixes #33
Fixes #48

@phil-opp phil-opp force-pushed the rewrite-build-system branch 2 times, most recently from 0bb91fa to 1dcfac9 Compare April 1, 2019 10:46
@phil-opp phil-opp force-pushed the rewrite-build-system branch from 1dcfac9 to 01a0828 Compare April 1, 2019 10:55
@phil-opp
Copy link
Member Author

phil-opp commented Apr 1, 2019

bors r+

bors bot added a commit that referenced this pull request Apr 1, 2019
51: Rewrite build system r=phil-opp a=phil-opp

- [x] Blocked on rust-lang/rust#59351
- [x] Blocked on rust-lang/cargo#6778

Fixes #33 
Fixes #48

Co-authored-by: Philipp Oppermann <dev@phil-opp.com>
@bors
Copy link
Contributor

bors bot commented Apr 1, 2019

Build succeeded

  • rust-osdev.bootloader

@bors bors bot merged commit 01a0828 into master Apr 1, 2019
@bors bors bot deleted the rewrite-build-system branch April 1, 2019 11:08
bors bot added a commit that referenced this pull request Apr 1, 2019
53: Updates for new build system r=phil-opp a=phil-opp

Update the documentation for the new build system and add an `example-kernel` that provides an easy way to try the `bootloader`.

Builds upon #51.

Co-authored-by: Philipp Oppermann <dev@phil-opp.com>
bors bot added a commit to rust-osdev/bootimage that referenced this pull request Apr 2, 2019
34: Rewrite for new bootloader build system r=phil-opp a=phil-opp

This PR rewrites the `bootimage` crate to work with the new bootloader build system proposed in rust-osdev/bootloader#51. It also removes support for some old configuration options and for the `bootloader_precompiled` crate. See the changelog updates for more information.

Note that this new version will only work with bootloader `0.5.0` or later.

Todo:

- [x] Add a `cargo-bootimage` executable
- [x] Create a `bootimage runner` subcommand
- [x] Create a `bootimage tester` subcommand
- [x] Blocked on rust-osdev/bootloader#51
- [x] Rustdoc
- [x] Mention new runner ~/tester~ in the Readme
- [x] Command line help for new commands
- [x] Error message for older bootloader versions (with old build system)
- [x] Update changelog

Co-authored-by: Philipp Oppermann <dev@phil-opp.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant