{"id":13484767,"url":"https://github.com/rust-osdev/bootimage","last_synced_at":"2025-05-14T02:04:55.269Z","repository":{"id":45975034,"uuid":"118134599","full_name":"rust-osdev/bootimage","owner":"rust-osdev","description":"Tool to create bootable disk images from a Rust OS kernel.","archived":false,"fork":false,"pushed_at":"2025-03-24T10:10:35.000Z","size":359,"stargazers_count":802,"open_issues_count":19,"forks_count":67,"subscribers_count":16,"default_branch":"master","last_synced_at":"2025-04-13T10:49:55.196Z","etag":null,"topics":["osdev","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rust-osdev.png","metadata":{"files":{"readme":"Readme.md","changelog":"Changelog.md","contributing":null,"funding":null,"license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2018-01-19T14:25:27.000Z","updated_at":"2025-04-10T18:09:30.000Z","dependencies_parsed_at":"2024-02-18T03:31:55.115Z","dependency_job_id":"38e15452-7f9d-4a1d-b89f-742ad3933c22","html_url":"https://github.com/rust-osdev/bootimage","commit_stats":{"total_commits":331,"total_committers":15,"mean_commits":"22.066666666666666","dds":0.07552870090634445,"last_synced_commit":"63b52fe93153d86ee99c8940dfcffab5347a0a3f"},"previous_names":[],"tags_count":60,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rust-osdev%2Fbootimage","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rust-osdev%2Fbootimage/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rust-osdev%2Fbootimage/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rust-osdev%2Fbootimage/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rust-osdev","download_url":"https://codeload.github.com/rust-osdev/bootimage/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254052692,"owners_count":22006716,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["osdev","rust"],"created_at":"2024-07-31T17:01:32.977Z","updated_at":"2025-05-14T02:04:55.233Z","avatar_url":"https://github.com/rust-osdev.png","language":"Rust","funding_links":[],"categories":["Rust"],"sub_categories":[],"readme":"# bootimage\n\nCreates a bootable disk image from a Rust OS kernel.\n\n## Installation\n\n```\n\u003e cargo install bootimage\n```\n\n## Usage\n\nFirst you need to add a dependency on the [`bootloader`](https://github.com/rust-osdev/bootloader) crate:\n\n```toml\n# in your Cargo.toml\n\n[dependencies]\nbootloader = \"0.9.8\"\n```\n\n**Note**: At least bootloader version `0.5.1` is required since `bootimage 0.7.0`. For earlier bootloader versions, use `bootimage 0.6.6`.\n\nIf you want to use a custom bootloader with a different name, you can use Cargo's [rename functionality](https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#renaming-dependencies-in-cargotoml).\n\n### Building\n\nNow you can build the kernel project and create a bootable disk image from it by running:\n\n```\ncargo bootimage --target your_custom_target.json [other_args]\n```\n\nThe command will invoke `cargo build`, forwarding all passed options. Then it will build the specified bootloader together with the kernel to create a bootable disk image.\n\n### Running\n\nTo run your kernel in QEMU, you can set a `bootimage runner` as a custom runner in a `.cargo/config` file:\n\n```toml\n[target.'cfg(target_os = \"none\")']\nrunner = \"bootimage runner\"\n```\n\nThen you can run your kernel through:\n\n```\ncargo xrun --target your_custom_target.json [other_args] -- [qemu args]\n```\n\nAll arguments after `--` are passed to QEMU. If you want to use a custom run command, see the _Configuration_ section below.\n\n### Testing\n\nThe `bootimage` has built-in support for running unit and integration tests of your kernel. For this, you need to use the `custom_tests_framework` feature of Rust as described [here](https://os.phil-opp.com/testing/#custom-test-frameworks).\n\n## Configuration\n\nConfiguration is done through a `[package.metadata.bootimage]` table in the `Cargo.toml` of your kernel. The following options are available:\n\n```toml\n[package.metadata.bootimage]\n# The cargo subcommand that will be used for building the kernel.\n#\n# For building using the `cargo-xbuild` crate, set this to `xbuild`.\nbuild-command = [\"build\"]\n# The command invoked with the created bootimage (the \"{}\" will be replaced\n# with the path to the bootable disk image)\n# Applies to `bootimage run` and `bootimage runner`\nrun-command = [\"qemu-system-x86_64\", \"-drive\", \"format=raw,file={}\"]\n\n# Additional arguments passed to the run command for non-test executables\n# Applies to `bootimage run` and `bootimage runner`\nrun-args = []\n\n# Additional arguments passed to the run command for test executables\n# Applies to `bootimage runner`\ntest-args = []\n\n# An exit code that should be considered as success for test executables\ntest-success-exit-code = {integer}\n\n# The timeout for running a test through `bootimage test` or `bootimage runner` (in seconds)\ntest-timeout = 300\n\n# Whether the `-no-reboot` flag should be passed to test executables\ntest-no-reboot = true\n```\n\n## License\n\nLicensed under either of\n\n- Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE) or\n  http://www.apache.org/licenses/LICENSE-2.0)\n- MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)\n\nat your option.\n\nUnless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frust-osdev%2Fbootimage","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frust-osdev%2Fbootimage","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frust-osdev%2Fbootimage/lists"}