aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ipq806x/base-files/lib
Commit message (Collapse)AuthorAgeFilesLines
* ipq806x: fix ZyXEL NBG6817 sysupgradeMathias Kresin2018-01-181-7/+10
| | | | | | | | | | | Use the first found directory in the tar archive instead of relying on a directory named according to the userspace boardname. It allows to change the boardname without adding another compatibility layer to the zyxel sysupgrade. Fixes: 33f09cf15178 ("ipq806x: convert to dt-based board-detection") Signed-off-by: Mathias Kresin <dev@kresin.me>
* ipq806x: add support for OpenMesh A42Sven Eckelmann2018-01-132-0/+114
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * QCA IPQ401x * 256 MB of RAM * 32 MB of SPI NOR flash (s25fl256s1) - 2x 15 MB available; but one of the 15 MB regions is the recovery image * 2T2R 2.4 GHz - QCA4019 hw1.0 (SoC) - requires special BDF in QCA4019/hw1.0/board-2.bin with bus=ahb,bmi-chip-id=0,bmi-board-id=16,variant=OM-A42 * 2T2R 5 GHz - QCA4019 hw1.0 (SoC) - requires special BDF in QCA4019/hw1.0/board-2.bin with bus=ahb,bmi-chip-id=0,bmi-board-id=17,variant=OM-A42 * multi-color LED (controlled via red/green/blue GPIOs) * 1x button (reset; kmod-input-gpio-keys compatible) * external watchdog - triggered GPIO * 1x USB (xHCI) * TTL pins are on board (arrow points to VCC, then follows: GND, TX, RX) * 2x gigabit ethernet * powered only via POE - 802.3af POE on Ethernet 1 - 18-24v passive POE (mode B) on Ethernet 2 The tool ap51-flash (https://github.com/ap51-flash/ap51-flash) should be used to transfer the factory image to the u-boot when the device boots up. Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com>
* ipq806x: Sort occurrences of boardame alphabeticallyLuis Araneda2018-01-131-3/+3
| | | | | | | This restores the alphabetical sort that was present before the renaming of boardname. Signed-off-by: Luis Araneda <luaraneda@gmail.com>
* ipq806x: convert to dt-based board-detectionLuis Araneda2018-01-134-88/+12
| | | | | | | | | | | | | | | | | Use the generic board detection method: - Board name: First compatible string from the device tree - Board model: Model property from the device tree Change occurrences of board name in userspace by the compatible string, and removed target specific board detection script Replace the definition of SUPPORTED_DEVICES in Device/Default to extract the dt compatible string from each device definition. Additionally, for devices supported by lede-17.01, append the value of BOARD_NAME to SUPPORTED_DEVICES in the device definition. Signed-off-by: Luis Araneda <luaraneda@gmail.com>
* base-files: unify get_dt_led helper functionChristian Lamparter2017-12-141-12/+0
| | | | | | | | | | | | | | Lantiq and IPQ806X (which includes IPQ40XX) both define the same custom function {ipq806x|lantiq}_get_dt_led. This patch moves the function into the base-file package at lib/functions/leds.sh to make it more accessible for other targets as well. Cc: Mathias Kresin <dev@kresin.me> Cc: John Crispin <john@phrozen.org> Cc: Hannu Nyman <hannu.nyman@iki.fi> Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* ip806x: nbg6817: sysupgrade support both targets for kernel/ rootfs partitionsStefan Lippers-Hollmann2017-10-291-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With this commit and the previous "nbg6817: don't hardcode the rootfs location by using append-rootblock instead" applied, it is possible to boot- and sysupgrade from both dual-boot sets (the primary mmcblk0p4+mmcblk0p5 or the alternative mmcblk0p7+mmcblk0p8). However the sysupgrade support does not toggle between both dual-boot sets between firmware upgrades so far. The partition map of the eMMC used in the nbg6817 is: Found valid GPT with protective MBR; using GPT. Disk /dev/mmcblk0: 7471104 sectors, 3.6 GiB Logical sector size: 512 bytes Disk identifier (GUID): XXX Partition table holds up to 12 entries First usable sector is 34, last usable sector is 7471070 Partitions will be aligned on 2-sector boundaries Total free space is 1 sectors (512 bytes) Number Start (sector) End (sector) Size Code Name 1 34 8225 4.0 MiB FFFF rootfs_data 2 8226 16417 4.0 MiB FFFF romd 3 16418 18465 1024.0 KiB FFFF header 4 18466 26657 4.0 MiB FFFF kernel 5 26658 157729 64.0 MiB FFFF rootfs 6 157730 159777 1024.0 KiB FFFF header_1 7 159778 167969 4.0 MiB FFFF kernel_1 8 167970 299041 64.0 MiB FFFF rootfs_1 9 299042 823329 256.0 MiB FFFF bu1 10 823330 7471069 3.2 GiB FFFF bu2 rootfs_data is the ext4 formatted overlay of the OEM firmware, LEDE ignores it due to its (too) small size. romd/ bu1 are initialized with zeroes (0x00) and unused. bu2 is formatted with ext4 and used for streamboost and other optional functionality by the OEM firmware, it is reformatted during factory resets of the OEM firmware. header/ header_1 contains version information for the corresponding vendor firmwares installed to kernel/rootfs or kernel_1/ rootfs_1, the format hasn't been completely reverse engineered so far and remains left untouched by LEDE: V1.00(ABCS.2)C0: 00000000 00 00 a7 74 01 32 f0 00 56 31 2e 30 30 28 41 42 |...t.2..V1.00(AB| 00000010 43 53 2e 32 29 43 30 00 ff ff ff ff ff ff ff ff |CS.2)C0.........| 00000020 ff ff ff ff ff ff ff ff 00 00 d5 dc 4e 42 47 36 |............NBG6| 00000030 38 31 37 00 ff ff ff ff ff ff ff ff ff ff ff ff |817.............| 00000040 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| * 00000060 ff ff ff ff ff ff ff ff ff ff ff ff 00 00 22 a3 |..............".| 00000070 00 1c 70 00 ff ff ff ff ff ff ff ff ff ff ff ff |..p.............| 00000080 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| * 00000800 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| * 00100000 V1.00(ABCS.5)C0: 00000000 00 00 bf 94 01 46 d8 00 56 31 2e 30 30 28 41 42 |.....F..V1.00(AB| 00000010 43 53 2e 35 29 43 30 00 ff ff ff ff ff ff ff ff |CS.5)C0.........| 00000020 ff ff ff ff ff ff ff ff 00 00 d6 5a 4e 42 47 36 |...........ZNBG6| 00000030 38 31 37 00 ff ff ff ff ff ff ff ff ff ff ff ff |817.............| 00000040 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| * 00000060 ff ff ff ff ff ff ff ff ff ff ff ff 00 00 c0 2c |...............,| 00000070 00 1c 58 00 ff ff ff ff ff ff ff ff ff ff ff ff |..X.............| 00000080 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| * 00010000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| * 00100000 Signed-off-by: Stefan Lippers-Hollmann <s.l-h@gmx.de>
* ipq806x: ipq4019: add ap-dk01.1-c1 board supportRoman Yeryomin2017-10-301-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | AP-DK01.1-C1 is QCA dev board with: - ipq4018 quad core ARM @716.8MHz, 2x2 dual (11n+11ac) radio - 256MB RAM - 32MB SPI flash - QCA8075 multiport ethernet phy (WAN port, 4x LAN ports) First installation via u-boot: sf probe sf erase 0x180000 0x1a00000 tftpboot 0x84000000 lede-ipq806x-AP-DK01.1-C1-squashfs-sysupgrade.bin sf write 0x84000000 0x180000 $filesize Further upgrades via sysupgrade. Changes: - add partitions - set memory size to 256MB - add reserved memory mapping - add correct compatible string - add image generation - extract pre-cal data from ART partition Compile and run tested. Wirespeed NAT can be achieved with spreading rx interrupts over different cores. Wifi speed is ~550Mbps @5GHz in open air. Note: AP-DK01.1-C1 is fully compatible with AP-DK01.2-C1, which has ipq4028 instead of ipq4018 on board. Changes since v2: - based on dts(i) rework/cleanup submitted: http://lists.infradead.org/pipermail/lede-dev/2017-October/009596.html - precise reserved memory mapping - more precise description - compatible string Signed-off-by: Roman Yeryomin <roman@advem.lv>
* treewide: use only board_name function to get nameMathias Kresin2017-07-151-1/+1
| | | | | | | | | | | | Do not parse /tmp/sysinfo/board_name, /proc/cpuinfo or the device tree compatible string directly. Always use the board_name function to get the board name. The admswconfig package still reads /proc/cpuinfo directly. The code looks somehow broken and the whole adm5120 which uses this package looks unmaintained. Leave it as it is for now. Signed-off-by: Mathias Kresin <dev@kresin.me>
* treewide: drop target board_name functionsMathias Kresin2017-07-151-9/+0
| | | | | | They are not used any longer. Signed-off-by: Mathias Kresin <dev@kresin.me>
* treewide: use the generic board_name functionMathias Kresin2017-07-151-8/+2
| | | | | | Use the generic function instead ot the target specific ones. Signed-off-by: Mathias Kresin <dev@kresin.me>
* treewide: populate boardname and model earlierMathias Kresin2017-07-151-0/+0
| | | | | | | | | | | | | For targets using the generic board detection and board specific settings in diag.sh, the board name is still unset at the time the set_state() provided by diag.sh is called by 10_indicate_preinit. Change the execution order to ensure the boardname is populated before required the first time. Do the target specific board detection as early as possible, directly followed by the generic one to allow a seamless switch to the generic function for populating /tmp/sysinfo/. Signed-off-by: Mathias Kresin <dev@kresin.me>
* base-files: automatically handle paths and symlinks for RAMFS_COPY_BINMatthias Schiffer2017-07-111-1/+1
| | | | | | | | | | | | Depending on busybox applet selection, paths of basic utiilties may differ, and may not work as symlinks to busybox. Simply using whatever binary is found in PATH and detecting symlinks automatically is more robust and easier to maintain. The list of binaries is also slightly cleaned up and duplicates are removed. Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
* ipq806x: upgrade: fix RAMFS_COPY_*Matthias Schiffer2017-07-112-21/+5
| | | | | | | | | RAMFS_COPY_* are moved to platform.sh toplevel. The unneeded linksys_preupgrade function is removed, and the nand_do_upgrade call is moved to platform_do_upgrade. Fixes: 30f61a34b4cf "base-files: always use staged sysupgrade" Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
* ipq806x: Enable ubi image for ipq40xx AP-DK04.1-C1 boardRam Chandra Jangir2017-06-071-0/+1
| | | | | | | | | | | | | | This change add IPQ40xx AP-DK04.1-C1 board image support, enables ubi image for IPQ40xx AP-DK04.1-C1 board and also add sysupgrage support for AP-DK04.1-C1 and generates a sysupgrade.tar image. Testing: *Tested on IPQ40xx AP-DK04.1-C1: a. NAND boot b. ubi sysupgrade Signed-off-by: Ram Chandra Jangir <rjangir@codeaurora.org>
* treewide: fix device tree path in scriptsMathias Kresin2017-05-261-1/+1
| | | | | | | | The device tree is at /proc/device-tree/ without a base subdir. Fixes: da472e5b30f6 ("treewide: access device tree from userspace via /proc/") Signed-off-by: Mathias Kresin <dev@kresin.me>
* treewide: access device tree from userspace via /proc/Mathias Kresin2017-05-261-1/+1
| | | | | | | Access the device tree via /proc/device-tree/ is the documented way to access the properties. Everything else might not work in future. Signed-off-by: Mathias Kresin <dev@kresin.me>
* ipq806x: add ipq4019 fritz4040 supportChristian Lamparter2017-03-222-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for AVM FRITZ!Box 4040. hardware highlights: SOC: IPQ4018 / QCA Dakota CPU: Quad-Core ARMv7 Processor rev 5 (v7l) Cortex-A7 DRAM: 256 MiB Nanya NT5CC128M16IP FLASH: 32 MiB MXIC MX25L25635FMI ETH: Qualcomm Atheros QCA8075 Gigabit Switch (4 x LAN, 1 x WAN) USB: 1 x 3.0 (via Synopsys DesignWare DWC3 controller in the SoC) 1 x 2.0 (via Synopsys DesignWare DWC3 controller in the SoC) WLAN1: Qualcomm Atheros QCA4018 2.4GHz 802.11bgn 2:2x2 WLAN2: Qualcomm Atheros QCA4018 5GHz 802.11a/n/ac 2:2x2 INPUT: one WLAN and one WPS button LEDS: Power, WAN/Internet, WIFI, INFO (red and amber) and LAN. Serial: WARNING: The serial port needs a TTL/RS-232 v3.3 level converter! The Serial setting is 115200-8-N-1. The SoC's serial port is right next to the MXIC FLASH chip. The board has a unpopulated 1x4 0.1" header for it. Use a multimeter to figure out the pinout! This board currently needs an additional u-boot image in order to boot properly. Booting with EVA isn't possible ATM. Install Procedure: 0. It's highly recommended to connect to the serial port. The serial settings are listed above. 1. install a u-boot image for AVM Fritz!Box 4040 (see <https://github.com/chunkeey/FritzBox-4040-UBOOT/releases> and <https://github.com/chunkeey/FritzBox-4040-UBOOT/blob/master/upload-to-f4040.sh>) 2. upload the initramfs.itb image via tftp (u-boot listens to 192.168.1.1 - use binary transfer mode!) 3. connect to the FB4040 and use sysupgrade sysupgrade.bin to install the image. Works: - Switch and Ethernet (99%) - Buttons (WLAN, WPS) - FLASH (1 x 32MiB NOR Chip) - WLAN2G and WLAN5G - CPUFREQ scaling - PRNG - serial - Crypto Accelerator - sysupgrade (Read the flash instructions to avoid bricking) - full LEDE Install (Read the flash instructions to avoid bricking) - LEDs (Power, WAN, Info (red and amber), LAN) The LEDs are connected to the QCA8075 LED ports. The AR40xx driver contains a gpio-controller to handle these special "GPIOs". - USB Both 3.0 and 2.0 ports - many packages from other ARMv7 boards (This does include the RaspberryPi Model 2!) - ... Not planned: - WAN<->LAN short-cut - Qualcomm Secure Execution Environment - ... Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John Crispin <john@phrozen.org>
* ipq806x: EA8500 fix sysupgrade over stock firmwareAdrian Panella2016-12-201-4/+26
| | | | | | | | | | When running sysupgrade for the first time over the second partition (that still had stock firmware) the rootfs wasn't flashed as there wasn't enough space. This happend because stock also uses UBI, but the volume name wasn't recognised and wasn't deleted before flashing. Signed-off-by: Adrian Panella <ianchi74@outlook.com>
* ipq806x: add support for TP-Link Archer VR2600vSebastian Quilitz2016-11-242-0/+8
| | | | | | | | | | | | | | | | | | This router is similar to the C2600. Ethernet on WAN + LAN, switch, sysupgrade, LEDs, buttons and WiFi on 2G + 5G do work. The xDSL modem and the POTS/DECT interface are not supported yet. It is not possible to flash LEDE via the TP-Link webinterface. The image need to be signed. The first 0x200 bytes of the image is the TP-Link header including the signature. The signature is not validated by the bootloader. The LEDE image is zeroed in this area. To install LEDE it is necessary to solder a four pin header to JP2. Connect a serial interface to this header and interrupt the autostart of kernel. Transfer the sysupgrade image via TFTP and write it to the serial flash at 0x320000. Signed-off-by: Sebastian Quilitz <zeraphim@x-pantion.de>
* ipq806x: remove device specific sysupgrade image checksFelix Fietkau2016-11-201-24/+1
| | | | | | Replaced by image metadata Signed-off-by: Felix Fietkau <nbd@nbd.name>
* ipq806x: append metadata to imagesFelix Fietkau2016-11-191-0/+1
| | | | Signed-off-by: Felix Fietkau <nbd@nbd.name>
* ipq806x/nbg6817: add sysupgrade supportAndré Valentin2016-10-262-0/+99
| | | | | | Add new way of flashing to mmc devices based on rootfs split with loop devices. Signed-off-by: André Valentin <avalentin@marcant.net>
* ipq806x/nbg6817: add support for ZyXEL NBG6817André Valentin2016-10-261-0/+3
| | | | | | | | | | | | | | | | | CPU: 2x1.8GHz ARM, RAM: 512MiB Storage: 4MiB serial Flash, 3.9GiB MMC NIC: 2x1GBit/s, Switch with 5 external and 2 internal ports WiFi: Dualband, ath10k 2.4GHz, 5GHz MU-MIMO For installation copy xx-mmcblk0p4-kernel.bin and xx-mmcblk0p5-rootfs-full.bin to device. Then run: cat xx-mmcblk0p4-kernel.bin > /dev/mmc0blk0p4 cat xx-mmcblk0p5-rootfs-full.bin > /dev/mmc0blk0p5 reboot -f For debugging serial console is easily visible on board, no soldering needed. Signed-off-by: André Valentin <avalentin@marcant.net>
* ipq806x: add support for indicating the boot and upgrade state using four ledsHenryk Heisig2016-10-152-0/+18
| | | | Signed-off-by: Henryk Heisig hyniu@o2.pl
* ipq806x: Build image for Netgear Nighthawk X4 R7500v2Alexis Green2016-08-222-0/+5
| | | | | | Signed-off-by: Alexis Green <alexis@cessp.it> [Jo-Philipp Wich: add missing DEVICE_TITLE, fix model name in commit title] Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* ipq806x: add initial support for Netgear R7800Pavel Kubelun2016-06-222-2/+7
| | | | Signed-off-by: Pavel Kubelun <be.dissent@gmail.com>
* ipq806x: base-files: add support for Linksys EA8500Adrian Panella2016-06-133-0/+98
| | | | Signed-off-by: Adrian Panella <ianchi74@outlook.com>
* ipq806x/base-files: Add support for Archer C2600Ash Benz2016-05-272-1/+22
| | | | Signed-off-by: Ash Benz <ash.benz@bk.ru>
* ipq806x: Add support for Netgear D7800John Crispin2016-01-192-0/+5
| | | | | | Signed-off-by: Tathagata Das <tathagata@alumnux.com> SVN-Revision: 48360
* ipq806x: fix sysupgrade for AP148Jonas Gorski2016-01-181-2/+2
| | | | | | | | | AP148 uses lowercase name as boardname, so we need to use this in platform.sh as well. Signed-off-by: Jonas Gorski <jogo@openwrt.org> SVN-Revision: 48304
* ipq806x: add platform_pre_upgrade for sysupgradeRafał Miłecki2015-09-151-0/+11
| | | | | | | | | | | | | | | | We're in process of cleaning nand_do_platform_check. Currently is leaves a special mark in /tmp/sysupgrade-nand-path triggering some diffent code path in nand_upgrade_stage1. This can be a bit confusing. The plan is to have the check function only check the image and nothing else. Then platform code (platform_pre_upgrade) should trigger NAND specific upgrade path. This is what this patch implements. This follows ar71xx, lantiq and partially bcm53xx. Signed-off-by: Rafał Miłecki <zajec5@gmail.com> SVN-Revision: 46945
* ipq806x: add support for Netgear Nighthawk X4 R7500Jonas Gorski2015-09-042-1/+5
| | | | | | | | | | | | | Add support for the Netgear Nighthawk X4 R7500 and build appropariate sysupgrade and factory images. Known issues: * 5 GHz wifi not working - there is no quantenna driver * One of the USB ports is not working Signed-off-by: Jonas Gorski <jogo@openwrt.org> SVN-Revision: 46796
* ipq806x: build images and add sysupgrade support for AP148Jonas Gorski2015-09-041-0/+18
| | | | | | | | | Add full ubi and sysupgrade images for AP148 and add sysupgrade support for ipq806x to allow updating the current installation. Signed-off-by: Jonas Gorski <jogo@openwrt.org> SVN-Revision: 46789
* ipq806x: add db149 support to OpenWrt init scriptsJohn Crispin2015-04-211-0/+3
| | | | | | | | | | DB149 is a IPQ8064 based platform. This patch adds the init scripts to detect it, configure the network accordingly, and generate a flashable image for it. Signed-off-by: Mathieu Olivari <mathieu@codeaurora.org> SVN-Revision: 45537
* ipq806x: Add support for IPQ806x chip familyJohn Crispin2014-08-302-0/+52
Patches are generated using the "format-patch" command from the following location: *https://www.codeaurora.org/cgit/quic/kernel/galak-msm/log/?h=apq_ipq_base *rev=0771849495b4128cac2faf7d49c85c729fc48b20 Patches numbered 76/77/102/103 have already been integrated in 3.14.12, so they're not in this list. All these patches are either integrated are pending integration into kernel.org, therefore these patches should go away once the kernel gets upgraded to 3.16. Support is currently limited to AP148 board but can be extended to other platforms in the future. These changes do not cover ethernet connectivity. Signed-off-by: Mathieu Olivari <mathieu@codeaurora.org> SVN-Revision: 42334