aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/bcm53xx/base-files/lib
Commit message (Collapse)AuthorAgeFilesLines
* bcm53xx: add Cisco Meraki MR32Christian Lamparter2020-09-252-2/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for Cisco Meraki MR32. The unit was donated by Chris Blake. Thank you! WARNING: Only the 1x1:1 abgn Air Marshal WIPS wifi is currently supported by b43: b43-phy2: Found PHY: Analog 9, Type 4 (N), Revision 16 b43-phy2: Found Radio: Manuf 0x17F, ID 0x2057, Revision 9, Version 1 b43-phy2: Loading firmware version 784.2 (2012-08-15 21:35:19) and only as 802.11ABG! while WIFI1 and WIFI2 (both BCM4352) are not: b43-phy0: Broadcom 4352 WLAN found (core revision 42) b43-phy0 ERROR: FOUND UNSUPPORTED PHY (Analog 12, Type 11 (AC), Revision 1) Hardware Highlights: SoC: Broadcom BCM53016A1 (1 GHz, 2 cores) RAM: 128 MiB NAND: 128 MiB Spansion S34ML01G2 (~114 MiB useable) ETH: 1GBit Ethernet Port - PoE WIFI1: Broadcom BCM43520 an+ac (2x2:2 - id: 0x4352) WIFI2: Broadcom BCM43520 bgn (2x2:2 - id: 0x4352) WIFI3: Broadcom BCM43428 abgn (1x1:1 - id: 43428) BLE: Broadcom BCM20732 (ttyS1) LEDS: 1 x Programmable RGB Status LED (driven by a PWM) 1 x White LED (GPIO) 1 x Orange LED Fault Indicator (GPIO) 2 x LAN Activity / Speed LEDs (On the RJ45 Port) BUTTON: one Reset button MISC: AT24C64 8KiB EEPROM (i2c - stores Ethernet MAC + Serial#!) ina219 hardware monitor (i2c) Kensington Lock SERIAL: WARNING: The serial port needs a TTL/RS-232 3V3 level converter! The Serial setting is 115200-8-N-1. The board has a populated right angle 1x4 0.1" pinheader. The pinout is: VCC, RX, TX, GND. (Use a multimeter) Flashing needs a serial adaptor (due to the lack of a working dropbear on the original firmware). This flashing procedure for the MR32 was tested with firmware: "r23-149867:150252-aacharya". 0. Create a seperate Ethernet LAN which does not have access to the internet. Ideally use 192.168.1.2 for your PC. Make sure to reserve 192.168.1.1 it will be used later on by the OpenWrt firmware. The original Meraki firmware will likely try to setup the network via DHCP Discovery, so make sure your PC is running a DHCP-Server (i.e.: dnsmasq) '# dnsmasq -i eth# -F 192.168.1.5,192.168.1.50 Furthermore, the PC needs a supported ssh/http/ftp server in order to retrieve the initramfs + dtb file 1. Disassemble the MR32 device by removing all screws (4 screws are located under the 4 rubber feets!) and prying open the plastic covers without breaking the plastic retention clips. Once inside, remove all the screws on the outer metal shielding to get to the PCB. It's not necessary to remove the antennas! 2. Connect the serial cable to the serial header. 3. Partially reassemble the outer metal shielding to ensure that the SoC has a proper heat sink. 4. Connect the Ethernet patch cable to the device and the power cable. 5. Wait for the device to boot and enter the root shell. (rooting is not discussed in detail here please refer to Chris Blake - "pwning the meraki mr18" blog post: <https://servernetworktech.com/2016/02/pwning-the-meraki-mr18/> (The same method works with the MR32's r23-149867:150252-aacharya) Wait for the MR32 to enter the "<Meraki>" prompt and enter: <Meraki> odm serial_num read (Verify that it matches what's on the S/N Sticker on the back!) <Meraki> odm serial_num write Q2XX-XXXX-XXXV <Meraki> odm serial_num read (Verify that the S/N has changed - and the LED start to flash) now to flash the firmware: <Meraki> odm firmware part.safe "http://192.168.1.2/mr32-initramfs.bin" Once OpenWrt booted use sysupgrade to permanently install OpenWrt. To do this: Download the latest sysupgrade.bin file for the MR32 to the device and use sysupgrade *sysupgrade.bin to install it. WARNING: DO NOT DELETE the "storage" ubi volume! To flash later MR32 Firmwares like r25-201804051805-G885d6d78-dhow-rel requires in-circut-i2c tools to access the I2C EEPROM AT24C64 next to the SoC. The idea is pretty much the same as from Step 5 from above: Change the serial number to Q2XXXXXXXXXV (should be around 0x7c), then attach a serial cable, ethernet (but make sure the device can't reach the internet!) hit "s" (the small s!) during boot to enter the root-shell and add the following commands to the /storage/config there: serial_allow_odm true serial_access_enabled true serial_access_check false valid_config true and then hit exit to let it finish booting. Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* bcm53xx: sysupgrade: optimize building UBI imageRafał Miłecki2020-03-211-3/+3
| | | | | | | | | Use "truncate" to adjust size of existing file instead of "dd" which required creating a copy. This saves space on tmpfs. It may be as low as 2.1 MiB when using OpenWrt default user space and way more (20+ MiB) when flashing vendor firmware. Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
* bcm53xx: sysupgrade: support Luxul NAND devicesDan Haab2019-10-151-0/+2
| | | | | | This adds support for UBI-aware sysupgrade using Luxul formats. Signed-off-by: Dan Haab <dan.haab@legrand.com>
* bcm53xx: fix sysupgrade for Luxul XWC-2000Rafał Miłecki2019-10-041-1/+1
| | | | | | Use a correct "compatible" value as in the upstream DTS file. Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
* bcm53xx: sysupgrade: support Luxul firmware formatDan Haab2019-09-161-0/+84
| | | | | | | Allow flashing Luxul devices using vendor firmware format. The next step will be building proper images once they are conirmed to work. Signed-off-by: Dan Haab <dan.haab@legrand.com>
* bcm53xx: extend firmware validationRafał Miłecki2019-09-061-1/+11
| | | | | | | This provides TRX validation result to the validation JSON. It also prevents users from installing broken firmware files. Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
* bcm53xx: sysupgrade: call nand_do_upgrade() from platform_do_upgrade()Rafał Miłecki2019-07-081-17/+12
| | | | | | | | | | | Calling nand_do_upgrade() from platform_pre_upgrade() was obsoleted in the commit 30f61a34b4cf ("base-files: always use staged sysupgrade"). This change brings bcm53xx in sync with other targets and allows dropping backward compatibility code. It shouldn't change any user visible behavior. Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
* bcm53xx: backport BCM5301X/BCM53573 dts commits from 4.19+Rafał Miłecki2018-07-281-1/+1
| | | | | | | This includes Linksys EA9500 support, BCM53573 timer fix and upstream-ready partitions patch that replaces two downstream hacks. Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
* bcm53xx: exit if writing kernel during sysupgrade failsRafał Miłecki2018-06-181-2/+2
| | | | Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
* bcm53xx: use iflag=skip_bytes for dd command during sysupgradeRafał Miłecki2017-12-291-2/+2
| | | | | | | | | | | Since BusyBox 1.25.0 dd command supports iflag=skip_bytes which allows skipping requested amount of bytes without reducing blocksize. Thanks to this we can leave default blocksize and let dd work more efficiently. On Netgear R6250 "dd skip=58 iflag=skip_bytes" can be 5 times faster than "dd bs=58 skip=1" when extracting TRX out of CHK. Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
* treewide: use the generic board_name functionMathias Kresin2017-07-151-5/+1
| | | | | | 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>
* bcm53xx: upgrade: fix RAMFS_COPY_*Matthias Schiffer2017-07-111-2/+2
| | | | | Fixes: 30f61a34b4cf "base-files: always use staged sysupgrade" Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
* bcm53xx: suppress osafeloader info error messages during flashingFelix Fietkau2017-01-301-1/+1
| | | | Signed-off-by: Felix Fietkau <nbd@nbd.name>
* bcm53xx: build image for TP-LINK Archer C9 v1Rafał Miłecki2016-11-191-0/+1
| | | | Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
* bcm53xx: support SafeLoader format in sysupgradeRafał Miłecki2016-11-191-1/+34
| | | | Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
* bcm53xx: drop target's preinit network support scriptRafał Miłecki2016-08-141-7/+0
| | | | | | We don't need it anymore since the rework of generic preinit script. Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
* bcm53xx: properly support sysupgrade using Seama on NAND devicesRafał Miłecki2016-06-201-1/+48
| | | | | | It updates kernel and then formats UBI without loosing erase counters. Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
* bcm53xx: sysupgrade: move TRX specific code to separated functionRafał Miłecki2016-06-131-14/+20
| | | | | | | This will allow adding support for other formats (e.g. Seama) in a clean way. Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
* bcm53xx: add basic support for Netgear R7900Rafał Miłecki2016-04-091-0/+1
| | | | | | Signed-off-by: Rafał Miłecki <zajec5@gmail.com> SVN-Revision: 49122
* bcm53xx: support Netgear R8500 in sysupgradeRafał Miłecki2016-01-301-0/+1
| | | | | | Signed-off-by: Rafał Miłecki <zajec5@gmail.com> SVN-Revision: 48572
* bcm53xx: specify magic expected in sysupgrade for D-Link DIR-885LRafał Miłecki2016-01-291-0/+1
| | | | | | Signed-off-by: Rafał Miłecki <zajec5@gmail.com> SVN-Revision: 48553
* bcm53xx: basic support for Seama format in sysupgradeRafał Miłecki2016-01-281-2/+33
| | | | | | Signed-off-by: Rafał Miłecki <zajec5@gmail.com> SVN-Revision: 48535
* bcm53xx: detect Seama sysupgrade formatRafał Miłecki2016-01-271-0/+8
| | | | | | | | It's used e.g. by D-Link devices. We don't support it yet. Signed-off-by: Rafał Miłecki <zajec5@gmail.com> SVN-Revision: 48509
* bcm53xx: support sysupgrade with Netgear R7000 original firmwareRafał Miłecki2015-08-261-0/+1
| | | | | | Signed-off-by: Rafał Miłecki <zajec5@gmail.com> SVN-Revision: 46732
* bcm53xx: fallback to default_do_upgrade if NAND upgrade failsRafał Miłecki2015-06-061-0/+12
| | | | | | Signed-off-by: Rafał Miłecki <zajec5@gmail.com> SVN-Revision: 45915
* bcm53xx: sysupgrade: drop useless shift in platform.shRafał Miłecki2015-06-061-1/+0
| | | | | | Signed-off-by: Rafał Miłecki <zajec5@gmail.com> SVN-Revision: 45914
* bcm53xx: extract TRX from image on the flyRafał Miłecki2015-06-061-13/+14
| | | | | | | | | Extracting TRX to separated file in /tmp/ just wastes some RAM while we can just pass a proper extracting command to the default_do_upgrade. Signed-off-by: Rafał Miłecki <zajec5@gmail.com> SVN-Revision: 45912
* bcm53xx: sysupgrade: extract TRX partitions directly from vendor imageRafał Miłecki2015-06-061-3/+5
| | | | | | | | | Extracting full TRX out of vendor format is not needed as otrx supports passing TRX offset. This saves some RAM during sysupgrade. Signed-off-by: Rafał Miłecki <zajec5@gmail.com> SVN-Revision: 45911
* bcm53xx: sysupgrade: check if new kernel fits partition sizeRafał Miłecki2015-04-211-2/+7
| | | | | | Signed-off-by: Rafał Miłecki <zajec5@gmail.com> SVN-Revision: 45547
* bcm53xx: sysupgrade: improve NAND warningsRafał Miłecki2015-04-211-2/+5
| | | | | | Signed-off-by: Rafał Miłecki <zajec5@gmail.com> SVN-Revision: 45546
* bcm53xx: sysupgrade: drop some debugging messageRafał Miłecki2015-04-211-1/+0
| | | | | | Signed-off-by: Rafał Miłecki <zajec5@gmail.com> SVN-Revision: 45544
* bcm53xx: sysupgrade: allow flashing NAND devices without --forceRafał Miłecki2015-04-211-5/+0
| | | | | | Signed-off-by: Rafał Miłecki <zajec5@gmail.com> SVN-Revision: 45543
* bcm53xx: sysupgrade: support flashing TRX with UBI imageRafał Miłecki2015-04-211-3/+9
| | | | | | Signed-off-by: Dan Haab <dhaab@luxul.com> SVN-Revision: 45542
* bcm53xx: fix handling absolute paths in sysupgrade (for vendor formats)Rafał Miłecki2015-04-171-4/+4
| | | | | | Signed-off-by: Rafał Miłecki <zajec5@gmail.com> SVN-Revision: 45473
* bcm53xx: add (disabled) support for upgrading kernel during sysupgradeRafał Miłecki2015-04-141-0/+17
| | | | | | Signed-off-by: Rafał Miłecki <zajec5@gmail.com> SVN-Revision: 45445
* otrx: change command line API to start with a modeRafał Miłecki2015-04-141-4/+4
| | | | | | | | This will allow adding more modes without options conflict. Signed-off-by: Rafał Miłecki <zajec5@gmail.com> SVN-Revision: 45443
* bcm53xx: allow sysupgrade firmwares without UBI containing rootfsRafał Miłecki2015-04-121-3/+2
| | | | | | | | | | | | | In most cases it allows reverting back to the vendor firmware (as they usually don't use UBI). If users wants to do that we can't do anything anyway. Erease counters will be just lost. The only thing we do is warn: "Flashing firmware without UBI for rootfs. All erase counters will be lost." It still requires forcing sysupgrade. Signed-off-by: Rafał Miłecki <zajec5@gmail.com> SVN-Revision: 45392
* bcm53xx: add platform_pre_upgrade to prepare for kernel+UBI sysupgradeRafał Miłecki2015-04-121-0/+28
| | | | | | | | | | We can now detect that provided firmware contains kernel and UBI image partitions. Flashing it in a sane way (keeping erase counters) still needs to be implemented. Signed-off-by: Rafał Miłecki <zajec5@gmail.com> SVN-Revision: 45391
* bcm53xx: rework vendor fw handling to don't duplicate upgrade callsRafał Miłecki2015-04-121-29/+15
| | | | | | Signed-off-by: Rafał Miłecki <zajec5@gmail.com> SVN-Revision: 45389
* bcm53xx: switch to the otrx for verifying TRX imagesRafał Miłecki2015-04-091-16/+6
| | | | | | | | This adds checking CRC32 of provided firmware image. Signed-off-by: Rafał Miłecki <zajec5@gmail.com> SVN-Revision: 45320
* bcm53xx: image: share function checking TRX in provided firmwareRafał Miłecki2015-04-071-6/+18
| | | | | | Signed-off-by: Rafał Miłecki <zajec5@gmail.com> SVN-Revision: 45292
* bcm53xx: display all errors (not just the 1st one) when checking imageRafał Miłecki2015-04-071-10/+8
| | | | | | Signed-off-by: Rafał Miłecki <zajec5@gmail.com> SVN-Revision: 45291
* bcm53xx: compare provided firmware magic with device magicRafał Miłecki2015-04-071-2/+29
| | | | | | Signed-off-by: Rafał Miłecki <zajec5@gmail.com> SVN-Revision: 45290
* bcm53xx: support flashing CHK and CyberTAN imagesRafał Miłecki2014-12-301-4/+16
| | | | SVN-Revision: 43800
* bcm53xx: sysupgrade support for devices with serial flashRafał Miłecki2014-12-151-0/+118
| | | | | | Signed-off-by: Rafał Miłecki <zajec5@gmail.com> SVN-Revision: 43719
* bcm53xx: failsafe supportRafał Miłecki2014-12-111-0/+7
Signed-off-by: Rafał Miłecki <zajec5@gmail.com> SVN-Revision: 43639