# gdb foo
...
Reading symbols from foo...done.
warning: Unsupported auto-load script at offset 0 in section .debug_gdb_scripts
of file /home/retrofw/foo.
(gdb) r
Starting program: /home/retrofw/foo
Program received signal SIGILL, Illegal instruction.
0x5555a4d4 in core::mem::zeroed::h85bfc6085f88bd9d () at /home/alex/git/buildroot/output/build/host-rust-1.33.0/src/libcore/mem.rs:497
497 /home/alex/git/buildroot/output/build/host-rust-1.33.0/src/libcore/mem.rs: No such file or directory.
(gdb) display/i $pc
1: x/i $pc
=> 0x5555a4d4 <core::mem::zeroed::h85bfc6085f88bd9d+36>: seb a1,zero
(gdb)
Well, I got it to work with ugly hacks. I patched buildroot to patch Rust to disable mips32r2 instructions, and I've been able to compile and run a basic rust-sdl example:
This should work on similar devices too (LDK, RS97, etc).
With a little bit of luck, Rust devs would modify the mips targets (or add a new one) so mips32 non-r2 is supported and the buildroot devs could enable uclibc building... and this could be incorporated in a new RetroFW release, which would make the whole process much simpler... but this will suffice me for now...
Well, did some further updates, now the program built demonstrates drawing, control handling and sound.
Had to go through the "ao" sound library, due to the system having old-fashioned OSS Linux sound; had to patch some old ao Rust bindings to update them.
So I think this gives all what's needed to build simple games Hopefully it will be of use to someone else; I think these devices are an attractive target.