From 85b111aa170acb4a883e048f06b56ccadbb5b7db Mon Sep 17 00:00:00 2001 From: Julian Stecklina Date: Mon, 28 Nov 2022 02:59:21 +0100 Subject: [PATCH] initrd-stub: drop unused stub This is not useful anymore, because we don't need to wrap the initrd anymore. --- flake.nix | 14 +---- rust/initrd-stub/.cargo/config | 2 - rust/initrd-stub/Cargo.lock | 104 --------------------------------- rust/initrd-stub/Cargo.toml | 12 ---- rust/initrd-stub/src/main.rs | 19 ------ 5 files changed, 2 insertions(+), 149 deletions(-) delete mode 100644 rust/initrd-stub/.cargo/config delete mode 100644 rust/initrd-stub/Cargo.lock delete mode 100644 rust/initrd-stub/Cargo.toml delete mode 100644 rust/initrd-stub/src/main.rs diff --git a/flake.nix b/flake.nix index 62a40e1..229af44 100644 --- a/flake.nix +++ b/flake.nix @@ -54,21 +54,12 @@ }); }; - # This is basically an empty EFI application that we use as a - # carrier for the initrd. - initrdStubCrane = buildRustApp { - src = ./rust/initrd-stub; - target = "x86_64-unknown-uefi"; - doCheck = false; - }; - lanzabooteCrane = buildRustApp { src = ./rust/lanzaboote; target = "x86_64-unknown-uefi"; doCheck = false; }; - initrd-stub = initrdStubCrane.package; lanzaboote = lanzabooteCrane.package; lanzatoolCrane = buildRustApp { @@ -87,8 +78,7 @@ makeWrapper ${lanzatool-unwrapped}/bin/lanzatool $out/bin/lanzatool \ --set PATH ${lib.makeBinPath [ pkgs.binutils-unwrapped pkgs.sbsigntool ]} \ --set RUST_BACKTRACE full \ - --set LANZABOOTE_STUB ${lanzaboote}/bin/lanzaboote.efi \ - --set LANZABOOTE_INITRD_STUB ${initrd-stub}/bin/initrd-stub.efi \ + --set LANZABOOTE_STUB ${lanzaboote}/bin/lanzaboote.efi ''; in { overlays.default = final: prev: { @@ -98,7 +88,7 @@ nixosModules.lanzaboote = import ./nix/lanzaboote.nix; packages.x86_64-linux = { - inherit initrd-stub lanzaboote lanzatool; + inherit lanzaboote lanzatool; default = lanzatool; }; diff --git a/rust/initrd-stub/.cargo/config b/rust/initrd-stub/.cargo/config deleted file mode 100644 index 85d49dc..0000000 --- a/rust/initrd-stub/.cargo/config +++ /dev/null @@ -1,2 +0,0 @@ -[build] -target = "x86_64-unknown-uefi" diff --git a/rust/initrd-stub/Cargo.lock b/rust/initrd-stub/Cargo.lock deleted file mode 100644 index 6c72db2..0000000 --- a/rust/initrd-stub/Cargo.lock +++ /dev/null @@ -1,104 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -version = 3 - -[[package]] -name = "bit_field" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcb6dd1c2376d2e096796e234a70e17e94cc2d5d54ff8ce42b28cef1d0d359a4" - -[[package]] -name = "bitflags" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" - -[[package]] -name = "cfg-if" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" - -[[package]] -name = "initrd-stub" -version = "0.1.0" -dependencies = [ - "uefi", -] - -[[package]] -name = "log" -version = "0.4.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "proc-macro2" -version = "1.0.47" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ea3d908b0e36316caf9e9e2c4625cdde190a7e6f440d794667ed17a1855e725" -dependencies = [ - "unicode-ident", -] - -[[package]] -name = "quote" -version = "1.0.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbe448f377a7d6961e30f5955f9b8d106c3f5e449d493ee1b125c1d43c2b5179" -dependencies = [ - "proc-macro2", -] - -[[package]] -name = "syn" -version = "1.0.103" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a864042229133ada95abf3b54fdc62ef5ccabe9515b64717bcb9a1919e59445d" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "ucs2" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bad643914094137d475641b6bab89462505316ec2ce70907ad20102d28a79ab8" -dependencies = [ - "bit_field", -] - -[[package]] -name = "uefi" -version = "0.18.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07b87700863d65dd4841556be3374d8d4f9f8dbb577ad93a39859e70b3b91f35" -dependencies = [ - "bitflags", - "log", - "ucs2", - "uefi-macros", -] - -[[package]] -name = "uefi-macros" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "275f054a1d9fd7e43a2ce91cc24298a87b281117dea8afc120ae95faa0e96b94" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "unicode-ident" -version = "1.0.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ceab39d59e4c9499d4e5a8ee0e2735b891bb7308ac83dfb4e80cad195c9f6f3" diff --git a/rust/initrd-stub/Cargo.toml b/rust/initrd-stub/Cargo.toml deleted file mode 100644 index a324f85..0000000 --- a/rust/initrd-stub/Cargo.toml +++ /dev/null @@ -1,12 +0,0 @@ -[package] -name = "initrd-stub" -version = "0.1.0" -edition = "2021" -publish = false - -[dependencies] -uefi = { version = "0.18.0", default-features = false, features = [ ] } - -[profile.release] -opt-level = "s" -lto = true diff --git a/rust/initrd-stub/src/main.rs b/rust/initrd-stub/src/main.rs deleted file mode 100644 index 27f639d..0000000 --- a/rust/initrd-stub/src/main.rs +++ /dev/null @@ -1,19 +0,0 @@ -#![no_main] -#![no_std] -#![feature(abi_efiapi)] - -use core::panic::PanicInfo; -use uefi::{ - prelude::{entry, Boot, SystemTable}, - Handle, Status, -}; - -#[panic_handler] -fn panic(_info: &PanicInfo) -> ! { - loop {} -} - -#[entry] -fn main(_handle: Handle, mut _system_table: SystemTable) -> Status { - Status::UNSUPPORTED -}