1
0
mirror of https://git.openwrt.org/openwrt/openwrt.git synced 2024-06-26 17:47:29 +02:00
Commit Graph

265 Commits

Author SHA1 Message Date
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>
2019-08-02 22:45:02 +02:00
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>
2019-07-31 16:51:46 +02:00
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>
2019-07-17 08:05:38 +02:00
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>
2019-07-14 14:37:45 +02:00
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]
2019-07-07 13:02:06 +02:00
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]
2019-07-07 13:02:06 +02:00
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>
2019-07-01 16:01:10 +02:00
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>
2019-07-01 16:00:56 +02:00
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]
2019-06-20 20:02:30 +02:00
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>
2019-06-18 16:08:55 +02:00
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>
2019-06-15 19:55:32 +02:00
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]
2019-06-15 19:55:31 +02:00
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]
2019-06-15 19:55:31 +02:00
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]
2019-06-15 19:55:31 +02:00
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>
2019-06-15 19:55:31 +02:00
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>
2019-05-30 12:12:37 +02:00
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]
2019-05-23 10:19:52 +02:00
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>
2019-05-18 16:37:30 +02:00
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>
2019-05-14 21:11:58 +02:00
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>
2019-05-11 17:15:41 +02:00
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>
2019-05-11 17:15:41 +02:00
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>
2019-05-11 17:15:41 +02:00
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>
2019-05-11 11:37:10 +02:00
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>
2019-04-08 14:53:39 +02:00
Christian Lamparter
5b4765c93a gemini: Classify Raidsonic NAS IB-4220-B as a NAS
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2019-03-25 21:19:39 +01:00
Christian Lamparter
cdc6de460b gemini: D-Link DNS-313 is a NAS
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2019-03-25 21:19:39 +01:00
Linus Walleij
ac5f431ad1 gemini: Generate padded kernel+rootfs images for DIR-685
We currently generate a kernel that boots from the harddrive
in the DIR-685. That's not how we usually do things, so
let's augment it to boot from flash and mount the rootfs
using squashfs and JFFS2 like everyone else.

Partition splitting only work when the partitions are
inside of a "partitions" node which is why we have a patch
like this (submitted upstream).

Another patch drops the rootfs arguments and renames the
firmware partition while adding the compatible "wrg"
to it so the WRGG parser will kick in.

Factory image was tested by bravely reflashing the DIR-685
from stock firmware using the web UI and the serial console
boot loader.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2019-03-13 16:25:36 +01:00
Linus Walleij
c72b1d8468 gemini: Generate harddisk image for DNS-313
This makes OpenWrt build an Ext2+Ext4 partitioned image
for the D-Link DNS-313 with two blank partitions, a boot
partition on /dev/sda3 and a rootfs partition on
/dev/sda4.

This uses the methods already used in apm821xx including
the tricks to convert the generated Ext2 filesystem
partition to version 1 so that the firmware bootloader
will properly recognize it.

We patch a bit around the build files to make sure we
get the rootfs size set and that genext2fs is properly
built.

Tested on the D-Link DNS-313.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
[Fixing and tricksing]
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2019-02-20 18:51:31 +01:00
Linus Walleij
b9a24f31a9 gemini: Name binary "bootpart.tar.gz"
This factory binary i supposed to actually be unzipped and
untarred by the user as part of the installation process
(this NAS boots from harddisk), so name it "bootpart.tar.gz"
and not "factory.bin" so it is helpful for users.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2019-02-14 16:56:15 +01:00
Koen Vandeputte
6b6f238b82 kernel: bump 4.19 to 4.19.21
Refreshed all patches.

Remove upstreamed:
- 0007-ARM-dts-Fix-up-the-D-Link-DIR-685-MTD-partition-info.patch

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

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
2019-02-14 16:45:01 +01:00
Koen Vandeputte
9a1d7ff187 kernel: bump 4.14 to 4.14.99
Refreshed all patches.

Remove upstreamed:
- 950-0434-mmc-bcm2835-Recover-from-MMC_SEND_EXT_CSD.patch

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

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
2019-02-14 16:45:01 +01:00
Linus Walleij
4130e24326 gemini: Fix kmod-led-trig-heartbeat typo
It's kmod-ledtrig-* not kmod-led-trig-*.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
[extended subject]
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2019-02-11 19:02:42 +01:00
Koen Vandeputte
f003d732d7 kernel: bump 4.19 to 4.19.18
Refreshed all patches.

Removed upstreamed:
- 031-v5.0-MIPS-BCM47XX-Setup-struct-device-for-the-SoC.patch
- 142-jffs2-Fix-use-of-uninitialized-delayed_work-lockdep-.patch

Removed upstreamed hunk in:
- 800-bcma-get-SoC-device-struct-copy-its-DMA-params-to-th.patch

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

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
2019-01-28 18:17:32 +01:00
Linus Walleij
11e9577511 gemini: Add a config for kernel v4.19
This adds a config for kernel v4.19 to the Gemini
target.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2019-01-26 21:46:33 +01:00
Linus Walleij
e44d1e17da gemini: Add v4.19 kernel patches
This is the remainder of kernel patches for the v4.19
kernel. A whole slew of the previous patch stack is now
upstream, so this mainly contains the stuff that was
added upstream between v4.19 and v5.0-rc1, and then
the USB FOTG201 patches from Hans.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2019-01-26 21:46:32 +01:00
Christian Lamparter
53cc74bfa7 gemini: dlink-dir-685: fix rt2800-pci package name
The package is now called kmod-rt2800-pci.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2019-01-26 21:43:17 +01:00
Mathias Kresin
1f0e08cf95 gemini: add EOD marker to rootfs images
With 6409b159e8 ("gemini: switch to 4.14") the EOF marker were dropped
from the rootfs images. Without the marker the rootfs_data partition
can't be created and it isn't possible to permanently store any
configuration changes.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2019-01-26 15:23:38 +01:00
Mathias Kresin
82c7699dd8 gemini: fix ITian Square One SQ201 package selection
All kernel modules are prefixed with kmod-. Add the prefix to include
the desired packages.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2019-01-26 15:23:38 +01:00
Mathias Kresin
a565659c29 gemini: replace date placeholder
Replace the data placerholder in ImageInfo-itian_sq201 in a reproducible
way.

The code for the replace was accidentality dropped in 5bac623895
("gemini: unify and fix ib-nas4220b and sq201 image creation")

Signed-off-by: Mathias Kresin <dev@kresin.me>
2019-01-26 15:23:38 +01:00
Mathias Kresin
67d39c03ec gemini: drop Teltonika RUT1xx artifacts
Support for the Teltonika RUT1xx was added with the switch to kernel
4.4. Hidding such changes in a kernel switch commit is the wrong way and
the support for the Teltonika RUT1xx is pretty much incomplete.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2019-01-26 15:23:38 +01:00
Mathias Kresin
2a8fe45df5 gemini: add wiligear image build code
They were dropped with 6409b159e8 ("gemini: switch to 4.14") without
any explaination.

The image generation is disabled for now as it would break the build for
the target. The mkfwimage2 call need to be adjusted to reflect the real
size of kernel and rootfs. Nevertheless, add the required code to give
interested parties a chance to fix the remaining issues.

The dts would need to use the ecoscentric,redboot-fis-partitions
partition parser to get the correct partition offsets and size. It's
expected that the OEM firmware adjusts the on flash partition table with
the values defined in the image header.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2019-01-26 15:23:37 +01:00
Mathias Kresin
7055cb0acc gemini: fix alphabetical order
Reorder the image recipes to keep the alphabetical order.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2019-01-26 15:23:37 +01:00
Mathias Kresin
0013c94025 gemini: use dts compatible based image filenames
Use an output image filename based on the compatible string from the dts
files. This way it is way easier to get for which board an image is
intended.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2019-01-26 15:23:37 +01:00
Mathias Kresin
b9c6862d9d gemini: drop unnecessary image build default variables
They are either not required, set to an earlier set default value or
defined due to target features.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2019-01-26 15:23:37 +01:00
Mathias Kresin
7f17f3b418 gemini: drop unnecessary images
The root filesystem is already part of the factory image and most likely
not required at all.

The same applies to the kernel images.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2019-01-26 15:23:37 +01:00
Mathias Kresin
b010519f1e gemini: all images are factory images
There is no support for sysupgrade in gemini, hence all images are only
suitable for an installation via bootloader or oem firmware.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2019-01-26 15:23:37 +01:00
Mathias Kresin
10dab9b098 gemini: follow common pattern for temp dir naming
For temporary directories <imagename>.tmp is a common pattern in image
build code across the tree. Use it for the nas4220b/sq201 recipe as
well.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2019-01-26 15:23:37 +01:00
Mathias Kresin
98c2261ac2 gemini: use existing build code where possible
Use the existing image build recipes in favour of introducing deplicate
shell code.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2019-01-26 15:23:36 +01:00
Mathias Kresin
1e606edce6 gemini: make all tar files more reproducible
Force a fixed sorting and use the parameters to create reproducible
archives for all tar invocations.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2019-01-26 15:23:36 +01:00
Mathias Kresin
6491643df4 gemini: build images in temporary directories
Create files in temporary directories within the build directory
instead manipulating files in the (final) output directory.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2019-01-26 15:23:36 +01:00
Mathias Kresin
0ffa6bae0a gemini: don't hardcode image filenames
Use the existing image build code mechanisms to specify the image output
filename.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2019-01-26 15:23:36 +01:00
Mathias Kresin
ec0d58ede4 gemini: fix parallel build
Due to the missing PROFILES all images are build, regardless of the
selected (or currently processed in case of a multi profile build).

Because of the race condition builds with eight parallel jobs fail,
which can be seen on the build bots as well.

Add the PROFILES variable for now, till the root cause is identified.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2019-01-26 15:23:36 +01:00
Christian Lamparter
5bac623895 gemini: unify and fix ib-nas4220b and sq201 image creation
Both Build/sq201-images and Build/nas4220b-images scripts
are very similar. This patch unifies both methods at the
cost of renaming the produced sysupgrade file names, but
with the benifit of creating better reproducible files.

The patch also fixes a race in parallel builds in which case
the ImageInfo of one device could end up in both sysupgrade
files.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2019-01-24 15:53:04 +01:00
Christian Lamparter
de07a0a29a gemini: lazy set IMAGE_NAME
Currently, IMAGE_NAME is expanded at declaration time
and this causes strange filename in the builder's logs:

|cp: cannot stat '[...]/openwrt-gemini-dlink-dns-313-.': No such file or directory
|cp: cannot stat '[...]/openwrt-gemini-nas4220b-.': No such file or directory
|[...]

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2019-01-24 15:53:04 +01:00
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>
2018-12-26 17:32:48 +01:00
Hauke Mehrtens
3c04d10483 gemini: Activate USB support again
This activates the CONFIG_USB_SUPPORT option in the in the gemini kernel
again which will provide the core USB support and makes it possible to
compile the rest of the USB parts into modules. Without this change USB
will not be available in the gemini target and some modules fail to
compile because the feature list indicates USB support.

Fixes: 10ec966f7b ("gemini: Break out USB to packages")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2018-12-16 14:59:59 +01:00
Linus Walleij
f280bd7fa8 gemini: Fix up image generation
I noticed that the image generator for the Gemini generates
some 10+ MB files for the second (application) partition.
This is just wrong. The first 6144K partition named initramfs
easily fits OpenWRTs squashfs,jffs2 overlayed partitions
with nice headroom for storing configuration files.

Generate a blank partition for the hddapp.tgz file and delete
it after generating the firmware image - when performing
updates manually you just want the "rd.z" file around
anyways.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2018-10-20 16:13:39 +02:00
Linus Walleij
10ec966f7b gemini: Break out USB to packages
This creates a new kernel package for the fotg210 host
controller and uses that with the gemini to shrink the
kernel. The SQ201 needs the USB2 PCI package as well.

The build system required me to make kernel_oldconfig
beofore it would build without errors so some minor
unrelated Kconfig entries are changed.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2018-10-20 16:13:39 +02:00
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>
2018-07-07 18:19:39 +02:00
Linus Walleij
1c1e254244 gemini: Cook SQ201 images
This generates the "rd.gz" and "hddapp.tgz" that doesn't contain
anything of the sort but rather the OpenWRT rootfs. It works the
same way as how we generate the same layout for the NAS4220b.
For some reason the ImageInfo file is different for the SQ201.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2018-06-18 06:35:33 +02:00
Linus Walleij
d8072a3530 gemini: Add appropriate Wireless kernel modules
The D-Link DIR-685 has a RealTek RT2880 mini-PCI card in a
slot. Activate the appropriate kernel module.

The Square One SQ201 has a Ralink RT61-based mini-PCI card.
Activate the appropriate kernel modules. This fixes the
previous error just activating the firmware: the kernel
module will bring in the firmware it needs.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2018-06-18 06:35:16 +02:00
Linus Walleij
dc7f540ce1 gemini: Cook a WRGG firmware image
This makes the Gemini build a WRGG-type firmware update
image for the DIR-685. This should hopefully install the
kernel from the web firmware upgrade API on the product
switching it permanently to use OpenWRT.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2018-06-18 06:35:09 +02:00
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>
2018-05-22 07:55:20 +02:00
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>
2018-05-22 07:55:12 +02:00
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>
2018-05-22 07:55:05 +02:00
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>
2018-05-22 07:54:57 +02:00
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>
2018-05-22 07:54:49 +02:00
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>
2018-05-22 07:54:42 +02:00
Koen Vandeputte
e2aa0c3f8b kernel: bump 4.14 to 4.14.41
Refreshed all patches

Dropped upstreamed patches:
522-PCI-aardvark-fix-logic-in-PCI-configuration-read-write-functions.patch
523-PCI-aardvark-set-PIO_ADDR_LS-correctly-in-advk_pcie_rd_conf.patch
525-PCI-aardvark-use-isr1-instead-of-isr0-interrupt-in-legacy-irq-mode.patch
527-PCI-aardvark-fix-PCIe-max-read-request-size-setting.patch

updated patches:
524-PCI-aardvark-set-host-and-device-to-the-same-MAX-payload-size.patch
030-USB-serial-option-fix-dwm-158-3g-modem-interface.patch

Added new ARM64 symbol: CONFIG_ARM64_ERRATUM_1024718

Compile-tested on: cns3xxx, imx6, mvebu (arm64), x86_64
Runtime-tested on: cns3xxx, imx6, x86_64

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
2018-05-18 09:10:46 +02:00
Linus Walleij
1f56417e6b gemini: Augment DIR-685 device tree for RTL8366RB
This makes the ethernet and RTL8366RB come up on the
D-Link DIR-685.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2018-05-14 16:24:10 +02:00
Linus Walleij
3b48111df9 gemini: create zImage for DIR-685
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2018-05-14 16:24:09 +02:00
Linus Walleij
6cd2e1f947 gemini: Add ethernet to DNS-313 and Wiliboard
This adds an interrim patch for v4.14 based on an
upstream commit to get ethernet working on D-Link DNS-313
(probably also on the Wiliboards)

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2018-05-05 06:57:00 +02:00
Roman Yeryomin
ce93b05bf1 gemini: fix hard disk boot on D-Link devices
Since the D-Link devices boot from hard disk we need to
add the following changes to Gemini:

- Supply a bootarg in the device tree so we can boot from
  the right partition (/dev/sda4 on DNS-313)
- Disable forced command line in config so the kernel picks
  up the right bootargs from the device tree
- Enable EXT4 in the config as this is used for rootfs else
  we get nowhere, we cannot load this as a module because,
  well, it is supposed to be loaded from the root partition
  (chicken and egg problem).
- Enable jbd2 and mbcache (needed by ext4)

Also clean out the premature attempts to dynamically
modify the command line in the Image makefile: we should
pass this with the device tree bootargs instead, it works
much better.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Roman Yeryomin <roman@advem.lv>
2018-05-05 06:57:00 +02:00
Roman Yeryomin
2c35bcffd0 gemini: add rtl8366rb to dir-685 board
Signed-off-by: Roman Yeryomin <roman@advem.lv>
2018-05-05 06:57:00 +02:00
Roman Yeryomin
af069fbd24 gemini: cleanup kernel config
Disable video and input drivers - they are needed only for one
board and can be enabled via modules if/when UI will be available.
Use LED drivers from packages.
Cleanup other things unnecessarily overriding defaults.

Signed-off-by: Roman Yeryomin <roman@advem.lv>
2018-05-05 06:57:00 +02:00
Roman Yeryomin
91930c0f99 gemini: remove 4.4 support
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Roman Yeryomin <roman@advem.lv>
2018-05-05 06:57:00 +02:00
Roman Yeryomin
6409b159e8 gemini: switch to 4.14
This introduces Device/ infrastructure and images
for all boards available upstream.

Changes from Linus submitted version:
- fix Raidsonic image generation
- remove redundant (old) image generation
- remove redundant header tool for dns313 board

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Roman Yeryomin <roman@advem.lv>
2018-05-05 06:57:00 +02:00
Roman Yeryomin
4f74957584 gemini: add 4.14 support
This adds the patches to get fairly complete Gemini support
using kernel v4.14. It is mainly a backport of patches from
kernel v4.16 with omissions of things like graphics that require
substantial changes and will be better handled once we move
to the v4.16 kernel proper.
On top of this are some WIP patches for USB support.

Tested on Raidsonic NAS4220B and D-link DNS-313.

ChangeLog v4->v5:
- Fix ethernet single gmac usecase
- Fix USB reset (patch from Hans)
- Fix Raidsonic ethernet skew delay
- Fix kernel config (bridge, squashfs, jffs2, usb)
- Disable second usb port on Raidsonic board until fotg210_hcd is fixed

ChangeLog v3->v4:
- Make sure to use tabs rather than spaces in base-files.
- Use the dns313 image tool from the firmware-utils.
- Break out the addition of the v4.14 patches and the removal
  of the v4.4 patches to separate (big) patches.

ChangeLog v2->v3:
- Update the kernel config as indicated by Hauke Martens:
- Regenerate again after rebasing using kernel_oldconfig
  dropping a few optimization settings that are now generic
- Drop CFG80211 stuff (module)
- Drop CIFS stuff (module)
- Drop MAC80211 (module)
- Drop wireless drivers (module)
- Enabled OverlayFS
- Added proper DNS-313 boot image generation with the special
  file header tool.
- Disable CMA in the kernel
- Enable LZMA compression of the kernel
- Consequently name the nas4220b images nas4220b
- Update preinit MAC detection script to handle also DNS-313
- Add board.d/03_hdparm to set the disk to spin down after
  1 minute by default, if we have the hdparm tool installed

ChangeLog v1->v2:
- Processed config through kernel_oldconfig
- Processed patches through make target/linux/{clean,refresh} V=99

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Roman Yeryomin <roman@advem.lv>
2018-05-05 06:57:00 +02:00
Roman Yeryomin
55c9aa27be gemini: rename files directory (preparation for 4.14)
Signed-off-by: Roman Yeryomin <roman@advem.lv>
2018-05-05 06:57:00 +02:00
Rosen Penev
7a318bc1a1 kernel: Update kernel 4.4 to 4.4.100
Run-tested on ramips

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2017-11-25 19:48:39 +01:00
Jonas Gorski
6f528dfbd9 treewide: do not use IMG_PREFIX in Image/Prepare
IMG_PREFIX can be modified in ImageBuilder by passing EXTRA_IMAGE_NAME
on command line, but Image/Prepare is not run in ImageBuilder. This
causes missing files when IMG_PREFIX is used for target file names in
Image/Prepare, then as source file names in Image/BuildKernel or
Image/Build.

Fix this by using a fixed output file name in Image/Prepare, and copy to
the expected file name in Image/BuildKernel instead, which is run by
ImageBuilder.

Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
2017-10-26 12:26:25 +02:00
Stijn Tintel
d18f76f762 kernel: use .patch extension for all patches
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2017-06-27 06:37:46 +02:00
Stijn Tintel
4cc2d159bc gemini: rename config-default to config-4.4
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2016-08-24 01:44:05 +03:00
Stijn Tintel
df04723478 gemini: rename patches directory to patches-4.4
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2016-08-24 01:08:32 +03:00
Jo-Philipp Wich
58df34b5e1 gemini: drop Linux 4.1 support
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2016-08-23 15:41:27 +02:00
Roman Yeryomin
f046737e92 gemini: add Linux 4.4 support
Signed-off-by: Roman Yeryomin <roman@advem.lv>
[Jo-Philipp Wich: change commit title]
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2016-08-23 15:41:27 +02:00
Felix Fietkau
30cd012860 gemini: delete 3.18 support
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2016-05-12 17:55:15 +02:00
Jonas Gorski
cc42b1049b kernel: refresh patches for 4.1
Signed-off-by: Jonas Gorski <jogo@openwrt.org>

SVN-Revision: 46441
2015-07-22 12:51:11 +00:00
John Crispin
16fb050055 gemini: switch to 4.1
Signed-off-by: Roman Yeryomin <roman@advem.lv>

SVN-Revision: 46354
2015-07-14 07:43:33 +00:00
John Crispin
d5d3b5e49c gemini: add 4.1 support
Signed-off-by: Roman Yeryomin <roman@advem.lv>

SVN-Revision: 46353
2015-07-14 07:43:10 +00:00
John Crispin
023b0e0b38 gemini: add NAS packages to Raidsonic profile
Signed-off-by: Roman Yeryomin <roman@advem.lv>

SVN-Revision: 46352
2015-07-14 07:42:18 +00:00
John Crispin
ea5b09bda3 gemini: copy kernel image to BIN_DIR
Signed-off-by: Roman Yeryomin <roman@advem.lv>

SVN-Revision: 46351
2015-07-14 07:41:43 +00:00
John Crispin
1985e88b35 gemini: fix imagebuilder
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 45822
2015-05-29 11:28:33 +00:00
Jo-Philipp Wich
e814e946a6 gemini: use common image prefix
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 45782
2015-05-27 15:18:36 +00:00
Jonas Gorski
76d079204d kernel: update 3.18 to 3.18.14
Changelogs:

* https://www.kernel.org/pub/linux/kernel/v3.x/ChangeLog-3.18.12
* https://www.kernel.org/pub/linux/kernel/v3.x/ChangeLog-3.18.13
* https://www.kernel.org/pub/linux/kernel/v3.x/ChangeLog-3.18.14

Build tested on brcm63xx and ipq806x, runtested on brcm63xx.

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

SVN-Revision: 45711
2015-05-21 19:32:46 +00:00
Felix Fietkau
c6a29d2528 gemini: fix usb driver compilation on 3.18
Signed-off-by: Roman Yeryomin <roman@advem.lv>

SVN-Revision: 45065
2015-03-27 16:03:16 +00:00
Felix Fietkau
65708f749a gemini: make dd commands more portable
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 45039
2015-03-26 20:37:19 +00:00
Felix Fietkau
6cda886f60 gemini: switch mantainer to myself
Signed-off-by: Roman Yeryomin <roman@advem.lv>

SVN-Revision: 45038
2015-03-26 20:37:09 +00:00
Felix Fietkau
17532417c7 gemini: nuke 3.10 support
Signed-off-by: Roman Yeryomin <roman@advem.lv>

SVN-Revision: 45037
2015-03-26 20:36:59 +00:00
Felix Fietkau
b953a14036 gemini: remove broken flag
Signed-off-by: Roman Yeryomin <roman@advem.lv>

SVN-Revision: 45036
2015-03-26 20:36:49 +00:00