Commit Graph

40 Commits (d4b89b7170ab82530cfaf21e5f00bee7088432e2)

Author SHA1 Message Date
Paul Wassi 2276bc0082 brcm47xx: cosmetic fix in model detection
In "brcm47xx: rework model detection" the file 01_detect was moved
to 01_network, therefore also update the warning message in case
everything fails.

Signed-off-by: Paul Wassi <p.wassi@gmx.at>
6 years ago
Jo-Philipp Wich d7d10f2c1e brcm47xx: rework model detection
On brcm47xx boards, the model ID is the combination of the "boardtype" nvram
variable and an optional supplemental "boardnum" variable while the human
readable model name is usually exposed in the "machine" field of the
/proc/cpuinfo file.

Move the extraction of the board nvram variables and model name string into
the 01_sysinfo file and rework the 01_detect board configuration script to
solely use the prepared sysinfo values without performing own detection
logic.

As a consequence, we can drop the ucidef_set_board_id() and
ucidef_set_model_name() invocations in favor to the generic behaviour
which copies the /tmp/sysinfo/{board_name,model} values into the board.json
"id" and "name" fields respectively.

Since "01_detect" only contains network configuration logic after this
change, move it to "01_network" and rename the contained "detect_by_xxx"
functions to "configure_by_xxx" instead, to avoid potential confusion.

Fixes FS#1576
Acked-by: Rafał Miłecki <rafal@milecki.pl>
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
6 years ago
Mirko Parthey 7ac238fc98 brcm47xx: add switch port mapping to Asus WL-500W
Switch ports 0..3 are connected to external ports LAN{1..4} in sequence,
switch port 4 is not used, and switch port 5 is connected to the CPU.
The WAN port is attached to the CPU's second network interface; it has no
connection to the internal switch.

Reuse the "Dell TrueMobile 2300" entry, which describes the same mapping.

Signed-off-by: Mirko Parthey <mirko.parthey@web.de>
6 years ago
Antony Black d44a6307c9 brcm47xx: fix switch port mapping on D-Link DIR-330
D-Link DIR-330 is clone of ASUS WL500GP2, by default conf the WAN port is
eth1, it's not working cus eth1 not soldered and wan port function
performs 5th port of the switch.

Signed-off-by: Antony Black <gtrtfm@gmail.com>
7 years ago
Tim Thorpe bddffc5e7b brcm47xx: fix switch port mapping on Asus RT-N16
On the Asus RT-N16, the ports are not mapped the in the same way as
the RT-N12.  It is, however, the same as the Linksys E3000v1.

Signed-off-by: Tim Thorpe <timfthorpe@gmail.com>
7 years ago
Jo-Philipp Wich f2fdd68664 brcm47xx: fix switch port mapping on Asus RT-N12 and RT-N16 models
On Asus RT-N12 and RT-N16 models, the WAN and LAN4 ports are swapped in the
initial switch configuration since the presets present in nvram appear to be
wrong.

Add special casing for these models to detect_by_model() in order to ensure
a proper switch configuration.

Fixes FS#502.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
7 years ago
Mathias Kresin e4e984f2a0 treewide: use only board_name function to get name
Do not parse /tmp/sysinfo/board_name, /proc/cpuinfo or the device tree
compatible string directly. Always use the board_name function to get
the board name.

The admswconfig package still reads /proc/cpuinfo directly. The code
looks somehow broken and the whole adm5120 which uses this package
looks unmaintained. Leave it as it is for now.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
Mirko Parthey e3b339e2ea brcm47xx: use DMZ LED as status indicator
On the Linksys WRT54GSv1, the Power LED flickers in the "off" state.
Indicate status using the DMZ LED if available, since it has solid "on" and
"off" states.

This change was tested on the WRT54GSv1, but may also affect other brcm47xx
devices.

Fixes FS#793.

Signed-off-by: Mirko Parthey <mirko.parthey@web.de>
7 years ago
Jo-Philipp Wich 1c09849f6c treewide: remove bad local shell variable declarations
Local variable declarations outside of functions are illegal since the Busybox
update to v1.25.0, therfore remove them from the appropriate places.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
8 years ago
Russell Senior c3cf3c4ec4 brcm47xx: fix wgt634u port assignment, broken since openwrt r47866
Signed-off-by: Russell Senior <russell@personaltelco.net>
8 years ago
Jo-Philipp Wich 54de773f2b brcm47xx: add proper switch port mapping for WRT610Nv2 / Linksys E3000v1
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 48511
9 years ago
Rafał Miłecki 0e8ba8ffcd brcm47xx: fix switch config for devices with WAN port 0
Commit r47866 dropped default values which were handling WAN interface
at port 0. Fix it by handling 2 more cases on NVRAM values.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>

SVN-Revision: 47932
9 years ago
Jo-Philipp Wich 67e1c87012 all: drop old uci-defaults.sh
Replace former uci-defaults.sh implementation with the uci-defaults-new.sh one
and update all users accordingly.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 47867
9 years ago
Jo-Philipp Wich b0b8293b7e brcm47xx: migrate network config to board detection framework
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 47866
9 years ago
John Crispin 019ea725aa add "preinit_regular" diag.sh set_state argument
This new argument is used right after starting regular preinit (which
happens if failsafe wasn't triggered). The main purpose of "preinit"
argument is to indicate that failsafe can be triggered, however we were
missing a way to inform user that we don't wait for a trigger anymore.
With this change it's clear when failsafe mode can be triggered.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>

SVN-Revision: 43715
10 years ago
Hauke Mehrtens 7a3b3b9d73 brcm47xx: don't create named switch_vlan sections
It doesn't seem to be used anywhere, it's incompatible with other
targets and can be confusing. People may think they need to update
section name every time they change VLAN ID (well, even I was doing
that).

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>

SVN-Revision: 41835
10 years ago
Hauke Mehrtens 6f417d5b4b brcm47xx: fix special board handling for some devices
Some devices were renamed when converted from diag to in kernel board detection and it was not changed in netconfig. Devices not in the
kernel board detection are removed now.

This should close: #17111, #16968, #13202

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>

SVN-Revision: 41663
10 years ago
Hauke Mehrtens 163fe41c75 brcm47xx: get switch name from swconfig first
Without this patch the switch config for the adm switch did not worked,
because hey are not names eth0.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>

SVN-Revision: 41512
10 years ago
Hauke Mehrtens 9467896172 brcm47xx: migrate basic network settings from old releases
Old OpenWrt releases were using network configs that are not valid
anymore. They were specifying ports tagging in a different way (or were
not tagging CPU at all) and were using VID 0 which is a reserved value.

Modifying network configuration to apply all needed changes would be
pretty tricky. Script /etc/init.d/netconfig that generates new config is
quite complex itself.
So instead let's save the most important settings, regenerate config
from the scratch and restore values. This should work for 99% of users.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>

SVN-Revision: 41500
10 years ago
Hauke Mehrtens 9dc5fb9103 bcm47xx: use eth0 for switch name
This fixes some strange problems with tg3. I assume that the Ethernet
driver was not brought up if the switch was named switch0.

This was reported and tested by ernesto (Faulp3lz).

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>

SVN-Revision: 41042
10 years ago
Hauke Mehrtens f912b47931 brcm47xx: parse model from cpuinfo
Instead of looking into the proc entry provided by broadcom-diag use
the board info from /proc/cpuinfo to get the board we are on.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>

SVN-Revision: 39256
11 years ago
Hauke Mehrtens bcdea80b0b brcm47xx: fix led indication
Use the new led api also on brcm47xx.
The led for failsafe indication is searched for.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>

SVN-Revision: 39255
11 years ago
Hauke Mehrtens d7ebbd0ac7 brcm47xx: use "firmware" partition name
Some time ago, after switching to the mainline bcm47xxpart driver
following patch has been applied:

commit 03cef8725d2062335ffc3de50fc037b294fd458c
Author: hauke <hauke@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Date:   Sat Apr 6 22:22:26 2013 +0000

    brcm47xx: use old partition names again for kernel 3.8

    This fixes sysupgrade. The partition names are used all over the Internet in various howtos.

    Thank you russell for spotting this problem.

I propose to revert this change and make sysupgrade use "firmware"
instead. This makes brcm47xx compatible with widely used ar71xx and
after all "firmware" sounds like a much better name for... the firmware.

This change doesn't affect "sysupgrade" usage, because it never takes a
partition name as a parameter. This change only affects users using mtd
tool directly. Hopefully there are not many howtos using "mtd" command.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>

SVN-Revision: 38973
11 years ago
Hauke Mehrtens 32cbc948a1 brcm47xx: fix netconfig for inverted vlan?ports in nvram
This was observed on the Belkin Share F7D7302.

SVN-Revision: 38769
11 years ago
Hauke Mehrtens 97b15fc45b brcm47xx: add support for ipv6 in default network config
Modify /etc/init.d/netconfig to use UCI defaults for building the
default network config, which includes appropriate defaults for IPV6.

Signed-off-by: Nathan Hintz <nlhintz@hotmail.com>

SVN-Revision: 38294
11 years ago
Hauke Mehrtens e2b2e3886b brcm47xx: run mtd fixtrx linux every time
With this patch it is possible to boot a device with kernel 3.10 a second time.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>

SVN-Revision: 37625
11 years ago
Hauke Mehrtens f8d55e7541 brcm47xx: use b53 phy driver for the switch in kernel 3.10
This makes it possible to use swconfig to controll the switch.

This was tested with devices using b43 and bgmac.
This was not tested on devices using tg3.
This does not support the adm switch used in some very old devices.

SVN-Revision: 37304
11 years ago
Hauke Mehrtens 4a46687d25 brcm47xx: use old partition names again for kernel 3.8
This fixes sysupgrade. The partition names are used all over the Internet in various howtos.

Thank you russell for spotting this problem.

SVN-Revision: 36235
11 years ago
Hauke Mehrtens 694050a4cf brcm47xx: netconfig: add bacis support for swconfig
Parse the cpu port from swconfig and explicitly mark the cpu port as tagged.

SVN-Revision: 35911
11 years ago
Hauke Mehrtens 9afdb046d3 brcm47xx: do not use vlan0 any more.
The Broadcom switch driver says that vlan0 should not be used with any switch other than bcm5325.

This makes OpenWrt always use vlan1 and vlan2 instead.

SVN-Revision: 35704
12 years ago
Hauke Mehrtens 1a8218d6e4 brcm47xx: add initial support for kernel 3.8
This contains the following new bigger changes:
 * new partition parser which still could lake some features or have bugs
 * new nand flash driver
 * using physmap-flash flash driver for parallel flash
 * some changes to the serial flash driver

With these changes OpenWrt starts using more of the mainline flash drivers.

SVN-Revision: 35632
12 years ago
Hauke Mehrtens 92d16f38d7 brcm47xx: fix network config on simpleshare
The included patch will generate a correct network configuration on the simpletech simpleshare.

Thank you for the patch Will Holmes (RealOpty)

This closes #12361.

SVN-Revision: 35623
12 years ago
Hauke Mehrtens d9580d224a brcm47xx: try to automatically detect if the wan port is at port 4 and not at port 0.
This should fix #13000.

SVN-Revision: 35617
12 years ago
Hauke Mehrtens c0f6c75cf7 brcm47xx: if the cpuport of the switch is port 8 assume vlan0ports: "1 2 3 4 8" and vlan0ports: "0 8"
SVN-Revision: 35597
12 years ago
Hauke Mehrtens 54ca3eed5d brcm47xx: configure vlan correctly on some recent devices.
SVN-Revision: 35587
12 years ago
Hauke Mehrtens c2198aba32 brcm47xx: Fix switch config on 4716/53115 devices
Signed-off-by: Jonathan McCrohan <jmccrohan@gmail.com>

SVN-Revision: 35490
12 years ago
Hauke Mehrtens 6c8efbfdc0 brcm47xx: Additional BCM4716 support
Additional BCM4716 support.  Still needs working ethernet driver.

Signed-off-by: Nathan Hintz <nlhintz@hotmail.com>

SVN-Revision: 34672
12 years ago
Florian Fainelli 3802769ea1 add vlan definitions for Siemens SE505v2
Hi,

this patch adds the correct vlan definitions for the Siemens SE505v2. It
applies to trunk as well as backfire (please apply here too). On
backfire this also patches brcm-2,4, because brcm47xx base-files is just
symlinked to brcm-2.4.

It also fixes two whitespace issues.

Tested with brcm47xx on both trunk and backfire branch and works as
expected.

Signed-off-by: Manuel Munz <freifunk@somakoma.de>

SVN-Revision: 28336
13 years ago
Jo-Philipp Wich ebb152295b fix the default network configuration for the ASUS WL-330gE (#8751)
SVN-Revision: 28024
13 years ago
Felix Fietkau 812f026323 add back the base-files/image code from brcm-2.4 to brcm47xx
SVN-Revision: 21945
14 years ago