Commit graph

887 commits

Author SHA1 Message Date
Rafał Miłecki
612a93564c brcm47xx: image: build firmware for Asus WL-500g Deluxe
It's a device based on BCM5365P (0x5365 package 0x00). This SoC has
USB 1.1 controller but device has two USB 2.0 parts. They are handled by
PCI-based controllers: 1106:3038 UHCI and 1106:3104 EHCI.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2017-12-29 23:18:19 +01:00
Moritz Warning
b8220883fd brcm47xx: remove versions from linksys-e1000 target
The target name does not need to included a revision
if all revisions are supported.
This target supports all revisions (v1, v2, v2.1).

Signed-off-by: Moritz Warning <moritzwarning@web.de>
[Keep the version numbers in the device title, it doesn't harm]
Signed-off-by: Mathias Kresin <dev@kresin.me>
2017-12-11 12:44:50 +01:00
Moritz Warning
ac3d7d3569 brcm47xx: use proper region code in image name
Replace 'north-america' by 'na' and remove 'other-regions' in image
files for Netgear WGR614 v10.

Signed-off-by: Moritz Warning <moritzwarning@web.de>
2017-12-11 12:44:41 +01:00
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>
2017-11-16 22:56:54 +01:00
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>
2017-11-10 14:53:04 +01:00
Hauke Mehrtens
2af10c30fe brcm47xx: use kernel 4.9 by default
Kernel 4.9 is now working on the brcm47xx boards, we just recently fixed
the problem that some boards did not boot at all, by changing the memory
regions used to relocate the kernel to in the loader.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2017-10-18 23:27:17 +02:00
Hauke Mehrtens
2909a4b78e brcm47xx: relocate the stack in loader
By default we are reusing the stack provided by CFE, like it is intended
by CFE. On my WRT54GS it is located at 0x8043BF30, so a big kernel image
could overwrite it. Relocate it to a different memory region which is
still under the 8MB RAM, but in the higher area. We only need this
memory region for the stack of the loader, Linux will set up this
for its own.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2017-10-11 21:36:24 +02:00
Hauke Mehrtens
d5cf4a5aa4 brcm47xx: relocate loader to higher address
The boot process on a WRT54GL works the following way:
1. CFE gets loaded by the boot rom from flash
2. CFE loads the loader from the flash and gzip uncompresses it
3. CFE starts the loader
4. The loader stores the FW arguments and relocates itself to
   BZ_TEXT_START (now 0x80600000)
5. The loader reads the Linux image from flash
6. The loader lzma decompresses the Linux image to LOADADDR (0x80001000)
7. The loader executes the uncompress Linux image at LOADADDR

The BZ_TEXT_START was set to 0x80400000 before. When the kernel gets
uncompressed and is bigger than BZ_TEXT_START - LOADADDR it overwrote
the loader which was currently uncompressing it and made the board
crash. Increase the BZ_TEXT_START my 2 MB to have more space for the
kernel. Even on 16MB RAM devices the memory goes till 0x80FFFFFF so this
should not be a problem.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2017-10-11 21:36:24 +02:00
Hauke Mehrtens
253a299604 Revert "brcm47xx: Fix sysupgrade with E1200v1"
This reverts commit 31e9445b7e.

"Linksys E1200 V1" is not a valid board name, as the brcm47xx arch code
can not detect this device. Stefan Lippers-Hollmann also found a typo in
this patch "cybetran" instead of "cybertan".

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2017-09-25 23:09:33 +02:00
Rosen Penev
31e9445b7e brcm47xx: Fix sysupgrade with E1200v1
Entry was missing for some reason.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2017-09-24 16:28:28 +02:00
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>
2017-07-21 08:09:45 +02:00
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>
2017-07-15 23:13:34 +02:00
Mathias Kresin
f12a32630f treewide: use the generic board_name function
Use the generic function instead ot the target specific ones.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2017-07-15 23:13:34 +02:00
Mathias Kresin
78cf5eed6e treewide: do board detection during preinit
Do the board detection during preinit to unify it across all targets.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2017-07-15 23:13:34 +02:00
Hauke Mehrtens
1f991bb365 brcm47xx: Add support for kernel 4.9
I tested this on a WRT54GS and a WRT610N V1.
The WRT610N does not boot when the kernel is too big, so I deactivated KALLSYMS

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2017-07-02 23:10:06 +02:00
Hauke Mehrtens
b56995550a brcm47xx: refresh kernel configuration
Run make kernel_oldconfig on the brcm47xx target.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2017-07-02 22:44:07 +02:00
Hauke Mehrtens
250d305455 brcm47xx: remove kernel 4.1 support
Kernel 4.1 is not supported by LEDE for some time now.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2017-07-02 22:44:06 +02:00
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>
2017-07-02 22:44:06 +02:00
Mirko Parthey
1dace8cbe0 brcm47xx: resolve GPIO conflict for WRT54GSv1
On the Linksys WRT54GSv1, the adm6996 switch driver and the
gpio_button_hotplug module both claim GPIO 6, which is connected to the
Reset button.  When the switch driver's request wins, the Reset button
cannot work. This makes it impossible to enter failsafe mode without a
serial console.

Stop requesting the "adm_rc" GPIO in the switch driver, since it is not
used anywhere.

Fixes FS#792.

Signed-off-by: Mirko Parthey <mirko.parthey@web.de>
2017-07-02 22:44:06 +02:00
Stijn Tintel
880f73c327 kernel: cleanup CONFIG_SCHED_HRTICK
Remove CONFIG_SCHED_HRTICK from target configs, as it was added to the
generic config in b47fd76563.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2017-06-29 04:46:59 +02:00
Jo-Philipp Wich
833c500cb2 brcm47xx: remove target specific network preinit config
The generic preinit code is now able to setup network and switch vlan settings
from the /etc/board.json file, therefor drop the target specific code.

Fixes FS#790.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2017-05-27 12:17:40 +02:00
Jo-Philipp Wich
aefa195749 kernel: update kernel 4.4 to 4.4.61
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2017-04-15 18:26:41 +02:00
Hauke Mehrtens
31c6452107 kernel: update kernel 4.4 to 4.4.53
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2017-03-12 15:46:02 +01:00
Kevin Darbyshire-Bryant
91a65f6c88 kernel: update kernel 4.4 to 4.4.50
Bump kernel from 4.4.49 to 4.4.50

Compile tested: All targets

Run tested: ar71xx Archer C7 v2

Signed-off-by: Kevin Darbyshire-Bryant <kevin@darbyshire-bryant.me.uk>
2017-02-23 10:40:21 +01:00
Hauke Mehrtens
a11243578a kernel: update kernel 4.4 to version 4.4.49
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2017-02-16 00:46:29 +01:00
Mirko Parthey
d517f04343 brcm47xx: fix button inversion for Asus WL-500W
The Asus WL-500W buttons are active high,
but the software treats them as active low.
Fix the inverted logic.

Signed-off-by: Mirko Parthey <mirko.parthey@web.de>
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2017-02-16 00:06:22 +01:00
Mirko Parthey
ac3a4e7ae2 brcm47xx: fix USB driver choice for Asus WL-500W
BCM4704 SoC has only USB 1.1 core:
ssb: Core 3 found: USB 1.1 Hostdev (cc 0x808, rev 0x03, vendor 0x4243)
but this device actually comes with two USB 2.0 ports.

It appears embedded controller isn't used but instead there are two PCI
attached controllers (next to the BCM4321 wireless card):
1106:3038 VT82xx/62xx UHCI USB 1.1 Controller
1106:3104 USB 2.0

Choose a set of USB drivers which actually support this hardware.

Signed-off-by: Mirko Parthey <mirko.parthey@web.de>
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2017-02-15 23:43:19 +01:00
Rafał Miłecki
1a83d4d30f brcm47xx: backport arch patch with Luxul devices support
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2017-01-24 20:33:45 +01:00
Felix Fietkau
bfdc56d3a2 build: remove mips16 feature flag from target makefiles
It can be implicitly derived from the MIPS32 revision support in the
kernel configuration

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2017-01-24 13:15:01 +01:00
Felix Fietkau
1708644f19 kernel: backport MIPS changes introducing a separate IRQ stack
Prevents crashes when IRQs arrive when the current kernel stack context
already contains deeply nested function calls, e.g. when stacking lots
of network devices on top of each other

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2017-01-15 18:25:54 +01:00
Hauke Mehrtens
5b089e45a6 kernel: update 4.4 kernel to 4.4.42
Refresh patches on all 4.4 supported platforms.
Compile & run tested: lantiq/xrx200

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2017-01-13 23:05:36 +01:00
Rafał Miłecki
2406b3488f brcm47xx: generic: include Ethernet drivers in standard image
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2017-01-04 12:49:03 +01:00
Rafał Miłecki
5f8e3386e0 brcm47xx: drop some personal profiles
WL500GPv1 profile included ath5k which made it usable only for people
who decided to replace default BCM4318 card with Atheros one. We can't
have profile for every possible configuration. If someone adjusts hw in
such a way he can always install a proper package.

WRTSL54GS profile got extra packages for a specific USB usage. Our
standard profile provides basic USB and we should stick to this. We
can't make everyone happy by including packages for all common USB use
cases and all common filesystems.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2017-01-04 12:24:01 +01:00
Rafał Miłecki
d091b2c381 brcm47xx: generic: drop standalone profiles duplicating device ones
We have identical profiles for these devices thanks to DEVICE_PACKAGES.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2017-01-04 12:16:09 +01:00
Rafał Miłecki
b138e690e5 brcm47xx: generic: specify DEVICE_PACKAGES for all devices
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2017-01-04 11:55:45 +01:00
Rafał Miłecki
11c41a0ea9 brcm47xx: fix bgmac package
With all recent patches & changes it needs more modules.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2017-01-04 11:55:39 +01:00
Rafał Miłecki
18152e71d8 brcm47xx: mips74k: specify DEVICE_PACKAGES for all devices
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2017-01-04 09:36:34 +01:00
Rafał Miłecki
1d74f78877 brcm47xx: legacy: specify DEVICE_PACKAGES for all devices
This allows more feature complete images. Of course it affect the size,
e.g. enabling b43 bumped rootfs from 1569618 to 2029122 for me.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2017-01-04 09:35:46 +01:00
Rafał Miłecki
8f5cf323c4 brcm47xx: drop standalone Netgear WGT634U profile
We have profile for this device thanks to DEVICE_PACKAGES now.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Cc: Russell Senior <russell@personaltelco.net>
2016-12-30 09:23:07 +01:00
Rafał Miłecki
b1bdb6e5ea brcm47xx: specify DEVICE_PACKAGES for Netgear WGT634U
This allows using it nicely with PER_DEVICE_ROOTFS.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Cc: Russell Senior <russell@personaltelco.net>
2016-12-30 09:22:55 +01:00
Rafał Miłecki
ef4fc00c91 brcm47xx: mips74k: fix typo in Netgear WN3000RP model name
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2016-12-29 09:41:00 +01:00
Álvaro Fernández Rojas
758ef7aa99 kernel: bump to 4.4.36
Refresh patches on all 4.4 supported platforms.
Compile & run tested: brcm2708/bcm2710 - Raspberry Pi 3

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2016-12-04 12:31:30 +01:00
Kevin Darbyshire-Bryant
102cb4742c kernel: bump to 4.4.35
Refresh patches on all 4.4 supported platforms.

077-0005-bgmac-stop-clearing-DMA-receive-control-register-rig.patch
removed as now upstream.

Compile & run tested: ar71xx - Archer C7 v2

Signed-off-by: Kevin Darbyshire-Bryant <kevin@darbyshire-bryant.me.uk>
2016-11-29 21:12:08 +01:00
Felix Fietkau
a07c4977ac brcm47xx: fix initramfs image build error
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2016-11-29 10:20:27 +01:00
Felix Fietkau
f12f77b477 brcm47xx: merge cpu cache workaround patches into one, ensure they get compiled out on mips74k
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2016-11-29 10:20:27 +01:00
Rafał Miłecki
f20ba0f0d5 brcm47xx: image: use append-rootfs step for per-device rootfs support
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2016-10-28 17:03:55 +02:00
Rafał Miłecki
027b2c5b83 brcm47xx: image: make TRX steps work with rootfs passed as $@
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2016-10-28 16:46:57 +02:00
Rafał Miłecki
8bd2167236 brcm47xx: image: make linksys-pattern-partition leave specific file
Thanks to leaving .pattern file we can easily insert extra step between
linksys-pattern-partition and trx-v2-with-loader, e.g. rootfs one.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2016-10-28 16:41:05 +02:00
Rafał Miłecki
bc6be3e953 brcm47xx: add support for per-device rootfs
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2016-10-27 13:25:51 +02:00
Rafał Miłecki
13e6f7a75d brcm47xx: reorder older entries in image Makefile
Keep all entries sorted and replace tabs with spaces while at it.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2016-10-24 20:35:24 +02:00