放假惹…..博主最近在并夕夕上剁手了 PHICOMM N1 盒子,PHICOMM N1 的 CPU 采用的是更新的 ARMv8 架构,在把 RTL-SDR 服务器从 Orange Pi Lite 转移到 N1 时遇到了一些麻烦。
为了不让有类似需求的其他人踩坑,特此水一文章……
话说回来,编译就是踩坑呢!(这段划去)
略去降级固件、刷入系统系统的过程,直接步入正题……
Debian 9 系统,为了方便,博主直接使用了之前文章中提到的一建脚本……
1 | [email protected]:~# apt update && apt install git -y |
编译 rtl-sdr 时一切顺利。心中想着有着更强的设备运行 SDR 而满心欢喜时,这时却报错了。
仔细一看,是 csdr…
1 | [email protected]:/home# git clone https://github.com/simonyiszk/csdr.git |
报错内容如下:
1 | NOTE: you may have to manually edit Makefile to optimize for your CPU (especially if you compile on ARM, please edit PARAMS_NEON). |
从报错来看,应该是架构不兼容的问题,Google 一圈发现在 csdr 和 OpenWebRX 的 GitHub Issues 页面也有相关讨论。
- https://github.com/simonyiszk/openwebrx/issues/101
- https://github.com/simonyiszk/csdr/issues/11
解决方案很简单,只需修改 csdr 编译用的 Makefile,再重新编译即可。
在 Makefile 的第 33 行,将 PARAMS_NEON
字段:
1 | PARAMS_NEON = -mfloat-abi=hard -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mvectorize-with-neon-quad -funsafe-math-optimizations -Wformat=0 -DNEON_OPTS |
修改为:
1 | PARAMS_NEON = -march=armv8-a+crc+crypto -mtune=cortex-a53 |
重新编译,问题解决。