|
楼主 |
发表于 2023-7-11 20:01:52
来自手机
|
显示全部楼层
萝卜大侠 发表于 2023-7-11 14:58
这种芯片架构的支持只能靠芯片厂商去推呢
/proc/cpuinfo
system type : MIPS sf19a28
machine : GL-SFT1200
processor : 0
cpu model : MIPS interAptiv (multi) V2.8 FPU V0.0
BogoMIPS : 531.66
wait instruction : yes
microsecond timers : yes
tlb_entries : 64
extra interrupt vector : yes
hardware watchpoint : yes, count: 4, address/irw mask: [0x0ffc, 0x0ffc, 0x0ffb, 0x0ffb]
isa : mips1 mips2 mips32r1 mips32r2
ASEs implemented : mips16 dsp dsp2 mt eva
Datasheet: https://www.siflower.com.cn/assets/upload/file/SF19A2890_datasheet.pdf
Its CPU is MIPS32® interAptiv, a MIPS32r2 CPU.
readelf
busybox_1.29.3-3_mips_siflower.ipk
ELF Header:
Magic: 7f 45 4c 46 01 01 01 00 01 00 00 00 00 00 00 00
Class: ELF32
Data: 2's complement, little endian
Version: 1 (current)
OS/ABI: UNIX - System V
ABI Version: 1
Type: EXEC (Executable file)
Machine: MIPS R3000
Version: 0x1
Entry point address: 0x403760
Start of program headers: 52 (bytes into file)
Start of section headers: 0 (bytes into file)
Flags: 0x1005, noreorder, cpic, o32, mips1
Size of this header: 52 (bytes)
Size of program headers: 32 (bytes)
Number of program headers: 9
Size of section headers: 0 (bytes)
Number of section headers: 0
Section header string table index: 0
...
[Requesting program interpreter: /lib/ld-musl-mipsel.so.1]
...
0x00000001 (NEEDED) Shared library: [libgcc_s.so.1]
0x00000001 (NEEDED) Shared library: [libc.so]
MIPS I (weird!) little-endian. ld.so is /lib/ld-musl-mipsel.so.1.
busybox_1.28.4-3_mipsel_24kc.ipk
ELF Header:
Magic: 7f 45 4c 46 01 01 01 00 01 00 00 00 00 00 00 00
Class: ELF32
Data: 2's complement, little endian
Version: 1 (current)
OS/ABI: UNIX - System V
ABI Version: 1
Type: EXEC (Executable file)
Machine: MIPS R3000
Version: 0x1
Entry point address: 0x403940
Start of program headers: 52 (bytes into file)
Start of section headers: 0 (bytes into file)
Flags: 0x74001005, noreorder, cpic, o32, mips16, mips32r2
Size of this header: 52 (bytes)
Size of program headers: 32 (bytes)
Number of program headers: 9
Size of section headers: 0 (bytes)
Number of section headers: 0
Section header string table index: 0
...
[Requesting program interpreter: /lib/ld-musl-mipsel-sf.so.1]
...
0x00000001 (NEEDED) Shared library: [libgcc_s.so.1]
0x00000001 (NEEDED) Shared library: [libc.so]
MIPS32r2 little-endian. ld.so is /lib/ld-musl-mipsel-sf.so.1.
The reason why one cannot "execute an ELF built for mipsel_24kc" is clear now:
OpenWrt opkg refuses to install mipsel_24kc ipk as is not considered a compatible architecture.
A dynamically linked ELF is unable to find a proper ld.so.
In theory, a static linked Go program should be able to execute on mips_siflower. So, could you test?
In conclusion, I don't think it need a new port for Go to support mips_siflower, but the downstream OpenWrt GL.iNet provides is a bit "toxic". No much things can do from our side, but users needs to configure CGO properly. |
|