Repository: oreboot/oreboot (language: rust)

Issue:
Could you consider commiting the lockfile to the repo ?
That would make it much easier to package this for linux distributions.
Thank you for all the work that went into this!


Discussion / hints:
Oh, I thought we had it.... dang, thank you for noticing! It explains a few things. :sweat_smile: 
> Oh, I thought we had it.... dang, thank you for noticing! It explains a few things. 😅

Any update? :P 
Hey sorry we haven't yet done this. I'll see with another developer soonish - up until recently, I had been the only one, so the project got stalled somewhat.

To be honest, I'm actually surprised anyone is using oreboot at this point - could you help me understand a bit how? We haven't much discussed distribution matters in the project yet, and I am a bit split between going for a rather opinionated approach vs offering flexibility, mostly because the latter comes with complexity. I hope we can offer what you need.

Fix patch:
diff --git a/.gitignore b/.gitignore
index f07c049273d..c1096d3278c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -27,10 +27,6 @@ target
 **/*.rs.bk
 debug.log
 
-#We only care about Cargo.lock files in src/mainboard
-Cargo.lock
-!src/mainboard/**/Cargo.lock
-
 # Ignore all intellij related files
 *.idea
 
diff --git a/Cargo.lock b/Cargo.lock
new file mode 100644
index 00000000000..fd216c53362
--- /dev/null
+++ b/Cargo.lock
@@ -0,0 +1,993 @@
+# This file is automatically @generated by Cargo.
+# It is not intended for manual editing.
+version = 4
+
+[[package]]
+name = "aho-corasick"
+version = "1.1.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916"
+dependencies = [
+ "memchr",
+]
+
+[[package]]
+name = "anstream"
+version = "0.6.15"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "64e15c1ab1f89faffbf04a634d5e1962e9074f2741eef6d97f3c4e322426d526"
+dependencies = [
+ "anstyle",
+ "anstyle-parse",
+ "anstyle-query",
+ "anstyle-wincon",
+ "colorchoice",
+ "is_terminal_polyfill",
+ "utf8parse",
+]
+
+[[package]]
+name = "anstyle"
+version = "1.0.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1bec1de6f59aedf83baf9ff929c98f2ad654b97c9510f4e70cf6f661d49fd5b1"
+
+[[package]]
+name = "anstyle-parse"
+version = "0.2.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "eb47de1e80c2b463c735db5b217a0ddc39d612e7ac9e2e96a5aed1f57616c1cb"
+dependencies = [
+ "utf8parse",
+]
+
+[[package]]
+name = "anstyle-query"
+version = "1.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6d36fc52c7f6c869915e99412912f22093507da8d9e942ceaf66fe4b7c14422a"
+dependencies = [
+ "windows-sys 0.52.0",
+]
+
+[[package]]
+name = "anstyle-wincon"
+version = "3.0.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5bf74e1b6e971609db8ca7a9ce79fd5768ab6ae46441c572e46cf596f59e57f8"
+dependencies = [
+ "anstyle",
+ "windows-sys 0.52.0",
+]
+
+[[package]]
+name = "atomic-polyfill"
+version = "1.0.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8cf2bce30dfe09ef0bfaef228b9d414faaf7e563035494d7fe092dba54b300f4"
+dependencies = [
+ "critical-section",
+]
+
+[[package]]
+name = "atty"
+version = "0.2.14"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8"
+dependencies = [
+ "hermit-abi",
+ "libc",
+ "winapi",
+]
+
+[[package]]
+name = "autocfg"
+version = "1.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26"
+
+[[package]]
+name = "bare-metal"
+version = "1.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f8fe8f5a8a398345e52358e18ff07cc17a568fbca5c6f73873d3a62056309603"
+
+[[package]]
+name = "bit_field"
+version = "0.10.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "dc827186963e592360843fb5ba4b973e145841266c1357f7180c43526f2e5b61"
+
+[[package]]
+name = "bitflags"
+version = "1.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
+
+[[package]]
+name = "bitflags"
+version = "2.6.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de"
+
+[[package]]
+name = "byteorder"
+version = "1.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b"
+
+[[package]]
+name = "cfg-if"
+version = "1.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
+
+[[package]]
+name = "cfg_aliases"
+version = "0.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724"
+
+[[package]]
+name = "clap"
+version = "4.5.20"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b97f376d85a664d5837dbae44bf546e6477a679ff6610010f17276f686d867e8"
+dependencies = [
+ "clap_builder",
+ "clap_derive",
+]
+
+[[package]]
+name = "clap-verbosity-flag"
+version = "2.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e099138e1807662ff75e2cebe4ae2287add879245574489f9b1588eb5e5564ed"
+dependencies = [
+ "clap",
+ "log 0.4.22",
+]
+
+[[package]]
+name = "clap_builder"
+version = "4.5.20"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "19bc80abd44e4bed93ca373a0704ccbd1b710dc5749406201bb018272808dc54"
+dependencies = [
+ "anstream",
+ "anstyle",
+ "clap_lex",
+ "strsim",
+]
+
+[[package]]
+name = "clap_derive"
+version = "4.5.18"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4ac6a0c7b1a9e9a5186361f67dfa1b88213572f427fb9ab038efb2bd8c582dab"
+dependencies = [
+ "heck",
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "clap_lex"
+version = "0.7.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1462739cb27611015575c0c11df5df7601141071f07518d56fcc1be504cbec97"
+
+[[package]]
+name = "colorchoice"
+version = "1.0.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d3fd119d74b830634cea2a0f58bbd0d54540518a14397557951e79340abc28c0"
+
+[[package]]
+name = "console"
+version = "0.1.0"
+
+[[package]]
+name = "consts"
+version = "0.1.0"
+
+[[package]]
+name = "crc"
+version = "3.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "69e6e4d7b33a94f0991c26729976b10ebde1d34c3ee82408fb536164fa10d636"
+dependencies = [
+ "crc-catalog",
+]
+
+[[package]]
+name = "crc-catalog"
+version = "2.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "19d374276b40fb8bbdee95aef7c7fa6b5316ec764510eb64b8dd0e2ed0d7e7f5"
+
+[[package]]
+name = "critical-section"
+version = "1.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "790eea4361631c5e7d22598ecd5723ff611904e3344ce8720784c93e3d83d40b"
+
+[[package]]
+name = "ctrlc"
+version = "3.4.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "90eeab0aa92f3f9b4e87f258c72b139c207d251f9cbc1080a0086b86a8870dd3"
+dependencies = [
+ "nix",
+ "windows-sys 0.59.0",
+]
+
+[[package]]
+name = "d1-pac"
+version = "0.0.31"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e03be09af0d1db27a816e681f260bb4be2412153a6ef0afbf94d974414630ceb"
+dependencies = [
+ "bare-metal",
+ "critical-section",
+ "riscv",
+ "vcell",
+]
+
+[[package]]
+name = "embedded-hal"
+version = "0.2.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "35949884794ad573cf46071e41c9b60efb0cb311e3ca01f7af807af1debc66ff"
+dependencies = [
+ "nb 0.1.3",
+ "void",
+]
+
+[[package]]
+name = "embedded-hal"
+version = "1.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "361a90feb7004eca4019fb28352a9465666b24f840f5c3cddf0ff13920590b89"
+
+[[package]]
+name = "embedded-hal-nb"
+version = "1.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fba4268c14288c828995299e59b12babdbe170f6c6d73731af1b4648142e8605"
+dependencies = [
+ "embedded-hal 1.0.0",
+ "nb 1.1.0",
+]
+
+[[package]]
+name = "embedded-io"
+version = "0.6.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "edd0f118536f44f5ccd48bcb8b111bdc3de888b58c74639dfb034a357d0f206d"
+
+[[package]]
+name = "embedded-sdmmc"
+version = "0.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2f4d14180a76a8af24a45a0e1a4f9c97491b05a3b962d59d5e4ce0e6ab103736"
+dependencies = [
+ "byteorder",
+ "embedded-hal 0.2.7",
+ "log 0.4.22",
+]
+
+[[package]]
+name = "emulation-qemu-riscv-main"
+version = "0.1.0"
+dependencies = [
+ "ns16550a",
+]
+
+[[package]]
+name = "env_logger"
+version = "0.9.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a12e6657c4c97ebab115a42dcee77225f7f482cdd841cf7088c657a42e9e00e7"
+dependencies = [
+ "atty",
+ "humantime",
+ "log 0.4.22",
+ "regex",
+ "termcolor",
+]
+
+[[package]]
+name = "fdt"
+version = "0.1.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "784a4df722dc6267a04af36895398f59d21d07dce47232adf31ec0ff2fa45e67"
+
+[[package]]
+name = "hash32"
+version = "0.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b0c35f58762feb77d74ebe43bdbc3210f09be9fe6742234d573bacc26ed92b67"
+dependencies = [
+ "byteorder",
+]
+
+[[package]]
+name = "heapless"
+version = "0.7.17"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cdc6457c0eb62c71aac4bc17216026d8410337c4126773b9c5daba343f17964f"
+dependencies = [
+ "atomic-polyfill",
+ "hash32",
+ "rustc_version",
+ "spin",
+ "stable_deref_trait",
+]
+
+[[package]]
+name = "heck"
+version = "0.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
+
+[[package]]
+name = "hermit-abi"
+version = "0.1.19"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33"
+dependencies = [
+ "libc",
+]
+
+[[package]]
+name = "humantime"
+version = "2.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4"
+
+[[package]]
+name = "is_terminal_polyfill"
+version = "1.70.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf"
+
+[[package]]
+name = "jh71xx-hal"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1dacf8c6ce98998eb97cb2d40c6c69979a58817e25126fdde8cc53e51414fbe0"
+dependencies = [
+ "bitflags 2.6.0",
+ "critical-section",
+ "embedded-hal 1.0.0",
+ "embedded-hal-nb",
+ "embedded-io",
+ "heapless",
+ "jh71xx-pac",
+ "nb 1.1.0",
+ "riscv",
+ "riscv-rt",
+]
+
+[[package]]
+name = "jh71xx-pac"
+version = "0.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "38a471fbd5d226c6a262f5548a7ef597e2160fa860c113bf070005b83679d74c"
+dependencies = [
+ "critical-section",
+ "riscv",
+ "riscv-rt",
+ "vcell",
+]
+
+[[package]]
+name = "layoutflash"
+version = "0.1.0"
+dependencies = [
+ "fdt",
+]
+
+[[package]]
+name = "lazy_static"
+version = "1.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe"
+dependencies = [
+ "spin",
+]
+
+[[package]]
+name = "libc"
+version = "0.2.161"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8e9489c2807c139ffd9c1794f4af0ebe86a828db53ecdc7fea2111d0fed085d1"
+
+[[package]]
+name = "lock_api"
+version = "0.4.12"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17"
+dependencies = [
+ "autocfg",
+ "scopeguard",
+]
+
+[[package]]
+name = "log"
+version = "0.1.0"
+dependencies = [
+ "embedded-hal 1.0.0",
+ "embedded-hal-nb",
+ "nb 1.1.0",
+ "spin",
+]
+
+[[package]]
+name = "log"
+version = "0.4.22"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24"
+
+[[package]]
+name = "lzss"
+version = "0.9.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ffcbd9e87fc27b574d4e37d4bf0d302828391f80ea3762dfce02d808fa257a01"
+dependencies = [
+ "void",
+]
+
+[[package]]
+name = "memchr"
+version = "2.7.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3"
+
+[[package]]
+name = "nb"
+version = "0.1.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "801d31da0513b6ec5214e9bf433a77966320625a37860f910be265be6e18d06f"
+dependencies = [
+ "nb 1.1.0",
+]
+
+[[package]]
+name = "nb"
+version = "1.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8d5439c4ad607c3c23abf66de8c8bf57ba8adcd1f129e699851a6e43935d339d"
+
+[[package]]
+name = "nix"
+version = "0.29.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "71e2746dc3a24dd78b3cfcb7be93368c6de9963d30f43a6a73998a9cf4b17b46"
+dependencies = [
+ "bitflags 2.6.0",
+ "cfg-if",
+ "cfg_aliases",
+ "libc",
+]
+
+[[package]]
+name = "ns16550a"
+version = "0.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c95cfa77c5f85e4f876790f6f127a0b7599ec92723600b17da4c5c05845bd2ce"
+
+[[package]]
+name = "oreboot-arch"
+version = "0.1.0"
+dependencies = [
+ "log 0.1.0",
+ "riscv",
+ "rustsbi",
+ "sbi-spec 0.0.4",
+]
+
+[[package]]
+name = "oreboot-cpu"
+version = "0.1.0"
+dependencies = [
+ "oreboot-arch",
+ "raw-cpuid",
+]
+
+[[package]]
+name = "oreboot-nezha-bt0"
+version = "0.1.0"
+dependencies = [
+ "embedded-hal 1.0.0",
+ "embedded-hal-nb",
+ "log 0.1.0",
+ "nb 1.1.0",
+ "oreboot-soc",
+ "riscv",
+ "spin",
+]
+
+[[package]]
+name = "oreboot-nezha-main"
+version = "0.1.0"
+dependencies = [
+ "bitflags 1.3.2",
+ "embedded-hal 1.0.0",
+ "embedded-hal-nb",
+ "lazy_static",
+ "log 0.1.0",
+ "nb 1.1.0",
+ "oreboot-arch",
+ "oreboot-soc",
+ "oreboot_compression",
+ "riscv",
+ "rustsbi",
+ "sbi-spec 0.0.4",
+ "spin",
+ "vcell",
+]
+
+[[package]]
+name = "oreboot-soc"
+version = "0.1.0"
+dependencies = [
+ "consts",
+ "d1-pac",
+ "embedded-hal 1.0.0",
+ "embedded-hal-nb",
+ "embedded-sdmmc",
+ "heapless",
+ "jh71xx-hal",
+ "log 0.1.0",
+ "nb 1.1.0",
+ "oreboot-arch",
+ "oreboot-cpu",
+ "raw-cpuid",
+ "tock-registers",
+ "util",
+ "vcell",
+]
+
+[[package]]
+name = "oreboot_compression"
+version = "0.1.0"
+dependencies = [
+ "log 0.1.0",
+ "lzss",
+]
+
+[[package]]
+name = "pathdiff"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d61c5ce1153ab5b689d0c074c4e7fc613e942dfb7dd9eea5ab202d2ad91fe361"
+
+[[package]]
+name = "proc-macro2"
+version = "1.0.89"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f139b0662de085916d1fb67d2b4169d1addddda1919e696f3252b740b629986e"
+dependencies = [
+ "unicode-ident",
+]
+
+[[package]]
+name = "ptdump"
+version = "0.1.0"
+dependencies = [
+ "bit_field",
+ "bitflags 2.6.0",
+]
+
+[[package]]
+name = "quote"
+version = "1.0.37"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af"
+dependencies = [
+ "proc-macro2",
+]
+
+[[package]]
+name = "r0"
+version = "1.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bd7a31eed1591dcbc95d92ad7161908e72f4677f8fabf2a32ca49b4237cbf211"
+
+[[package]]
+name = "raw-cpuid"
+version = "10.7.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6c297679cb867470fa8c9f67dbba74a78d78e3e98d7cf2b08d6d71540f797332"
+dependencies = [
+ "bitflags 1.3.2",
+]
+
+[[package]]
+name = "regex"
+version = "1.11.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "38200e5ee88914975b69f657f0801b6f6dccafd44fd9326302a4aaeecfacb1d8"
+dependencies = [
+ "aho-corasick",
+ "memchr",
+ "regex-automata",
+ "regex-syntax",
+]
+
+[[package]]
+name = "regex-automata"
+version = "0.4.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "368758f23274712b504848e9d5a6f010445cc8b87a7cdb4d7cbee666c1288da3"
+dependencies = [
+ "aho-corasick",
+ "memchr",
+ "regex-syntax",
+]
+
+[[package]]
+name = "regex-syntax"
+version = "0.8.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c"
+
+[[package]]
+name = "riscv"
+version = "0.10.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "aa3145d2fae3778b1e31ec2e827b228bdc6abd9b74bb5705ba46dcb82069bc4f"
+dependencies = [
+ "bit_field",
+ "critical-section",
+ "embedded-hal 0.2.7",
+]
+
+[[package]]
+name = "riscv-rt"
+version = "0.11.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "102c52c89defde24dedf9ac077cc69df77b85aa2400dd2d5aad6eea6a6a5c089"
+dependencies = [
+ "r0",
+ "riscv",
+ "riscv-rt-macros",
+ "riscv-target",
+]
+
+[[package]]
+name = "riscv-rt-macros"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "30f19a85fe107b65031e0ba8ec60c34c2494069fe910d6c297f5e7cb5a6f76d0"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "riscv-target"
+version = "0.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "88aa938cda42a0cf62a20cfe8d139ff1af20c2e681212b5b34adb5a58333f222"
+dependencies = [
+ "lazy_static",
+ "regex",
+]
+
+[[package]]
+name = "rustc_version"
+version = "0.4.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92"
+dependencies = [
+ "semver",
+]
+
+[[package]]
+name = "rustsbi"
+version = "0.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8c74c6df5cecd1ddc81f953d100cee1111acd981535526d3e89d2854015cf93b"
+dependencies = [
+ "riscv",
+ "sbi-spec 0.0.5",
+]
+
+[[package]]
+name = "sbi-spec"
+version = "0.0.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6d4027cf9bb591a9fd0fc0e283be6165c5abe96cb73e9f0e24738c227f425377"
+dependencies = [
+ "static_assertions",
+]
+
+[[package]]
+name = "sbi-spec"
+version = "0.0.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a535b1f16d5517a020539569f7e37e61fad35ed0d5352f9fd7073304e2f2dc72"
+dependencies = [
+ "static_assertions",
+]
+
+[[package]]
+name = "scopeguard"
+version = "1.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49"
+
+[[package]]
+name = "semver"
+version = "1.0.23"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b"
+
+[[package]]
+name = "spin"
+version = "0.9.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67"
+dependencies = [
+ "lock_api",
+]
+
+[[package]]
+name = "stable_deref_trait"
+version = "1.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3"
+
+[[package]]
+name = "starfive-visionfive1-bt0"
+version = "0.1.0"
+dependencies = [
+ "embedded-hal 1.0.0",
+ "embedded-hal-nb",
+ "log 0.1.0",
+ "nb 1.1.0",
+ "riscv",
+ "spin",
+]
+
+[[package]]
+name = "starfive-visionfive1-main"
+version = "0.1.0"
+dependencies = [
+ "embedded-hal 1.0.0",
+ "embedded-hal-nb",
+ "nb 1.1.0",
+ "riscv",
+ "spin",
+]
+
+[[package]]
+name = "starfive-visionfive2-bt0"
+version = "0.1.0"
+dependencies = [
+ "embedded-hal 1.0.0",
+ "embedded-hal-nb",
+ "fdt",
+ "jh71xx-hal",
+ "jh71xx-pac",
+ "layoutflash",
+ "log 0.1.0",
+ "nb 1.1.0",
+ "oreboot-soc",
+ "riscv",
+ "spin",
+]
+
+[[package]]
+name = "starfive-visionfive2-main"
+version = "0.1.0"
+dependencies = [
+ "embedded-hal 1.0.0",
+ "embedded-hal-nb",
+ "nb 1.1.0",
+ "oreboot-soc",
+ "riscv",
+ "spin",
+]
+
+[[package]]
+name = "static_assertions"
+version = "1.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f"
+
+[[package]]
+name = "strsim"
+version = "0.11.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f"
+
+[[package]]
+name = "syn"
+version = "2.0.82"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "83540f837a8afc019423a8edb95b52a8effe46957ee402287f4292fae35be021"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "unicode-ident",
+]
+
+[[package]]
+name = "termcolor"
+version = "1.4.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755"
+dependencies = [
+ "winapi-util",
+]
+
+[[package]]
+name = "tock-registers"
+version = "0.8.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "696941a0aee7e276a165a978b37918fd5d22c55c3d6bda197813070ca9c0f21c"
+
+[[package]]
+name = "unicode-ident"
+version = "1.0.13"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe"
+
+[[package]]
+name = "utf8parse"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821"
+
+[[package]]
+name = "util"
+version = "0.1.0"
+
+[[package]]
+name = "vcell"
+version = "0.1.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "77439c1b53d2303b20d9459b1ade71a83c716e3f9c34f3228c00e6f185d6c002"
+
+[[package]]
+name = "void"
+version = "1.0.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d"
+
+[[package]]
+name = "winapi"
+version = "0.3.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419"
+dependencies = [
+ "winapi-i686-pc-windows-gnu",
+ "winapi-x86_64-pc-windows-gnu",
+]
+
+[[package]]
+name = "winapi-i686-pc-windows-gnu"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
+
+[[package]]
+name = "winapi-util"
+version = "0.1.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb"
+dependencies = [
+ "windows-sys 0.59.0",
+]
+
+[[package]]
+name = "winapi-x86_64-pc-windows-gnu"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
+
+[[package]]
+name = "windows-sys"
+version = "0.52.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d"
+dependencies = [
+ "windows-targets",
+]
+
+[[package]]
+name = "windows-sys"
+version = "0.59.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b"
+dependencies = [
+ "windows-targets",
+]
+
+[[package]]
+name = "windows-targets"
+version = "0.52.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973"
+dependencies = [
+ "windows_aarch64_gnullvm",
+ "windows_aarch64_msvc",
+ "windows_i686_gnu",
+ "windows_i686_gnullvm",
+ "windows_i686_msvc",
+ "windows_x86_64_gnu",
+ "windows_x86_64_gnullvm",
+ "windows_x86_64_msvc",
+]
+
+[[package]]
+name = "windows_aarch64_gnullvm"
+version = "0.52.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3"
+
+[[package]]
+name = "windows_aarch64_msvc"
+version = "0.52.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469"
+
+[[package]]
+name = "windows_i686_gnu"
+version = "0.52.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b"
+
+[[package]]
+name = "windows_i686_gnullvm"
+version = "0.52.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66"
+
+[[package]]
+name = "windows_i686_msvc"
+version = "0.52.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66"
+
+[[package]]
+name = "windows_x86_64_gnu"
+version = "0.52.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78"
+
+[[package]]
+name = "windows_x86_64_gnullvm"
+version = "0.52.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d"
+
+[[package]]
+name = "windows_x86_64_msvc"
+version = "0.52.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"
+
+[[package]]
+name = "xtask"
+version = "0.1.0"
+dependencies = [
+ "byteorder",
+ "clap",
+ "clap-verbosity-flag",
+ "crc",
+ "ctrlc",
+ "env_logger",
+ "fdt",
+ "layoutflash",
+ "log 0.4.22",
+ "lzss",
+ "oreboot_compression",
+ "pathdiff",
+]
diff --git a/rust-toolchain.toml b/rust-toolchain.toml
index b020f0688fa..513557ebb5d 100644
--- a/rust-toolchain.toml
+++ b/rust-toolchain.toml
@@ -1,5 +1,5 @@
 [toolchain]
-channel = "nightly-2024-01-10"
+channel = "nightly-2024-10-15"
 components = ["rust-src", "llvm-tools", "rustfmt", "clippy"]
 targets = [
   "riscv32imac-unknown-none-elf",
diff --git a/src/arch/src/riscv64/sbi/runtime.rs b/src/arch/src/riscv64/sbi/runtime.rs
index 7c904f1cdf0..90e63626ee5 100644
--- a/src/arch/src/riscv64/sbi/runtime.rs
+++ b/src/arch/src/riscv64/sbi/runtime.rs
@@ -1,5 +1,5 @@
 use core::{
-    arch::asm,
+    arch::naked_asm,
     ops::{Coroutine, CoroutineState},
     pin::Pin,
 };
@@ -188,10 +188,9 @@ pub struct SupervisorContext {
 #[naked]
 #[link_section = ".text"]
 unsafe extern "C" fn do_resume(_supervisor_context: *mut SupervisorContext) {
-    asm!(
+    naked_asm!(
         "j     {machine_save}",
         machine_save = sym machine_save,
-        options(noreturn),
     )
 }
 
@@ -204,7 +203,7 @@ unsafe extern "C" fn do_resume(_supervisor_context: *mut SupervisorContext) {
 #[naked]
 #[link_section = ".text"]
 unsafe extern "C" fn machine_save(_supervisor_context: *mut SupervisorContext) -> ! {
-    asm!(
+    naked_asm!(
         // Top of the stack
         "addi   sp, sp, -15*8",
         "sd     ra,  0*8(sp)
@@ -224,7 +223,6 @@ unsafe extern "C" fn machine_save(_supervisor_context: *mut SupervisorContext) -
          sd    s11, 14*8(sp)",
         "j     {supervisor_restore}",
         supervisor_restore = sym supervisor_restore,
-        options(noreturn)
     )
 }
 
@@ -236,7 +234,7 @@ unsafe extern "C" fn machine_save(_supervisor_context: *mut SupervisorContext) -
 #[naked]
 #[link_section = ".text"]
 pub unsafe extern "C" fn supervisor_restore(_supervisor_context: *mut SupervisorContext) -> ! {
-    asm!(
+    naked_asm!(
         // Save top of stack
         "sd     sp,  33*8(a0)",
         // Save a0, the supervisor context, in mscratch for later
@@ -281,7 +279,6 @@ pub unsafe extern "C" fn supervisor_restore(_supervisor_context: *mut Supervisor
         "ld     sp,  1*8(sp)",
         // Return to S-mode
         "mret",
-        options(noreturn)
     )
 }
 
@@ -296,7 +293,7 @@ pub unsafe extern "C" fn supervisor_restore(_supervisor_context: *mut Supervisor
 #[repr(align(4))]
 #[link_section = ".text"]
 pub unsafe extern "C" fn supervisor_save() -> ! {
-    asm!(
+    naked_asm!(
         // Swap this sp (stack pointer) with mscratch (M-mode scratch register).
         ".p2align 2",
         "csrrw  sp, mscratch, sp",
@@ -340,7 +337,6 @@ pub unsafe extern "C" fn supervisor_save() -> ! {
         "sd     t2,  1*8(sp)",
         "j      {machine_restore}",
         machine_restore = sym machine_restore,
-        options(noreturn)
     )
 }
 /// # Safety
@@ -350,7 +346,7 @@ pub unsafe extern "C" fn supervisor_save() -> ! {
 #[naked]
 #[link_section = ".text"]
 unsafe extern "C" fn machine_restore() -> ! {
-    asm!(
+    naked_asm!(
         // Restore M-mode / SBI runtime sp from mscratch.
         "csrr   sp, mscratch",
         "ld     sp, 33*8(sp)",
@@ -373,6 +369,5 @@ unsafe extern "C" fn machine_restore() -> ! {
         "addi   sp, sp, 15*8",
         // Return back to M-mode runtime.
         "jr     ra",
-        options(noreturn)
     )
 }
diff --git a/src/lib/consts/src/lib.rs b/src/lib/consts/src/lib.rs
index 01029f28e1f..492269223a8 100644
--- a/src/lib/consts/src/lib.rs
+++ b/src/lib/consts/src/lib.rs
@@ -1,7 +1,7 @@
 /* SPDX-License-Identifier: GPL-2.0-only */
 #![no_std]
-#[allow(non_upper_case_globals)]
 
+#[allow(non_upper_case_globals)]
 pub mod units {
     pub const KiB: usize = 1 << 10;
     pub const MiB: usize = 1 << 20;
diff --git a/src/mainboard/starfive/visionfive1/bt0/src/main.rs b/src/mainboard/starfive/visionfive1/bt0/src/main.rs
index b0cea2613ce..66c8e2467df 100644
--- a/src/mainboard/starfive/visionfive1/bt0/src/main.rs
+++ b/src/mainboard/starfive/visionfive1/bt0/src/main.rs
@@ -1,4 +1,4 @@
-#![feature(naked_functions, asm_sym, asm_const)]
+#![feature(naked_functions, asm_const)]
 #![no_std]
 #![no_main]
 // TODO: remove when done debugging crap
@@ -8,7 +8,7 @@
 extern crate log;
 
 use core::{
-    arch::asm,
+    arch::{asm, naked_asm},
     intrinsics::transmute,
     panic::PanicInfo,
     ptr::{self, read_volatile, write_volatile},
@@ -68,7 +68,7 @@ static mut BT0_STACK: [u8; STACK_SIZE] = [0; STACK_SIZE];
 #[link_section = ".text.entry"]
 #[allow(named_asm_labels)]
 pub unsafe extern "C" fn start() -> ! {
-    asm!(
+    naked_asm!(
         // clear feature disable CSR
         "csrwi  0x7c1, 0",
         "csrw   mtvec, t0",
@@ -94,7 +94,6 @@ pub unsafe extern "C" fn start() -> ! {
         stack_size = const STACK_SIZE,
         payload    =   sym exec_payload,
         reset      =   sym reset,
-        options(noreturn)
     )
 }
 
diff --git a/src/mainboard/starfive/visionfive1/main/src/main.rs b/src/mainboard/starfive/visionfive1/main/src/main.rs
index 2f3687cabbb..8726e9fcd7c 100644
--- a/src/mainboard/starfive/visionfive1/main/src/main.rs
+++ b/src/mainboard/starfive/visionfive1/main/src/main.rs
@@ -1,12 +1,8 @@
-#![feature(naked_functions, asm_sym, asm_const)]
+#![feature(naked_functions, asm_const)]
 #![no_std]
 #![no_main]
 
-use core::{
-    arch::{asm, global_asm},
-    panic::PanicInfo,
-    ptr::slice_from_raw_parts,
-};
+use core::{arch::naked_asm, panic::PanicInfo, ptr::slice_from_raw_parts};
 use embedded_hal_nb::serial::Write;
 use riscv;
 
@@ -24,7 +20,7 @@ static mut BT0_STACK: [u8; STACK_SIZE] = [0; STACK_SIZE];
 #[export_name = "_start"]
 #[link_section = ".text.entry"]
 pub unsafe extern "C" fn start() -> ! {
-    asm!(
+    naked_asm!(
         "0:",
         "li t4, 0x43",
         "li t5, 0x12440000",
@@ -54,7 +50,6 @@ pub unsafe extern "C" fn start() -> ! {
         stack      =   sym BT0_STACK,
         stack_size = const STACK_SIZE,
         main       =   sym main,
-        options(noreturn)
     )
 }
 
diff --git a/src/mainboard/starfive/visionfive2/bt0/src/main.rs b/src/mainboard/starfive/visionfive2/bt0/src/main.rs
index 41145ea8ea4..818e250e0eb 100644
--- a/src/mainboard/starfive/visionfive2/bt0/src/main.rs
+++ b/src/mainboard/starfive/visionfive2/bt0/src/main.rs
@@ -12,7 +12,7 @@ extern crate jh71xx_hal as hal;
 use layoutflash::areas::{find_fdt, FdtIterator};
 
 use core::{
-    arch::asm,
+    arch::{asm, naked_asm},
     intrinsics::transmute,
     panic::PanicInfo,
     ptr::{self, addr_of, addr_of_mut},
@@ -64,7 +64,7 @@ static mut BT0_STACK: [u8; STACK_SIZE] = [0; STACK_SIZE];
 #[link_section = ".text.entry"]
 #[allow(named_asm_labels)]
 pub unsafe extern "C" fn start() -> ! {
-    asm!(
+    naked_asm!(
         // Clear feature disable CSR to '0' to turn on all features
         // TODO: do in Rust
         "csrwi  0x7c1, 0",
@@ -94,7 +94,6 @@ pub unsafe extern "C" fn start() -> ! {
         stack_size = const STACK_SIZE,
         payload    =   sym exec_payload,
         reset      =   sym reset,
-        options(noreturn)
     )
 }
 
diff --git a/src/mainboard/starfive/visionfive2/main/src/main.rs b/src/mainboard/starfive/visionfive2/main/src/main.rs
index 5e1089a2397..68fe15497db 100644
--- a/src/mainboard/starfive/visionfive2/main/src/main.rs
+++ b/src/mainboard/starfive/visionfive2/main/src/main.rs
@@ -3,7 +3,7 @@
 #![no_main]
 
 use core::{
-    arch::{asm, global_asm},
+    arch::{global_asm, naked_asm},
     panic::PanicInfo,
 };
 use embedded_hal_nb::serial::Write;
@@ -23,7 +23,7 @@ static mut BT0_STACK: [u8; STACK_SIZE] = [0; STACK_SIZE];
 #[export_name = "_start"]
 #[link_section = ".text.entry"]
 pub unsafe extern "C" fn start() -> ! {
-    asm!(
+    naked_asm!(
         "0:",
         "li t4, 0x43",
         "li t5, 0x10000000",
@@ -53,7 +53,6 @@ pub unsafe extern "C" fn start() -> ! {
         stack      =   sym BT0_STACK,
         stack_size = const STACK_SIZE,
         main       =   sym main,
-        options(noreturn)
     )
 }
 
diff --git a/src/mainboard/sunxi/nezha/bt0/src/main.rs b/src/mainboard/sunxi/nezha/bt0/src/main.rs
index 3ccecfb2643..f1068a32fb6 100644
--- a/src/mainboard/sunxi/nezha/bt0/src/main.rs
+++ b/src/mainboard/sunxi/nezha/bt0/src/main.rs
@@ -3,9 +3,10 @@
 #![no_std]
 #![no_main]
 
+use core::arch::{asm, naked_asm};
 use core::intrinsics::transmute;
+use core::panic::PanicInfo;
 use core::ptr::{read_volatile, write_volatile};
-use core::{arch::asm, panic::PanicInfo};
 use embedded_hal::digital::OutputPin;
 use oreboot_soc::sunxi::d1::pac::ccu::{dma_bgr, DMA_BGR};
 use oreboot_soc::sunxi::d1::{
@@ -221,7 +222,7 @@ This bit will be reset to 1’b0.
 #[naked]
 #[no_mangle]
 pub unsafe extern "C" fn start() -> ! {
-    asm!(
+    naked_asm!(
         // 1. clear cache and processor states
         "csrw   mie, zero",
         // enable theadisaee and maee
@@ -251,7 +252,6 @@ pub unsafe extern "C" fn start() -> ! {
         stack_size = const STACK_SIZE,
         egon_head  =   sym EGON_HEAD,
         main       =   sym main,
-        options(noreturn)
     )
 }
 
@@ -367,7 +367,7 @@ const RST_BIT: u32 = 1 << 16;
 fn udelay(micros: usize) {
     unsafe {
         for _ in 0..micros {
-            core::arch::asm!("nop")
+            asm!("nop")
         }
     }
 }
diff --git a/src/mainboard/sunxi/nezha/main/src/main.rs b/src/mainboard/sunxi/nezha/main/src/main.rs
index 413031d734b..8ee055de35a 100644
--- a/src/mainboard/sunxi/nezha/main/src/main.rs
+++ b/src/mainboard/sunxi/nezha/main/src/main.rs
@@ -4,8 +4,9 @@
 #![feature(asm_const)]
 #![feature(panic_info_message)]
 
+use core::arch::{asm, naked_asm};
 use core::panic::PanicInfo;
-use core::{arch::asm, ptr::read_volatile};
+use core::ptr::read_volatile;
 use embedded_hal::digital::OutputPin;
 use log::{print, println};
 use oreboot_compression::decompress;
@@ -189,7 +190,7 @@ fn decompress_lb() {
 #[export_name = "_start"]
 #[link_section = ".text.entry"]
 unsafe extern "C" fn start() -> ! {
-    asm!(
+    naked_asm!(
         // MCOR: disable caches
         "li     t1, 0x22",
         "csrw   0x7c2, t1",
@@ -218,7 +219,6 @@ unsafe extern "C" fn start() -> ! {
         stack_size = const STACK_SIZE,
         main       =   sym main,
         finish     =   sym finish,
-        options(noreturn)
     )
 }
 


Test patch: