aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ipq806x/base-files/lib/upgrade
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* 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: 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>
* 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>
* ipq806x: add ipq4019 fritz4040 supportChristian Lamparter2017-03-221-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-241-0/+5
| | | | | | | | | | | | | | | | | | 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: add support for indicating the boot and upgrade state using four ledsHenryk Heisig2016-10-151-0/+6
| | | | Signed-off-by: Henryk Heisig hyniu@o2.pl
* ipq806x: Build image for Netgear Nighthawk X4 R7500v2Alexis Green2016-08-221-0/+2
| | | | | | 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-221-2/+4
| | | | Signed-off-by: Pavel Kubelun <be.dissent@gmail.com>
* ipq806x: base-files: add support for Linksys EA8500Adrian Panella2016-06-132-0/+95
| | | | Signed-off-by: Adrian Panella <ianchi74@outlook.com>
* ipq806x/base-files: Add support for Archer C2600Ash Benz2016-05-271-1/+19
| | | | Signed-off-by: Ash Benz <ash.benz@bk.ru>
* ipq806x: Add support for Netgear D7800John Crispin2016-01-191-0/+2
| | | | | | 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-041-1/+2
| | | | | | | | | | | | | 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