Skip to content
Snippets Groups Projects
  1. Mar 16, 2022
    • Martin Kennedy's avatar
      mpc85xx: add support for Extreme Networks WS-AP3825i · 7e614820
      Martin Kennedy authored
      Hardware:
      
      - SoC:     Freescale P1020
        - CPU:     2x e500v2 @ 800MHz
      - Flash:   64MiB NOR (1x Intel JS28F512)
      - Memory:  256MiB (2x ProMOS DDR3 V73CAG01168RBJ-I9H 1Gb)
      - WiFi1:   2.4+5GHz abgn 3x3 (Atheros AR9590)
      - Wifi2:   5GHz an+ac 3x3 (Qualcomm Atheros QCA9890)
      - ETH:     2x PoE Gigabit Ethernet (2x Atheros AR8035)
      - Power:   12V (center-positive barrel) or 48V PoE (active or passive)
      - Serial:  Cisco-compatible RJ45 next to 12V power socket (115200 baud)
      - LED Driver: TI LV164A
        - LEDs: (not functioning)
          - 2x Power (Green + Orange)
          - 4x ETH (ETH1 + ETH2) x (Green + Orange)
          - 2x WiFi (WiFi2 + WiFi1)
      
      Installation:
      
      1. Grab the OpenWrt initramfs <openwrt-initramfs-bin>, e.g.
         openwrt-mpc85xx-p1020-extreme-networks_ws-ap3825i-initramfs-kernel.bin.
         Place it in the root directory of a DHCP+TFTP server, e.g. OpenWrt
         `dnsmasq` with configuration `dhcp.server.enable_tftp='1'`.
      
      2. Connect to the serial port and boot the AP with options
         e.g. 115200,N,8. Stop autoboot in U-Boot by pressing Enter after
         'Scanning JFFS2 FS:' begins, then waiting for the prompt to be
         interrupted. Credentials are identical to the one in the APs
         interface. By default it is admin / new2day: if these do not work,
         follow the OEM's reset procedure using the reset button.
      
      3. Set the bootcmd so the AP can boot OpenWrt by executing:
      
      ```uboot
      setenv boot_openwrt "cp.b 0xEC000000 0x2000000 0x2000000; interrupts off; bootm start 0x2000000; bootm loados; fdt resize; fdt boardsetup; fdt chosen; bootm prep; bootm go;"
      setenv bootcmd "run boot_openwrt"
      saveenv
      ```
      
         If you plan on going back to the vendor firmware - the bootcmd for it
         is stored in the boot_flash variable.
      
      4. Load the initramfs image to RAM and boot by executing
      
      ```uboot
      setenv ipaddr <ipv4 client address>;
      setenv serverip <tftp server address>;
      tftpboot 0x2000000 <openwrt-initramfs-bin>;
      interrupts off;
      bootm start 0x2000000;
      bootm loados;
      fdt resize;
      fdt boardsetup;
      fdt chosen;
      bootm prep;
      bootm go;
      ```
      
      5. Make a backup of the "firmware" partition if you ever wish to go back
         to the vendor firmware.
      
      6. Upload the OpenWrt sysupgrade image via SCP to the devices /tmp
         folder.
      
      7. Flash OpenWrt using sysupgrade.
      
      ```ash
      sysupgrade /tmp/<openwrt-sysupgrade-bin>
      ```
      
      Notes:
      
      - We must step through the `bootm` process manually to avoid fdt
        relocation. To explain: the stock U-boot (and stock Linux) are configured
        with a very large CONFIG_SYS_BOOTMAPSZ (and the device's stock Linux
        kernel is configured to be able to handle it). The U-boot version
        predates the check for the `fdt_high` variable, meaning that upon fdt
        relocation, the fdt can (and will) be moved to a very high address; the
        default appears to be 0x9ffa000. This address is so high that when the
        Linux kernel starts reading the fdt at the beginning of the boot process,
        it encounters a memory access exception and panics[5]. While it is
        possible to reduce the highest address the fdt will be relocated to by
        setting `bootm_size`, this also has the side effect of limiting the
        amount of RAM the kernel can use[3].
      
      - Because it is not relocated, the flattened device tree needs to be
        padded in the build process to guarantee that `fdt resize` has
        enough space.
      
      - The primary ethernet MAC address is stored (and set) in U-boot; they are
        shimmed into the device tree by 'fdt boardsetup' through the
        'local-mac-address' property of the respective ethernet node, so OpenWrt
        does not need to set this at runtime. Note that U-boot indexes the
        ethernet nodes by alias, which is why the device tree explicitly aliases
        ethernet1 to enet2.
      
      - LEDs do not function under OpenWrt. Each of 8 LEDs is connected to an
        output of a TI LV164A shift register, which is wired to GPIO lines and
        operates through bit-banged SPI. Unfortunately, I am unable to get the
        spi-gpio driver to recognize the `led_spi` device tree node at all, as
        confirmed by patching in printk messages demonstrating
        spi-gpio.c::spi_gpio_probe never runs. It is possible to manually
        articulate the shift register by exporting the GPIO lines and stepping
        their values through the sysfs.
      
      - Though they do not function under OpenWrt, I have left the pinout details
        of the LEDs and shift register in the device tree to represent real
        hardware.
      
      - An archive of the u-boot and Linux source for the AP3825i (which is one
        device of a range of devices code-named 'CHANTRY') be found here[1].
      
      - The device has an identical case to both the Enterasys WS-AP3725i and
        Adtran BSAP-2030[2] (and potentially other Adtran BSAPs). Given that
        there is no FCC ID for the board itself (only its WLAN modules), it's
        likely these are generic boards, and even that the WS-AP3725i is
        identical, with only a change in WLAN card. I have ordered one to confirm
        this.
      
      - For additional information: the process of porting the board is
        documented in an OpenWrt forum thread[4].
      
      [1]: magnet:?xt=urn:btih:f5306a5dfd06d42319e4554565429f84dde96bbc
      [2]: https://forum.openwrt.org/t/support-for-adtran-bluesocket-bsap-2030/48538
      [3]: https://forum.openwrt.org/t/adding-openwrt-support-for-ws-ap3825i/101168/29
      [4]: https://forum.openwrt.org/t/adding-openwrt-support-for-ws-ap3825i/101168
      [5]: https://forum.openwrt.org/t/adding-openwrt-support-for-ws-ap3825i/101168/26
      
      
      
      Tested-by: default avatarMartin Kennedy <hurricos@gmail.com>
      Signed-off-by: default avatarMartin Kennedy <hurricos@gmail.com>
      7e614820
  2. Aug 13, 2020
  3. Dec 13, 2019
    • David Bauer's avatar
      mpc85xx: add support for Enterasys WS-AP3710i · 16b01fb1
      David Bauer authored
      
      Hardware
      --------
      
      SoC:   NXP P1020 (2x e500 @ 800MHz)
      RAM:   256M DDR3 (Micron)
      FLASH: 32M NOR (Spansion S29GL128S)
      BTN:   1x Reset
      WiFi:  1x Atheros AR9590 2.4 bgn 3x3
             2x Atheros AR9590 5.0 an 3x3
      ETH:   1x Gigabit Ethernet (Atheros AR8033)
      LED:   System (green/red) - Radio{0,1} (green)
             LAN (connected to PHY)
              - GE blue
              - FE green
      
      Serial is a Cisco-compatible RJ45 next to the ethernet port.
      115200-N-8 are the settings for OS and U-Boot.
      
      Installation
      ------------
      
      1. Grab the OpenWrt initramfs, rename it to 01C8A8C0.img. Place it in
         the root directory of a TFTP server and serve it at
         192.168.200.200/24.
      
      2. Connect to the serial port and boot the AP. Stop autoboot in U-Boot
         by pressing Enter when prompted. Credentials are identical to the one
         in the APs interface. By default it is admin / new2day.
      
      3. Set the bootcmd so the AP can boot OpenWrt by executing
      
         $ setenv boot_openwrt "setenv bootargs;
           cp.b 0xee000000 0x1000000 0x1000000; bootm 0x1000000"
         $ setenv bootcmd "run boot_openwrt"
         $ saveenv
      
         If you plan on going back to the vendor firmware - the bootcmd for it
         is stored in the boot_flash variable.
      
      4. Load the initramfs image to RAM and boot by executing
      
         $ tftpboot 0x1000000 192.168.200.200:01C8A8C0.img; bootm
      
      5. Make a backup of the "firmware" partition if you ever wish to go back
         to the vendor firmware.
      
      6. Upload the OpenWrt sysupgrade image via SCP to the devices /tmp
         folder.
      
      7. Flash OpenWrt using sysupgrade.
      
         $ sysupgrade -n /tmp/openwrt-sysupgrade.bin
      
      Signed-off-by: default avatarDavid Bauer <mail@david-bauer.net>
      16b01fb1
  4. Jan 26, 2019
    • David Bauer's avatar
      mpc85xx: add support for OCEDO Panda · b368373f
      David Bauer authored
      
      CPU:   FSL P1020 (2x 800MHz E500 PPC)
      RAM:   1GB DDR3
      FLASH: 256MiB NAND
      WiFi:  2x Atheros AR9382 2x2:2 abgn
      ETH:   2x BCM54616S - 1x BCM53128 8-port switch
      LED:   5x LEDs (Power, WiFi1, WiFi2, N/D, SYS)
      BTN:   1x RESET
      
      Installation
      ------------
      
      1. Download initrams kernel image, dtb binary and sysupgrade image.
      
      2. Place initramfs kernel into tftp root directory. Rename to
      "panda-uimage-factory".
      
      3. Place dtb binary into tftp root directory. Rename to "panda.fdt".
      
      4. Start tftp server on 192.168.100.8/24.
      
      5. Power up the device with the reset button pressed. It will download
      the initrams and dtb via tftp and boot into OpenWRT in RAM.
      
      6. SSH into the device and remove the factory partitions.
      
       > ubirmvol /dev/ubi0 --name=kernel1
       > ubirmvol /dev/ubi0 --name=rootfs1
       > ubirmvol /dev/ubi0 --name=devicetree1
      
      You will have around 60 MiB of free space with that.
      
      You can also delete "kernel2", "devicetree2", "rootfs2" and "storage"
      respectively in case you do not want to go back to the vendor firmware.
      
      7. Modify the U-Boot bootcmd to allow for booting OpenWRT
      
       > fw_setenv bootcmd_owrt "ubi part ubi && ubi read 0x1000000 kernel
         && bootm 0x1000000"
      
       > fw_setenv bootargs_owrt "setenv bootargs console=ttyS0,115200
         ubi.mtd=3,2048"
      
       > fw_setenv bootcmd "run bootargs_owrt; run bootcmd_owrt"
      
      8. Transfer the sysupgrade image via scp into the /tmp directory.
      
      9. Upgrade the device
      
       > sysupgrade -n /tmp/<imagename>
      
      Signed-off-by: default avatarDavid Bauer <mail@david-bauer.net>
      b368373f
  5. Jan 13, 2019
    • David Bauer's avatar
      mpc85xx: add support for Sophos RED 15w Rev.1 · 97e4311f
      David Bauer authored
      
      Hardware
      ========
      CPU:  Freescale P1010 PowerPC
      RAM:  128M DDR3
      NAND: 128MiB
      ETH:  RTL8211F SGMII PHY
            RTL8367B 5-port RGMII switch
            (not connected to SoC - unmanaged)
      WiFi: SparkLan WPEA-121N
             - Atheros AR9382 2T2R abgn
      USB:  1x USB 2.0
      LED:  System, Router, Internet, Tunnel controllable
            LAN1-4, WAN, Power non-controllable
      BTN:  None
      
      Installation
      ============
      1. Power on the device while attached to the Console port.
      
      2. Halt the U-Boot by pressing Enter when prompted.
      
      3. Set the correct bootcmd for booting OpenWRT:
       > setenv bootargs_owrt "setenv bootargs console=ttyS0,115200"
       > setenv bootcmd "run bootargs_owrt;
         nand read 0x1000000 0x300000 0x800000;
         bootm 0x1000000;"
       > saveenv
      
      5. Rename OpenWRT initramfs image to 'kernel.bin' and place it in a
         TFTP server root-directory served on 192.168.1.2/24. Connect your
         computer to one of the LAN-ports.
      
      4. Boot OpenWRT initramfs image with
       > run bootargs_owrt; tftpboot 0x1000000 192.168.1.2:kernel.bin;
         bootm 0x1000000;
      
      6. (Optional)
         Make a Backup of 'sophos-os1', 'sophos-os2' and 'sophos-data' in case
         you ever want to go back to the vendor firmware.
      
      7. Create Ubi Volume on mtd4 by executing
       > ubiformat /dev/mtd4 -y
      
      8. Transfer OpenWRT sysupgrade image to the device via SCP and install it
         with
       > sysupgrade -n <openwrt-image-file>
      
      Back to Stock
      =============
      If you want to go back to the stock firmware, here is the bootcmd of the
      vendor firmware:
       > setenv bootargs console=ttyS0,115200 root=/dev/mtdblock5;
         nand read 0xc00000 0x00300000  0x100000;
         nand read 0x1000000 0x00400000 0x00800000;
         bootm 0x1000000 - 0xc00000
      
      Set it via 'setenv' from the U-Boot shell and don't forget to save it
      using 'saveenv'!
      
      After this, boot the OpenWRT initramfs image just like you would for
      installation. Write back the three vendor partitions using mtd. Reboot
      the device afterwards.
      
      Signed-off-by: default avatarDavid Bauer <mail@david-bauer.net>
      [refresh and reorder patches]
      Signed-off-by: default avatarChristian Lamparter <chunkeey@gmail.com>
      97e4311f
  6. Nov 26, 2018
    • Christian Lamparter's avatar
      apm821xx: add support for the Netgear WNDAP620 and WNDAP660 · d82d8469
      Christian Lamparter authored
      
      This patch adds support for the Netgear WNDAP620 and WNDAP660,
      they are similar devices, but due to the LAN LED configuration,
      the switch setup and WIFI configuration each gets a different
      device target.
      
      Hardware Highlights WNDAP620:
      CPU: AMCC PowerPC APM82181 at 1000 MHz
      DRAM:  128 MB, 2 x 64 MiB DDR2 Hynix H5PS5162GF
      CPU: AMCC PowerPC APM82181 at 1000 MHz
      FLASH: 32 MiB, NAND SLC, Hynix HY27US08561A
      Ethernet: RealTek RTL8363SB 2x2-Port Switch PHY - Only 1 GBit Port (POE)
      Wifi: Atheros AR9380 minipcie - Dual-Band - 3x3:3
      Serial: console port with RJ45 Interface (9600-N-8-1)
      LEDS: Power, LAN-Activity, dual color LAN-Linkspeed, 2.4GHz, 5GHz LEDs
      Button: Soft Reset Button
      Antennae: 3 internal dual-band antennae + 3 x RSMA for external antennaes
      
      Hardware Highlights WNDAP660:
      CPU: AMCC PowerPC APM82181 at 1000 MHz + 2 Heatsinks
      DRAM:  256 MB, 2 x 128 MiB DDR2
      FLASH: 32 MiB, NAND SLC, Hynix HY27US08561A
      Ethernet: RealTek RTL8363SB 2x2-Port Switch PHY (POE)
      Wifi1: Atheros AR9380 minipcie - Dual-Band - 3x3:3
      Wifi2: Atheros AR9380 minipcie - Dual-Band - 3x3:3
      Serial: console port with RJ45 Interface (9600-N-8-1)
      LEDS: Power, LAN-Activity, 2x dual color LAN-Linkspeed, 2.4GHz, 5GHz LEDs
      Button: Soft Reset Button
      Antennae: 6 internal dual-band antennae + 3 x RSMA for external antennaes
      
      Flashing requirements:
      
       - needs a tftp server at 192.168.1.10/serverip.
       - special 8P8C(aka RJ45)<->D-SUB9 Console Cable
         ("Cisco Console Cable"). Note: Both WNDAP6x0 have
         a MAX3232 transceivers, hence no need for any separate
         CMOS/TTL level shifters.
      
      External Antenna:
      The antennae mux is controlled by GPIO 11 and GPIO14. Valid Configurations:
       = Config# = | = GPIO 11 = | = GPIO 14 = |  ===== Description =====
            1.     |   1 / High  |  0 / Low    | Use the internal antennae (default)
            2.     |   0 / Low   |  1 / High   | Use the external antennae
      
      The external antennaes are only meant for the 2.4 GHz band.
      
      One-way Flashing instructions via u-boot:
      
       0. connect the serial cable to the RJ45 Console Port
          Note: This requires a poper RS232 and not a TTL/USB adaptor.
      
       1. power up the AP and interrupt the u-boot process at
      
          'Hit any key to stop autoboot'
      
       2. setup serverip and ipaddr env settings
          Enter the following commands into the u-boot shell
          # setenv ipaddr 192.168.1.1
          # setenv serverip 192.168.1.10
      
       3. download the factory.img image to the AP
          Enter the following commands into the u-boot shell
      
          # tftp ${kernel_addr_r} openwrt-apm821xx-nand-netgear_wndap660-squashfs-factory.img
      
       4. verfiy image integrity
          Enter the following commands into the u-boot shell
      
          # crc32 $fileaddr $filesize
      
          If the calculated crc32 checksum does not match, go back to step 3.
      
       5. flash the image
          Enter the following commands into the u-boot shell
      
          # nand erase 0x110000 0x1bd0000
          # nand write ${kernel_addr_r} 0x110000 ${filesize}
      
       6. setup uboot environment
          Enter the following commands into the u-boot shell
      
          # setenv bootargs
          # setenv fileaddr
          # setenv filesize
          # setenv addroot 'setenv bootargs ${bootargs} root=/dev/ubiblock0_0'
          # setenv owrt_boot 'nboot ${kernel_addr_r} nand0 0x110000; run addroot; run addtty; bootm ${kernel_addr_r}'
          # setenv bootcmd 'run owrt_boot'
          # saveenv
      
       7. boot
          # run bootcmd
      
      Booting initramfs instructions via u-boot:
      
       Follow steps 0 - 2 from above.
      
       3. boot initramfs
          Enter the following commands into the u-boot shell
      
          # tftp ${kernel_addr_r} openwrt-apm821xx-nand-netgear_wndap660-initramfs-kernel.bin
          # run addtty
          # bootm ${kernel_addr_r}
      
      Signed-off-by: default avatarChristian Lamparter <chunkeey@gmail.com>
      d82d8469
Loading