Closed mjg59 closed 7 months ago
This requires tools for the host architecture and also the target architecture, and I'm not familiar enough with Rust cross-building to know how to set that up
thanks @mjg59! i have a few nitpicky idiomatic rust comments if that'd be helpful, though np if not.
re: cross building, i think the .cargo/config.toml
file is a pretty convenient place to configure this. maybe we make one per crate, each specifying that crate's desired architecture?
currently we have one such config at the workspace root, which annoyingly will override any sub-crate configs if you run cargo build
in the root. so we'd have to descend into each crate and run cargo build
if we do this. alternately, we can just run cargo build --bin <crate name> --target=<whatever>
for each target
This is my first attempt at writing Rust, please do give me guidance on idioms!
Still need to work out building the serial tool for the host architecture (and probably also not hardcoding the host architecture) - possibly also want to split the rooting stuff out into a separate script?
I know @mjg59 still wants to build out to support more host architectures which I think is worthwhile but for now I have cleaned up the script and separated into install and build scripts and I think this is ready for a merge since it's important now that we have more contributors.
@wgreenberg this is ready for your review.
Add tools for launching a root shell on the device, and for sending serial commands to the device. Extend the make.sh script to push those and configure a root shell. Commands can now be executed as root via:
adb shell rootshell -c \"touch /tmp/test\"
allowing automatic configuration of the tooling.