No. source /opt/bin/gcc_env.sh and compile as in wikiIs it possible to compile a simple C program without the Entware-ng dependency?
Code:
source /opt/bin/gcc_env.sh
gcc $CFLAGS $LDFLAGS hello.c -o hello
No. source /opt/bin/gcc_env.sh and compile as in wikiIs it possible to compile a simple C program without the Entware-ng dependency?
source /opt/bin/gcc_env.sh
gcc $CFLAGS $LDFLAGS hello.c -o hello
Just try and report here. Statical linking can be tricky with glibc. Try not to use ld, use gcc. ld does not know where to find some static libs.Thank you. I compiled my little C program and it runs fine.
If I needed to build a statically linked version of some program on the router, is this possible? I've cross-compiled Entware-ng on my laptop and it appears to have built all the static libraries (the ".a" files). Can these be used on the router with Entware-gcc to statically link the C runtime?
An illustrated guide on installing Entware-ng (mipsel & armv7)
https://www.hqt.ro/how-to-install-new-generation-entware/
Thank you TeHashX
opkg update
opkg remove --force-depends pyasn1
opkg remove --force-depends zope.interface
opkg upgrade
opkg update
opkg upgrade
The syntax above did not work on my two Asus routers to delete the packages. The better syntax is:Two packages that were only in Entware-ng are now in Openwrt with slightly different names (pyasn1->python-pyasn1; zope.interface->zope-inteface) . If you have installed deluge (arm feed) it is better to run thees commands to upgrade.
Code:opkg update opkg delete - force-depends pyasn1 opkg delete - force-depends zope.interface opkg upgrade
opkg update
opkg remove --force-depends pyasn1
opkg remove --force-depends zope.interface
opkg upgrade
I had entware-ng running on my AC-56u but recently been unable to run an opkg update.
The error returned as follow:
root@myAsus:/tmp/home/root# opkg update
Downloading http://pkg.entware.net/binaries/armv7/Packages.gz.
wget: can't connect to remote host (81.4.123.217): Connection timed out
Collected errors:
* opkg_download: Failed to download http://pkg.entware.net/binaries/armv7/Packages.gz, wget returned 1.
I've also tried editing opkg.conf to use the address provided in the OP but same error.
I've read somewhere that it could be caused by mis-configured routing table. The following are the output for netstat -rn, traceroute & ifconfig. Would need someone to advise on how to solve this.
By the way, I have debian wheezy installed and there's no problem running apt-get in debian.
I have a static ip
root@myAsus:/tmp/home/root# traceroute 81.4.123.217
traceroute to 81.4.123.217 (81.4.123.217), 30 hops max, 38 byte packets
1 172.22.0.1 (172.22.0.1) 3.356 ms 1.977 ms 1.678 ms
2 103-6-148-37.myrepublic.com.sg (103.6.148.37) 1.212 ms 1.130 ms 38.111 ms
3 103-6-148-13.myrepublic.com.sg (103.6.148.13) 3.449 ms 5.633 ms 2.566 ms
4 116.51.27.101 (116.51.27.101) 2.467 ms 1.792 ms 2.743 ms
5 ae-0.r21.sngpsi05.sg.bb.gin.ntt.net (129.250.4.73) 2.204 ms 3.078 ms 1.761 ms
6 ae-8.r22.londen03.uk.bb.gin.ntt.net (129.250.7.64) 186.218 ms 186.174 ms 183.385 ms
7 ae-1.r02.londen03.uk.bb.gin.ntt.net (129.250.5.25) 182.934 ms 184.720 ms 181.819 ms
8 ae-3.r02.londen05.uk.bb.gin.ntt.net (129.250.2.119) 182.729 ms 181.730 ms 183.842 ms
9 82.112.115.130 (82.112.115.130) 259.755 ms 277.147 ms 255.949 ms
10 ae01.core01.lon10.uk.as5580.net (78.152.54.63) 258.172 ms * ae08.core02.lon01.uk.as5580.net (78.152.44.162) 260.367 ms
11 ae01.core02.ams02.nl.as5580.net (78.152.53.229) 262.379 ms 250.542 ms 253.088 ms
12 ae01.edge01.ams01.nl.as5580.net (78.152.45.66) 262.172 ms 251.155 ms 251.292 ms
13 as5580-gw.dataplace.nl.weservit.net (78.152.46.79) 189.037 ms ae01.edge01.ams01.nl.as5580.net (78.152.45.66) 258.942 ms 266.437 ms
14 as5580-gw.dataplace.nl.weservit.net (78.152.46.79) 190.444 ms 198.939 ms 199.593 ms
15 * * *
16 * * *
^C
root@myAsus:/tmp/home/root# netstat -rn
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
101.100.184.1 0.0.0.0 255.255.255.255 UH 0 0 0 vlan2
0.0.0.0 10.0.0.1 255.255.255.0 UG 0 0 0 br0
10.0.0.0 0.0.0.0 255.255.255.0 U 0 0 0 br0
10.0.1.0 10.0.0.2 255.255.255.0 UG 0 0 0 br0
10.0.2.0 10.0.0.8 255.255.255.0 UG 0 0 0 br0
101.100.184.0 0.0.0.0 255.255.255.0 U 0 0 0 vlan2
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
0.0.0.0 101.100.184.1 0.0.0.0 UG 0 0 0 vlan2
root@myAsus:/tmp/home/root# ifconfig
br0 Link encap:Ethernet HWaddr 14:XX:XX:XX:08
inet addr:10.0.0.1 Bcast:10.0.0.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:8076 errors:0 dropped:0 overruns:0 frame:0
TX packets:8800 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:1057406 (1.0 MiB) TX bytes:4944087 (4.7 MiB)
eth0 Link encap:Ethernet HWaddr 14:XX:XX:XX:08
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:22276362 errors:0 dropped:0 overruns:0 frame:0
TX packets:24526744 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2866215110 (2.6 GiB) TX bytes:3923831461 (3.6 GiB)
Interrupt:179 Base address:0x4000
eth1 Link encap:Ethernet HWaddr 14:XX:XX:XX:08
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:41265
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Interrupt:163
eth2 Link encap:Ethernet HWaddr 14:XX:XX:XX:0C
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:105 errors:0 dropped:0 overruns:0 frame:2294479
TX packets:122 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:16017 (15.6 KiB) TX bytes:35086 (34.2 KiB)
Interrupt:169
ifb0 Link encap:Ethernet HWaddr 1A:XX:XX:XX:CB
UP BROADCAST RUNNING NOARP MTU:1500 Metric:1
RX packets:1077443 errors:0 dropped:0 overruns:0 frame:0
TX packets:1077443 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:32
RX bytes:950745768 (906.7 MiB) TX bytes:950745768 (906.7 MiB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1%1076468424/128 Scope:Host
UP LOOPBACK RUNNING MULTICAST MTU:16436 Metric:1
RX packets:1510 errors:0 dropped:0 overruns:0 frame:0
TX packets:1510 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:132792 (129.6 KiB) TX bytes:132792 (129.6 KiB)
vlan1 Link encap:Ethernet HWaddr 14:XX:XX:XX:08
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:7968 errors:0 dropped:0 overruns:0 frame:0
TX packets:8796 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:1077529 (1.0 MiB) TX bytes:4975062 (4.7 MiB)
vlan2 Link encap:Ethernet HWaddr 14:XX:XX:XX:09
inet addr:101.100.184.132 Bcast:101.100.184.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1413 errors:0 dropped:0 overruns:0 frame:0
TX packets:1212 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:167590 (163.6 KiB) TX bytes:136964 (133.7 KiB)
I always forget, so I had this added to my profile.Your HOME environment variable should point to usb storage.
#!/bin/sh
export HOME=/share/data
source /opt/bin/gcc_env.sh
Welcome To SNBForums
SNBForums is a community for anyone who wants to learn about or discuss the latest in wireless routers, network storage and the ins and outs of building and maintaining a small network.
If you'd like to post a question, simply register and have at it!
While you're at it, please check out SmallNetBuilder for product reviews and our famous Router Charts, Ranker and plenty more!