-
Notifications
You must be signed in to change notification settings - Fork 823
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for aarch64 #26476
Add support for aarch64 #26476
Conversation
Depends on lowRISC/crt#42 and lowRISC/safe-ftdi#3. Currently |
3ea5afa
to
2b5db07
Compare
c0cb7a3
to
6683457
Compare
I'd put common host definitions (like |
Thanks for the advice. Let me do that. 👍 |
6683457
to
15b69fb
Compare
I had to put
Other than that this worked well so thanks again. |
15b69fb
to
2bad8a4
Compare
Currently only depends on lowRISC/crt#43. |
2bad8a4
to
3c11610
Compare
Changes to all dependencies (crt, lowrisc toolchains and safe ftdi) are now merged and release paths adjusted. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks okay to me
@@ -57,7 +57,7 @@ fn status_create_safe(code: StatusCode, mod_id: u32, file: String, arg: i32) -> | |||
|
|||
// Convert an array of i8 to a string. This function will stop at first 0 (or at the | |||
// end of the array if it contains no zero). | |||
fn c_string_to_string(array: &[i8]) -> String { | |||
fn c_string_to_string(array: &[c_char]) -> String { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't your error, but would it be better to convert the array to a CStr instead of this manual iterator to construct the string:
let cstr = std::ffi::CStr::from_bytes_until_nul(array);
cstr.to_string_lossy().to_string()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At least from a quick look at the documentation it seems like from_bytes_until_nul
would error if there is no null character in array
.
Now I'm not sure if the callers of c_string_to_string
would actually pass in a non null terminated string but I would rather not introduce that slight change in behavior unless I'm sure about that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is one instance where it can be called with a non-null termined string:
module_id: c_string_to_string(&mod_id)
However this ia a very special case for a 3-character string where none of them is expected to be a NUL anyway. So you could potentially rewrite a bit the code to eliminate c_string_to_string
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for explaining. 😇
Would it be fine for you if I put that in a small follow up PR to this one?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure :)
This allows both compiling opentitantool and images for the sival chips on hosts with ARM architecture. Signed-off-by: Martin Troiber <[email protected]>
3c11610
to
09c82b1
Compare
This allows both compiling opentitantool and images for the sival chips on hosts with ARM architecture. Before merging this we should adjust the release paths for crt, lowrisc toolchains and safe ftdi.