octeon/generic: ubnt,erlite: define profile
Currently the erlite install shows Model as EBNT_E100, uses eth0 as lan, eth1 as wan, and doesn't use eth2. - define dts for this device, such that we get a cleaner naming here - fix handing of this device to inlude eth2 - change eth0 to wan, like er-4/usg/etc as it once was intended Fixes: https://github.com/openwrt/openwrt/issues/14946 Signed-off-by: Fabian Groffen <grobian@gentoo.org> Link: https://github.com/openwrt/openwrt/pull/17758 Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
This commit is contained in:
parent
b4e6fd7b76
commit
26d43b039d
6 changed files with 28 additions and 16 deletions
|
@ -1,5 +1,5 @@
|
||||||
#
|
#
|
||||||
# Copyright (C) 2014-2015 OpenWrt.org
|
# Copyright (C) 2014-2025 OpenWrt.org
|
||||||
#
|
#
|
||||||
|
|
||||||
. /lib/functions/uci-defaults.sh
|
. /lib/functions/uci-defaults.sh
|
||||||
|
@ -8,6 +8,7 @@ board_config_update
|
||||||
|
|
||||||
case "$(board_name)" in
|
case "$(board_name)" in
|
||||||
itus,shield-router|\
|
itus,shield-router|\
|
||||||
|
ubnt,erlite|\
|
||||||
ubnt,usg)
|
ubnt,usg)
|
||||||
ucidef_set_interfaces_lan_wan "eth1 eth2" "eth0"
|
ucidef_set_interfaces_lan_wan "eth1 eth2" "eth0"
|
||||||
;;
|
;;
|
||||||
|
|
|
@ -14,8 +14,11 @@ do_sysinfo_octeon() {
|
||||||
esac
|
esac
|
||||||
|
|
||||||
case "$machine" in
|
case "$machine" in
|
||||||
"UBNT_E100"*)
|
"UBNT_E100"*|\
|
||||||
name="erlite"
|
"UBNT_E300"*|\
|
||||||
|
"UBNT_USG"*)
|
||||||
|
# let generic 02_sysinfo handle it since device has its own device tree
|
||||||
|
return 0
|
||||||
;;
|
;;
|
||||||
|
|
||||||
"UBNT_E200"*)
|
"UBNT_E200"*)
|
||||||
|
@ -26,12 +29,6 @@ do_sysinfo_octeon() {
|
||||||
name="erpro"
|
name="erpro"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
"UBNT_E300"*|\
|
|
||||||
"UBNT_USG"*)
|
|
||||||
# let generic 02_sysinfo handle it since device has its own device tree
|
|
||||||
return 0
|
|
||||||
;;
|
|
||||||
|
|
||||||
"ITUS_SHIELD"*)
|
"ITUS_SHIELD"*)
|
||||||
name="itus,shield-router"
|
name="itus,shield-router"
|
||||||
;;
|
;;
|
||||||
|
|
|
@ -25,7 +25,7 @@ octeon_move_config() {
|
||||||
. /lib/functions.sh
|
. /lib/functions.sh
|
||||||
|
|
||||||
case "$(board_name)" in
|
case "$(board_name)" in
|
||||||
erlite|\
|
ubnt,erlite|\
|
||||||
ubnt,usg)
|
ubnt,usg)
|
||||||
move_config "/dev/sda1" "vfat"
|
move_config "/dev/sda1" "vfat"
|
||||||
;;
|
;;
|
||||||
|
|
|
@ -47,7 +47,7 @@ platform_copy_config_helper() {
|
||||||
|
|
||||||
platform_copy_config() {
|
platform_copy_config() {
|
||||||
case "$(board_name)" in
|
case "$(board_name)" in
|
||||||
erlite|\
|
ubnt,erlite|\
|
||||||
ubnt,usg)
|
ubnt,usg)
|
||||||
platform_copy_config_helper /dev/sda1 vfat
|
platform_copy_config_helper /dev/sda1 vfat
|
||||||
;;
|
;;
|
||||||
|
@ -132,7 +132,7 @@ platform_do_upgrade() {
|
||||||
ubnt,edgerouter-6p)
|
ubnt,edgerouter-6p)
|
||||||
kernel=/dev/mmcblk0p1
|
kernel=/dev/mmcblk0p1
|
||||||
;;
|
;;
|
||||||
erlite|\
|
ubnt,erlite|\
|
||||||
ubnt,usg)
|
ubnt,usg)
|
||||||
kernel=/dev/sda1
|
kernel=/dev/sda1
|
||||||
;;
|
;;
|
||||||
|
@ -161,10 +161,10 @@ platform_check_image() {
|
||||||
|
|
||||||
case "$board" in
|
case "$board" in
|
||||||
er | \
|
er | \
|
||||||
erlite | \
|
|
||||||
itus,shield-router | \
|
itus,shield-router | \
|
||||||
ubnt,edgerouter-4 | \
|
ubnt,edgerouter-4 | \
|
||||||
ubnt,edgerouter-6p | \
|
ubnt,edgerouter-6p | \
|
||||||
|
ubnt,erlite | \
|
||||||
ubnt,usg | \
|
ubnt,usg | \
|
||||||
cisco,vedge1000)
|
cisco,vedge1000)
|
||||||
local kernel_length=$(tar xf $tar_file $board_dir/kernel -O | wc -c 2> /dev/null)
|
local kernel_length=$(tar xf $tar_file $board_dir/kernel -O | wc -c 2> /dev/null)
|
||||||
|
|
|
@ -0,0 +1,11 @@
|
||||||
|
// SPDX-License-Identifier: GPL-2.0-only
|
||||||
|
/*
|
||||||
|
* Device tree source for Ubiquity Edgerouter Lite
|
||||||
|
*/
|
||||||
|
|
||||||
|
/include/ "ubnt_e100.dts"
|
||||||
|
|
||||||
|
/ {
|
||||||
|
compatible = "ubnt,erlite", "cavium,cn5020";
|
||||||
|
model = "Ubiquiti Edgerouter Lite";
|
||||||
|
};
|
|
@ -79,18 +79,21 @@ ERLITE_CMDLINE:=-mtdparts=phys_mapped_flash:512k(boot0)ro,512k(boot1)ro,64k(eepr
|
||||||
define Device/ubnt_edgerouter-lite
|
define Device/ubnt_edgerouter-lite
|
||||||
DEVICE_VENDOR := Ubiquiti
|
DEVICE_VENDOR := Ubiquiti
|
||||||
DEVICE_MODEL := EdgeRouter Lite
|
DEVICE_MODEL := EdgeRouter Lite
|
||||||
BOARD_NAME := erlite
|
DEVICE_DTS := cn5020_ubnt_edgerouter-lite
|
||||||
|
KERNEL := kernel-bin | patch-cmdline | append-dtb-to-elf
|
||||||
|
KERNEL_DEPENDS := $$(wildcard $(DTS_DIR)/$(DEVICE_DTS).dts)
|
||||||
CMDLINE := $(ERLITE_CMDLINE)
|
CMDLINE := $(ERLITE_CMDLINE)
|
||||||
SUPPORTED_DEVICES += erlite
|
SUPPORTED_DEVICES += erlite ubnt,erlite
|
||||||
endef
|
endef
|
||||||
TARGET_DEVICES += ubnt_edgerouter-lite
|
TARGET_DEVICES += ubnt_edgerouter-lite
|
||||||
|
|
||||||
define Device/ubnt_unifi-usg
|
define Device/ubnt_unifi-usg
|
||||||
$(Device/ubnt_edgerouter-lite)
|
DEVICE_VENDOR := Ubiquiti
|
||||||
DEVICE_MODEL := UniFi Security Gateway
|
DEVICE_MODEL := UniFi Security Gateway
|
||||||
BOARD_NAME := ubnt,usg
|
BOARD_NAME := ubnt,usg
|
||||||
DEVICE_PACKAGES += kmod-gpio-button-hotplug kmod-leds-gpio
|
DEVICE_PACKAGES += kmod-gpio-button-hotplug kmod-leds-gpio
|
||||||
DEVICE_DTS := cn5020_ubnt_usg
|
DEVICE_DTS := cn5020_ubnt_usg
|
||||||
|
CMDLINE := $(ERLITE_CMDLINE)
|
||||||
KERNEL += | append-dtb-to-elf
|
KERNEL += | append-dtb-to-elf
|
||||||
SUPPORTED_DEVICES += ubnt,usg
|
SUPPORTED_DEVICES += ubnt,usg
|
||||||
endef
|
endef
|
||||||
|
|
Loading…
Reference in a new issue