友善R2S安装的OpenWRT升级到23版本以后,运行程序报错:line 1: syntax error: unexpected word (expecting ")")
ThornBirds77 opened this issue · 10 comments
试过Linux/arm/little-endian的各种版本,均报错无法运行,在升级之前的OpenWRT 22版本运行正常。
/etc/openwrt_release输出:
_
DISTRIB_ID='OpenWrt'
DISTRIB_RELEASE='23.05.3'
DISTRIB_REVISION='r23809-234f1a2efa'
DISTRIB_TARGET='rockchip/armv8'
DISTRIB_ARCH='aarch64_generic'
DISTRIB_DESCRIPTION='OpenWrt 23.05.3 r23809-234f1a2efa'
DISTRIB_TAINTS=''
_
lscpu输出:
_
Architecture: aarch64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 4
On-line CPU(s) list: 0-3
Vendor ID: ARM
Model name: Cortex-A53
Model: 4
Thread(s) per core: 1
Core(s) per cluster: 4
Socket(s): -
Cluster(s): 1
Stepping: r0p4
CPU(s) scaling MHz: 63%
CPU max MHz: 1296.0000
CPU min MHz: 408.0000
BogoMIPS: 48.00
Flags: fp asimd evtstrm aes pmull sha1 sha2 crc32 cpuid
Vulnerabilities:
Gather data sampling: Not affected
Itlb multihit: Not affected
L1tf: Not affected
Mds: Not affected
Meltdown: Not affected
Mmio stale data: Not affected
Retbleed: Not affected
Spec rstack overflow: Not affected
Spec store bypass: Not affected
Spectre v1: Mitigation; __user pointer sanitization
Spectre v2: Not affected
Srbds: Not affected
Tsx async abort: Not affected
_
What are you running and how exactly? Please post the exact command you use and the error message.
Also please post what shell you're using (busybox, ash, sh).
The error looks like it's from a bash script (OpenWRT comes with busybox or ash, and these do not support full bash syntax).
Are you sure you have the right architecture? What does uname -m tell you?
Are you sure you have the right architecture? What does
uname -mtell you?
The uname -m output "aarch64". When I run it under OpenWRT 22 on the same hardware, everything is fine. Until I upgraded it to OpenWRT 23 last night.
Ah, I would've known that if I'd read the first post.
Sounds to me like there's been a kernel change such that armv7el code no longer runs on aarch64. Maybe try the other little-endian binaries, see if they work. Worst case, you might have to bust out the OpenWrt SDK and build your own binaries.
I don't think arm64/aarch64 binaries are provided in the current release... anyone want to take a crack at building them?
It also looks like OpenWRT does not enable 32-bit executable support in 64-bit builds... at least it appears to be true for x86, according to this.
Ah, I would've known that if I'd read the first post.
Sounds to me like there's been a kernel change such that armv7el code no longer runs on aarch64. Maybe try the other little-endian binaries, see if they work. Worst case, you might have to bust out the OpenWrt SDK and build your own binaries.
Yes, I have tried the other binaries and got the same error. Also I have no experience building standalone binaries under OpenWRT SDK. so I can only hope that someone else will help build and share it.
This looks promising... https://github.com/openwrt/docker
I think the SDK container running on a Raspberry Pi or even an always free arm64 VM from Oracle might be useful to build the appropriate binary.
This looks promising... https://github.com/openwrt/docker
I think the SDK container running on a Raspberry Pi or even an always free arm64 VM from Oracle might be useful to build the appropriate binary.
Thanks. It should be helpful.
After installing gcc into my OpenWRT environment, I've built the native binary. I also add the NOLRESOLV=1 NOLPTHREAD=1 option to avoid link error.
