The Wandboard is a Cortex-A9 ARM device sporting a single, dual, or quad core Freescale i.MX6 SoC
Source: http://www.armhf.com/boards/wandboard/
Based on: https://forum.digikey.com/t/debian-getting-started-with-the-wandboard/12707
GNU Triplet: arm-linux-gnueabihf
Wandboard CPU is : Freescale / iMX6 / armv7 / VFPv3 / NEON / Cortex-A9
Update version of gcc (Linaro).
https://releases.linaro.org/components/toolchain/binaries/7.5-2019.12/arm-linux-gnueabihf/
wget https://releases.linaro.org/components/toolchain/binaries/7.5-2019.12/arm-linux-gnueabihf/gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabihf.tar.xz
wget https://releases.linaro.org/components/toolchain/binaries/7.5-2019.12/arm-linux-gnueabihf/gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabihf.tar.xz.asc
md5sum gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabihf.tar.xz
tar xvf gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabihf.tar.xz
export CC=`pwd`/gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-
Update version of kernel to v6.6.12-rt.
git clone https://github.com/RobertCNelson/armv7-multiplatform ./kernelbuildscripts
cd kernelbuildscripts/
git checkout origin/v6.6.x-rt -b tmp
sudo apt-get install lz4
sudo apt install lzma gettext libmpc-dev u-boot-tools
export kernel_version=6.6.12-armv7-rt-x7
wget https://rcn-ee.com/rootfs/eewiki/minfs/debian-12.1-minimal-armhf-2023-08-22.tar.xz
wget https://rcn-ee.com/rootfs/eewiki/minfs/debian-12.1-minimal-armhf-2023-08-22.tar.xz.sha256sum
cat debian-12.1-minimal-armhf-2023-08-22.tar.xz.sha256sum
sha256sum debian-12.1-minimal-armhf-2023-08-22.tar.xz
cmdline=video=HDMI-A-1:1920x1080@60e loglevel=7 debug
U-Boot 2019.04-dirty (Feb 14 2024 - 21:53:06 +0100)
arm-linux-gnueabihf-gcc (Linaro GCC 7.5-2019.12) 7.5.0
GNU ld (Linaro_Binutils-2019.12) 2.28.2.20170706
Linux arm 6.6.12-armv7-rt-x7 #1 SMP PREEMPT_RT Wed Feb 14 22:48:05 CET 2024 armv7l GNU/Linux
PRETTY_NAME="Debian GNU/Linux 12 (bookworm)"
NAME="Debian GNU/Linux"
VERSION_ID="12"
VERSION="12 (bookworm)"
VERSION_CODENAME=bookworm
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
First, add target compatible with Wandboard for cross-compilation.
rustup target add armv7-unknown-linux-gnueabihf
Update .cargo/config.toml
file, either globally or locally to the project.
[target.armv7-unknown-linux-gnueabihf]
linker = "${PATH_TO_GCC_LINARO}/gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-gcc"
Compile the project with cargo
.
cargo build --target=armv7-unknown-linux-gnueabihf --release
Copy the executable from target/armv7-unknown-linux-gnueabihf/release/
to the board and run it. Et voilà :)
When you get error about relocations in generic ELF (EM: 40)
, this is due to a misconfiguration of the linker in file .cargo/config.toml
. This configuration is not Cargo.toml
file of the project (this was my mistake).