diff --git a/package/base-files/files/bin/config_generate b/package/base-files/files/bin/config_generate index fd5155e869..5b17555da8 100755 --- a/package/base-files/files/bin/config_generate +++ b/package/base-files/files/bin/config_generate @@ -91,21 +91,28 @@ generate_static_network() { addr_offset=2 generate_network() { - local ifname macaddr protocol type ipaddr netmask vlan + local ports ifname macaddr protocol type ipaddr netmask vlan local bridge=$2 json_select network json_select "$1" + json_get_values ports ports json_get_vars ifname macaddr protocol ipaddr netmask vlan json_select .. json_select .. - [ -n "$ifname" ] || return + [ -n "$ifname" -o -n "$ports" ] || return - # force bridge for multi-interface devices (and lan) - case "$1:$ifname" in - *\ * | lan:*) type="bridge" ;; - esac + # Force bridge for "lan" as it may have other devices (e.g. wireless) + # bridged + [ "$1" = "lan" -a -z "$ports" ] && { + ports="$ifname" + } + + [ -n "$ports" ] && { + type="bridge" + ifname="$ports" + } [ -n "$bridge" ] && { if [ -z "$vlan" ]; then diff --git a/package/base-files/files/lib/functions/uci-defaults.sh b/package/base-files/files/lib/functions/uci-defaults.sh index 134c527d8d..407a9c710f 100644 --- a/package/base-files/files/lib/functions/uci-defaults.sh +++ b/package/base-files/files/lib/functions/uci-defaults.sh @@ -39,7 +39,13 @@ ucidef_set_interface() { [ -n "$opt" -a -n "$val" ] || break - json_add_string "$opt" "$val" + [ "$opt" = "ifname" -a "$val" != "${val/ //}" ] && { + json_select_array "ports" + for e in $val; do json_add_string "" "$e"; done + json_close_array + } || { + json_add_string "$opt" "$val" + } done if ! json_is_a protocol string; then diff --git a/package/base-files/files/lib/upgrade/fwtool.sh b/package/base-files/files/lib/upgrade/fwtool.sh index 3826bf5c30..a45f3bbc73 100644 --- a/package/base-files/files/lib/upgrade/fwtool.sh +++ b/package/base-files/files/lib/upgrade/fwtool.sh @@ -81,12 +81,12 @@ fwtool_check_image() { done v "Device $device not supported by this image" - vn "Supported devices:" + local devices="Supported devices:" for k in $dev_keys; do json_get_var dev "$k" - _vn " $dev" + devices="$devices $dev" done - _v + v "$devices" return 1 } diff --git a/package/boot/grub2/Makefile b/package/boot/grub2/Makefile index 46e3597cc2..b3cb5e076f 100644 --- a/package/boot/grub2/Makefile +++ b/package/boot/grub2/Makefile @@ -10,12 +10,12 @@ include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=grub PKG_CPE_ID:=cpe:/a:gnu:grub2 -PKG_VERSION:=2.04 -PKG_RELEASE:=3 +PKG_VERSION:=2.06~rc1 +PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz -PKG_SOURCE_URL:=@GNU/grub -PKG_HASH:=e5292496995ad42dabe843a0192cf2a2c502e7ffcc7479398232b10a472df77d +PKG_SOURCE_URL:=https://alpha.gnu.org/gnu/grub +PKG_HASH:=2c87f1f21e2ab50043e6cd9163c08f1b6c3a6171556bf23ff9ed65b074145484 HOST_BUILD_PARALLEL:=1 PKG_BUILD_DEPENDS:=grub2/host @@ -84,7 +84,7 @@ HOST_MAKE_FLAGS += \ TARGET_RANLIB=$(TARGET_RANLIB) \ LIBLZMA=$(STAGING_DIR_HOST)/lib/liblzma.a -TARGET_CFLAGS := $(filter-out -fno-plt,$(TARGET_CFLAGS)) +TARGET_CFLAGS := $(filter-out -O2 -O3 -fno-plt,$(TARGET_CFLAGS)) define Host/Configure $(SED) 's,(RANLIB),(TARGET_RANLIB),' $(HOST_BUILD_DIR)/grub-core/Makefile.in diff --git a/package/boot/grub2/patches/001-verifiers-Blocklist-fallout-cleanup.patch b/package/boot/grub2/patches/001-verifiers-Blocklist-fallout-cleanup.patch deleted file mode 100644 index 74d68a6cda..0000000000 --- a/package/boot/grub2/patches/001-verifiers-Blocklist-fallout-cleanup.patch +++ /dev/null @@ -1,31 +0,0 @@ -From: David Michael -Date: Fri, 5 Jul 2019 07:45:59 -0400 -Subject: [PATCH] verifiers: Blocklist fallout cleanup - -Blocklist fallout cleanup after commit 5c6f9bc15 (generic/blocklist: Fix -implicit declaration of function grub_file_filter_disable_compression()). - -Signed-off-by: David Michael -Reviewed-by: Daniel Kiper ---- - ---- a/grub-core/osdep/generic/blocklist.c -+++ b/grub-core/osdep/generic/blocklist.c -@@ -59,7 +59,7 @@ grub_install_get_blocklist (grub_device_ - - grub_disk_cache_invalidate_all (); - -- file = grub_file_open (core_path_dev, GRUB_FILE_TYPE_NONE | FILE_TYPE_NO_DECOMPRESS); -+ file = grub_file_open (core_path_dev, GRUB_FILE_TYPE_NONE | GRUB_FILE_TYPE_NO_DECOMPRESS); - if (file) - { - if (grub_file_size (file) != core_size) -@@ -116,7 +116,7 @@ grub_install_get_blocklist (grub_device_ - - grub_file_t file; - /* Now read the core image to determine where the sectors are. */ -- file = grub_file_open (core_path_dev, GRUB_FILE_TYPE_NONE | FILE_TYPE_NO_DECOMPRESS); -+ file = grub_file_open (core_path_dev, GRUB_FILE_TYPE_NONE | GRUB_FILE_TYPE_NO_DECOMPRESS); - if (! file) - grub_util_error ("%s", grub_errmsg); - diff --git a/package/boot/grub2/patches/100-grub_setup_root.patch b/package/boot/grub2/patches/100-grub_setup_root.patch index df671bc9d2..e075d052cb 100644 --- a/package/boot/grub2/patches/100-grub_setup_root.patch +++ b/package/boot/grub2/patches/100-grub_setup_root.patch @@ -1,3 +1,41 @@ +--- a/include/grub/util/install.h ++++ b/include/grub/util/install.h +@@ -198,13 +198,13 @@ grub_install_get_image_target (const cha + void + grub_util_bios_setup (const char *dir, + const char *boot_file, const char *core_file, +- const char *dest, int force, ++ const char *root, const char *dest, int force, + int fs_probe, int allow_floppy, + int add_rs_codes, int warn_short_mbr_gap); + void + grub_util_sparc_setup (const char *dir, + const char *boot_file, const char *core_file, +- const char *dest, int force, ++ const char *root, const char *dest, int force, + int fs_probe, int allow_floppy, + int add_rs_codes, int warn_short_mbr_gap); + +--- a/util/grub-install.c ++++ b/util/grub-install.c +@@ -1720,7 +1720,7 @@ main (int argc, char *argv[]) + /* Now perform the installation. */ + if (install_bootsector) + grub_util_bios_setup (platdir, "boot.img", "core.img", +- install_drive, force, ++ NULL, install_drive, force, + fs_probe, allow_floppy, add_rs_codes, + !grub_install_is_short_mbrgap_supported ()); + break; +@@ -1747,7 +1747,7 @@ main (int argc, char *argv[]) + /* Now perform the installation. */ + if (install_bootsector) + grub_util_sparc_setup (platdir, "boot.img", "core.img", +- install_drive, force, ++ NULL, install_drive, force, + fs_probe, allow_floppy, + 0 /* unused */, 0 /* unused */ ); + break; --- a/util/grub-setup.c +++ b/util/grub-setup.c @@ -87,6 +87,8 @@ static struct argp_option options[] = { @@ -38,18 +76,19 @@ - dest_dev, arguments.force, + arguments.root_dev, dest_dev, arguments.force, arguments.fs_probe, arguments.allow_floppy, - arguments.add_rs_codes); + arguments.add_rs_codes, 0); --- a/util/setup.c +++ b/util/setup.c -@@ -252,13 +252,12 @@ identify_partmap (grub_disk_t disk __att +@@ -252,14 +252,13 @@ identify_partmap (grub_disk_t disk __att void SETUP (const char *dir, const char *boot_file, const char *core_file, - const char *dest, int force, + const char *root, const char *dest, int force, int fs_probe, int allow_floppy, - int add_rs_codes __attribute__ ((unused))) /* unused on sparc64 */ + int add_rs_codes __attribute__ ((unused)), /* unused on sparc64 */ + int warn_small) { char *core_path; char *boot_img, *core_img, *boot_path; @@ -57,7 +96,7 @@ size_t boot_size, core_size; grub_uint16_t core_sectors; grub_device_t root_dev = 0, dest_dev, core_dev; -@@ -307,7 +306,10 @@ SETUP (const char *dir, +@@ -311,7 +310,10 @@ SETUP (const char *dir, core_dev = dest_dev; @@ -69,7 +108,7 @@ char **root_devices = grub_guess_root_devices (dir); char **cur; int found = 0; -@@ -320,6 +322,8 @@ SETUP (const char *dir, +@@ -324,6 +326,8 @@ SETUP (const char *dir, char *drive; grub_device_t try_dev; @@ -78,41 +117,3 @@ drive = grub_util_get_grub_dev (*cur); if (!drive) continue; ---- a/include/grub/util/install.h -+++ b/include/grub/util/install.h -@@ -191,13 +191,13 @@ grub_install_get_image_target (const cha - void - grub_util_bios_setup (const char *dir, - const char *boot_file, const char *core_file, -- const char *dest, int force, -+ const char *root, const char *dest, int force, - int fs_probe, int allow_floppy, - int add_rs_codes); - void - grub_util_sparc_setup (const char *dir, - const char *boot_file, const char *core_file, -- const char *dest, int force, -+ const char *root, const char *dest, int force, - int fs_probe, int allow_floppy, - int add_rs_codes); - ---- a/util/grub-install.c -+++ b/util/grub-install.c -@@ -1712,7 +1712,7 @@ main (int argc, char *argv[]) - /* Now perform the installation. */ - if (install_bootsector) - grub_util_bios_setup (platdir, "boot.img", "core.img", -- install_drive, force, -+ NULL, install_drive, force, - fs_probe, allow_floppy, add_rs_codes); - break; - } -@@ -1738,7 +1738,7 @@ main (int argc, char *argv[]) - /* Now perform the installation. */ - if (install_bootsector) - grub_util_sparc_setup (platdir, "boot.img", "core.img", -- install_drive, force, -+ NULL, install_drive, force, - fs_probe, allow_floppy, - 0 /* unused */ ); - break; diff --git a/package/boot/uboot-envtools/files/ath79 b/package/boot/uboot-envtools/files/ath79 index d0353c9023..7b0692e59f 100644 --- a/package/boot/uboot-envtools/files/ath79 +++ b/package/boot/uboot-envtools/files/ath79 @@ -61,6 +61,7 @@ ubnt,nanostation-m|\ yuncore,a770|\ yuncore,a782|\ yuncore,xd4200|\ +ziking,cpe46b|\ zyxel,nbg6616) ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x10000" "0x10000" ;; diff --git a/package/kernel/mt76/Makefile b/package/kernel/mt76/Makefile index 9f36a83aca..5104c3ec53 100644 --- a/package/kernel/mt76/Makefile +++ b/package/kernel/mt76/Makefile @@ -8,9 +8,9 @@ PKG_LICENSE_FILES:= PKG_SOURCE_URL:=https://github.com/openwrt/mt76 PKG_SOURCE_PROTO:=git -PKG_SOURCE_DATE:=2021-05-13 -PKG_SOURCE_VERSION:=e969ab10a03403e6c869e91d4d41a71c6340657b -PKG_MIRROR_HASH:=eb57d82267d5765c270fc394ad81baacd8d02cde859f813236ad76a89c5ea944 +PKG_SOURCE_DATE:=2021-05-15 +PKG_SOURCE_VERSION:=9d736545bb5ac9707e60b7900b7d6b290492e24d +PKG_MIRROR_HASH:=8fd98f488579c18cfd8c442cff1796dcd70e2ecbc59c5d5b92ee8c0f06efafcf PKG_MAINTAINER:=Felix Fietkau PKG_BUILD_PARALLEL:=1 diff --git a/package/libs/libubox/Makefile b/package/libs/libubox/Makefile index 90e953aa46..ac4effb6f8 100644 --- a/package/libs/libubox/Makefile +++ b/package/libs/libubox/Makefile @@ -5,9 +5,9 @@ PKG_RELEASE=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(PROJECT_GIT)/project/libubox.git -PKG_MIRROR_HASH:=042398d1295ac892e09c6d2e8f68861c6f859fc6752e809a114f451834e7a05e -PKG_SOURCE_DATE:=2021-03-02 -PKG_SOURCE_VERSION:=2e52c7e9a90ab7ba1cf9d2986d1505ca5d184698 +PKG_MIRROR_HASH:=7dd1db1e0074a9c7c722db654cce3111b3bd3cff0bfd791c4497cb0f6c22d3ca +PKG_SOURCE_DATE:=2021-05-16 +PKG_SOURCE_VERSION:=b14c4688612c05c78ce984d7bde633bce8703b1e PKG_ABI_VERSION:=$(call abi_version_str,$(PKG_SOURCE_DATE)) CMAKE_INSTALL:=1 diff --git a/package/libs/uclient/Makefile b/package/libs/uclient/Makefile index 419aff15e1..398a27bb98 100644 --- a/package/libs/uclient/Makefile +++ b/package/libs/uclient/Makefile @@ -5,9 +5,9 @@ PKG_RELEASE=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(PROJECT_GIT)/project/uclient.git -PKG_MIRROR_HASH:=b0f6ee3bc8e63e8408338c6ff4f214f2f83997a57802062401bdc82931ba9b73 -PKG_SOURCE_DATE:=2021-04-03 -PKG_SOURCE_VERSION:=64e00d6db4c3fc98ec3e8526072abadb7ed9ec0e +PKG_MIRROR_HASH:=7c443cac02a734dd312c65618f4de17248d188317f30a9fac192c1503b3d5c05 +PKG_SOURCE_DATE:=2021-05-14 +PKG_SOURCE_VERSION:=6a6011df3429ffa5958d12b1327eeda4fd9daa47 CMAKE_INSTALL:=1 PKG_BUILD_DEPENDS:=ustream-ssl diff --git a/package/network/config/netifd/Makefile b/package/network/config/netifd/Makefile index 7d916b6939..7a05abb651 100644 --- a/package/network/config/netifd/Makefile +++ b/package/network/config/netifd/Makefile @@ -1,13 +1,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=netifd -PKG_RELEASE:=3 +PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(PROJECT_GIT)/project/netifd.git -PKG_SOURCE_DATE:=2021-04-03 -PKG_SOURCE_VERSION:=327da9895327bc56b23413ee91a6e6b6e0e4329d -PKG_MIRROR_HASH:=b6b005686aeb45948299113c71f6b806ece794db361594b23e03953c9c830af6 +PKG_SOURCE_DATE:=2021-05-18 +PKG_SOURCE_VERSION:=7277764bf8173d6961acbacfe31757c9195329e1 +PKG_MIRROR_HASH:=bf3549594dccda31bb9da831823b931ba7cb85e1a60ec6432ed6c09f3ea54510 PKG_MAINTAINER:=Felix Fietkau PKG_LICENSE:=GPL-2.0 diff --git a/package/network/services/hostapd/files/hostapd.sh b/package/network/services/hostapd/files/hostapd.sh index 6d279b3db1..75906f58be 100644 --- a/package/network/services/hostapd/files/hostapd.sh +++ b/package/network/services/hostapd/files/hostapd.sh @@ -268,7 +268,7 @@ hostapd_common_add_bss_config() { config_add_array domain_match domain_match2 domain_suffix_match domain_suffix_match2 config_add_string ieee80211w_mgmt_cipher - config_add_int dynamic_vlan vlan_naming + config_add_int dynamic_vlan vlan_naming vlan_no_bridge config_add_string vlan_tagged_interface vlan_bridge config_add_string vlan_file @@ -858,13 +858,17 @@ hostapd_set_bss_options() { } [ -n "$vlan_possible" -a -n "$dynamic_vlan" ] && { - json_get_vars vlan_naming vlan_tagged_interface vlan_bridge vlan_file + json_get_vars vlan_naming vlan_tagged_interface vlan_bridge vlan_file vlan_no_bridge set_default vlan_naming 1 [ -z "$vlan_file" ] && set_default vlan_file /var/run/hostapd-$ifname.vlan append bss_conf "dynamic_vlan=$dynamic_vlan" "$N" append bss_conf "vlan_naming=$vlan_naming" "$N" - [ -n "$vlan_bridge" ] && \ + if [ -n "$vlan_bridge" ]; then append bss_conf "vlan_bridge=$vlan_bridge" "$N" + else + set_default vlan_no_bridge 1 + fi + append bss_conf "vlan_no_bridge=$vlan_no_bridge" "$N" [ -n "$vlan_tagged_interface" ] && \ append bss_conf "vlan_tagged_interface=$vlan_tagged_interface" "$N" [ -n "$vlan_file" ] && { diff --git a/package/network/services/hostapd/patches/600-ubus_support.patch b/package/network/services/hostapd/patches/600-ubus_support.patch index 938840755a..0d1cb2c3e4 100644 --- a/package/network/services/hostapd/patches/600-ubus_support.patch +++ b/package/network/services/hostapd/patches/600-ubus_support.patch @@ -424,3 +424,41 @@ } +--- a/src/ap/vlan_init.c ++++ b/src/ap/vlan_init.c +@@ -22,6 +22,7 @@ + static int vlan_if_add(struct hostapd_data *hapd, struct hostapd_vlan *vlan, + int existsok) + { ++ bool vlan_exists = iface_exists(vlan->ifname); + int ret; + #ifdef CONFIG_WEP + int i; +@@ -36,7 +37,7 @@ static int vlan_if_add(struct hostapd_da + } + #endif /* CONFIG_WEP */ + +- if (!iface_exists(vlan->ifname)) ++ if (!vlan_exists) + ret = hostapd_vlan_if_add(hapd, vlan->ifname); + else if (!existsok) + return -1; +@@ -51,6 +52,9 @@ static int vlan_if_add(struct hostapd_da + if (hapd->wpa_auth) + ret = wpa_auth_ensure_group(hapd->wpa_auth, vlan->vlan_id); + ++ if (!ret && !vlan_exists) ++ hostapd_ubus_add_vlan(hapd, vlan); ++ + if (ret == 0) + return ret; + +@@ -77,6 +81,8 @@ int vlan_if_remove(struct hostapd_data * + "WPA deinitialization for VLAN %d failed (%d)", + vlan->vlan_id, ret); + ++ hostapd_ubus_remove_vlan(hapd, vlan); ++ + return hostapd_vlan_if_remove(hapd, vlan->ifname); + } + diff --git a/package/network/services/hostapd/patches/700-wifi-reload.patch b/package/network/services/hostapd/patches/700-wifi-reload.patch index d5520d0b77..b68c1aaa9d 100644 --- a/package/network/services/hostapd/patches/700-wifi-reload.patch +++ b/package/network/services/hostapd/patches/700-wifi-reload.patch @@ -174,7 +174,7 @@ hostapd_alloc_bss_data(struct hostapd_iface *hapd_iface, --- a/src/drivers/driver_nl80211.c +++ b/src/drivers/driver_nl80211.c -@@ -4493,6 +4493,9 @@ static int wpa_driver_nl80211_set_ap(voi +@@ -4511,6 +4511,9 @@ static int wpa_driver_nl80211_set_ap(voi if (ret) { wpa_printf(MSG_DEBUG, "nl80211: Beacon set failed: %d (%s)", ret, strerror(-ret)); diff --git a/package/network/services/hostapd/patches/710-vlan_no_bridge.patch b/package/network/services/hostapd/patches/710-vlan_no_bridge.patch new file mode 100644 index 0000000000..7de4e2c1d4 --- /dev/null +++ b/package/network/services/hostapd/patches/710-vlan_no_bridge.patch @@ -0,0 +1,33 @@ +--- a/src/ap/ap_config.h ++++ b/src/ap/ap_config.h +@@ -115,6 +115,7 @@ struct hostapd_ssid { + #define DYNAMIC_VLAN_OPTIONAL 1 + #define DYNAMIC_VLAN_REQUIRED 2 + int dynamic_vlan; ++ int vlan_no_bridge; + #define DYNAMIC_VLAN_NAMING_WITHOUT_DEVICE 0 + #define DYNAMIC_VLAN_NAMING_WITH_DEVICE 1 + #define DYNAMIC_VLAN_NAMING_END 2 +--- a/src/ap/vlan_full.c ++++ b/src/ap/vlan_full.c +@@ -466,6 +466,9 @@ void vlan_newlink(const char *ifname, st + + wpa_printf(MSG_DEBUG, "VLAN: vlan_newlink(%s)", ifname); + ++ if (hapd->conf->ssid.vlan_no_bridge) ++ return; ++ + for (vlan = hapd->conf->vlan; vlan; vlan = vlan->next) { + if (vlan->configured || + os_strcmp(ifname, vlan->ifname) != 0) +--- a/hostapd/config_file.c ++++ b/hostapd/config_file.c +@@ -3400,6 +3400,8 @@ static int hostapd_config_fill(struct ho + #ifndef CONFIG_NO_VLAN + } else if (os_strcmp(buf, "dynamic_vlan") == 0) { + bss->ssid.dynamic_vlan = atoi(pos); ++ } else if (os_strcmp(buf, "vlan_no_bridge") == 0) { ++ bss->ssid.vlan_no_bridge = atoi(pos); + } else if (os_strcmp(buf, "per_sta_vif") == 0) { + bss->ssid.per_sta_vif = atoi(pos); + } else if (os_strcmp(buf, "vlan_file") == 0) { diff --git a/package/network/services/hostapd/src/src/ap/ubus.c b/package/network/services/hostapd/src/src/ap/ubus.c index d03b848f94..a34695f36a 100644 --- a/package/network/services/hostapd/src/src/ap/ubus.c +++ b/package/network/services/hostapd/src/src/ap/ubus.c @@ -1364,6 +1364,43 @@ void hostapd_ubus_free_bss(struct hostapd_data *hapd) free(name); } +static void +hostapd_ubus_vlan_action(struct hostapd_data *hapd, struct hostapd_vlan *vlan, + const char *action) +{ + struct vlan_description *desc = &vlan->vlan_desc; + void *c; + int i; + + if (!hapd->ubus.obj.has_subscribers) + return; + + blob_buf_init(&b, 0); + blobmsg_add_string(&b, "ifname", vlan->ifname); + blobmsg_add_string(&b, "bridge", vlan->bridge); + blobmsg_add_u32(&b, "vlan_id", vlan->vlan_id); + + if (desc->notempty) { + blobmsg_add_u32(&b, "untagged", desc->untagged); + c = blobmsg_open_array(&b, "tagged"); + for (i = 0; i < ARRAY_SIZE(desc->tagged) && desc->tagged[i]; i++) + blobmsg_add_u32(&b, "", desc->tagged[i]); + blobmsg_close_array(&b, c); + } + + ubus_notify(ctx, &hapd->ubus.obj, action, b.head, -1); +} + +void hostapd_ubus_add_vlan(struct hostapd_data *hapd, struct hostapd_vlan *vlan) +{ + hostapd_ubus_vlan_action(hapd, vlan, "vlan_add"); +} + +void hostapd_ubus_remove_vlan(struct hostapd_data *hapd, struct hostapd_vlan *vlan) +{ + hostapd_ubus_vlan_action(hapd, vlan, "vlan_remove"); +} + static const struct ubus_method daemon_methods[] = { UBUS_METHOD("config_add", hostapd_config_add, config_add_policy), UBUS_METHOD("config_remove", hostapd_config_remove, config_remove_policy), diff --git a/package/network/services/hostapd/src/src/ap/ubus.h b/package/network/services/hostapd/src/src/ap/ubus.h index e16017394f..de0d1182fd 100644 --- a/package/network/services/hostapd/src/src/ap/ubus.h +++ b/package/network/services/hostapd/src/src/ap/ubus.h @@ -43,6 +43,8 @@ void hostapd_ubus_add_iface(struct hostapd_iface *iface); void hostapd_ubus_free_iface(struct hostapd_iface *iface); void hostapd_ubus_add_bss(struct hostapd_data *hapd); void hostapd_ubus_free_bss(struct hostapd_data *hapd); +void hostapd_ubus_add_vlan(struct hostapd_data *hapd, struct hostapd_vlan *vlan); +void hostapd_ubus_remove_vlan(struct hostapd_data *hapd, struct hostapd_vlan *vlan); int hostapd_ubus_handle_event(struct hostapd_data *hapd, struct hostapd_ubus_request *req); void hostapd_ubus_notify(struct hostapd_data *hapd, const char *type, const u8 *mac); diff --git a/package/network/services/umdns/Makefile b/package/network/services/umdns/Makefile index 9a5f46a705..a25233ad5a 100644 --- a/package/network/services/umdns/Makefile +++ b/package/network/services/umdns/Makefile @@ -12,9 +12,9 @@ PKG_RELEASE:=$(AUTORELEASE) PKG_SOURCE_URL=$(PROJECT_GIT)/project/mdnsd.git PKG_SOURCE_PROTO:=git -PKG_SOURCE_DATE:=2021-01-26 -PKG_SOURCE_VERSION:=78aa36b0e9808e801c527c6dc47320e593309522 -PKG_MIRROR_HASH:=241833f2bf2f3366f356703159be386862ef747d9b253af6c13555f252cc970d +PKG_SOURCE_DATE:=2021-05-13 +PKG_SOURCE_VERSION:=b777a0b53f7d89ab2a60e3eed7d98036806da9a4 +PKG_MIRROR_HASH:=54992acf7edd32610de7bcb0ea7c58b20f69bf1ac20be69e76abcff41f25e775 PKG_MAINTAINER:=John Crispin PKG_LICENSE:=LGPL-2.1 diff --git a/package/system/fstools/Makefile b/package/system/fstools/Makefile index 5331f0ba28..d9009c4365 100644 --- a/package/system/fstools/Makefile +++ b/package/system/fstools/Makefile @@ -12,9 +12,9 @@ PKG_RELEASE:=$(AUTORELEASE) PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(PROJECT_GIT)/project/fstools.git -PKG_MIRROR_HASH:=c9a5647f69dd17ce9d7cd535c9e58055171f7f4af73d2985567ccfc18a2be97f -PKG_SOURCE_DATE:=2021-03-19 -PKG_SOURCE_VERSION:=964d1e3af0e111bad6d393f8a3be702e334c2398 +PKG_MIRROR_HASH:=41c9c51d193f5150db67fcd898b6ea904b88476c94cdfd021d81e2711441b430 +PKG_SOURCE_DATE:=2021-05-16 +PKG_SOURCE_VERSION:=3d40a1b591cd569f95891116cd033b496de0f92b CMAKE_INSTALL:=1 PKG_LICENSE:=GPL-2.0 diff --git a/package/system/openwrt-keyring/Makefile b/package/system/openwrt-keyring/Makefile index 6f3aa65622..318d42cf92 100644 --- a/package/system/openwrt-keyring/Makefile +++ b/package/system/openwrt-keyring/Makefile @@ -3,7 +3,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=openwrt-keyring -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(PROJECT_GIT)/keyring.git @@ -32,7 +32,8 @@ Build/Compile= define Package/openwrt-keyring/install $(INSTALL_DIR) $(1)/etc/opkg/keys/ - $(INSTALL_DATA) $(PKG_BUILD_DIR)/usign/* $(1)/etc/opkg/keys/ + # Public usign key for unattended snapshot builds + $(INSTALL_DATA) $(PKG_BUILD_DIR)/usign/b5043e70f9a75cde $(1)/etc/opkg/keys/ endef $(eval $(call BuildPackage,openwrt-keyring)) diff --git a/target/linux/ath79/dts/ar9330_ziking_cpe46b.dts b/target/linux/ath79/dts/ar9330_ziking_cpe46b.dts new file mode 100644 index 0000000000..19a7390977 --- /dev/null +++ b/target/linux/ath79/dts/ar9330_ziking_cpe46b.dts @@ -0,0 +1,103 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "ar9330.dtsi" + +#include +#include + +/ { + model = "ZiKing CPE46B"; + compatible = "ziking,cpe46b", "qca,ar9330"; + + aliases { + label-mac-device = ð0; + }; + + leds { + compatible = "gpio-leds"; + + wlan { + label = "green:wlan"; + gpios = <&gpio 0 GPIO_ACTIVE_HIGH>; + linux,default-trigger = "phy0tpt"; + }; + + rssi1 { + label = "green:rssi1"; + gpios = <&gpio 20 GPIO_ACTIVE_HIGH>; + }; + + rssi2 { + label = "green:rssi2"; + gpios = <&gpio 23 GPIO_ACTIVE_HIGH>; + }; + }; + + keys { + compatible = "gpio-keys"; + + reset { + label = "reset"; + linux,code = ; + gpios = <&gpio 12 GPIO_ACTIVE_LOW>; + }; + }; +}; + +&spi { + status = "okay"; + + flash@0 { + compatible = "jedec,spi-nor"; + spi-max-frequency = <50000000>; + reg = <0>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "u-boot"; + reg = <0x000000 0x010000>; + read-only; + }; + + partition@10000 { + label = "u-boot-env"; + reg = <0x010000 0x010000>; + }; + + partition@20000 { + compatible = "denx,uimage"; + label = "firmware"; + reg = <0x020000 0x7d0000>; + }; + + art: partition@7f0000 { + label = "art"; + reg = <0x7f0000 0x010000>; + read-only; + }; + }; + }; +}; + +ð0 { + status = "okay"; + + mtd-mac-address = <&art 0x0>; +}; + +ð1 { + status = "okay"; + + mtd-mac-address = <&art 0x0>; + mtd-mac-address-increment = <2>; +}; + +&wmac { + status = "okay"; + + mtd-cal-data = <&art 0x1000>; +}; diff --git a/target/linux/ath79/dts/qca9563_comfast_cf-e375ac.dts b/target/linux/ath79/dts/qca9563_comfast_cf-e375ac.dts new file mode 100644 index 0000000000..1eeb02f7f9 --- /dev/null +++ b/target/linux/ath79/dts/qca9563_comfast_cf-e375ac.dts @@ -0,0 +1,137 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "qca956x.dtsi" + +#include +#include + +/ { + model = "COMFAST CF-E375AC"; + compatible = "comfast,cf-e375ac", "qca,qca9563"; + + aliases { + label-mac-device = ð0; + led-boot = &led_lan; + led-failsafe = &led_lan; + led-running = &led_lan; + led-upgrade = &led_lan; + }; + + leds { + compatible = "gpio-leds"; + + led_lan: lan { + label = "green:lan"; + gpios = <&gpio 17 GPIO_ACTIVE_HIGH>; + }; + + wan { + label = "red:wan"; + gpios = <&gpio 15 GPIO_ACTIVE_HIGH>; + }; + + wlan2g { + label = "blue:wlan2g"; + gpios = <&gpio 16 GPIO_ACTIVE_HIGH>; + linux,default-trigger = "phy1tpt"; + }; + }; + + keys { + compatible = "gpio-keys"; + + reset { + linux,code = ; + gpios = <&gpio 2 GPIO_ACTIVE_LOW>; + debounce-interval = <60>; + }; + }; + + watchdog { + compatible = "linux,wdt-gpio"; + + gpios = <&gpio 6 GPIO_ACTIVE_HIGH>; + hw_algo = "toggle"; + hw_margin_ms = <500>; + always-running; + }; +}; + +&pcie { + status = "okay"; +}; + +&spi { + status = "okay"; + + flash@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <25000000>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "u-boot"; + reg = <0x000000 0x040000>; + read-only; + }; + + art: partition@40000 { + label = "art"; + reg = <0x040000 0x010000>; + read-only; + }; + + partition@50000 { + compatible = "denx,uimage"; + label = "firmware"; + reg = <0x050000 0xfa0000>; + }; + + partition@ff0000 { + label = "art-backup"; + reg = <0xff0000 0x010000>; + read-only; + }; + }; + }; +}; + +&mdio0 { + status = "okay"; + + phy-mask = <0>; + + phy0: ethernet-phy@0 { + reg = <0>; + phy-mode = "sgmii"; + qca,mib-poll-interval = <500>; + + qca,ar8327-initvals = < + 0x04 0x00080080 /* PORT0 PAD MODE CTRL */ + 0x7c 0x0000007e /* PORT0_STATUS */ + >; + }; +}; + +ð0 { + status = "okay"; + + pll-data = <0x03000101 0x00000101 0x00001919>; + + phy-mode = "sgmii"; + mtd-mac-address = <&art 0x0>; + phy-handle = <&phy0>; +}; + +&wmac { + status = "okay"; + + mtd-cal-data = <&art 0x1000>; + mtd-mac-address = <&art 0x0>; + mtd-mac-address-increment = <10>; +}; diff --git a/target/linux/ath79/generic/base-files/etc/board.d/01_leds b/target/linux/ath79/generic/base-files/etc/board.d/01_leds index df2d4bf09b..b79c8f01db 100644 --- a/target/linux/ath79/generic/base-files/etc/board.d/01_leds +++ b/target/linux/ath79/generic/base-files/etc/board.d/01_leds @@ -85,8 +85,8 @@ avm,fritzdvbc) ;; buffalo,wzr-hp-g300nh-rb|\ buffalo,wzr-hp-g300nh-s) - ucidef_set_led_netdev "router" "Router" "green:router" "eth1" - ;; + ucidef_set_led_netdev "router" "Router" "green:router" "eth1" + ;; comfast,cf-e110n-v2) ucidef_set_led_netdev "lan" "LAN" "green:lan" "eth1" ucidef_set_led_switch "wan" "WAN" "green:wan" "switch0" "0x02" @@ -132,6 +132,10 @@ comfast,cf-e314n-v2) ucidef_set_led_rssi "rssimediumhigh" "RSSIMEDIUMHIGH" "green:rssimediumhigh" "wlan0" "51" "100" ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "green:rssihigh" "wlan0" "76" "100" ;; +comfast,cf-e375ac) + ucidef_set_led_switch "lan" "LAN" "green:lan" "switch0" "0x04" + ucidef_set_led_switch "wan" "WAN" "red:wan" "switch0" "0x02" + ;; comfast,cf-e5) ucidef_set_led_switch "lan" "LAN" "blue:lan" "switch0" "0x02" ucidef_set_led_netdev "wan" "WAN" "blue:wan" "eth1" diff --git a/target/linux/ath79/generic/base-files/etc/board.d/02_network b/target/linux/ath79/generic/base-files/etc/board.d/02_network index cf21919e2d..fa2aa3a4ea 100644 --- a/target/linux/ath79/generic/base-files/etc/board.d/02_network +++ b/target/linux/ath79/generic/base-files/etc/board.d/02_network @@ -186,6 +186,10 @@ ath79_setup_interfaces() ubnt,routerstation) ucidef_set_interfaces_lan_wan "eth1" "eth0" ;; + comfast,cf-e375ac) + ucidef_add_switch "switch0" \ + "0@eth0" "1:wan" "2:lan" + ;; comfast,cf-e560ac) ucidef_set_interface_wan "eth1" ucidef_add_switch "switch0" \ @@ -488,6 +492,9 @@ ath79_setup_macs() lan_mac=$(fritz_tffs -n maca -i $(find_mtd_part "tffs (1)")) wan_mac=$(fritz_tffs -n macb -i $(find_mtd_part "tffs (1)")) ;; + comfast,cf-e375ac) + wan_mac=$(macaddr_add $(mtd_get_mac_binary art 0x0) 1) + ;; compex,wpj344-16m|\ compex,wpj563) wan_mac=$(mtd_get_mac_binary u-boot 0x2e018) diff --git a/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata b/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata index 2b2c43cf63..95c398157b 100644 --- a/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata +++ b/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata @@ -173,6 +173,7 @@ case "$FIRMWARE" in /lib/firmware/ath10k/QCA9888/hw2.0/board.bin rm /lib/firmware/ath10k/QCA9888/hw2.0/board-2.bin ;; + comfast,cf-e375ac|\ comfast,cf-e560ac|\ comfast,cf-ew72|\ comfast,cf-wr752ac-v1) diff --git a/target/linux/ath79/image/Makefile b/target/linux/ath79/image/Makefile index d8b8800d91..3c126f479e 100644 --- a/target/linux/ath79/image/Makefile +++ b/target/linux/ath79/image/Makefile @@ -70,6 +70,10 @@ define Device/Default BLOCKSIZE := 64k KERNEL := kernel-bin | append-dtb | lzma | uImage lzma KERNEL_INITRAMFS := kernel-bin | append-dtb | lzma | uImage lzma + LOADER_KERNEL_MAGIC := + LOADER_FLASH_MAX := + LOADER_FLASH_OFFS := + LOADER_TYPE := COMPILE := IMAGES := sysupgrade.bin IMAGE/sysupgrade.bin = append-kernel | pad-to $$$$(BLOCKSIZE) | \ diff --git a/target/linux/ath79/image/generic.mk b/target/linux/ath79/image/generic.mk index 510c8f87ee..bf3961f139 100644 --- a/target/linux/ath79/image/generic.mk +++ b/target/linux/ath79/image/generic.mk @@ -580,6 +580,16 @@ define Device/comfast_cf-e314n-v2 endef TARGET_DEVICES += comfast_cf-e314n-v2 +define Device/comfast_cf-e375ac + SOC := qca9563 + DEVICE_VENDOR := COMFAST + DEVICE_MODEL := CF-E375AC + DEVICE_PACKAGES := kmod-ath10k-ct \ + ath10k-firmware-qca9888-ct -uboot-envtools + IMAGE_SIZE := 16000k +endef +TARGET_DEVICES += comfast_cf-e375ac + define Device/comfast_cf-e5 SOC := qca9531 DEVICE_VENDOR := COMFAST @@ -2263,6 +2273,15 @@ define Device/yuncore_xd4200 endef TARGET_DEVICES += yuncore_xd4200 +define Device/ziking_cpe46b + SOC := ar9330 + DEVICE_VENDOR := ZiKing + DEVICE_MODEL := CPE46B + IMAGE_SIZE := 8000k + DEVICE_PACKAGES := kmod-i2c-gpio +endef +TARGET_DEVICES += ziking_cpe46b + define Device/zbtlink_zbt-wd323 SOC := ar9344 DEVICE_VENDOR := ZBT diff --git a/target/linux/bmips/patches-5.10/041-v5.13-mtd-rawnand-brcmnand-fix-OOB-R-W-with-Hamming-ECC.patch b/target/linux/bmips/patches-5.10/041-v5.13-mtd-rawnand-brcmnand-fix-OOB-R-W-with-Hamming-ECC.patch deleted file mode 100644 index 00669843d8..0000000000 --- a/target/linux/bmips/patches-5.10/041-v5.13-mtd-rawnand-brcmnand-fix-OOB-R-W-with-Hamming-ECC.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 095b4dabff2a929cefd330110c5c578956213188 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= -Date: Wed, 24 Feb 2021 09:02:10 +0100 -Subject: [PATCH] mtd: rawnand: brcmnand: fix OOB R/W with Hamming ECC -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Hamming ECC doesn't cover the OOB data, so reading or writing OOB shall -always be done without ECC enabled. -This is a problem when adding JFFS2 cleanmarkers to erased blocks. If JFFS2 -clenmarkers are added to the OOB with ECC enabled, OOB bytes will be changed -from ff ff ff to 00 00 00, reporting incorrect ECC errors. - -Fixes: 27c5b17cd1b1 ("mtd: nand: add NAND driver "library" for Broadcom STB NAND controller") -Signed-off-by: Álvaro Fernández Rojas -Acked-by: Brian Norris -Signed-off-by: Miquel Raynal -Link: https://lore.kernel.org/linux-mtd/20210224080210.23686-1-noltari@gmail.com ---- - drivers/mtd/nand/raw/brcmnand/brcmnand.c | 6 ++++++ - 1 file changed, 6 insertions(+) - ---- a/drivers/mtd/nand/raw/brcmnand/brcmnand.c -+++ b/drivers/mtd/nand/raw/brcmnand/brcmnand.c -@@ -2694,6 +2694,12 @@ static int brcmnand_attach_chip(struct n - chip->ecc.read_oob = brcmnand_read_oob_raw; - } - -+ /* If OOB is written with ECC enabled it will cause ECC errors */ -+ if (is_hamming_ecc(host->ctrl, &host->hwcfg)) { -+ chip->ecc.write_oob = brcmnand_write_oob_raw; -+ chip->ecc.read_oob = brcmnand_read_oob_raw; -+ } -+ - return ret; - } - diff --git a/target/linux/octeon/base-files/etc/board.d/01_network b/target/linux/octeon/base-files/etc/board.d/01_network index e62d3c28bf..194faeaad9 100644 --- a/target/linux/octeon/base-files/etc/board.d/01_network +++ b/target/linux/octeon/base-files/etc/board.d/01_network @@ -13,6 +13,9 @@ itus,shield-router) ubnt,edgerouter-4) ucidef_set_interfaces_lan_wan "lan1 lan2 lan3" "lan0" ;; +ubnt,edgerouter-6p) + ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4 lan5" "lan0" + ;; *) ucidef_set_interfaces_lan_wan "eth0" "eth1" ;; diff --git a/target/linux/octeon/base-files/lib/preinit/79_move_config b/target/linux/octeon/base-files/lib/preinit/79_move_config index 5a84e6f18a..ae155a3c5c 100644 --- a/target/linux/octeon/base-files/lib/preinit/79_move_config +++ b/target/linux/octeon/base-files/lib/preinit/79_move_config @@ -21,7 +21,8 @@ octeon_move_config() { itus,shield-router) move_config "/dev/mmcblk1p1" ;; - ubnt,edgerouter-4) + ubnt,edgerouter-4 | \ + ubnt,edgerouter-6p) move_config "/dev/mmcblk0p1" ;; esac diff --git a/target/linux/octeon/base-files/lib/upgrade/platform.sh b/target/linux/octeon/base-files/lib/upgrade/platform.sh index ad5baef4a1..84533d642a 100755 --- a/target/linux/octeon/base-files/lib/upgrade/platform.sh +++ b/target/linux/octeon/base-files/lib/upgrade/platform.sh @@ -1,5 +1,5 @@ # -# Copyright (C) 2014 OpenWrt.org +# Copyright (C) 2021 OpenWrt.org # platform_get_rootfs() { @@ -17,22 +17,25 @@ platform_get_rootfs() { fi } +platform_copy_config_helper() { + local device=$1 + + mount -t vfat "$device" /mnt + cp -af "$UPGRADE_BACKUP" "/mnt/$BACKUP_FILE" + umount /mnt +} + platform_copy_config() { case "$(board_name)" in erlite) - mount -t vfat /dev/sda1 /mnt - cp -af "$UPGRADE_BACKUP" "/mnt/$BACKUP_FILE" - umount /mnt + platform_copy_config_helper /dev/sda1 ;; itus,shield-router) - mount -t vfat /dev/mmcblk1p1 /mnt - cp -af "$UPGRADE_BACKUP" "/mnt/$BACKUP_FILE" - umount /mnt + platform_copy_config_helper /dev/mmcblk1p1 ;; - ubnt,edgerouter-4) - mount -t vfat /dev/mmcblk0p1 /mnt - cp -af "$UPGRADE_BACKUP" "/mnt/$BACKUP_FILE" - umount /mnt + ubnt,edgerouter-4|\ + ubnt,edgerouter-6p) + platform_copy_config_helper /dev/mmcblk0p1 ;; esac } @@ -84,7 +87,8 @@ platform_do_upgrade() { [ -b "${rootfs}" ] || return 1 case "$board" in er | \ - ubnt,edgerouter-4) + ubnt,edgerouter-4 | \ + ubnt,edgerouter-6p) kernel=mmcblk0p1 ;; erlite) @@ -114,7 +118,8 @@ platform_check_image() { er | \ erlite | \ itus,shield-router | \ - ubnt,edgerouter-4) + ubnt,edgerouter-4 | \ + ubnt,edgerouter-6p) 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 ] && { diff --git a/target/linux/octeon/files/arch/mips/boot/dts/cavium-octeon/cn7130_ubnt_edgerouter-4.dts b/target/linux/octeon/files/arch/mips/boot/dts/cavium-octeon/cn7130_ubnt_edgerouter-4.dts index a89455c613..d8dabfc370 100644 --- a/target/linux/octeon/files/arch/mips/boot/dts/cavium-octeon/cn7130_ubnt_edgerouter-4.dts +++ b/target/linux/octeon/files/arch/mips/boot/dts/cavium-octeon/cn7130_ubnt_edgerouter-4.dts @@ -1,180 +1,14 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT -#include "cn71xx.dtsi" - -#include -#include +#include "cn7130_ubnt_edgerouter-e300.dtsi" / { compatible = "ubnt,edgerouter-4", "cavium,cn7130"; model = "Ubiquiti EdgeRouter 4"; - - aliases { - /* White + Blinking Blue */ - led-boot = &led_power_white; - /* Blue + Blinking White */ - led-failsafe = &led_power_blue; - /* Constant Blue */ - led-running = &led_power_blue; - /* Blue + Blinking White */ - led-upgrade = &led_power_blue; - }; - - memory@0 { - device_type = "memory"; - reg = <0x0 0x00000000>, - <0x0 0x10000000>, - <0x0 0x20000000>, - <0x0 0x30000000>; - }; - - leds { - compatible = "gpio-leds"; - - led_power_blue: power_blue { - label = "blue:power"; - gpios = <&gpio 15 GPIO_ACTIVE_LOW>; - }; - - led_power_white: power_white { - label = "white:power"; - gpios = <&gpio 17 GPIO_ACTIVE_LOW>; - }; - }; - - keys { - compatible = "gpio-keys-polled"; - poll-interval = <20>; - - reset { - label = "reset"; - linux,code = ; - gpios = <&gpio 11 GPIO_ACTIVE_LOW>; - debounce-interval = <60>; - }; - }; - - sfp: sfp { - compatible = "sff,sfp"; - i2c-bus = <&twsi0>; - /* Pins 12, 13 and 14 gets pulled low when SFP is plugged in */ - mod-def0-gpio = <&gpio 12 GPIO_ACTIVE_LOW>; - }; -}; - -&uart0 { - status = "okay"; -}; - -&usb0 { - status = "okay"; -}; - -&xhci0 { - status = "okay"; - dr_mode = "host"; -}; - -&twsi0 { - status = "okay"; - - sfp_eeprom@50 { - compatible = "at,24c04"; - reg = <0x50>; - }; - - sfp_eeprom@51 { - compatible = "at,24c04"; - reg = <0x51>; - }; -}; - -&spi { - status = "okay"; - - flash@0 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "Macronix,mx25l6405d", "spi-flash"; - reg = <0>; - spi-max-frequency = <25000000>; - - partition@0 { - label = "boot0"; - read-only; - reg = <0x000000 0x300000>; - }; - - partition@300000 { - label = "dummy"; - read-only; - reg = <0x300000 0x100000>; - }; - - eeprom: partition@400000 { - label = "eeprom"; - read-only; - reg = <0x400000 0x10000>; - }; - }; -}; - -&mmc { - status = "okay"; - - mmc-slot@0 { - compatible = "mmc-slot"; - reg = <0>; - non-removable; - max-frequency = <26000000>; - voltage-ranges = <3300 3300>; - bus-width = <8>; - }; -}; - -&smi0 { - status = "okay"; - - phy4: ethernet-phy@4 { - device_type = "ethernet-phy"; - interrupts = <17 8>; - interrupt-parent = <&gpio>; - compatible = "vitesse,vsc8504", "ethernet-phy-ieee802.3-c22"; - reg = <4>; - sfp = <&sfp>; - }; - - phy5: ethernet-phy@5 { - device_type = "ethernet-phy"; - interrupts = <17 8>; - interrupt-parent = <&gpio>; - compatible = "vitesse,vsc8504", "ethernet-phy-ieee802.3-c22"; - reg = <5>; - }; - - phy6: ethernet-phy@6 { - device_type = "ethernet-phy"; - interrupts = <17 8>; - interrupt-parent = <&gpio>; - compatible = "vitesse,vsc8504", "ethernet-phy-ieee802.3-c22"; - reg = <6>; - }; - - phy7: ethernet-phy@7 { - device_type = "ethernet-phy"; - interrupts = <17 8>; - interrupt-parent = <&gpio>; - compatible = "vitesse,vsc8504", "ethernet-phy-ieee802.3-c22"; - reg = <7>; - }; }; &pip { - status = "okay"; - interface@0 { - status = "okay"; - ethernet@0 { label = "lan3"; status = "okay"; @@ -182,32 +16,5 @@ phy-handle = <&phy4>; mtd-mac-address = <&eeprom 0>; }; - - ethernet@1 { - label = "lan0"; - status = "okay"; - phy-mode = "sgmii"; - phy-handle = <&phy5>; - mtd-mac-address = <&eeprom 0>; - mtd-mac-address-increment = <(1)>; - }; - - ethernet@2 { - label = "lan1"; - status = "okay"; - phy-mode = "sgmii"; - phy-handle = <&phy6>; - mtd-mac-address = <&eeprom 0>; - mtd-mac-address-increment = <(2)>; - }; - - ethernet@3 { - label = "lan2"; - status = "okay"; - phy-mode = "sgmii"; - phy-handle = <&phy7>; - mtd-mac-address = <&eeprom 0>; - mtd-mac-address-increment = <(3)>; - }; }; }; diff --git a/target/linux/octeon/files/arch/mips/boot/dts/cavium-octeon/cn7130_ubnt_edgerouter-6p.dts b/target/linux/octeon/files/arch/mips/boot/dts/cavium-octeon/cn7130_ubnt_edgerouter-6p.dts new file mode 100644 index 0000000000..7d31885928 --- /dev/null +++ b/target/linux/octeon/files/arch/mips/boot/dts/cavium-octeon/cn7130_ubnt_edgerouter-6p.dts @@ -0,0 +1,60 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "cn7130_ubnt_edgerouter-e300.dtsi" + +/ { + compatible = "ubnt,edgerouter-6p", "cavium,cn7130"; + model = "Ubiquiti EdgeRouter 6P"; +}; + +&smi0 { + phy8: ethernet-phy@8 { + device_type = "ethernet-phy"; + interrupts = <17 8>; + interrupt-parent = <&gpio>; + compatible = "vitesse,vsc8514", "ethernet-phy-ieee802.3-c22"; + reg = <8>; + }; + + phy9: ethernet-phy@9 { + device_type = "ethernet-phy"; + interrupts = <17 8>; + interrupt-parent = <&gpio>; + compatible = "vitesse,vsc8514", "ethernet-phy-ieee802.3-c22"; + reg = <9>; + }; +}; + +&pip { + interface@0 { + ethernet@0 { + label = "lan5"; + status = "okay"; + phy-mode = "sgmii"; + phy-handle = <&phy4>; + mtd-mac-address = <&eeprom 0>; + }; + }; + + interface@1 { + status = "okay"; + + ethernet@0 { + label = "lan3"; + status = "okay"; + phy-mode = "sgmii"; + phy-handle = <&phy8>; + mtd-mac-address = <&eeprom 0>; + mtd-mac-address-increment = <(4)>; + }; + + ethernet@1 { + label = "lan4"; + status = "okay"; + phy-mode = "sgmii"; + phy-handle = <&phy9>; + mtd-mac-address = <&eeprom 0>; + mtd-mac-address-increment = <(5)>; + }; + }; +}; diff --git a/target/linux/octeon/files/arch/mips/boot/dts/cavium-octeon/cn7130_ubnt_edgerouter-e300.dtsi b/target/linux/octeon/files/arch/mips/boot/dts/cavium-octeon/cn7130_ubnt_edgerouter-e300.dtsi new file mode 100644 index 0000000000..7d4c7f0de9 --- /dev/null +++ b/target/linux/octeon/files/arch/mips/boot/dts/cavium-octeon/cn7130_ubnt_edgerouter-e300.dtsi @@ -0,0 +1,205 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "cn71xx.dtsi" + +#include +#include + +/ { + compatible = "ubnt,edgerouter-e300", "cavium,cn7130"; + model = "Ubiquiti EdgeRouter E300 series"; + + aliases { + /* White + Blinking Blue */ + led-boot = &led_power_white; + /* Blue + Blinking White */ + led-failsafe = &led_power_blue; + /* Constant Blue */ + led-running = &led_power_blue; + /* Blue + Blinking White */ + led-upgrade = &led_power_blue; + }; + + memory@0 { + device_type = "memory"; + reg = <0x0 0x00000000>, + <0x0 0x10000000>, + <0x0 0x20000000>, + <0x0 0x30000000>; + }; + + leds { + compatible = "gpio-leds"; + + led_power_blue: power_blue { + label = "blue:power"; + gpios = <&gpio 15 GPIO_ACTIVE_LOW>; + }; + + led_power_white: power_white { + label = "white:power"; + gpios = <&gpio 17 GPIO_ACTIVE_LOW>; + }; + }; + + keys { + compatible = "gpio-keys-polled"; + poll-interval = <20>; + + reset { + label = "reset"; + linux,code = ; + gpios = <&gpio 11 GPIO_ACTIVE_LOW>; + debounce-interval = <60>; + }; + }; + + sfp: sfp { + compatible = "sff,sfp"; + i2c-bus = <&twsi0>; + /* Pins 12, 13 and 14 gets pulled low when SFP is plugged in */ + mod-def0-gpio = <&gpio 12 GPIO_ACTIVE_LOW>; + }; +}; + +&uart0 { + status = "okay"; +}; + +&usb0 { + status = "okay"; +}; + +&xhci0 { + status = "okay"; + dr_mode = "host"; +}; + +&twsi0 { + status = "okay"; + + sfp_eeprom@50 { + compatible = "at,24c04"; + reg = <0x50>; + }; + + sfp_eeprom@51 { + compatible = "at,24c04"; + reg = <0x51>; + }; +}; + +&spi { + status = "okay"; + + flash@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "Macronix,mx25l6405d", "spi-flash"; + reg = <0>; + spi-max-frequency = <25000000>; + + partition@0 { + label = "boot0"; + read-only; + reg = <0x000000 0x300000>; + }; + + partition@300000 { + label = "dummy"; + read-only; + reg = <0x300000 0x100000>; + }; + + eeprom: partition@400000 { + label = "eeprom"; + read-only; + reg = <0x400000 0x10000>; + }; + }; +}; + +&mmc { + status = "okay"; + + mmc-slot@0 { + compatible = "mmc-slot"; + reg = <0>; + non-removable; + max-frequency = <26000000>; + voltage-ranges = <3300 3300>; + bus-width = <8>; + }; +}; + +&smi0 { + status = "okay"; + + phy4: ethernet-phy@4 { + device_type = "ethernet-phy"; + interrupts = <17 8>; + interrupt-parent = <&gpio>; + compatible = "vitesse,vsc8504", "ethernet-phy-ieee802.3-c22"; + reg = <4>; + sfp = <&sfp>; + }; + + phy5: ethernet-phy@5 { + device_type = "ethernet-phy"; + interrupts = <17 8>; + interrupt-parent = <&gpio>; + compatible = "vitesse,vsc8504", "ethernet-phy-ieee802.3-c22"; + reg = <5>; + }; + + phy6: ethernet-phy@6 { + device_type = "ethernet-phy"; + interrupts = <17 8>; + interrupt-parent = <&gpio>; + compatible = "vitesse,vsc8504", "ethernet-phy-ieee802.3-c22"; + reg = <6>; + }; + + phy7: ethernet-phy@7 { + device_type = "ethernet-phy"; + interrupts = <17 8>; + interrupt-parent = <&gpio>; + compatible = "vitesse,vsc8504", "ethernet-phy-ieee802.3-c22"; + reg = <7>; + }; +}; + +&pip { + status = "okay"; + + interface@0 { + status = "okay"; + + ethernet@1 { + label = "lan0"; + status = "okay"; + phy-mode = "sgmii"; + phy-handle = <&phy5>; + mtd-mac-address = <&eeprom 0>; + mtd-mac-address-increment = <(1)>; + }; + + ethernet@2 { + label = "lan1"; + status = "okay"; + phy-mode = "sgmii"; + phy-handle = <&phy6>; + mtd-mac-address = <&eeprom 0>; + mtd-mac-address-increment = <(2)>; + }; + + ethernet@3 { + label = "lan2"; + status = "okay"; + phy-mode = "sgmii"; + phy-handle = <&phy7>; + mtd-mac-address = <&eeprom 0>; + mtd-mac-address-increment = <(3)>; + }; + }; +}; diff --git a/target/linux/octeon/image/Makefile b/target/linux/octeon/image/Makefile index 11da22df3b..f77159e1f9 100644 --- a/target/linux/octeon/image/Makefile +++ b/target/linux/octeon/image/Makefile @@ -51,17 +51,28 @@ define Device/ubnt_edgerouter endef TARGET_DEVICES += ubnt_edgerouter -define Device/ubnt_edgerouter-4 +define Device/ubnt_edgerouter-e300 DEVICE_VENDOR := Ubiquiti - DEVICE_MODEL := EdgeRouter 4 - DEVICE_DTS := cn7130_ubnt_edgerouter-4 DEVICE_PACKAGES += kmod-gpio-button-hotplug kmod-leds-gpio kmod-of-mdio kmod-sfp kmod-usb3 kmod-usb-dwc3 kmod-usb-storage-uas KERNEL := kernel-bin | patch-cmdline | append-dtb-to-elf KERNEL_DEPENDS := $$(wildcard $(DTS_DIR)/$(DEVICE_DTS).dts) CMDLINE := root=/dev/mmcblk0p2 rootfstype=squashfs,ext4 rootwait endef + +define Device/ubnt_edgerouter-4 + $(Device/ubnt_edgerouter-e300) + DEVICE_MODEL := EdgeRouter 4 + DEVICE_DTS := cn7130_ubnt_edgerouter-4 +endef TARGET_DEVICES += ubnt_edgerouter-4 +define Device/ubnt_edgerouter-6p + $(Device/ubnt_edgerouter-e300) + DEVICE_MODEL := EdgeRouter 6P + DEVICE_DTS := cn7130_ubnt_edgerouter-6p +endef +TARGET_DEVICES += ubnt_edgerouter-6p + ERLITE_CMDLINE:=-mtdparts=phys_mapped_flash:512k(boot0)ro,512k(boot1)ro,64k(eeprom)ro root=/dev/sda2 rootfstype=squashfs,ext4 rootwait define Device/ubnt_edgerouter-lite DEVICE_VENDOR := Ubiquiti diff --git a/target/linux/ramips/image/mt7620.mk b/target/linux/ramips/image/mt7620.mk index 3caeecebee..ddb09baa08 100644 --- a/target/linux/ramips/image/mt7620.mk +++ b/target/linux/ramips/image/mt7620.mk @@ -33,6 +33,7 @@ define Device/alfa-network_ac1200rm DEVICE_VENDOR := ALFA Network DEVICE_MODEL := AC1200RM DEVICE_PACKAGES := kmod-mt76x2 kmod-usb2 kmod-usb-ohci uboot-envtools + SUPPORTED_DEVICES += ac1200rm endef TARGET_DEVICES += alfa-network_ac1200rm @@ -43,6 +44,7 @@ define Device/alfa-network_r36m-e4g DEVICE_MODEL := R36M-E4G DEVICE_PACKAGES := kmod-i2c-ralink kmod-usb2 kmod-usb-ohci uboot-envtools \ uqmi + SUPPORTED_DEVICES += r36m-e4g endef TARGET_DEVICES += alfa-network_r36m-e4g @@ -53,6 +55,7 @@ define Device/alfa-network_tube-e4g DEVICE_MODEL := Tube-E4G DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci uboot-envtools uqmi -iwinfo \ -kmod-rt2800-soc -wpad-basic-wolfssl + SUPPORTED_DEVICES += tube-e4g endef TARGET_DEVICES += alfa-network_tube-e4g diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk index c059ac15b7..3f2a202341 100644 --- a/target/linux/ramips/image/mt7621.mk +++ b/target/linux/ramips/image/mt7621.mk @@ -118,6 +118,7 @@ define Device/alfa-network_quad-e4g DEVICE_MODEL := Quad-E4G DEVICE_PACKAGES := kmod-ata-ahci kmod-sdhci-mt7620 kmod-usb3 uboot-envtools \ -wpad-basic-wolfssl + SUPPORTED_DEVICES += quad-e4g endef TARGET_DEVICES += alfa-network_quad-e4g diff --git a/target/linux/ramips/image/mt76x8.mk b/target/linux/ramips/image/mt76x8.mk index d5a9684dba..c5a0baa1cb 100644 --- a/target/linux/ramips/image/mt76x8.mk +++ b/target/linux/ramips/image/mt76x8.mk @@ -34,6 +34,7 @@ define Device/alfa-network_awusfree1 DEVICE_VENDOR := ALFA Network DEVICE_MODEL := AWUSFREE1 DEVICE_PACKAGES := uboot-envtools + SUPPORTED_DEVICES += awusfree1 endef TARGET_DEVICES += alfa-network_awusfree1 diff --git a/toolchain/gdb/patches/100-fix-elf-support-check.patch b/toolchain/gdb/patches/100-fix-elf-support-check.patch new file mode 100644 index 0000000000..fe612c38db --- /dev/null +++ b/toolchain/gdb/patches/100-fix-elf-support-check.patch @@ -0,0 +1,20 @@ +--- a/gdb/configure ++++ b/gdb/configure +@@ -16818,6 +16818,7 @@ else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + #include ++#include + #include "bfd.h" + #include "elf-bfd.h" + +--- a/gdb/acinclude.m4 ++++ b/gdb/acinclude.m4 +@@ -362,6 +362,7 @@ AC_DEFUN([GDB_AC_CHECK_BFD], [ + AC_CACHE_CHECK([$1], [$2], + [AC_TRY_LINK( + [#include ++ #include + #include "bfd.h" + #include "$4" + ],