8devices / carambola

Carambola - RT305x/SoC based PCB
http://openwrt.org/
GNU General Public License v2.0
26 stars 12 forks source link

LAN issue #8

Closed Lukse closed 11 years ago

Lukse commented 12 years ago

After compiling new firmware 2.3-rc1 I have no LAN connection. Event after setting static address can't ping router.

Also looks strange MAC addresses in /etc/config/network file.

8devices commented 12 years ago

Yeah. v2.3.-rc1 -- is a 'it compiles" release ... :) Obviously I was overly too confident, too.

Lukse commented 12 years ago

Looking forward for good news :)

valinskas commented 12 years ago

Already looking at. Please be patient. It looks like ESW (embedded switch registers) are messed up ...

valinskas commented 12 years ago

Please pull latest changes. Problem should be fixed now (again). See commit ec6894048f56c3dc4f415f81dca5e8e0eda8aff3. Let me know if everything works.

valinskas commented 12 years ago

Uploading openwrt-ramips-rt305x-carambola-squashfs-sysupgrade.bin & co to pkg.8devices.com.

valinskas commented 12 years ago

Upload finished. Please test!

Lukse commented 12 years ago

Nope. Looks it is not working yet.

Lukse commented 12 years ago

Can I help debugging?

valinskas commented 12 years ago

Just 'mv /etc/config/network /etc/config/network.old' and 'reboot'.

Does it work then ?

Lukse commented 12 years ago

'ifconfig' shows nothing.

valinskas commented 12 years ago

'swconfig' ("switch configuration") package is required, commit d39c39d6056d25a873e36551a51d0cce74f90544

fwtdotfr commented 12 years ago

Sorry, v2.3-rc2 not working for me. No network.

And with my own packages, no prompt ! (of course my own packages works fine with the previous release) Complement: i use in /etc/config/system config system option foreground '1'

valinskas commented 12 years ago

Hi fwtdotfr,

Can you attach the content of /etc/config/network file ? Can you post full boot log as seen on serial console/UART ?

One more thing to try is :

# mv /etc/config/network /etc/config/network.old
# reboot

OpenWRT startup scripts should recreate /etc/config/network file for you automatically. Also if you are compiling carambola from sources - make sure swconfig packages is compiled in -- it is very important. see commit d39c39d

valinskas commented 12 years ago

Ok, I have recreated problem.

  1. current firmware carambola/v2.2-rc1
  2. upgraded to carambola/v2.3-rc2
  3. no network

/etc/config/network file contains no entries that configures embedded switch. Because of that network does not work. The only way to solve is to reset /etc/* content after upgrade like this:

# firstboot
# reboot

After that /etc/config/network is properly regenerated and Ethernet works again as expected.

valinskas commented 12 years ago

Or alternatively fixup '/etc/config/network' , for example:

config interface 'loopback'
        option ifname 'lo'
        option proto 'static'
        option ipaddr '127.0.0.1'
        option netmask '255.0.0.0'

config interface 'lan'
        option ifname 'eth0.1'
        option type 'bridge'
        option proto 'static'
        option ipaddr '192.168.1.1'
        option netmask '255.255.255.0'
        option macaddr 'c4:93:00:00:03:6b'

config interface 'wan'
        option ifname 'eth0.2'
        option proto 'dhcp'

config switch
        option name 'rt305x'
        option reset '1'
        option enable_vlan '1'

config switch_vlan
        option device 'rt305x'
        option vlan '1'
        option ports '1 2 3 4  6t'

config switch_vlan
        option device 'rt305x'
        option vlan '2'
        option ports '0  6t'
fwtdotfr commented 11 years ago

on carambola/v2.3-rc2: -1 if /etc/config/network has been created on a template from carambola/v2.2-rc1 or if swconfig package missing:

mv /etc/config/network /etc/config/network.old reboot

failed:/etc/config/network is not created and is not present.

-2 firstboot reboot or rm -rf /overlay reboot works fine and /etc/config/network is created and the network works fine.

from the source swconfig must be enabled, it is not the case in the default configuration, set it in carambola/v2.3-rc3? make menuconfig Base system ---><*> swconfig.................................... Switch configuration utility

the difference /etc/config/network: carambola/v2.2-rc1: config 'switch' 'eth0' option 'reset' '1' option 'enable_vlan' '1'

carambola/v2.3-rc2: config switch option name 'rt305x' option reset '1' option enable_vlan '1'

config switch_vlan option device 'rt305x' option vlan '1' option ports '1 2 3 4 6t'

config switch_vlan option device 'rt305x' option vlan '2' option ports '0 6t'

valinskas commented 11 years ago

Hi,

commit d39c39d6056d25a873e36551a51d0cce74f90544 swconfig enabled , tagged carambola/v2.3-rc3