cd , ls , iwconfig etc. not working in OpenWRT

7 posts / 0 new
Last post
imran
imran's picture
cd , ls , iwconfig etc. not working in OpenWRT

Hi ,

I want to run OpenWRT on my WGR614L and for this purpose I have downloaded openwrt  (from svn ) and compiled it.

If I flash my board with the corresponding chk file , I observe that commands like iwconfig , ls , chmod etc . are causing the system to hang ......

Could any body please tell me how to overcome this .... ? 

bzing2
bzing2's picture
Did you take OpenWRT directly

Did you take OpenWRT directly from the trunk; so you have not applied either the kernel patches on this site, or the enhancements to the build environment?

As far as I understand there is no support for building CHK images in the OpenWRT trunk. So I am guessing you did this yourself? Is the jff2s correctly aligned?

achilles
achilles's picture
Yes I took it from the trunk

Yes I took it from the trunk and also I have applied the kernel patches ....
I build the chk image myself using the packet tool ....
How can I check if jff2s is correctly aligned .... ???
Moreover I would like to mention that hang happens if we press tab after giving some commands partially like "iwconfig" .... and for some commands like ls or chmod even if I give full command without using tab ...the hang happens ...

bzing2
bzing2's picture
Ok well the correct magic for

Ok well the correct magic for OpenWRT is in this download; I should point out I am in the process of a) updating that, and b) merging things into the OpenWRT trunk. So any test reports greatly received.

You need to align things ok a 64k boundry. The following snippit is how I use the TRX tool to achieve that (using the one from OpenWRT). This is from target/linux/brcm-2.4/image/Makefile.

trx -o $(BIN_DIR)/openwrt.trx -f loader.lzma \
    -f vmlinux.lzma -a 1024 \
    -f $(KDIR)/root.$(1) -a 0x10000
achilles
achilles's picture
bzing2 said:

bzing2 said:
Ok well the correct magic for OpenWRT is in this download; I should point out I am in the process of a) updating that, and b) merging things into the OpenWRT trunk. So any test reports greatly received.
You need to align things ok a 64k boundry. The following snippit is how I use the TRX tool to achieve that (using the one from OpenWRT). This is from target/linux/brcm-2.4/image/Makefile.

	trx -o $(BIN_DIR)/openwrt.trx -f loader.lzma \
	-f vmlinux.lzma -a 1024 \
	-f $(KDIR)/root.$(1) -a 0x10000
	

 

Thanx for the input .... OK let me try this .. meanwhile If I get any further observation I will let you know ... 

achilles
achilles's picture
One thing I have observed

One thing I have observed with OpenWRT is that when I flash the board with openwrt for the first time and give an ifconfig command , I get the following output :

br-lan Link encap:Ethernet HWaddr 00:1E:2A:07:AC:72
inet addr:192.168.1.1 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:12 errors:0 dropped:0 overruns:0 frame:0
TX packets:1 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:552 (552.0 B) TX bytes:402 (402.0 B)

eth0 Link encap:Ethernet HWaddr 00:1E:2A:07:AC:72
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:12 errors:0 dropped:0 overruns:0 frame:0
TX packets:91 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:816 (816.0 B) TX bytes:37310 (36.4 KiB)
Interrupt:4

eth0.0 Link encap:Ethernet HWaddr 00:1E:2A:07:AC:72
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:12 errors:0 dropped:0 overruns:0 frame:0
TX packets:1 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:600 (600.0 B) TX bytes:406 (406.0 B)

eth0.1 Link encap:Ethernet HWaddr 00:1E:2A:07:AC:72
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:90 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:36540 (35.6 KiB)

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
With ifconfig -a I am also able to see wl0 interface .
Now I want to configure my board as a client bridge and for that purpose I am changing some nvram variables as follows :

[email protected]:/# nvram set lan_proto=static
[email protected]:/# nvram set lan_ipaddr=192.168.1.1
[email protected]:/# nvram set lan_netmask=255.255.255.0
[email protected]:/# nvram unset lan_gateway
[email protected]:/# nvram unset lan_dns

[email protected]:/# nvram set wan_proto=static
[email protected]:/# nvram set wan_ipaddr=192.168.10.133
[email protected]:/# nvram set wan_netmask=255.255.255.0
[email protected]:/# nvram unset wan_gateway
[email protected]nWrt:/# nvram unset wan_dns

[email protected]:/# nvram set wl0_mode=wet
[email protected]:/# nvram set wl0_infra=1
[email protected]:/# nvram set wl0_ssid=home_test
[email protected]:/# nvram commit
[email protected]:/# reboot

And after reboot if i give an ifconfig command it shows nothing and with ifconfig -a I get the following output :

[email protected](none):/#
[email protected](none):/# ifconfig -a
eth0 Link encap:Ethernet HWaddr 00:1E:2A:07:AC:72
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
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:4

lo Link encap:Local Loopback
LOOPBACK MTU:16436 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

Could any body please tell me if I am doing anything wrong here or is it a problem with OpenWRT and also why do I see the command prompt as
[email protected] instead of [email protected] .

Thnx in advance,

bzing2
bzing2's picture
Ok well the first thing is

Ok well the first thing is that OpenWRT does not store its config in nvram. The root dir is mounted using mini_fo; basically a COW filing system. This means you can edit just about anything and it gets stored for next time. So the file you wanted to be editing was /etc/config/network!

Second the "[email protected](none)" is very telling. This could be a number of things but basically some bit of the filing system has not been mounted correctly. Here is the output from mount:

rootfs on / type rootfs (rw)
/dev/root on /rom type squashfs (ro)
none on /dev type devfs (rw)
proc on /proc type proc (rw)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev)
devpts on /dev/pts type devpts (rw)
/dev/mtdblock/4 on /jffs type jffs2 (rw)
mini_fo:/jffs on / type mini_fo (rw)

I would recommend reading the OpenWRT Docs, they are not complete but will most defiantly help!