OpenWrt x86 new install, OPKG not working

Hello, I'm trying to get OpenWrt x86 installed and replacing my pfSense router, but I've only managed to get ssh to it from my lan. I can't do anything more, when I try to do opkg update this is what I get:

root@OpenWrt:~# ping google.com
PING google.com (142.250.203.238): 56 data bytes
64 bytes from 142.250.203.238: seq=0 ttl=116 time=97.284 ms
64 bytes from 142.250.203.238: seq=1 ttl=116 time=97.374 ms
64 bytes from 142.250.203.238: seq=2 ttl=116 time=97.355 ms
64 bytes from 142.250.203.238: seq=3 ttl=116 time=97.314 ms
64 bytes from 142.250.203.238: seq=4 ttl=116 time=97.360 ms
^C
--- google.com ping statistics ---
5 packets transmitted, 5 packets received, 0% packet loss
round-trip min/avg/max = 97.284/97.337/97.374 ms
root@OpenWrt:~# opkg update
Downloading https://downloads.openwrt.org/releases/22.03.0-rc4/targets/x86/64/packages/Packages.gz
*** Failed to download the package list from https://downloads.openwrt.org/releases/22.03.0-rc4/targets/x86/64/packages/Packages.gz

Downloading https://downloads.openwrt.org/releases/22.03.0-rc4/packages/x86_64/base/Packages.gz
*** Failed to download the package list from https://downloads.openwrt.org/releases/22.03.0-rc4/packages/x86_64/base/Packages.gz

Downloading https://downloads.openwrt.org/releases/22.03.0-rc4/packages/x86_64/luci/Packages.gz
*** Failed to download the package list from https://downloads.openwrt.org/releases/22.03.0-rc4/packages/x86_64/luci/Packages.gz

Downloading https://downloads.openwrt.org/releases/22.03.0-rc4/packages/x86_64/packages/Packages.gz
*** Failed to download the package list from https://downloads.openwrt.org/releases/22.03.0-rc4/packages/x86_64/packages/Packages.gz

Downloading https://downloads.openwrt.org/releases/22.03.0-rc4/packages/x86_64/routing/Packages.gz
*** Failed to download the package list from https://downloads.openwrt.org/releases/22.03.0-rc4/packages/x86_64/routing/Packages.gz

Downloading https://downloads.openwrt.org/releases/22.03.0-rc4/packages/x86_64/telephony/Packages.gz
*** Failed to download the package list from https://downloads.openwrt.org/releases/22.03.0-rc4/packages/x86_64/telephony/Packages.gz

Collected errors:
 * xsystem: wget: Child killed by signal 4.
 * opkg_download: Failed to download https://downloads.openwrt.org/releases/22.03.0-rc4/targets/x86/64/packages/Packages.gz, wget returned -1.
 * xsystem: wget: Child killed by signal 4.
 * opkg_download: Failed to download https://downloads.openwrt.org/releases/22.03.0-rc4/packages/x86_64/base/Packages.gz, wget returned -1.
 * xsystem: wget: Child killed by signal 4.
 * opkg_download: Failed to download https://downloads.openwrt.org/releases/22.03.0-rc4/packages/x86_64/luci/Packages.gz, wget returned -1.
 * xsystem: wget: Child killed by signal 4.
 * opkg_download: Failed to download https://downloads.openwrt.org/releases/22.03.0-rc4/packages/x86_64/packages/Packages.gz, wget returned -1.
 * xsystem: wget: Child killed by signal 4.
 * opkg_download: Failed to download https://downloads.openwrt.org/releases/22.03.0-rc4/packages/x86_64/routing/Packages.gz, wget returned -1.
 * xsystem: wget: Child killed by signal 4.
 * opkg_download: Failed to download https://downloads.openwrt.org/releases/22.03.0-rc4/packages/x86_64/telephony/Packages.gz, wget returned -1.

As you can see ping works, when I try wget to sites without the http I get “Failed to allocate uclient context” and when I add http/s to the site I get Illegal operation.

What am I missing? In one of my previous tries it worked out of the box, but the flash of the OS was not done correctly, and now it flashed correctly.

is the date/time is set correctly on the device ?

Those are some high pings btw...

'Signal 4' seems to indicate illegal instructions (SIGILL). Might help to run wget directly and see what it spits out. You're sure this box is x86_64?

2 Likes

Yes do that. Copy the URL and use wget from the command line. Error -1 doesn't make a lot of sense. Your network seems OK as a network error is error 4.

Hitting the same, ssl library crash with invalid opcode. Likely miscompiled or unsuitable optimizations (CPU arch, inline asm)

3 Likes

It is, it's an old Intel CPU.

Will check today.

That's exactly what I did. Just not in this code snippet. I wrote that I got either "Failed to allocate uclient context” and when I add http/s to the site I get Illegal operation.

OK, so is there a list of CPUs I need to look at or something?

Can you share some hardware specifics? And which image you installed?

Intel were making 32bit cpus until relatively recently w/ the atom skus

Maybe this: https://github.com/openwrt/openwrt/pull/10103

2 Likes

It's not the intended hardware, it's a core 2 duo something or other, if it's related to that I'll test on a computer similar to the intended one and see if it's fixed.

Great, there are 32bit ‘core’ CPU’s as well, core duo and core solo (merom core)

If you try to run a 64 bit build on a 32 bit CPU, I don't think it will even boot, other than to show a message "64 bit CPU required."

Run cat /proc/cpuinfo to get the CPU model number, then look up on Intel's site.

2 Likes

Moved the SSD back to the right hardware, now I can't seem to even get a ping or a DHCP lease if I try that route. Something is seriously weird with this…

That is usually because the Ethernet chip is one not supported in the default build, and it is necessary to install a driver for it. Do you have local keyboard and screen or serial port access?

I am connected to the computer with a keyboard and monitor, how would I install a driver with no internet?
The weird thing is, this worked on this hardware in previous tries, is this somehow tied to whichever hardware it first boots on?

If you unplug and replug the Ethernet cable then check dmesg you should see the port going up and down.

It shouldn't matter if previously booted on different hardware except if there's ever been more than one Ethernet port the port numbers (eth0 vs eth1) may have the wrong roles of wan vs lan.