octeon: add support for Ubiquiti UniFi Security Gateway

Ubiquiti UniFi Security Gateway (USG) is largely identical to
the EdgeRouter Lite (ERLite-3) apart from a different board ID
and two dome leds.

Device data (from WikiDev):
  CPU: Cavium Octeon Plus CN5020 @500MHz 2-cores
  Ethernet: 3x Atheros AR8035-A GbE PHY's
  Flash: On-board 4MB Flash
  Storage: Internal 3.8GB USB Flash (Kingston ID) drive
    w/ 1.5GB free for use occupies single internal USB port.
  Serial: 1x RJ45 port on front panel. 115200, 8N1
  Buttons: 1x Reset

Flash instructions are identical to EdgeRouter Lite.

Signed-off-by: Clemens Hopfer <openwrt@wireloss.net>
This commit is contained in:
Clemens Hopfer
2022-05-28 21:34:48 +02:00
committed by Christian Lamparter
parent 29ed58c8be
commit 8c0930b70b
8 changed files with 211 additions and 6 deletions

View File

@@ -27,7 +27,8 @@ platform_copy_config_helper() {
platform_copy_config() {
case "$(board_name)" in
erlite)
erlite|\
ubnt,usg)
platform_copy_config_helper /dev/sda1
;;
itus,shield-router)
@@ -91,7 +92,8 @@ platform_do_upgrade() {
ubnt,edgerouter-6p)
kernel=mmcblk0p1
;;
erlite)
erlite|\
ubnt,usg)
kernel=sda1
;;
itus,shield-router)
@@ -119,7 +121,8 @@ platform_check_image() {
erlite | \
itus,shield-router | \
ubnt,edgerouter-4 | \
ubnt,edgerouter-6p)
ubnt,edgerouter-6p | \
ubnt,usg)
local kernel_length=$(tar xf $tar_file $board_dir/kernel -O | wc -c 2> /dev/null)
local rootfs_length=$(tar xf $tar_file $board_dir/root -O | wc -c 2> /dev/null)
[ "$kernel_length" = 0 -o "$rootfs_length" = 0 ] && {