Re: [PATCH 1/1] arm: rust: Enable Rust support for ARMv7

From: Miguel Ojeda
Date: Sat Jun 08 2024 - 08:16:29 EST


On Sat, Jun 8, 2024 at 12:30 AM Christian Schrefl
<chrisi.schrefl@xxxxxxxxx> wrote:
>
> This is based on the code by Sven Van Asbroeck from the original
> rust branch and inspired by the AArch version by Jamie Cunliffe.

Thanks for mentioning that!

(AArch64 perhaps?)

> I have tested the rust samples and a custom simple MMIO module
> on on hardware (De1SoC FPGA + Arm A9 CPU).

Very nice to have tested it in real hardware, thanks!

(Duplicate "on on").

> +``arm`` Maintained ARMv7 Little Endian only.

How hard would it be to test and maintain other versions, eventually?
I met Jamie recently, he may have some ideas here.

> -BINDGEN_TARGET_arm64 := aarch64-linux-gnu
> +BINDGEN_TARGET_arm64:= aarch64-linux-gnu

Spurious change?

> +# Depending on how the architecute defines ARCH_SLAB_MINALIGN, bindgen might generate a binding.
> +# Disable this here as there is a const that will always be generated in bindings_helper.c

Typo in "architecute". Also, I guess you mean `.h` instead. Please use
Markdown formatting for consistency with the rest of the file.

> + panic!("arm uses the builtin rustc target");

Since ARM64 puts the name of the target in the message, it would be
nice to do the same (or perhaps it can be removed from the ARM64 one
otherwise).

Cheers,
Miguel