How to install IPK on MT7621 router - solve incompatible with the architectures configured
Problem: I cannot install ipk file on my MediaTek MT7621 router because it prompted "incompatible architecture" error.
The MT7621 CPU is MIPS architecture:
root@myRouter:~# cat /proc/cpuinfo
system type : MediaTek MT7621 ver:1 eco:3
machine : YouHua WR1200JS
processor : 0
cpu model : MIPS 1004Kc V2.15
BogoMIPS : 584.90
wait instruction : yes
microsecond timers : yes
tlb_entries : 32
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 mt
shadow register sets : 1
kscratch registers : 0
package : 0
core : 0
VPE : 0
VCED exceptions : not available
VCEI exceptions : not available
processor : 1
cpu model : MIPS 1004Kc V2.15
BogoMIPS : 584.90
wait instruction : yes
microsecond timers : yes
tlb_entries : 32
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 mt
shadow register sets : 1
kscratch registers : 0
package : 0
core : 0
VPE : 1
VCED exceptions : not available
VCEI exceptions : not available
processor : 2
cpu model : MIPS 1004Kc V2.15
BogoMIPS : 584.90
wait instruction : yes
microsecond timers : yes
tlb_entries : 32
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 mt
shadow register sets : 1
kscratch registers : 0
package : 0
core : 1
VPE : 0
VCED exceptions : not available
VCEI exceptions : not available
processor : 3
cpu model : MIPS 1004Kc V2.15
BogoMIPS : 584.90
wait instruction : yes
microsecond timers : yes
tlb_entries : 32
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 mt
shadow register sets : 1
kscratch registers : 0
package : 0
core : 1
VPE : 1
VCED exceptions : not available
VCEI exceptions : not available
It should be able to install IPK which is compiled for this platform. However, when I try to install ipk, I got "incompatible with the architecture" error:
root@myRouter:~# opkg install ./xxxxx.ipk
Unknown package 'xxxxx'.
Collected errors:
* pkg_hash_fetch_best_installation_candidate: Packages for xxxxx found, but incompatible with the architectures configured
* opkg_install_cmd: Cannot install package xxxxxx.
Then I further double check the opkg supported architecture:
#opkg print-architecture
arch all 1
arch noarch 1
arch ralink 10
It lacks support of mips. Therefore, I need to add support of mips by manually configure opkg.conf.
#vi /etc/opkg.conf
Add the below lines at the end of the file:
#originally supported architecture
arch all 1
arch noarch 1
arch ralink 10
#Newly added lines
arch ramips_24kec 20
Then save the file. Check the print-architecture again:
#opkg print-architecture
all 1
arch noarch 1
arch mipsel_24kc 10
arch ramips_24kec 20
Now it support MIPS!
Now I can install the ipk again:
#opkg install xxxx_ramips_24kec.ipk
Installing xxxx to root...
Configuring xxxx.
xxxxx Server has started.
It can be installed and run successfully!
The MT7621 CPU is MIPS architecture:
root@myRouter:~# cat /proc/cpuinfo
system type : MediaTek MT7621 ver:1 eco:3
machine : YouHua WR1200JS
processor : 0
cpu model : MIPS 1004Kc V2.15
BogoMIPS : 584.90
wait instruction : yes
microsecond timers : yes
tlb_entries : 32
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 mt
shadow register sets : 1
kscratch registers : 0
package : 0
core : 0
VPE : 0
VCED exceptions : not available
VCEI exceptions : not available
processor : 1
cpu model : MIPS 1004Kc V2.15
BogoMIPS : 584.90
wait instruction : yes
microsecond timers : yes
tlb_entries : 32
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 mt
shadow register sets : 1
kscratch registers : 0
package : 0
core : 0
VPE : 1
VCED exceptions : not available
VCEI exceptions : not available
processor : 2
cpu model : MIPS 1004Kc V2.15
BogoMIPS : 584.90
wait instruction : yes
microsecond timers : yes
tlb_entries : 32
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 mt
shadow register sets : 1
kscratch registers : 0
package : 0
core : 1
VPE : 0
VCED exceptions : not available
VCEI exceptions : not available
processor : 3
cpu model : MIPS 1004Kc V2.15
BogoMIPS : 584.90
wait instruction : yes
microsecond timers : yes
tlb_entries : 32
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 mt
shadow register sets : 1
kscratch registers : 0
package : 0
core : 1
VPE : 1
VCED exceptions : not available
VCEI exceptions : not available
It should be able to install IPK which is compiled for this platform. However, when I try to install ipk, I got "incompatible with the architecture" error:
root@myRouter:~# opkg install ./xxxxx.ipk
Unknown package 'xxxxx'.
Collected errors:
* pkg_hash_fetch_best_installation_candidate: Packages for xxxxx found, but incompatible with the architectures configured
* opkg_install_cmd: Cannot install package xxxxxx.
Then I further double check the opkg supported architecture:
#opkg print-architecture
arch all 1
arch noarch 1
arch ralink 10
It lacks support of mips. Therefore, I need to add support of mips by manually configure opkg.conf.
#vi /etc/opkg.conf
Add the below lines at the end of the file:
#originally supported architecture
arch all 1
arch noarch 1
arch ralink 10
#Newly added lines
arch ramips_24kec 20
Then save the file. Check the print-architecture again:
#opkg print-architecture
all 1
arch noarch 1
arch mipsel_24kc 10
arch ramips_24kec 20
Now it support MIPS!
Now I can install the ipk again:
#opkg install xxxx_ramips_24kec.ipk
Installing xxxx to root...
Configuring xxxx.
xxxxx Server has started.
It can be installed and run successfully!
Comments