Commit Graph

12 Commits (b0b1d4aaf0b646ba352e2bd446f7074d210b0f01)

Author SHA1 Message Date
Hauke Mehrtens b0b1d4aaf0 ath79: Do not build dlink_dir-615-e4 by default
The factory image for the dlink_dir-615-e4 is getting too big which makes
the full ath79 tiny build fail, deactivate it by default.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 years ago
Adrian Schmutzler 95030ac0b6 ath79: rename ATH_SOC to SOC
This replaces ATH_SOC by the newly introduced common SOC device
variable.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Adrian Schmutzler 0757f7fedc ath79: harmonize line breaks in image Makefiles
This harmonizes the line wrapping in image Makefile device
definitions, as those are frequently copy-pasted and are a common
subject of review comments. Having the treatment unifying should
reduce the cases where adjustment is necessary afterwards.

Harmonization is achieved by consistently (read "strictly")
applying certain rules:
- Never put more than 80 characters into one line
- Fill lines up (do not break after 40 chars because of ...)
- Use one tab for indent after wrapping by "\"
- Only break after pipe "|" for IMAGE variables

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Paul Fertser b14e529dd7 ath79: add D-Link DIR-615 E4
Specifications:

- FCC ID: KA2IR615E3
- SoC: MIPS32 24K 400 MHz Atheros AR7240
- RAM: 32 MiB DDR SDRAM ESMT M13S2561616A-5T
- Flash: 4 MiB NOR SPI Macronix MX25L3208E
- Wireless: AR9287 2.4 GHz 802.11n 2T2R, 2x RP-SMA connectors
- Ethernet: 5x 100BASE-TX Fast Ethernet
- LEDs: 9x GPIO, 1x ath9k
- Buttons: 2x tactile switches
- UART: 3.3 V, 115200 8n1
- USB: simple hardware modification required, 1x USB 1.1 Full Speed

Partitioning notes:

Vendor firmware (based on CameoAP99) defines two additional partitions:
"mac" @0x3b0000, size 0x10000 and "lp" @0x3c0000, size 0x30000.

The "mac" partition stores LAN MAC address and hardware board name.
However, the vendor firmware uses addresses from "nvram" partition, and
the board name is used only for informational purposes in the Web
interface (included in the pages' header), not affecting the firmware
image check.

The "lp" partition is supposed to contain a "language pack" (which can
be used to add an additional language support to the Web interface) and
is flashed separately, using the vendor firmware upgrade page.

Since these partitions are absolutely useless for OpenWrt and
overwriting them doesn't prevent downgrading to obsolete vendor
firmware, this patch appends the valueable space to "firmware".

Installation instructions:

- Upgrade from OpenWrt ar71xx with "sysupgrade -f -n"
or
- Upload as a firmware update via the vendor Web-interface
or
- Connect UART and use "loady" to upload and run OpenWrt initramfs
  image, then sysupgrade from it (TFTP client doesn't work)
or
- Before powering up hold "reset" button and keep it pressed for about
  15 seconds after, then access fail safe Web server on 192.168.0.1 (the
  old uIP TCP/IP protocol stack is not compatible with modern Linux, the
  kernel, so you'll need to use some other OS to do this). Can be
  performed without a Web-browser too:
    curl http://192.168.0.1/cgi/index \
      -F Send=@openwrt-ath79-tiny-dlink_dir-615-e4-squashfs-factory.bin

Signed-off-by: Paul Fertser <fercerpav@gmail.com>
4 years ago
Adrian Schmutzler 794d4b6652 treewide: remove kmod-usb-core from DEVICE_PACKAGES
This removes _all_ occurrences of kmod-usb-core from
DEVICE_PACKAGES and similar variables.

This package is pulled as dependency by one of the following
packages in any case:
- kmod-usb-chipidea
- kmod-usb-dwc2
- kmod-usb-ledtrig-usbport
- kmod-usb-ohci
- kmod-usb2
- kmod-usb2-pci
- kmod-usb3

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
[remove kmod-usb-core from EnGenius ESR600]
Signed-off-by: David Bauer <mail@david-bauer.net>
5 years ago
Paul Spooren 8c3dbaf8b4 ath79: split DEVICE_TITLE in multiple variables
This allows the definition of DEVICE_VENDOR, DEVICE_MODEL and
DEVICE_VARIANT. All three are merged together to look the same as the
current DEVICE_TITLE. Also, if DEVICE_TITLE is set it's directly used as
a *fallback* for devices which weren't upgraded yet.

This is based on the work of @sudhanshu16.

The motivation is to create JSON files based on provided metadata,
needing clear differentiation between vendor, model and revision.

Signed-off-by: Paul Spooren <mail@aparcar.org>
5 years ago
INAGAKI Hiroshi 879f2ef7c0 ath79: modify mtd partitions for Buffalo BHR-4GRV2
This commit modifies mtd partitions define for Buffalo BHR-4GRV2 and
move it to generic subtarget.

In Buffalo BHR-4GRV2, "kernel" partition is located behined "rootfs"
partition in the stock firmware. This causes the size of the kernel
to be limited by the fixed value.

0x50000                       0xe80000        0xff0000
  +-------------------------------+--------------+
  |            rootfs             |    kernel    |
  |           (14528k)            |    (1472k)   |
  +-------------------------------+--------------+

After ar71xx was updated to Kernel 4.14, the kernel size of BHR-4GRV2
exceeded the limit, and it breaks builds on official buildbot.
Since this issue was also confirmed in ath79, I modified the mtd
partitions to get rid of that limitation.

0x50000                                       0xff0000
  +----------------------------------------------+
  |                   firmware                   |
  |                   (16000k)                   |
  +----------------------------------------------+

However, this commit breaks compatibility with ar71xx firmware, so I
dropped "SUPPORTED_DEVICES += bhr-4grv2".

This commit requires new flash instruction instead of the old one.

Flash instruction using initramfs image:

1. Connect the computer to the LAN port of BHR-4GRV2
2. Set the IP address of the computer to 192.168.12.10
3. Rename the OpenWrt initramfs image to
"bhr4grv2-uImage-initramfs-gzip.bin" and place it into the TFTP
directory
4. Start the tftp server on the computer
5. While holding down the "ECO" button, connect power cable to
BHR-4GRV2 and turn on it
6. Flashing (orange) diag LED and release the finger from the button,
BHR-4GRV2 downloads the intiramfs image from TFTP server and boot
with it
7. On the initramfs image, create "/etc/fw_env.config" file with
following contents
  /dev/mtd1 0x0 0x10000 0x10000
8. Execute following commands to add environment variables for
u-boot
  fw_setenv ipaddr 192.168.12.1
  fw_setenv serverip 192.168.12.10
  fw_setenv ethaddr 00:aa:bb:cc:dd:ee
  fw_setenv bootcmd "bootm 0x9f050000 || bootm 0x9fe80000"
9. Perform sysupgrade with squashfs-sysupgrade image
10. Wait ~150 seconds to complete flashing

And this commit includes small fix; BHR-4GRV2 has QCA9557 as a SoC,
not QCA9558.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
6 years ago
YuheiOKAWA 27eae6597e ath79: add support for PQI Air Pen
SoC: AR9330 (or AR9331 revision?)
Ethernet x1, Wireless 2.4G, uSD card slot x1.
USB Power, include Li-Po Battery.

Flash 8MiB. (factory is dual image)
1. write image is use half 4MiB size from factory.
  write initramfs image to mtd6 and mtd7.
2. change next boot setting. next is mtd6 boot.
  echo -ne "\x01" | dd of=/dev/mtdblock8 conv=notrunc bs=1 count=1 seek=0

3. rewrite sysupgrade image.
  change next boot setting. next is mtd4.
  echo -ne "\x00" | dd of=/dev/mtdblock8 conv=notrunc bs=1 count=1 seek=0

OEM mtd.
dev:    size   erasesize  name
mtd0: 00040000 00010000 "u-boot"
mtd1: 00010000 00010000 "u-boot-env"
mtd2: 00010000 00010000 "ART"
mtd3: 00010000 00010000 "NVRAM"
mtd4: 00140000 00010000 "uImage"
mtd5: 00280000 00010000 "rootfs"
mtd6: 00140000 00010000 "uImage2"
mtd7: 00280000 00010000 "rootfs2"
mtd8: 00010000 00010000 "CONF"

Signed-off-by: YuheiOKAWA <tochiro.srchack@gmail.com>
6 years ago
INAGAKI Hiroshi d745eac636 ath79: add hwver parameter to buffalo-tag
In order to be able to set the value of "hardware version" other than
"3", I added the "hwver" parameter.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
6 years ago
Bernhard Frauendienst 480bf28273 ath79: add support for Buffalo WZR-HP-AG300H
Buffalo WZR-HP-AG300H is a dual band router based on
Qualcom Atheros AR7161 rev 2

Specification:
- 680 MHz CPU (Qualcomm Atheros AR7161)
- 128 MiB RAM (2x Samsung K4H511638G-LCCC)
- 32 MiB Flash (2x Winbond 25Q128BVFG)
- WiFi 5 GHz a/n (Atheros AR9220)
- WiFi 2.4 GHz b/g/n (Atheros AR9223)
- 1000Base-T WAN (Atheros AR7161)
- 4x 1000Base-T Switch (Atheros AR8316)
- 1x USB 2.0
- 3 Buttons (AOSS/WPS, Reset, USB Eject)
- 2 Slide switches (Router (on/off/auto), Movie Engine (on/off))
- 9 LEDs (Power green, WLAN 2GHz green, WLAN 2GHz amber,
    WLAN 5GHz green, WLAN 5GHz LED amber, Router green,
    Diag red, Movie Engine blue, USB green)

It is already supported by the ar71xx target.

For more information on the device visit the wiki:
<https://openwrt.org/toh/buffalo/wzr-hp-ag300h>

Serial console:
- The UART Header is next to Movie Engine Switch.
- Pinout is RX - TX - GND - 3.3V (Square Pad is 3.3V)
- The Serial setting is 115200-8-N-1.

Installation of OpenWRT from vendor firmware:
- Connect to the Web-interface at http://192.168.11.1
- Go to “Administration” → “Firmware Upgrade”
- Upload the OpenWrt factory image

Tested:
- Ethernet (LAN, WAN)
- WiFi
- Installation
  - via TFTP rescue
  - via factory image
    - on firmware v1.77 (28-05-2012)
    - on pro firmware v24SP2 r30356 (26-03-2018)
  - via sysupgrade from ar71xx
    (wlan devices don't work because of new names)
  - via sysupgrade from itself
- Buttons
- LEDS
- USB (Power control and device recognition)

Signed-off-by: Bernhard Frauendienst <openwrt@nospam.obeliks.de>
6 years ago
INAGAKI Hiroshi 9e6f22e309 ath79: add support for Buffalo WHR-G301N
Buffalo WHR-G301N is a 2.4 GHz 11n router, based on Atheros AR7240.
Ported from ar71xx target.

Specification:

- Atheros AR7240
- 32 MB of RAM
- 4 MB of Flash
- 2.4 GHz 2T2R wifi
- 5x 10/100 Mbps Ethernet
- 9x LEDs, 4x keys
  - LED: 8x gpio-leds, 1x ath9k-leds
  - key: 2x buttons, 1x slide switch
- UART header on PCB
  - Vcc, GND, TX, RX from LEDs side
  - 115200n8

Flash instruction using factory image:

1. Connect the computer to the LAN port of WHR-G301N
2. Connect power cable to WHR-G301N and turn on it
3. Access to "http://192.168.11.1/" and open firmware update page
("ファーム更新")
4. Select the OpenWrt factory image and click execute ("実行") button
5. Wait ~150 seconds to complete flashing

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
[fix the SUPPORTED_DEVICES to be compatible with the ar71xx image]
Signed-off-by: Mathias Kresin <dev@kresin.me>
6 years ago
INAGAKI Hiroshi 23519edbca ath79: add support for Buffalo BHR-4GRV2
Buffalo BHR-4GRV2 is a wired router, based on Qualcomm Atheros
QCA9558.
Ported from ar71xx target.

Specification:

- Qualcomm Atheros QCA9558
- 64 MB of RAM
- 16 MB of Flash
- 5x 10/100/1000 Ethernet
  - QCA8337N
- 4x LEDs, 2x keys
- UART header on PCB
  - Vcc, TX, RX, GND from LED side
  - 115200n8

Flash instruction using factory image:

1. Connect the computer to the LAN port of BHR-4GRV2
2. Connect power cable to BHR-4GRV2 and turn on it
3. Access to "http://192.168.12.1/" and open firmware update
page ("ファームウェア更新")
4. Select the OpenWrt factory image and click update ("更新実行")
button
5. Wait ~120 seconds to complete flashing

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
6 years ago