tech-pkg archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: armv6 support for rust?
>> I've added the required bits to wip/rust, lang/rust and
>> lang/rust-bin, and have cross-built bootstrap kits both using
>> wip/rust and lang/rust.
>>
>> I'm currently trying to install the rust-bin package an an
>> armv6hf VM I have up & running, but it's taking a while, so so
>> far this is un-tested "natively".
>
> Thank you. Are you using an armv6 kernel? I'm surprised it's
> possible to virtualize.
Based on the hints, or rather, recipe Brad Spencer posted to
tech-pkg, I used an rpi.img from 9.0, replaced the kernel with
one built from this config:
include "arch/evbarm/conf/GENERIC"
makeoptions CPUFLAGS="-mcpu=cortex-a7 -mfpu=neon"
and run qemu with
qemu-system-arm -M virt \
-cpu cortex-a7 \
-smp $SMP -m $MEM \
-drive if=none,file=disk.img,id=hd0,format=raw \
-device virtio-blk-device,drive=hd0 \
-netdev type=user,id=net0,hostfwd=tcp::2226-:22,ipv6=off \
-device virtio-rng-device \
-device virtio-net-device,netdev=net0,mac=00:11:66:33:44:66 \
-nographic \
-bios QEMU_EFI.fd
and installing the bootarm.efi in a newly created efi/boot
directory in the MS-DOS file system in the boot image.
Trying -cpu arm1176 which is supposedly a v6 CPU doesn't work,
qemu complains
qemu-system-arm: mach-virt: CPU type arm1176-arm-cpu not supported
Jared says -M raspi1ap works, I've not tested that.
I understand that the cortex-a7 CPU is actually a v7 CPU, but the
entire user-land is v6, and "uname -p" output is "armv6hf".
So far I've not tried to build rust itself "natively", but the
cross-compiled rust binaries I could install via the rust-bin
package, and the build of the cbindgen package completed
successfully in finite time on my emulated armv6 host:
...
Compiling clap v3.1.6
Compiling toml v0.5.8
Finished release [optimized] target(s) in 108m 31s
6311.424u 442.653s 1:53:47.63 98.9% 0+2k 17+18923io 44pf+0w
(Last line courtesy of csh's "time" command.)
Regards,
- Håvard
Home |
Main Index |
Thread Index |
Old Index