Commit Graph

122 Commits (fbd4214bb0727268aa535af5b600d38939ec8dbc)

Author SHA1 Message Date
Adrian Schmutzler 7673df7994 ramips: switch rt3883 subtarget to kernel 5.4
The target has testing support for kernel 5.4 for quite a while,
compiles fine for all devices, and has been run-tested on Asus
RT-N56U successfully.

Let's set it to kernel 5.4 by default to increase the audience
before an 20.xx stable branch.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Tested-by: Eneas U de Queiroz <cotequeiroz@gmail.com> [Asus RT-N56U]
4 years ago
Felix Fietkau b0f7ea2853 kernel: unify CONFIG_GPIO_SYSFS in kernel configs
Enable it for all platforms

Signed-off-by: Felix Fietkau <nbd@nbd.name>
4 years ago
Alexey Dobrovolsky 4c73c34ec4 ramips: switch rt305x subtarget to kernel 5.4
RT3x5x seems to work fine with kernel 5.4. Set the default kernel
version to 5.4 to bring this to a broader audience.

Since 4 of 6 targets are on kernel 5.4 now, invert the kernel
version setup logic in Makefile/target.mk files.

Tested on ZyXEL Keenetic.

Signed-off-by: Alexey Dobrovolsky <dobrovolskiy.alexey@gmail.com>
[invert version setup logic]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Adrian Schmutzler 48c1fdd046 treewide: drop shebang from non-executable target files
This drops the shebang from all target files for /lib and
/etc/uci-defaults folders, as these are sourced and the shebang
is useless.

While at it, fix the executable flag on a few of these files.

This does not touch ar71xx, as this target is just used for
backporting now and applying cosmetic changes would just complicate
things.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Chuanhong Guo a43cbfe2e3 ramips: remove default switch setup in 02_network
ramips images now relies on explicit switch setup for proper failsafe
functionality. Remove default cases where it relies on vlan setup in
dts and add switch setup for devices affected.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
4 years ago
Adrian Schmutzler 03e742dcd8 Revert "ramips: explicitly disable built-in switch for lan-only devices"
This reverts commit a1693bf626.

The rt288x and rt3883 devices in question don't have switches.
Only keep the merged case for rt305x.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Adrian Schmutzler f0435d5343 ramips: rt3883: remove swconfig from individual DEVICE_PACKAGES
In rt3883 subtarget, several devices add swconfig to their DEVICE_PACKAGES.
This is redundant as the package is already provided via DEFAULT_PACKAGES.

Remove the redundant inclusions.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Sungbo Eo a1693bf626 ramips: explicitly disable built-in switch for lan-only devices
Commit 8f6334eb94 ("ramips: explicitly disable built-in switch when needed")
did not fix rt288x and rt3883 devices. This patch deals with them.

While at it, consolidate duplicate cases in interface setup.

Signed-off-by: Sungbo Eo <mans0n@gorani.run>
4 years ago
Chuanhong Guo e320435a6a ramips: refresh kernel config for 5.4
Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
4 years ago
Chuanhong Guo 89bf2b18af ramips: copy kernel config for 5.4
Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
4 years ago
Chuanhong Guo 33d027c5b8 ramips: move and rename out-of-tree mtk eth driver
move the driver into shared 'files' directory and rename all symbols
from mediatek/mtk to ralink.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
4 years ago
Kip Porterfield 4b8d274456 ramips: add DTS triggers to USB LEDs for F9K1109v1
Alter DTS for Belkin F9K1109v1 to trigger USB leds from the echi/ochi
ports.

Signed-off-by: Kip Porterfield <kip.porterfield@gmail.com>
4 years ago
DENG Qingfang dcf7fdbdbf ramips: move swconfig to subtargets except for MT7621
As MT7621 does not use swconfig anymore, move the package swconfig to
other subtargets.

Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
4 years ago
Sungbo Eo 1f455418ef ramips: fix USB LED for Belkin F9K1109v1
Device support for Belkin F9K1109v1 was added using set_usb_led()
although this was removed in 772b27c207 ("ramips: set F5D8235 v1
usb led trigger via devicetree").

Use ucidef_set_led_usbport() instead.

Fixes: f2c83532f9 ("ramips: add support for Belkin F9K1109v1")

Signed-off-by: Sungbo Eo <mans0n@gorani.run>
[rephrase commit title and message]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Sungbo Eo aabdf6991c ramips: improve Samsung CY-SWR1100 support
This patch does the following:

- rename "devdata" flash partition and make it read-only
- switch from gpio-keys-polled to gpio-keys
- add missing power LED
- set correct PCI ID to compatible string in wifi node
- remove ralink,5ghz property in wifi node
- provide label MAC address

Rename devdata partition to devconf as indicated in the stock firmware
partition table:
00030000-00040000: "devdata"
00040000-00050000: "devconf"

Power LED can be controlled by SoC GPIO. Add it in the dts leds node.

RT3092L supports only bgn mode, so it is unnecessary to disable 5GHz band.

Signed-off-by: Sungbo Eo <mans0n@gorani.run>
5 years ago
Sungbo Eo 7231c1edd9 ramips: fix MAC address setup for Samsung CY-SWR1100
Ethernet MAC address setup has been broken since c3e420f28c. Restore
original setting.

Fixes: c3e420f28c ("ramips: Add support for D-Link DCH-M225")

Signed-off-by: Sungbo Eo <mans0n@gorani.run>
5 years ago
Adrian Schmutzler d2b9333ea9 ramips: remove default case for MAC address assignment
So far, MAC address assignment in ramips has contained a default
case, which defined wan_mac = eth0 + 1 for _every_ device not
having an explicit case there.

This is not desirable, as many device supporters will just not
care or know about this definition, so another MAC address will be
introduced by accident. In some cases the wan_mac is assigned
although it is not needed, in other cases even addresses not
dedicated to the device will be used (e.g. wan_mac actually is
eth0 - 1, but during support nobody cared, so eth0 + 1 is used now,
which might actually belong to another device ...).

Thus, in this PR the former default case is converted to an
explicit case. This one comprises all devices not being accounted
for by other cases, reduced by those not having wan at all.
The big number of entries for this node might be another indication
that many of them wouldn't actually be there if there hadn't been
default wan_mac setup.

In exchange, the current "do nothing" case can be removed, as it
will be the new default case.

The devices being put in the newly created explicit case were
determined as follows:

1. Create a list of all devices based on the DTS files.

2. Remove all devices already having an explicit entry setting
   their address.

3. Remove all devices that only have lan set up in the first part
   of 02_network:

mt7620:
   - alfa-network,tube-e4g
   - asus,rp-n53
   - buffalo,wmr-300
   - comfast,cf-wr800n
   - edimax,ew-7476rpc
   - edimax,ew-7478ac
   - elecom,wrh-300cr
   - hnet,c108
   - kimax,u25awf-h1
   - kimax,u35wf
   - kingston,mlw221
   - kingston,mlwg2
   - microduino,microwrt
   - netgear,ex2700
   - netgear,ex3700
   - netgear,wn3000rp-v3
   - planex,cs-qr10
   - planex,mzk-ex300np
   - planex,mzk-ex750np
   - ravpower,wd03
   - sercomm,na930
   - yukai,bocco
   - zbtlink,zbt-cpe102
   - zte,q7

mt7621:
   - gnubee,gb-pc1
   - gnubee,gb-pc2
   - linksys,re6500
   - mikrotik,rbm11g
   - netgear,ex6150
   - thunder,timecloud
   - tplink,re350-v1
   - tplink,re650-v1

mt76x8:
   - alfa-network,awusfree1
   - d-team,pbr-d1
   - glinet,vixmini
   - vocore,vocore2-lite
   - tama,w06
   - tplink,tl-mr3020-v3
   - tplink,tl-wa801nd-v5
   - tplink,tl-wr802n-v4
   - tplink,tl-wr902ac-v3
   - vocore,vocore2
   - widora,neo-16m
   - widora,neo-32m

rt288x:
   - buffalo,wli-tx4-ag300n
   - dlink,dap-1522-a1

rt305x:
   - allnet,all0256n-4m
   - allnet,all0256n-8m
   - allnet,all5002
   - allnet,all5003
   - alphanetworks,asl26555-16m
   - alphanetworks,asl26555-8m
   - asus,wl-330n
   - aximcom,mr-102n
   - dlink,dcs-930
   - easyacc,wizard-8800
   - hame,mpr-a2
   - hootoo,ht-tm02
   - huawei,d105
   - intenso,memory2move
   - planex,mzk-dp150n
   - rt305x dlink,dcs-930l-b1
   - sparklan,wcr-150gn
   - tenda,3g150b
   - tenda,3g300m
   - tenda,w150m
   - trendnet,tew-638apb-v2
   - unbranded,a5-v11
   - vocore,vocore-16m
   - vocore,vocore-8m
   - wansview,ncs601w
   - zorlik,zl5900v2

rt3883:
   - loewe,wmdr-143n
   - omnima,hpm

4. Put the remaining devices in the new case.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years ago
Adrian Schmutzler 19724e28c8 ramips: split base-files into subtargets
While most of the target's contents are split into subtargets, the
base-files are maintained for the target as a whole.

However, OpenWrt already implements a mechanism that will use (and
even prefer) files in the subtargets' directories. This can be
exploited to make several scripts subtarget-specific and thus save
some space.

In certain cases, keeping files in parent (=target) base-files was
more convenient, and thus no splitting was performed for those.

Note that this will increase overall code lines, but reduce code
per subtarget.

base-files ipk size reduction:
master (mt7621)   60958 B
split (mt7620)    46358 B (- 14.3 kiB)
split (mt7621)    48759 B (- 11.9 kiB)
split (mt76x8)    44948 B (- 15.6 kiB)
split (rt288x)    43508 B (- 17.0 kiB)
split (rt305x)    45616 B (- 15.0 kiB)
split (rt3883)    44176 B (- 16.4 kiB)

Run-tested on:
GL.iNet GL-MT300N-V2 (mt76x8)
D-Link DWR-116 (mt7620)

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years ago
Adrian Schmutzler 794d4b6652 treewide: remove kmod-usb-core from DEVICE_PACKAGES
This removes _all_ occurrences of kmod-usb-core from
DEVICE_PACKAGES and similar variables.

This package is pulled as dependency by one of the following
packages in any case:
- kmod-usb-chipidea
- kmod-usb-dwc2
- kmod-usb-ledtrig-usbport
- kmod-usb-ohci
- kmod-usb2
- kmod-usb2-pci
- kmod-usb3

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
[remove kmod-usb-core from EnGenius ESR600]
Signed-off-by: David Bauer <mail@david-bauer.net>
5 years ago
Chuanhong Guo 7a8d3432c7 ramips: use upstream RAW_APPENDED_DTB instead of our OWRTDTB
Upstream kernel added support for RAW_APPENDED_DTB on ralink arch
in the following commit:
02564fc89d3d ("ralink: Introduce fw_passed_dtb to arch/mips/ralink")

Use upstream solution and get rid of our OWRTDTB hack.
This commit set DEVICE_DTS to $$(DTS) instead of replacing DTS with
DEVICE_DTS in device profile because DTS variable will be dropped
in later commits.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
[Tested on mt7621/mt76x8]
Tested-by: Chuanhong Guo <gch981213@gmail.com>
[Tested on rt305x/mt7620]
Tested-by: INAGAKI Hiroshi <musashino.open@gmail.com>
5 years ago
Mathias Kresin 2a4e756085 ramips: rt3883: drop jimage support
The splitter isn't required by any of the boards in the subtarget.

Signed-off-by: Mathias Kresin <dev@kresin.me>
5 years ago
Mathias Kresin 8293aec943 ramips: disable CONFIG_MTD_SPLIT_FIRMWARE
It's no longer needed as all mt7621 devices use DT binding (supported by
upstream mtd code) for specifying "firmware" part format explicitly.

Signed-off-by: Mathias Kresin <dev@kresin.me>
5 years ago
Mathias Kresin cf7154db07 kernel: only optimized for size if small_flash
Add a new config option to allow to select the default compile
optimization level for the kernel.

Select the optimization for size by default if the small_flash feature is
set. Otherwise "Optimize for performance" is set.

Add the small_flash feature flag to all (sub)targets which had the
optimization for size in their default kernel config.

Remove CC_OPTIMIZE_FOR_* symbols from all kernel configs to apply the new
setting.

Exceptions to the above are:

  - lantiq, where the optimization for size is only required for the
    xway_legacy subtarget but was set for the whole target
  - mediatek, ramips/mt7620 & ramips/mt76x8 where boards should have
    plenty of space and an optimization for size doesn't make much sense
  - rb532, which has 128MByte flash

Signed-off-by: Mathias Kresin <dev@kresin.me>
6 years ago
Sergey Ryazanov 67a3cdcbb0 kernel: enable THIN_ARCHIVES by default
THIN_ARCHIVES option is enabled by default in the kernel configuration
and no one target config disables it. So enable it by default and remove
this symbol from target specific configs to keep them light.

Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
6 years ago
Sergey Ryazanov bdc2b58c4b kernel: enable FUTEX_PI by default
New FUTEX_PI configuration symbol enabled if FUTEX and RT_MUTEX symbols
are enabled. Both of these symbols are enabled by default in the
generic config, so enable FUTEX_PI by default too to keep platform
specific configs minimal.

Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
6 years ago
Sergey Ryazanov a08b0d0c31 kernel: enable EXPORTFS by default
OVERLAY_FS config symbol selects EXPORTFS since 4.12 kernel, we have
OVERLAY_FS enabled by default, so enable EXPORTFS in the generic config
of 4.14 and remove this option from platform specific configs.

Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
6 years ago
Sergey Ryazanov 978543a246 kernel: disable DRM_LIB_RANDOM by default
DRM_LIB_RANDOM config symbol selected only by DRM_DEBUG_MM_SELFTEST
which is disable by default, so disable DRM_LIB_RANDOM by default too.

Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
6 years ago
Sergey Ryazanov ead26e9db6 kernel: disable DMA_{NOOP|VIRT}_OPS by default
These options do not used by any supported arch, so disable them by
default to make arch configs a bit more clean.

Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
6 years ago
Sergey Ryazanov f928c338ad kernel: disable ARCH_WANTS_THP_SWAP by default
Only one arch (x86_64) enables this option. So disable
ARCH_WANTS_THP_SWAP by default and remove referencies to it from all
configs (except x86_64) to make them clean.

Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
6 years ago
Giuseppe Lippolis 1680ae7eae ramips: add dwr-512 jboot firmware configuration
The previous fw version require the replacement of the stock bootloader
with u-boot. This prevent an easy stock restore of the original fw.

Now a proper fw util has been developed to manage the stock jboot
bootloader. Therefore make sense have a fw image for the stock
bootloader.

The old fw configuration (u-boot) is not compatible with the new one
and will not be supported anymore.

So at the end 2 image can be generated:

1) factory image with jboot bootloader
     openwrt-ramips-rt305x-dwr-512-b-squashfs-factory.bin
2) sysupgrade image with jboot bootloader
     openwrt-ramips-rt305x-dwr-512-b-squashfs-sysupgrade.bin

Signed-off-by: Giuseppe Lippolis <giu.lippolis@gmail.com>
6 years ago
Felix Fietkau dea9922acd ramips: drop linux 4.9 support
4.14 has been tested a lot by a number of users, and we want to use it
for the release.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
6 years ago
Felix Fietkau 46c49d8381 kernel: optimize for performance by default starting with 4.14
Keep size optimizations for smaller targets that already switched

Signed-off-by: Felix Fietkau <nbd@nbd.name>
6 years ago
Roman Yeryomin f4e5880d0f ramips: preliminary support for 4.14
- removed upstreamed patches
- 0901-spansion_nand_id_fix.patch is disabled, not clear if it's needed

Signed-off-by: Roman Yeryomin <roman@advem.lv>
Signed-off-by: John Crispin <john@phrozen.org>
6 years ago
Felix Fietkau c08293893a kernel: add support for limiting 4K erase sector support based on flash chip size
Some targets need 4K sectors for small flash chips (e.g. some
routerboards, where the entire chip is just one "erase block"), whereas
on other devices 4K sectors lead to horrible flash erase/write
performance.

Set the default limit in the generic kernel configuration to 4 MiB to
ensure that all new platforms don't use 4K sectors for bigger flash
chips. On all existing targets use 16 MiB for now to avoid regressions.
They will be changed individually in follow-up commits.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Mathias Kresin 7985bf23ef ramips: drop stray kernel 4.4 configs
The kernel 4.4 patches where already removed with the bump to 4.9. Drop
the the subtarget configs as well.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
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>
7 years ago
Sergey Ryazanov 68e7a2a0b7 kernel: disable CONFIG_SG_POOL by default
CONFIG_SG_POOL symbol is selected only by CONFIG_SCSI, since the last
one is disabled by default then disable CONFIG_SG_POOL by default too.
And explicitly enable it only for platforms that use CONFIG_SCSI.

Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
7 years ago
Daniel Golle d17cb4a68a ramips: purge default packages on MT7621
In order to have a smaller initramfs image remove all packages not
needed on all devices and add them explicitely for those actually
needing them. Also remove wpad-mini from ramips default package set
and add it to all sub-targets except for MT7621.
While at it reorder packages alphabetically and replace kmod-mt76 with
kmod-mt7603 and/or kmod-mt76x2 depending on the chip actually used on
a specific board.

Hopefully fixes FS#758

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
7 years ago
John Crispin 9c24227090 ramips: add v4.9 support
NAND support is missing

Signed-off-by: John Crispin <john@phrozen.org>
7 years ago
Mathias Kresin 925e63e71f ramips: enable 4K sector support in kernel config
This is a follow up to 28110727f1
"ramips: set blocksize for 4MB devices". I've missed to include the
required changes of the kernel configs to enable 4K sector size
support.

The option is only enabled for targets having boards with 4k sector
size flash chips.

Signed-off-by: Mathias Kresin <dev@kresin.me>
8 years ago
John Crispin 8e75630d1d ramips: updated remaining profiles to the new image building code
Signed-off-by: John Crispin <john@phrozen.org>
8 years ago
Felix Fietkau 9abbaa9539 build: remove MIPS dsp/dsp2 CPU_SUBTYPE
There does not seem to be any meaningful difference in generated code.
This will save some time and space on snapshot builds

Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
Álvaro Fernández Rojas 604b92dbd0 ramips: fix the number of uarts for each SoC
- Use default number of uarts (2) for rt288x/rt305x/rt3883/mt7620.
- Allow up to 3 uarts on MT7621 and MT7628.
- Remove unneeded SERIAL_8250_RT288X for MT7628.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
8 years ago
John Crispin 5d0eff9801 ramips: set default profile to priority 1
doing so will sort all profiles alphabetically

Signed-off-by: John Crispin <john@phrozen.org>
8 years ago
Jo-Philipp Wich e885286834 target: globally remove ARCH_PACKAGES overrides
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
8 years ago
Felix Fietkau 3abf5ce656 ramips: convert the remaining subtargets to 4.4
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 48954
8 years ago
John Crispin b4bb10b3a0 ralink: update config files to build the cleaned up ethernet driver
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 47902
9 years ago
John Crispin 5d4f5689fd ramips: add missing kernel symbols
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 47884
9 years ago
John Crispin 6df4426245 ralink: bump to the target to v4.3
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 47831
9 years ago
Jonas Gorski efb2c403cf ramips: disable the openwrt commandline hack
We don't make use of it, so no need to have it enabled.

Signed-off-by: Jonas Gorski <jogo@openwrt.org>

SVN-Revision: 46759
9 years ago