Commit graph

16409 commits

Author SHA1 Message Date
Felix Fietkau
63b525dd6b image: add a helper variable for getting kernel/rootfs from within image Build/* templates
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2016-07-31 12:25:25 +02:00
Felix Fietkau
9201e88f51 kernel: remove hostap driver
It has been marked as broken for well over a month now and nobody has
complained.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2016-07-31 12:25:24 +02:00
Felix Fietkau
467dee32ed octeon: increase block2mtd rootfs probe timeout on ER
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2016-07-30 14:10:33 +02:00
Felix Fietkau
67e764c6ca octeon: pad squashfs sysupgrade image rootfs
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2016-07-30 14:10:33 +02:00
Felix Fietkau
77b16bacb1 octeon: drop unsupported jffs2 feature flag
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2016-07-30 14:10:33 +02:00
Felix Fietkau
2192a029d3 octeon: fix sysupgrade images
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2016-07-30 13:10:29 +02:00
Felix Fietkau
9a3852bf8c kernel: fix crashlog regression on x86
Check memblock regions for sufficient size before attempting to use
them. Allow checks for multiple memblock regions until a suitable one is
found.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2016-07-30 12:25:57 +02:00
Jo-Philipp Wich
18c622a1f2 ath25: rework image building
* Remove legacy macros
* Emit generic LZMA and Gzip kernel images from the combined device recipe
* Rename combined device to generic

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2016-07-29 16:53:03 +02:00
Jo-Philipp Wich
db49dd894e build: rename sysupgrade-nand to sysupgrade-tar
Now that the "sysupgrade-nand" step is used by non-NAND targets as well,
rename it to "sysupgrade-tar" to make it more generic.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2016-07-29 16:53:03 +02:00
Jo-Philipp Wich
fccc4298df octeon: clean up image build code
Use the generic "sysupgrade-nand" build step to pack the sysupgrade file,
it performs the same steps as the inline "tar-file" macro.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2016-07-29 16:53:03 +02:00
Felix Fietkau
37e82e4e42 build: remove obsolete variables from opkg command
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2016-07-29 10:18:26 +02:00
Felix Fietkau
119b4422f8 apm821xx: only attempt to mount /boot on MyBook Live
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2016-07-29 10:18:09 +02:00
Hauke Mehrtens
47cce1d5e4 lantiq: fix switch configuration for EASY80920
The device tree description misses some Ethernet ports and there was no
model specified for this board. In addition there was no switch
specific default configuration created.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2016-07-28 22:42:16 +02:00
Felix Fietkau
6b5a418512 kernel: fix crashlog issues on various architectures
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2016-07-28 21:26:37 +02:00
Felix Fietkau
eb28a0cde6 lantiq: fix WBMR-300HPD switch port assignment
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2016-07-28 21:25:42 +02:00
Jo-Philipp Wich
3bb2b46bc3 octeon: fix image build
After b47f438 "build: remove image prefix from kernel files in KDIR", the
kernel image in $(KDIR) has a different name and could not be found by the
tar-file build step anymore, leading to the following error on the build
servers:

  cp: cannot stat `.../linux-octeon/lede-octeon-generic-kernel.bin': No such file or directory
  make[4]: *** [.../linux-octeon/tmp/lede-octeon-generic-ext4-sysupgrade.tar] Error 1

Adjust the path to the source kernel image in order to fix the problem.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2016-07-28 19:44:19 +02:00
Matthias Schiffer
adbbfb7ff9
ar71xx: don't use D-Link DIR-505 status LED as ethernet indicator
The stock firmware uses the single LED as status indicator only. Using the
same LED both for status and as ethernet indicator is uncommon, and has
been confusing users who were using the device as a WLAN mesh node (so the
LED was just off, as no ethernet was connected).

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
2016-07-28 15:59:04 +02:00
Matthias Schiffer
500a67a167
ar71xx: add revision detection for D-Link DIR-505 A1/A2
The A1 image also works on the A2, correctly set AR71XX_MODEL in this case.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
2016-07-28 15:44:52 +02:00
Rafał Miłecki
f6a86ba066 bcm53xx: enable kernel symbols/drivers needed for BCM53573
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
2016-07-28 14:05:41 +02:00
Rafał Miłecki
2552e9319e bcm53xx: backport DTS patches for USB 2.0 and Tenda AC9
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
2016-07-28 12:59:23 +02:00
Rafał Miłecki
a3be48593b bcm53xx: refresh kernel patches
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
2016-07-28 12:45:02 +02:00
John Crispin
96fa9aa13b ar71xx: add a missing ;; to ar71xx.sh
commit 42305ae24a ("ar71xx: add support for gl-mifi")

was missing a ;; breaking boot up

Signed-off-by: John Crispin <john@phrozen.org>
2016-07-24 11:17:34 +02:00
Rafał Miłecki
846eca673f b53: allow ports with higher numbers than CPU port
Our code was assuming CPU port uses the highest number. My BCM53573
device has eth0 connected to port 8 and eth1 connected to port 5. While
working on support for it I tried to:
1) Enable all ports (including port 8)
2) Set CPU port to 5

I noticed port 8 is not accessible anymore. It was just a development
process but it seems like something worth fixing anyway.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Acked-by: Jonas Gorski <jonas.gorski@gmail.com>
2016-07-24 06:38:30 +02:00
dani
cea917c30b brcm63xx: fix HG556a C button
One button of the HG556a-C has the wrong GPIO pin defined in the dts file,
fix it

Signed-off-by: Daniel Gonzalez <dgcbueu@gmail.com>
2016-07-24 06:38:30 +02:00
P.Wassi
525b9edc8a ramips: unify etc/board.d/01_leds configuration
Introduce an optional parameter at the local set_usb_led and
set_wifi_led function such that they can take a triggering
device. If no parameter is passed, behaviour is unchanged.
Signed-off-by: P.Wassi <p.wassi@gmx.at>
2016-07-24 06:38:30 +02:00
Zhao Gang
42305ae24a ar71xx: add support for gl-mifi
This add initial support for gl-mifi.
Product page: http://www.gl-inet.com/mifi/

Signed-off-by: Zhao Gang <gang.zhao.42@gmail.com>
2016-07-24 06:38:30 +02:00
Michael Lee
0d5277f73f ramips: dch-m225 don't have ethernet. default enable wifi
Signed-off-by: Michael Lee <igvtee@gmail.com>
2016-07-24 06:38:30 +02:00
Paul Wassi
104114fe00 ramips: remove indentation in etc/board.d/01_leds
Remove indentation at end of line in base-files/etc/board.d/01_leds
Signed-off-by: Paul Wassi <p.wassi@gmx.at>
2016-07-24 06:38:29 +02:00
John Crispin
6674006bd0 ramips: add missing i2s alias
Signed-off-by: John Crispin <john@phrozen.org>
2016-07-24 06:38:29 +02:00
Matthias Schiffer
9687341808
ar71xx: clean up legacy-devices.mk
Several legacy images were not buildable because of missing profile
definitions in legacy-devices.mk since MultiProfile was removed. Update
legacy-devices.mk to provide all necessary profiles, and change ordering
to match legacy.mk.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
2016-07-27 17:27:19 +02:00
Felix Fietkau
b8cd996d92 mvebu: limit image builds to profile selection
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2016-07-26 08:37:59 +02:00
Felix Fietkau
9945a1dca5 build: remove cpio.gz and tar.gz from regular filesystem types
They are not used to produce regular firmware images anyway. Instead,
call their build templates directly if enabled in the config

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2016-07-25 12:43:39 +02:00
Felix Fietkau
33c8d35375 image: remove shell calls from legacy ubi/ubifs image code
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2016-07-25 12:37:50 +02:00
Felix Fietkau
064bcdc259 kirkwood: fix UBIFS_OPTS variable in image build
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2016-07-25 12:30:19 +02:00
Christian Lamparter
3f506bdbb0 apm821xx: fix atheros PCIe cards on the MR24
The consolidation of the MR24 and WNDR4700 subtargets
into the nand subtarget broke MR24's atheros wlan.
This was because the wndr4700's board code used a
pci_fixup routines to supply the ath9k module with
the calibration data.

This is not necessary on the MR24 as it has standard
mini-pcie ports. Hence the two AR9380 mini-pcie cards
do not need any calibration data overrides.

Cc: chrisrblake93@gmail.com
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2016-07-25 10:38:48 +02:00
Christian Lamparter
08257a4053 apm821xx: use lzma compression for the initramfs images
The MR24's u-boot takes it sweet time decompressing the
LZMA-packed initramfs image. A user reported that
compared to the old gzip method in v2: it "takes a ton
longer to decompress like 4\x the old boot time for
decompression".

This patch also fixes a issue with the WNDR4700's initramfs
image getting to big and causing the following u-boot crash
during the decompression:

"Uncompressing Multi-File Image ... Error: inflate() returned -5
out-of-mem or overwrite error - must RESET board to recover"

This patch fixes both issues by reverting the MR24's initramfs
compression method back to gzip. And choosing to compress the
initramfs within the initramfs image as LZMA by default.

Cc: chrisrblake93@gmail.com
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2016-07-25 10:38:11 +02:00
Felix Fietkau
07577c5ebe tools: bring back genext2fs for apm821xx
This reverts commit 8c68c104ea.
It is used for apm821xx, which needs ext2 (not ext4) images for some
devices.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2016-07-23 19:37:20 +02:00
Alexey Brodkin
18f368fa35 linux: Get rid of 000-keep_initrafs_the_default.patch
With that patch in place for initramfs no additional options are
reported for "/" partition. What's really important is missing
info about sizes. Which in its turn makes opkg think that there's
no space on "/" partition to install software.

I understand that's a sort of corner-case, people rarely install
packages on ramfs but anyways why not?

Just in case that's what I see with the patch:
---------------------->8--------------------
root@lede:/# cat /proc/mounts
rootfs / rootfs rw 0 0
proc /proc proc rw,nosuid,nodev,noexec,noatime 0 0
sysfs /sys sysfs rw,nosuid,nodev,noexec,noatime 0 0
tmpfs /tmp tmpfs rw,nosuid,nodev,noatime 0 0
tmpfs /dev tmpfs rw,nosuid,relatime,size=512k,mode=755 0 0
devpts /dev/pts devpts rw,nosuid,noexec,relatime,mode=600 0 0
debugfs /sys/kernel/debug debugfs rw,noatime 0 0
---------------------->8--------------------

And without:
---------------------->8--------------------
root@lede:/# cat /proc/mounts
rootfs / rootfs rw,size=256168k,nr_inodes=32021 0 0
proc /proc proc rw,nosuid,nodev,noexec,noatime 0 0
sysfs /sys sysfs rw,nosuid,nodev,noexec,noatime 0 0
tmpfs /tmp tmpfs rw,nosuid,nodev,noatime 0 0
tmpfs /dev tmpfs rw,nosuid,relatime,size=512k,mode=755 0 0
devpts /dev/pts devpts rw,nosuid,noexec,relatime,mode=600 0 0
debugfs /sys/kernel/debug debugfs rw,noatime 0 0
---------------------->8--------------------

Note how different is entry for rootfs.

And given there's no known rationale for that patch we're
getting rid of it.

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Cc: Jonas Gorski <jonas.gorski@gmail.com>
Cc: Rafał Miłecki <zajec5@gmail.com>
Cc: John Crispin <john@phrozen.org>
Cc: Felix Fietkau <nbd@nbd.name>
2016-07-23 19:04:37 +02:00
Alexey Brodkin
84a1a0edf0 sunxi/pcduino3: Remove selection of absent rtl8188eu
Since commit 217a643755 "wireless: remove rtl8188eu (staging)"
there's no point in selection of the missing module.

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Cc: John Crispin <john@openwrt.org>
Cc: Zoltan Herpai <wigyori@uid0.hu>
2016-07-23 12:27:42 +02:00
Felix Fietkau
8fb89f7e73 ledtrig-usbdev: fix duplicate match detection
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2016-07-23 10:30:45 +02:00
Felix Fietkau
f1e085adfe ar71xx: add ath10k firmware to profile defaults where ath10k is used
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2016-07-22 16:06:39 +02:00
Felix Fietkau
39429b3d20 apm821xx: rework image build code for MyBook Live
Eliminate redundant mkfs calls, preparation for upcoming image build
core rework

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2016-07-22 12:49:57 +02:00
Felix Fietkau
3886644632 apm821xx: add DEVICE_DTS_DIR variable, remove redundant DEVICE_VARS entry
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2016-07-22 12:49:57 +02:00
Felix Fietkau
44c39d5812 apm821xx: add missing default profiles for subtargets
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2016-07-22 09:48:12 +02:00
Christian Lamparter
9e0fd1b52a apm821xx: add support for the Netgear Centria N900 WNDR4700/WNDR4720
This patch adds support for Netgear Centria N900 WNDR4700/WNDR4720

hardware highlights:

CPU:	AMCC PowerPC APM82181 Rev. E at 1000 MHz (PLB=166, OPB=83, EBC=83 MHz)
	Security support, Boot ROM Location NAND wo/ECC 2k page (8 bits)
	32 kB I-Cache 32 kB D-Cache, 256 kB L2-Cache, 32 kB OnChip Memory
Board:	AMCC APM82181 Evaluation Board, PCIE0/SATA1, 1*USB OTG
DRAM:	256 MB (ECC not enabled, 500 Mb/s, 32-bit, CL3)
NAND:	128 MiB (SLC, erase size: 128 KiB, page size: 2048, OOB size: 64)
ETH:	Atheros AR8327N Gigabit Switch (4 x LAN, 1 x WAN)
USB:	2 x 3.0 (Renesas uPD720202K8-711-BAA-A, firmware not included)
SATA:	1 x SATA-II 3.5" Hard Drive Bay for HDDs (DesignWare SATA).
WLAN1:	Atheros AR9380 5GHz 802.11an 3:3x3
WLAN2:	Atheros AR9581 2.4GHz 802.11bgn 3:3x3
SDCARD:	GL827L SD/MMC/MS Flash Card Reader (on internal dwc2 USB 2.0 host)
I2C:	GMT G781 (i2c-0 @ 0x4d - lm90 compatible temperature sensor)
	TC654    (i2c-0 @ 0x1b - Dual PWM fan Speed controller)

WARNING: The serial port needs a TTL/RS-232 v3.3 level converter!

INFO: Since this device only has a NAND chip. I opted for going with
root.squashfs in a UBI volume. There's no squashfs/jffs2 image.

This target produces three images.
  a. netgear factory image
     This image can be used to flash the Netgear WNDR4700 via the
     firmware recovery mechanism and the web admin site.

     The bootloader can be instructed to do a firmware recovery via the
     # fw_recovery
     command. It will start a tftp server and listen on 192.168.1.1
     (the ipaddr variable in u-boot) for incoming, binary tftp clients.
     The firmware recovery mechanism is also started if any of the flash
     content which contains the kernel, device-tree definitions or the
     (fake)rootfs fails to verify or load.

  b. sysupgrade.tar image for sysupgrade
     An sysupgrade will replace the entire current LEDE installation
     with a newer version. This does include the kernel and the ubi rootfs
     partition. The configuration can be carried over automatically as well
     if desired.

     simply copy the sysupgrade.tar to a the WNDR4700 running LEDE and run:

     root@lede:~# sysupgrade sysupgrade.tar

     and let it reboot.

     Note: The devicetree flash area is NOT updated. Until the devicetree
	   definition is stable, this can lead to all sorts of hardware
	   detection problems! So make sure, if you experience issues: try
	   the fw_recovery. If you are unsure whenever this affects you:
	   test if you can reproduce your issue with the initramfs method.
	   As it will always have up-to-date device-tree definitions.

  c. initramfs image for TFTP (for development and testing)
     To use the initramfs method, follow the following steps:
       1) Move the "lede-apm821xx-netgear-WNDR4700-initramfs-kernel.bin"
	  file to to the root directory of your TFTP server.

       2) rename it to wndr4700.bin

       3) On the WNDR4700 - Hit Enter during u-boot and insert:
	  # tftp 400000 wndr4700.bin; run addtty; bootm 400000 -

     This will boot the LEDE image.

     Note: The default tftp server is 192.168.1.7, if you want to change it:
     # setenv serverip 192.168.8.7;

     Note2: The default address for the WNDR4700 is 192.168.1.1:
     # setenv ipaddr 192.168.8.8;

     Note: Connect you tftp server on the last LAN port (not the WAN)

Note: The firmware for the USB 3.0 Host chip is not included anymore.
Therefore the two USB 3.0 ports will not work without the
uPD7070x-firmware package installed.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2016-07-22 09:48:12 +02:00
Christian Lamparter
47eeb9f857 apm821xx: lm90 add thermal sensor interface support for device tree
From 912-hwmon-lm90-expose-to-thermal-fw-via-DT.patch:
"This patch adds to lm90 temperature sensor the possibility
to expose itself as thermal zone device, registered on the
thermal framework.

The thermal zone is built only if a device tree node
describing a thermal zone for this sensor is present
inside the lm90 DT node. Otherwise, the driver behavior
will be the same."

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2016-07-22 09:48:12 +02:00
Christian Lamparter
b46e2a6d95 apm821xx: tc654: add driver for Microchip TC654/TC655 PWM fan controllers
This patch adds a hwmon driver for the Microchip TC654 and TC655
Dual SMBus PWM Fan Speed Controllers with Fan Fault detection.

The chip is described in the DS2001734C Spec Document from Microchip.
It supports:
	- Shared PWM Fan Drive for two fans
	- Provides RPM
	- automatic PWM controller (needs additional
	  NTC/PTC Thermistors.)
	- Overtemperature alarm (when using NTC/PTC
	  Thermistors)

The TC654 is used by the Netgear WNDR47X0 to control its
system fan.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2016-07-22 09:48:12 +02:00
Christian Lamparter
dc7efaefb5 apm821xx: add support for the Western Digital MyBook Live Series
Hardware Highlights:

This patch adds support for Western Digital MyBook Live Series:
CPU: AMCC PowerPC  UNKNOWN (PVR=12c41c83) at 800 MHz (PLB=200, OPB=100, EBC=100 MHz)
     32 kB I-Cache 32 kB D-Cache, 256 kB L2-Cache, 32 kB OnChip Memory
Board: Apollo-3G - APM82181 Board, 1*SATA
DRAM:  256 MB (2x NT5TU64M16GG-AC)
FLASH: 512 kB (SST 39VF040)
Ethernet: 1xRGMII - 1 Gbit - Broadcom PHY BCM54610

WARNING: The serial port needs a TTL/RS-232 v3.3 level converter!

The MyBook Live Duo additionally features a 1x USB 2.0 host port
and can support a second hard-drive.

This target produces two images for a target.
 1. ext4 image
    The extracted/raw image can be directly installed on
    the internal HDD via "dd if=img.ext4 of=/dev/sdX".

    This can either be done in place with the stock MyBook Live
    firmware via ssh. Or by removing the HDD and writing the image
    with a different PC.

    The the compressed images are useful for sysupgrade.

 2. recovery.tar image for TFTP and Serial.

    extract the recovery.tar to a TFTP server directory.

    On the MyBook Live (Duo) serial port - Hit Enter during u-boot and insert:
    # setenv serverip 192.168.1.254; setenv ipaddr 192.168.1.1; run net_self

    Where 192.168.1.254 is your TFTP server.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2016-07-22 09:48:12 +02:00
Christian Lamparter
d37d16488c apm821xx: sata_dwc_460ex: backport fixes and cleanups from 4.7
This patch fixes the sata_dwc_460ex SATA driver which is used
by the SATA controllers in the MyBook Live Series and WNDR4700.

The code was backported from the upstream kernel.
It can be dropped completely on 4.7+.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2016-07-22 09:48:12 +02:00
Christian Lamparter
ea91ee13a7 apm821xx: dw_dmac: backport fixes and cleanups from 4.7
This patch fixes the dw_dmac dma engine which is used
by the SATA controllers in the MyBook Live Series and WNDR4700.

The code was backported from the upstream kernel.
It can be dropped completely on 4.7+.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2016-07-22 09:48:12 +02:00