aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/om-fwupgradecfg-gen.sh
Commit message (Collapse)AuthorAgeFilesLines
* build: introduce $(MKHASH)Leonardo Mörlein2021-05-131-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before this commit, it was assumed that mkhash is in the PATH. While this was fine for the normal build workflow, this led to some issues if make TOPDIR="$(pwd)" -C "$pkgdir" compile was called manually. In most of the cases, I just saw warnings like this: make: Entering directory '/home/.../package/gluon-status-page' bash: line 1: mkhash: command not found bash: line 1: mkhash: command not found bash: line 1: mkhash: command not found bash: line 1: mkhash: command not found bash: line 1: mkhash: command not found bash: line 1: mkhash: command not found bash: line 1: mkhash: command not found bash: line 1: mkhash: command not found [...] While these were only warnings and the package still compiled sucessfully, I also observed that some package even fail to build because of this. After applying this commit, the variable $(MKHASH) is introduced. This variable points to $(STAGING_DIR_HOST)/bin/mkhash, which is always the correct path. Signed-off-by: Leonardo Mörlein <me@irrelefant.net>
* ipq40xx: add support for Plasma Cloud PA2200Marek Lindner2020-12-221-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Device specifications: * QCA IPQ4019 * 256 MB of RAM * 32 MB of SPI NOR flash (w25q256) - 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=20,variant=PlasmaCloud-PA2200 * 2T2R 5 GHz (channel 36-64) - QCA9888 hw2.0 (PCI) - requires special BDF in QCA9888/hw2.0/board-2.bin bus=pci,bmi-chip-id=0,bmi-board-id=16,variant=PlasmaCloud-PA2200 * 2T2R 5 GHz (channel 100-165) - QCA4019 hw1.0 (SoC) - requires special BDF in QCA4019/hw1.0/board-2.bin with bus=ahb,bmi-chip-id=0,bmi-board-id=21,variant=PlasmaCloud-PA2200 * GPIO-LEDs for 2.4GHz, 5GHz-SoC and 5GHz-PCIE * GPIO-LEDs for power (orange) and status (blue) * 1x GPIO-button (reset) * TTL pins are on board (arrow points to VCC, then follows: GND, TX, RX) * 2x gigabit ethernet - phy@mdio3: + Label: Ethernet 1 + gmac0 (ethaddr) in original firmware + used as LAN interface - phy@mdio4: + Label: Ethernet 2 + gmac1 (eth1addr) in original firmware + 802.3at POE+ + used as WAN interface * 12V 2A DC Flashing instructions: 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: Marek Lindner <marek.lindner@kaiwoo.ai> [sven@narfation.org: prepare commit message, rebase, use all LEDs, switch to dualboot_datachk upgrade script, use eth1 as designated WAN interface] Signed-off-by: Sven Eckelmann <sven@narfation.org>
* ipq40xx: add support for Plasma Cloud PA1200Marek Lindner2020-12-221-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Device specifications: * QCA IPQ4018 * 256 MB of RAM * 32 MB of SPI NOR flash (w25q256) - 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=PlasmaCloud-PA1200 * 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=PlasmaCloud-PA1200 * 3x GPIO-LEDs for status (cyan, purple, yellow) * 1x GPIO-button (reset) * 1x USB (xHCI) * TTL pins are on board (arrow points to VCC, then follows: GND, TX, RX) * 2x gigabit ethernet - phy@mdio4: + Label: Ethernet 1 + gmac0 (ethaddr) in original firmware + used as LAN interface - phy@mdio3: + Label: Ethernet 2 + gmac1 (eth1addr) in original firmware + 802.3af/at POE(+) + used as WAN interface * 12V/24V 1A DC Flashing instructions: 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: Marek Lindner <marek.lindner@kaiwoo.ai> [sven@narfation.org: prepare commit message, rebase, use all LEDs, switch to dualboot_datachk upgrade script, use eth1 as designated WAN interface] Signed-off-by: Sven Eckelmann <sven@narfation.org>
* ath79: Add support for Plasma Cloud PA300Sven Eckelmann2020-12-221-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Device specifications: * Qualcomm/Atheros QCA9533 v2 * 650/600/217 MHz (CPU/DDR/AHB) * 64 MB of RAM * 16 MB of SPI NOR flash (mx25l12805d) - 2x 7 MB available; but one of the 7 MB regions is the recovery image * 2x 10/100 Mbps Ethernet * 2T2R 2.4 GHz Wi-Fi * multi-color LED (controlled via red/green/blue GPIOs) * 1x GPIO-button (reset) * external h/w watchdog (enabled by default) * TTL pins are on board (arrow points to VCC, then follows: GND, TX, RX) * 2x fast ethernet - eth0 + Label: Ethernet 1 + 24V passive POE (mode B) + used as WAN interface - eth1 + Label: Ethernet 2 + 802.3af POE + builtin switch port 2 + used as LAN interface * 12-24V 1A DC * internal antennas Flashing instructions: 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@narfation.org>
* scripts/om-fwupgradecfg-gen.sh: Generate checksum over whole squashfsSven Eckelmann2020-12-221-6/+3
| | | | | | | | | | | The rootfs is padded to the full block size by padjffs2 and a 4 byte magic value ("deadc0de") is added to the end. On first boot, the JFFS2 is replacing the "deadc0de" marker when the rootfs_data is initialized. The static part of the rootfs is therefore $rootfs_size - 4 and not $rootfs_size - 262144 - 4. Signed-off-by: Sven Eckelmann <sven@narfation.org>
* scripts/om-fwupgradecfg-gen.sh: Drop block alignment codeSven Eckelmann2020-12-221-5/+1
| | | | | | | The padding and block alignment is handled by the image build script and doesn't need to be duplicated in the fwupgrade.cfg build script. Signed-off-by: Sven Eckelmann <sven@narfation.org>
* ar71xx: Skip more hashed blocks for OM2P(-HS) 64k variantSven Eckelmann2018-09-101-1/+1
| | | | | | | | | | | | | | | | | | The OM2P(-HS)v4 got a variant which uses a slightly different flash. The standard versions used a flash with 256KB blocks which is no longer available. The replacement flash uses a flash with 64K blocks. The padding for the image rootfs is already for 64K and 256K and thus can be flashed on the device without any problems. Unfortunately, the bootloader will check $rootfs_size (rounded down to the nearest 64k block) minus 1x 64k. But it is now possible that the new JFFS2 rootfs_data starts even earlier and modifies the checked region. The check will then fail and the backup image (when available) will be booted. Just setting it to the same number of skipped blocks as other 64K models avoids this problem. Signed-off-by: Sven Eckelmann <sven.eckelmann@openmesh.com>
* ipq40xx: add support for OpenMesh A62Sven Eckelmann2018-04-231-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * QCA IPQ4019 * 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=20,variant=OM-A62 * 2T2R 5 GHz (channel 36-64) - QCA9888 hw2.0 (PCI) - requires special BDF in QCA9888/hw2.0/board-2.bin bus=pci,bmi-chip-id=0,bmi-board-id=16,variant=OM-A62 * 2T2R 5 GHz (channel 100-165) - QCA4019 hw1.0 (SoC) - requires special BDF in QCA4019/hw1.0/board-2.bin with bus=ahb,bmi-chip-id=0,bmi-board-id=21,variant=OM-A62 * 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 - phy@mdio3: + Label: Ethernet 1 + gmac0 (ethaddr) in original firmware + 802.3at POE+ - phy@mdio4: + Label: Ethernet 2 + gmac1 (eth1addr) in original firmware + 18-24V passive POE (mode B) * powered only via POE 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. The initramfs image can be started using setenv bootargs 'loglevel=8 earlycon=msm_serial_dm,0x78af000 console=ttyMSM0,115200 mtdparts=spi0.0:256k(0:SBL1),128k(0:MIBIB),384k(0:QSEE),64k(0:CDT),64k(0:DDRPARAMS),64k(0:APPSBLENV),512k(0:APPSBL),64k(0:ART),64k(0:custom),64k(0:KEYS),15552k(inactive),15552k(inactive2)' tftpboot 0x84000000 openwrt-ipq40xx-openmesh_a62-initramfs-fit-uImage.itb set fdt_high 0x85000000 bootm 0x84000000 Signed-off-by: Sven Eckelmann <sven.eckelmann@openmesh.com>
* om-fwupgradecfg-gen.sh: add support for the A42Sven Eckelmann2018-01-131-4/+18
| | | | Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com>
* treewide: fix shellscript syntax errors/typosLorenzo Santina2017-09-131-1/+1
| | | | | | | | | Fix multiple syntax errors in shelscripts (of packages only) These errors were causing many conditions to not working properly Signed-off-by: Lorenzo Santina <lorenzo.santina@edu.unito.it> [increase PKG_RELEASE, drop command substitution from directip.sh] Signed-off-by: Mathias Kresin <dev@kresin.em>
* scripts: make all scripts executableStijn Tintel2017-07-141-0/+0
| | | | Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
* scripts/om-fwupgradecfg-gen.sh: add support for the A60Sven Eckelmann2017-02-141-2/+2
| | | | Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com>
* build: use mkhash to replace various quirky md5sum/openssl callsFelix Fietkau2017-01-051-5/+5
| | | | Signed-off-by: Felix Fietkau <nbd@nbd.name>
* scripts/om-fwupgradecfg-gen.sh: add support for the OM5P-ACJohn Crispin2016-04-091-2/+2
| | | | | | Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com> SVN-Revision: 49143
* scripts/om-fwupgradecfg-gen.sh: Generate sha256sum for uboot verificationJohn Crispin2016-04-091-0/+4
| | | | | | | | | | Future Open Mesh u-boot versions are changing the check of the image files (vmlinux, rootfs) from md5 to sha256. Having both in them should be enough to ensure backward and forward compatibility. Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com> SVN-Revision: 49140
* scripts/om-fwupgradecfg-gen.sh: add support for the MR1750John Crispin2015-09-141-2/+2
| | | | | | Signed-off-by: Sven Eckelmann <sven@open-mesh.com> SVN-Revision: 46928
* scripts/om-fwupgradecfg-gen.sh: Fix u-boot image md5sum checkJohn Crispin2015-09-141-0/+3
| | | | | | | | | | | The u-boot on Open Mesh devices checks the whole transfered image against a md5sum. This is stored inside the option filemd5sum inside the fwupgrade.cfg. The bootloader will not check it when this setting is missing and could therefore write invalid images to the flash. Signed-off-by: Sven Eckelmann <sven@open-mesh.com> SVN-Revision: 46925
* scripts/om-fwupgradecfg-gen.sh: add support for the MR900John Crispin2014-11-141-2/+2
| | | | | | Signed-off-by: Sven Eckelmann <sven@open-mesh.com> SVN-Revision: 43260
* scripts/om-fwupgradecfg-gen.sh: add support for the OM5PJohn Crispin2014-07-201-2/+2
| | | | | | | | Signed-off-by: Marek Lindner <marek@open-mesh.com> [sven@open-mesh.com: Rebased] Signed-off-by: Sven Eckelmann <sven@open-mesh.com> SVN-Revision: 41771
* scripts/om-fwupgradecfg-gen.sh: add support for the MR600Gabor Juhos2012-11-181-9/+27
| | | | | | | Signed-off-by: Marek Lindner <lindner_marek@yahoo.de> Signed-off-by: Gabor Juhos <juhosg@openwrt.org> SVN-Revision: 34233
* scripts: rename om2p-fwupgradecfg-gen.sh to more generic om-fwupgradecfg-gen.shGabor Juhos2012-11-141-0/+52
It will be used for non OM2P boards as well. Signed-off-by: Marek Lindner <lindner_marek@yahoo.de> Signed-off-by: Gabor Juhos <juhosg@openwrt.org> SVN-Revision: 34200