Boot tools: loader, image generator, etc as a library crate

Related tags

Utilities Arcboot
Overview

ArcBoot v0

A uefi bootloader for riscv, arm and x86. Comes in the form of a single executable.

  • the source code contains a single executable target and no libraries. By default, builds for aarch64
  • build arcutils first, then use that to build, run and test arcboot

TODO

  • get uart working properly on qemu
  • get linker scripts to work properly and setup certain sections for bootloader stage 1 [ ]

Design

Like Oreboot and GRUB, Arcboot is a multiboot UEFI bootloader. For stages 1 and 2 after platform firmware starts and loads the image (BIN or ELF) into RAM.

  • should be flashed onto a drive on its own FAT32 partition. The / partition should be saved for the kernel. Instead the FAT partition should have a /boot dir with extra config files for runtime boot (stages 1 and 2)
  • the /boot fat32 partition can then be mounted on /boot on the main VFS filesystem root

ELF Runner

Kernel images can be built as an ELF executable or just a binary blob in the case of ARM.

  • arcboot sets up a stack, heap, bss, etc. for the kernel
  • it then sets up 48 bit paging and goes into S-Mode. Then it can pass control to the loaded kernel code

No support for 39/52/64 bit paging yet.

RISC-V

RISC-V systems should implement SBI. Arcboot uses rust-sbi and loads an SEE before loading a kernel ELF image.

  • Neutron-riscv compiles an ecall subsystem for simpler hw management
  • I think SBI handles a lot of the multicore scheduling though IDK

ARM

ARM systems have better capabilities than RISCV ones on the market. Usually more library and driver support as well.

  • There are things like vector tables and stuff for bare metal cortex M. I assume a generic aarch64 setup with rings 0-3. Usually a multicore Cortex-A system
  • And any usual data structures and boot methods

Graphics

  • an ARM based GPU like Mali or PowerVR can be used with ARM/RISCV processors. Neutron loads driver modules for those components based on MMIO. Arcboot tells Neutron via ACPI the graphics units available
  • Neutron should load its 3D graphics subsystem when a supported GPU is detected by ACPI

QEMU

Arcboot should be flashed onto a vhd file. QEMU should be run with OVMF firmware.

To specify the vhd file --disk=<main_disk.vhd>. If everything goes well, QEMU should be able to load Arcboot into the host memory and hand off control to it in pseudo M mode.

You might also like...
A document-code sync tools for document engineering.

Writing A document-code sync tools for document engineering. Writing 是一个自动 “文档-代码” 同步工具。解析 Markdown 中的代码定义,读取目标代码,并嵌入到新的文档中。 Language parse support by

PM-Tools - a simple Rust util to easily create server directories

PM-Tools PM-Tools is a simple Rust util to easily create server directories or plugins without the hassle of unzipping or creating directories Progres

Middlewares and tools to integrate axum + tracing + opentelemetry

axum-tracing-opentelemetry Middlewares and tools to integrate axum + tracing + opentelemetry. Read OpenTelemetry header from incoming request Start a

Prints the absolute path of all regular files in an unmounted btrfs filesystem image.

btrfs-walk-tut Prints the absolute path of all regular files in an unmounted btrfs filesystem image. Learning about btrfs: Btrfs Basics Series This re

Ever wanted to torture your CPU by generating every image possible?

dumpsterfire Ever wanted to torture your CPU by generating every image possible? Well, now you can! This thing is worse than mining Bitcoin, since the

image url web-scrapper written in rust

imgs - CLI Webscrapper image url web-scrapper written in rust This is a cli application completely written in rust, it aim is to scrap image-url from

Image optimization using Rust and Vips 🦀

Huffman Image optimization using Rust and Libvips. Requirements You must have the following packages installed before getting started Rust Vips pkg-co

A tool that transforms an IMVU badge canvas into a single cohesive image.

IMVU Badge Canvas Image Generator This tool fetches an IMVU user's badge canvas and creates a single unified image representation of it. Instead of ha

🦀 Rust-based implementation of a Snowflake Generator which communicates using gRPC

Clawflake Clawflake is a Rust application which implements Twitter Snowflakes and communicates using gRPC. Snowflake ID numbers are 63 bits integers s

Owner
Spectral Project
The entire stack
Spectral Project
A lite tool to make systemd work in any container(Windows Subsystem for Linux 2, Docker, Podman, etc.)

Angea Naming from hydrangea(アジサイ) A lite tool to make systemd work in any container(Windows Subsystem for Linux 2, Docker, Podman, etc.) WSL1 is not s

いんしさくら 16 Dec 5, 2022
Repo for Monaco, a DCA engine for Solana. Built on Solend and lending protocols (Jet, Solend, Port, etc...)

Monaco Monaco is a DCA protocol for solana built on top of Serum and compatible with any program that implements or extends the instruction interface

Rohan Kapur 19 Apr 13, 2022
Keyscope is a key and secret workflow (validation, invalidation, etc.) tool built in Rust

✅ Automate your key and secret validation workflows ?? Over 30 different providers ?? Export to JSON, audit via CSV ?? Keyscope Keyscope is a key and

null 364 Dec 22, 2022
Examples of how to use Rust with Serverless Framework, Lambda, API Gateway v1 and v2, SQS, GraphQL, etc

Rust Serverless Examples All examples live in their own directories: project: there is nothing here, just a simple cargo new project_name with a custo

Fernando Daciuk 9 Dec 17, 2022
Small library for text to image steganography.

hips-lib Performs text to image steganography by hinding and retrieving secret text within images or pixel arrays. This is achieved by encoding the se

hewhocopypastes 4 Feb 21, 2023
Dead simple, minimal SPDX License generator library written in Rust.

lice Dead simple, minimal SPDX License generator library written in Rust. Lice is in beta Install | User Docs | Crate Docs | Reference | Contributing

refcell.eth 9 Oct 22, 2023
Utilities and tools based around Amazon S3 to provide convenience APIs in a CLI

s3-utils Utilities and tools based around Amazon S3 to provide convenience APIs in a CLI. This tool contains a small set of command line utilities for

Isaac Whitfield 47 Dec 15, 2022
PartiQL libraries and tools in Rust.

This is a collection of crates to provide Rust support for the PartiQL query language.

null 54 Dec 26, 2022
Modeling is a tools to analysis different languages by Ctags

Modeling Modeling is a tools to analysis different languages by Ctags process: generate to opt call ctags with opt analysis ctags logs output resulse

Inherd OS Team (硬核开源小组) 13 Sep 13, 2022
Postgres proxy which allows tools that don't natively supports IAM auth to connect to AWS RDS instances.

rds-iamauth-proxy rds-proxy lets you make use of IAM-based authentication to AWS RDS instances from tools that don't natively support that method of a

Gold Fig Labs Inc. 10 Nov 7, 2022