aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ipq806x/base-files/lib
Commit message (Collapse)AuthorAgeFilesLines
* treewide: use new procd sysupgrade $UPGRADE_BACKUP variableRafał Miłecki2019-09-051-1/+1
| | | | | | | | | | It's a variable set by procd that should replace hardcoded /tmp/sysupgrade.tgz. This change requires the most recent procd with the commit 0f3c136 ("sysupgrade: set UPGRADE_BACKUP env variable"). Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
* treewide: when copying a backup file always specify dest nameRafał Miłecki2019-09-051-1/+1
| | | | | | | $CONF_TAR shouldn't be assumed to always point to the sysupgrade.tgz. This change makes code more generic and allows refactoring $CONF_TAR. Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
* treewide: don't hardcode "sysupgrade.tgz" file nameRafał Miłecki2019-09-051-1/+1
| | | | | | | | 1) Add BACKUP_FILE and use it when copying an archive to be restored after sysupgrade (on the next preinit). 2) Use CONF_TAR for copying backup prepared by the /sbin/sysupgrade Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
* ipq806x: Replace backticks by $(...)Adrian Schmutzler2019-08-311-1/+1
| | | | | | This replaces deprecated backticks by more versatile $(...) syntax. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* treewide: sysupgrade: get rid of platform_nand_pre_upgrade()Rafał Miłecki2019-07-222-10/+6
| | | | | | | | | | | 1) nand_do_upgrade() is always called by a target code 2) nand_do_upgrade() starts with calling platform_nand_pre_upgrade() It means there is no need for the platform_nand_pre_upgrade() callback at all. All code that was present there could bo moved & simplly called by a target right before the nand_do_upgrade(). Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
* treewide: sysupgrade: don't use $ARGV in platform_do_upgrade()Rafał Miłecki2019-07-171-6/+6
| | | | | | | 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>
* mtd: base-files: Unify dual-firmware devices (Linksys)Jeff Kletsky2019-05-181-19/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Consistently handle boot-count reset and upgrade across ipq40xx, ipq806x, kirkwood, mvebu Dual-firmware devices often utilize a specific MTD partition to record the number of times the boot loader has initiated boot. Most of these devices are NAND, typically with a 2k erase size. When this code was ported to the ipq40xx platform, the device in hand used NOR for this partition, with a 16-byte "record" size. As the implementation of `mtd resetbc` is by-platform, the hard-coded nature of this change prevented proper operation of a NAND-based device. * Unified the "NOR" variant with the rest of the Linksys variants * Added logging to indicate success and failure * Provided a meaningful return value for scripting * "Protected" the use of `mtd resetbc` in start-up scripts so that failure does not end the boot sequence * Moved Linksys-specific actions into common `/etc/init.d/bootcount` For upgrade, these devices need to determine which partition to flash, as well as set certain U-Boot envirnment variables to change the next boot to the newly flashed version. * Moved upgrade-related environment changes out of bootcount * Combined multiple flashes of environment into single one * Current-partition detection now handles absence of `boot_part` Runtime-tested: Linksys EA8300 Signed-off-by: Jeff Kletsky <git-commits@allycomm.com> Signed-off-by: Christian Lamparter <chunkeey@gmail.com> [checkpatch.pl fixes, traded split strings for 80+ chars per line]
* ipq806x: add support for Buffalo WXR-2533DHPINAGAKI Hiroshi2019-01-012-0/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Buffalo WXR-2533DHP is a 2.4/5 GHz band 11ac router, based on Qualcomm IPQ8064. The U-Boot on WXR-2533DHP employs a complicated dual firmware protection scheme against corruptions of the kernel and rootfs images. See the notes in buffalo.sh for details. specifications: - Qualcomm IPQ8064 (384 - 1,400 MHz, 2C2T) - 512 MB of RAM (DDR3) - 256 MB of Flash (NAND) - 4T4R 2.4/5 GHz Wlan (QCA9980) - 5x 10/100/1000 Mbps Ethernet - 10x LEDs, 8x keys (6x buttons, 2x slide-switches) - 2x USB 3.0 Type-A - 12VDC/4A AC Adapter - UART through-hole on PCB - J3: Vcc, GND, TX, RX from USB port side - 115200n8 Boot instructions for the initramfs image: 1. Prepare the TFTP server with the initramfs image renamed to "wxr2300dhp-initramfs.uImage" and IP address "192.168.11.10". 2. Press the "AOSS" button while powering on the WXR-2533DHP. 3. Wait until the "Wireless" LED flashes before releasing the AOSS button. The WXR-2533DHP will grab the image from TFTP server and will boot it. Flashing instructions: To persistently write the firmware, flash an openwrt sysupgrade image from inside the initramfs, for example transfer via `scp <sysupgrade> root@192.168.1.1:/tmp` and flash on the device with `sysupgrade -n /tmp/<sysupgrade>`. Then wait ~120 seconds to let it finish the flashing process. Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com> Signed-off-by: Christian Lamparter <chunkeey@gmail.com> [reworded message]
* ipq806x: Add support for IPQ8064 AP161 boardRam Chandra Jangir2018-11-261-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Specification: - SoC: Qualcomm Atheros IPQ8064 ARM-v7 Dual Core SMP CPU - RAM: 512MB DDR3 System Memory - NOR Flash: 32MB SPI NOR - NAND Flash: 256MB NAND - Ethernet: 5 x 1G via QCA8337N - USB: 2 x USB 3.0 SuperSpeed - PCIe: 3x Mini PCIe 2.0 Slots Three PCIE2.0 connectors can connect two or three radio cards such as the CUS260 for 2.4 GHz WLAN and the CUS239 for 802.11ac WLAN How to flash via u-boot console: tftpboot 0x44000000 openwrt-ipq806x-qcom_ipq8064-ap161-squashfs-nand-factory.bin nand erase 0x1340000 0x4000000 nand write 0x44000000 0x1340000 $filesize setenv bootargs ‘console=ttyMSM0,115200 ubi.mtd=ubi root=/dev/ubiblock0_1’ saveenv bootm Further upgrades via sysupgrade. Tested on IPQ8064 AP161 Board: 1) NAND boot 2) Tested USB and PCIe interfaces 3) WDOG test 4) cpu frequency scaling 5) ethernet, 2G and 5G WiFi 6) ubi sysupgrade Signed-off-by: Ram Chandra Jangir <rjangir@codeaurora.org>
* treewide: consolidate upgrade state setMathias Kresin2018-08-161-6/+0
| | | | | | | | | | Set the (sys)upgrade state when sourcing the stage2 script instead of setting the state for each target individual. This change fixes the, due to a missing state set, not working upgrade led on ath79 and apm821xx. Signed-off-by: Mathias Kresin <dev@kresin.me>
* ipq806x: add support for NEC Aterm WG2600HPINAGAKI Hiroshi2018-06-191-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | NEC Aterm WG2600HP is a 2.4/5 GHz band 11ac router, based on Qualcomm IPQ8064. Specification: - IPQ8064 (384 - 1,400 MHz) - 512 MB of RAM - 32 MB of Flash (SPI) - 4T4R 2.4/5 GHz - 5x 10/100/1000 Mbps Ethernet - 12x LEDs, 4x keys - 1x USB 3.0 Type-A - UART header on PCB - RX, TX, NC, GND, Vcc from power connector side - baudrate: 115200 bps Flash instruction using initramfs image: 1. Connect serial cable to UART header 2. Connect power cable and turn on the router 3. When the "Press the [f] key and hit [enter] to enter failsafe mode" message is displayed on the console, press the "f" key and Enter key sequentially to enter the failsafe mode 4. create fw_env.config file with following contents on failsafe mode: /dev/mtd9 0x0 0x10000 0x10000 5. Execute following commands to add and change the environment variables of U-Boot fw_setenv ipaddr "192.168.0.1" fw_setenv serverip "192.168.0.2" fw_setenv autostart "yes" fw_setenv bootcmd "tftpboot 0x44000000 wg2600hp-initramfs.bin; bootipq" 6. Set the IP address of the computer to 192.168.0.2, connect to the LAN port of WG2600HP, and start the TFTP server on the computer 7. Rename OpenWrt initramfs image for WG2600HP to "wg2600hp-initramfs.bin" and place it in the TFTP directory 8. Remove power cable from WG2600HP, reconnect it and restart WG2600HP 9. WG2600HP downloads initramfs image from TFTP server on the computer, loads it and boot with initramfs image 10. On the initramfs image, execute "mtd erase firmware" to erase stock firmware and execute sysupgrade with the sysupgrade image 11. Wait ~180 seconds to complete flashing Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
* ipq806x: add support for Compex WPQ864Christian Mehlis2018-03-151-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Hardware highlights: - SoC: Qualcomm Atheros IPQ8064/5 ARM Dual Core CPU - RAM: (512MB or 1GB) DDR3 System Memory - Storage: 32MB NOR (Cypress S25FL256S1) 256MB NAND (Micron MT29F2G08ABBEAH4) - Ethernet: 5 x 1G via QCA8337N - USB: 1 x USB 2.0/3.0 + 1 x USB 2.0 on mini PCIe3 socket - PCIe: 3x mini PCIe (third mini PCIE3 is PCIe/USB shared) - SIM Card Slot: 2 x Slot - Buttons: Reset Button - LEDs: 18x, 8x GPIO controllable - Buzzer The correct amount of RAM will be passed by the bootloader. In contrast to the documentation provided by Compex, the third PCIe doesn't use GPIO16 for PERST. Instead, GPIO3 is shared and used as PERST for PCIe0 and PCIe2. So far, no one was able to get USB 3.0 working with the 1GB RAM version, while it works fine for my 512MB version. Since USB 3.0 doesn't work with the Compex firmware for the 1G variant either, it could be a hardware issue with these boards. OpenWrt will be installed to the NAND flash. Make sure to have a full working image on the NOR flash. It will be the backup in case anything goes wrong. It has been observed that an image loaded via tftpboot might have bitflips. Hence the extra step to create a crc32 checksum to allow to compare the checksum with the one from the source file prior to flashing. In all cases it is necessary to set the following u-boot parameter to an empty (whitespace) value, to ensure that the chosen bootargs of the dts isn't overwritten or set to bogus - not working - values: (IPQ) # set bootargs " " (IPQ) # set fsbootargs " " (IPQ) # saveenv The sysupgrade image can be installed directly on flash using u-boot (put jumper in JP13 (leave JP9 open) to boot from nand): (IPQ) # set serverip 192.168.1.20 (IPQ) # set ipaddr 192.168.1.1 (IPQ) # tftpboot 0x42000000 openwrt-ipq806x-compex_wpq864-squashfs-nand-factory.bin (IPQ) # crc32 0x42000000 $filesize (IPQ) # nand erase 0x1340000 0x4000000 (IPQ) # nand write 0x42000000 0x1340000 $filesize The initramfs image can be started using: (IPQ) # set fdt_high 0x48000000 (IPQ) # tftpboot 0x44000000 openwrt-ipq806x-compex_wpq864-initramfs-fit-uImage.itb (IPQ) # bootm 0x44000000 Signed-off-by: Christian Mehlis <christian@m3hlis.de> Signed-off-by: Mathias Kresin <dev@kresin.me>
* ipq806x: drop ipq40xx supportJohn Crispin2018-03-142-115/+0
| | | | Signed-off-by: John Crispin <john@phrozen.org>
* ipq806x: switch to full dual-boot for the nbg6817 sysupgrade supportStefan Lippers-Hollmann2018-02-131-3/+23
| | | | | | | | | | | | | | Instead of writing to the currently booted partition set, this implements full dual-boot support for sysupgrade by always writing to the other, currently inactive, partition set and toggling the dualflag after a successful flash. The currently active/ booted partition set is determined by parsing /proc/cmdline for its rootfs parameter (supplied by the DTS), instead of reading from the 0:DUAL_FLAG mtd, in order to prevent (potentially) bricking both partition sets. Signed-off-by: Stefan Lippers-Hollmann <s.l-h@gmx.de>
* ipq806x: request the first free loop device dynamically for the nbg6817 ↵Stefan Lippers-Hollmann2018-02-131-4/+5
| | | | | | | | | | | | sysupgrade Instead of hardcoding /dev/loop0, it's safer to query for the first free loop device and assign that dynamically. While /dev/loop0 is a reasonable assumption immediately following "losetup --detach-all", detaching the mounted overlay is no longer strictly necessary once dual-boot support has been added for the nbg6817. Signed-off-by: Stefan Lippers-Hollmann <s.l-h@gmx.de>
* ipq806x: use absolute the device path in $kernel for the nbg6817 sysupgradeStefan Lippers-Hollmann2018-02-131-4/+4
| | | | | | | Harmonize the variable usage for $kernel and $rootfs to always contain the full device path, instead of just its basename. Signed-off-by: Stefan Lippers-Hollmann <s.l-h@gmx.de>
* 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