文基于觸覺智能RK3506星閃開發(fā)板Buildroot系統(tǒng)進(jìn)行演示,配套R(shí)K3506核心板(3核A7+M0多核異構(gòu))寬溫級(jí)59元/工業(yè)級(jí)68元,一片也是含稅批量價(jià)~
?
Buildroot SDK安裝與環(huán)境搭建
-
SDK安裝
?
md5sum?arm-buildroot-linux-gnueabihf_sdk-buildroot.tar.gz
?
?
?tar -xvf arm-buildroot-linux-gnueabihf_sdk-buildroot.tar.gz -C ./
-
交叉編譯環(huán)境搭建
?
cd?./arm-buildroot-linux-gnueabihf_sdk-buildroot
??./relocate-sdk.sh
搭建環(huán)境后,查看qmake版本和交叉編譯工具鏈版本:
?
$ ./bin/arm-buildroot-linux-gnueabihf-gcc -v?
使用內(nèi)建 specs。
COLLECT_GCC=/mnt//rk3506/rk3506_linux-250211/rk3506_linux6.1/buildroot/output/rockchip_rk3506-emmc/images/tmp/arm-buildroot-linux-gnueabihf_sdk-buildroot/bin/arm-buildroot-linux-gnueabihf-gcc.br_real
COLLECT_LTO_WRAPPER=/mnt/rk3506/rk3506_linux-250211/rk3506_linux6.1/buildroot/output/rockchip_rk3506-emmc/images/tmp/arm-buildroot-linux-gnueabihf_sdk-buildroot/bin/../libexec/gcc/arm-buildroot-linux-gnueabihf/12.4.0/lto-wrapper
目標(biāo):arm-buildroot-linux-gnueabihf
配置為:./configure --prefix=/mnt/rk3506/rk3506_linux-250211/rk3506_linux6.1/buildroot/output/rockchip_rk3506-emmc/host --sysconfdir=/mnt/rk3506/rk3506_linux-250211/rk3506_linux6.1/buildroot/output/rockchip_rk3506-emmc/host/etc?
--enable-static --target=arm-buildroot-linux-gnueabihf --with-sysroot=/mnt/rk3506/rk3506_linux-250211/rk3506_linux6.1/buildroot/output/rockchip_rk3506-emmc/host/arm-buildroot-linux-gnueabihf/sysroot?
--enable-__cxa_atexit --with-gnu-ld --disable-libssp --disable-multilib --disable-decimal-float --enable-plugins --enable-lto --with-gmp=/mnt/rk3506/rk3506_linux-250211/rk3506_linux6.1/buildroot/output/rockchip_rk3506-emmc/host?
--with-mpc=/mnt/rk3506/rk3506_linux-250211/rk3506_linux6.1/buildroot/output/rockchip_rk3506-emmc/host --with-mpfr=/mnt/rk3506/rk3506_linux-250211/rk3506_linux6.1/buildroot/output/rockchip_rk3506-emmc/host --with-pkgversion='Buildroot -g0b15601a4-dirty'?
--with-bugurl=https://gitlab.com/buildroot.org/buildroot/-/issues --without-zstd --disable-libquadmath --disable-libquadmath-support --enable-tls --enable-threads --without-isl --without-cloog --with-abi=aapcs-linux --with-cpu=cortex-a7 --with-fpu=neon-vfpv4?
--with-float=hard --with-mode=arm --enable-languages=c,c++ --with-build-time-tools=/mnt/rk3506/rk3506_linux-250211/rk3506_linux6.1/buildroot/output/rockchip_rk3506-emmc/host/arm-buildroot-linux-gnueabihf/bin --enable-shared --disable-libgomp
線程模型:posix
Supported LTO compression algorithms: zlib
gcc 版本 12.4.0 (Buildroot -g0b15601a4-dirty)
$ ./bin/qmake -v?
QMake version 3.1
Using Qt version 5.15.11?in?/mnt/rk3506/rk3506_linux-250211/rk3506_linux6.1/buildroot/output/rockchip_rk3506-emmc/images/tmp/arm-buildroot-linux-gnueabihf/sysroot/usr/lib
Qt交叉編譯
-
Qt源碼demo
?
$?mkdir?-p ./qt-demo && tar -xvf moveblocks.tar.gz -C ./qt-demo
cd?qt-demo
?ls
?main.cpp ?moveblocks.pro
-
交叉編譯
?
?/home/rk3506/rk3506_linux-250211/rk3506_linux6.1/buildroot/output/rockchip_rk3506-emmc/images/tmp/arm-buildroot-linux-gnueabihf_sdk-buildroot/bin/qmake ./
?make
?make install
ls
?main.cpp ?Makefile ?moveblocks ?moveblocks.pro
Qt驗(yàn)證
- ?
?adb push Z:moveblocks /tmp
?
chmod? a+x /tmp/moveblocks
??/tmp/moveblocks
閱讀全文