diff --git a/RELEASE-v0.9.md b/RELEASE-v0.9.md index 6d7af178f..ab3a06449 100644 --- a/RELEASE-v0.9.md +++ b/RELEASE-v0.9.md @@ -522,6 +522,7 @@ perform the Xous firmware upgrade. This requires running manual update commands, - `activate_process_thread` now takes a `lazy_arg` which is evaluated after the thread is activated. When `lazy_arg` is set, it can save a context switch, as it allows pre-switch context setup to be deferred until the final context switch to activate the target process. - Vexii SoC target support. This is primarily for testing the Vexii core for future implementations. - Baremetal targets. As the name implies, these are baremetal targets, free of Xous OS. The primary purpose of baremetal targets are to streamline low-level driver development. However, they can also be useful as templates for very small embedded projects that don't require all the features of Xous. +- Release notes moved to Discord: https://discord.gg/eTwa7mdC8Z, see #the-commit-log. ## Roadmap - Lots of testing and bug fixes diff --git a/bao1x-boot/boot1/src/main.rs b/bao1x-boot/boot1/src/main.rs index 563f9fa9a..a1486c995 100644 --- a/bao1x-boot/boot1/src/main.rs +++ b/bao1x-boot/boot1/src/main.rs @@ -33,7 +33,8 @@ use crate::secboot::try_boot; // Notes: // - "Towards" - not a release yet, but working towards the stated milestone // - Eliminating "Towards" is done at the tag-out point. -const RELEASE_DESCRIPTION: &'static str = "Beta-0"; +// - The "base" name is the name of the signing key used in the release. +const RELEASE_DESCRIPTION: &'static str = "bao2-0"; static UART_RX: Mutex>> = Mutex::new(RefCell::new(VecDeque::new())); #[allow(dead_code)] diff --git a/libs/tls/src/lib.rs b/libs/tls/src/lib.rs index 357aa3708..b7c3c26d2 100644 --- a/libs/tls/src/lib.rs +++ b/libs/tls/src/lib.rs @@ -301,7 +301,7 @@ impl Tls { /// /// * A Vec containing the TLS chain of trust offered by the host /// * Error if the communication with the host fails - pub fn probe(&self, host: &str) -> Result, Error> { + pub fn probe(&self, host: &str) -> Result>, Error> { log::info!("starting TLS probe"); match host.to_owned().try_into() { Ok(server_name) => { diff --git a/publish.py b/publish.py index 8dde03dcf..109ce585b 100644 --- a/publish.py +++ b/publish.py @@ -4,6 +4,12 @@ from pathlib import Path import re import subprocess import time +from enum import Enum + +class SemverBump(Enum): + REVISION = 'rev' + MINOR = 'minor' + MAJOR = 'major' # format is [crate : path] # this is an ordered list that also prescribes the publication order to crates.io @@ -74,7 +80,7 @@ class PatchInfo: self.file.write(line) # assumes that VERSIONS has been initialized. - def increment_versions(self, mode='bump'): + def increment_versions(self, mode='bump', which=SemverBump.REVISION): # check that global variables are in sane states assert len(VERSIONS) > 0 # "No VERSIONS found, something is weird." with open(self.filepath, 'r') as file: @@ -100,7 +106,7 @@ class PatchInfo: # increment my own version, if I'm in the listed crates and we're in 'bump' mode if (self.cratename is not None) and (mode == 'bump'): if line.strip().startswith('version'): - self.output('version = "{}"\n'.format(bump_version(VERSIONS[self.cratename]))) + self.output('version = "{}"\n'.format(bump_version(VERSIONS[self.cratename], which))) else: self.output(line) else: @@ -134,7 +140,7 @@ class PatchInfo: if depcrate in VERSIONS: if mode == 'bump': oldver = VERSIONS[depcrate] - (newline, numsubs) = re.subn(oldver, bump_version(oldver), line) + (newline, numsubs) = re.subn(oldver, bump_version(oldver, which), line) if numsubs != 1 and not "\"*\"" in newline: print("Warning! Version substitution failed for {}:{} in crate {} ({})".format(depcrate, oldver, this_crate, numsubs)) @@ -196,9 +202,21 @@ class PatchInfo: if self.debug: self.file.write(line) -def bump_version(semver): +def bump_version(semver, which: SemverBump): components = semver.split('.') - components[-1] = str(int(components[-1]) + 1) + if which == SemverBump.REVISION: + index = -1 + elif which == SemverBump.MINOR: + index = -2 + components[-1] = "0" + elif which == SemverBump.MAJOR: + index = -3 + components[-1] = "0" + components[-2] = "0" + else: + print("Invalid version bump request") + exit(-1) + components[index] = str(int(components[index]) + 1) retver = "" for (index, component) in enumerate(components): retver += str(component) @@ -215,7 +233,13 @@ def main(): "-u", "--utralib", help="Process UTRA dependent crates", action="store_true", ) parser.add_argument( - "-b", "--bump", help="Do a version bump", action="store_true", + "-b", "--bump", help="Do a revision version bump", action="store_true", + ) + parser.add_argument( + "-m", "--minor-bump", help="Do a minor revision bump", action="store_true", + ) + parser.add_argument( + "-M", "--major-bump", help="Do a major revision bump", action="store_true", ) parser.add_argument( "-p", "--publish", help="Publish crates", action="store_true", @@ -231,6 +255,26 @@ def main(): ) args = parser.parse_args() + bump_check = 0 + if args.bump: + bump_check += 1 + if args.minor_bump: + bump_check += 1 + if args.major_bump: + bump_check += 1 + if bump_check > 1: + print("Only one of --bump, --minor_bump, or --major-bump may be active at one time") + exit(1) + + if args.bump: + which = SemverBump.REVISION + elif args.minor_bump: + which = SemverBump.MINOR + elif args.major_bump: + which = SemverBump.MAJOR + else: + which = None + if not(args.xous or args.utralib): print("Warning: no dependencies selected, operation is a no-op. Use -x/-u/... to select dependency trees") exit(1) @@ -243,7 +287,7 @@ def main(): if args.xous: cratelist += CRATES - if (args.bump or args.publish) and (args.local_paths or args.remote_paths): + if ((args.bump or args.minor_bump or args.major_bump) or args.publish) and (args.local_paths or args.remote_paths): print("Do not mix path changes with bump and publish operations. Do them serially.") exit(1) if args.local_paths and args.remote_paths: @@ -252,7 +296,7 @@ def main(): crate_roots = ['.', '../hashes/sha2', '../curve25519-dalek/curve25519-dalek'] - if args.bump or args.local_paths or args.remote_paths: + if args.bump or args.minor_bump or args.major_bump or args.local_paths or args.remote_paths: cargo_toml_paths = [] for roots in crate_roots: for path in Path(roots).rglob('Cargo.toml'): @@ -275,7 +319,7 @@ def main(): patches = [] # extract the versions of crates to patch for [crate, path] in cratelist: - #print("extracting {}".format(path)) + # print("extracting {}".format(path)) patchinfo = PatchInfo(path + '/Cargo.toml', cratelist, crate) if not patchinfo.get_version(): print("Couldn't extract version info from {} crate".format(crate)) @@ -288,15 +332,15 @@ def main(): patchinfo = PatchInfo(path, cratelist) patches += [patchinfo] - if args.bump: + if args.bump or args.minor_bump or args.major_bump: for (name, ver) in VERSIONS.items(): - print("{}: {} -> {}".format(name, ver, bump_version(ver))) + print("{}: {} -> {}".format(name, ver, bump_version(ver, which))) if args.local_paths or args.remote_paths: print("Target crate list") for (name, ver) in VERSIONS.items(): print("{}: {}".format(name, ver)) - if args.bump: + if args.bump or args.minor_bump or args.major_bump: mode = 'bump' elif args.local_paths: mode = 'to_local' @@ -305,7 +349,7 @@ def main(): for patch in patches: patch.debug_mode(not args.wet_run) - patch.increment_versions(mode) + patch.increment_versions(mode, which) print("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!") print("Don't forget to check in & update git rev in Cargo.lock for: {}".format(crate_roots[1:])) print("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!") diff --git a/services/graphics-server/src/main.rs b/services/graphics-server/src/main.rs index 7668b8fd5..4f5e385c9 100644 --- a/services/graphics-server/src/main.rs +++ b/services/graphics-server/src/main.rs @@ -132,6 +132,7 @@ fn main() -> ! { // Some operating systems and GUI frameworks don't allow creating an event // loop from a thread other than TID 1. Let the backend claim this thread // if this may be the case. + #[allow(unreachable_code)] backend::claim_main_thread(move |main_thread_token| { #[cfg(not(feature = "ditherpunk"))] wrapped_main(main_thread_token); diff --git a/services/root-keys/src/main.rs b/services/root-keys/src/main.rs index 29b141682..5733a9b0a 100644 --- a/services/root-keys/src/main.rs +++ b/services/root-keys/src/main.rs @@ -1626,10 +1626,10 @@ fn main() -> ! { } Some(Opcode::UxBbramCheckReturn) => { let buf = unsafe { Buffer::from_memory_message(msg.body.memory_message().unwrap()) }; - let console_text = buf.to_original::().unwrap(); - log::info!("got console text:{}", console_text.first().as_str()); - if console_text.first().as_str().starts_with("HELPER_OK") { - log::info!("got '{}', moving on", console_text.first().as_str()); + let console_text = buf.to_original::().unwrap(); + log::info!("got console text:{}", console_text.as_str()); + if console_text.as_str().starts_with("HELPER_OK") { + log::info!("got '{}', moving on", console_text.as_str()); // proceed if keys.is_pcache_update_password_valid() || !keys.is_initialized() { send_message(