Commit Graph

22529 Commits (cd23dc1d21c2ab784e3a4014bbdcda532b2e12e2)

Author SHA1 Message Date
Paul Spooren 6f01d3334e x86/geode: fixup FEATURE inheritance
In the geode subtarget all default x86 features were overwritten via :=
instead of extending them via +=.

This patch fixes the inheritance and thereby the compilation of
x86/geode target.

Compile tested x86/geode.

Signed-off-by: Paul Spooren <mail@aparcar.org>
4 years ago
Paul Spooren 3f3a754c68 x86/geode: add missing include after rebase
The x86 image generation was refacted via cb007a7bf6 and accidently not
included `geode.mk` when selected as subtarget.

Now the file is included and image compilation for x86/geode works
again.

Thanks to Russell Senior <russell@personaltelco.net> for reporting the
problem and suggesting a patch!

Signed-off-by: Paul Spooren <mail@aparcar.org>
4 years ago
Álvaro Fernández Rojas 340fc3a1c6 bcm27xx: refresh linux 5.4 configs
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
4 years ago
Álvaro Fernández Rojas 6c9b5d6972 bcm27xx: sync 5.4 patches with RPi Foundation
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
4 years ago
Christian Lamparter 8a92ae8e4b apm821xx: switch to 5.4 kernel
This patch switches the APM821XX target to the linux kernel 5.4 variant.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
4 years ago
Christian Lamparter 3509d4ec56 apm821xx: wndr4700: add preliminary drivetemp sensor
This patch prepares the WNDR4700 to use the HDD sensor for
the thermal zone. While the kernel's thermal.txt device-tree
binding documentation files talks about supporting multiple
sensors for a zone. This sadly is NOT the case. Even the most
current upstream kernels (5.6-rc) supports just >one< sensor
per zone: (driver/base/of-thermal.c:886)
| * REVIST: for now, the thermal framework supports only
| * one sensor per thermal zone. Thus, we are considering
| * only the first two values as slope and offset.

I do hope that this warning will prevent others wasteing time
on trying to figure out why their multi-sensor thermal-zones
definitions are not working as specified.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
4 years ago
Christian Lamparter 01fe7a2b64 apm821xx: add drivetemp sensor for the WD MyBook Series
This patch adds the hwmon-drivetemp to the device.
It also adds device-tree bindings. This can be useful to
automate external fans which can be controlled for example
by either an unused sata-port or by the usb-power regulator.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
4 years ago
Christian Lamparter 0409fe64cf x86: geode/legacy: fix missing watchdog core dependencies
This patch follows the other patches that added the watchdog
core to various (armvirt, malta, ath79, ...) targets that
have been hit by the following build error:

Package kmod-hwmon-sch5627 is missing dependencies for the following libraries:
watchdog.ko

In theory, we could have just added the CONFIG_WATCHDOG_CORE=y
to the Kconfig variable of kmod-hwmon-sch5627's package definition.
This would have forced the watchdog core to be builtin and less
architectures would need to be updated. But we might as well follow
through here.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
4 years ago
David Bauer f1f8700d54 ath79: fix missing return statement in ar934x_nand
The reset assert and deassert methods currently miss
a return value, leading to a compilation warning.

Return the return-value of reset_control_assert and
reset_control_deassert to fix these warnings.

Suggested-by: Michal Cieslakiewicz <michal.cieslakiewicz@wp.pl>
Signed-off-by: David Bauer <mail@david-bauer.net>
4 years ago
David Bauer 94c0926106 ath79: fix NAND driver compilation for kernel 5.4
This fixes the compilation of the AR934x NAND controller
driver for kernel 5.4 while leaving it untouched for
kernel 4.19.

This change is currently not run-tested, as i do not have such
a device at hand.

CC: Michal Cieslakiewicz <michal.cieslakiewicz@wp.pl>
CC: André Valentin <avalentin@marcant.net>
CC: WeiDong Jia <jwdsccd@gmail.com>
Signed-off-by: David Bauer <mail@david-bauer.net>
Tested-by: Michal Cieslakiewicz <michal.cieslakiewicz@wp.pl>
4 years ago
Daniel Golle 9e5a25846f oxnas: yet another irqchip related patch
This time DTS fix, again from Sungbo Eo <mans0n@gorani.run>
  ARM: dts: oxnas: Fix clear-mask property

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
4 years ago
David Bauer 280868e54d ath79: align Ubiquiti AC Pro ethernet map to factory
The Uniquiti AC Pro and Ubiquiti AC Mesh Pro currently have the
"Primary" and "Secondary" ethernet ports configured to offer LAN as well
as WAN. However, Uiquiti describes the following behavior for the
devices Ethernet ports:

 > Secondary UniFi Access Point (UAP) Ethernet ports don't
 > provide PoE passthrough (to run current to a second powered
 > device), but they do support data passthrough.
 > It serves as a bridged interface between main / secondary
 > Ethernet port.

To reduce confusion for users (as LAN and WAN functionality is not
visible on the device itself), configure both ports to offer LAN
functionality. Users can still configure a WAN interface on a port they
are able to choose.

CC: Lucian Cristian <lucian.cristian@gmail.com>
Reported-by: Florian Klink <flokli@flokli.de>
Signed-off-by: David Bauer <mail@david-bauer.net>
4 years ago
Roger Pueyo Centelles 1775d50bde ath79: add support for Ubiquiti NanoBridge M (XM)
This patch adds support for the Ubiquiti NanoBridge M (XM), a
802.11n wireless with a feed+dish form factor, with the same board
definition as the Bullet M (XM).

Specifications:
 - Atheros AR7241 SoC
 - 32 MB RAM
 - 8 MB SPI flash
 - 1x 10/100 Mbps Ethernet port, 24 Vdc PoE-in
 - Power and LAN green LEDs
 - 4x RSSI LEDs (red, orange, green, green)
 - UART (115200 8N1)

Flashing via stock GUI:
 - WARNING: flashing OpenWrt from AirOS v5.6 or newer will brick your
   device! Read the wiki for more info.
 - Downgrade to AirOS v5.5.x (latest available is 5.5.11) first.
 - Upload the factory image via AirOS web GUI.

Flashing via TFTP:
 - WARNING: flashing OpenWrt from AirOS v5.6 or newer will brick your
   device! Read the wiki for more info.
 - Downgrade to AirOS v5.5.x (latest available is 5.5.11) first.
 - Use a pointy tool (e.g., pen cap, slotted screwdriver) to keep the
   reset button pressed.
 - Power on the device (keep reset button pressed).
 - Keep pressing until LEDs flash alternatively LED1+LED3 =>
   LED2+LED4 => LED1+LED3, etc.
 - Release reset button.
 - The device starts a TFTP server at 192.168.1.20.
 - Set a static IP on the computer (e.g., 192.168.1.21/24).
 - Upload via tftp the factory image:
    $ tftp 192.168.1.20
    tftp> bin
    tftp> trace
    tftp> put openwrt-ath79-generic-xxxxx-ubnt_nanobridge-m-squashfs-factory.bin

Signed-off-by: Roger Pueyo Centelles <roger.pueyo@guifi.net>
[rebase, fix includes in DTS, add label MAC address, add SOC and
fix sorting in generic-ubnt.mk]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Rafał Miłecki 8abefc8896 bcm53xx: sysupgrade: optimize building UBI image
Use "truncate" to adjust size of existing file instead of "dd" which
required creating a copy. This saves space on tmpfs. It may be as low
as 2.1 MiB when using OpenWrt default user space and way more (20+ MiB)
when flashing vendor firmware.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
4 years ago
Sungbo Eo 3f14f034fb treewide: omit IMAGE_SIZE argument from check-size
Now that check-size uses IMAGE_SIZE by default, we can skip the argument from
image recipes to reduce redundancy.

Signed-off-by: Sungbo Eo <mans0n@gorani.run>
[do not touch ar71xx]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Sungbo Eo 5b392c7119 treewide: gather DEVICE_VARS into one place
Place DEVICE_VARS assignments at the top of the file or above Device/Default
to make them easier to find.

For ramips, remove redundant values already present in parent file.

Signed-off-by: Sungbo Eo <mans0n@gorani.run>
[do not touch ar71xx, extend commit message]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Russell Senior d5812478ad ath79: add support for ubnt_bullet-m-ar7240 variant
This adds support for the Ubiquiti Bullet M (AR7240).

Specifications:
- AR7240 SoC @ 400 MHz
- 32 MB RAM
- 8 MB SPI flash
- 1x 10/100 Mbps Ethernet, 24 Vdc PoE-in
- External antenna
- POWER/LAN green LEDs
- 4x RSSI LEDs (red, orange, green, green)
- UART (115200 8N1) on PCB

Flashing via WebUI:
  Upload the factory image via the stock firmware web UI.

  Attention: airOS firmware versions >= 5.6 have a new bootloader with
  an incompatible partition table!

  Please downgrade to <= 5.5 _before_ flashing OpenWrt!
  Refer to the device's Wiki page for further information.

Flashing via TFTP:
  Same procedure as other Ubiquiti M boards.

- Use a pointy tool (e.g., pen cap, paper clip) and keep the reset
  button on the device or on the PoE supply pressed
- Power on the device via PoE (keep reset button pressed)
- Keep pressing until LEDs flash alternatively LED1+LED3 =>
  LED2+LED4 => LED1+LED3, etc.
- Release reset button
- The device starts a TFTP server at 192.168.1.20
- Set a static IP on the computer (e.g., 192.168.1.21/24)
- Upload via tftp the factory image:
  $ tftp 192.168.1.20
  tftp> bin
  tftp> trace
  tftp> put openwrt-ath79-generic-xxxxx-ubnt_bullet-m-ar7240-squashfs-factory.bin

The "fixed-link" section of the device tree is needed to avoid errors like this:

  Generic PHY mdio.0:1f:04: Master/Slave resolution failed, maybe conflicting manual settings?

With "fixed-link", the errors go away and eth0 comes up reliably.

Signed-off-by: Russell Senior <russell@personaltelco.net>
[fix SUPPORTED_DEVICES]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
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
Christian Lamparter 711bd33cd1 kernel: 5.4: disable more symbols
These have been discovered by the gemini 5.4 patches.
This is because one of the devices uses the FBDEV emulation.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
4 years ago
Christian Lamparter d107aaa910 kernel: backport and package drivetemp hwmon from v5.5
This patch backports the hwmon drivetemp sensor module from vanilla
linux 5.5 to be available on OpenWrt's 5.4 kernel.

Extract from The upstream commit by Guenter Roeck <linux@roeck-us.net>:
hwmon: Driver for disk and solid state drives with temperature sensors

"Reading the temperature of ATA drives has been supported for years
by userspace tools such as smarttools or hddtemp. The downside of
such tools is that they need to run with super-user privilege, that
the temperatures are not reported by standard tools such as 'sensors'
or 'libsensors', and that drive temperatures are not available for use
in the kernel's thermal subsystem.

This driver solves this problem by adding support for reading the
temperature of ATA drives from the kernel using the hwmon API and
by adding a temperature zone for each drive.

With this driver, the hard disk temperature can be read [...]
using sysfs:

$ grep . /sys/class/hwmon/hwmon9/{name,temp1_input}
/sys/class/hwmon/hwmon9/name:drivetemp
/sys/class/hwmon/hwmon9/temp1_input:23000

If the drive supports SCT transport and reports temperature limits,
those are reported as well.

drivetemp-scsi-0-0
Adapter: SCSI adapter
temp1:        +27.0<C2><B0>C (low  =  +0.0<C2><B0>C, high = +60.0<C2><B0>C)
                             (crit low = -41.0<C2><B0>C, crit = +85.0<C2><B0>C)
                             (lowest = +23.0<C2><B0>C, highest = +34.0<C2><B0>C)

The driver attempts to use SCT Command Transport to read the drive
temperature. If the SCT Command Transport feature set is not available,
or if it does not report the drive temperature, drive temperatures may
be readable through SMART attributes. Since SMART attributes are not well
defined, this method is only used as fallback mechanism."

This patch incorperates a patch made by Linus Walleij:
820-libata-Assign-OF-node-to-the-SCSI-device.patch
This patch is necessary in order to wire-up the drivetemp
sensor into the device tree's thermal-zones.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
4 years ago
Daniel Golle 19af00850f oxnas: backport another fix for irqchip
Sungbo Eo <mans0n@gorani.run> submitted another patch fixing an error
on reboot:
  irqchip/versatile-fpga: Apply clear-mask earlier

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
4 years ago
Paul Spooren 30a2488290 x86: allow non gzipped images
The previous image generation code would always gzipped images.

This patch changes the behaviour and only compresses images when
selected in menuconfig.

Signed-off-by: Paul Spooren <mail@aparcar.org>
4 years ago
Paul Spooren 33cc7e763b x86: use qemu-image command from image-commands.mk
The `qemu-image` command converts images to the specified type and
reduces redundant code.

Adaption from Alexander Couzens <lynxis@fe80.eu> work[0].

[0]: https://git.openwrt.org/?p=openwrt/staging/lynxis.git;a=blob;f=target/linux/x86/image/Makefile;h=83b8140b7aefbe708fd09c9c61827e7e39bda8b4;hb=416cccf398e9589e3de386e05b61b1c46cace20d#l51

Signed-off-by: Paul Spooren <mail@aparcar.org>
4 years ago
Paul Spooren b2207e267b x86: remove obsolete legacy profiles
Rely on device profiles instead for packages selection.

Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
[rebase, adjusted commit title]
Signed-off-by: Paul Spooren <mail@aparcar.org>
4 years ago
Paul Spooren cb007a7bf6 x86: switch image generation to new code
This commit introduces few related changes which need to be done in
single commit to keep images buildable between git revisions. In result
it retains all previous image creation possibilities with slight name
change of generated images. Brief summary of the commit:

* Split up image generation recipe to smaller chunks to make it more
  generic and reusable.

* Make iso images x86 specific and drop their definition as root
  filesystem.

* Convert image creation process to generic code specified in image.mk.

* Make geode subtarget inherit features from the main target instead of
  redefining them.

* For subtargets create device definitions with basic packages set.

Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
[rebased]
Signed-off-by: Paul Spooren <mail@aparcar.org>
4 years ago
Paul Spooren 5a5df62d95 x86/grub2: move grub2 image creation to package
Let the grub2 package take care of creating installable grub2 images,
this will allow creating grub2 images without first calling x86 image
generation recipe. Also as side effect, since those images are now
shared, it'll reduce the number of calling grub-mkimage.

Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
[rebase, adjusted commit title]
Signed-off-by: Paul Spooren <mail@aparcar.org>
4 years ago
Kevin Darbyshire-Bryant e6e1e12dc3 kernel: connmark set-dscpmark fix build on 5.4
Fix header change that was done for kernel but 4.19 got missed for 5.4.

Solves nasty errors like:

8.4.0_musl/include/linux/netfilter/xt_CONNMARK.h:5,
                from connmark_listener.c:30:
/builder/shared-workdir/build/sdk/staging_dir/toolchain-aarch64_cortex-a53_gcc-8.4.0_musl/include/linux/netfilter/xt_connmark.h:23:2: error: enumerator value for 'XT_CONNMARK_VALUE' is not an integer constant
 XT_CONNMARK_VALUE = BIT(0),
 ^~~~~~~~~~~~~~~~~
/builder/shared-workdir/build/sdk/staging_dir/toolchain-aarch64_cortex-a53_gcc-8.4.0_musl/include/linux/netfilter/xt_connmark.h:25:1: error: enumerator value for 'XT_CONNMARK_DSCP' is not an integer constant
};

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
4 years ago
Chuanhong Guo ed7751f968 mediatek: move mt76 and wpad-bacic to mt7622 subtarget
mt76 is a target default package for mt7622-wmac only.
mt7623 doesn't have integrated wireless support and wifi drivers for
pcie cards should be added as device specific package.
mt7629-wmac isn't supported by mt76 yet.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
4 years ago
Chuanhong Guo b7fe92b915 mediatek: mt7629: fix firmware partition
rename "kernel" partition in upstream dts to "firmware" and add
denx,fit as compatible string for mtdsplit.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
4 years ago
Chuanhong Guo 2d2e9d2956 mediatek: backport spi-mem based mtk spinor driver
This new driver has full quadspi and DMA support, providing way better
reading performance.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
4 years ago
Chuanhong Guo a73ee0fe35 mediatek: mt7629: refresh config for linux 5.4
Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
4 years ago
Chuanhong Guo 1bbb8807fa mediatek: mt7629: fix ethernet default config
1. fix typo: ucidef_set_interfaces_wan -> ucidef_set_interface_wan
2. change board name to mt7629-rfb to match upstream dts

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
4 years ago
Serge Vasilugin 9801d61c4a kernel: rtl8367b: add configuration for extif2
Both rtl8367b and rtl8367s have two extended interface
rtl8367rb: 5 port + 2*RGMII/MII
rtl8367s:  5 port + SGMII/HSGMI + RGMII/MII
(?)rtl8367sb:  5 port + 2*RGMII/MII
These interfaces correspond to EXT1 and EXT2 (ports 6 and 7 respectivly).

This patch allow to configure EXT2 in dts-file:

	rtl8367rb {
		compatible = "realtek,rtl8367b";
		cpu_port = <7>;
		realtek,extif2 = <1 0 1 1 1 1 1 1 2>;
		mii-bus = <&mdio0>;
		phy_id = <29>;
	};

Signed-off-by: Serge Vasilugin <vasilugin@yandex.ru>
[fix indent, replace magic value, alter commit message]
Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
4 years ago
Chuanhong Guo c0bc706c31 generic: rtl8367b: add definition of debug reg
This commit adds definition of DEBUG0 and DEBUG1 registers and replace
magic values with proper register modifying.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
4 years ago
Daniel Golle 67b04e767a oxnas: backport patch fixing hang after reboot
Sungbo Eo <mans0n@gorani.run> posted a patch fixing the long-standing
reboot problem on the OXNAS OX820 platform:
  irqchip/versatile-fpga: Handle chained IRQs properly

It got queued for 5.7. Import it to oxnas target patches for now.

Fixes: b4917fa907 ("oxnas: fix oxnas-rps-timer dt-match")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
4 years ago
Davide Fioravanti 213250b56b ath79: add support for TP-Link Archer D7/D7b v1
TP-Link Archer D7 v1 is a dual-band AC1750 router + modem.
The router section is based on Qualcomm/Atheros QCA9558 + QCA9880.
The "DSL" section is based on BCM6318 but it's currently not supported.

The Archer D7b seems to differ from the Archer D7 only in the
partition table.

Router section - Specification:

775/650/258 MHz (CPU/DDR/AHB)
128 MB of RAM (DDR2)
16 MB of FLASH (SPI NOR)
3T3R 2.4 GHz
3T3R 5 GHz
4x 10/100/1000 Mbps Ethernet
7x LED, 2x button
UART header on PCB

Known issues:

- Broadband LED (missing GPIO - probably driven by the BCM6318)
- Internet LED (missing GPIO - probably driven by the BCM6318)
- WIFI LED (working only for one interface at a time, while in the
  OEM firmware works for both wifi interfaces; thus, this patch does
  not set a trigger by default)
- DSL not working (eth0)

UART connection
---------------
J1 HEADER (Qualcomm CPU)
. VCC
. GND
. RX
O TX

J41 HEADER (Broadcom CPU)
. VCC
. GND
. RX
O TX

The following instructions require a connection to the J1 UART header
and are tested for the Archer D7 v1.
For the Archer D7b v1, names should be changed accordingly.

Flash instructions under U-Boot, using UART
------------------------------------------
 1. Press "tpl" to stop autobooting and obtain U-Boot CLI access.
 2. Setup ip addresses for U-Boot and your tftp server.
 3. Issue below commands:
	tftpboot 0x81000000 openwrt-ath79-generic-tplink_archer-d7-v1-squashfs-sysupgrade.bin
	erase 0x9f020000 +f90000
	cp.b 0x81000000 0x9f020000 0xf90000
	reset

Initramfs instructions under U-Boot for testing, using UART
----------------------------------------------------------
 1. Press "tpl" to stop autobooting and obtain U-Boot CLI access.
 2. Setup ip addresses for U-Boot and your tftp server.
 3. Issue below commands:
	tftpboot 0x81000000 openwrt-ath79-generic-tplink_archer-d7-v1-initramfs-kernel.bin
	bootm 0x81000000
 4. Here you can backup the original firmware and/or flash the sysupgrade openwrt if you want

Restore the original firmware
-----------------------------
 0. Backup every partition using the OpenWrt web interface
 1. Download the OEM firmware from the TP-Link website
 2. Extract the bin file in a folder (eg. Archer_D7v1_1.6.0_0.9.1_up_boot(160216)_2016-02-16_15.55.48.bin)
 3. Remove the U-Boot and the Broadcom image part from the file.
    Issue the following command:
	dd if="Archer_D7v1_1.6.0_0.9.1_up_boot(160216)_2016-02-16_15.55.48.bin" of="Archer_D7v1_1.6.0_0.9.1_up_boot(160216)_2016-02-16_15.55.48.bin.mod" skip=257 bs=512 count=31872
 4. Double check the .mod file size. It must be 16318464 bytes.
 5. Flash it using the OpenWrt web interface. Force the update if needed.
    WARNING: Remember to NOT keep settings.

 5b. (Alternative to 5.) Flash it using the U-Boot and UART connection.
     Issue below commands in the U-Boot:
	tftpboot 0x81000000 Archer_D7v1_1.6.0_0.9.1_up_boot(160216)_2016-02-16_15.55.48.bin.mod
	erase 0x9f020000 +f90000
	cp.b 0x81000000 0x9f020000 0xf90000
	reset

Signed-off-by: Davide Fioravanti <pantanastyle@gmail.com>
[cosmetic DTS changes, remove TPLINK_HWREVADD := 0, do not use two
phyXtpt at once, add missing buttons, minor commit message adjustments]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Adrian Schmutzler 646d95c374 ath79: add support for TP-Link Archer C60 v3
TP-Link Archer C60 v3 is a dual-band AC1350 router,
based on Qualcomm/Atheros QCA9561 + QCA9886.

It seems to be identical to the v2 revision, except that
it lacks a WPS LED and has different GPIO for amber WAN LED.

Specification:

- 775/650/258 MHz (CPU/DDR/AHB)
- 64 MB of RAM (DDR2)
- 8 MB of FLASH (SPI NOR)
- 3T3R 2.4 GHz
- 2T2R 5 GHz
- 5x 10/100 Mbps Ethernet
- 6x LED, 2x button
- UART header on PCB

Flash instruction (WebUI):
Download *-factory.bin image and upload it via the firmwary upgrade
function of the stock firmware WebUI.

Flash instruction (TFTP):
1. Set PC to fixed IP address 192.168.0.66
2. Download *-factory.bin image and rename it to tp_recovery.bin
3. Start a tftp server with the file tp_recovery.bin in its root
   directory
4. Turn off the router
5. Press and hold reset button
6. Turn on router with the reset button pressed and wait ~15 seconds
7. Release the reset button and after a short time the firmware should
   be transferred from the tftp server
8. Wait ~30 second to complete recovery

While TFTP works for OpenWrt images, my device didn't accept the
only available official firmware "Archer C60(EU)_V3.0_190115.bin".

In contrast to earlier revisions (v2), the v3 contains the (same)
MAC address twice, once in 0x1fa08 and again in 0x1fb08.
While the partition-table on the device refers to the latter, the
firmware image contains a different partition-table for that region:

name           device            firmware
factory-boot   0x00000-0x1fb00   0x00000-0x1fa00
default-mac    0x1fb00-0x1fd00   0x1fa00-0x1fc00
pin            0x1fd00-0x1fe00   0x1fc00-0x1fd00
product-info   0x1fe00-0x1ff00   0x1fd00-0x1ff00
device-id      0x1ff00-0x20000   0x1ff00-0x20000

While the MAC address is present twice, other data like the PIN isn't,
so with the partitioning from the firmware image the PIN on the device
would actually be outside of its partition.
Consequently, the patch uses the MAC location from the device (which
is the same as for the v2).

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Russell Senior 8cacb84041 ath79: rename ubnt_bullet-m to ubnt_bullet-m-ar7241
Since there exists another variant of the Bullet M with AR7240 SoC
under the same name, this patch introduces the SoC into the device
name to be able to distinguish these variants.

Signed-off-by: Russell Senior <russell@personaltelco.net>
[add commit message, adjust model in DTS, fix 02_network and
SUPPORTED_DEVICES]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Russell Senior 572278d3a0 ath79: generalize ubnt_xm dtsi for ar7240 and ar7241
* Prepare to support the AR7240 variant of ubiquiti bullet m, by
  reorganizing the related dtsi files.

* Distribute SOC variable across ubnt-xm devices.

Signed-off-by: Russell Senior <russell@personaltelco.net>
4 years ago
Bjørn Mork dabe8471fc bcm27xx: enable THERMAL_WRITABLE_TRIPS on bcm2710 and bcm2711
The PoE hat supported on the RPi 3B+ and 4B comes with a rather
loud fan, tripped in two steps by the brcmstb_thermal
thermal_zone driver.  Enabling writable trip points allow
users to adjust the fan trip points according to their
preferred temp/noise ratio.

This setting is enabled on most other targets with similar
thermal_zone controlled cooling devices.

Signed-off-by: Bjørn Mork <bjorn@mork.no>
4 years ago
Mathias Kresin 132ff90f1d ramips: do not add metadata to factory images
The image metadata are openwrt specific and not required for factory
images.

Signed-off-by: Mathias Kresin <dev@kresin.me>
4 years ago
Mathias Kresin b66af9ac2d lantiq: kernel 5.4: enable JFFS2
We do not build images with a jffs2 rootfs, but jffs2 is still used as
filesystem for the rootfs_data.

Fixes: e3eaf57808 ("lantiq: kernel 5.4: debloat kernel config")
Signed-off-by: Mathias Kresin <dev@kresin.me>
4 years ago
Adrian Schmutzler a57fcd880e ath79: fix execute bit for 02_network on mikrotik subtarget
When creating the mikrotik subtarget, the execute bit on 02_network
was not set. Fix it.

Fixes: a66eee6336 ("ath79: add mikrotik subtarget")

Reported-by: Christopher Hill <ch6574@gmail.com>
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Adrian Schmutzler 3d8be08939 ath79: get rid of BOARD_NAME for Mikrotik RouterBOARD
So far, specifying "BOARD_NAME := routerboard" is required by the
upgrade code of Mikrotik NAND devices, as "sysupgrade-routerboard"
is hardcoded in platform_do_upgrade_mikrotik_nand().

This patch replaces the latter with a grep for the name like it
is already done in nand_upgrade_tar() in /lib/upgrade/nand.sh.

By that, BOARD_NAME is obsolete now for this device.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Adrian Schmutzler 281785d74f ar71xx: remove hard-coded folder name from Mikrotik RB upgrade
So far, specifying "BOARD_NAME := routerboard" is required by the
upgrade code of Mikrotik NAND devices, as "sysupgrade-routerboard"
is hardcoded in platform_do_upgrade_mikrotik_rb().

This patch replaces the latter with a grep for the name like it
is already done in nand_upgrade_tar() in /lib/upgrade/nand.sh.

This should enable upgrades from ar71xx to ath79 without setting
BOARD_NAME for the latter.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Roger Pueyo Centelles a66eee6336 ath79: add mikrotik subtarget
This commit creates the ath79/mikrotik subtarget in order to support
MikroTik devices based on Qualcomm Atheros MIPS SoCs.

MikroTik devices need a couple of specific features: the split MiNOR
firmware MTD format, which is not used by other devices, and the 4k
sector erase size on SPI NOR storage, which can not be added to the
ath79/generic and ath79/nand subtargets now.

Additionally, the commit moves the two MikroTik devices already in
the generic and nand subtargets to this new one.

Tested on the RB922 board and the wAP AC router.

Signed-off-by: Roger Pueyo Centelles <roger.pueyo@guifi.net>
4 years ago
Sungbo Eo 9e129c9d95 oxnas: enable sata on Pogoplug V3/Pro
Pogoplug V3/Pro has an interanl SATA port. To use it, DTS sata node should be
enabled, and kmod-ata-oxnas-sata package needs to be installed.

Fixes: FS#2542

Signed-off-by: Sungbo Eo <mans0n@gorani.run>
4 years ago
Tomasz Maciej Nowak 6e64039a87 tegra: switch to kernel 5.4
Build the latest kernel by default, since testing did not show any
regressions.

Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
[fix merge conflict in tegra/Makefile]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
4 years ago