Commit Graph

254 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
Petr Štetiar 504000d520 treewide: use DEFAULT := n to disable non-broken devices
This uses DEFAULT := n on a bunch of devices that previously were
"disabled" by commenting out TARGET_DEVICES. This will allow to
build them without having to modify the code, but they will not
be selected for default build or buildbots.

The change is applied to all devices that are not "broken", but suffer
from image site limitations or similar, or have been added in the past
but never confirmed to run on the device properly:

at91: at91-q5xr5:
  kernel image too big
  31aeae0774 ("at91: do not build image for at91-q5xr5")

bcm47xx: asus-rt-ac66u:
  disabled since it was added in 2015
  69aefc771f ("brcm47xx: build images for Asus devices")

bcm47xx: netgear-wndr3400-vcna, netgear-wnr3500u, netgear-wnr3500-v2-vc
  added disabled in 2012, but never confirmed to work on devices
  5dec9dd3b2 ("brcm47xx: add code to generate images for some netgear
    devices")

bcm53xx: netgear-r8500
  added disabled: "start working on Netgear R8500"
  3b76c7cf0b ("bcm53xx: start working on Netgear R8500")

Signed-off-by: Petr Štetiar <ynezz@true.cz>
[limit to subset of devices, adjust commit message/title]
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
Adrian Schmutzler bb39fea11a treewide: simplify inclusion of subtarget image files
Many target use a repetitive if-include scheme for their subtarget
image files, though their names are consistent with the subtarget
names.

This patch removes these redundant conditions and just uses the
variable for the include where the target setup allows it.

For sunxi, this includes a trivial rename of the subtarget image
Makefiles.

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
Rosen Penev 55383a9a7a at91: gen_at91_sdcard_img.sh: switch to /bin/sh
Nothing here needs bash.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
[add prefix to commit title]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Daniel Golle c1db4d9c56 at91: disable legacy PTYs and virtual terminals
Enabling legacy PTYs causes problems with procd-hotplug.
And as this is a headless target, no need to have virtual terminals.
Remove corresponding kernel config options, they are disabled in
generic kernel config.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
4 years ago
Moritz Warning e6114ff925 at91: split up remaining DEVICE_TITLE definitions
DEVICE_TITLE is split up into DEVICE_VENDOR, DEVICE_MODEL and DEVICE_VARIANT

Signed-off-by: Moritz Warning <moritzwarning@web.de>
5 years ago
Adrian Schmutzler c5b4fa20fa treewide: replace backticks by $(...) in gen_*_img.sh scripts
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
Sandeep Sheriker M 89fe1dfac2 at91:sam9x: create sdcard images
create sdcard images for sam9x25 & sam9x35 ek targets.

Signed-off-by: Sandeep Sheriker M <sandeep.sheriker@microchip.com>
5 years ago
Sandeep Sheriker M 612e9ed7b8 at91:sama5: create fit image
create fit image & add it to sdcard image for sama5 target
device.

Signed-off-by: Sandeep Sheriker M <sandeep.sheriker@microchip.com>
5 years ago
Sandeep Sheriker M 552c48ea43 at91/image/sama5.mk: check for sama5d4_xplained device
check for sama5d4_xplained device while copying at91bootstrap binary
to sdcard image.

Signed-off-by: Sandeep Sheriker M <sandeep.sheriker@microchip.com>
5 years ago
Sandeep Sheriker M 05a81abb5f at91: remove Build/at91-sdcard command
remove at91-sdcard build command from Makefile as this is moved to
respective subtarget Makefile.

Signed-off-by: Sandeep Sheriker M <sandeep.sheriker@microchip.com>
5 years ago
Sandeep Sheriker M 575950e376 at91: add uboot environments
add uboot environments to sdcard image

Signed-off-by: Sandeep Sheriker M <sandeep.sheriker@microchip.com>
5 years ago
Sandeep Sheriker M 32d4e4226d at91: move at91-sdcard command to sama5.mk
Signed-off-by: Sandeep Sheriker M <sandeep.sheriker@microchip.com>
5 years ago
Sandeep Sheriker M 0b7c66c93b at91bootstrap: add sama5d27_som1_eksd1_uboot as default defconfig
Signed-off-by: Sandeep Sheriker M <sandeep.sheriker@microchip.com>
5 years ago
Moritz Warning 6933f2bc1d
at91: split up DEVICE_TITLE
DEVICE_TITLE is split up into DEVICE_VENDOR, DEVICE_MODEL and DEVICE_VARIANT

Signed-off-by: Moritz Warning <moritzwarning@web.de>
5 years ago
Sandeep Sheriker M a765a2178c at91:renaming subtraget legacy to sam9x
renaming subtraget legacy to sam9x for adding new sam9 soc's

Signed-off-by: Sandeep Sheriker M <sandeep.sheriker@microchip.com>
5 years ago
Hauke Mehrtens ed224b1880 at91: Update kernel to version 4.14
This adds support for kernel 4.14 to the target and directly make it the
default kernel version to use.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Tested-by: Sandeep Sheriker <sandeepsheriker.mallikarjun@microchip.com>
5 years ago
Hauke Mehrtens aff084adf3 at91: Merge SAMA5 subtargets
Instead of maintaining 3 very similar subtargets merge them into one.
This does not use the Arm NEON extension any more, because the SAMA5D3
does not support NEON.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Tested-by: Sandeep Sheriker <sandeepsheriker.mallikarjun@microchip.com>
5 years ago
Hauke Mehrtens 28e00650a5 at91: Clean up kernel configuration
This removes some settings which are normally set by the generic
configuration and should not be changed.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Tested-by: Sandeep Sheriker <sandeepsheriker.mallikarjun@microchip.com>
5 years ago
Hauke Mehrtens bf0e4cb13f at91: Refresh kernel configuration
The configuration of the sama5d4 subtarget was used as the default
configuration and then the subtarget configurations were adapted.

The resulting kernel configuration without any extra modules selected is
still the same.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Tested-by: Sandeep Sheriker <sandeepsheriker.mallikarjun@microchip.com>
5 years ago
Hauke Mehrtens 57ec21ef3d kernel: Activate CONFIG_SYN_COOKIES for all targets
Some targets deactivated CONFIG_SYN_COOKIES, for unknown reasons, use
the default setting from the generic configuration which activates
CONFIG_SYN_COOKIES.

This should prevent SYN flooding.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 years ago
Hauke Mehrtens fd5c168701 kernel: Build: Split kmod-regmap
This reduces the needed modifications to the mainline Linux kernel and
also makes the regmap package work with an out of tree kernel which
does not have these modifications.

The regmap-core is only added when it is really build as a module.
The regmap-core is normally bool so it cannot be built as a module in an
unmodified kernel. When it is selected by on other kernel module it will
always be selected as build in and it also does not show up in
$(LINUX_DIR)/modules.builtin as it is not supposed to be a kernel module.
When it is not in $(LINUX_DIR)/modules.builtin the build system expects
it to be built as a .ko file.
Just check if the module is really there and only add it in that case.

This splits the regmap package into multiple packages, one for each bus type.
This way only the bus maps which are really needed have to be added.
This also splits the I2C, SPI and MMIO regmap into separate packages to not
require all these subsystems to build them, on an unmodified upstream kernel
this also causes problems in some situations.

Signed-off-by: Hauke Mehrtens <hauke.mehrtens@intel.com>
5 years ago
Petr Štetiar 87dcf24548 at91: dts: Unify naming of gpio-keys nodes
In DTS Checklist[1] we're now demanding proper generic node names, as
the name of a node should reflect the function of the device and use
generic name for that[2]. Everybody seems to be copy&pasting from DTS
files available in the repository today, so let's unify that naming
there as well and provide proper examples.

1. https://openwrt.org/submitting-patches#dts_checklist
2. https://github.com/devicetree-org/devicetree-specification/blob/master/source/devicetree-basics.rst#generic-names-recommendation

Signed-off-by: Petr Štetiar <ynezz@true.cz>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com> [split up]
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
Petr Štetiar 0d23fd2ab2 treewide: dts: Remove default-state=off property from all gpio LED nodes
>From the Documentation/devicetree/bindings/leds/common.txt:

- default-state : The initial state of the LED. Valid values are "on", "off",
  and "keep". If the LED is already on or off and the default-state property is
  set the to same value, then no glitch should be produced where the LED
  momentarily turns off (or on). The "keep" setting will keep the LED at
  whatever its current state is, without producing a glitch.  The default is
  off if this property is not present.

So setting the default-state of the LEDs to `off` is redundant as `off`
is default LED state anyway. We should remove it as almost every new
PR/patch submission contains this property by default which seems to be
just copy&paste from some DTS file already present in the tree.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
5 years ago
Koen Vandeputte dfbf836a52 kernel: bump 4.9 to 4.9.143
Refreshed all patches.

Altered patches:
- 950-0063-Improve-__copy_to_user-and-__copy_from_user-performa.patch
- 201-extra_optimization.patch

New symbol:
- CONFIG_HARDEN_BRANCH_PREDICTOR

Compile-tested on: ar7, at91, brcm2708, ixp4xx, layerscape, orion
Runtime-tested on: none

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
[fix brcm2708/950-0149-Update-vfpmodule.c.patch]
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
5 years ago
Felix Fietkau 212aa33226 kernel: enable memory compaction
Compaction is the only memory management component to form high order (larger
physically contiguous) memory blocks reliably. The page allocator relies on
compaction heavily and the lack of the feature can lead to unexpected OOM
killer invocations for high order memory requests. You shouldn't disable this
option unless there really is a strong reason for it.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Michal Hrusecky <michal.hrusecky@nic.cz>
6 years ago
Paul Wassi e348ccc4e6 treewide: fix some cosmetic glitches in dts files
- fix single spaces hidden by a tab
- replace indentation with spaces by tabs
- make empty lines empty
- drop trailing whitespace
- drop unnecessary blank lines

Signed-off-by: Mathias Kresin <dev@kresin.me>
Signed-off-by: Paul Wassi <p.wassi@gmx.at>
6 years ago
Hauke Mehrtens 31aeae0774 at91: do not build image for at91-q5xr5
The kernel image of the at91-q5xr5 is getting too bing now and this is
breaking the build. Remove the image for the at91-q5xr5 from the build
to at least build images for the other devices.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
6 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
Luis Araneda 8f60c3d571 kernel: remove DEVMEM and DEVKMEM from target's config
These options are handled by generic configuration

Targets that need these options should select KERNEL_DEVMEM
and/or KERNEL_DEVKMEM options on OpenWRT's config

Signed-off-by: Luis Araneda <luaraneda@gmail.com>
6 years ago
Koen Vandeputte 12f44b83a8 kernel: bump 4.9 to 4.9.100
Refreshed all patches

Added new ARM64 symbol: ARM64_ERRATUM_1024718

Compile-tested on: ar71xx
Runtime-tested on: ar71xx

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
6 years ago
Jo-Philipp Wich aadca035bc at91: sama5d4: fix bad mkubifs options
Drop the "-x lzo" compression type override from MKUBIFS_OPTS since we
do not support it in mkfs.ubifs. Attempting to use LZO compression results
in "Error: bad compressor name".

The build system also appends an explicit "--compr=zlib" to the mkfs command
line, turning the "-x" flag into a no-op anyway.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
6 years ago
Jo-Philipp Wich cf7a88cf5a at91: cleanup kernel configurations
The subtarget configurations contained a lot of reduntant symbols, arbitrary
overrides and symbols set to =m.

Remove most of these redundant settings to shrink the subtarget configurations
to a manageable size.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
6 years ago
Jo-Philipp Wich f23326eb76 at91: sama5d2: remove CONFIG_XZ_DEC override
Fixes the following error spotted by the buildbot:

    Package kmod-fs-squashfs is missing dependencies for the following libraries:
    xz_dec.ko

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
6 years ago
Jo-Philipp Wich 0167f53b9d at91: add missing config symbols
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
6 years ago
Sandeep Sheriker Mallikarjun 610770dc5b at91: refreshing kernel configurations.
refreshing kernel configurations for sama5 and legacy subtarget.

Signed-off-by: Sandeep Sheriker Mallikarjun <sandeepsheriker.mallikarjun@microchip.com>
6 years ago
Sandeep Sheriker Mallikarjun 27ca6cdc7b at91: Add SAMA5D2 PTC EK board
Add target device as at91-sama5d2_ptc_ek in SAMA5D2 subtarget and
build images for SAMA5D2 PTC Ek board.

Signed-off-by: Sandeep Sheriker Mallikarjun <sandeepsheriker.mallikarjun@microchip.com>
6 years ago
Sandeep Sheriker Mallikarjun 60750ab505 at91: reorganize at91 subtargets
reorganizing at91 subtargets based on sama5 soc features and this fix
below problems.
  1. able to set neon flags to sama5d2 & sama5d4 subtargets.
  2. fix the make clean which removes all the subtargets in bin folder.
  3. able to configure kernel specific to subtarget.
  4. able to set vfpu4 flags to samad3 subtargets.

Signed-off-by: Sandeep Sheriker Mallikarjun <sandeepsheriker.mallikarjun@microchip.com>
6 years ago
Sandeep Sheriker Mallikarjun 581f5e2392 at91: sdcard image with ext4 rootfs
creating sdcard image with ext4 rootfs only and ignoring creating
other filesystem in sdcard image.

Signed-off-by: Sandeep Sheriker Mallikarjun <sandeepsheriker.mallikarjun@microchip.com>
6 years ago
Sandeep Sheriker Mallikarjun 22c398d257 at91: Add SAMA5D27 SOM1 EK board
Add support for SAMA5D27 SOM1 with target device as at91-sama5d27_som1_ek
in SAMA5 subtarget and build images for SAMA5D27 SOM1 Ek board.

Signed-off-by: Sandeep Sheriker Mallikarjun <sandeepsheriker.mallikarjun@microchip.com>
6 years ago
Sandeep Sheriker Mallikarjun 130224cc47 at91: fix sdcard create image
copying at91bootstrap and uboot binaries to sdcard image is done
based on device name instead of dts name and this avoids creating
multiple u-boot and at91bootstrap binaries.

Signed-off-by: Sandeep Sheriker Mallikarjun <sandeepsheriker.mallikarjun@microchip.com>
6 years ago
Sandeep Sheriker Mallikarjun 2391d6a29e at91: sama5: remove neon and VFPv4 support
sama5d2 & samad4 have neon feature and sama5d3 does not have neon
feature due to which sama5d3 boot fails with error message Kernel
panic - not syncing: Attempted to kill init! exitcode=0x00000004.
removing neon & VFPv4 support to fix this

Signed-off-by: Sandeep Sheriker Mallikarjun <sandeepsheriker.mallikarjun@microchip.com>
6 years ago
Sandeep Sheriker Mallikarjun 80fe9bd71c at91: fix build error for wb50n.
when external kernel is selected from menuconfig, device wb50n is not
avaliable and build fails. As a fix adding checks for external kernel.

Signed-off-by: Sandeep Sheriker Mallikarjun <sandeepsheriker.mallikarjun@microchip.com>
6 years ago
Jo-Philipp Wich b9aca834e8 at91: fix image building with CONFIG_TARGET_MULTI_PROFILE
The current image build code has a number of race conditions and interface
contract violations in the custom image build steps:

 - Build/install-zImage, solely used by at91, relies on $(PROFILE_SANITIZED)
   which is not available when building with CONFIG_TARGET_MULTI_PROFILE

 - Build/at91-sdcard, which may run concurrently, creates scratch files at
   fixed locations and manipulates target files directly which can lead
   to file corruption and other unexpected failures

Rename the install-zImage macro to at91-install-zImage and move it to the
at91 image Makefile since this target is the sole user. Also utilize "$@"
as output file name and switch the usage of $(PROFILE_SANITIZED) to
$(DEVICE_NAME) in order to fix naming under multi profile builds.

Fix the at91-sdcard macro to construct scratch file paths relative to "$@",
which is guaranteed to be unique and store the final artifact output in "$@"
as well, instead of inside $(BIN_DIR). The generic image build code takes
care of moving a build steps "$@" output to the final destination in a
concurrency-safe manner.

Finally remove the broken install-zImage from the generic image-commands
Makefile.

Fixes: d7a679a036 ("at91: Install zImage.")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
6 years ago
Hauke Mehrtens 31fca075c7 at91: create device specific sdcard images
Without this patch one sdcard image with the following name is created
for all devices:
openwrt-at91-sama5--sdcard.img.gz
This makes the build system create device specific versions like:
openwrt-at91-sama5-at91-sama5d2_xplained-sdcard.img.gz

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
6 years ago
Hauke Mehrtens 01cc6bd495 at91: sama5: activate fpu
This activates neon and VFPv4 support for this target. The CPU support
these feature so also use them.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
6 years ago
Sandeep Sheriker Mallikarjun 085967f774 at91: create sdcard image for sama5
create sdcard image using gen_at91_sdcard_img.sh for sama5 platform
and sdcard image partition layout is:
  P0: Boot (fat32) - contains(at91bootstrap,u-boot,zImage & dtb)
  p1: Rootfs (ext4)

Signed-off-by: Sandeep Sheriker Mallikarjun <sandeepsheriker.mallikarjun@microchip.com>
6 years ago