From b4b829fe64908d0f8743175e7d3ce05cdb3177d8 Mon Sep 17 00:00:00 2001 From: Martin Schiller Date: Wed, 28 Aug 2019 07:24:33 +0200 Subject: [PATCH 01/69] uqmi: set plmn only if necessary Setting the plmn to '0' (auto) will implicitly lead to a (delayed) network re-registration, which could further lead to some timing related issues in the qmi proto handler. On the other hand, if you switch back from manual plmn selection to auto mode you have to set it to '0', because this setting is permanently "saved" in the wwan module. Conclusion: If plmn is configured, check if it's already set euqally in the module. If so, do nothing. Otherwise set it. Signed-off-by: Martin Schiller Signed-off-by: Daniel Golle --- package/network/utils/uqmi/Makefile | 2 +- .../utils/uqmi/files/lib/netifd/proto/qmi.sh | 28 ++++++++++++++----- 2 files changed, 22 insertions(+), 8 deletions(-) diff --git a/package/network/utils/uqmi/Makefile b/package/network/utils/uqmi/Makefile index c892c3f8e8..68958a3729 100644 --- a/package/network/utils/uqmi/Makefile +++ b/package/network/utils/uqmi/Makefile @@ -1,7 +1,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=uqmi -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(PROJECT_GIT)/project/uqmi.git diff --git a/package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh b/package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh index 13a4fc9611..a6c785eb56 100755 --- a/package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh +++ b/package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh @@ -30,7 +30,7 @@ proto_qmi_init_config() { proto_qmi_setup() { local interface="$1" - local dataformat connstat + local dataformat connstat plmn_mode mcc mnc local device apn auth username password pincode delay modes pdptype local profile dhcp dhcpv6 autoconnect plmn timeout mtu $PROTO_DEFAULT_OPTIONS local ip4table ip6table @@ -152,24 +152,38 @@ proto_qmi_setup() { esac fi - [ -n "$plmn" ] && { - local mcc mnc - if [ "$plmn" = 0 ]; then + if [ -n "$plmn" ]; then + json_load "$(uqmi -s -d "$device" --get-plmn)" + json_get_var plmn_mode mode + json_get_vars mcc mnc || { mcc=0 mnc=0 - echo "Setting PLMN to auto" - else + } + + if [ "$plmn" = "0" ]; then + if [ "$plmn_mode" != "automatic" ]; then + mcc=0 + mnc=0 + echo "Setting PLMN to auto" + fi + elif [ "$mcc" -ne "${plmn:0:3}" -o "$mnc" -ne "${plmn:3}" ]; then mcc=${plmn:0:3} mnc=${plmn:3} echo "Setting PLMN to $plmn" + else + mcc="" + mnc="" fi + fi + + if [ -n "$mcc" -a -n "$mnc" ]; then uqmi -s -d "$device" --set-plmn --mcc "$mcc" --mnc "$mnc" > /dev/null 2>&1 || { echo "Unable to set PLMN" proto_notify_error "$interface" PLMN_FAILED proto_block_restart "$interface" return 1 } - } + fi # Cleanup current state if any uqmi -s -d "$device" --stop-network 0xffffffff --autoconnect > /dev/null 2>&1 From 89854d38349220bbbd9796ca59da4f4c551d5e99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= Date: Mon, 23 Nov 2020 15:09:45 +0100 Subject: [PATCH 02/69] ath10k-ct: update to latest version MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1d28d17 ath10k-ct: Fix RSSI reporting for wave-1 firmware. 0c2949e ath10k-ct: fwcfg allows configuring dma-burst setting. 13319ff ath10k-ct: stable patches, debugfs crashdump, 5.8 driver Signed-off-by: Álvaro Fernández Rojas --- package/kernel/ath10k-ct/Makefile | 6 ++--- ...64-ath10k-commit-rates-from-mac80211.patch | 6 ++--- ...rolling-support-for-various-chipsets.patch | 26 +++++++++---------- ...02-ath10k-use-tpt-trigger-by-default.patch | 4 +-- ...10k-Add-NL80211_EXT_FEATURE_AQL-flag.patch | 2 +- 5 files changed, 22 insertions(+), 22 deletions(-) diff --git a/package/kernel/ath10k-ct/Makefile b/package/kernel/ath10k-ct/Makefile index 76077ec156..03a605dac5 100644 --- a/package/kernel/ath10k-ct/Makefile +++ b/package/kernel/ath10k-ct/Makefile @@ -8,9 +8,9 @@ PKG_LICENSE_FILES:= PKG_SOURCE_URL:=https://github.com/greearb/ath10k-ct.git PKG_SOURCE_PROTO:=git -PKG_SOURCE_DATE:=2020-06-30 -PKG_SOURCE_VERSION:=edfbf9161ab75e4831981284ab2d5b1b9fb6ef72 -PKG_MIRROR_HASH:=98b7f88baea7314144fa8f8d141ad0dbbf2816f9606b0a89afb396761b558d14 +PKG_SOURCE_DATE:=2020-10-08 +PKG_SOURCE_VERSION:=1d28d176e5b6e63a6583f497adf68e1d9c1dc962 +PKG_MIRROR_HASH:=f611762647822742f7c8f9da242e33d9bf6da0a14976b87408af28f280802ae0 # Build the 5.4 ath10k-ct driver version. Other option is "-4.19". # Probably this should match as closely as diff --git a/package/kernel/ath10k-ct/patches/164-ath10k-commit-rates-from-mac80211.patch b/package/kernel/ath10k-ct/patches/164-ath10k-commit-rates-from-mac80211.patch index 4e88c8a19f..c13036984b 100644 --- a/package/kernel/ath10k-ct/patches/164-ath10k-commit-rates-from-mac80211.patch +++ b/package/kernel/ath10k-ct/patches/164-ath10k-commit-rates-from-mac80211.patch @@ -11,7 +11,7 @@ Signed-off-by: Sven Eckelmann --- a/ath10k-5.4/mac.c +++ b/ath10k-5.4/mac.c -@@ -6793,6 +6793,7 @@ static void ath10k_bss_info_changed(stru +@@ -6797,6 +6797,7 @@ static void ath10k_bss_info_changed(stru "mac vdev %d mcast_rate %x\n", arvif->vdev_id, rate); @@ -19,7 +19,7 @@ Signed-off-by: Sven Eckelmann vdev_param = ar->wmi.vdev_param->mcast_data_rate; ret = ath10k_wmi_vdev_set_param(ar, arvif->vdev_id, vdev_param, rate); -@@ -6801,6 +6802,7 @@ static void ath10k_bss_info_changed(stru +@@ -6805,6 +6806,7 @@ static void ath10k_bss_info_changed(stru "failed to set mcast rate on vdev %i: %d\n", arvif->vdev_id, ret); @@ -27,7 +27,7 @@ Signed-off-by: Sven Eckelmann vdev_param = ar->wmi.vdev_param->bcast_data_rate; ret = ath10k_wmi_vdev_set_param(ar, arvif->vdev_id, vdev_param, rate); -@@ -6827,6 +6829,7 @@ static void ath10k_bss_info_changed(stru +@@ -6831,6 +6833,7 @@ static void ath10k_bss_info_changed(stru return; } diff --git a/package/kernel/ath10k-ct/patches/201-ath10k-add-LED-and-GPIO-controlling-support-for-various-chipsets.patch b/package/kernel/ath10k-ct/patches/201-ath10k-add-LED-and-GPIO-controlling-support-for-various-chipsets.patch index 15343abd5f..c6d42679dd 100644 --- a/package/kernel/ath10k-ct/patches/201-ath10k-add-LED-and-GPIO-controlling-support-for-various-chipsets.patch +++ b/package/kernel/ath10k-ct/patches/201-ath10k-add-LED-and-GPIO-controlling-support-for-various-chipsets.patch @@ -161,7 +161,7 @@ v13: .patch_load_addr = QCA9888_HW_2_0_PATCH_LOAD_ADDR, .uart_pin = 7, .cc_wraparound_type = ATH10K_HW_CC_WRAP_SHIFTED_EACH, -@@ -3573,6 +3579,10 @@ int ath10k_core_start(struct ath10k *ar, +@@ -3579,6 +3585,10 @@ int ath10k_core_start(struct ath10k *ar, ath10k_wmi_check_apply_board_power_ctl_table(ar); } @@ -172,7 +172,7 @@ v13: return 0; err_hif_stop: -@@ -3829,9 +3839,18 @@ static void ath10k_core_register_work(st +@@ -3835,9 +3845,18 @@ static void ath10k_core_register_work(st goto err_spectral_destroy; } @@ -191,7 +191,7 @@ v13: err_spectral_destroy: ath10k_spectral_destroy(ar); err_debug_destroy: -@@ -3891,6 +3910,8 @@ void ath10k_core_unregister(struct ath10 +@@ -3897,6 +3916,8 @@ void ath10k_core_unregister(struct ath10 if (!test_bit(ATH10K_FLAG_CORE_REGISTERED, &ar->dev_flags)) return; @@ -210,7 +210,7 @@ v13: #include "htt.h" #include "htc.h" -@@ -1470,6 +1471,13 @@ struct ath10k { +@@ -1476,6 +1477,13 @@ struct ath10k { } testmode; struct { @@ -396,7 +396,7 @@ v13: /* Rates */ --- a/ath10k-5.4/wmi-ops.h +++ b/ath10k-5.4/wmi-ops.h -@@ -218,7 +218,10 @@ struct wmi_ops { +@@ -219,7 +219,10 @@ struct wmi_ops { struct sk_buff *(*gen_bb_timing) (struct ath10k *ar, const struct wmi_bb_timing_cfg_arg *arg); @@ -407,7 +407,7 @@ v13: }; int ath10k_wmi_cmd_send(struct ath10k *ar, struct sk_buff *skb, u32 cmd_id); -@@ -1105,6 +1108,35 @@ ath10k_wmi_force_fw_hang(struct ath10k * +@@ -1115,6 +1118,35 @@ ath10k_wmi_force_fw_hang(struct ath10k * return ath10k_wmi_cmd_send(ar, skb, ar->wmi.cmd->force_fw_hang_cmdid); } @@ -445,7 +445,7 @@ v13: { --- a/ath10k-5.4/wmi-tlv.c +++ b/ath10k-5.4/wmi-tlv.c -@@ -4367,6 +4367,8 @@ static const struct wmi_ops wmi_tlv_ops +@@ -4382,6 +4382,8 @@ static const struct wmi_ops wmi_tlv_ops .gen_echo = ath10k_wmi_tlv_op_gen_echo, .gen_vdev_spectral_conf = ath10k_wmi_tlv_op_gen_vdev_spectral_conf, .gen_vdev_spectral_enable = ath10k_wmi_tlv_op_gen_vdev_spectral_enable, @@ -456,7 +456,7 @@ v13: static const struct wmi_peer_flags_map wmi_tlv_peer_flags_map = { --- a/ath10k-5.4/wmi.c +++ b/ath10k-5.4/wmi.c -@@ -8305,6 +8305,49 @@ ath10k_wmi_op_gen_peer_set_param(struct +@@ -8313,6 +8313,49 @@ ath10k_wmi_op_gen_peer_set_param(struct return skb; } @@ -506,7 +506,7 @@ v13: static struct sk_buff * ath10k_wmi_op_gen_set_psmode(struct ath10k *ar, u32 vdev_id, enum wmi_sta_ps_mode psmode) -@@ -10104,6 +10147,9 @@ static const struct wmi_ops wmi_ops = { +@@ -10112,6 +10155,9 @@ static const struct wmi_ops wmi_ops = { .fw_stats_fill = ath10k_wmi_main_op_fw_stats_fill, .get_vdev_subtype = ath10k_wmi_op_get_vdev_subtype, .gen_echo = ath10k_wmi_op_gen_echo, @@ -516,7 +516,7 @@ v13: /* .gen_bcn_tmpl not implemented */ /* .gen_prb_tmpl not implemented */ /* .gen_p2p_go_bcn_ie not implemented */ -@@ -10174,6 +10220,8 @@ static const struct wmi_ops wmi_10_1_ops +@@ -10182,6 +10228,8 @@ static const struct wmi_ops wmi_10_1_ops .fw_stats_fill = ath10k_wmi_10x_op_fw_stats_fill, .get_vdev_subtype = ath10k_wmi_op_get_vdev_subtype, .gen_echo = ath10k_wmi_op_gen_echo, @@ -525,7 +525,7 @@ v13: /* .gen_bcn_tmpl not implemented */ /* .gen_prb_tmpl not implemented */ /* .gen_p2p_go_bcn_ie not implemented */ -@@ -10253,6 +10301,8 @@ static const struct wmi_ops wmi_10_2_ops +@@ -10261,6 +10309,8 @@ static const struct wmi_ops wmi_10_2_ops .gen_delba_send = ath10k_wmi_op_gen_delba_send, .fw_stats_fill = ath10k_wmi_10x_op_fw_stats_fill, .get_vdev_subtype = ath10k_wmi_op_get_vdev_subtype, @@ -534,7 +534,7 @@ v13: /* .gen_pdev_enable_adaptive_cca not implemented */ }; -@@ -10324,6 +10374,8 @@ static const struct wmi_ops wmi_10_2_4_o +@@ -10332,6 +10382,8 @@ static const struct wmi_ops wmi_10_2_4_o ath10k_wmi_op_gen_pdev_enable_adaptive_cca, .get_vdev_subtype = ath10k_wmi_10_2_4_op_get_vdev_subtype, .gen_bb_timing = ath10k_wmi_10_2_4_op_gen_bb_timing, @@ -543,7 +543,7 @@ v13: /* .gen_bcn_tmpl not implemented */ /* .gen_prb_tmpl not implemented */ /* .gen_p2p_go_bcn_ie not implemented */ -@@ -10405,6 +10457,8 @@ static const struct wmi_ops wmi_10_4_ops +@@ -10413,6 +10465,8 @@ static const struct wmi_ops wmi_10_4_ops .gen_pdev_bss_chan_info_req = ath10k_wmi_10_2_op_gen_pdev_bss_chan_info, .gen_echo = ath10k_wmi_op_gen_echo, .gen_pdev_get_tpc_config = ath10k_wmi_10_2_4_op_gen_pdev_get_tpc_config, diff --git a/package/kernel/ath10k-ct/patches/202-ath10k-use-tpt-trigger-by-default.patch b/package/kernel/ath10k-ct/patches/202-ath10k-use-tpt-trigger-by-default.patch index dd35e2937c..25a6c12d51 100644 --- a/package/kernel/ath10k-ct/patches/202-ath10k-use-tpt-trigger-by-default.patch +++ b/package/kernel/ath10k-ct/patches/202-ath10k-use-tpt-trigger-by-default.patch @@ -16,7 +16,7 @@ Signed-off-by: Mathias Kresin --- a/ath10k-5.4/core.h +++ b/ath10k-5.4/core.h -@@ -1574,6 +1574,10 @@ struct ath10k { +@@ -1580,6 +1580,10 @@ struct ath10k { u8 csi_data[4096]; u16 csi_data_len; @@ -42,7 +42,7 @@ Signed-off-by: Mathias Kresin if (ret) --- a/ath10k-5.4/mac.c +++ b/ath10k-5.4/mac.c -@@ -10383,7 +10383,7 @@ int ath10k_mac_register(struct ath10k *a +@@ -10387,7 +10387,7 @@ int ath10k_mac_register(struct ath10k *a ar->hw->weight_multiplier = ATH10K_AIRTIME_WEIGHT_MULTIPLIER; #ifdef CPTCFG_MAC80211_LEDS diff --git a/package/kernel/ath10k-ct/patches/205-ath10k-Add-NL80211_EXT_FEATURE_AQL-flag.patch b/package/kernel/ath10k-ct/patches/205-ath10k-Add-NL80211_EXT_FEATURE_AQL-flag.patch index 33d69e7975..4a49909133 100644 --- a/package/kernel/ath10k-ct/patches/205-ath10k-Add-NL80211_EXT_FEATURE_AQL-flag.patch +++ b/package/kernel/ath10k-ct/patches/205-ath10k-Add-NL80211_EXT_FEATURE_AQL-flag.patch @@ -1,6 +1,6 @@ --- a/ath10k-5.4/mac.c +++ b/ath10k-5.4/mac.c -@@ -10182,6 +10182,7 @@ int ath10k_mac_register(struct ath10k *a +@@ -10186,6 +10186,7 @@ int ath10k_mac_register(struct ath10k *a wiphy_ext_feature_set(ar->hw->wiphy, NL80211_EXT_FEATURE_VHT_IBSS); wiphy_ext_feature_set(ar->hw->wiphy, NL80211_EXT_FEATURE_SET_SCAN_DWELL); From aab36200e7eb539afb18df74476132f4750a9f0b Mon Sep 17 00:00:00 2001 From: Matthew Gyurgyik Date: Fri, 13 Nov 2020 11:21:29 -0800 Subject: [PATCH 03/69] imagebuilder: fix partition signature When building images with the imagebuilder, the partition signature never changes. The signature is generated by hashing SOURCE_DATE_EPOCH and LINUX_VERMAGIC which are undefined. Prepopulate these variables, as done by the SDK. Signed-off-by: Matthew Gyurgyik --- target/imagebuilder/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/target/imagebuilder/Makefile b/target/imagebuilder/Makefile index a96f8618e8..e7954e96a4 100644 --- a/target/imagebuilder/Makefile +++ b/target/imagebuilder/Makefile @@ -89,6 +89,8 @@ endif $(CP) -L $(LINUX_DIR)/arch/$(LINUX_KARCH)/boot/dts/* $(IB_DTSDIR); \ fi $(SED) 's,^# REVISION:=.*,REVISION:=$(REVISION),g' $(PKG_BUILD_DIR)/include/version.mk + $(SED) 's,^# SOURCE_DATE_EPOCH:=.*,SOURCE_DATE_EPOCH:=$(SOURCE_DATE_EPOCH),g' $(PKG_BUILD_DIR)/include/version.mk + $(SED) '/LINUX_VERMAGIC:=/ { s,unknown,$(LINUX_VERMAGIC),g }' $(PKG_BUILD_DIR)/include/kernel.mk find $(PKG_BUILD_DIR) -name CVS -o -name .git -o -name .svn \ | $(XARGS) rm -rf $(INSTALL_DIR) $(IB_IDIR) From 0c87304d2be2b21788f116a3ecbd4a2ba33bfd4d Mon Sep 17 00:00:00 2001 From: Paul Spooren Date: Mon, 16 Nov 2020 09:26:02 -1000 Subject: [PATCH 04/69] scripts: add size_compare.sh As package size changes are a continuous topic on the mailing list this scripts helps developers to compare their local package modifications against latest upstream. The script downloads the latest package indexes based on env variables or the `.config` file. The script compares the actual installed size (data.tar.gz) or the IPK package size. An example output is found below: ``` user@dawn:~/src/openwrt/openwrt$ ./scripts/size_compare.sh Compare packages of ath79/tiny/mips_24kc: dropbear busybox iw ubus Checking configuration difference % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 554 100 554 0 0 336 0 0:00:01 0:00:01 --:--:-- 336 --- start config diff --- --- /tmp/config.DDjwVh-LOCAL 2020-11-23 09:08:28.913203068 -1000 +++ /tmp/config.DDjwVh-UPSTREAM 2020-11-23 09:08:36.369240887 -1000 @@ -1,5 +1,9 @@ +CONFIG_ALL_KMODS=y +CONFIG_ALL_NONSHARED=y CONFIG_AUTOREBUILD=y +CONFIG_AUTOREMOVE=y --- 8< --- CONFIG_BINARY_FOLDER="" +CONFIG_BUILDBOT=y +CONFIG_TARGET_ALL_PROFILES=y CONFIG_TARGET_ROOTFS_DIR="" CONFIG_USE_SSTRIP=y CONFIG_USE_UCLIBCXX=y --- end config diff --- Checking installed size Fetching latest package indexes... % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 80634 100 80634 0 0 33499 0 0:00:02 0:00:02 --:--:-- 33485 % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 54082 100 54082 0 0 24252 0 0:00:02 0:00:02 --:--:-- 24252 Comparing package sizes... Change Local Remote Package +271 51386 51115 base-files +123 705241 705118 bnx2-firmware +86 17209 17123 fstools +22 47989 47967 procd +21 208311 208290 busybox +19 67181 67162 netifd ``` I plan to integrate this script into the CI so we have a summary how sizes change over different architectures. Signed-off-by: Paul Spooren --- scripts/size_compare.sh | 151 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 151 insertions(+) create mode 100755 scripts/size_compare.sh diff --git a/scripts/size_compare.sh b/scripts/size_compare.sh new file mode 100755 index 0000000000..8b047a451e --- /dev/null +++ b/scripts/size_compare.sh @@ -0,0 +1,151 @@ +# SPDX-License-Identifier: GPL-2.0-or-later +# +# Copyright (C) 2020 Paul Spooren +# +### +### size_compare - compare size of OpenWrt packages against upstream +### +### The script compares locally compiled package with the package indexes +### available upstream. This way the storage impact of optimizations or +### feature modifiactions is easy to see. +### +### If no environmental variables are set the scritp reads the current +### .config file. The evaluated env variables are the following: +### +### TARGET SUBTARGET ARCH PACKAGES BIN_DIR BASE_URL CHECK_INSTALLED +### +### Usage: +### ./scripts/size_compare.sh +### +### Options: +### -p --package-size Check IPK package size and not installed size +### -h --help This message + +CONFIG_TARGET=$(sed -n 's/^CONFIG_TARGET_BOARD="\(.*\)"$/\1/p' .config) +CONFIG_SUBTARGET=$(sed -n 's/^CONFIG_TARGET_SUBTARGET="\(.*\)"$/\1/p' .config) +CONFIG_ARCH=$(sed -n 's/^CONFIG_TARGET_ARCH_PACKAGES="\(.*\)"$/\1/p' .config) +CONFIG_PACKAGES=$(sed -n 's/^CONFIG_PACKAGE_\(.*\)=y$/\1/p' .config | tr '\n' ' ') +CONFIG_BIN_DIR=$(sed -n 's/^CONFIG_BINARY_DIR="\(.*\)"$/\1/p' .config) + +TARGET=${TARGET:-$CONFIG_TARGET} +SUBTARGET=${SUBTARGET:-$CONFIG_SUBTARGET} +ARCH=${ARCH:-$CONFIG_ARCH} +PACKAGES=${PACKAGES:-$CONFIG_PACKAGES} +BIN_DIR=${CONFIG_BIN_DIR:-./bin} +BASE_URL="${BASE_URL:-https://downloads.openwrt.org/snapshots}" +CHECK_INSTALLED="${CHECK_INSTALLED:-y}" + +TARGET_URL="$BASE_URL/targets/$TARGET/$SUBTARGET/packages/Packages.gz" +CONFIG_URL="$BASE_URL/targets/$TARGET/$SUBTARGET/config.buildinfo" +PACKAGES_URL="$BASE_URL/packages/$ARCH/base/Packages.gz" + +if command -v curl > /dev/null; then + DOWNLOAD_METHOD="curl" +else + DOWNLOAD_METHOD="wget --output-document=-" +fi + +help() { + sed -rn 's/^### ?//;T;p' "$0" +} + +package_size () { + FOUND_PACKAGE= + if [ -z "$CHECK_INSTALLED" ]; then + SEARCH_PATTERN="Size" + else + SEARCH_PATTERN="Installed-Size" + fi + while IFS= read -r line; do + if [ "$line" = "Package: $2" ]; then + FOUND_PACKAGE=y + fi + if [ -n "$FOUND_PACKAGE" ]; then + case $line in + "$SEARCH_PATTERN"*) + echo "$line" | cut -d ' ' -f 2 + break + ;; + esac + fi + done < "$1" +} + +compare_sizes () { + for PACKAGE in $PACKAGES; do + if [ "$PACKAGE" = "libc" ]; then + continue + fi + PACKAGE_FILE=$(find "$BIN_DIR/packages/$ARCH/" \ + "$BIN_DIR/targets/$TARGET/$SUBTARGET/" \ + -name "${PACKAGE}_*.ipk" 2>/dev/null | head -n1) + + if [ -z "$PACKAGE_FILE" ]; then + continue + fi + if [ -z "$CHECK_INSTALLED" ]; then + SIZE_LOCAL=$(stat -c '%s' "$PACKAGE_FILE") + else + SIZE_LOCAL=$(tar tzvf "$PACKAGE_FILE" ./data.tar.gz | awk '{ print $3 }') + fi + SIZE_UPSTREAM=$(package_size "$TMP_INDEX" "$PACKAGE") + SIZE_DIFF="$((SIZE_LOCAL-SIZE_UPSTREAM))" + if [ "$SIZE_DIFF" -gt 0 ]; then + SIZE_DIFF="+$SIZE_DIFF" + fi + if [ -n "$SIZE_UPSTREAM" ]; then + echo "${SIZE_DIFF} ${SIZE_LOCAL} ${SIZE_UPSTREAM} $PACKAGE" + else + echo "$PACKAGE is missing upstream" + fi + done +} + +if [ "$1" = "-h" ]; then + help + exit 0 +fi + +if [ "$1" = "-p" ]; then + CHECK_INSTALLED= +fi + +echo "Compare packages of $TARGET/$SUBTARGET/$ARCH": +echo "$PACKAGES" +echo + +echo "Checking configuration difference" +TMP_CONFIG=$(mktemp /tmp/config.XXXXXX) +sed -n 's/^ \+config \(.*\)/\1/p' config/Config-build.in config/Config-devel.in > "${TMP_CONFIG}-FOCUS" +sort .config | grep -f "${TMP_CONFIG}-FOCUS" | grep -v "^#" | sort > "${TMP_CONFIG}-LOCAL" +mv .config .config.bak +"$DOWNLOAD_METHOD" "$CONFIG_URL" > .config +make defconfig > /dev/null 2> /dev/null +grep -f "${TMP_CONFIG}-FOCUS" .config | grep -v "^#" | sort > "${TMP_CONFIG}-UPSTREAM" +mv .config.bak .config + +echo +echo " --- start config diff ---" +diff -u "${TMP_CONFIG}-LOCAL" "${TMP_CONFIG}-UPSTREAM" +echo " --- end config diff ---" +rm "${TMP_CONFIG}-FOCUS" "${TMP_CONFIG}-UPSTREAM" "${TMP_CONFIG}-LOCAL" +echo + +if [ -z "$CHECK_INSTALLED" ]; then + echo "Checking IPK package size" +else + echo "Checking installed size" +fi +echo + +echo "Fetching latest package indexes..." +TMP_INDEX=$(mktemp /tmp/size_compare_package_index.XXXXXX) +"$DOWNLOAD_METHOD" "$TARGET_URL" | gzip -d > "$TMP_INDEX" || exit 1 +"$DOWNLOAD_METHOD" "$PACKAGES_URL" | gzip -d >> "$TMP_INDEX" || exit 1 +echo + +echo "Comparing package sizes..." +echo "Change Local Remote Package" +compare_sizes | sort -g -r + +rm "$TMP_INDEX" From 5bb3cc749ee0d08d82acda3c084ff759f3829a91 Mon Sep 17 00:00:00 2001 From: Jan Pavlinec Date: Wed, 25 Nov 2020 02:04:00 +0100 Subject: [PATCH 05/69] tcpdump: patch CVE-2020-8037 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR backports upstream fix for CVE-2020-8037. This fix is only relevant for tcpdump package, tcpdump-mini is not affeted by this issue. Signed-off-by: Jan Pavlinec [added missing commit description] Signed-off-by: Petr Štetiar --- package/network/utils/tcpdump/Makefile | 2 +- .../tcpdump/patches/101-CVE-2020-8037.patch | 47 +++++++++++++++++++ 2 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 package/network/utils/tcpdump/patches/101-CVE-2020-8037.patch diff --git a/package/network/utils/tcpdump/Makefile b/package/network/utils/tcpdump/Makefile index 09b0b03766..3e4d9d2d73 100644 --- a/package/network/utils/tcpdump/Makefile +++ b/package/network/utils/tcpdump/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=tcpdump PKG_VERSION:=4.9.3 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://www.us.tcpdump.org/release/ \ diff --git a/package/network/utils/tcpdump/patches/101-CVE-2020-8037.patch b/package/network/utils/tcpdump/patches/101-CVE-2020-8037.patch new file mode 100644 index 0000000000..281854777d --- /dev/null +++ b/package/network/utils/tcpdump/patches/101-CVE-2020-8037.patch @@ -0,0 +1,47 @@ +--- a/print-ppp.c ++++ b/print-ppp.c +@@ -1368,19 +1368,29 @@ trunc: + } + + #ifndef TCPDUMP_MINI ++/* ++ * Un-escape RFC 1662 PPP in HDLC-like framing, with octet escapes. ++ * The length argument is the on-the-wire length, not the captured ++ * length; we can only un-escape the captured part. ++ */ + static void + ppp_hdlc(netdissect_options *ndo, + const u_char *p, int length) + { ++ u_int caplen = ndo->ndo_snapend - p; + u_char *b, *t, c; + const u_char *s; +- int i, proto; ++ u_int i; ++ int proto; + const void *se; + ++ if (caplen == 0) ++ return; ++ + if (length <= 0) + return; + +- b = (u_char *)malloc(length); ++ b = (u_char *)malloc(caplen); + if (b == NULL) + return; + +@@ -1389,10 +1399,10 @@ ppp_hdlc(netdissect_options *ndo, + * Do this so that we dont overwrite the original packet + * contents. + */ +- for (s = p, t = b, i = length; i > 0 && ND_TTEST(*s); i--) { ++ for (s = p, t = b, i = caplen; i != 0; i--) { + c = *s++; + if (c == 0x7d) { +- if (i <= 1 || !ND_TTEST(*s)) ++ if (i <= 1) + break; + i--; + c = *s++ ^ 0x20; From 7c114f33dd8c6eea5cebe6cf524f4e16154b623c Mon Sep 17 00:00:00 2001 From: Paul Spooren Date: Tue, 24 Nov 2020 22:06:37 -1000 Subject: [PATCH 06/69] opkg: purge package from cache on hash mismatch 61b3c62 opkg_verify_integrity: better logging and error conditions f73d42f download: purge cached packages that have incorrect checksum 1c1480e download: factor out the logic for building cache filenames 293b1ce libopkg: factor out checksum and size verification a786e25 download: remove compatibility with old cache naming scheme Signed-off-by: Paul Spooren --- package/system/opkg/Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/package/system/opkg/Makefile b/package/system/opkg/Makefile index 79e2932042..eb9543c4ea 100644 --- a/package/system/opkg/Makefile +++ b/package/system/opkg/Makefile @@ -9,14 +9,14 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=opkg -PKG_RELEASE:=2 +PKG_RELEASE:=1 PKG_FLAGS:=essential PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://git.openwrt.org/project/opkg-lede.git -PKG_SOURCE_DATE:=2020-11-03 -PKG_SOURCE_VERSION:=da9746aaa28fdc63a6e062bf00b25eba52bc8e5f -PKG_MIRROR_HASH:=9c42a8f7dbce4d50b01c3cd10e1974611ffdd9547c27f8f5725b6237433f54e2 +PKG_SOURCE_DATE:=2020-11-24 +PKG_SOURCE_VERSION:=61b3c62d1c0dbbdcee2d67f56fb112f0af80527a +PKG_MIRROR_HASH:=4237d525104ba4369a281d71b96307410d592e2aaa6d689306bf7d948def951b PKG_LICENSE:=GPL-2.0 PKG_LICENSE_FILES:=COPYING From ee1150e362456262fbb67239ca223c4aac59130e Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Wed, 14 Oct 2020 20:02:46 -0700 Subject: [PATCH 07/69] exfat: update to 5.10.1 Remove tar hacks and use PKG_BUILD_DIR. Added missing URL. Changelog: d5eb2e1 exfat: remove useless check in exfat_move_file() 8cb2bc3 exfat: use i_blocksize() to get blocksize 4cd0435 exfat: fix misspellings using codespell tool 485d677 exfat: fix use of uninitialized spinlock on error path 03b3db6 exfat: remove 'rwoffset' in exfat_inode_info 90797eb exfat: replace memcpy with structure assignment d144149 exfat: remove useless directory scan in exfat_add_entry() fc67230 exfat: eliminate dead code in exfat_find() 7c25c64 exfat: fix pointer error checking bfea1fb exfat: retain 'VolumeFlags' properly Signed-off-by: Rosen Penev --- package/kernel/exfat/Makefile | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/package/kernel/exfat/Makefile b/package/kernel/exfat/Makefile index c3d20fe263..3f873a71ee 100644 --- a/package/kernel/exfat/Makefile +++ b/package/kernel/exfat/Makefile @@ -7,26 +7,25 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=exfat -PKG_VERSION:=5.8.7 +PKG_VERSION:=5.10.1 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://codeload.github.com/namjaejeon/linux-exfat-oot/tar.gz/$(PKG_VERSION)? -PKG_HASH:=20254677bed3f456e89cc9d757c1a47abbadab4d75640eef4a995370a37be3f4 +PKG_HASH:=0ff77dd7d39eb231d00c3c4909b9fad31ebeeb618bd6fa18fce142becc9c1f98 +PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/linux-exfat-oot-$(PKG_VERSION) PKG_MAINTAINER:= PKG_LICENSE:=GPL-2.0-only include $(INCLUDE_DIR)/package.mk -TAR_OPTIONS+= --strip-components 1 -TAR_CMD=$(HOST_TAR) -C $(1) $(TAR_OPTIONS) - define KernelPackage/fs-exfat SECTION:=kernel CATEGORY:=Kernel modules SUBMENU:=Filesystems TITLE:=exFAT kernel module + URL:=https://github.com/namjaejeon/linux-exfat-oot FILES:=$(PKG_BUILD_DIR)/exfat.ko AUTOLOAD:=$(call AutoProbe,exfat) DEPENDS:= +kmod-nls-base From bbe302d2b6edd092db943c4ad9fb541acc49148f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Mon, 19 Oct 2020 12:32:49 +0200 Subject: [PATCH 08/69] ath10k-ct-firmware: add conflicts and better provides MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This expands packages to define not only provides but also conflicts. These packages provides same files so they should specify conflicts. Second expansion is that *-ct-htt and *-ct-full-htt firmwares can also provide *-ct variant as that allows explicit dependency on CT variant with various firmware modifications. Signed-off-by: Karel Kočí [Bump PKG_RELEASE and format PROVIDES/CONFLICTS] Signed-off-by: Álvaro Fernández Rojas --- package/firmware/ath10k-ct-firmware/Makefile | 82 +++++++++++++++++--- 1 file changed, 71 insertions(+), 11 deletions(-) diff --git a/package/firmware/ath10k-ct-firmware/Makefile b/package/firmware/ath10k-ct-firmware/Makefile index c298f80186..cdfd3fb940 100644 --- a/package/firmware/ath10k-ct-firmware/Makefile +++ b/package/firmware/ath10k-ct-firmware/Makefile @@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=ath10k-ct-firmware PKG_VERSION:=2020-07-02 -PKG_RELEASE:=1 +PKG_RELEASE:=2 include $(INCLUDE_DIR)/package.mk @@ -226,13 +226,19 @@ $(Package/ath10k-ct-firmware-default) SECTION:=firmware CATEGORY:=Firmware PROVIDES:=ath10k-firmware-qca988x + CONFLICTS:=ath10k-firmware-qca988x endef define Package/ath10k-firmware-qca988x-ct-full-htt $(Package/ath10k-ct-firmware-default) TITLE:=ath10k CT 10.1 full-htt-mgt fw for QCA988x SECTION:=firmware CATEGORY:=Firmware - PROVIDES:=ath10k-firmware-qca988x + PROVIDES:=\ + ath10k-firmware-qca988x \ + ath10k-firmware-qca988x-ct + CONFLICTS:=\ + ath10k-firmware-qca988x \ + ath10k-firmware-qca988x-ct DEPENDS:=+!PACKAGE_kmod-ath10k-ct-smallbuffers:kmod-ath10k-ct endef @@ -242,13 +248,19 @@ $(Package/ath10k-ct-firmware-default) SECTION:=firmware CATEGORY:=Firmware PROVIDES:=ath10k-firmware-qca9887 + CONFLICTS:=ath10k-firmware-qca9887 endef define Package/ath10k-firmware-qca9887-ct-full-htt $(Package/ath10k-ct-firmware-default) TITLE:=ath10k CT 10.1 full-htt-mgt fw for QCA9887 SECTION:=firmware CATEGORY:=Firmware - PROVIDES:=ath10k-firmware-qca9887 + PROVIDES:=\ + ath10k-firmware-qca9887 \ + ath10k-firmware-qca9887-ct + CONFLICTS:=\ + ath10k-firmware-qca9887 \ + ath10k-firmware-qca9887-ct DEPENDS:=+!PACKAGE_kmod-ath10k-ct-smallbuffers:kmod-ath10k-ct endef @@ -258,13 +270,20 @@ $(Package/ath10k-ct-firmware-default) SECTION:=firmware CATEGORY:=Firmware PROVIDES:=ath10k-firmware-qca99x0 + CONFLICTS:=ath10k-firmware-qca99x0 endef define Package/ath10k-firmware-qca99x0-ct-full-htt $(Package/ath10k-ct-firmware-default) TITLE:=ath10k CT 10.4 full-htt-mgt fw for QCA99x0 SECTION:=firmware CATEGORY:=Firmware - PROVIDES:=ath10k-firmware-qca99x0 + PROVIDES:=\ + ath10k-firmware-qca99x0 \ + ath10k-firmware-qca99x0-ct + CONFLICTS:=\ + ath10k-firmware-qca99x0 \ + ath10k-firmware-qca99x0-ct \ + ath10k-firmware-qca99x0-ct-htt DEPENDS:=+!PACKAGE_kmod-ath10k-ct-smallbuffers:kmod-ath10k-ct endef define Package/ath10k-firmware-qca99x0-ct-htt @@ -272,7 +291,12 @@ $(Package/ath10k-firmware-default) TITLE:=ath10k CT 10.4 htt-mgt fw for QCA99x0 SECTION:=firmware CATEGORY:=Firmware - PROVIDES:=ath10k-firmware-qca99x0 + PROVIDES:=\ + ath10k-firmware-qca99x0 \ + ath10k-firmware-qca99x0-ct + CONFLICTS:=\ + ath10k-firmware-qca99x0 \ + ath10k-firmware-qca99x0-ct DEPENDS:=+!PACKAGE_kmod-ath10k-ct-smallbuffers:kmod-ath10k-ct endef @@ -282,13 +306,20 @@ $(Package/ath10k-ct-firmware-default) SECTION:=firmware CATEGORY:=Firmware PROVIDES:=ath10k-firmware-qca9984 + CONFLICTS:=ath10k-firmware-qca9984 endef define Package/ath10k-firmware-qca9984-ct-full-htt $(Package/ath10k-ct-firmware-default) TITLE:=ath10k CT 10.4 full-htt-mgt fw for QCA9984 SECTION:=firmware CATEGORY:=Firmware - PROVIDES:=ath10k-firmware-qca9984 + PROVIDES:=\ + ath10k-firmware-qca9984 \ + ath10k-firmware-qca9984-ct + CONFLICTS:=\ + ath10k-firmware-qca9984 \ + ath10k-firmware-qca9984-ct \ + ath10k-firmware-qca9984-ct-htt DEPENDS:=+!PACKAGE_kmod-ath10k-ct-smallbuffers:kmod-ath10k-ct endef define Package/ath10k-firmware-qca9984-ct-htt @@ -296,7 +327,12 @@ $(Package/ath10k-firmware-default) TITLE:=ath10k CT 10.4 htt-mgt fw for QCA9984 SECTION:=firmware CATEGORY:=Firmware - PROVIDES:=ath10k-firmware-qca9984 + PROVIDES:=\ + ath10k-firmware-qca9984 \ + ath10k-firmware-qca9984-ct + CONFLICTS:=\ + ath10k-firmware-qca9984 \ + ath10k-firmware-qca9984-ct DEPENDS:=+!PACKAGE_kmod-ath10k-ct-smallbuffers:kmod-ath10k-ct endef @@ -306,13 +342,20 @@ $(Package/ath10k-ct-firmware-default) SECTION:=firmware CATEGORY:=Firmware PROVIDES:=ath10k-firmware-qca4019 + CONFLICTS:=ath10k-firmware-qca4019 endef define Package/ath10k-firmware-qca4019-ct-full-htt $(Package/ath10k-ct-firmware-default) TITLE:=ath10k CT 10.4 full-htt-mgt for QCA4018/9 SECTION:=firmware CATEGORY:=Firmware - PROVIDES:=ath10k-firmware-qca4019 + PROVIDES:=\ + ath10k-firmware-qca4019 \ + ath10k-firmware-qca4019-ct + CONFLICTS:=\ + ath10k-firmware-qca4019 \ + ath10k-firmware-qca4019-ct \ + ath10k-firmware-qca4019-ct-htt DEPENDS:=+!PACKAGE_kmod-ath10k-ct-smallbuffers:kmod-ath10k-ct endef define Package/ath10k-firmware-qca4019-ct-htt @@ -320,7 +363,12 @@ $(Package/ath10k-firmware-default) TITLE:=ath10k CT 10.4 htt-mgt for QCA4018/9 SECTION:=firmware CATEGORY:=Firmware - PROVIDES:=ath10k-firmware-qca4019 + PROVIDES:=\ + ath10k-firmware-qca4019 \ + ath10k-firmware-qca4019-ct + CONFLICTS:=\ + ath10k-firmware-qca4019 \ + ath10k-firmware-qca4019-ct DEPENDS:=+!PACKAGE_kmod-ath10k-ct-smallbuffers:kmod-ath10k-ct endef @@ -330,13 +378,20 @@ $(Package/ath10k-ct-firmware-default) SECTION:=firmware CATEGORY:=Firmware PROVIDES:=ath10k-firmware-qca9888 + CONFLICTS:=ath10k-firmware-qca9888 endef define Package/ath10k-firmware-qca9888-ct-full-htt $(Package/ath10k-ct-firmware-default) TITLE:=ath10k CT 10.4 full-htt-mgt fw for QCA9886/8 SECTION:=firmware CATEGORY:=Firmware - PROVIDES:=ath10k-firmware-qca9888 + PROVIDES:=\ + ath10k-firmware-qca9888 \ + ath10k-firmware-qca9888-ct + CONFLICTS:=\ + ath10k-firmware-qca9888 \ + ath10k-firmware-qca9888-ct \ + ath10k-firmware-qca9888-ct-htt DEPENDS:=+!PACKAGE_kmod-ath10k-ct-smallbuffers:kmod-ath10k-ct endef define Package/ath10k-firmware-qca9888-ct-htt @@ -344,7 +399,12 @@ $(Package/ath10k-firmware-default) TITLE:=ath10k CT 10.4 htt-mgt fw for QCA9886/8 SECTION:=firmware CATEGORY:=Firmware - PROVIDES:=ath10k-firmware-qca9888 + PROVIDES:=\ + ath10k-firmware-qca9888 \ + ath10k-firmware-qca9888-ct + CONFLICTS:=\ + ath10k-firmware-qca9888 \ + ath10k-firmware-qca9888-ct DEPENDS:=+!PACKAGE_kmod-ath10k-ct-smallbuffers:kmod-ath10k-ct endef From 367877844586c6a219b03ce2d064ead451318b98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= Date: Wed, 25 Nov 2020 10:25:01 +0100 Subject: [PATCH 09/69] cypress-firmware: add proper package conflicts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit There are linux firmwares packages for 43362, 43430 and 43455 which shouldn't be installed at the same time as Cypress firmwares. Signed-off-by: Álvaro Fernández Rojas --- package/firmware/cypress-firmware/Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/package/firmware/cypress-firmware/Makefile b/package/firmware/cypress-firmware/Makefile index 73c3cfc711..d881384006 100644 --- a/package/firmware/cypress-firmware/Makefile +++ b/package/firmware/cypress-firmware/Makefile @@ -11,7 +11,7 @@ UNPACK_CMD=unzip -q -p $(DL_DIR)/$(PKG_SOURCE) $(PKG_SOURCE_UNZIP) | gzip -dc | PKG_NAME:=cypress-firmware PKG_VERSION:=v5.4.18-2020_0402 -PKG_RELEASE:=2 +PKG_RELEASE:=3 PKG_SOURCE_UNZIP:=cypress-firmware-$(PKG_VERSION).tar.gz PKG_SOURCE:=cypress-fmac-$(PKG_VERSION).zip @@ -70,6 +70,7 @@ define Package/cypress-firmware-43362-sdio $(Package/cypress-firmware-default) TITLE:=CYW43362 FullMac SDIO firmware PROVIDES:=brcmfmac-firmware-43362-sdio + CONFLICTS:=brcmfmac-firmware-43362-sdio endef define Package/cypress-firmware-43362-sdio/install @@ -101,6 +102,7 @@ define Package/cypress-firmware-43430-sdio $(Package/cypress-firmware-default) TITLE:=CYW43430 FullMac SDIO firmware PROVIDES:=brcmfmac-firmware-43430-sdio + CONFLICTS:=brcmfmac-firmware-43430-sdio endef define Package/cypress-firmware-43430-sdio/install @@ -120,6 +122,7 @@ define Package/cypress-firmware-43455-sdio $(Package/cypress-firmware-default) TITLE:=CYW43455 FullMac SDIO firmware PROVIDES:=brcmfmac-firmware-43455-sdio + CONFLICTS:=brcmfmac-firmware-43455-sdio endef define Package/cypress-firmware-43455-sdio/install From 3c0059773c107c662b8a785d021f91aa441d3576 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= Date: Wed, 25 Nov 2020 10:27:02 +0100 Subject: [PATCH 10/69] cypress-nvram: add proper package conflicts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit There are linux firmware packages for all RPIs NVRAMs. Signed-off-by: Álvaro Fernández Rojas --- package/firmware/cypress-nvram/Makefile | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/package/firmware/cypress-nvram/Makefile b/package/firmware/cypress-nvram/Makefile index ef4044c6d0..bccdb3fced 100644 --- a/package/firmware/cypress-nvram/Makefile +++ b/package/firmware/cypress-nvram/Makefile @@ -11,7 +11,7 @@ PKG_NAME:=cypress-nvram PKG_SOURCE_DATE:=2019-09-03 PKG_SOURCE_VERSION:=e7b78df22f2a0c5f56abb7b5880661611de35e5f PKG_MIRROR_HASH:=1cb20a749696852be0a512d51961365dd9c031362af0af1a2b9f5a3fb894885f -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://github.com/openwrt/cypress-nvram.git @@ -35,6 +35,8 @@ define Package/cypress-nvram-43430-sdio-rpi-3b $(Package/cypress-nvram-default) TITLE:=CYW43430 NVRAM for Raspberry Pi 3B DEPENDS:=@TARGET_bcm27xx + PROVIDES:=brcmfmac-firmware-43430-sdio-rpi-3b + CONFLICTS:=brcmfmac-firmware-43430-sdio-rpi-3b endef define Package/cypress-nvram-43430-sdio-rpi-3b/install @@ -51,6 +53,8 @@ define Package/cypress-nvram-43430-sdio-rpi-zero-w $(Package/cypress-nvram-default) TITLE:=CYW43430 NVRAM for Raspberry Pi Zero W DEPENDS:=@TARGET_bcm27xx + PROVIDES:=brcmfmac-firmware-43430-sdio-rpi-zero-w + CONFLICTS:=brcmfmac-firmware-43430-sdio-rpi-zero-w endef define Package/cypress-nvram-43430-sdio-rpi-zero-w/install @@ -67,6 +71,8 @@ define Package/cypress-nvram-43455-sdio-rpi-3b-plus $(Package/cypress-nvram-default) TITLE:=CYW43455 NVRAM for Raspberry Pi 3B+ DEPENDS:=@TARGET_bcm27xx + PROVIDES:=brcmfmac-firmware-43455-sdio-rpi-3b-plus + CONFLICTS:=brcmfmac-firmware-43455-sdio-rpi-3b-plus endef define Package/cypress-nvram-43455-sdio-rpi-3b-plus/install @@ -83,6 +89,8 @@ define Package/cypress-nvram-43455-sdio-rpi-4b $(Package/cypress-nvram-default) TITLE:=CYW43455 NVRAM for Raspberry Pi 4B DEPENDS:=@TARGET_bcm27xx + PROVIDES:=brcmfmac-firmware-43455-sdio-rpi-4b + CONFLICTS:=brcmfmac-firmware-43455-sdio-rpi-4b endef define Package/cypress-nvram-43455-sdio-rpi-4b/install From e224a9a98fac9e86e7cf77446c2d95777021a72e Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Thu, 29 Oct 2020 00:12:16 -0700 Subject: [PATCH 11/69] prereq-build: add python 3.9 support Fixes unmet dependency issue. Signed-off-by: Rosen Penev --- include/prereq-build.mk | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/prereq-build.mk b/include/prereq-build.mk index 8181812599..e7314b253b 100644 --- a/include/prereq-build.mk +++ b/include/prereq-build.mk @@ -149,6 +149,7 @@ $(eval $(call SetupHostCommand,perl,Please install Perl 5.x, \ $(eval $(call CleanupPython2)) $(eval $(call SetupHostCommand,python,Please install Python >= 3.5, \ + python3.9 -V 2>&1 | grep 'Python 3', \ python3.8 -V 2>&1 | grep 'Python 3', \ python3.7 -V 2>&1 | grep 'Python 3', \ python3.6 -V 2>&1 | grep 'Python 3', \ @@ -156,6 +157,7 @@ $(eval $(call SetupHostCommand,python,Please install Python >= 3.5, \ python3 -V 2>&1 | grep -E 'Python 3\.[5-9]\.?')) $(eval $(call SetupHostCommand,python3,Please install Python >= 3.5, \ + python3.9 -V 2>&1 | grep 'Python 3', \ python3.8 -V 2>&1 | grep 'Python 3', \ python3.7 -V 2>&1 | grep 'Python 3', \ python3.6 -V 2>&1 | grep 'Python 3', \ From 2418657104e5e0056d76b1840d1b2dba8db43127 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= Date: Wed, 25 Nov 2020 10:37:24 +0100 Subject: [PATCH 12/69] linux-firmware: brcm: use RPI 4B NVRAM file MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use the dedicated RPI 4B NVRAM file introduced in 20191215. Signed-off-by: Álvaro Fernández Rojas --- package/firmware/linux-firmware/Makefile | 2 +- package/firmware/linux-firmware/broadcom.mk | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/package/firmware/linux-firmware/Makefile b/package/firmware/linux-firmware/Makefile index 799ee60a8f..877a58d3d6 100644 --- a/package/firmware/linux-firmware/Makefile +++ b/package/firmware/linux-firmware/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=linux-firmware PKG_VERSION:=20201118 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE_URL:=@KERNEL/linux/kernel/firmware PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz diff --git a/package/firmware/linux-firmware/broadcom.mk b/package/firmware/linux-firmware/broadcom.mk index 4f7492a2d8..00f7076104 100644 --- a/package/firmware/linux-firmware/broadcom.mk +++ b/package/firmware/linux-firmware/broadcom.mk @@ -101,9 +101,7 @@ Package/brcmfmac-firmware-43455-sdio-rpi-4b = $(call Package/firmware-default,Br define Package/brcmfmac-firmware-43455-sdio-rpi-4b/install $(INSTALL_DIR) $(1)/lib/firmware/brcm $(INSTALL_DATA) \ - $(PKG_BUILD_DIR)/brcm/brcmfmac43455-sdio.raspberrypi,3-model-b-plus.txt \ - $(1)/lib/firmware/brcm/brcmfmac43455-sdio.raspberrypi,4-model-b.txt - $(SED) 's/boardflags3=.*/boardflags3=0x44200100/g' \ + $(PKG_BUILD_DIR)/brcm/brcmfmac43455-sdio.raspberrypi,4-model-b.txt \ $(1)/lib/firmware/brcm/brcmfmac43455-sdio.raspberrypi,4-model-b.txt endef $(eval $(call BuildPackage,brcmfmac-firmware-43455-sdio-rpi-4b)) From a058349ff935ce49c153414b994b04b488d918df Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Tue, 24 Nov 2020 22:26:17 -0800 Subject: [PATCH 13/69] libusb-compat: remove No package in base relies on this library. This library will be moved to packages where it is needed. Signed-off-by: Rosen Penev --- package/libs/libusb-compat/Makefile | 54 ----- .../patches/001-fix-musl-stdint.patch | 185 ------------------ 2 files changed, 239 deletions(-) delete mode 100644 package/libs/libusb-compat/Makefile delete mode 100644 package/libs/libusb-compat/patches/001-fix-musl-stdint.patch diff --git a/package/libs/libusb-compat/Makefile b/package/libs/libusb-compat/Makefile deleted file mode 100644 index 5f9b2385c8..0000000000 --- a/package/libs/libusb-compat/Makefile +++ /dev/null @@ -1,54 +0,0 @@ -# -# Copyright (C) 2010-2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=libusb-compat -PKG_VERSION:=0.1.5 -PKG_RELEASE:=2 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 -PKG_SOURCE_URL:=@SF/libusb -PKG_HASH:=404ef4b6b324be79ac1bfb3d839eac860fbc929e6acb1ef88793a6ea328bc55a - -PKG_INSTALL:=1 -PKG_BUILD_PARALLEL:=1 -PKG_LICENSE:=LGPL-2.1 - -PKG_MAINTAINER := Felix Fietkau - -include $(INCLUDE_DIR)/package.mk - -define Package/libusb-compat - SECTION:=libs - CATEGORY:=Libraries - TITLE:=libusb-0.1 compatibility library - DEPENDS:=+libusb-1.0 - URL:=http://libusb.wiki.sourceforge.net/ - ABI_VERSION:=4 -endef - -define Package/libusb-compat/description - libusb is a C library that gives applications easy access to USB devices on - many different operating systems. -endef - -TARGET_CFLAGS += $(FPIC) - -define Build/InstallDev - $(INSTALL_DIR) $(1) - $(CP) $(PKG_INSTALL_DIR)/* $(1)/ - $(INSTALL_DIR) $(2)/bin - $(CP) $(PKG_INSTALL_DIR)/usr/bin/libusb-config $(2)/bin/ -endef - -define Package/libusb-compat/install - $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libusb-0.1.so* $(1)/usr/lib/ -endef - -$(eval $(call BuildPackage,libusb-compat)) diff --git a/package/libs/libusb-compat/patches/001-fix-musl-stdint.patch b/package/libs/libusb-compat/patches/001-fix-musl-stdint.patch deleted file mode 100644 index 333bc090cc..0000000000 --- a/package/libs/libusb-compat/patches/001-fix-musl-stdint.patch +++ /dev/null @@ -1,185 +0,0 @@ ---- a/libusb/usb.h -+++ b/libusb/usb.h -@@ -27,6 +27,7 @@ - - #include - #include -+#include - #include - - #include -@@ -78,40 +79,40 @@ - - /* All standard descriptors have these 2 fields in common */ - struct usb_descriptor_header { -- u_int8_t bLength; -- u_int8_t bDescriptorType; -+ uint8_t bLength; -+ uint8_t bDescriptorType; - }; - - /* String descriptor */ - struct usb_string_descriptor { -- u_int8_t bLength; -- u_int8_t bDescriptorType; -- u_int16_t wData[1]; -+ uint8_t bLength; -+ uint8_t bDescriptorType; -+ uint16_t wData[1]; - }; - - /* HID descriptor */ - struct usb_hid_descriptor { -- u_int8_t bLength; -- u_int8_t bDescriptorType; -- u_int16_t bcdHID; -- u_int8_t bCountryCode; -- u_int8_t bNumDescriptors; -- /* u_int8_t bReportDescriptorType; */ -- /* u_int16_t wDescriptorLength; */ -+ uint8_t bLength; -+ uint8_t bDescriptorType; -+ uint16_t bcdHID; -+ uint8_t bCountryCode; -+ uint8_t bNumDescriptors; -+ /* uint8_t bReportDescriptorType; */ -+ /* uint16_t wDescriptorLength; */ - /* ... */ - }; - - /* Endpoint descriptor */ - #define USB_MAXENDPOINTS 32 - struct usb_endpoint_descriptor { -- u_int8_t bLength; -- u_int8_t bDescriptorType; -- u_int8_t bEndpointAddress; -- u_int8_t bmAttributes; -- u_int16_t wMaxPacketSize; -- u_int8_t bInterval; -- u_int8_t bRefresh; -- u_int8_t bSynchAddress; -+ uint8_t bLength; -+ uint8_t bDescriptorType; -+ uint8_t bEndpointAddress; -+ uint8_t bmAttributes; -+ uint16_t wMaxPacketSize; -+ uint8_t bInterval; -+ uint8_t bRefresh; -+ uint8_t bSynchAddress; - - unsigned char *extra; /* Extra descriptors */ - int extralen; -@@ -129,15 +130,15 @@ struct usb_endpoint_descriptor { - /* Interface descriptor */ - #define USB_MAXINTERFACES 32 - struct usb_interface_descriptor { -- u_int8_t bLength; -- u_int8_t bDescriptorType; -- u_int8_t bInterfaceNumber; -- u_int8_t bAlternateSetting; -- u_int8_t bNumEndpoints; -- u_int8_t bInterfaceClass; -- u_int8_t bInterfaceSubClass; -- u_int8_t bInterfaceProtocol; -- u_int8_t iInterface; -+ uint8_t bLength; -+ uint8_t bDescriptorType; -+ uint8_t bInterfaceNumber; -+ uint8_t bAlternateSetting; -+ uint8_t bNumEndpoints; -+ uint8_t bInterfaceClass; -+ uint8_t bInterfaceSubClass; -+ uint8_t bInterfaceProtocol; -+ uint8_t iInterface; - - struct usb_endpoint_descriptor *endpoint; - -@@ -155,14 +156,14 @@ struct usb_interface { - /* Configuration descriptor information.. */ - #define USB_MAXCONFIG 8 - struct usb_config_descriptor { -- u_int8_t bLength; -- u_int8_t bDescriptorType; -- u_int16_t wTotalLength; -- u_int8_t bNumInterfaces; -- u_int8_t bConfigurationValue; -- u_int8_t iConfiguration; -- u_int8_t bmAttributes; -- u_int8_t MaxPower; -+ uint8_t bLength; -+ uint8_t bDescriptorType; -+ uint16_t wTotalLength; -+ uint8_t bNumInterfaces; -+ uint8_t bConfigurationValue; -+ uint8_t iConfiguration; -+ uint8_t bmAttributes; -+ uint8_t MaxPower; - - struct usb_interface *interface; - -@@ -172,28 +173,28 @@ struct usb_config_descriptor { - - /* Device descriptor */ - struct usb_device_descriptor { -- u_int8_t bLength; -- u_int8_t bDescriptorType; -- u_int16_t bcdUSB; -- u_int8_t bDeviceClass; -- u_int8_t bDeviceSubClass; -- u_int8_t bDeviceProtocol; -- u_int8_t bMaxPacketSize0; -- u_int16_t idVendor; -- u_int16_t idProduct; -- u_int16_t bcdDevice; -- u_int8_t iManufacturer; -- u_int8_t iProduct; -- u_int8_t iSerialNumber; -- u_int8_t bNumConfigurations; -+ uint8_t bLength; -+ uint8_t bDescriptorType; -+ uint16_t bcdUSB; -+ uint8_t bDeviceClass; -+ uint8_t bDeviceSubClass; -+ uint8_t bDeviceProtocol; -+ uint8_t bMaxPacketSize0; -+ uint16_t idVendor; -+ uint16_t idProduct; -+ uint16_t bcdDevice; -+ uint8_t iManufacturer; -+ uint8_t iProduct; -+ uint8_t iSerialNumber; -+ uint8_t bNumConfigurations; - }; - - struct usb_ctrl_setup { -- u_int8_t bRequestType; -- u_int8_t bRequest; -- u_int16_t wValue; -- u_int16_t wIndex; -- u_int16_t wLength; -+ uint8_t bRequestType; -+ uint8_t bRequest; -+ uint16_t wValue; -+ uint16_t wIndex; -+ uint16_t wLength; - }; - - /* -@@ -254,7 +255,7 @@ struct usb_device { - - void *dev; /* Darwin support */ - -- u_int8_t devnum; -+ uint8_t devnum; - - unsigned char num_children; - struct usb_device **children; -@@ -266,7 +267,7 @@ struct usb_bus { - char dirname[PATH_MAX + 1]; - - struct usb_device *devices; -- u_int32_t location; -+ uint32_t location; - - struct usb_device *root_dev; - }; From 4f4f6def0ecb299f0bafb0ece8c4979e0fca869e Mon Sep 17 00:00:00 2001 From: Filip Moc Date: Tue, 24 Nov 2020 22:27:44 +0100 Subject: [PATCH 14/69] ramips: add license to TP-Link MR6400 v4's DTS Signed-off-by: Filip Moc --- target/linux/ramips/dts/mt7628an_tplink_tl-mr6400-v4.dts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/target/linux/ramips/dts/mt7628an_tplink_tl-mr6400-v4.dts b/target/linux/ramips/dts/mt7628an_tplink_tl-mr6400-v4.dts index f0b87b5312..787abfad55 100644 --- a/target/linux/ramips/dts/mt7628an_tplink_tl-mr6400-v4.dts +++ b/target/linux/ramips/dts/mt7628an_tplink_tl-mr6400-v4.dts @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + #include "mt7628an_tplink_8m.dtsi" / { From 8e8fcce60950fab2428b5ad91fdd83154710797c Mon Sep 17 00:00:00 2001 From: Rui Salvaterra Date: Wed, 25 Nov 2020 09:38:51 +0000 Subject: [PATCH 15/69] apm821xx: clean up target/subtarget features Move features common to all subtargets to the parent target. Signed-off-by: Rui Salvaterra [split patch to make it target-specific, adjust commit title/message] Signed-off-by: Adrian Schmutzler --- target/linux/apm821xx/Makefile | 2 +- target/linux/apm821xx/nand/target.mk | 2 +- target/linux/apm821xx/sata/target.mk | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/target/linux/apm821xx/Makefile b/target/linux/apm821xx/Makefile index c7e27d3214..bae20d0d04 100644 --- a/target/linux/apm821xx/Makefile +++ b/target/linux/apm821xx/Makefile @@ -8,7 +8,7 @@ ARCH:=powerpc BOARD:=apm821xx BOARDNAME:=AppliedMicro APM821xx CPU_TYPE:=464fp -FEATURES:=fpu dt gpio +FEATURES:=fpu dt gpio ramdisk squashfs usb SUBTARGETS:=nand sata KERNEL_PATCHVER:=5.4 diff --git a/target/linux/apm821xx/nand/target.mk b/target/linux/apm821xx/nand/target.mk index d40b0fbc19..208ea10b91 100644 --- a/target/linux/apm821xx/nand/target.mk +++ b/target/linux/apm821xx/nand/target.mk @@ -1,5 +1,5 @@ BOARDNAME:=Devices with NAND flash (Routers) -FEATURES += nand pcie ramdisk squashfs usb +FEATURES += nand pcie DEFAULT_PACKAGES += kmod-ath9k swconfig wpad-basic-wolfssl diff --git a/target/linux/apm821xx/sata/target.mk b/target/linux/apm821xx/sata/target.mk index 43b1aa0324..b27b7ff583 100644 --- a/target/linux/apm821xx/sata/target.mk +++ b/target/linux/apm821xx/sata/target.mk @@ -1,6 +1,6 @@ BOARDNAME := Devices which boot from SATA (NAS) DEVICE_TYPE := nas -FEATURES += ext4 usb ramdisk squashfs rootfs-part boot-part +FEATURES += boot-part ext4 rootfs-part DEFAULT_PACKAGES += badblocks block-mount e2fsprogs kmod-hwmon-drivetemp \ kmod-dm kmod-md-mod partx-utils mkf2fs f2fsck From f1c652337628eace40da3ded804d8c1b8ec4d63c Mon Sep 17 00:00:00 2001 From: Rui Salvaterra Date: Wed, 25 Nov 2020 09:38:51 +0000 Subject: [PATCH 16/69] lantiq: clean up target/subtarget features The feature "squashfs" is defined for target and all subtargets individually. Remove the redundant entries in the subtargets. Signed-off-by: Rui Salvaterra [split patch, adjust commit title/message] Signed-off-by: Adrian Schmutzler --- target/linux/lantiq/ase/target.mk | 2 +- target/linux/lantiq/falcon/target.mk | 2 +- target/linux/lantiq/xrx200/target.mk | 2 +- target/linux/lantiq/xway/target.mk | 2 +- target/linux/lantiq/xway_legacy/target.mk | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/target/linux/lantiq/ase/target.mk b/target/linux/lantiq/ase/target.mk index 5f6c03b38e..82a162bbb1 100644 --- a/target/linux/lantiq/ase/target.mk +++ b/target/linux/lantiq/ase/target.mk @@ -7,7 +7,7 @@ ARCH:=mips SUBTARGET:=ase BOARDNAME:=Amazon-SE -FEATURES:=squashfs atm mips16 small_flash +FEATURES:=atm mips16 small_flash CPU_TYPE:=mips32 DEFAULT_PACKAGES+=kmod-leds-gpio kmod-gpio-button-hotplug \ diff --git a/target/linux/lantiq/falcon/target.mk b/target/linux/lantiq/falcon/target.mk index 3c848dfda7..ddab198849 100644 --- a/target/linux/lantiq/falcon/target.mk +++ b/target/linux/lantiq/falcon/target.mk @@ -1,7 +1,7 @@ ARCH:=mips SUBTARGET:=falcon BOARDNAME:=Falcon -FEATURES:=squashfs nand +FEATURES:=nand CPU_TYPE:=24kc DEFAULT_PACKAGES+= kmod-leds-gpio \ diff --git a/target/linux/lantiq/xrx200/target.mk b/target/linux/lantiq/xrx200/target.mk index 4d92b25bcb..8497db51ba 100644 --- a/target/linux/lantiq/xrx200/target.mk +++ b/target/linux/lantiq/xrx200/target.mk @@ -1,7 +1,7 @@ ARCH:=mips SUBTARGET:=xrx200 BOARDNAME:=XRX200 -FEATURES:=squashfs atm nand ramdisk +FEATURES:=atm nand ramdisk CPU_TYPE:=24kc DEFAULT_PACKAGES+=kmod-leds-gpio \ diff --git a/target/linux/lantiq/xway/target.mk b/target/linux/lantiq/xway/target.mk index 550c61edf0..9ad240e8ca 100644 --- a/target/linux/lantiq/xway/target.mk +++ b/target/linux/lantiq/xway/target.mk @@ -1,7 +1,7 @@ ARCH:=mips SUBTARGET:=xway BOARDNAME:=XWAY -FEATURES:=squashfs atm nand ramdisk +FEATURES:=atm nand ramdisk CPU_TYPE:=24kc DEFAULT_PACKAGES+=kmod-leds-gpio kmod-gpio-button-hotplug swconfig diff --git a/target/linux/lantiq/xway_legacy/target.mk b/target/linux/lantiq/xway_legacy/target.mk index 7678030ead..641c590d48 100644 --- a/target/linux/lantiq/xway_legacy/target.mk +++ b/target/linux/lantiq/xway_legacy/target.mk @@ -1,7 +1,7 @@ ARCH:=mips SUBTARGET:=xway_legacy BOARDNAME:=XWAY Legacy -FEATURES:=squashfs atm ramdisk small_flash +FEATURES:=atm ramdisk small_flash CPU_TYPE:=24kc DEFAULT_PACKAGES+=kmod-leds-gpio kmod-gpio-button-hotplug swconfig From b31aaa0580c94bc69e1891932f41ff10e5cb2da2 Mon Sep 17 00:00:00 2001 From: Michael Pratt Date: Wed, 4 Nov 2020 19:32:27 -0500 Subject: [PATCH 17/69] ath79: add support for Senao Engenius EAP300 v2 FCC ID: A8J-EAP300A Engenius EAP300 v2 is an indoor wireless access point with a 100/10-BaseT ethernet port, 2.4 GHz wireless, internal antennas, and 802.3af PoE. **Specification:** - AR9341 - 40 MHz reference clock - 16 MB FLASH MX25L12845EMI-10G - 64 MB RAM - UART at J1 (populated) - Ethernet port with POE - internal antennas - 3 LEDs, 1 button (power, eth, wlan) (reset) **MAC addresses:** phy0 *:d3 art 0x1002 (label) eth0 *:d4 art 0x0/0x6 **Installation:** - if you get Failsafe Mode from failed flash: only use it to flash Original firmware from Engenius or risk kernel loop or halt which requires serial cable Method 1: Firmware upgrade page: OEM webpage at 192.168.1.1 username and password "admin" Navigate to "Firmware" page from left pane Click Browse and select the factory.bin image Upload and verify checksum Click Continue to confirm and wait 3 minutes Method 2: Serial to load Failsafe webpage: After connecting to serial console and rebooting... Interrupt uboot with any key pressed rapidly execute `run failsafe_boot` OR `bootm 0x9fdf0000` wait a minute connect to ethernet and navigate to "192.168.1.1/index.htm" Select the factory.bin image and upload wait about 3 minutes **Return to OEM:** If you have a serial cable, see Serial Failsafe instructions *DISCLAIMER* The Failsafe image is unique to Engenius boards. If the failsafe image is missing or damaged this will not work DO NOT downgrade to ar71xx this way, can cause kernel loop or halt The easiest way to return to the OEM software is the Failsafe image If you dont have a serial cable, you can ssh into openwrt and run `mtd -r erase fakeroot` Wait 3 minutes connect to ethernet and navigate to 192.168.1.1/index.htm select OEM firmware image from Engenius and click upgrade **TFTP recovery** (unstable / not reliable): rename initramfs to 'vmlinux-art-ramdisk' make available on TFTP server at 192.168.1.101 power board while holding or pressing reset button repeatedly NOTE: for some Engenius boards TFTP is not reliable try setting MTU to 600 and try many times **Format of OEM firmware image:** The OEM software of EAP300 v2 is a heavily modified version of Openwrt Kamikaze. One of the many modifications is to the sysupgrade program. Image verification is performed simply by the successful ungzip and untar of the supplied file and name check and header verification of the resulting contents. To form a factory.bin that is accepted by OEM Openwrt build, the kernel and rootfs must have specific names and begin with the respective headers (uImage, squashfs). Then the files must be tarballed and gzipped. The resulting binary is actually a tar.gz file in disguise. This can be verified by using binwalk on the OEM firmware images, ungzipping then untaring. The OEM upgrade script is at /etc/fwupgrade.sh. OKLI kernel loader is required because the OEM software expects the kernel size to be no greater than 1536k and otherwise the factory.bin upgrade procedure would overwrite part of the kernel when writing rootfs. Signed-off-by: Michael Pratt [clarify MAC address section, bump PKG_RELEASE for uboot-envtools] Signed-off-by: Adrian Schmutzler --- package/boot/uboot-envtools/Makefile | 2 +- package/boot/uboot-envtools/files/ath79 | 1 + .../ath79/dts/ar9341_engenius_eap300-v2.dts | 169 ++++++++++++++++++ .../generic/base-files/etc/board.d/01_leds | 1 + .../generic/base-files/etc/board.d/02_network | 2 + target/linux/ath79/image/generic.mk | 11 ++ 6 files changed, 185 insertions(+), 1 deletion(-) create mode 100644 target/linux/ath79/dts/ar9341_engenius_eap300-v2.dts diff --git a/package/boot/uboot-envtools/Makefile b/package/boot/uboot-envtools/Makefile index 4a86376f7c..7ab3619a85 100644 --- a/package/boot/uboot-envtools/Makefile +++ b/package/boot/uboot-envtools/Makefile @@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=uboot-envtools PKG_DISTNAME:=u-boot PKG_VERSION:=2020.04 -PKG_RELEASE:=6 +PKG_RELEASE:=7 PKG_SOURCE:=$(PKG_DISTNAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:= \ diff --git a/package/boot/uboot-envtools/files/ath79 b/package/boot/uboot-envtools/files/ath79 index 4083a5be20..259c52c770 100644 --- a/package/boot/uboot-envtools/files/ath79 +++ b/package/boot/uboot-envtools/files/ath79 @@ -23,6 +23,7 @@ allnet,all-wap02860ac|\ arduino,yun|\ buffalo,bhr-4grv2|\ devolo,magic-2-wifi|\ +engenius,eap300-v2|\ engenius,ecb1750|\ engenius,enh202-v1|\ engenius,ens202ext-v1|\ diff --git a/target/linux/ath79/dts/ar9341_engenius_eap300-v2.dts b/target/linux/ath79/dts/ar9341_engenius_eap300-v2.dts new file mode 100644 index 0000000000..d41a6e7a75 --- /dev/null +++ b/target/linux/ath79/dts/ar9341_engenius_eap300-v2.dts @@ -0,0 +1,169 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "ar9341.dtsi" + +#include +#include + +/ { + model = "Engenius EAP300 v2"; + compatible = "engenius,eap300-v2", "qca,ar9341"; + + aliases { + serial0 = &uart; + led-boot = &led_power; + led-failsafe = &led_power; + led-running = &led_power; + led-upgrade = &led_power; + }; + + keys { + compatible = "gpio-keys"; + + reset { + label = "reset"; + gpios = <&gpio 1 GPIO_ACTIVE_LOW>; + debounce-interval = <60>; + linux,code = ; + }; + }; + + leds { + compatible = "gpio-leds"; + + led_power: power { + label = "blue:power"; + gpios = <&gpio 0 GPIO_ACTIVE_LOW>; + default-state = "on"; + }; + + wlan { + label = "blue:wlan"; + gpios = <&gpio 17 GPIO_ACTIVE_LOW>; + linux,default-trigger = "phy0tpt"; + }; + + lan { + label = "blue:lan"; + gpios = <&gpio 16 GPIO_ACTIVE_LOW>; + }; + }; + + virtual_flash { + compatible = "mtd-concat"; + + devices = <&firmware1 &firmware2>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + compatible = "openwrt,okli"; + label = "firmware"; + reg = <0x0 0x0>; + }; + }; + }; +}; + +&ref { + clock-frequency = <40000000>; +}; + +&uart { + status = "okay"; +}; + +&spi { + status = "okay"; + + num-cs = <1>; + + flash@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <20000000>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "u-boot"; + reg = <0x000000 0x040000>; + read-only; + }; + + partition@40000 { + label = "u-boot-env"; + reg = <0x040000 0x010000>; + }; + + partition@50000 { + label = "custom"; + reg = <0x050000 0x050000>; + read-only; + }; + + partition@a0000 { + label = "loader"; + reg = <0x0a0000 0x010000>; + read-only; + }; + + firmware2: partition@b0000 { + label = "firmware2"; + reg = <0x0b0000 0x170000>; + }; + + partition@220000 { + label = "fakeroot"; + reg = <0x220000 0x010000>; + read-only; + }; + + firmware1: partition@230000 { + label = "firmware1"; + reg = <0x230000 0xbc0000>; + }; + + partition@df0000 { + label = "failsafe"; + reg = <0xdf0000 0x200000>; + read-only; + }; + + art: partition@ff0000 { + label = "art"; + reg = <0xff0000 0x010000>; + read-only; + }; + }; + }; +}; + +ð0 { + status = "okay"; + + mtd-mac-address = <&art 0x0>; + + phy-handle = <&swphy0>; + + gmac-config { + device = <&gmac>; + switch-phy-swap = <1>; + }; +}; + +ð1 { + compatible = "syscon", "simple-mfd"; +}; + +&wmac { + status = "okay"; + + mtd-cal-data = <&art 0x1000>; +}; 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 a345dca4af..a0ed21e318 100755 --- a/target/linux/ath79/generic/base-files/etc/board.d/01_leds +++ b/target/linux/ath79/generic/base-files/etc/board.d/01_leds @@ -150,6 +150,7 @@ telco,t1) ucidef_set_led_netdev "wan" "WAN" "blue:wan" "eth1" ;; comfast,cf-wr752ac-v1|\ +engenius,eap300-v2|\ engenius,ecb1750|\ enterasys,ws-ap3705i) ucidef_set_led_netdev "lan" "LAN" "blue:lan" "eth0" 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 5fbf4e2561..5c0195f6ff 100755 --- a/target/linux/ath79/generic/base-files/etc/board.d/02_network +++ b/target/linux/ath79/generic/base-files/etc/board.d/02_network @@ -28,6 +28,7 @@ ath79_setup_interfaces() dlink,dap-1330-a1|\ dlink,dap-1365-a1|\ dlink,dir-505|\ + engenius,eap300-v2|\ engenius,ecb1750|\ enterasys,ws-ap3705i|\ glinet,gl-ar300m-lite|\ @@ -424,6 +425,7 @@ ath79_setup_macs() alfa-network,n5q|\ alfa-network,pi-wifi4|\ alfa-network,r36a|\ + engenius,eap300-v2|\ engenius,ens202ext-v1) label_mac=$(mtd_get_mac_binary art 0x1002) ;; diff --git a/target/linux/ath79/image/generic.mk b/target/linux/ath79/image/generic.mk index fc8b136c51..aedab1cc76 100644 --- a/target/linux/ath79/image/generic.mk +++ b/target/linux/ath79/image/generic.mk @@ -862,6 +862,17 @@ define Device/engenius_loader_okli check-size | engenius-tar-gz $$$$(ENGENIUS_IMGNAME) endef +define Device/engenius_eap300-v2 + $(Device/engenius_loader_okli) + SOC := ar9341 + DEVICE_MODEL := EAP300 + DEVICE_VARIANT := v2 + IMAGE_SIZE := 12032k + LOADER_FLASH_OFFS := 0x230000 + ENGENIUS_IMGNAME := senao-eap300v2 +endef +TARGET_DEVICES += engenius_eap300-v2 + define Device/engenius_ecb1750 SOC := qca9558 DEVICE_VENDOR := EnGenius From b641eb6ecfbfc2c6a488483332d4b5a6ee4c736c Mon Sep 17 00:00:00 2001 From: Filip Moc Date: Tue, 24 Nov 2020 22:15:26 +0100 Subject: [PATCH 18/69] ramips: add support for TP-Link MR6400 v5 TL-MR6400v5 is very similar to TL-MR6400v4. Main differences are: - smaller form factor - different LED GPIOs - different switch connections You can flash via tftp recovery: - serve tftp-recovery image as /tp_recovery.bin on 192.168.0.225/24 - connect to any ethernet port - power on the device while holding the reset button - wait at least 8 seconds before releasing reset button Flashing via OEM web interface does not work. LTE module does not support DHCP so it must be configured via QMI. Hardware Specification (v5.0 EU): - SoC: MT7628NN - Flash: Winbond W25Q64JVS (8MiB) - RAM: ESMT M14D5121632A (64MiB) - Wireless: SoC platform only (2.4GHz b/g/n, 2x internal antenna) - Ethernet: 1NIC (4x100M) - WWAN: TP-LINK LTE MODULE (2x external detachable antenna) - Power: DC 9V 0.85A Signed-off-by: Filip Moc --- .../dts/mt7628an_tplink_tl-mr6400-v5.dts | 99 +++++++++++++++++++ target/linux/ramips/image/mt76x8.mk | 16 +++ .../mt76x8/base-files/etc/board.d/01_leds | 4 + .../mt76x8/base-files/etc/board.d/02_network | 4 + 4 files changed, 123 insertions(+) create mode 100644 target/linux/ramips/dts/mt7628an_tplink_tl-mr6400-v5.dts diff --git a/target/linux/ramips/dts/mt7628an_tplink_tl-mr6400-v5.dts b/target/linux/ramips/dts/mt7628an_tplink_tl-mr6400-v5.dts new file mode 100644 index 0000000000..71e9694dde --- /dev/null +++ b/target/linux/ramips/dts/mt7628an_tplink_tl-mr6400-v5.dts @@ -0,0 +1,99 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "mt7628an_tplink_8m.dtsi" + +/ { + compatible = "tplink,tl-mr6400-v5", "mediatek,mt7628an-soc"; + model = "TP-Link TL-MR6400 v5"; + + aliases { + led-boot = &led_power; + led-failsafe = &led_power; + led-running = &led_power; + led-upgrade = &led_power; + }; + + keys { + compatible = "gpio-keys"; + + reset { + label = "reset"; + gpios = <&gpio 38 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + + rfkill { + label = "rfkill"; + gpios = <&gpio 46 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + }; + + leds { + compatible = "gpio-leds"; + + wlan { + label = "white:wlan"; + gpios = <&gpio 4 GPIO_ACTIVE_LOW>; + linux,default-trigger = "phy0tpt"; + }; + + lan { + label = "white:lan"; + gpios = <&gpio 5 GPIO_ACTIVE_LOW>; + }; + + led_power: power { + label = "white:power"; + gpios = <&gpio 39 GPIO_ACTIVE_LOW>; + }; + + wan { + label = "white:wan"; + gpios = <&gpio 40 GPIO_ACTIVE_LOW>; + }; + + signal1 { + label = "white:signal1"; + gpios = <&gpio 41 GPIO_ACTIVE_LOW>; + }; + + signal2 { + label = "white:signal2"; + gpios = <&gpio 42 GPIO_ACTIVE_LOW>; + }; + + signal3 { + label = "white:signal3"; + gpios = <&gpio 43 GPIO_ACTIVE_LOW>; + }; + }; +}; + +&ehci { + status = "okay"; +}; + +&ohci { + status = "okay"; +}; + +&state_default { + gpio { + groups = "i2c", "p0led_an", "p1led_an", "p2led_an", "p3led_an", "p4led_an", "uart1", "wdt"; + function = "gpio"; + }; +}; + +&esw { + mediatek,portmap = <0x37>; + mediatek,portdisable = <0x30>; +}; + +&wmac { + mtd-mac-address = <&factory 0x1f100>; +}; + +ðernet { + mtd-mac-address = <&factory 0x1f100>; +}; diff --git a/target/linux/ramips/image/mt76x8.mk b/target/linux/ramips/image/mt76x8.mk index 30c41420aa..72539f7a14 100644 --- a/target/linux/ramips/image/mt76x8.mk +++ b/target/linux/ramips/image/mt76x8.mk @@ -498,6 +498,22 @@ define Device/tplink_tl-mr6400-v4 endef TARGET_DEVICES += tplink_tl-mr6400-v4 +define Device/tplink_tl-mr6400-v5 + $(Device/tplink-v2) + IMAGE_SIZE := 7808k + DEVICE_MODEL := TL-MR6400 + DEVICE_VARIANT := v5 + TPLINK_FLASHLAYOUT := 8Mmtk + TPLINK_HWID := 0x64000005 + TPLINK_HWREV := 0x5 + TPLINK_HWREVADD := 0x5 + DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci kmod-usb-ledtrig-usbport \ + kmod-usb-serial kmod-usb-serial-option kmod-usb-net-qmi-wwan uqmi + IMAGES := sysupgrade.bin tftp-recovery.bin + IMAGE/tftp-recovery.bin := pad-extra 128k | $$(IMAGE/factory.bin) +endef +TARGET_DEVICES += tplink_tl-mr6400-v5 + define Device/tplink_tl-wa801nd-v5 $(Device/tplink-v2) IMAGE_SIZE := 7808k diff --git a/target/linux/ramips/mt76x8/base-files/etc/board.d/01_leds b/target/linux/ramips/mt76x8/base-files/etc/board.d/01_leds index 4ed38bf5f2..31bd9e05b1 100755 --- a/target/linux/ramips/mt76x8/base-files/etc/board.d/01_leds +++ b/target/linux/ramips/mt76x8/base-files/etc/board.d/01_leds @@ -79,6 +79,10 @@ tplink,tl-mr6400-v4) ucidef_set_led_switch "lan" "lan" "white:lan" "switch0" "0x0e" ucidef_set_led_switch "wan" "wan" "white:wan" "switch0" "0x10" ;; +tplink,tl-mr6400-v5) + ucidef_set_led_switch "lan" "lan" "white:lan" "switch0" "0x07" + ucidef_set_led_switch "wan" "wan" "white:wan" "switch0" "0x08" + ;; tplink,tl-wr841n-v13) ucidef_set_led_wlan "wlan2g" "wlan2g" "green:wlan" "phy0tpt" ucidef_set_led_switch "lan1" "lan1" "green:lan1" "switch0" "0x2" diff --git a/target/linux/ramips/mt76x8/base-files/etc/board.d/02_network b/target/linux/ramips/mt76x8/base-files/etc/board.d/02_network index a7e978a2e2..f4e3fcacb5 100755 --- a/target/linux/ramips/mt76x8/base-files/etc/board.d/02_network +++ b/target/linux/ramips/mt76x8/base-files/etc/board.d/02_network @@ -116,6 +116,10 @@ ramips_setup_interfaces() ucidef_add_switch "switch0" \ "1:lan" "2:lan" "3:lan" "4:wan" "6@eth0" ;; + tplink,tl-mr6400-v5) + ucidef_add_switch "switch0" \ + "0:lan" "1:lan" "2:lan" "3:wan" "6@eth0" + ;; tplink,tl-wr902ac-v3) ucidef_add_switch "switch0" \ "4:lan" "6@eth0" From bffb30603cca586ee2a5713748ed1f6e76d6754b Mon Sep 17 00:00:00 2001 From: Adrian Schmutzler Date: Wed, 25 Nov 2020 13:48:01 +0100 Subject: [PATCH 19/69] mvebu: remove redundant patch for Linksys LED trigger Remove 004-add_sata_disk_activity_trigger.patch, as the trigger is already added in shared dtsi. Suggested-by: Tomasz Maciej Nowak Signed-off-by: Adrian Schmutzler --- .../004-add_sata_disk_activity_trigger.patch | 39 ------------------- 1 file changed, 39 deletions(-) delete mode 100644 target/linux/mvebu/patches-5.4/004-add_sata_disk_activity_trigger.patch diff --git a/target/linux/mvebu/patches-5.4/004-add_sata_disk_activity_trigger.patch b/target/linux/mvebu/patches-5.4/004-add_sata_disk_activity_trigger.patch deleted file mode 100644 index 2cb8f25490..0000000000 --- a/target/linux/mvebu/patches-5.4/004-add_sata_disk_activity_trigger.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 172230195068703b78ad5733a09492f5d6814c09 Mon Sep 17 00:00:00 2001 -From: Ansuel Smith -Date: Tue, 28 Feb 2017 14:15:50 +0100 -Subject: [PATCH] ARM: dts: armada: Add default trigger for sata led - -In others board we have the sata led set to function -with the sata led trigger by default. -This patch makes the same for these board that have sata -led but get disabled by not associating it to any trigger. - -Signed-off-by: Ansuel Smith -Acked-by: Jason Cooper -Signed-off-by: Gregory CLEMENT ---- - arch/arm/boot/dts/armada-385-linksys-caiman.dts | 1 + - arch/arm/boot/dts/armada-385-linksys-cobra.dts | 1 + - arch/arm/boot/dts/armada-xp-linksys-mamba.dts | 1 + - 3 files changed, 3 insertions(+) - ---- a/arch/arm/boot/dts/armada-385-linksys-caiman.dts -+++ b/arch/arm/boot/dts/armada-385-linksys-caiman.dts -@@ -68,6 +68,7 @@ - - sata { - label = "caiman:white:sata"; -+ linux,default-trigger = "disk-activity"; - }; - }; - ---- a/arch/arm/boot/dts/armada-385-linksys-cobra.dts -+++ b/arch/arm/boot/dts/armada-385-linksys-cobra.dts -@@ -68,6 +68,7 @@ - - sata { - label = "cobra:white:sata"; -+ linux,default-trigger = "disk-activity"; - }; - }; - From 92b3efec54b36797614650c830a57c4f8786b5c9 Mon Sep 17 00:00:00 2001 From: Tomasz Maciej Nowak Date: Mon, 23 Nov 2020 14:59:45 +0100 Subject: [PATCH 20/69] mvebu: sort patches Sort patches according to target/linux/generic/PATCHES. Additionally: - replace hashes in backported patches with the ones from main Linux tree - add descriptions to some patches Signed-off-by: Tomasz Maciej Nowak [remove 004-add_sata_disk_activity_trigger.patch separately] Signed-off-by: Adrian Schmutzler --- ...-for-endpoint-to-be-ready-before-tr.patch} | 0 ...t-rely-on-jiffies-while-holding-spi.patch} | 0 ...troduce-mvneta_update_stats-routine.patch} | 2 +- ...uce-page-pool-API-for-sw-buffer-man.patch} | 2 +- ...n-build_skb-in-mvneta_rx_swbm-poll-.patch} | 2 +- ...06-net-mvneta-add-basic-XDP-support.patch} | 2 +- ...eader-prefetch-in-mvneta_swbm_rx_fr.patch} | 2 +- ...vneta-make-tx-buffer-array-agnostic.patch} | 2 +- ...> 009-net-mvneta-add-XDP_TX-support.patch} | 2 +- ...ix-build-skb-for-bm-capable-devices.patch} | 0 ...arm64-dts-uDPU-remove-i2c-fast-mode.patch} | 7 ++-- ...s-uDPU-SFP-cages-support-3W-modules.patch} | 7 ++-- ...n-page_pool_recycle_direct-in-mvnet.patch} | 0 ...allow-XDP-program-on-hardware-buffe.patch} | 0 ...P-support-if-sw-bm-is-used-as-fallb.patch} | 0 ...n-link-immediately-after-enabling-t.patch} | 0 ...-PCI-aardvark-Improve-link-training.patch} | 0 ...8-PCI-aardvark-Issue-PERST-via-GPIO.patch} | 0 ...=> 019-PCI-aardvark-Add-PHY-support.patch} | 0 ...-armada-37xx-Set-pcie_reset_pin-to-.patch} | 2 +- ...-armada-37xx-Move-PCIe-comphy-handl.patch} | 2 +- ...-armada-37xx-Move-PCIe-max-link-spe.patch} | 2 +- ...arm64-dts-add-uDPU-i2c-bus-recovery.patch} | 10 +++--- ...t-touch-PCIe-registers-if-no-card-c.patch} | 0 ...dd-driver-for-LinkStation-power-off.patch} | 32 ++++++++++++++++- ...initialization-with-old-Marvell-s-A.patch} | 0 ...-espressobin-Add-ethernet-switch-al.patch} | 0 ...angle-bootloader-s-kernel-arguments.patch} | 0 ...mvebu-armada-38x-enable-libata-leds.patch} | 0 ...tables.patch => 302-add_powertables.patch} | 0 ...-linksys_hardcode_nand_ecc_settings.patch} | 0 ...delay.patch => 304-revert_i2c_delay.patch} | 0 ...=> 305-armada-385-rd-mtd-partitions.patch} | 0 ...306-ARM-mvebu-385-ap-Add-partitions.patch} | 0 ...armada-xp-linksys-mamba-broken-idle.patch} | 0 ... => 308-armada-xp-linksys-mamba-wan.patch} | 0 ...led.patch => 309-linksys-status-led.patch} | 0 ...=> 310-linksys-use-eth0-as-cpu-port.patch} | 0 ...> 311-adjust-compatible-for-linksys.patch} | 0 ...a388-clearfog-emmc-on-clearfog-base.patch} | 0 ...=> 312-helios4-dts-status-led-alias.patch} | 0 ...s-marvell-armada37xx-Add-eth0-alias.patch} | 0 ...-armada-3720-espressobin-add-ports-.patch} | 0 ...-espressobin-remove-COMPHY-nodes-as.patch} | 0 ...witch-PHY-operation-mode-to-2500base.patch | 34 +++++++++++++++++++ ..._root.patch => 400-find_active_root.patch} | 0 ...witch-PHY-operation-mode-to-2500base.patch | 20 ----------- ...h => 700-mvneta-tx-queue-workaround.patch} | 0 ...icate-failure-to-enter-deeper-sleep.patch} | 0 ...pci-mvebu-time-out-reset-on-link-up.patch} | 0 50 files changed, 87 insertions(+), 43 deletions(-) rename target/linux/mvebu/patches-5.4/{402-PCI-aardvark-Wait-for-endpoint-to-be-ready-before-tr.patch => 001-PCI-aardvark-Wait-for-endpoint-to-be-ready-before-tr.patch} (100%) rename target/linux/mvebu/patches-5.4/{403-PCI-aardvark-Don-t-rely-on-jiffies-while-holding-spi.patch => 002-PCI-aardvark-Don-t-rely-on-jiffies-while-holding-spi.patch} (100%) rename target/linux/mvebu/patches-5.4/{010-net-mvneta-introduce-mvneta_update_stats-routine.patch => 003-net-mvneta-introduce-mvneta_update_stats-routine.patch} (97%) rename target/linux/mvebu/patches-5.4/{011-net-mvneta-introduce-page-pool-API-for-sw-buffer-man.patch => 004-net-mvneta-introduce-page-pool-API-for-sw-buffer-man.patch} (98%) rename target/linux/mvebu/patches-5.4/{012-net-mvneta-rely-on-build_skb-in-mvneta_rx_swbm-poll-.patch => 005-net-mvneta-rely-on-build_skb-in-mvneta_rx_swbm-poll-.patch} (99%) rename target/linux/mvebu/patches-5.4/{013-net-mvneta-add-basic-XDP-support.patch => 006-net-mvneta-add-basic-XDP-support.patch} (99%) rename target/linux/mvebu/patches-5.4/{014-net-mvneta-move-header-prefetch-in-mvneta_swbm_rx_fr.patch => 007-net-mvneta-move-header-prefetch-in-mvneta_swbm_rx_fr.patch} (95%) rename target/linux/mvebu/patches-5.4/{015-net-mvneta-make-tx-buffer-array-agnostic.patch => 008-net-mvneta-make-tx-buffer-array-agnostic.patch} (98%) rename target/linux/mvebu/patches-5.4/{016-net-mvneta-add-XDP_TX-support.patch => 009-net-mvneta-add-XDP_TX-support.patch} (98%) rename target/linux/mvebu/patches-5.4/{020-net-mvneta-fix-build-skb-for-bm-capable-devices.patch => 010-net-mvneta-fix-build-skb-for-bm-capable-devices.patch} (100%) rename target/linux/mvebu/patches-5.4/{545-arm64-dts-uDPU-remove-i2c-fast-mode.patch => 011-arm64-dts-uDPU-remove-i2c-fast-mode.patch} (76%) rename target/linux/mvebu/patches-5.4/{546-arm64-dts-uDPU-SFP-cages-support-3W-modules.patch => 012-arm64-dts-uDPU-SFP-cages-support-3W-modules.patch} (81%) rename target/linux/mvebu/patches-5.4/{021-net-mvneta-rely-on-page_pool_recycle_direct-in-mvnet.patch => 013-net-mvneta-rely-on-page_pool_recycle_direct-in-mvnet.patch} (100%) rename target/linux/mvebu/patches-5.4/{022-mvneta-driver-disallow-XDP-program-on-hardware-buffe.patch => 014-mvneta-driver-disallow-XDP-program-on-hardware-buffe.patch} (100%) rename target/linux/mvebu/patches-5.4/{023-net-mvneta-fix-XDP-support-if-sw-bm-is-used-as-fallb.patch => 015-net-mvneta-fix-XDP-support-if-sw-bm-is-used-as-fallb.patch} (100%) rename target/linux/mvebu/patches-5.4/{404-PCI-aardvark-Train-link-immediately-after-enabling-t.patch => 016-PCI-aardvark-Train-link-immediately-after-enabling-t.patch} (100%) rename target/linux/mvebu/patches-5.4/{405-PCI-aardvark-Improve-link-training.patch => 017-PCI-aardvark-Improve-link-training.patch} (100%) rename target/linux/mvebu/patches-5.4/{406-PCI-aardvark-Issue-PERST-via-GPIO.patch => 018-PCI-aardvark-Issue-PERST-via-GPIO.patch} (100%) rename target/linux/mvebu/patches-5.4/{407-PCI-aardvark-Add-PHY-support.patch => 019-PCI-aardvark-Add-PHY-support.patch} (100%) rename target/linux/mvebu/patches-5.4/{552-arm64-dts-marvell-armada-37xx-Set-pcie_reset_pin-to-.patch => 020-arm64-dts-marvell-armada-37xx-Set-pcie_reset_pin-to-.patch} (99%) rename target/linux/mvebu/patches-5.4/{553-arm64-dts-marvell-armada-37xx-Move-PCIe-comphy-handl.patch => 021-arm64-dts-marvell-armada-37xx-Move-PCIe-comphy-handl.patch} (99%) rename target/linux/mvebu/patches-5.4/{554-arm64-dts-marvell-armada-37xx-Move-PCIe-max-link-spe.patch => 022-arm64-dts-marvell-armada-37xx-Move-PCIe-max-link-spe.patch} (98%) rename target/linux/mvebu/patches-5.4/{551-v5.8-arm64-dts-add-uDPU-i2c-bus-recovery.patch => 023-arm64-dts-add-uDPU-i2c-bus-recovery.patch} (72%) rename target/linux/mvebu/patches-5.4/{408-PCI-aardvark-Don-t-touch-PCIe-registers-if-no-card-c.patch => 024-PCI-aardvark-Don-t-touch-PCIe-registers-if-no-card-c.patch} (100%) rename target/linux/mvebu/patches-5.4/{030-linkstation-poweroff.patch => 025-power-reset-add-driver-for-LinkStation-power-off.patch} (79%) rename target/linux/mvebu/patches-5.4/{410-PCI-aardvark-Fix-initialization-with-old-Marvell-s-A.patch => 026-PCI-aardvark-Fix-initialization-with-old-Marvell-s-A.patch} (100%) rename target/linux/mvebu/patches-5.4/{521-arm64-dts-marvell-espressobin-Add-ethernet-switch-al.patch => 027-arm64-dts-marvell-espressobin-Add-ethernet-switch-al.patch} (100%) rename target/linux/mvebu/patches-5.4/{006-mvebu-Mangle-bootloader-s-kernel-arguments.patch => 300-mvebu-Mangle-bootloader-s-kernel-arguments.patch} (100%) rename target/linux/mvebu/patches-5.4/{561-mvebu-armada-38x-enable-libata-leds.patch => 301-mvebu-armada-38x-enable-libata-leds.patch} (100%) rename target/linux/mvebu/patches-5.4/{002-add_powertables.patch => 302-add_powertables.patch} (100%) rename target/linux/mvebu/patches-5.4/{005-linksys_hardcode_nand_ecc_settings.patch => 303-linksys_hardcode_nand_ecc_settings.patch} (100%) rename target/linux/mvebu/patches-5.4/{102-revert_i2c_delay.patch => 304-revert_i2c_delay.patch} (100%) rename target/linux/mvebu/patches-5.4/{205-armada-385-rd-mtd-partitions.patch => 305-armada-385-rd-mtd-partitions.patch} (100%) rename target/linux/mvebu/patches-5.4/{206-ARM-mvebu-385-ap-Add-partitions.patch => 306-ARM-mvebu-385-ap-Add-partitions.patch} (100%) rename target/linux/mvebu/patches-5.4/{230-armada-xp-linksys-mamba-broken-idle.patch => 307-armada-xp-linksys-mamba-broken-idle.patch} (100%) rename target/linux/mvebu/patches-5.4/{231-armada-xp-linksys-mamba-wan.patch => 308-armada-xp-linksys-mamba-wan.patch} (100%) rename target/linux/mvebu/patches-5.4/{240-linksys-status-led.patch => 309-linksys-status-led.patch} (100%) rename target/linux/mvebu/patches-5.4/{241-linksys-use-eth0-as-cpu-port.patch => 310-linksys-use-eth0-as-cpu-port.patch} (100%) rename target/linux/mvebu/patches-5.4/{250-adjust-compatible-for-linksys.patch => 311-adjust-compatible-for-linksys.patch} (100%) rename target/linux/mvebu/patches-5.4/{412-ARM-dts-armada388-clearfog-emmc-on-clearfog-base.patch => 312-ARM-dts-armada388-clearfog-emmc-on-clearfog-base.patch} (100%) rename target/linux/mvebu/patches-5.4/{560-helios4-dts-status-led-alias.patch => 312-helios4-dts-status-led-alias.patch} (100%) rename target/linux/mvebu/patches-5.4/{520-arm64-dts-marvell-armada37xx-Add-eth0-alias.patch => 314-arm64-dts-marvell-armada37xx-Add-eth0-alias.patch} (100%) rename target/linux/mvebu/patches-5.4/{522-arm64-dts-marvell-armada-3720-espressobin-add-ports-.patch => 315-arm64-dts-marvell-armada-3720-espressobin-add-ports-.patch} (100%) rename target/linux/mvebu/patches-5.4/{523-arm64-dts-marvell-espressobin-remove-COMPHY-nodes-as.patch => 316-arm64-dts-marvell-espressobin-remove-COMPHY-nodes-as.patch} (100%) create mode 100644 target/linux/mvebu/patches-5.4/317-arm64-dts-uDPU-switch-PHY-operation-mode-to-2500base.patch rename target/linux/mvebu/patches-5.4/{100-find_active_root.patch => 400-find_active_root.patch} (100%) delete mode 100644 target/linux/mvebu/patches-5.4/550-arm64-dts-uDPU-switch-PHY-operation-mode-to-2500base.patch rename target/linux/mvebu/patches-5.4/{300-mvneta-tx-queue-workaround.patch => 700-mvneta-tx-queue-workaround.patch} (100%) rename target/linux/mvebu/patches-5.4/{400-cpuidle-mvebu-indicate-failure-to-enter-deeper-sleep.patch => 800-cpuidle-mvebu-indicate-failure-to-enter-deeper-sleep.patch} (100%) rename target/linux/mvebu/patches-5.4/{401-pci-mvebu-time-out-reset-on-link-up.patch => 801-pci-mvebu-time-out-reset-on-link-up.patch} (100%) diff --git a/target/linux/mvebu/patches-5.4/402-PCI-aardvark-Wait-for-endpoint-to-be-ready-before-tr.patch b/target/linux/mvebu/patches-5.4/001-PCI-aardvark-Wait-for-endpoint-to-be-ready-before-tr.patch similarity index 100% rename from target/linux/mvebu/patches-5.4/402-PCI-aardvark-Wait-for-endpoint-to-be-ready-before-tr.patch rename to target/linux/mvebu/patches-5.4/001-PCI-aardvark-Wait-for-endpoint-to-be-ready-before-tr.patch diff --git a/target/linux/mvebu/patches-5.4/403-PCI-aardvark-Don-t-rely-on-jiffies-while-holding-spi.patch b/target/linux/mvebu/patches-5.4/002-PCI-aardvark-Don-t-rely-on-jiffies-while-holding-spi.patch similarity index 100% rename from target/linux/mvebu/patches-5.4/403-PCI-aardvark-Don-t-rely-on-jiffies-while-holding-spi.patch rename to target/linux/mvebu/patches-5.4/002-PCI-aardvark-Don-t-rely-on-jiffies-while-holding-spi.patch diff --git a/target/linux/mvebu/patches-5.4/010-net-mvneta-introduce-mvneta_update_stats-routine.patch b/target/linux/mvebu/patches-5.4/003-net-mvneta-introduce-mvneta_update_stats-routine.patch similarity index 97% rename from target/linux/mvebu/patches-5.4/010-net-mvneta-introduce-mvneta_update_stats-routine.patch rename to target/linux/mvebu/patches-5.4/003-net-mvneta-introduce-mvneta_update_stats-routine.patch index 2c8ed30e4a..f6ce6163cf 100644 --- a/target/linux/mvebu/patches-5.4/010-net-mvneta-introduce-mvneta_update_stats-routine.patch +++ b/target/linux/mvebu/patches-5.4/003-net-mvneta-introduce-mvneta_update_stats-routine.patch @@ -1,4 +1,4 @@ -From 06815202344ee6c256b63e68c16cdc3b0480f4ee Mon Sep 17 00:00:00 2001 +From ff519e2acd463bff6c5bb4e8d7ed350c9bae885b Mon Sep 17 00:00:00 2001 From: Lorenzo Bianconi Date: Sat, 19 Oct 2019 10:13:21 +0200 Subject: [PATCH 1/7] net: mvneta: introduce mvneta_update_stats routine diff --git a/target/linux/mvebu/patches-5.4/011-net-mvneta-introduce-page-pool-API-for-sw-buffer-man.patch b/target/linux/mvebu/patches-5.4/004-net-mvneta-introduce-page-pool-API-for-sw-buffer-man.patch similarity index 98% rename from target/linux/mvebu/patches-5.4/011-net-mvneta-introduce-page-pool-API-for-sw-buffer-man.patch rename to target/linux/mvebu/patches-5.4/004-net-mvneta-introduce-page-pool-API-for-sw-buffer-man.patch index dbed6df873..fbcae20f74 100644 --- a/target/linux/mvebu/patches-5.4/011-net-mvneta-introduce-page-pool-API-for-sw-buffer-man.patch +++ b/target/linux/mvebu/patches-5.4/004-net-mvneta-introduce-page-pool-API-for-sw-buffer-man.patch @@ -1,4 +1,4 @@ -From 160f006a6fe904177cbca867c48dfb6d27262dd5 Mon Sep 17 00:00:00 2001 +From 568a3fa24a95476d40afe3f8616bafb543bc4182 Mon Sep 17 00:00:00 2001 From: Lorenzo Bianconi Date: Sat, 19 Oct 2019 10:13:22 +0200 Subject: [PATCH 2/7] net: mvneta: introduce page pool API for sw buffer diff --git a/target/linux/mvebu/patches-5.4/012-net-mvneta-rely-on-build_skb-in-mvneta_rx_swbm-poll-.patch b/target/linux/mvebu/patches-5.4/005-net-mvneta-rely-on-build_skb-in-mvneta_rx_swbm-poll-.patch similarity index 99% rename from target/linux/mvebu/patches-5.4/012-net-mvneta-rely-on-build_skb-in-mvneta_rx_swbm-poll-.patch rename to target/linux/mvebu/patches-5.4/005-net-mvneta-rely-on-build_skb-in-mvneta_rx_swbm-poll-.patch index e3269a592f..9038ca8ca8 100644 --- a/target/linux/mvebu/patches-5.4/012-net-mvneta-rely-on-build_skb-in-mvneta_rx_swbm-poll-.patch +++ b/target/linux/mvebu/patches-5.4/005-net-mvneta-rely-on-build_skb-in-mvneta_rx_swbm-poll-.patch @@ -1,4 +1,4 @@ -From 00cf2a1d7d58631ba137b9acabe1de1d542625a8 Mon Sep 17 00:00:00 2001 +From 8dc9a0888f4c8e27b25e48ff1b4bc2b3a845cc2d Mon Sep 17 00:00:00 2001 From: Lorenzo Bianconi Date: Sat, 19 Oct 2019 10:13:23 +0200 Subject: [PATCH 3/7] net: mvneta: rely on build_skb in mvneta_rx_swbm poll diff --git a/target/linux/mvebu/patches-5.4/013-net-mvneta-add-basic-XDP-support.patch b/target/linux/mvebu/patches-5.4/006-net-mvneta-add-basic-XDP-support.patch similarity index 99% rename from target/linux/mvebu/patches-5.4/013-net-mvneta-add-basic-XDP-support.patch rename to target/linux/mvebu/patches-5.4/006-net-mvneta-add-basic-XDP-support.patch index 62c00ddeb1..163632df51 100644 --- a/target/linux/mvebu/patches-5.4/013-net-mvneta-add-basic-XDP-support.patch +++ b/target/linux/mvebu/patches-5.4/006-net-mvneta-add-basic-XDP-support.patch @@ -1,4 +1,4 @@ -From f21366d964bd41a2b823beed36a7c3e7a728857b Mon Sep 17 00:00:00 2001 +From 0db51da7a8e99f0803ec3a8e25c1a66234a219cb Mon Sep 17 00:00:00 2001 From: Lorenzo Bianconi Date: Sat, 19 Oct 2019 10:13:24 +0200 Subject: [PATCH 4/7] net: mvneta: add basic XDP support diff --git a/target/linux/mvebu/patches-5.4/014-net-mvneta-move-header-prefetch-in-mvneta_swbm_rx_fr.patch b/target/linux/mvebu/patches-5.4/007-net-mvneta-move-header-prefetch-in-mvneta_swbm_rx_fr.patch similarity index 95% rename from target/linux/mvebu/patches-5.4/014-net-mvneta-move-header-prefetch-in-mvneta_swbm_rx_fr.patch rename to target/linux/mvebu/patches-5.4/007-net-mvneta-move-header-prefetch-in-mvneta_swbm_rx_fr.patch index ecda482875..e075796e41 100644 --- a/target/linux/mvebu/patches-5.4/014-net-mvneta-move-header-prefetch-in-mvneta_swbm_rx_fr.patch +++ b/target/linux/mvebu/patches-5.4/007-net-mvneta-move-header-prefetch-in-mvneta_swbm_rx_fr.patch @@ -1,4 +1,4 @@ -From 8abaeebfa7ef9a5600f4f596d2e94aa253f47553 Mon Sep 17 00:00:00 2001 +From fa383f6b77a2ed788266fa8fbfb659aa284d2f58 Mon Sep 17 00:00:00 2001 From: Lorenzo Bianconi Date: Sat, 19 Oct 2019 10:13:25 +0200 Subject: [PATCH 5/7] net: mvneta: move header prefetch in mvneta_swbm_rx_frame diff --git a/target/linux/mvebu/patches-5.4/015-net-mvneta-make-tx-buffer-array-agnostic.patch b/target/linux/mvebu/patches-5.4/008-net-mvneta-make-tx-buffer-array-agnostic.patch similarity index 98% rename from target/linux/mvebu/patches-5.4/015-net-mvneta-make-tx-buffer-array-agnostic.patch rename to target/linux/mvebu/patches-5.4/008-net-mvneta-make-tx-buffer-array-agnostic.patch index 1146c1f2b8..e79aa816b8 100644 --- a/target/linux/mvebu/patches-5.4/015-net-mvneta-make-tx-buffer-array-agnostic.patch +++ b/target/linux/mvebu/patches-5.4/008-net-mvneta-make-tx-buffer-array-agnostic.patch @@ -1,4 +1,4 @@ -From f7f705a63cd4bd1e3463db7662011717c5149e8a Mon Sep 17 00:00:00 2001 +From 9e58c8b410650b5a6eb5b8fad8474bd8425a4023 Mon Sep 17 00:00:00 2001 From: Lorenzo Bianconi Date: Sat, 19 Oct 2019 10:13:26 +0200 Subject: [PATCH 6/7] net: mvneta: make tx buffer array agnostic diff --git a/target/linux/mvebu/patches-5.4/016-net-mvneta-add-XDP_TX-support.patch b/target/linux/mvebu/patches-5.4/009-net-mvneta-add-XDP_TX-support.patch similarity index 98% rename from target/linux/mvebu/patches-5.4/016-net-mvneta-add-XDP_TX-support.patch rename to target/linux/mvebu/patches-5.4/009-net-mvneta-add-XDP_TX-support.patch index 012bdee8bf..c971030a1e 100644 --- a/target/linux/mvebu/patches-5.4/016-net-mvneta-add-XDP_TX-support.patch +++ b/target/linux/mvebu/patches-5.4/009-net-mvneta-add-XDP_TX-support.patch @@ -1,4 +1,4 @@ -From 2ca7bbf394e6d98741f19566b82b3d5a56e9cc2c Mon Sep 17 00:00:00 2001 +From b0a43db9087a21d96e1a0b716b8d9963064b2d58 Mon Sep 17 00:00:00 2001 From: Lorenzo Bianconi Date: Sat, 19 Oct 2019 10:13:27 +0200 Subject: [PATCH 7/7] net: mvneta: add XDP_TX support diff --git a/target/linux/mvebu/patches-5.4/020-net-mvneta-fix-build-skb-for-bm-capable-devices.patch b/target/linux/mvebu/patches-5.4/010-net-mvneta-fix-build-skb-for-bm-capable-devices.patch similarity index 100% rename from target/linux/mvebu/patches-5.4/020-net-mvneta-fix-build-skb-for-bm-capable-devices.patch rename to target/linux/mvebu/patches-5.4/010-net-mvneta-fix-build-skb-for-bm-capable-devices.patch diff --git a/target/linux/mvebu/patches-5.4/545-arm64-dts-uDPU-remove-i2c-fast-mode.patch b/target/linux/mvebu/patches-5.4/011-arm64-dts-uDPU-remove-i2c-fast-mode.patch similarity index 76% rename from target/linux/mvebu/patches-5.4/545-arm64-dts-uDPU-remove-i2c-fast-mode.patch rename to target/linux/mvebu/patches-5.4/011-arm64-dts-uDPU-remove-i2c-fast-mode.patch index b984eb4ba1..2922d49f44 100644 --- a/target/linux/mvebu/patches-5.4/545-arm64-dts-uDPU-remove-i2c-fast-mode.patch +++ b/target/linux/mvebu/patches-5.4/011-arm64-dts-uDPU-remove-i2c-fast-mode.patch @@ -1,12 +1,13 @@ -From 662eb8fc87f982e63ccb9a9df25c7aeabf9fe341 Mon Sep 17 00:00:00 2001 +From fe3ec631a77ded87817f449691710a436a80caa7 Mon Sep 17 00:00:00 2001 From: Russell King -Date: Thu, 14 Nov 2019 00:23:35 +0000 -Subject: [PATCH 658/660] arm64: dts: uDPU: remove i2c-fast-mode +Date: Sat, 16 Nov 2019 11:07:01 +0000 +Subject: [PATCH] arm64: dts: uDPU: remove i2c-fast-mode The I2C bus violates the timing specifications when run in fast mode on the uDPU, so switch to 100kHz mode. Signed-off-by: Russell King +Signed-off-by: Gregory CLEMENT --- arch/arm64/boot/dts/marvell/armada-3720-uDPU.dts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/target/linux/mvebu/patches-5.4/546-arm64-dts-uDPU-SFP-cages-support-3W-modules.patch b/target/linux/mvebu/patches-5.4/012-arm64-dts-uDPU-SFP-cages-support-3W-modules.patch similarity index 81% rename from target/linux/mvebu/patches-5.4/546-arm64-dts-uDPU-SFP-cages-support-3W-modules.patch rename to target/linux/mvebu/patches-5.4/012-arm64-dts-uDPU-SFP-cages-support-3W-modules.patch index d025f36a53..1884def2c6 100644 --- a/target/linux/mvebu/patches-5.4/546-arm64-dts-uDPU-SFP-cages-support-3W-modules.patch +++ b/target/linux/mvebu/patches-5.4/012-arm64-dts-uDPU-SFP-cages-support-3W-modules.patch @@ -1,7 +1,7 @@ -From 1cb114a20854e34324a2cb308f23054ff8227ffa Mon Sep 17 00:00:00 2001 +From cd592187f9de3c6305d6c1c66f7fac084cb5b846 Mon Sep 17 00:00:00 2001 From: Russell King -Date: Tue, 19 Nov 2019 22:48:50 +0000 -Subject: [PATCH 659/660] arm64: dts: uDPU: SFP cages support 3W modules +Date: Tue, 19 Nov 2019 22:53:04 +0000 +Subject: [PATCH] arm64: dts: uDPU: SFP cages support 3W modules The SFP cages are designed to support up to 3W modules, such as G.hn, G.fast and MoCA modules. Although there is no way for such modules to @@ -9,6 +9,7 @@ declare to software that they consume 3W, we document in DT that this is the designed power level for these cages. Signed-off-by: Russell King +Signed-off-by: Gregory CLEMENT --- arch/arm64/boot/dts/marvell/armada-3720-uDPU.dts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/target/linux/mvebu/patches-5.4/021-net-mvneta-rely-on-page_pool_recycle_direct-in-mvnet.patch b/target/linux/mvebu/patches-5.4/013-net-mvneta-rely-on-page_pool_recycle_direct-in-mvnet.patch similarity index 100% rename from target/linux/mvebu/patches-5.4/021-net-mvneta-rely-on-page_pool_recycle_direct-in-mvnet.patch rename to target/linux/mvebu/patches-5.4/013-net-mvneta-rely-on-page_pool_recycle_direct-in-mvnet.patch diff --git a/target/linux/mvebu/patches-5.4/022-mvneta-driver-disallow-XDP-program-on-hardware-buffe.patch b/target/linux/mvebu/patches-5.4/014-mvneta-driver-disallow-XDP-program-on-hardware-buffe.patch similarity index 100% rename from target/linux/mvebu/patches-5.4/022-mvneta-driver-disallow-XDP-program-on-hardware-buffe.patch rename to target/linux/mvebu/patches-5.4/014-mvneta-driver-disallow-XDP-program-on-hardware-buffe.patch diff --git a/target/linux/mvebu/patches-5.4/023-net-mvneta-fix-XDP-support-if-sw-bm-is-used-as-fallb.patch b/target/linux/mvebu/patches-5.4/015-net-mvneta-fix-XDP-support-if-sw-bm-is-used-as-fallb.patch similarity index 100% rename from target/linux/mvebu/patches-5.4/023-net-mvneta-fix-XDP-support-if-sw-bm-is-used-as-fallb.patch rename to target/linux/mvebu/patches-5.4/015-net-mvneta-fix-XDP-support-if-sw-bm-is-used-as-fallb.patch diff --git a/target/linux/mvebu/patches-5.4/404-PCI-aardvark-Train-link-immediately-after-enabling-t.patch b/target/linux/mvebu/patches-5.4/016-PCI-aardvark-Train-link-immediately-after-enabling-t.patch similarity index 100% rename from target/linux/mvebu/patches-5.4/404-PCI-aardvark-Train-link-immediately-after-enabling-t.patch rename to target/linux/mvebu/patches-5.4/016-PCI-aardvark-Train-link-immediately-after-enabling-t.patch diff --git a/target/linux/mvebu/patches-5.4/405-PCI-aardvark-Improve-link-training.patch b/target/linux/mvebu/patches-5.4/017-PCI-aardvark-Improve-link-training.patch similarity index 100% rename from target/linux/mvebu/patches-5.4/405-PCI-aardvark-Improve-link-training.patch rename to target/linux/mvebu/patches-5.4/017-PCI-aardvark-Improve-link-training.patch diff --git a/target/linux/mvebu/patches-5.4/406-PCI-aardvark-Issue-PERST-via-GPIO.patch b/target/linux/mvebu/patches-5.4/018-PCI-aardvark-Issue-PERST-via-GPIO.patch similarity index 100% rename from target/linux/mvebu/patches-5.4/406-PCI-aardvark-Issue-PERST-via-GPIO.patch rename to target/linux/mvebu/patches-5.4/018-PCI-aardvark-Issue-PERST-via-GPIO.patch diff --git a/target/linux/mvebu/patches-5.4/407-PCI-aardvark-Add-PHY-support.patch b/target/linux/mvebu/patches-5.4/019-PCI-aardvark-Add-PHY-support.patch similarity index 100% rename from target/linux/mvebu/patches-5.4/407-PCI-aardvark-Add-PHY-support.patch rename to target/linux/mvebu/patches-5.4/019-PCI-aardvark-Add-PHY-support.patch diff --git a/target/linux/mvebu/patches-5.4/552-arm64-dts-marvell-armada-37xx-Set-pcie_reset_pin-to-.patch b/target/linux/mvebu/patches-5.4/020-arm64-dts-marvell-armada-37xx-Set-pcie_reset_pin-to-.patch similarity index 99% rename from target/linux/mvebu/patches-5.4/552-arm64-dts-marvell-armada-37xx-Set-pcie_reset_pin-to-.patch rename to target/linux/mvebu/patches-5.4/020-arm64-dts-marvell-armada-37xx-Set-pcie_reset_pin-to-.patch index 9eeddaeba1..87247b63ad 100644 --- a/target/linux/mvebu/patches-5.4/552-arm64-dts-marvell-armada-37xx-Set-pcie_reset_pin-to-.patch +++ b/target/linux/mvebu/patches-5.4/020-arm64-dts-marvell-armada-37xx-Set-pcie_reset_pin-to-.patch @@ -82,7 +82,7 @@ Signed-off-by: Gregory CLEMENT pinctrl-0 = <&pcie_reset_pins &pcie_clkreq_pins>; --- a/arch/arm64/boot/dts/marvell/armada-37xx.dtsi +++ b/arch/arm64/boot/dts/marvell/armada-37xx.dtsi -@@ -318,7 +318,7 @@ +@@ -317,7 +317,7 @@ pcie_reset_pins: pcie-reset-pins { groups = "pcie1"; diff --git a/target/linux/mvebu/patches-5.4/553-arm64-dts-marvell-armada-37xx-Move-PCIe-comphy-handl.patch b/target/linux/mvebu/patches-5.4/021-arm64-dts-marvell-armada-37xx-Move-PCIe-comphy-handl.patch similarity index 99% rename from target/linux/mvebu/patches-5.4/553-arm64-dts-marvell-armada-37xx-Move-PCIe-comphy-handl.patch rename to target/linux/mvebu/patches-5.4/021-arm64-dts-marvell-armada-37xx-Move-PCIe-comphy-handl.patch index 0c7830cb47..e92393ff6f 100644 --- a/target/linux/mvebu/patches-5.4/553-arm64-dts-marvell-armada-37xx-Move-PCIe-comphy-handl.patch +++ b/target/linux/mvebu/patches-5.4/021-arm64-dts-marvell-armada-37xx-Move-PCIe-comphy-handl.patch @@ -47,7 +47,7 @@ Signed-off-by: Gregory CLEMENT status = "disabled"; --- a/arch/arm64/boot/dts/marvell/armada-37xx.dtsi +++ b/arch/arm64/boot/dts/marvell/armada-37xx.dtsi -@@ -494,6 +494,7 @@ +@@ -493,6 +493,7 @@ <0 0 0 2 &pcie_intc 1>, <0 0 0 3 &pcie_intc 2>, <0 0 0 4 &pcie_intc 3>; diff --git a/target/linux/mvebu/patches-5.4/554-arm64-dts-marvell-armada-37xx-Move-PCIe-max-link-spe.patch b/target/linux/mvebu/patches-5.4/022-arm64-dts-marvell-armada-37xx-Move-PCIe-max-link-spe.patch similarity index 98% rename from target/linux/mvebu/patches-5.4/554-arm64-dts-marvell-armada-37xx-Move-PCIe-max-link-spe.patch rename to target/linux/mvebu/patches-5.4/022-arm64-dts-marvell-armada-37xx-Move-PCIe-max-link-spe.patch index 04002480cc..ad918bef88 100644 --- a/target/linux/mvebu/patches-5.4/554-arm64-dts-marvell-armada-37xx-Move-PCIe-max-link-spe.patch +++ b/target/linux/mvebu/patches-5.4/022-arm64-dts-marvell-armada-37xx-Move-PCIe-max-link-spe.patch @@ -34,7 +34,7 @@ Signed-off-by: Gregory CLEMENT /* enabled by U-Boot if PCIe module is present */ --- a/arch/arm64/boot/dts/marvell/armada-37xx.dtsi +++ b/arch/arm64/boot/dts/marvell/armada-37xx.dtsi -@@ -494,6 +494,7 @@ +@@ -493,6 +493,7 @@ <0 0 0 2 &pcie_intc 1>, <0 0 0 3 &pcie_intc 2>, <0 0 0 4 &pcie_intc 3>; diff --git a/target/linux/mvebu/patches-5.4/551-v5.8-arm64-dts-add-uDPU-i2c-bus-recovery.patch b/target/linux/mvebu/patches-5.4/023-arm64-dts-add-uDPU-i2c-bus-recovery.patch similarity index 72% rename from target/linux/mvebu/patches-5.4/551-v5.8-arm64-dts-add-uDPU-i2c-bus-recovery.patch rename to target/linux/mvebu/patches-5.4/023-arm64-dts-add-uDPU-i2c-bus-recovery.patch index 53916a59e6..818fce85a8 100644 --- a/target/linux/mvebu/patches-5.4/551-v5.8-arm64-dts-add-uDPU-i2c-bus-recovery.patch +++ b/target/linux/mvebu/patches-5.4/023-arm64-dts-add-uDPU-i2c-bus-recovery.patch @@ -1,13 +1,11 @@ +From 11b2af36cc874027ce701c5784cb957c99c7de3d Mon Sep 17 00:00:00 2001 From: Russell King -Bcc: linux@mail.armlinux.org.uk -Cc: Vladimir Vid ,Jason Cooper ,Andrew Lunn ,Gregory Clement ,Sebastian Hesselbarth ,Rob Herring ,Mark Rutland ,linux-arm-kernel@lists.infradead.org,devicetree@vger.kernel.org +Date: Wed, 6 May 2020 10:40:37 +0100 Subject: [PATCH] arm64: dts: add uDPU i2c bus recovery -MIME-Version: 1.0 -Content-Disposition: inline -Content-Transfer-Encoding: 8bit -Content-Type: text/plain; charset="utf-8" Signed-off-by: Russell King +Reviewed-by: Andrew Lunn +Signed-off-by: Gregory CLEMENT --- .../boot/dts/marvell/armada-3720-uDPU.dts | 22 +++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/target/linux/mvebu/patches-5.4/408-PCI-aardvark-Don-t-touch-PCIe-registers-if-no-card-c.patch b/target/linux/mvebu/patches-5.4/024-PCI-aardvark-Don-t-touch-PCIe-registers-if-no-card-c.patch similarity index 100% rename from target/linux/mvebu/patches-5.4/408-PCI-aardvark-Don-t-touch-PCIe-registers-if-no-card-c.patch rename to target/linux/mvebu/patches-5.4/024-PCI-aardvark-Don-t-touch-PCIe-registers-if-no-card-c.patch diff --git a/target/linux/mvebu/patches-5.4/030-linkstation-poweroff.patch b/target/linux/mvebu/patches-5.4/025-power-reset-add-driver-for-LinkStation-power-off.patch similarity index 79% rename from target/linux/mvebu/patches-5.4/030-linkstation-poweroff.patch rename to target/linux/mvebu/patches-5.4/025-power-reset-add-driver-for-LinkStation-power-off.patch index 7b7e8cd034..64ea26559e 100644 --- a/target/linux/mvebu/patches-5.4/030-linkstation-poweroff.patch +++ b/target/linux/mvebu/patches-5.4/025-power-reset-add-driver-for-LinkStation-power-off.patch @@ -1,3 +1,33 @@ +From a7f79f99541eff4e6bcae0014eb08d3019337565 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Daniel=20Gonz=C3=A1lez=20Cabanelas?= +Date: Wed, 15 Jul 2020 15:35:14 +0200 +Subject: [PATCH] power: reset: add driver for LinkStation power off +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Some Buffalo LinkStations perform the power off operation, at restart +time, depending on the state of an output pin (LED2/INTn) at the ethernet +PHY. This pin is also used to wake the machine when a WoL packet is +received by the PHY. + +The driver is required by the Buffalo LinkStation LS421DE (ARM MVEBU), +and other models. Without it, the board remains forever halted if a +power off command is executed, unless the PSU is disconnected and +connected again. + +Add the driver to provide the power off function and also make the WoL +feature to be available. + +Signed-off-by: Daniel González Cabanelas +Signed-off-by: Sebastian Reichel +--- + drivers/power/reset/Kconfig | 11 ++ + drivers/power/reset/Makefile | 1 + + drivers/power/reset/linkstation-poweroff.c | 136 +++++++++++++++++++++ + 3 files changed, 148 insertions(+) + create mode 100644 drivers/power/reset/linkstation-poweroff.c + --- a/drivers/power/reset/Kconfig +++ b/drivers/power/reset/Kconfig @@ -99,6 +99,17 @@ config POWER_RESET_HISI @@ -86,7 +116,7 @@ + __phy_read(phydev, MII_M1011_IEVENT); + + /* If WOL was enabled and a magic packet was received before powering -+ * off, we won't be able to wake up by sending another magic packet. ++ * off, we won't be able to wake up by sending another magic packet. + * Clear WOL status. + */ + __phy_write(phydev, MII_MARVELL_PHY_PAGE, MII_MARVELL_WOL_PAGE); diff --git a/target/linux/mvebu/patches-5.4/410-PCI-aardvark-Fix-initialization-with-old-Marvell-s-A.patch b/target/linux/mvebu/patches-5.4/026-PCI-aardvark-Fix-initialization-with-old-Marvell-s-A.patch similarity index 100% rename from target/linux/mvebu/patches-5.4/410-PCI-aardvark-Fix-initialization-with-old-Marvell-s-A.patch rename to target/linux/mvebu/patches-5.4/026-PCI-aardvark-Fix-initialization-with-old-Marvell-s-A.patch diff --git a/target/linux/mvebu/patches-5.4/521-arm64-dts-marvell-espressobin-Add-ethernet-switch-al.patch b/target/linux/mvebu/patches-5.4/027-arm64-dts-marvell-espressobin-Add-ethernet-switch-al.patch similarity index 100% rename from target/linux/mvebu/patches-5.4/521-arm64-dts-marvell-espressobin-Add-ethernet-switch-al.patch rename to target/linux/mvebu/patches-5.4/027-arm64-dts-marvell-espressobin-Add-ethernet-switch-al.patch diff --git a/target/linux/mvebu/patches-5.4/006-mvebu-Mangle-bootloader-s-kernel-arguments.patch b/target/linux/mvebu/patches-5.4/300-mvebu-Mangle-bootloader-s-kernel-arguments.patch similarity index 100% rename from target/linux/mvebu/patches-5.4/006-mvebu-Mangle-bootloader-s-kernel-arguments.patch rename to target/linux/mvebu/patches-5.4/300-mvebu-Mangle-bootloader-s-kernel-arguments.patch diff --git a/target/linux/mvebu/patches-5.4/561-mvebu-armada-38x-enable-libata-leds.patch b/target/linux/mvebu/patches-5.4/301-mvebu-armada-38x-enable-libata-leds.patch similarity index 100% rename from target/linux/mvebu/patches-5.4/561-mvebu-armada-38x-enable-libata-leds.patch rename to target/linux/mvebu/patches-5.4/301-mvebu-armada-38x-enable-libata-leds.patch diff --git a/target/linux/mvebu/patches-5.4/002-add_powertables.patch b/target/linux/mvebu/patches-5.4/302-add_powertables.patch similarity index 100% rename from target/linux/mvebu/patches-5.4/002-add_powertables.patch rename to target/linux/mvebu/patches-5.4/302-add_powertables.patch diff --git a/target/linux/mvebu/patches-5.4/005-linksys_hardcode_nand_ecc_settings.patch b/target/linux/mvebu/patches-5.4/303-linksys_hardcode_nand_ecc_settings.patch similarity index 100% rename from target/linux/mvebu/patches-5.4/005-linksys_hardcode_nand_ecc_settings.patch rename to target/linux/mvebu/patches-5.4/303-linksys_hardcode_nand_ecc_settings.patch diff --git a/target/linux/mvebu/patches-5.4/102-revert_i2c_delay.patch b/target/linux/mvebu/patches-5.4/304-revert_i2c_delay.patch similarity index 100% rename from target/linux/mvebu/patches-5.4/102-revert_i2c_delay.patch rename to target/linux/mvebu/patches-5.4/304-revert_i2c_delay.patch diff --git a/target/linux/mvebu/patches-5.4/205-armada-385-rd-mtd-partitions.patch b/target/linux/mvebu/patches-5.4/305-armada-385-rd-mtd-partitions.patch similarity index 100% rename from target/linux/mvebu/patches-5.4/205-armada-385-rd-mtd-partitions.patch rename to target/linux/mvebu/patches-5.4/305-armada-385-rd-mtd-partitions.patch diff --git a/target/linux/mvebu/patches-5.4/206-ARM-mvebu-385-ap-Add-partitions.patch b/target/linux/mvebu/patches-5.4/306-ARM-mvebu-385-ap-Add-partitions.patch similarity index 100% rename from target/linux/mvebu/patches-5.4/206-ARM-mvebu-385-ap-Add-partitions.patch rename to target/linux/mvebu/patches-5.4/306-ARM-mvebu-385-ap-Add-partitions.patch diff --git a/target/linux/mvebu/patches-5.4/230-armada-xp-linksys-mamba-broken-idle.patch b/target/linux/mvebu/patches-5.4/307-armada-xp-linksys-mamba-broken-idle.patch similarity index 100% rename from target/linux/mvebu/patches-5.4/230-armada-xp-linksys-mamba-broken-idle.patch rename to target/linux/mvebu/patches-5.4/307-armada-xp-linksys-mamba-broken-idle.patch diff --git a/target/linux/mvebu/patches-5.4/231-armada-xp-linksys-mamba-wan.patch b/target/linux/mvebu/patches-5.4/308-armada-xp-linksys-mamba-wan.patch similarity index 100% rename from target/linux/mvebu/patches-5.4/231-armada-xp-linksys-mamba-wan.patch rename to target/linux/mvebu/patches-5.4/308-armada-xp-linksys-mamba-wan.patch diff --git a/target/linux/mvebu/patches-5.4/240-linksys-status-led.patch b/target/linux/mvebu/patches-5.4/309-linksys-status-led.patch similarity index 100% rename from target/linux/mvebu/patches-5.4/240-linksys-status-led.patch rename to target/linux/mvebu/patches-5.4/309-linksys-status-led.patch diff --git a/target/linux/mvebu/patches-5.4/241-linksys-use-eth0-as-cpu-port.patch b/target/linux/mvebu/patches-5.4/310-linksys-use-eth0-as-cpu-port.patch similarity index 100% rename from target/linux/mvebu/patches-5.4/241-linksys-use-eth0-as-cpu-port.patch rename to target/linux/mvebu/patches-5.4/310-linksys-use-eth0-as-cpu-port.patch diff --git a/target/linux/mvebu/patches-5.4/250-adjust-compatible-for-linksys.patch b/target/linux/mvebu/patches-5.4/311-adjust-compatible-for-linksys.patch similarity index 100% rename from target/linux/mvebu/patches-5.4/250-adjust-compatible-for-linksys.patch rename to target/linux/mvebu/patches-5.4/311-adjust-compatible-for-linksys.patch diff --git a/target/linux/mvebu/patches-5.4/412-ARM-dts-armada388-clearfog-emmc-on-clearfog-base.patch b/target/linux/mvebu/patches-5.4/312-ARM-dts-armada388-clearfog-emmc-on-clearfog-base.patch similarity index 100% rename from target/linux/mvebu/patches-5.4/412-ARM-dts-armada388-clearfog-emmc-on-clearfog-base.patch rename to target/linux/mvebu/patches-5.4/312-ARM-dts-armada388-clearfog-emmc-on-clearfog-base.patch diff --git a/target/linux/mvebu/patches-5.4/560-helios4-dts-status-led-alias.patch b/target/linux/mvebu/patches-5.4/312-helios4-dts-status-led-alias.patch similarity index 100% rename from target/linux/mvebu/patches-5.4/560-helios4-dts-status-led-alias.patch rename to target/linux/mvebu/patches-5.4/312-helios4-dts-status-led-alias.patch diff --git a/target/linux/mvebu/patches-5.4/520-arm64-dts-marvell-armada37xx-Add-eth0-alias.patch b/target/linux/mvebu/patches-5.4/314-arm64-dts-marvell-armada37xx-Add-eth0-alias.patch similarity index 100% rename from target/linux/mvebu/patches-5.4/520-arm64-dts-marvell-armada37xx-Add-eth0-alias.patch rename to target/linux/mvebu/patches-5.4/314-arm64-dts-marvell-armada37xx-Add-eth0-alias.patch diff --git a/target/linux/mvebu/patches-5.4/522-arm64-dts-marvell-armada-3720-espressobin-add-ports-.patch b/target/linux/mvebu/patches-5.4/315-arm64-dts-marvell-armada-3720-espressobin-add-ports-.patch similarity index 100% rename from target/linux/mvebu/patches-5.4/522-arm64-dts-marvell-armada-3720-espressobin-add-ports-.patch rename to target/linux/mvebu/patches-5.4/315-arm64-dts-marvell-armada-3720-espressobin-add-ports-.patch diff --git a/target/linux/mvebu/patches-5.4/523-arm64-dts-marvell-espressobin-remove-COMPHY-nodes-as.patch b/target/linux/mvebu/patches-5.4/316-arm64-dts-marvell-espressobin-remove-COMPHY-nodes-as.patch similarity index 100% rename from target/linux/mvebu/patches-5.4/523-arm64-dts-marvell-espressobin-remove-COMPHY-nodes-as.patch rename to target/linux/mvebu/patches-5.4/316-arm64-dts-marvell-espressobin-remove-COMPHY-nodes-as.patch diff --git a/target/linux/mvebu/patches-5.4/317-arm64-dts-uDPU-switch-PHY-operation-mode-to-2500base.patch b/target/linux/mvebu/patches-5.4/317-arm64-dts-uDPU-switch-PHY-operation-mode-to-2500base.patch new file mode 100644 index 0000000000..2240d0b39e --- /dev/null +++ b/target/linux/mvebu/patches-5.4/317-arm64-dts-uDPU-switch-PHY-operation-mode-to-2500base.patch @@ -0,0 +1,34 @@ +Certain SFP modules (most notably Nokia GPON ones) first check +connectivity on 1000base-x, and switch to 2500base-x afterwards. This +is considered a quirk so the phylink switches the interface to +2500base-x as well. + +However, after power-cycling the uDPU device, network interface/SFP module +will not work correctly until the module is re-seated. This patch +resolves this issue by forcing the interface to be brought up in +2500base-x mode by default. + +Signed-off-by: Jakov Petrina +Signed-off-by: Vladimir Vid +Cc: Luka Perkov + +--- a/arch/arm64/boot/dts/marvell/armada-3720-uDPU.dts ++++ b/arch/arm64/boot/dts/marvell/armada-3720-uDPU.dts +@@ -162,7 +162,7 @@ + }; + + ð0 { +- phy-mode = "sgmii"; ++ phy-mode = "2500base-x"; + status = "okay"; + managed = "in-band-status"; + phys = <&comphy1 0>; +@@ -170,7 +170,7 @@ + }; + + ð1 { +- phy-mode = "sgmii"; ++ phy-mode = "2500base-x"; + status = "okay"; + managed = "in-band-status"; + phys = <&comphy0 1>; diff --git a/target/linux/mvebu/patches-5.4/100-find_active_root.patch b/target/linux/mvebu/patches-5.4/400-find_active_root.patch similarity index 100% rename from target/linux/mvebu/patches-5.4/100-find_active_root.patch rename to target/linux/mvebu/patches-5.4/400-find_active_root.patch diff --git a/target/linux/mvebu/patches-5.4/550-arm64-dts-uDPU-switch-PHY-operation-mode-to-2500base.patch b/target/linux/mvebu/patches-5.4/550-arm64-dts-uDPU-switch-PHY-operation-mode-to-2500base.patch deleted file mode 100644 index 82715312d8..0000000000 --- a/target/linux/mvebu/patches-5.4/550-arm64-dts-uDPU-switch-PHY-operation-mode-to-2500base.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- a/arch/arm64/boot/dts/marvell/armada-3720-uDPU.dts -+++ b/arch/arm64/boot/dts/marvell/armada-3720-uDPU.dts -@@ -144,7 +144,7 @@ - }; - - ð0 { -- phy-mode = "sgmii"; -+ phy-mode = "2500base-x"; - status = "okay"; - managed = "in-band-status"; - phys = <&comphy1 0>; -@@ -152,7 +152,7 @@ - }; - - ð1 { -- phy-mode = "sgmii"; -+ phy-mode = "2500base-x"; - status = "okay"; - managed = "in-band-status"; - phys = <&comphy0 1>; diff --git a/target/linux/mvebu/patches-5.4/300-mvneta-tx-queue-workaround.patch b/target/linux/mvebu/patches-5.4/700-mvneta-tx-queue-workaround.patch similarity index 100% rename from target/linux/mvebu/patches-5.4/300-mvneta-tx-queue-workaround.patch rename to target/linux/mvebu/patches-5.4/700-mvneta-tx-queue-workaround.patch diff --git a/target/linux/mvebu/patches-5.4/400-cpuidle-mvebu-indicate-failure-to-enter-deeper-sleep.patch b/target/linux/mvebu/patches-5.4/800-cpuidle-mvebu-indicate-failure-to-enter-deeper-sleep.patch similarity index 100% rename from target/linux/mvebu/patches-5.4/400-cpuidle-mvebu-indicate-failure-to-enter-deeper-sleep.patch rename to target/linux/mvebu/patches-5.4/800-cpuidle-mvebu-indicate-failure-to-enter-deeper-sleep.patch diff --git a/target/linux/mvebu/patches-5.4/401-pci-mvebu-time-out-reset-on-link-up.patch b/target/linux/mvebu/patches-5.4/801-pci-mvebu-time-out-reset-on-link-up.patch similarity index 100% rename from target/linux/mvebu/patches-5.4/401-pci-mvebu-time-out-reset-on-link-up.patch rename to target/linux/mvebu/patches-5.4/801-pci-mvebu-time-out-reset-on-link-up.patch From 4a243ae3329c19eaddffea42bed734e4eff852ad Mon Sep 17 00:00:00 2001 From: Tomasz Maciej Nowak Date: Mon, 23 Nov 2020 15:17:30 +0100 Subject: [PATCH 21/69] mvebu: base-files: move additional files to subtargets Both of these scripts are only relevant to cortexa9, therefore move them there. Signed-off-by: Tomasz Maciej Nowak --- .../base-files/etc/hotplug.d/ieee80211/00-wifi-config-migrate | 0 target/linux/mvebu/{ => cortexa9}/base-files/sbin/fan_ctrl.sh | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename target/linux/mvebu/{ => cortexa9}/base-files/etc/hotplug.d/ieee80211/00-wifi-config-migrate (100%) rename target/linux/mvebu/{ => cortexa9}/base-files/sbin/fan_ctrl.sh (100%) diff --git a/target/linux/mvebu/base-files/etc/hotplug.d/ieee80211/00-wifi-config-migrate b/target/linux/mvebu/cortexa9/base-files/etc/hotplug.d/ieee80211/00-wifi-config-migrate similarity index 100% rename from target/linux/mvebu/base-files/etc/hotplug.d/ieee80211/00-wifi-config-migrate rename to target/linux/mvebu/cortexa9/base-files/etc/hotplug.d/ieee80211/00-wifi-config-migrate diff --git a/target/linux/mvebu/base-files/sbin/fan_ctrl.sh b/target/linux/mvebu/cortexa9/base-files/sbin/fan_ctrl.sh similarity index 100% rename from target/linux/mvebu/base-files/sbin/fan_ctrl.sh rename to target/linux/mvebu/cortexa9/base-files/sbin/fan_ctrl.sh From ff012f3a67eba3622265b2aaf38da6a0a4574021 Mon Sep 17 00:00:00 2001 From: Sander Vanheule Date: Wed, 4 Nov 2020 10:21:13 +0100 Subject: [PATCH 22/69] build: uImage: allow override of default arguments For some build recipes, the argument to Build/uImage is used to sneak in extra arguments for mkimage, whereas this appears to have been intended to specificy the compression method only. Use the first provided word for -C to be backwards compatible with current calls to Build/uImage. Use the rest of the call arguments to override the provided defaults. Only the input file name (-d) and the output file name cannot overriden. Signed-off-by: Sander Vanheule --- include/image-commands.mk | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/image-commands.mk b/include/image-commands.mk index 438f1e87e4..a8faefbcff 100644 --- a/include/image-commands.mk +++ b/include/image-commands.mk @@ -396,8 +396,9 @@ endef define Build/uImage mkimage -A $(LINUX_KARCH) \ -O linux -T kernel \ - -C $(1) -a $(KERNEL_LOADADDR) -e $(if $(KERNEL_ENTRY),$(KERNEL_ENTRY),$(KERNEL_LOADADDR)) \ - -n '$(if $(UIMAGE_NAME),$(UIMAGE_NAME),$(call toupper,$(LINUX_KARCH)) $(VERSION_DIST) Linux-$(LINUX_VERSION))' -d $@ $@.new + -C $(word 1,$(1)) -a $(KERNEL_LOADADDR) -e $(if $(KERNEL_ENTRY),$(KERNEL_ENTRY),$(KERNEL_LOADADDR)) \ + -n '$(if $(UIMAGE_NAME),$(UIMAGE_NAME),$(call toupper,$(LINUX_KARCH)) $(VERSION_DIST) Linux-$(LINUX_VERSION))' \ + $(wordlist 2,$(words $(1)),$(1)) -d $@ $@.new mv $@.new $@ endef From 8416d0626f57ff3303a44a7b9e29f97c3e380e63 Mon Sep 17 00:00:00 2001 From: Adrian Schmutzler Date: Wed, 25 Nov 2020 15:48:40 +0100 Subject: [PATCH 23/69] build: uImage: separate arguments into individual lines Having one line per argument increases overview dramatically. Signed-off-by: Adrian Schmutzler --- include/image-commands.mk | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/include/image-commands.mk b/include/image-commands.mk index a8faefbcff..de4c86c24a 100644 --- a/include/image-commands.mk +++ b/include/image-commands.mk @@ -394,11 +394,16 @@ define Build/tplink-v2-image endef define Build/uImage - mkimage -A $(LINUX_KARCH) \ - -O linux -T kernel \ - -C $(word 1,$(1)) -a $(KERNEL_LOADADDR) -e $(if $(KERNEL_ENTRY),$(KERNEL_ENTRY),$(KERNEL_LOADADDR)) \ + mkimage \ + -A $(LINUX_KARCH) \ + -O linux \ + -T kernel \ + -C $(word 1,$(1)) \ + -a $(KERNEL_LOADADDR) \ + -e $(if $(KERNEL_ENTRY),$(KERNEL_ENTRY),$(KERNEL_LOADADDR)) \ -n '$(if $(UIMAGE_NAME),$(UIMAGE_NAME),$(call toupper,$(LINUX_KARCH)) $(VERSION_DIST) Linux-$(LINUX_VERSION))' \ - $(wordlist 2,$(words $(1)),$(1)) -d $@ $@.new + $(wordlist 2,$(words $(1)),$(1)) \ + -d $@ $@.new mv $@.new $@ endef From 9f574b1b875cd6e5dbb521b841c9196995b46bfc Mon Sep 17 00:00:00 2001 From: Sander Vanheule Date: Wed, 4 Nov 2020 10:21:14 +0100 Subject: [PATCH 24/69] ramips: mt7621: drop custom uImage function Use the mkimage argument overrides provided by uImage to implement the customisations required for the initramfs, instead of the near-identical custom function. Signed-off-by: Sander Vanheule --- target/linux/ramips/image/mt7621.mk | 31 ++++++++++------------------- 1 file changed, 10 insertions(+), 21 deletions(-) diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk index bac3185507..d3b96f5f4b 100644 --- a/target/linux/ramips/image/mt7621.mk +++ b/target/linux/ramips/image/mt7621.mk @@ -7,21 +7,7 @@ include ./common-tp-link.mk DEFAULT_SOC := mt7621 KERNEL_DTB += -d21 -DEVICE_VARS += UIMAGE_MAGIC ELECOM_HWNAME LINKSYS_HWNAME - -# The OEM webinterface expects an kernel with initramfs which has the uImage -# header field ih_name. -# We don't want to set the header name field for the kernel include in the -# sysupgrade image as well, as this image shouldn't be accepted by the OEM -# webinterface. It will soft-brick the board. -define Build/custom-initramfs-uimage - mkimage -A $(LINUX_KARCH) \ - -O linux -T kernel \ - -C lzma -a $(KERNEL_LOADADDR) $(if $(UIMAGE_MAGIC),-M $(UIMAGE_MAGIC),) \ - -e $(if $(KERNEL_ENTRY),$(KERNEL_ENTRY),$(KERNEL_LOADADDR)) \ - -n '$(1)' -d $@ $@.new - mv $@.new $@ -endef +DEVICE_VARS += ELECOM_HWNAME LINKSYS_HWNAME define Build/elecom-wrc-gs-factory $(eval product=$(word 1,$(1))) @@ -538,32 +524,35 @@ define Device/iodata_nand IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata endef +# The OEM webinterface expects an kernel with initramfs which has the uImage +# header field ih_name. +# We don't want to set the header name field for the kernel include in the +# sysupgrade image as well, as this image shouldn't be accepted by the OEM +# webinterface. It will soft-brick the board. + define Device/iodata_wn-ax1167gr2 $(Device/iodata_nand) - UIMAGE_MAGIC := 0x434f4d42 DEVICE_MODEL := WN-AX1167GR2 KERNEL_INITRAMFS := $(KERNEL_DTB) | loader-kernel | lzma | \ - custom-initramfs-uimage 3.10(XBC.1)b10 | iodata-mstc-header + uImage lzma -M 0x434f4d42 -n '3.10(XBC.1)b10' | iodata-mstc-header DEVICE_PACKAGES := kmod-mt7615e kmod-mt7615-firmware endef TARGET_DEVICES += iodata_wn-ax1167gr2 define Device/iodata_wn-ax2033gr $(Device/iodata_nand) - UIMAGE_MAGIC := 0x434f4d42 DEVICE_MODEL := WN-AX2033GR KERNEL_INITRAMFS := $(KERNEL_DTB) | loader-kernel | lzma | \ - custom-initramfs-uimage 3.10(VST.1)C10 | iodata-mstc-header + uImage lzma -M 0x434f4d42 -n '3.10(VST.1)C10' | iodata-mstc-header DEVICE_PACKAGES := kmod-mt7603 kmod-mt7615e kmod-mt7615-firmware endef TARGET_DEVICES += iodata_wn-ax2033gr define Device/iodata_wn-dx1167r $(Device/iodata_nand) - UIMAGE_MAGIC := 0x434f4d43 DEVICE_MODEL := WN-DX1167R KERNEL_INITRAMFS := $(KERNEL_DTB) | loader-kernel | lzma | \ - custom-initramfs-uimage 3.10(XIK.1)b10 | iodata-mstc-header + uImage lzma -M 0x434f4d43 -n '3.10(XIK.1)b10' | iodata-mstc-header DEVICE_PACKAGES := kmod-mt7615e kmod-mt7615-firmware endef TARGET_DEVICES += iodata_wn-dx1167r From c20b8d690bec265693b3eb250e1ba1e8ed3abae4 Mon Sep 17 00:00:00 2001 From: Sander Vanheule Date: Wed, 4 Nov 2020 10:21:15 +0100 Subject: [PATCH 25/69] build: add UIMAGE_MAGIC to device variables Allow a device recipe to specify a custom UIMAGE_MAGIC value, as used by OpenWrt's -M flag for mkimage. This allows to automatically customize the magic bytes in all calls to Build/uImage for this device, similar to the behaviour of UIMAGE_NAME. Since the -M argument is inserted before the user arguments, it can be overriden. The following example would use 0x87654321 for the KERNEL image, but 0x12345678 for the KERNEL_INITRAMFS image: define Device/MyDevice UIMAGE_MAGIC := 0x87654321 KERNEL := ... | uImage lzma KERNEL_INITRAMFS := ... | uImage lzma -M 0x12345678 ... endef Fixes: df8e6be59a1f ("rtl838x: add new architecture") [UIMAGE_MAGIC was not declared as a device variable] Signed-off-by: Sander Vanheule [rebase, improve formatting of "Fixes"] Signed-off-by: Adrian Schmutzler --- include/image-commands.mk | 1 + include/image.mk | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/include/image-commands.mk b/include/image-commands.mk index de4c86c24a..979eafb157 100644 --- a/include/image-commands.mk +++ b/include/image-commands.mk @@ -402,6 +402,7 @@ define Build/uImage -a $(KERNEL_LOADADDR) \ -e $(if $(KERNEL_ENTRY),$(KERNEL_ENTRY),$(KERNEL_LOADADDR)) \ -n '$(if $(UIMAGE_NAME),$(UIMAGE_NAME),$(call toupper,$(LINUX_KARCH)) $(VERSION_DIST) Linux-$(LINUX_VERSION))' \ + $(if $(UIMAGE_MAGIC),-M $(UIMAGE_MAGIC)) \ $(wordlist 2,$(words $(1)),$(1)) \ -d $@ $@.new mv $@.new $@ diff --git a/include/image.mk b/include/image.mk index eabc9ece0b..4e7c31e8dc 100644 --- a/include/image.mk +++ b/include/image.mk @@ -400,6 +400,7 @@ define Device/Init SOC := BOARD_NAME := + UIMAGE_MAGIC := UIMAGE_NAME := DEVICE_COMPAT_VERSION := 1.0 DEVICE_COMPAT_MESSAGE := @@ -419,7 +420,8 @@ DEFAULT_DEVICE_VARS := \ CMDLINE UBOOTENV_IN_UBI KERNEL_IN_UBI BLOCKSIZE PAGESIZE SUBPAGESIZE \ VID_HDR_OFFSET UBINIZE_OPTS UBINIZE_PARTS MKUBIFS_OPTS DEVICE_DTS \ DEVICE_DTS_CONFIG DEVICE_DTS_DIR DEVICE_FDT_NUM SOC BOARD_NAME \ - UIMAGE_NAME SUPPORTED_DEVICES IMAGE_METADATA KERNEL_ENTRY KERNEL_LOADADDR \ + UIMAGE_MAGIC UIMAGE_NAME \ + SUPPORTED_DEVICES IMAGE_METADATA KERNEL_ENTRY KERNEL_LOADADDR \ UBOOT_PATH IMAGE_SIZE \ DEVICE_COMPAT_VERSION DEVICE_COMPAT_MESSAGE \ DEVICE_VENDOR DEVICE_MODEL DEVICE_VARIANT \ From ab1584a797ad946585d3eb5498bce07829dabe5f Mon Sep 17 00:00:00 2001 From: Sander Vanheule Date: Wed, 4 Nov 2020 10:21:16 +0100 Subject: [PATCH 26/69] ath79: netgear: trim down uImage customisations Replace NETGEAR_KERNEL_MAGIC by UIMAGE_MAGIC to better match the variable's purpose. This allows to drop the custom Build/netgear-uImage. Signed-off-by: Sander Vanheule [keep UIMAGE_MAGIC definitions even for default value] Signed-off-by: Adrian Schmutzler --- target/linux/ath79/image/common-netgear.mk | 14 +++++--------- target/linux/ath79/image/generic.mk | 16 ++++++++-------- target/linux/ath79/image/nand.mk | 20 +++++++++----------- target/linux/ath79/image/tiny-netgear.mk | 8 ++++---- 4 files changed, 26 insertions(+), 32 deletions(-) diff --git a/target/linux/ath79/image/common-netgear.mk b/target/linux/ath79/image/common-netgear.mk index b41650c6e9..d4f43bbaca 100644 --- a/target/linux/ath79/image/common-netgear.mk +++ b/target/linux/ath79/image/common-netgear.mk @@ -1,9 +1,9 @@ -DEVICE_VARS += NETGEAR_KERNEL_MAGIC NETGEAR_BOARD_ID NETGEAR_HW_ID +DEVICE_VARS += NETGEAR_BOARD_ID NETGEAR_HW_ID define Build/netgear-rootfs mkimage \ -A mips -O linux -T filesystem -C none \ - -M $(NETGEAR_KERNEL_MAGIC) \ + $(if $(UIMAGE_MAGIC),-M $(UIMAGE_MAGIC)) \ -n '$(VERSION_DIST) filesystem' \ -d $(IMAGE_ROOTFS) $@.fs cat $@.fs >> $@ @@ -22,21 +22,17 @@ define Build/netgear-squashfs dd if=/dev/zero bs=1k count=1 >> $@.squashfs mkimage \ -A mips -O linux -T filesystem -C none \ - -M $(NETGEAR_KERNEL_MAGIC) \ + $(if $(UIMAGE_MAGIC),-M $(UIMAGE_MAGIC)) \ -a 0xbf070000 -e 0xbf070000 \ -n 'MIPS $(VERSION_DIST) Linux-$(LINUX_VERSION)' \ -d $@.squashfs $@ rm -rf $@.squashfs $@.fs endef -define Build/netgear-uImage - $(call Build/uImage,$(1) -M $(NETGEAR_KERNEL_MAGIC)) -endef - define Device/netgear_generic DEVICE_VENDOR := NETGEAR - KERNEL := kernel-bin | append-dtb | lzma -d20 | netgear-uImage lzma - KERNEL_INITRAMFS := kernel-bin | append-dtb | lzma -d20 | netgear-uImage lzma + KERNEL := kernel-bin | append-dtb | lzma -d20 | uImage lzma + KERNEL_INITRAMFS := kernel-bin | append-dtb | lzma -d20 | uImage lzma IMAGES += factory.img IMAGE/default := append-kernel | pad-to $$$$(BLOCKSIZE) | netgear-squashfs | \ append-rootfs | pad-rootfs diff --git a/target/linux/ath79/image/generic.mk b/target/linux/ath79/image/generic.mk index aedab1cc76..a0d5e7ab01 100644 --- a/target/linux/ath79/image/generic.mk +++ b/target/linux/ath79/image/generic.mk @@ -1225,7 +1225,7 @@ TARGET_DEVICES += nec_wg800hp define Device/netgear_ex6400_ex7300 $(Device/netgear_generic) SOC := qca9558 - NETGEAR_KERNEL_MAGIC := 0x27051956 + UIMAGE_MAGIC := 0x27051956 NETGEAR_BOARD_ID := EX7300series NETGEAR_HW_ID := 29765104+16+0+128 IMAGE_SIZE := 15552k @@ -1261,7 +1261,7 @@ define Device/netgear_wndr3700 $(Device/netgear_wndr3x00) DEVICE_MODEL := WNDR3700 DEVICE_VARIANT := v1 - NETGEAR_KERNEL_MAGIC := 0x33373030 + UIMAGE_MAGIC := 0x33373030 NETGEAR_BOARD_ID := WNDR3700 IMAGE_SIZE := 7680k IMAGES += factory-NA.img @@ -1275,7 +1275,7 @@ define Device/netgear_wndr3700-v2 $(Device/netgear_wndr3x00) DEVICE_MODEL := WNDR3700 DEVICE_VARIANT := v2 - NETGEAR_KERNEL_MAGIC := 0x33373031 + UIMAGE_MAGIC := 0x33373031 NETGEAR_BOARD_ID := WNDR3700v2 NETGEAR_HW_ID := 29763654+16+64 IMAGE_SIZE := 15872k @@ -1286,7 +1286,7 @@ TARGET_DEVICES += netgear_wndr3700-v2 define Device/netgear_wndr3800 $(Device/netgear_wndr3x00) DEVICE_MODEL := WNDR3800 - NETGEAR_KERNEL_MAGIC := 0x33373031 + UIMAGE_MAGIC := 0x33373031 NETGEAR_BOARD_ID := WNDR3800 NETGEAR_HW_ID := 29763654+16+128 IMAGE_SIZE := 15872k @@ -1297,7 +1297,7 @@ TARGET_DEVICES += netgear_wndr3800 define Device/netgear_wndr3800ch $(Device/netgear_wndr3x00) DEVICE_MODEL := WNDR3800CH - NETGEAR_KERNEL_MAGIC := 0x33373031 + UIMAGE_MAGIC := 0x33373031 NETGEAR_BOARD_ID := WNDR3800CH NETGEAR_HW_ID := 29763654+16+128 IMAGE_SIZE := 15872k @@ -1309,7 +1309,7 @@ define Device/netgear_wndrmac-v1 $(Device/netgear_wndr3x00) DEVICE_MODEL := WNDRMAC DEVICE_VARIANT := v1 - NETGEAR_KERNEL_MAGIC := 0x33373031 + UIMAGE_MAGIC := 0x33373031 NETGEAR_BOARD_ID := WNDRMAC NETGEAR_HW_ID := 29763654+16+64 IMAGE_SIZE := 15872k @@ -1321,7 +1321,7 @@ define Device/netgear_wndrmac-v2 $(Device/netgear_wndr3x00) DEVICE_MODEL := WNDRMAC DEVICE_VARIANT := v2 - NETGEAR_KERNEL_MAGIC := 0x33373031 + UIMAGE_MAGIC := 0x33373031 NETGEAR_BOARD_ID := WNDRMACv2 NETGEAR_HW_ID := 29763654+16+128 IMAGE_SIZE := 15872k @@ -1334,7 +1334,7 @@ define Device/netgear_wnr2200_common SOC := ar7241 DEVICE_MODEL := WNR2200 DEVICE_PACKAGES := kmod-usb2 kmod-usb-ledtrig-usbport - NETGEAR_KERNEL_MAGIC := 0x32323030 + UIMAGE_MAGIC := 0x32323030 NETGEAR_BOARD_ID := wnr2200 endef diff --git a/target/linux/ath79/image/nand.mk b/target/linux/ath79/image/nand.mk index c7f96eb6d4..37fcb36937 100644 --- a/target/linux/ath79/image/nand.mk +++ b/target/linux/ath79/image/nand.mk @@ -1,5 +1,3 @@ -include ./common-netgear.mk # for netgear-uImage - DEVICE_VARS += RAS_ROOTFS_SIZE RAS_BOARD RAS_VERSION # attention: only zlib compression is allowed for the boot fs @@ -163,10 +161,10 @@ define Device/netgear_ath79_nand PAGESIZE := 2048 IMAGE_SIZE := 25600k KERNEL := kernel-bin | append-dtb | lzma -d20 | \ - pad-offset $$(KERNEL_SIZE) 129 | netgear-uImage lzma | \ + pad-offset $$(KERNEL_SIZE) 129 | uImage lzma | \ append-string -e '\xff' | \ - append-uImage-fakehdr filesystem $$(NETGEAR_KERNEL_MAGIC) - KERNEL_INITRAMFS := kernel-bin | append-dtb | lzma -d20 | netgear-uImage lzma + append-uImage-fakehdr filesystem $$(UIMAGE_MAGIC) + KERNEL_INITRAMFS := kernel-bin | append-dtb | lzma -d20 | uImage lzma IMAGES := sysupgrade.bin factory.img IMAGE/factory.img := append-kernel | append-ubi | netgear-dni | \ check-size @@ -179,7 +177,7 @@ define Device/netgear_wndr3700-v4 SOC := ar9344 DEVICE_MODEL := WNDR3700 DEVICE_VARIANT := v4 - NETGEAR_KERNEL_MAGIC := 0x33373033 + UIMAGE_MAGIC := 0x33373033 NETGEAR_BOARD_ID := WNDR3700v4 NETGEAR_HW_ID := 29763948+128+128 $(Device/netgear_ath79_nand) @@ -189,7 +187,7 @@ TARGET_DEVICES += netgear_wndr3700-v4 define Device/netgear_wndr4300 SOC := ar9344 DEVICE_MODEL := WNDR4300 - NETGEAR_KERNEL_MAGIC := 0x33373033 + UIMAGE_MAGIC := 0x33373033 NETGEAR_BOARD_ID := WNDR4300 NETGEAR_HW_ID := 29763948+0+128+128+2x2+3x3 $(Device/netgear_ath79_nand) @@ -199,7 +197,7 @@ TARGET_DEVICES += netgear_wndr4300 define Device/netgear_wndr4300sw SOC := ar9344 DEVICE_MODEL := WNDR4300SW - NETGEAR_KERNEL_MAGIC := 0x33373033 + UIMAGE_MAGIC := 0x33373033 NETGEAR_BOARD_ID := WNDR4300SW NETGEAR_HW_ID := 29763948+0+128+128+2x2+3x3 $(Device/netgear_ath79_nand) @@ -209,7 +207,7 @@ TARGET_DEVICES += netgear_wndr4300sw define Device/netgear_wndr4300tn SOC := ar9344 DEVICE_MODEL := WNDR4300TN - NETGEAR_KERNEL_MAGIC := 0x33373033 + UIMAGE_MAGIC := 0x33373033 NETGEAR_BOARD_ID := WNDR4300TN NETGEAR_HW_ID := 29763948+0+128+128+2x2+3x3 $(Device/netgear_ath79_nand) @@ -220,7 +218,7 @@ define Device/netgear_wndr4300-v2 SOC := qca9563 DEVICE_MODEL := WNDR4300 DEVICE_VARIANT := v2 - NETGEAR_KERNEL_MAGIC := 0x27051956 + UIMAGE_MAGIC := 0x27051956 NETGEAR_BOARD_ID := WNDR4500series NETGEAR_HW_ID := 29764821+2+128+128+3x3+3x3+5508012175 $(Device/netgear_ath79_nand) @@ -231,7 +229,7 @@ define Device/netgear_wndr4500-v3 SOC := qca9563 DEVICE_MODEL := WNDR4500 DEVICE_VARIANT := v3 - NETGEAR_KERNEL_MAGIC := 0x27051956 + UIMAGE_MAGIC := 0x27051956 NETGEAR_BOARD_ID := WNDR4500series NETGEAR_HW_ID := 29764821+2+128+128+3x3+3x3+5508012173 $(Device/netgear_ath79_nand) diff --git a/target/linux/ath79/image/tiny-netgear.mk b/target/linux/ath79/image/tiny-netgear.mk index 8561f91ab8..080827c08d 100644 --- a/target/linux/ath79/image/tiny-netgear.mk +++ b/target/linux/ath79/image/tiny-netgear.mk @@ -6,7 +6,7 @@ define Device/netgear_wnr612-v2 DEVICE_MODEL := WNR612 DEVICE_VARIANT := v2 DEVICE_DTS := ar7240_netgear_wnr612-v2 - NETGEAR_KERNEL_MAGIC := 0x32303631 + UIMAGE_MAGIC := 0x32303631 NETGEAR_BOARD_ID := REALWNR612V2 IMAGE_SIZE := 3712k SUPPORTED_DEVICES += wnr612-v2 @@ -19,7 +19,7 @@ define Device/on_n150r SOC := ar7240 DEVICE_VENDOR := On Networks DEVICE_MODEL := N150R - NETGEAR_KERNEL_MAGIC := 0x32303631 + UIMAGE_MAGIC := 0x32303631 NETGEAR_BOARD_ID := N150R IMAGE_SIZE := 3712k SUPPORTED_DEVICES += n150r @@ -32,7 +32,7 @@ define Device/netgear_wnr1000-v2 SOC := ar7240 DEVICE_MODEL := WNR1000 DEVICE_VARIANT := v2 - NETGEAR_KERNEL_MAGIC := 0x31303031 + UIMAGE_MAGIC := 0x31303031 NETGEAR_BOARD_ID := WNR1000V2 NETGEAR_HW_ID := 29763331+4+32 IMAGE_SIZE := 3712k @@ -46,7 +46,7 @@ define Device/netgear_wnr2000-v3 SOC := ar7241 DEVICE_MODEL := WNR2000 DEVICE_VARIANT := v3 - NETGEAR_KERNEL_MAGIC := 0x32303033 + UIMAGE_MAGIC := 0x32303033 NETGEAR_BOARD_ID := WNR2000V3 NETGEAR_HW_ID := 29763551+04+32 IMAGE_SIZE := 3712k From 8582e15616d3d42340810cb9c880825ccf87e1b0 Mon Sep 17 00:00:00 2001 From: Sander Vanheule Date: Wed, 4 Nov 2020 10:21:17 +0100 Subject: [PATCH 27/69] rtl838x: drop custom mkimage build function UIMAGE_MAGIC is now supported by Build/uImage, in addition to UIMAGE_NAME. This removes the need for a custom mkimage call, so let's remove it. Signed-off-by: Sander Vanheule --- target/linux/rtl838x/image/Makefile | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/target/linux/rtl838x/image/Makefile b/target/linux/rtl838x/image/Makefile index 51acd41c76..266759220f 100644 --- a/target/linux/rtl838x/image/Makefile +++ b/target/linux/rtl838x/image/Makefile @@ -7,16 +7,6 @@ include $(INCLUDE_DIR)/image.mk KERNEL_LOADADDR = 0x80000000 KERNEL_ENTRY = 0x80000400 -define Build/custom-uimage - mkimage -A $(LINUX_KARCH) \ - -O linux -T kernel \ - -C gzip -a $(KERNEL_LOADADDR) $(if $(UIMAGE_MAGIC),-M $(UIMAGE_MAGIC),) \ - -e $(if $(KERNEL_ENTRY),$(KERNEL_ENTRY),$(KERNEL_LOADADDR)) \ - -n '$(1)' -d $@ $@.new - mv $@.new $@ -endef - - define Device/Default PROFILES = Default KERNEL := kernel-bin | append-dtb | gzip | uImage gzip @@ -35,8 +25,7 @@ define Device/allnet_all-sg8208m DEVICE_VENDOR := ALLNET DEVICE_MODEL := ALL-SG8208M UIMAGE_MAGIC := 0x00000006 - KERNEL := kernel-bin | append-dtb | gzip | custom-uimage 2.2.2.0 - KERNEL_INITRAMFS := kernel-bin | append-dtb | gzip | custom-uimage 2.2.2.0 + UIMAGE_NAME := 2.2.2.0 DEVICE_PACKAGES := ip-full ip-bridge kmod-gpio-button-hotplug tc endef TARGET_DEVICES += allnet_all-sg8208m From b9246bbdc9a97041c5573845a7858ef3b1c54ff2 Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Wed, 14 Oct 2020 22:58:26 -0700 Subject: [PATCH 28/69] base-files: functions.sh: replace [^...] with [!...] in case Strictly speaking, ash does not support it. From https://wiki.ubuntu.com/DashAsBinSh#A.5B.5E.5D Not to be confused by sed's and other program's regular expression syntax. Uses of [^...] in case (parameter/word expansion in general) need to be replaced with [!...]. Found with shellcheck: https://github.com/koalaman/shellcheck/wiki/SC2169 Signed-off-by: Rosen Penev [minor commit title/message adjustments] Signed-off-by: Adrian Schmutzler --- package/base-files/files/lib/functions.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/base-files/files/lib/functions.sh b/package/base-files/files/lib/functions.sh index 7da0c872fa..ee4ad1af83 100755 --- a/package/base-files/files/lib/functions.sh +++ b/package/base-files/files/lib/functions.sh @@ -108,7 +108,7 @@ config_unset() { # config_get