diff options
author | Tomasz Maciej Nowak <tomek_n@o2.pl> | 2019-03-06 20:15:19 +0100 |
---|---|---|
committer | Christian Lamparter <chunkeey@gmail.com> | 2019-03-18 20:43:09 +0100 |
commit | b3a0c97b8c936716360065cbf2309cb4b15b782c (patch) | |
tree | cfd4b68a810b5d706115bf9dc19ce0f8738842d9 /target/linux/ath79/base-files | |
parent | 8f6f2603029726e62f0fae49c03684472fed2b3d (diff) | |
download | upstream-b3a0c97b8c936716360065cbf2309cb4b15b782c.tar.gz upstream-b3a0c97b8c936716360065cbf2309cb4b15b782c.tar.bz2 upstream-b3a0c97b8c936716360065cbf2309cb4b15b782c.zip |
ath79: add support for jjPlus JA76PF2
jjPlus JA76PF2 (marketed as IntellusPro2) is a network embedded board.
Specification
SoC: Atheros AR7161
RAM: 64 MB DDR
Flash: 16 MB SPI NOR
Ethernet: 2x 10/100/1000 Mbps AR8316
LAN (CN11), WAN/PoE (CN6 - close to power barrel
connector, 48 V)
MiniPCI: 2x
LEDS: 4x, which 3 are GPIO controlled
Buttons: 2x GPIO controlled
Reset (SW1, closer to ethernet ports), WPS (SW2)
Serial: 1x (only RX and TX are wired)
baud: 115200, parity: none, flow control: none
Currently there is one caveat compared to ar71xx target images as the
MAC addresses are random on every reboot. To remedy this one needs to
store the WAN MAC address in RedBoot configuration. OpenWrt on first
boot, after flashing, will read out the address and assign proper ones
to both WAN and LAN ports. It is iportant to NOT keep the old
configuration when doing sysupgrade from ar71xx.
Upgrading from OpenWrt ar71xx image
1. Connect to serial port,
2. Download OpenWrt sysupgrade image to /tmp directory and flash it
with:
sysupgrade -n <openwrt_sysupgrade_image_name>
3. After writing new image OpenWrt will reboot, now interrupt boot
process and enter RedBoot (bootloader) command line by pressing
Ctrl+C,
4. Enter following commands (replace variable accordingly),
set_mac (to view MAC addresses)
alias ethaddr <wan_port_mac_adress>
(confirm storing the value by inputting y and pressing Enter)
reset
5. Now board should restart and boot OpenWrt with proper MAC addresses.
Installation
1. Prepare TFTP server with OpenWrt initramfs image,
2. Connect to WAN ethernet port,
3. Connect to serial port,
4. Power on the board and enter RedBoot (bootloader) command line by
pressing Ctrl+C,
5. Enter following commands (replace variables accordingly):
set_mac (to view MAC addresses)
alias ethaddr <wan_port_mac_address>
(confirm storing the value by inputting y and pressing Enter)
ip_adress -l <board_ip_adress>/24 -h <tftp_server_ip_adress>
load -r -b 0x80060000 <openwrt_initramfs_image_name>
exec -c ""
6. Now board should boot OpenWrt initramfs image,
7. Download OpenWrt sysupgrade image to /tmp directory and flash it
with:
sysupgrade <openwrt_sysupgrade_image_name>
8. Wait few minutes, after the D2 LED will stop blinking, the board
is ready for configuration.
Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
Diffstat (limited to 'target/linux/ath79/base-files')
-rwxr-xr-x | target/linux/ath79/base-files/etc/board.d/02_network | 4 | ||||
-rw-r--r-- | target/linux/ath79/base-files/lib/upgrade/platform.sh | 12 |
2 files changed, 12 insertions, 4 deletions
diff --git a/target/linux/ath79/base-files/etc/board.d/02_network b/target/linux/ath79/base-files/etc/board.d/02_network index e2c303e565..62318ee232 100755 --- a/target/linux/ath79/base-files/etc/board.d/02_network +++ b/target/linux/ath79/base-files/etc/board.d/02_network @@ -288,6 +288,10 @@ ath79_setup_macs() lan_mac=$(mtd_get_mac_ascii u-boot-env ethaddr) wan_mac=$(macaddr_add "$lan_mac" -1) ;; + jjplus,ja76pf2) + wan_mac=$(fconfig -s -r -d $(find_mtd_part "RedBoot config") -n alias/ethaddr) + lan_mac=$(macaddr_add "$wan_mac" 1) + ;; nec,wg800hp) lan_mac=$(mtd_get_mac_text board_data 640) wan_mac=$(mtd_get_mac_text board_data 1152) diff --git a/target/linux/ath79/base-files/lib/upgrade/platform.sh b/target/linux/ath79/base-files/lib/upgrade/platform.sh index bc19149d5c..c2fe08154d 100644 --- a/target/linux/ath79/base-files/lib/upgrade/platform.sh +++ b/target/linux/ath79/base-files/lib/upgrade/platform.sh @@ -5,9 +5,10 @@ PART_NAME=firmware REQUIRE_IMAGE_METADATA=1 -routerstation_do_upgrade() { +redboot_fis_do_upgrade() { local append local sysup_file="$1" + local kern_part="$2" local magic=$(get_magic_word "$sysup_file") if [ "$magic" = "4349" ]; then @@ -15,7 +16,7 @@ routerstation_do_upgrade() { [ -f "$CONF_TAR" -a "$SAVE_CONFIG" -eq 1 ] && append="-j $CONF_TAR" dd if="$sysup_file" bs=64k skip=1 2>/dev/null | \ - mtd -r $append -Fkernel:$kern_length:0x80060000,rootfs write - kernel:rootfs + mtd -r $append -F$kern_part:$kern_length:0x80060000,rootfs write - $kern_part:rootfs elif [ "$magic" = "7379" ]; then local board_dir=$(tar tf $sysup_file | grep -m 1 '^sysupgrade-.*/$') @@ -23,7 +24,7 @@ routerstation_do_upgrade() { [ -f "$CONF_TAR" -a "$SAVE_CONFIG" -eq 1 ] && append="-j $CONF_TAR" tar xf $sysup_file ${board_dir}kernel ${board_dir}root -O | \ - mtd -r $append -Fkernel:$kern_length:0x80060000,rootfs write - kernel:rootfs + mtd -r $append -F$kern_part:$kern_length:0x80060000,rootfs write - $kern_part:rootfs else echo "Unknown image, aborting!" @@ -39,9 +40,12 @@ platform_do_upgrade() { local board=$(board_name) case "$board" in + jjplus,ja76pf2) + redboot_fis_do_upgrade "$ARGV" linux + ;; ubnt,routerstation|\ ubnt,routerstation-pro) - routerstation_do_upgrade "$ARGV" + redboot_fis_do_upgrade "$ARGV" kernel ;; *) default_do_upgrade "$ARGV" |