Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
97 changes: 54 additions & 43 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 8 additions & 8 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ repository = "https://github.com/edera-dev/sprout"
edition = "2024"

[workspace.dependencies]
bitflags = "2.11.1"
log = "0.4.29"
spin = "0.11.0"
uefi-raw = "0.14.0"
bitflags = "2.13.1"
log = "0.4.33"
spin = "0.12.2"
uefi-raw = "0.15.1"

[workspace.dependencies.anyhow]
version = "1.0.102"
version = "1.0.104"
default-features = false

[workspace.dependencies.hex]
Expand All @@ -37,7 +37,7 @@ default-features = false
features = ["alloc"]

[workspace.dependencies.serde]
version = "1.0.228"
version = "1.0.229"
default-features = false
features = ["alloc", "derive"]

Expand All @@ -50,12 +50,12 @@ version = "2.0.1"
default-features = false

[workspace.dependencies.toml]
version = "1.1.2"
version = "1.1.3"
default-features = false
features = ["serde", "parse"]

[workspace.dependencies.uefi]
version = "0.37.0"
version = "0.39.0"
default-features = false
features = ["alloc", "global_allocator", "panic_handler"]

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
ARG RUST_PROFILE=release
ARG RUST_TARGET_SUBDIR=release

FROM --platform=$BUILDPLATFORM rust:1.93.0-alpine@sha256:69d7b9d9aeaf108a1419d9a7fcf7860dcc043e9dbd1ab7ce88e44228774d99e9 AS build
FROM --platform=$BUILDPLATFORM rust:1.97.1-alpine@sha256:3c38f3f82c2f3d73da3b38e18d279393a04cb43ddded0e35088a8c3324d40900 AS build
RUN apk --no-cache add musl-dev busybox-static
ARG RUST_PROFILE
RUN adduser -S -s /bin/sh build
Expand Down
2 changes: 1 addition & 1 deletion crates/boot/src/drivers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ fn reconnect() -> Result<()> {
for handle in handles.iter() {
// Ignore the result as there is nothing we can do if reconnecting a controller fails.
// This is also likely to fail in some cases but should fail safely.
let _ = uefi::boot::connect_controller(*handle, None, None, true);
let _ = uefi::boot::connect_controller(*handle, &[], None, true);
}

Ok(())
Expand Down
10 changes: 1 addition & 9 deletions crates/boot/src/menu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,8 @@ fn read(input: &mut Input, timeout: &Duration) -> Result<MenuOperation> {
.context("unable to create timer event")?
};

// The timeout is in increments of 100 nanoseconds.
let timeout_hundred_nanos = timeout.as_nanos() / 100;

// Check if the timeout is too large to fit into an u64.
if timeout_hundred_nanos > u64::MAX as u128 {
bail!("timeout duration overflow");
}

// Set a timer to trigger after the specified duration.
let trigger = TimerTrigger::Relative(timeout_hundred_nanos as u64);
let trigger = TimerTrigger::Relative(*timeout);
uefi::boot::set_timer(&timer_event, trigger).context("unable to set timeout timer")?;

let mut events = vec![timer_event, key_event];
Expand Down
10 changes: 7 additions & 3 deletions crates/boot/src/options.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use alloc::string::{String, ToString};
use anyhow::Result;
use anyhow::{Context, Result, anyhow};
use core::ptr::null_mut;
use jaarg::{
ErrorUsageWriter, ErrorUsageWriterContext, HelpWriter, HelpWriterContext, Opt, Opts,
Expand Down Expand Up @@ -131,11 +131,15 @@ impl SproutOptions {
) {
ParseResult::ContinueSuccess => Ok(result),
ParseResult::ExitSuccess => unsafe {
uefi::boot::exit(uefi::boot::image_handle(), Status::SUCCESS, 0, null_mut());
uefi::boot::exit(uefi::boot::image_handle(), Status::SUCCESS, 0, null_mut())
.context("unable to exit")?;
Err(anyhow!("unable to exit"))
},

ParseResult::ExitError => unsafe {
uefi::boot::exit(uefi::boot::image_handle(), Status::ABORTED, 0, null_mut());
uefi::boot::exit(uefi::boot::image_handle(), Status::ABORTED, 0, null_mut())
.context("unable to exit")?;
Err(anyhow!("unable to exit"))
},
}
}
Expand Down
2 changes: 1 addition & 1 deletion hack/dev/boot/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM --platform=$BUILDPLATFORM debian:trixie@sha256:2c91e484d93f0830a7e05a2b9d92a7b102be7cab562198b984a84fdbc7806d91 AS build
FROM --platform=$BUILDPLATFORM debian:trixie@sha256:fac46bff2e02f51425b6e33b0e1169f55dfb053d83511ca28aa50c09fd5ed7a4 AS build
ARG BUILDPLATFORM
ARG EFI_NAME
RUN export DEBIAN_FRONTEND=noninteractive && apt-get update && apt-get install -y \
Expand Down
6 changes: 3 additions & 3 deletions hack/dev/kernel/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
ARG KERNEL_SOURCE_URL=https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-6.18.2.tar.xz
ARG KERNEL_CHECKSUM=sha256:558c6bbab749492b34f99827fe807b0039a744693c21d3a7e03b3a48edaab96a
ARG KERNEL_SOURCE_URL=https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-6.18.41.tar.xz
ARG KERNEL_CHECKSUM=sha256:17fc72f0f8d4a8a8633a5d20085f5d9c5a5ec51ee896a0b7ae1ec25da31273ea

FROM --platform=$BUILDPLATFORM debian:trixie@sha256:2c91e484d93f0830a7e05a2b9d92a7b102be7cab562198b984a84fdbc7806d91 AS buildenv
FROM --platform=$BUILDPLATFORM debian:trixie@sha256:fac46bff2e02f51425b6e33b0e1169f55dfb053d83511ca28aa50c09fd5ed7a4 AS buildenv
RUN export DEBIAN_FRONTEND=noninteractive && apt-get update && apt-get install -y \
build-essential squashfs-tools python3-yaml \
patch diffutils sed mawk findutils zstd \
Expand Down
2 changes: 1 addition & 1 deletion hack/dev/utils/Dockerfile.copy-direct
Original file line number Diff line number Diff line change
@@ -1 +1 @@
FROM --platform=$BUILDPLATFORM debian:trixie@sha256:2c91e484d93f0830a7e05a2b9d92a7b102be7cab562198b984a84fdbc7806d91
FROM --platform=$BUILDPLATFORM debian:trixie@sha256:fac46bff2e02f51425b6e33b0e1169f55dfb053d83511ca28aa50c09fd5ed7a4
2 changes: 1 addition & 1 deletion hack/dev/utils/Dockerfile.copy-polyfill
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG TARGET_IMAGE=scratch
FROM ${TARGET_IMAGE} AS image
FROM --platform=$BUILDPLATFORM debian:trixie@sha256:2c91e484d93f0830a7e05a2b9d92a7b102be7cab562198b984a84fdbc7806d91 AS final
FROM --platform=$BUILDPLATFORM debian:trixie@sha256:fac46bff2e02f51425b6e33b0e1169f55dfb053d83511ca28aa50c09fd5ed7a4 AS final
COPY --from=image / /image
4 changes: 2 additions & 2 deletions hack/dev/vm/Dockerfile.initramfs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM alpine:3.23@sha256:25109184c71bdad752c8312a8623239686a9a2071e8825f20acb8f2198c3f659 AS rootfs
FROM alpine:3.24@sha256:28bd5fe8b56d1bd048e5babf5b10710ebe0bae67db86916198a6eec434943f8b AS rootfs
RUN apk --no-cache add alpine-base tzdata wireless-regdb ifupdown-ng agetty
RUN rc-update add devfs sysinit && \
rc-update add dmesg sysinit && \
Expand All @@ -21,7 +21,7 @@ RUN rc-update add devfs sysinit && \
ADD kernel.modules.tgz /
COPY files/interfaces /etc/network/interfaces

FROM alpine:3.23@sha256:25109184c71bdad752c8312a8623239686a9a2071e8825f20acb8f2198c3f659 AS build
FROM alpine:3.24@sha256:28bd5fe8b56d1bd048e5babf5b10710ebe0bae67db86916198a6eec434943f8b AS build
COPY --from=rootfs / /rootfs
WORKDIR /rootfs
RUN find . | cpio -R 0:0 --ignore-devno --renumber-inodes -o -H newc --quiet > /initramfs
Expand Down
Loading
Loading