Commit Graph

207 Commits (fbd4214bb0727268aa535af5b600d38939ec8dbc)

Author SHA1 Message Date
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
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
Adrian Schmutzler 1b2144e81f octeon: set 5.4 as default kernel
octeon has provided 5.4 as testing kernel for some time now, let's
switch to 5.4 to have a bigger audience for testing.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Adrian Schmutzler f6573ec24e octeon: use kernel version 5.4 for testing
Tested on EdgeRouter Lite (by Daniel Engberg)

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Daniel Engberg 2095a4e276 octeon: update config for kernel 5.4
Update config with make kernel_oldconfig.

Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
[split patch, redo kernel_oldconfig, add description]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Daniel Engberg 655c14e88c octeon: refresh patches for kernel 5.4
Refresh patches to make them apply to kernel 5.4.

Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
[split patch, refresh on newer kernel, add description]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Daniel Engberg 91594cb137 octeon: copy files to kernel 5.4
Copy config and patches to kernel 5.4.

Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
[split patch, fix patches-5.4 dirname, add description]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Petr Štetiar 9ba09653ad treewide: remove maintainer variable from targets
There is no such role as target maintainer anymore, one should always
send corresponding changes for the review and anyone from the commiters
is allowed to merge them or eventually use the hand break and NACK them.

Lets make it clear, that it is solely a community doing the maintenance
tasks.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
Acked-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Acked-by: Piotr Dymacz <pepe2k@gmail.com>
4 years ago
Hauke Mehrtens 0a2682a204 octeon: Remove kernel 4.14 support
This target was switched to kernel 4.19 more than 6 months ago in commit
f342ffd300 ("treewide: kernel: bump some targets to 4.19") and now
with kernel 5.4 support being added it gets harder to support kernel
4.14 in addition to kernel 4.19 and 5.4.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 years ago
Adrian Schmutzler 1e3bfbafd3 octeon: apply vendor_model scheme to device definition/image name
This updates the device definition name for octeon target to provide
more useful names for the images and be consistent with the increasing
number of targets following that scheme.

Since the target is not using device tree yet, this does not touch
board_name and thus sets BOARD_NAME in image Makefile to ensure
sysupgrade is still working.

While at it, move Build block before Device blocks and remove trailing
whitespace for CMDLINE.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Adrian Schmutzler ca63d17531 octeon: remove redundant network setup
No need to have specific setup when default case does the same.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Stijn Tintel 291d79935e octeon: fix sysupgrade
Sysupgrade was failing due to incorrect replacement of backticks:
/sbin/sysupgrade: /lib/upgrade/platform.sh: line 101: syntax error: missing '))'

Fixes: 0bbfc3dff7 ("octeon: replace backticks by $(...)")
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
4 years ago
Moritz Warning 036f1d9bac octeon: split up remaining DEVICE_TITLE
DEVICE_TITLE is split up into DEVICE_VENDOR and DEVICE_MODEL

Signed-off-by: Moritz Warning <moritzwarning@web.de>
5 years ago
Adrian Schmutzler 0bbfc3dff7 octeon: replace backticks by $(...)
This replaces deprecated backticks by more versatile $(...) syntax.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
[decapitalized patch subject at submitter's request]
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
5 years ago
Rafał Miłecki 641f6b6c26 treewide: use new procd sysupgrade $UPGRADE_BACKUP variable
It's a variable set by procd that should replace hardcoded
/tmp/sysupgrade.tgz.

This change requires the most recent procd with the commit 0f3c136
("sysupgrade: set UPGRADE_BACKUP env variable").

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
5 years ago
Rafał Miłecki 62dbe361a1 treewide: when copying a backup file always specify dest name
$CONF_TAR shouldn't be assumed to always point to the sysupgrade.tgz.
This change makes code more generic and allows refactoring $CONF_TAR.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
5 years ago
Rafał Miłecki bf39047872 treewide: don't hardcode "sysupgrade.tgz" file name
1) Add BACKUP_FILE and use it when copying an archive to be restored
   after sysupgrade (on the next preinit).
2) Use CONF_TAR for copying backup prepared by the /sbin/sysupgrade

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
5 years ago
Moritz Warning d07a263ae6 octeon: split up DEVICE_TITLE
Splits up DEVICE_TITLE into DEVICE_VENDOR, DEVICE_MODEL and DEVICE_VARIANT.

Signed-off-by: Moritz Warning <moritzwarning@web.de>
5 years ago
Petr Štetiar f342ffd300 treewide: kernel: bump some targets to 4.19
Lets bump kernel to 4.19 on targets which were run tested or got ACKed
so we've enough time to make it ready for next release:

 armvirt/32 (runtested in qemu)
 armvirt/64 (runtested in qemu)
 ath79/generic (runtested on Carambola2)
 gemini/generic (runtested on DIR-685, DNS-313, SQ201, SL93512R)
 imx6/generic (runtested on Apalis)
 ipq40xx/generic (runtested on nbg6617)
 malta/be64 (runtested in qemu)
 malta/be (runtested in qemu)
 malta/le (runtested in qemu)
 malta/le64 (runtested in qemu)
 mpc85xx/generic (runtested on TL-WDR4900)
 mpc85xx/p2020 (runtested on P2020RDB)
 mvebu/cortexa53
 mvebu/cortexa72
 mvebu/cortexa10
 octeon/generic (runtested on EdgeRouter Lite)
 sunxi/cortexa53 (build tested only)
 sunxi/cortexa7 (runtested on Lime2-K)
 sunxi/cortexa8 (build tested only)
 tegra/generic
 x86/64 (runtested in qemu)

Acked-by: Zoltan HERPAI <wigyori@uid0.hu> [sunxi]
Tested-by: Linus Walleij <linus.walleij@linaro.org> [gemini]
Tested-by: Tomasz Maciej Nowak <tomek_n@o2.pl> [mvebu, tegra]
Tested-by: Daniel Engberg <daniel.engberg.lists@pyret.net> [octeon]
Tested-by: Pawel Dembicki <paweldembicki@gmail.com> [mpc85xx/generic mpc85xx/p2020]
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
Signed-off-by: Petr Štetiar <ynezz@true.cz>
5 years ago
Hauke Mehrtens 529c3477b9 octeon: Deactivate MIPS O32 and N32 support
OpenWrt is completely compiled from sources using a 64 bit compiler, we
do not need support for the old 32 bit MIPS interface on 64 Bit CPUs,
deactivate it.

Fixes: 46af22de16 ("kernel: Remove CONFIG_COMPAT")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 years ago
Hauke Mehrtens 77401cdc40 octeon: Refresh kernel configuration
This refreshes the kernel configuration with "make kernel_oldconfig"

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 years ago
Hauke Mehrtens 46af22de16 kernel: Remove CONFIG_COMPAT
This removes support for executing old 32 bit applications on 64 bit ARM
and MIPS kernels.
On OpenWrt we normally compile all the user space applications on our
own and do not support third party binary only modules especial not 32
bit applications on 64 bit CPUs.

This reduces the attack surface on such systems and should also save
some memory.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 years ago
Felix Fietkau 85017c40f4 build: add a config option for enabling a testing version of the target kernel
If the target supports a newer kernel version that is not used by default
yet, it can be enabled with this option

Signed-off-by: Felix Fietkau <nbd@nbd.name>
5 years ago
Koen Vandeputte 8df12d76c6 kernel: bump 4.19 to 4.19.34
Refreshed all patches.

Removed:
- 030-PCI-dwc-skip-MSI-init-if-MSIs-have-been-explicitly-d.patch

Altered:
- 366-netfilter-nf_flow_table-clean-up-and-fix-dst-handlin.patch
- 650-netfilter-add-xt_OFFLOAD-target.patch
- 662-remove_pfifo_fast.patch
- 332-arc-add-OWRTDTB-section.patch
- 100-clocksource-drivers-arch_timer-Workaround-for-Allwin.patch
- 702-phy_add_aneg_done_function.patch

New symbols:
- ARC_IRQ_NO_AUTOSAVE
- SUN50I_ERRATUM_UNKNOWN1

Compile-tested: cns3xxx, imx6, sunxi
Runtime-tested: cns3xxx, imx6

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years ago
Daniel Engberg 6c22545225 target/octeon: Add Linux 4.19 support
This commit adds support for Linux 4.19 kernel, various cleanups
listed below.

Drop 170-cisco-hack.patch as these devices never seems to have been
supported.

Unset kernel symbols:

* CONFIG_CAVIUM_CN63XXP1=y
  No supported hardware uses CN63XXP1 and it causes "slight decrease in
  performance"
  Source: https://cateee.net/lkddb/web-lkddb/CAVIUM_CN63XXP1.html

* CONFIG_USB_OCTEON_EHCI=y
  CONFIG_USB_OCTEON_OHCI=y
  Deprecated
  Source: https://cateee.net/lkddb/web-lkddb/USB_OCTEON_EHCI.html
  https://cateee.net/lkddb/web-lkddb/USB_OCTEON_OHCI.html

Removed kernel symbols:

* # CONFIG_ARCH_HIBERNATION_POSSIBLE=y
* CONFIG_ARCH_SUSPEND_POSSIBLE=y
  These are not in if you do a vanilla config of a MIPS Octeon kernel
  and I can't find any references about support on this platform.

* # CONFIG_BOOTPARAM_HUNG_TASK_PANIC is not set
* CONFIG_BOOTPARAM_HUNG_TASK_PANIC_VALUE=0
  No need to have this in by default, not defined in most other targets

* CONFIG_CRASH_CORE=y
  Can't find any documentation why this should be enabled by default

* CONFIG_DEBUG_INFO=y
  Set by https://github.com/openwrt/openwrt/blob/master/config/Config-kernel.in#L134

* CONFIG_DEBUG_SPINLOCK=y
  No need to have this in by default

* CONFIG_DEFAULT_HUNG_TASK_TIMEOUT=120
  Already set by default
  Source: https://cateee.net/lkddb/web-lkddb/DEFAULT_HUNG_TASK_TIMEOUT.html

* CONFIG_DETECT_HUNG_TASK=y
  No need to have this in by default, not defined in most other targets

* CONFIG_HAVE_DEBUG_KMEMLEAK=y
  No need to have this in by default, not defined in most other targets

* CONFIG_HAVE_DEBUG_STACKOVERFLOW=y
  No need to have this in by default

* CONFIG_HAVE_IDE=y
  None of the supported devices have IDE

* CONFIG_HZ=250
* # CONFIG_HZ_100 is not set
* CONFIG_HZ_250=y
  This is broken with generic config

* CONFIG_KALLSYMS=y
  No need to have this in by default, not defined in most other targets

* CONFIG_KEXEC=y
* CONFIG_KEXEC_CORE=y
  No need to have this in by default, not defined in most other targets

* CONFIG_HAVE_KVM=y
  No need to have this in by default

* CONFIG_SCHED_DEBUG=y
  No need to have this in by default, not defined in most other targets

* CONFIG_SYSFS_DEPRECATED=y
  Deprecated symbol
  Source: https://cateee.net/lkddb/web-lkddb/SYSFS_DEPRECATED.html

* CONFIG_SYSFS_DEPRECATED_V2=y
  Discouraged usage in general
  Source: https://cateee.net/lkddb/web-lkddb/SYSFS_DEPRECATED_V2.html

* CONFIG_UNINLINE_SPIN_UNLOCK=y
  No need to have this in by default, not defined in most other targets
  Source: https://github.com/openSUSE/kernel/blob/master/lib/Kconfig.debug#L1137

* CONFIG_ZLIB_INFLATE=y
  No need to have this in by default, not defined in most other targets

Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
5 years ago
Hans Dedecker 4bd9d331e5 octeon: fix typo in platform.sh
Fix upgrade typo

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
5 years ago
Hauke Mehrtens 89f8a8be7f kernel: Deactivate CONFIG_COMPAT_BRK
CONFIG_COMPAT_BRK disables the heap randomization which is only needed
for very old and ancient user space applications, I am not aware that we
run any of these, just deactivate this option for these targets to allow
heap randomization.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 years ago
Jonathan Thibault e93e2b6318 octeon: Evaluate board names in alphabetical order
Signed-off-by: Jonathan Thibault <jonathan@navigue.com>
5 years ago
Felix Fietkau 6ce13b87eb octeon: remove linux 4.9 support
Signed-off-by: Felix Fietkau <nbd@nbd.name>
6 years ago
Daniel Engberg c6e02b49f6 octeon: Add and set CPU type Octeon+ as default
The lowest CPU type used by supported Octeon platform
is Octeon+ (EdgeRouter Lite) while EdgeRouter Pro/ER-8 uses
Octeon II which is backwards compatible with Octeon+.

Sources:
https://community.ubnt.com/t5/EdgeRouter/EdgeRouter-Pro-CPU/td-p/654599
https://www.cavium.com/octeon-II-CN68XX.html
"OCTEON II family is fully software compatible with the widely-adopted
OCTEON Plus family"

Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
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
Stijn Tintel 9a08c104e2 octeon: switch to kernel 4.14
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
6 years ago
Jo-Philipp Wich 7e99a6ba69 target: disable CONFIG_PROC_PAGE_MONITOR on most targets
Disable CONFIG_PROC_PAGE_MONITOR in most places and only keep it enabled
for virtual targets such as malta or potent ones like x86.

This saves up to 4KB of uncompressed kernel size and significantly
decreases CPU load under certain workloads.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
6 years ago
Kevin Darbyshire-Bryant 7c7586b6d0 kernel: bump 4.14 to 4.14.13
Refresh patches

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
6 years ago
Stijn Tintel 56767dfa42 octeon: add support for kernel 4.14
Tested on EdgeRouter Lite.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
6 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
Mathias Kresin ac3e05c5d7 treewide: populate boardname and model earlier
For targets using the generic board detection and board specific
settings in diag.sh, the board name is still unset at the time the
set_state() provided by diag.sh is called by 10_indicate_preinit.

Change the execution order to ensure the boardname is populated before
required the first time. Do the target specific board detection as
early as possible, directly followed by the generic one to allow a
seamless switch to the generic function for populating /tmp/sysinfo/.

Signed-off-by: Mathias Kresin <dev@kresin.me>
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
Felix Fietkau 1d44593c49 octeon: enable high-res timers
Helps with network stack performance

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Felix Fietkau 30bf133699 octeon: remove linux 4.4 support
Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Felix Fietkau 611731a690 octeon: port missing 4.9 patches
Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
John Crispin c186a48fca octeon: only copy sysupgrade file if present
this caused

'mv: can't rename '/mnt/sysupgrade.tgz': No such file or directory'

when running sysupgrade -n

Signed-off-by: John Crispin <john@phrozen.org>
7 years ago
John Crispin 1753720261 octeon: bump to v4.9
Signed-off-by: John Crispin <john@phrozen.org>
7 years ago
Jiri Kastner cf79e393f9 octeon: fix mtd partitions for erlite on cmdline
erlite mtdparts exposes boot0, boot1 and eeprom regions
as read/write.
this patch adds readonly flags, so these regions can't be
modified. same as it is already for ER profile.

Signed-off-by: Jiri Kastner <cz172638@gmail.com>
7 years ago
Felix Fietkau 27fbf54147 octeon: disable ext4 images
They're pretty large and squashfs images tend to be more useful anyway

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago