oreboot - a fork of coreboot, with C removed, written in Rust

栏目: IT技术 · 发布时间: 5年前

内容简介:oreboot is a downstream fork of coreboot, i.e. oreboot is coreboot without 'c'.oreboot will only target truly open systems requiring no binary blobs. For now, that means no x86. oreboot is mostly written in Rust, with assembly where needed.oreboot currentl

oreboot README

oreboot is a downstream fork of coreboot, i.e. oreboot is coreboot without 'c'.

oreboot will only target truly open systems requiring no binary blobs. For now, that means no x86. oreboot is mostly written in Rust, with assembly where needed.

oreboot currently only plans to support LinuxBoot payloads.

Demo

Oreboot+QEMU for RISC-V HiFive Unleased:

Oreboot+QEMU for ARM:

oreboot - a fork of coreboot, with C removed, written in Rust

Build Requirements

  • Rust
  • Device tree compiler

Building oreboot

To setup your Rust environment for oreboot, see below:

# Install some tools we will need later
sudo apt install device-tree-compiler pkg-config libssl-dev

# Install rustup
curl https://sh.rustup.rs -sSf | sh

# Apply the Rust environment to your current shell
source $HOME/.cargo/env

# Install cargo-make
cargo install cargo-make

# NOTE: The following needs to be run in the root of the oreboot directory
cd oreboot/
rustup override set nightly   # Set the nightly rust compiler to be used for oreboot
cargo make setup              # Install a few compiler tools

Occasionally you want to run rustup update to keep your Rust up-to-date. A good idea is to make sure you have the latest version before reporting any issues.

To build oreboot for a specific platform, do like this:

# Build for RISC-V
export OREBOOT="${PWD}"
cd src/mainboard/sifive/hifive
cargo make              # Debug
cargo make -p release   # Optimized

# View disassembly
cargo make objdump -p release

# Alternatively, without setting OREBOOT, you can do like this
cargo make --env OREBOOT="${PWD}" --cwd src/mainboard/sifive/hifive

QEMU

# Install QEMU for your target platform, e.g. x86
sudo apt install qemu-system-x86

# Build release build and start with QEMU
cargo make --env OREBOOT="${PWD}" --cwd src/mainboard/emulation/qemu-q35 run -p release
# Quit qemu with CTRL-A X

To build QEMU from source for RISC-V:

git clone https://github.com/qemu/qemu && cd qemu
mkdir build-riscv64 && cd build-riscv64
../configure --target-list=riscv64-softmmu
make -j$(nproc)
# QEMU binary is at riscv64-softmmu/qemu-system-riscv64

Oreboot on Hardware

Website and Mailing List

Not yet.

Ground Rules

  • The build tool is cargo-make; there will be no GNU Makefiles.
  • Cargo.toml files are located in the src/mainboard/x/y directories. which will allow us to build all boards in parallel.
  • All code is auto-formatted with rustfmt with no exceptions. There are no vestiges of the 19th century such as line length limits.
  • There will be no C.
  • We will not run our own Gerrit. We are using Github for now, and the github Pull Request review mechanism.
  • We will not run our own Jenkins. We will use the most appropriate CI; for now, that is Azure but we will be flexible.

Ground Rules for x86

  • We prefer all pieces of the firmware to be open-source; but can accept an ME and FSP binary blob for x86 architectures.
  • Blobs must be essential to boot the system and not provide any extraneous functionality which could not be implemented in Oreboot.
  • Blobs must be redistributable and are ideally available on GitHub.
  • Blobs must not be submitted to github.com/oreboot/oreboot. We prefer blobs to be submitted to github.com/oreboot/blobs, github.com/coreboot/blobs or some other GitHub repository.
  • The blobs must be in a binary format. No additional C code, assembly files or header files are acceptable.
  • Any compromises to the language safety features of Rust must be explicitly stated.

As a "measure" for how open-source firmware is, use the percentage of the final binary size. For example, if 70% of the firmware bytes are closed-source blob and 30% built from Oreboot source code, we would say the firmware is 30% open-source.

Copyright and License

The copyright on oreboot is owned by quite a large number of individual developers and companies. Please check the individual source files for details.

oreboot is licensed under the terms of the GNU General Public License (GPL). Some files are licensed under the "GPL (version 2, or any later version)", and some files are licensed under the "GPL, version 2". For some parts, which were derived from other projects, other (GPL-compatible) licenses may apply. Please check the individual source files for details.

This makes the resulting oreboot images licensed under the GPL, version 2.


以上就是本文的全部内容,希望本文的内容对大家的学习或者工作能带来一定的帮助,也希望大家多多支持 码农网

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

Metasploit渗透测试魔鬼训练营

Metasploit渗透测试魔鬼训练营

诸葛建伟、陈力波、田繁、孙松柏、等 / 机械工业出版社 / 2013-9-1 / 89.00元

首本中文原创Metasploit渗透测试著作,国内信息安全领域布道者和资深Metasploit渗透测试专家领衔撰写,极具权威性。以实践为导向,既详细讲解了Metasploit渗透测试的技术、流程、方法和技巧,又深刻阐释了渗透测试平台背后蕴含的思想。 本书是Metasploit渗透测试领域难得的经典佳作,由国内信息安全领域的资深Metasploit渗透测试专家领衔撰写。内容系统、广泛、有深度,......一起来看看 《Metasploit渗透测试魔鬼训练营》 这本书的介绍吧!

JS 压缩/解压工具
JS 压缩/解压工具

在线压缩/解压 JS 代码

图片转BASE64编码
图片转BASE64编码

在线图片转Base64编码工具

html转js在线工具
html转js在线工具

html转js在线工具