Commit Graph

242 Commits (fbd4214bb0727268aa535af5b600d38939ec8dbc)

Author SHA1 Message Date
Linus Walleij 9e02580d52 gemini: Add swap partition to DNS-313
Sometimes when using the DNS-313 memory usage can peak and
with a simple swap partition we can avoid running into the
roof and invoking the OOM killer. Set this partition to
128MB (twice the size of the memory of the DNS-313).

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
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 64ebf74c05 treewide: drop DEVICE_TYPE when used as device variable
DEVICE_TYPE is a target/subtarget variable, and it does not have
any effect when set in a device definition. It can only be set
in a target's or subtarget's Makefile.

Consequently, having it set anyway is misleading, so this drops
all cases.

This effectively reverts the following commits:
7a1497fd60 ("apm821xx: MBL: set DEVICE_TYPE to NAS")
5b4765c93a ("gemini: Classify Raidsonic NAS IB-4220-B as a NAS")
cdc6de460b ("gemini: D-Link DNS-313 is a NAS")

For the following commit, the variable was set when adding device
support:
27b2f0fc0f ("kirkwood: add support for Iomega Storcenter ix2-200")

Cc: Christian Lamparter <chunkeey@gmail.com>
Cc: Sungbo Eo <mans0n@gorani.run>
Cc: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Rosen Penev 73fa1aba94 samba36: Remove
Samba 3.6 is completely unsupported, in addition to having tons of patches

It also causes kernel panics on some platforms when sendfile is enabled.
Example:

https://github.com/gnubee-git/GnuBee_Docs/issues/45

I have reproduced on ramips as well as mvebu in the past.

Samba 4 is an alternative available in the packages repo.

cifsd is a lightweight alternative available in the packages repo. It is
also a faster alternative to both Samba versions (lower CPU usage). It
was renamed to ksmbd.

To summarize, here are the alternatives:
- ksmbd + luci-app-cifsd
- samba4 + luci-app-samba4

Signed-off-by: Rosen Penev <rosenp@gmail.com>
[drop samba36-server from GEMINI_NAS_PACKAGES, ksmbd rename + summary]
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
4 years ago
Linus Walleij 780264980b gemini: Refine package list
The NAS packages for Gemini doesn't even include the
block-mount package. Augment the list to be based off
the DEFAULT_PACKAGES.nas to make sure we extend on the
essentials.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
4 years ago
Linus Walleij 349ad62341 gemini: Bump kernel to v5.4
The v5.4 kernel already works much better than v4.19
as so many things got upstreamed so let's just bump
it to kernel v5.4.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
4 years ago
Linus Walleij 7fc155fd41 gemini: Add kernel config for kernel v5.4
This adds a kernel config file for the v5.4 gemini
kernel.

No major changes compared to v4.19, mainly
CONFIG_MTD_PHYSMAP_OF_GEMINI was renamed to
CONFIG_MTD_PHYSMAP_GEMINI.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
[select UNWINDER_ARM, set CONFIG_DRM_FBDEV_OVERALLOC, drop
dropped 4.19 symbols, kernel config refreshed]
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
4 years ago
Linus Walleij ea2d284082 gemini: Add v5.4 kernel patches
This adds the kernel patches needed for the Gemini.
Just 7 patches, 5 of them are already upstream.

Notably we incorperate the temperature sensor on the
hard drive to drive temperature control of the NAS
chassis. This is required for the DIR-685 which has
no external temperature sensor.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
[use the drivetemp package over the backport]
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
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 8334e04d24 gemini: 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
Rosen Penev 454339b533 gemini: dns313_gen_hdd_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
Hauke Mehrtens 729d7bc751 kernel: Deactivate CONFIG_SFP in generic config
Deactivate CONFIG_SFP for kernel 4.19 in the generic configuration.
The CONFIG_SFP configuration option was not set to anything in the
ath79 build for me, set it to deactivated by default.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 years ago
Koen Vandeputte 88ca372b5a kernel: bump 4.19 to 4.19.88
Refreshed all patches.

Remove upstreamed:
- 0004-boot-sq201-from-sda1.patch
- 500-v4.20-ubifs-Fix-default-compression-selection-in-ubifs.patch
- 0003-usb-dwc2-use-a-longer-core-rest-timeout-in-dwc2_core.patch

Altered patches:
- 0011-ARM-dts-Fix-up-SQ201-flash-access.patch
- 400-mtd-add-rootfs-split-support.patch
- 0101-pci-mediatek-backport-fix-pcie.patch

Compile-tested on: cns3xxx
Runtime-tested on: cns3xxx

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
4 years ago
Koen Vandeputte f19e471f32 kernel: bump 4.19 to 4.19.86
Refreshed all patches.

Altered patches:
- 950-0064-mfd-Add-Raspberry-Pi-Sense-HAT-core-driver.patch
- 0005-mtd-physmap_of-Move-custom-initialization.patch

Remove upstreamed:
- 0001-pinctrl-gemini-Mask-and-set-properly.patch
- 0002-pinctrl-gemini-Fix-up-TVC-clock-group.patch

Compile-tested on: cns3xxx
Runtime-tested on: cns3xxx

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
4 years ago
Koen Vandeputte 414b7c107a kernel: bump 4.14 to 4.14.156
Refreshed all patches.

Compile-tested on: cns3xxx
Runtime-tested on: cns3xxx

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
4 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
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
Linus Walleij 19f722adef gemini: dir685: Restore graphics
One of the v4.19 patches had a bug, this is fixed upstream,
but in OpenWrt we can fix it by just fixing the bug in the
patch.

We also need to augment the config file to select the
CONFIG_DRM_FBDEV_EMULATION symbol.

This restores the display controller on the DIR-685 to
working state: penguin and graphics on the little screen
with default OpenWrt install.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
5 years ago
Koen Vandeputte c79cb9fda7 kernel: bump 4.19 to 4.19.73
Refreshed all patches.

Remove upstreamed:
- 840-media-i2c-tda1997x-select-V4L2_FWNODE.patch
- 079-v4.20-ARM-dts-qcom-ipq4019-fix-PCI-range.patch
- 083-ARM-dts-qcom-ipq4019-enlarge-PCIe-BAR-range.patch
- 084-ARM-dts-qcom-ipq4019-Fix-MSI-IRQ-type.patch

Fixes:
- CVE-2019-15030

Compile-tested on: cns3xxx
Runtime-tested on: cns3xxx

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years ago
Koen Vandeputte 1d51160f85 kernel: bump 4.19 to 4.19.71
Refreshed all patches.

Remove upstreamed:
- 950-0774-watchdog-bcm2835_wdt-Fix-module-autoload.patch
- 0017-usb-host-fotg2-restart-hcd-after-port-reset.patch

Compile-tested on: cns3xxx
Runtime-tested on: cns3xxx

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years ago
Koen Vandeputte 6999c7e28e kernel: bump 4.14 to 4.14.142
Refreshed all patches.

Remove upstreamed:
- 0032-usb-host-fotg2-restart-hcd-after-port-reset.patch

Compile-tested on: cns3xxx
Runtime-tested on: cns3xxx

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years ago
Yousong Zhou 6d819fae53 gemini: image: fix race condition when building copy-kernel.bin
Make treat copy-kernel.o as intermediate and delete it when it's no
longer needed.  This can fail when the same submake was triggered
multiple times for different devices.

	arm-openwrt-linux-muslgnueabi-as  -k -o copy-kernel.o copy-kernel.S
	export MAKEFLAGS= ;make -w -C copy-kernel CROSS_COMPILE=arm-openwrt-linux-muslgnueabi-
	arm-openwrt-linux-muslgnueabi-objcopy -O binary -S copy-kernel.o copy-kernel.bin
	make[5]: Entering directory '/builder/shared-workdir/build/target/linux/gemini/image/copy-kernel'
	arm-openwrt-linux-muslgnueabi-objcopy -O binary -S copy-kernel.o copy-kernel.bin
	rm copy-kernel.o
	make[5]: Leaving directory '/builder/shared-workdir/build/target/linux/gemini/image/copy-kernel'
	# "App" partition is the rootfs
	arm-openwrt-linux-muslgnueabi-objcopy: 'copy-kernel.o': No such file
	Makefile:27: recipe for target 'copy-kernel.bin' failed
	make[5]: Leaving directory '/builder/shared-workdir/build/target/linux/gemini/image/copy-kernel'
	make[5]: *** [copy-kernel.bin] Error 1
	Makefile:244: recipe for target '/builder/shared-workdir/build/build_dir/target-arm_fa526_musl_eabi/linux-gemini/tmp/openwrt-gemini-storlink_sl93512r-ext4-factory.bin' failed
	make[4]: *** [/builder/shared-workdir/build/build_dir/target-arm_fa526_musl_eabi/linux-gemini/tmp/openwrt-gemini-storlink_sl93512r-ext4-factory.bin] Error 2

With this change, output files are directed to $(KDIR)

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
5 years ago
Linus Walleij dc451a4b24 gemini: Enable flash boot on reference design type
The flash layout on the Storlink reference design for Gemini
is using 2 MB flash for the kernel, and it also insists on
overwriting the partition table with default values on every
boot. The same is true for the SQ201. This poses a problem
on recent OpenWrt firmware as the base zImage is bigger
than 2 MB.

At the same time there is a ramdisk partition of 6 MB that we
don't really need. The partition table looks like this:

Creating 7 MTD partitions on "30000000.flash":
0x000000000000-0x000000016000 : "BOOT"
0x000000120000-0x000000320000 : "Kern"
0x000000320000-0x000000920000 : "Ramdisk"
0x000000920000-0x000000f20000 : "Application"
0x000000f20000-0x000000f40000 : "VCTL"
0x000000f40000-0x000000fe0000 : "CurConf"
0x000000fe0000-0x000001000000 : "FIS directory"

On boot the "Kern" partition is copied to RAM @0x01600000
and the "Ramdisk" partition is copied to RAM @0x00800000.
Then the kernel is executed.

The idea with this patch is to extend the "Kern" partition
with the "Ramdisk" partition to get a full 8 MB to use
for the kernel. Then we put the OpenWrt JFFS2 rootfs
inside the "Application" partition.

We create a small assembly loop that we prepend to the
"Kern" image that will copy the "Kern" from 0x0160000
and the "Ramdisk" from 0x00800000 and put them in
consecutive space at 0x00400000 and execute it from
there, using "Application" as rootfs.

We generate 3 main files:
- zImage - contains the assembly bootstrap loop and
  the first part of the generated kernel image
- rd.gz - contains the second part of the generated
  kernel image
- hddapp.tgz - contains the root filesystem

On the SQ201 I flash these manually using the native boot
loader PLATO, "Y" alternative for the zImage, "R" for
the rd.gz image and "A" for hddapp.tgz.

This works fine and I can now boot to prompt on the SQ201
with nothing but flash.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
5 years ago
Linus Walleij a608380e42 gemini: Add copy-kernel utility package
This package just contains a small Gemini-only assembler
bootstrap loop to copy the kernel from the two fragments
(previously zImage at 0x01600000 and initramdisk at 0x00800000)
into one big zImage of up to 8 MB at 0x00400000.

It will be built on demand from the Gemini image Makefile.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
5 years ago
Linus Walleij 860d6ce0ce gemini: Fix up flash accesses
The SL93512r and the NAS4220B have Redboot partition
tables (rely on these) and need to boot from mtdblock3.
Add two patches from upstream to fix this.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
5 years ago
Linus Walleij 1eb851143a gemini: Fix up some confused pin config on SL93512r
Upstream patch fixing the errors in the device tree.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
5 years ago
Adrian Schmutzler 75bfc393ba treewide: convert MAC address location offsets to hexadecimal
This changes the offsets for the MAC address location in
mtd_get_mac_binary* and mtd_get_mac_text to hexadecimal notation.

This will be much clearer for the reader when numbers are big, and
will also match the style used for mtd-mac-address in DTS files.

(e.g. 0x1006 and 0x5006 are much more useful than 4102 and 20486)

Acked-by: Alexander Couzens <lynxis@fe80.eu>
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years ago
Moritz Warning c1bf5d5432 gemini: 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
Koen Vandeputte c7634180fc kernel: bump 4.19 to 4.19.62
Refreshed all patches.

Remove upstreamed:
- 023-0013-crypto-crypto4xx-fix-AES-CTR-blocksize-value.patch
- 023-0014-crypto-crypto4xx-fix-blocksize-for-cfb-and-ofb.patch
- 023-0015-crypto-crypto4xx-block-ciphers-should-only-accept-co.patch
- 950-0252-staging-bcm2835_camera-Ensure-all-buffers-are-return.patch
- 950-0253-staging-bcm2835-camera-Remove-check-of-the-number-of.patch
- 950-0254-staging-bcm2835-camera-Handle-empty-EOS-buffers-whil.patch
- 950-0489-staging-mmal-vchiq-Replace-spinlock-protecting-conte.patch
- 0021-ARM-dts-gemini-Fix-up-DNS-313-compatible-string.patch
- 049-v4.20-mips-remove-superfluous-check-for-linux.patch
- 100-MIPS-fix-build-on-non-linux-hosts.patch
- 303-MIPS-Fix-bounds-check-virt_addr_valid.patch
- 0002-usb-dwc2-use-a-longer-AHB-idle-timeout-in-dwc2_core_.patch

Altered patches:
- 950-0267-staging-vc04_services-Split-vchiq-mmal-into-a-module.patch
- 700-net-add-qualcomm-mdio-and-phy.patch

Fixes:
- CVE-2019-3846

New symbol:
- AX88796B_PHY

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

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years ago
Rafał Miłecki 8b4bc7abe0 treewide: sysupgrade: don't use $ARGV in platform_do_upgrade()
stage2 passes image path to platform_do_upgrade() as an argument so it
can be simply accessed using $1

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
5 years ago
Linus Walleij ea44ed5f38 gemini: Stop enforcing command line
The command line enforced by the kernel is harmful, we want to
use the command line passed from the device tree. This is
especially important for the SQ201, Teltonika RUT and WBD111
which has a console set to 115200n8 and not 19200n8 like all
the others, so their consoles will be confusingly changing
baudrate between boot loader and kernel. The setting in the
device tree corresponds to what the boot loader is using.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
5 years ago
Linus Walleij dc3cf94cb2 gemini: Add SL93512r missing ImageInfo file
Somehow I missed to add the magical image cooking file
for the SL93512r. Fix it.

Fixes: 18e2053bec ("gemini: Add StorLink SL93512r images")
Reported-by: Christian Lamparter <chunkeey@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com> [added Fixes,
changed subject]
5 years ago
Adrian Schmutzler f62fe6fdba gemini: Fix device name for StorLink SL93512r
This has been reported by Chen Minqiang (@ptpt52).

Reported-by: Chen Minqiang <ptpt52@gmail.com>
Fixes: 18e2053bec ("gemini: Add StorLink SL93512r images")
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com> [Added tags]
5 years ago
Linus Walleij 18e2053bec gemini: Add StorLink SL93512r images
This adds image generation for the StorLink reference design
SL93512r. This board is now supported upstream in kernel
v4.19.

As this image structure is identical to SQ201 and Raidsonic,
we simply refer to this as "storlink-reference" from now on.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
5 years ago
Linus Walleij b50aef8272 gemini: Drop switch kmod and swconfig
The DIR-685 needs this module compiled in for safety
(it is facing the LAN ports) and it is now (as of
kernel v4.19) using the DSA switch architecture so
swconfig is not needed.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
5 years ago
Linus Walleij 5470e928d0 gemini: Fix up DNS-313 compatible string
It's a simple typo in the DNS file, which was pretty serious.
No scripts were working properly. Fix it up.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
[integrate upstream patch into openwrt target]
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
Linus Walleij 502b28b4a9 gemini: Make root filesystem writeable
The squashfs+jffs2 root filesystem only came up as read-only
and the config would not take:

[   25.600237] mount_root: Could not open mtd device: /dev/mtd4
[   25.634674] mount_root: reading rootfs_data failed
[   25.665346] mount_root: Could not open mtd device: /dev/mtd3
[   25.699802] mount_root: reading rootfs failed
[   25.726426] mount_root: mounting /dev/root

Well that is not very strange since the whole firmware partition
is made read-only in the device tree. Let's fix that by augmenting
the OpenWrt patch.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
5 years ago
Linus Walleij 86098ea87e gemini: Fix MAC address assignment for DIR-685
The DIR-685 has the MAC addresses in the RedBoot code just like
DNS-313. Check some magic numbers to determine that the MAC
address is where we want it and extract it from RedBoot.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
[replaced ifconfig with ip, ! -z = -n, added string quotes]
5 years ago
Linus Walleij 38d85d2c9f gemini: Make a per-board case for ethernet MAC
The DNS-313 isn't the only special board so let's bite the
bullet and create a case ladder in preparation for DIR-685.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com> [refreshed]
5 years ago
Linus Walleij cd6c3535cd gemini: Use library functions to assign MAC address
This simplifies the ethernet address extraction script
by using standard library functions to locate the MTD
partitions and extract ethernet address from a binary
offset location in the flash. Furthermore, the aging
ifconfig is replaced by the ip tool, which will now
assign the MAC addresses.

Suggested-by: Christian Lamparter <chunkeey@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
[ifconfig replacement, use -n instead of ! -z,
-n requires string to be quoted within the test brackets,
drop prepended "x" in check, add quotes, make local
variables local, kill whitespaces]
5 years ago
Christian Lamparter bdbb679adb gemini: enable CONFIG_PACKET
CONFIG_PACKET is a important feature to have.
The Packet protocol is used by applications which
communicate directly with network devices without
an intermediate network protocol implemented in
the kernel, e.g. tcpdump and ip.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
5 years ago
Hauke Mehrtens ab629543c0 gemini: Activate Realtek and vitesse DSA driver again
This activates the wrongly removed DSA drivers again.

Fixes 9ab4d74b5f ("kernel: Move some DSA config options to generic config")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Reported-by: Linus Walleij <linus.walleij@linaro.org>
5 years ago
Linus Walleij 8a83f17b24 gemini: Support sysupgrade on DIR-685
This makes sysupgrade work on the D-Link DIR-685 after
initial factory install.

We create the platform.sh script to support sysupgrade
on more targets as we move on with sysupgrade support.

Cc: Petr Štetiar <ynezz@true.cz>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Petr Štetiar <ynezz@true.cz>
[cleanup in platform.sh, removed superfluous SUPPORTED_DEVICES]
5 years ago
Linus Walleij 76338fded0 gemini: Fix up firmware checksum on DIR-685
Using the same method as the D-Link DAP-2695 A1 we use
the "mtd" tool to augment the firmware checkum in flash
on first boot of a new firmware on the D-Link DIR-685.
We need to augment the Makefile for "mtd" to build in
the special WRGG fixup support for Gemini as well.

This works around the problem of the machine not booting
after factory install unless the sysupgrade is applied
immediately.

Based on commit e3875350f3
"ar71xx: add support for D-Link DAP-2695 rev. A1"

Cc: Stijn Tintel <stijn@linux-ipv6.be>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
5 years ago
Hauke Mehrtens 9ab4d74b5f kernel: Move some DSA config options to generic config
This moves some new configuration options to the generic kernel
configuration instead of configuring them for each target on our own.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 years ago
Hauke Mehrtens 87ac3e801d gemini: Make kernel text and rodata read-only
This is activate for all other targets except gemini, also activate it
there.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 years ago
Hauke Mehrtens 75eb8a146d kernel: Deactivate CONFIG_BINFMT_MISC
CONFIG_BINFMT_MISC allows it to add support for new executable formats
to the kernel from user space, the kernel will then detect for example a
java binary and call the java execution program automatically. I am not
aware that this feature is used in OpenWrt and this could be used to
exploit something. Deactivate it for all targets for now.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
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
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