aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ipq806x/base-files
Commit message (Collapse)AuthorAgeFilesLines
* ipq806x: Archer VR2600: fix switch ports numberingChristian Lamparter2022-07-231-3/+3
| | | | | | | | | The order of LAN ports shown in Luci is reversed compared to what is written on the case of the device. Fix the order so that they match. Fixes: #10275 Signed-off-by: Christian Lamparter <chunkeey@gmail.com> (cherry picked from commit 69ea671320c936e72f554348475eeebcab383b42)
* ipq806x: add support for Arris TR4400 v2 / RAC2V1ARodrigo Balerdi2022-05-172-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Hardware specs: SoC: Qualcomm IPQ8065 (dual core Cortex-A15) RAM: 512 MB DDR3 Flash: 256 MB NAND, 32 MB NOR WiFi: QCA9983 2.4 GHz, QCA9984 5 GHz Switch: QCA8337 Ethernet: 5x 10/100/1000 Mbit/s USB: 1x USB 3.0 Type-A Buttons: WPS, Reset Power: 12 VDC, 2.5 A Ethernet ports: 1x WAN: connected to eth2 4x LAN: connected via the switch to eth0 and eth1 (eth0 is disabled in OEM firmware) MAC addresses (OEM and OpenWrt): fw_env @ 0x00 d4:ab:82:??:??:?a LAN (eth1) fw_env @ 0x06 d4:ab:82:??:??:?b WAN (eth2) fw_env @ 0x0c d4:ab:82:??:??:?c WLAN 2.4 GHz (ath1) fw_env @ 0x12 d4:ab:82:??:??:?d WLAN 5 GHz (ath0) fw_env @ 0x18 d4:ab:82:??:??:?e OEM usage unknown (eth0 in OpenWrt) OID d4:ab:82 is registered to: ARRIS Group, Inc., 6450 Sequence Drive, San Diego CA 92121, US More info: https://openwrt.org/inbox/toh/arris/tr4400_v2 IMPORTANT: This port requires moving the 'fw_env' partition prior to first boot to consolidate 70% of the usable space in flash into a contiguous partition. 'fw_env' contains factory-programmed MAC addresses, SSIDs, and passwords. Its contents must be copied to 'rootfs_1' prior to booting via initramfs. Note that the stock 'fw_env' partition will be wiped during sysupgrade. A writable 'stock_fw_env' partition pointing to the old, stock location is included in the port to help rolling back this change if desired. Installation: - Requires serial access and a TFTP server. - Fully boot stock, press ENTER, type in: mtd erase /dev/mtd21 dd if=/dev/mtd22 bs=128K count=1 | mtd write - /dev/mtd21 umount /config && ubidetach -m 23 && mtd erase /dev/mtd23 - Reboot and interrupt U-Boot by pressing a key, type in: set mtdids 'nand0=nand0' set mtdparts 'mtdparts=nand0:155M@0x6500000(mtd_ubi)' set bootcmd 'ubi part mtd_ubi && ubi read 0x44000000 kernel && bootm' env save - Setup TFTP server serving initramfs image as 'recovery.bin', type in: set ipaddr 192.168.1.1 set serverip 192.168.1.2 tftpboot recovery.bin && bootm - Use sysupgrade to install squashfs image. This port is based on work done by AmadeusGhost <amadeus@jmu.edu.cn>. Signed-off-by: Rodrigo Balerdi <lanchon@gmail.com> [add 5.15 changes for 0069-arm-boot-add-dts-files.patch] Signed-off-by: Sungbo Eo <mans0n@gorani.run> (cherry picked from commit f8b0010dfb548469686049f85076fd6a3a6bca2e)
* ipq806x: base-files: asrock: fix bootcount includePetr Štetiar2022-02-281-1/+1
| | | | | | | | | | | | | | | Fixes following warning message during image building process: Finalizing root filesystem... root-ipq806x/lib/upgrade/asrock.sh: line 1: /lib/functions.sh: No such file or directory Enabling boot root-ipq806x/lib/upgrade/asrock.sh: line 1: /lib/functions.sh: No such file or directory Enabling bootcount Fixes #9350 Fixes: 98b86296e67d ("ipq806x: add support for ASRock G10") Signed-off-by: Petr Štetiar <ynezz@true.cz>
* ipq806x: Increase kernel size to 4 MB for EA8500/EA7500v1Hannu Nyman2022-02-261-0/+11
| | | | | | | | | | | | | | | | | | | Increase the kernel size from 3 MB to 4 MB for EA8500 and EA7500v1. * modify the common .dtsi * modify the kernel size in the image recipes Define compat-version 2.0 to force factory image usage for sysupgrade. Add explanation message. Reenable both devices. As for 4MiB (and not more): Hannu Nyman noted that: "We have lots of ipq806x devices with 4 MB kernel, so will need action at that point in future in any case. (Assuming that the bootloader did not have a 4 MB limit that has been tested...)" Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi> (squashed, added 4MiB notice of support in ipq806x) Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* target/linux: replace egrep with grep -ERosen Penev2022-02-071-1/+1
| | | | | | | egrep is deprecated and replaced by grep -E. The latter is used throughout the tree. Signed-off-by: Rosen Penev <rosenp@gmail.com>
* ipq806x: convert TP-Link Archer VR2600v to denx,uimageChristian Lamparter2022-02-061-1/+0
| | | | | | | | | | | | | | | | | | | | | The recent device-tree modification that added pre-cal nvmem-cells pushed the device's kernel+dtb over the allotted 3072k KERNEL_SIZE. > WARNING: Image file tplink_vr2600v-uImage is too big: 3147214 > 3145728 There was a previous kernel partition size upgrade: commit 0c967d92b3d9 ("ipq806x: increase kernel partition size for the TP-Link Archer VR2600v") It has been seemingly upgraded from a 2048k KERNEL_SIZE in the past. The commit talks about using the MTD_SPLIT_TPLINK_FW. But looking at the image make recipe, there is no code that adds a TPLINK header. So instead the board will use "denx,umimage". This requires MTD_SPLIT_UIMAGE_FW, but this is present thanks to some NEC devices. (Maybe the MTD_CONFIG_ARGS can be removed as well? But it could be there because of the padding at the beginning. This needs testing.) Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* ipq806x: utilize nvmem-cells for pre-calibration dataChristian Lamparter2022-02-051-32/+0
| | | | | | | | | | | | | converts extraction entries from 11-ath10k-caldata into nvmem-cells in the individual board's device-tree file. The patch also moves previously existing referenced nvmem-cells data nodes which were placed at the end back into the partitions node. As well as removing some duplicated properties from qcom-ipq8065-xr500.dts's art (the included nighthawk.dtsi defines those already). Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* ipq806x: sysupgrade: drop unnecessary UBI to UBI logicBjørn Mork2021-12-031-17/+1
| | | | | | | | | | | | | The purpose of this code seems to be to avoid issues caused by partially overwriting an existing UBI partition, where some of the erase counters would be reset but not the unmodified ones. This problem has been solved in a more generic way by the UBI EOF marker. This ensures that any old PEBs after the marker are properly initialized. It is therefore unnecessary to erase the whole partition before flashing a new OpenWrt factory image. Signed-off-by: Bjørn Mork <bjorn@mork.no>
* ipq806x: add support for Cisco Meraki MR42/MR52Matthew Hagan2021-11-284-0/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The MR42 and MR52 are two similar IPQ806x based devices from the Cisco Meraki "Cryptid" series. MR42 main features: - IPQ8068 1.4GHz - 512MB RAM - 128MB NAND - 2x QCA9992 (2.4 & 5GHz) - 1x QCA9889 (2.4 & 5GHz) - 1x AR8033 PHY - PoE/AC power MR52 main features: - IPQ8068 1.4GHz - 512MB RAM - 128MB NAND - 2x QCA9994 (2.4 & 5GHz) - 1x QCA9889 (2.4 & 5GHz) - 2x AR8033 PHYs - PoE/AC power (MR42 Only) Installation via diagnostic mode: If you can successfully complete step 1 then you can continue to install via this method without having to open the device. Otherwise please use the standard UART method. Please note that when booting via TFTP, some Ethernet devices, in particular those on laptops, will not connect in time, resulting in TFTP boot not succeeding. In this instance it is advised to connect via a switch. 1. Hold down reset at power on and keep holding, after around 10 seconds if the orange LED changes behaviour to begin flashing, proceed to release reset, then press reset two times. Ensure that the LED has turned blue. Note that flashing will occur on some devices, but it will not be possible to change the LED colour using the reset button. In this case it will still be possible to continue with this install method. 2. Set your IP to 192.168.1.250. Set up a TFTP server serving mr42_u-boot.mbn and openwrt-ipq806x-generic-meraki_mr42-initramfs-fit-uImage.itb, obtained from [1]. 3. Use telnet and connect to 192.168.1.1. Run the following commands to install u-boot. Note that all these commands are critical, an error will likely render the device unusable. Option 3.1: If you are sure you have set up the TFTP server correctly you can run this script on the device. This will download and flash the u-boot image immediately: `/etc/update_uboot.sh 192.168.1.250 mr42_u-boot.mbn` Once completed successfully, power off the device. Option 3.2: If you are unsure the TFTP server is correctly set up you can obtain the image and flash manually: 3.2.1. `cd /tmp` 3.2.2. `tftp-hpa 192.168.1.250 -m binary -c get mr42_u-boot.mbn` 3.2.3. Confirm file has downloaded correctly by comparing the md5sum: `md5sum mr42_u-boot.mbn` 3.2.4. The following are the required commands to write the image. `echo 1 > /sys/devices/platform/msm_nand/boot_layout mtd erase /dev/mtd1 nandwrite -pam /dev/mtd1 mr42_u-boot.mbn echo 0 > /sys/devices/platform/msm_nand/boot_layout` Important: You must observe the output of the `nandwrite` command. Look for the following to verify writing is occurring: `Writing data to block 0 at offset 0x0 Writing data to block 1 at offset 0x20000 Writing data to block 2 at offset 0x40000` If you do not see this then do not power off the device. Check your previous commands and that mr42_u-boot.mbn was downloaded correctly. Once you are sure the image has been written you can proceed to power off the device. 4. Hold the reset button and power on the device. This will immediately begin downloading the appropriate initramfs image and boot into it. Note: If the device does not download the initramfs, this is likely due to the interface not being brought up in time. Changing Ethernet source to a router or switch will likely resolve this. You can also try manually setting the link speed to 10Mb/s Half-Duplex. 5. Once a solid white LED is displayed on the device, continue to the UART installation method, step 6. Standard installation via UART - MR42 & MR52 1. Disassemble the device and connect a UART header. The header pinout is as follows: 1 - 3.3v 2 - TXD 3 - RXD 4 - GND Important: You should only connect TXD, RXD and GND. Connecting 3.3v may damage the device. 2. Set your IP to 192.168.1.250. Set up a TFTP server serving openwrt-ipq806x-generic-meraki_(mr42|mr52)-initramfs-fit-uImage.itb. Separately obtain the respective sysupgrade image. 3. Run the following commands, preferably from a Linux host. The mentioned files, including ubootwrite.py and u-boot images, can be obtained from [1]. `python ubootwrite.py --write=(mr42|mr52)_u-boot.bin` The default for "--serial" option is /dev/ttyUSB0. 4. Power on the device. The ubootwrite script will upload the image to the device and launch it. The second stage u-boot will in turn load the initramfs image by TFTP, provided the TFTP server is running correctly. This process will take about 13 minutes. Once a solid white LED is displayed, the image has successfully finished loading. Note: If the image does not load via TFTP, try again with the Ethernet link to 10Mb/s Half-Duplex. 5. (MR42 only) Do not connect over the network. Instead connect over the UART using minicom or similar tool. To replace u-boot with the network enabled version, please run the following commands. Note that in the provided initramfs images, the u-boot.mbn file is located in /root: If you have not used the provided initramfs, you must ensure you are using an image with "boot_layout" ECC configuration enabled in the Kernel. This will be version 5.10 or higher. If you do not do this correctly the device will be bricked. `insmod mtd-rw i_want_a_brick=1 mtd erase /dev/mtd8 nandwrite -pam /dev/mtd8 /root/mr42_u-boot.mbn` After running nandwrite, ensure you observe the following output: `Writing data to block 0 at offset 0x0 Writing data to block 1 at offset 0x20000 Writing data to block 2 at offset 0x40000` 6. (Optional) If you have no further use for the Meraki OS, you can remove all other UBI volumes on ubi0 (mtd11), including diagnostic1, part.old, storage and part.safe. You must not remove the ubi1 ART partition (mtd12). `for i in diagnostic1 part.old storage part.safe ; do ubirmvol /dev/ubi0 -N $i done` 7. Proceed to flash the sysupgrade image via luci, or else download or scp the image to /tmp and use the sysupgrade command. [1] The mentioned images and ubootwrite.py script can be found in this repo: https://github.com/clayface/openwrt-cryptid [2] The modified u-boot sources for the MR42 and MR52 are available: https://github.com/clayface/U-boot-MR52-20200629 Signed-off-by: Matthew Hagan <mnhagan88@gmail.com>
* ipq806x: ecw5410: use bootloader provided MAC-sRobert Marko2021-10-311-2/+0
| | | | | | | | | | | Currently, we are overriding the bootloader provided MAC-s as the ethernet aliases are reversed so MAC-s were fixed up in userspace. There is no need to do that as we can just fix the aliases instead and get rid of MAC setting via userspace helper. Fixes: 59f0a0f ("ipq806x: add Edgecore ECW5410 support") Signed-off-by: Robert Marko <robert.marko@sartura.hr>
* ipq806x: ecw5410: fix PCI1 radio caldataRobert Marko2021-10-311-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | ECW5410 has 2 QCA9984 cards, one per PCI controller. They are located at PCI adresses 0001:01:00.0 and 0002:01:00.0. Currently, pre-cal is not provided for 0001:01:00.0 at all,but for 0000:01:00.0 which is incorrect and causes the ath10k driver to not be able to fetch the BMI ID and use that to fetch the proper BDF but rather fail with: [ 12.029708] ath10k 5.10 driver, optimized for CT firmware, probing pci device: 0x46. [ 12.031816] ath10k_pci 0001:01:00.0: enabling device (0140 -> 0142) [ 12.037660] ath10k_pci 0001:01:00.0: pci irq msi oper_irq_mode 2 irq_mode 0 reset_mode 0 [ 13.173898] ath10k_pci 0001:01:00.0: qca9984/qca9994 hw1.0 target 0x01000000 chip_id 0x00000000 sub 168c:cafe [ 13.174015] ath10k_pci 0001:01:00.0: kconfig debug 0 debugfs 1 tracing 0 dfs 1 testmode 0 [ 13.189304] ath10k_pci 0001:01:00.0: firmware ver 10.4b-ct-9984-fW-13-5ae337bb1 api 5 features mfp,peer-flow-ctrl,txstatus-noack,wmi-10.x-CT,ratemask-CT,regdump-CT,txrate-CT,flush-all-CT,pingpong-CT,ch-regs-CT,nop-CT,set-special-CT,tx-rc-CT,cust-stats-CT,txrate2-CT,beacon-cb-CT,wmi-block-ack-CT,wmi-bcn-rc-CT crc35 [ 15.492322] ath10k_pci 0001:01:00.0: failed to fetch board data for bus=pci,vendor=168c,device=0046,subsystem-vendor=168c,subsystem-device=cafe,variant=Edgecore-ECW541 from ath10k/QCA9984/hw1.0/board-2.bin [ 15.543883] ath10k_pci 0001:01:00.0: failed to fetch board-2.bin or board.bin from ath10k/QCA9984/hw1.0 [ 15.543920] ath10k_pci 0001:01:00.0: failed to fetch board file: -12 [ 15.552281] ath10k_pci 0001:01:00.0: could not probe fw (-12) So, provide the pre-cal for the actual PCI card and not the non-existent one. Fixes: 59f0a0f ("ipq806x: add Edgecore ECW5410 support") Signed-off-by: Robert Marko <robert.marko@sartura.hr>
* ipq806x: consolidate 11-ath10k-caldataAdrian Schmutzler2021-10-301-26/+12
| | | | | | | After the ath10k_patch_mac lines have been removed, a lot of blocks can be consolidated. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ipq806x: remove transition workarounds for qcom-smem partitionsAdrian Schmutzler2021-10-304-56/+10
| | | | | | | | | | | | | | | | | | The out-of-tree qcom-smem patches traditionally displayed mtd partition names in upper case, starting with the new mainline qcom-smem support in kernel v5.10, it switched to normalizing the partition names to lower case. While both 5.4 and 5.10 were supported in the target, we carried a workaround to support both of them. Since the target has dropped 5.4 recently, those can be removed now. Ref: 2db9dded0a1a ("ipq806x: nbg6817: case-insensitive qcom-smem partitions") 435dc2e77e3b ("ipq806x: ecw5410: case-insensitive qcom-smem partitions") f70e11cd974e ("ipq806x: g10: case-insensitive qcom-smem partitions") Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ipq806x: provide WiFI mac-addresses from dtsAnsuel Smith2021-10-301-12/+0
| | | | | | | | | | Use nvmem framework for supported mac-address stored in nvmem cells and drop mac patch function for hotplug script for supported devices. Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com> [rebase, move to correct node for d7800, include xr500] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ipq806x: add support for Netgear Nighthawk Pro Gaming XR500Peter Geis2021-10-264-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds support for the Netgear Nighthawk Pro Gaming XR500. It is the successor to the Netgear Nighthawk R7800 and shares almost identical hardware to that device. The stock firmware is a heavily modified version of OpenWRT. Specifications: SoC: Qualcomm Atheros IPQ8065 RAM: 512 MB Storage: 256 MiB NAND Flash Wireless: 2x Qualcomm Atheros QCA9984 Ethernet: 2x 1000/100/10 dedicated interfaces Switch: 5x 1000/100/10 external ports USB: 2x 3.0 ports More information: Manufacturer page: https://www.netgear.com/gaming/xr500/ Almost identical to Netgear R7800 Differences (r7800 > xr500): Flash: 128MiB > 256MiB Removed esata swapped leds: usb1 (gpio 7 > 8) usb2 (gpio 8 > 26) guest/esata (gpio 26 > 7) MAC addresses: On the OEM firmware, the mac addresses are: WAN: *:50 art 0x6 LAN: *:4f art 0x0 (label) 2G: *:4f art 0x0 5G: *:51 art 0xc Installation: Install via Web Interface (preferred): Utilize openwrt-ipq806x-netgear_xr500-squashfs-factory.img Install via TFTP recovery: 1.Turn off the power, push and hold the reset button (in a hole on backside) with a pin 2.Turn on the power and wait till power led starts flashing white (after it first flashes orange for a while) 3.Release the reset button and tftp the factory img in binary mode. The power led will stop flashing if you succeeded in transferring the image, and the router reboots rather quickly with the new firmware. 4.Try to ping the router (ping 192.168.1.1). If does not respond, then tftp will not work either. Uploading the firmware image with a TFTP client $ tftp 192.168.1.1 bin put openwrt-ipq806x-netgear_xr500-squashfs-factory.img Note: The end of the last partition is at 0xee00000. This was chosen by the initial author, but nobody was able to tell why this particular arbitrary size was chosen. Since it's not leaving too much empty space and it's the only issue left, let's just keep it for now. Based on work by Adam Hnat <adamhnat@gmail.com> ref: https://github.com/openwrt/openwrt/pull/3215 Signed-off-by: Peter Geis <pgwipeout@gmail.com> [squash commits, move common LEDs to DTSI, remove SPDX on old files, minor whitespace cleanup, commit message facelift, add MAC address overview, add Notes, fix MAC addresses, use generic name for partition nodes in DTS] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ipq806x: Askey RT4230W REV6: fix caldata scriptChukun Pan2021-08-241-2/+6
| | | | | | | | | | The partition name in the device dts is '0:ART'. Be independent to prevent this part from becoming incorrect once the kernel v5.4 gone. Fixes: da8428d277cd ("ipq806x: add support for Askey RT4230W REV6") Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
* ipq806x: fix LAN and WAN port assignments on TP-Link AD7200Alex Henrie2021-06-061-1/+4
| | | | | | | | LAN port 4 was swapped with the WAN port and the remaining three LAN ports were numbered in reverse order from their labels on the case. Fixes: 1a775a4fd033 ("ipq806x: add support for TP-Link Talon AD7200") Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
* treewide: remove "+" sign for increment with macaddr_addAdrian Schmutzler2021-06-051-6/+6
| | | | | | | | | | | | Many people appear to use an unneeded "+" prefix for the increment when calculating a MAC address with macaddr_add. Since this is not required and used inconsistently [*], just remove it. [*] As a funny side-fact, copy-pasting has led to almost all hotplug.d files using the "+", while nearly all of the 02_network files are not using it. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ipq806x: add support for Askey RT4230W REV6Lauro Moreno2021-06-053-9/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds support for the Askey RT4230W REV6 (Branded by Spectrum/Charter as RAC2V1K) At this time, there's no way to reinstall the stock firmware so don't install this on a router that's being rented. Specifications: Qualcomm IPQ8065 1 GB of RAM (DDR3) 512 MB Flash (NAND) 2x Wave 2 WiFi cards (QCA9984) 5x 10/100/1000 Mbps Ethernet (Switch: QCA8337) 1x LED (Controlled by a microcontroller that switches it between red and blue with different patterns) 1x USB 3.0 Type-A 12V DC Power Input UART header on PCB - pinout from top to bottom is RX, TX, GND, 5V Port settings are 115200n8 More information: https://forum.openwrt.org/t/askey-rac2v1k-support/15830 https://deviwiki.com/wiki/Askey_RAC2V1K To check what revision your router is, restore one of these config backups through the stock firmware to get ssh access then run "cat /proc/device-tree/model". https://forum.openwrt.org/t/askey-rac2v1k-support/15830/17 The revision number on the board doesn't seem to be very consistent so that's why this is needed. You can also run printenv in the uboot console and if machid is set to 177d, that means your router is rev6. Note: Don't install this if the router is being rented from an ISP. The defined partition layout is different from the OEM one and even if you changed the layout to match, backing up and restoring the OEM firmware breaks /overlay so nothing will save and the router will likely enter a bootloop. How to install: Method 1: Install without opening the case using SSH and tftp You'll need: RAC2V1K-SSH.zip: https://github.com/lmore377/openwrt-rt4230w/blob/master/RAC2V1K-SSH.zip initramfs and sysupgrade images Connect to one of the router's LAN ports Download the RAC2V1K-SSH.zip file and restore the config file that corresponds to your router's firmware (If you're firmware is newer than what's in the zip file, just restore the 1.1.16 file) After a reboot, you should be able to ssh into the router with username: "4230w" and password: "linuxbox" or "admin". Run the following commannds fw_setenv ipaddr 10.42.0.10 #IP of router, can be anything as long as it's in the same subnet as the server fw_setenv serverip 10.42.0.1# #IP of tftp server that's set up in next steps fw_setenv bootdelay 8 fw_setenv bootcmd "tftpboot initramfs.bin; bootm; bootipq" Don't reboot the router yet. Install and set up a tftp server on your computer Set a static ip on the ethernet interface of your computer (use this for serverip in the above commands) Rename the initramfs image to initramfs.bin, and host it with the tftp server Reboot the router. If you set up everything right, the router led should switch over to a slow blue glow which means openwrt is booted. If for some reason the file doesn't get loaded into ram properly, it should still boot to the OEM firmware. After openwrt boots, ssh into it and run these commands: fw_setenv bootcmd "setenv mtdids nand0=nand0 && setenv mtdparts mtdparts=nand0:0x1A000000@0x2400000(firmware) && ubi part firmware && ubi read 0x44000000 kernel 0x6e0000 && bootm" fw_setenv bootdelay 2 After openwrt boots up, figure out a way to get the sysupgrade file onto it (scp, custom build with usb kernel module included, wget, etc.) then flash it with sysupgrade. After it finishes flashing, it should reboot, the light should start flashing blue, then when the light starts "breathing" blue that means openwrt is booted. Method 2: Install with serial access (Do this if something fails and you can't boot after using method 1) You'll need: initramfs and sysupgrade images Serial access: https://openwrt.org/inbox/toh/askey/askey_rt4230w_rev6#opening_the_case Install and set up a tftp server Set a static ip on the ethernet interface of your computer Download the initramfs image, rename it to initramfs.bin, and host it with the tftp server Connect the wan port of the router to your computer Interrupt U-Boot and run these commands: setenv serverip 10.42.0.1 (You can use whatever ip you set for the computer) setenv ipaddr 10.42.0.10 (Can be any ip as long as it's in the same subnet) setenv bootcmd "setenv mtdids nand0=nand0 && set mtdparts mtdparts=nand0:0x1A000000@0x2400000(firmware) && ubi part firmware && ubi read 0x44000000 kernel 0x6e0000 && bootm" saveenv tftpboot initramfs.bin bootm After openwrt boots up, figure out a way to get the sysupgrade file onto it (scp, custom build with usb kernel module included, wget, etc.) then flash it with sysupgrade. After it finishes flashing, it should reboot, the light should start flashing blue, then when the light starts "breathing" blue that means openwrt is booted. Signed-off-by: Lauro Moreno <lmore377@gmail.com> [add entry in 5.10 patch, fix whitespace issues] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ipq806x: base-files: asrock: fix bootcount includePetr Štetiar2021-05-131-5/+2
| | | | | | | | | | | | | | | | | | | | | Fixes following error while executing the init script on the buildhost: Enabling boot ./etc/init.d/bootcount: line 5: /lib/upgrade/asrock.sh: No such file or directory Enabling bootcount While at it fix following shellcheck issue: base-files/etc/init.d/bootcount line 11: if [ $? -eq 0 ]; then ^-- SC2181: Check exit code directly with e.g. 'if mycmd;', not indirectly with $?. Cc: Ansuel Smith <ansuelsmth@gmail.com> Cc: Pawel Dembicki <paweldembicki@gmail.com> Cc: Christian Lamparter <chunkeey@gmail.com> Fixes: 98b86296e67d ("ipq806x: add support for ASRock G10") References: https://gitlab.com/ynezz/openwrt/-/jobs/1243290743#L1444 Signed-off-by: Petr Štetiar <ynezz@true.cz>
* ipq806x: ecw5410: case-insensitive qcom-smem partitionsStefan Lippers-Hollmann2021-05-082-4/+20
| | | | | | | | The out-of-tree qcom-smem patches traditionally displayed mtd partition names in upper case, starting with the new mainline qcom-smem support in kernel v5.10, it switches to normalizing the partition names to lower case. Signed-off-by: Stefan Lippers-Hollmann <s.l-h@gmx.de>
* ipq806x: g10: case-insensitive qcom-smem partitionsStefan Lippers-Hollmann2021-05-082-3/+15
| | | | | | | | The out-of-tree qcom-smem patches traditionally displayed mtd partition names in upper case, starting with the new mainline qcom-smem support in kernel v5.10, it switches to normalizing the partition names to lower case. Signed-off-by: Stefan Lippers-Hollmann <s.l-h@gmx.de>
* ipq806x: nbg6817: case-insensitive qcom-smem partitionsStefan Lippers-Hollmann2021-05-083-6/+24
| | | | | | | | The out-of-tree qcom-smem patches traditionally displayed mtd partition names in upper case, starting with the new mainline qcom-smem support in kernel v5.10, it switches to normalizing the partition names to lower case. Signed-off-by: Stefan Lippers-Hollmann <s.l-h@gmx.de>
* ipq806x: improve system latencyAnsuel Smith2021-05-071-0/+17
| | | | | | | | | | | | | | Various report and data show that the freq 384000 is too low and cause some extra latency to the entire system. OEM qsdk code also set the min frequency for this target to 800 mhz. Also some user notice some instability with this idle frequency, solved by setting the min frequency to 600mhz. Fix all these kind of problem by introducing a boot init.d script that set the min frequency to 600mhz and set the ondemand governor to be more aggressive. The script set these value only if the ondemand governor is detected. 384 mhz freq is still available and user can decide to restore the old behavior by disabling this script. Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
* ipq806x: ubnt,unifi-ac-hd: reorder eth0 and eth1Mark Mentovai2021-05-071-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | The Ubiquiti UniFi AC HD (UAP-AC-HD, UAP301) has two Ethernet ports, labeled MAIN and SECONDARY, connected to gmac2 and gmac1, respectively. The standard probe order results in gmac1/SECONDARY being eth0 and gmac2/MAIN being eth1. This does not match the stock firmware, is contrary to user expectation, causes the wrong (high) MAC address to be used in a bridged configuration (the default for this device), and makes the gmac2/MAIN port unusable in the preinit environment (such as for failsafe). Until a recent patch, gmac1/SECONDARY (eth0) was not even usable. This reorders the ports so that gmac2/MAIN is eth0, and the now-working gmac1/SECONDARY is eth1. eth0 has the low MAC address and eth1 has the high; when bridged, the bridge takes on the correct low MAC address. This matches the stock firmware. The MAIN port is usable for failsafe during preinit. This device does not have a switch on board, so there's no possibility to remap ports via switch configuration. "ip link set $interface name" is used instead, during preinit before networking is configured. Signed-off-by: Mark Mentovai <mark@moxienet.com> Build-tested: ipq806x/ubnt,unifi-ac-hd Run-tested: ipq806x/ubnt,unifi-ac-hd
* treewide: remove execute bit and shebang from board.d filesAdrian Schmutzler2021-03-062-2/+0
| | | | | | | | | | | | | | | | So far, board.d files were having execute bit set and contained a shebang. However, they are just sourced in board_detect, with an apparantly unnecessary check for execute permission beforehand. Replace this check by one for existance and make the board.d files "normal" files, as would be expected in /etc anyway. Note: This removes an apparantly unused '#!/bin/sh /etc/rc.common' in target/linux/bcm47xx/base-files/etc/board.d/01_network Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ipq806x: add support for Ubiquiti UniFi AC HDJan Alexander2021-01-142-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Hardware -------- SoC: Qualcomm IPQ8064 RAM: 512MB DDR3 Flash: 256MB NAND (Micron MT29F2G08ABBEAH4) 32MB SPI-NOR (Macronix MX25U25635F) WLAN: Qualcomm Atheros QCA9994 4T4R b/g/n Qualcomm Atheros QCA9994 4T4R a/n/ac ETH: eth0 - SECONDARY (Atheros AR8033) eth1 - MAIN (Atheros AR8033) USB: USB-C LED: Dome (white / blue) BTN: Reset Installation ------------ Copy the OpenWrt sysupgrade image to the /tmp directory of the device using scp. Default IP address is 192.168.1.20 and default username and password are "ubnt". SSH to the device and write the bootselect flag to ensure it is booting from the mtd partition the OpenWrt image will be written to. Verify the output device below matches mtd partition "bootselect" using /proc/mtd. > dd if=/dev/zero bs=1 count=1 seek=7 conv=notrunc of=/dev/mtd11 Write the OpenWrt sysupgrade image to the mtd partition labeled "kernel0". Also verify the used partition device using /proc/mtd. > dd if=/tmp/sysupgrade.bin of=/dev/mtdblock12 Reboot the device. Back to stock ------------- Use the TFTP recovery procedure with the Ubiquiti firmware image to restore the vendor firmware. Signed-off-by: Jan Alexander <jan@nalx.net>
* ipq806x: fix LED names of TP-Link Talon AD2700Daniel Golle2021-01-051-2/+2
| | | | | | | | While the underscore in the name of the USB LEDs was removed from DTS, /etc/board.d/01_leds also has to reflect that change. Fixes: 28fd279e5d ("ipq806x: some corrections for TP-Link Talon AD7200") Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* ipq806x: add support for TP-Link Talon AD7200Gary Cooper2021-01-054-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Device hardware: https://deviwiki.com/wiki/TP-LINK_AD7200_(Talon) The Talon AD7200 is basically an Archer C2600 with a third PCIe lane and an 802.11ad radio. It looks like the Archers C2600/5400 but the housing is slightly larger. Specifications -------------- - IPQ8064 dual-core 1400MHz - QCA9988 2.4GHz WiFi - QCA9990 5GHz WiFi - QCA9500 60GHz WiFi - 32MB SPI Flash - 512MiB RAM - 5 GBit Ports (QCA8337) Installation ------------ Installation is possible from the OEM web interface. Sysupgrade is possible. TFTP recovery is possible. - Image: AD7200_1.0_tp_recovery.bin Notes - This will be the first 802.11ad device supported by mainline. Signed-off-by: Gary Cooper <gaco@bitmessage.de>
* ipq806x: add support for NEC Platforms Aterm WG2600HP3Yanase Yuki2020-12-253-2/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | NEC Platforms Aterm WG2600HP3 is a dual-band router based on Qualcomm IPQ8062. Specification ------------- - SoC: Qualcomm IPQ8062 - RAM: 512MiB - Flash memory: SPI-NOR 32MiB (Cypress S25FL256S) - Wi-Fi: Qualcomm QCA9984 (2.4GHz, 1ch - 13ch) - Wi-Fi: Qualcomm QCA9984 (5GHz, 36ch - 64ch, 100ch - 140ch) - Ethernet: 4x 100/1000 Mbps (1x WAN, 4x LAN) - LED: 6x green LED, 6x red LED - Input: 2x tactile switch, 1x SP3T slide switch - Serial console: 115200bps, through-hole J3 - [ ] [GND] [ ] [TX] [RX] ----> DC jack - Power: DC 12V 1.5A This device does not support VHT160 and VHT80+80. Custom BDFs are required to limit VHT capabilities. Flash instructions ------------------ 1. Setup TFTP server (IP address: 192.168.1.2) 2. Put initramfs image into TFTP server directory 3. Connect WG2600HP3 lan port and computer that runs TFTP server 4. Connect to the serial console 5. Interrupt booting by Esc key (password: chiron) 6. Execute the following commands # setenv bootcmd "nboot 0x44000000 1 0x860000" # saveenv # setenv ipaddr 192.168.1.1 # setenv serverip 192.168.1.2 # tftpboot 0x44000000 openwrt-ipq806x-generic-nec_wg2600hp3-initramfs-uImage 7. After booting OpenWrt initramfs image, backup SPI-NOR flash memory 8. Erase firmware partition # mtd erase firmware 9. Run sysupgrade Signed-off-by: Yanase Yuki <dev@zpc.sakura.ne.jp>
* ipq806x: remove unneeded empty linesAdrian Schmutzler2020-12-222-2/+0
| | | | | | This removes two unneeded empty lines in base-files. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ipq806x: add support for ASRock G10Christian Lamparter2020-12-227-4/+108
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The ASRock G10 is a 2.4/5 GHz band 11ac "Gaming" router, based on Qualcomm IPQ8064. Specifications: SoC: Qualcomm IPQ8064 CPU: Dual-Core A15 @ (384 - 1,400 MHz, 2C2T) DRAM: 512 MiB (~467 MiB available) NAND: 128 MB (Micron MT29F1G08ABBEAH4) WLAN0: 4T4R 5 GHz Wlan (QCA9980) WLAN1: 4T4R 2.4 GHz Wlan (QCA9980) ETH: 5x 10/100/1000 Mbps Ethernet (QCA8337) INPUT: Reset Button, WPS 2.4G and WPS 5G Button LEDS: 1 multicolor status LED USB: 2x USB 3.0 Type-A POWER: 12VDC/3A AC Adapter + dedicated Power Switch UART: Setting is 115200-8-N-1. 1x4 .1" unpopulated header on the PCB (J6 - very tiny silkscreen next to TX). Pinout: 1. 3v3 (Square - best skipped!), 2. RX, 3. GND, 4. TX WARNING: The serial port needs a TTL/RS-232 3.3v level converter! (Depending on the serial adapter RX and TX might need to be swapped). Note about the IR-Remote: There's a 8-Bit MCU (SONIX SN8F25E21SG) which is controlling the IR-Remote and is fed by the IR-Photodiode. The SoC can talk to the device via I2C. The vendor's GPL archive comes with the source of the interface driver for this as a (character driver), the main control software is however a blob. Installation Instructions: 1. Download factory image to disk 2. Apply factory image via stock web-gui Back to stock: 1. Login to router via ssh 2. run "asrock_g10_back_to_factory" script from /sbin Notes: - If something goes wrong durring sysupgrade, router will go back to factory image. - Asrock G10 uses partition layout from smem. So partition layout can be normal or alternate. - 900-arm-add-cmdline-override.patch was copied from 102-powerpc-add-cmdline-override.patch from powerpc target. Knowledge about BOOTCONFIG partition was based on user "jmomo" post from old OpenWrt forum (Post #50): https://forum.archive.openwrt.org/viewtopic.php?id=65956&p=2 Signed-off-by: Christian Lamparter <chunkeey@gmail.com> [bump to 5.4, add factory image, fix sysupgrade, convert partition layout to smem, remove ipq-wifi-asrock-g10 and use ART, minor fixes] Co-Authored-by: Pawel Dembicki <paweldembicki@gmail.com> Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com> Tested-by: Lukasz Ostapiuk <palibrzuch@gmail.com>
* ipq806x: remove model name from LED labelsAdrian Schmutzler2020-10-072-24/+30
| | | | | | | | | | Like in the previous patches for ath79 and ramips, this will remove the "devicename" from LED labels in ipq806x. The devicename is removed in DTS files and 01_leds, and a migration script is added. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ipq806x: fix support of Edgecore ECW5410 supportAdrian Schmutzler2020-09-191-2/+2
| | | | | | | | | | | | | | | | This fixes several stylistic and functional errors of the recently added Edgecore ECW5410: - fix call in 11-ath10k-caldata - use hex notation in 11-ath10k-caldata - remove redundant definitions from DTS that are already in DTSI - use proper sorting in image/Makefile - use DEVICE_VENDOR/DEVICE_MODEL instead of DEVICE_TITLE - use SOC instead of DEVICE_DTS Fixes: 59f0a0fd839e ("ipq806x: add Edgecore ECW5410 support") Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ipq806x: sort entries in lib/upgrade/platform.shAdrian Schmutzler2020-09-171-3/+3
| | | | | | Apply alphabetic sorting like in the other files. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* treewide: remove empty default casesAdrian Schmutzler2020-09-171-2/+0
| | | | | | There is no apparent reason to have an empty default case. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ipq806x: sort entries in 02_networkAdrian Schmutzler2020-09-171-5/+5
| | | | | | Apply alphabetic sorting like in the other files. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ipq806x: add Edgecore ECW5410 supportRobert Marko2020-09-175-0/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for the Edgecore ECW5410 indoor AP. Specification: - SoC: Qualcomm Atheros IPQ8068 ARMv7 2x Cortex A-15 - RAM: 256MB(225 usable) DDR3 - NOR Flash: 16MB SPI NOR - NAND Flash: 128MB S34MS01G2 Parallel NAND - Ethernet: 2 x 1G via 2x AR8033 PHY-s connected directly to GMAC2 and GMAC3 via SGMII (802.3af POE IN on eth0) - USB: 1 x USB 3.0 SuperSpeed - WLAN: 2x QCA9994 AC Wawe 2 (1x 2GHz bgn, 1x 5GHz acn) - CC2540 BLE - UART console on RJ45 next to ethernet ports exposed. Its Cisco pin compatible, 115200 8n1 baud. Installation instructions: Through stock firmware or initramfs. 1.Connect to console 2. Login with root account, if password is unknown then interrupt the boot with f and reset it in failsafe. 3. Transfer factory image 4. Flash the image with ubiformat /dev/mtd1 -y -f <your factory image path> This will replace the rootfs2 with OpenWrt, if you are currently running from rootfs2 then simply change /dev/mtd1 to /dev/mtd0 Note Initramfs: 1. Connect to console 2. Transfer the image from TFTP server with tftpboot, or by using DHCP advertised image with dhcp command. 3. bootm 4. Run ubiformat /dev/mtd1 You need to interrupt the bootloader after rebooting and run: run altbootcmd This will switch your active rootfs partition to one you wrote to and boot from it. So if rootfs1 is active, then it will change it to rootfs2. This will format the rootfs2 partition, if your active partition is 2 then simply change /dev/mtd1 with /dev/mtd0 If you dont format the partition you will be writing too, then sysupgrade will find existing UBI rootfs and kernel volumes and update those. This will result in wrong ordering and OpenWrt will panic on boot. 5. Transfer sysupgrade image 6. Flash with sysupgrade -n. Note that sysupgrade will write the image to rootfs partition that is not currently in use. Signed-off-by: Robert Marko <robert.marko@sartura.hr>
* ipq806x: enable Linksys EA8500 eth1 interfacePawel Dembicki2020-07-111-1/+1
| | | | | | | | | | | | | At this moment Linksys EA8500 uses only eth0. This patch change switch registers, which allow to use eth1 as lan and eth0 as wan. The method work with similar Linksys EA7500V1 and it work with EA8500. Suggested-by: Sungbo Eo <mans0n@gorani.run> Tested-by: Brian Onn <brian.a.onn@gmail.com> Tested-by: Adrian Panella <ianchi74@outlook.com> Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
* ipq806x: add support for Linksys EA7500 V1Pawel Dembicki2020-07-084-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for the Linksys EA7500 V1 router. Specification: - CPU: Qualcomm IPQ8064 - RAM: 256MB - Flash: NAND 128MB - WiFi: QCA9982 an+ac + QCA9983 bgn - Ethernet: 5 GBE Ports (WAN+ 4xLAN) (QCA8337) - USB: 1x USB 3.0 1x USB2.0 - Serial console: RJ-45 115200 8n1 (1V8 Voltage level) - 2 Buttons - 1 LED Known issues: - Some devices won't flash via web gui Installation: - Newer stock images doesn't allow to install custom firmware. - Please downgrade software to 1.1.2 version. Official firmware: https://downloads.linksys.com/downloads/firmware/FW_EA7500_1.1.2.172843_prod.gpg.img - Do it two times to downgrade all stored images. - Apply factory image via web-gui. Serial + TFTP method: - downgrade to 1.1.2 two times - connect ehternet and serial cable - set ip address of tftp server to 192.168.1.254 - put openwrt factory image to tftp folder and rename it to macan.bin - stop device while booting in u-boot - run command: "run flashimg" - run command: "setenv boot_part 1" - run command "saveenv" - reset Back to stock: - Please use old non-gpg image like this 1.1.2: https://downloads.linksys.com/downloads/firmware/FW_EA7500_1.1.2.172843_prod.img - ssh to router and copy image to tmp - use sysupgrade -n -F Tested by github users: @jack338c and @grzesiczek1 Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com> [removed i2c4_pins, mdio0_pins, nand_pins, rgmii2_pins from DTSI] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* treewide: drop shebang from non-executable target filesAdrian Schmutzler2020-06-161-1/+0
| | | | | | | | | | | | | | This drops the shebang from all target files for /lib and /etc/uci-defaults folders, as these are sourced and the shebang is useless. While at it, fix the executable flag on a few of these files. This does not touch ar71xx, as this target is just used for backporting now and applying cosmetic changes would just complicate things. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ipq806x: EA8500 fix boot partition detectionSamantha Collard2020-05-311-2/+0
| | | | | | | Remove extraneous code that disabled boot partition detection. Fixes: b3770eaca39f ("mtd: base-files: Unify dual-firmware devices (Linksys)") Signed-off-by: Samantha Collard <sammyrc34@gmail.com>
* ipq806x: read both WG2600HP MAC addresses from flashYanase Yuki2020-03-161-1/+1
| | | | | | | | | WG2600HP has its WLAN MAC addresses at PRODUCTDATA 0xc and 0x12, so use them both directly. Signed-off-by: Yanase Yuki <dev@zpc.sakura.ne.jp> [commit title/message clarification] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ipq806x: remove useless case within default case for upgradeAdrian Schmutzler2020-03-161-1/+0
| | | | | | | The default case will catch anything left, there is no need to explicitly add any device to it. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ipq806x: use switch trigger for WAN LED on NETGEAR boardsDavid Bauer2019-11-041-1/+1
| | | | | | | | | With this commit, the WAN LED is triggered by the switch port state instead of the eth0 netdev. Otherwise, the LED is always illuminated, regardless of the WAN port link state. Signed-off-by: David Bauer <mail@david-bauer.net>
* treewide: use a single ath10k MAC patching function with checksumAdrian Schmutzler2019-10-151-14/+14
| | | | | | | | | | | | | | | | While all ath10k eeproms have a checksum field, so far two functions for patching ath10k MAC address have been present (and been used). This merges code to provide a single function ath10k_patch_mac in caldata.sh, having its name in accordance with ath9k functions. By doing so, correct MAC patching for current and future ath10k devices should be ensured. This patch adds checksum adjustments for several targets on ath79 and lantiq. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* treewide: move MAC address patch functions to common libraryAdrian Schmutzler2019-10-141-25/+0
| | | | | | | | | This unifies MAC address patch functions and moves them to a common script. While those were implemented differently for different targets, they all seem to do the same. The number of different variants is significantly reduced by this patch. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* treewide: move calibration data extraction function to libraryAdrian Schmutzler2019-10-131-46/+16
| | | | | | | | | | | | | | | | | This moves the almost identical calibration data extraction functions present multiple times in several targets to a single library file /lib/functions/caldata.sh. Functions are renamed with more generic names to merge different variants that only differ in their names. Most of the targets used find_mtd_chardev, while some used find_mtd_part inside the extraction code. To merge them, the more abundant version with find_mtd_chardev is used in the common code. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> [rebase on latest master; add mpc85xx] Signed-off-by: David Bauer <mail@david-bauer.net>
* base-files: move xor() from caldata extraction to functions.shAdrian Schmutzler2019-10-131-16/+1
| | | | | | | | The xor() function is defined in each of the caldata extraction scripts for several targets. Move it to functions.sh to reduce duplicate code. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* 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>