#
-# Copyright (C) 2014-2015 OpenWrt.org
+# Copyright (C) 2014-2025 OpenWrt.org
#
. /lib/functions/uci-defaults.sh
case "$(board_name)" in
itus,shield-router|\
+ubnt,erlite|\
ubnt,usg)
ucidef_set_interfaces_lan_wan "eth1 eth2" "eth0"
;;
esac
case "$machine" in
- "UBNT_E100"*)
- name="erlite"
+ "UBNT_E100"*|\
+ "UBNT_E300"*|\
+ "UBNT_USG"*)
+ # let generic 02_sysinfo handle it since device has its own device tree
+ return 0
;;
"UBNT_E200"*)
name="erpro"
;;
- "UBNT_E300"*|\
- "UBNT_USG"*)
- # let generic 02_sysinfo handle it since device has its own device tree
- return 0
- ;;
-
"ITUS_SHIELD"*)
name="itus,shield-router"
;;
--- /dev/null
+// 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";
+};
define Device/ubnt_edgerouter-lite
DEVICE_VENDOR := Ubiquiti
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)
- SUPPORTED_DEVICES += erlite
+ SUPPORTED_DEVICES += erlite ubnt,erlite
endef
TARGET_DEVICES += ubnt_edgerouter-lite
define Device/ubnt_unifi-usg
- $(Device/ubnt_edgerouter-lite)
+ DEVICE_VENDOR := Ubiquiti
DEVICE_MODEL := UniFi Security Gateway
BOARD_NAME := ubnt,usg
DEVICE_PACKAGES += kmod-gpio-button-hotplug kmod-leds-gpio
DEVICE_DTS := cn5020_ubnt_usg
+ CMDLINE := $(ERLITE_CMDLINE)
KERNEL += | append-dtb-to-elf
SUPPORTED_DEVICES += ubnt,usg
endef