From 48c1fdd046f409fd5e28932f1d53343fa214fbc4 Mon Sep 17 00:00:00 2001 From: Adrian Schmutzler Date: Sat, 6 Jun 2020 23:13:41 +0200 Subject: [PATCH 1/8] treewide: drop shebang from non-executable target files This drops the shebang from all target files for /lib and /etc/uci-defaults folders, as these are sourced and the shebang is useless. While at it, fix the executable flag on a few of these files. This does not touch ar71xx, as this target is just used for backporting now and applying cosmetic changes would just complicate things. Signed-off-by: Adrian Schmutzler --- .../base-files/lib/preinit/05_set_iface_mac_apm821xx | 2 -- .../base-files/lib/preinit/05_set_preinit_iface_apm821xx | 2 -- target/linux/apm821xx/base-files/lib/preinit/79_move_config | 2 -- target/linux/apm821xx/base-files/lib/upgrade/platform.sh | 2 -- target/linux/arc770/base-files/lib/arc.sh | 1 - .../linux/arc770/base-files/lib/preinit/01_preinit_arc.sh | 6 ++---- .../linux/archs38/base-files/lib/preinit/01_preinit_arc.sh | 6 ++---- target/linux/at91/base-files/lib/at91.sh | 1 - .../linux/at91/base-files/lib/preinit/01_preinit_do_at91.sh | 2 -- .../ath25/base-files/lib/preinit/15_preinit_iface_atheros | 2 -- .../generic/base-files/etc/uci-defaults/04_led_migration | 2 -- .../generic/base-files/etc/uci-defaults/09_fix-checksum | 1 - target/linux/ath79/generic/base-files/lib/functions/k2t.sh | 1 - .../ath79/generic/base-files/lib/preinit/10_fix_eth_mac.sh | 2 -- .../mikrotik/base-files/etc/uci-defaults/04_led_migration | 2 -- .../base-files/lib/preinit/05_set_preinit_iface_brcm2708 | 1 - target/linux/bcm27xx/base-files/lib/preinit/79_move_config | 1 - .../base-files/etc/uci-defaults/03_network_migration | 1 - target/linux/bcm47xx/base-files/etc/uci-defaults/09_fix_crc | 2 -- target/linux/bcm47xx/base-files/lib/preinit/01_sysinfo | 2 -- target/linux/bcm53xx/base-files/etc/uci-defaults/09_fix_crc | 2 -- target/linux/bcm63xx/base-files/etc/uci-defaults/09_fix_crc | 2 -- target/linux/cns3xxx/base-files/lib/cns3xxx.sh | 2 -- target/linux/cns3xxx/base-files/lib/preinit/01_sysinfo | 2 -- .../gemini/base-files/etc/uci-defaults/09_fix-checksum | 1 - .../gemini/base-files/lib/preinit/05_set_ether_mac_gemini | 2 -- target/linux/imx6/base-files/lib/imx6.sh | 1 - target/linux/imx6/base-files/lib/preinit/01_sysinfo | 2 -- target/linux/imx6/base-files/lib/preinit/79_move_config | 2 -- .../base-files/lib/preinit/05_set_iface_mac_ipq40xx.sh | 2 -- .../base-files/lib/preinit/06_set_preinit_iface_ipq40xx.sh | 2 -- target/linux/ipq806x/base-files/lib/upgrade/buffalo.sh | 1 - .../lantiq/base-files/etc/uci-defaults/01_led_migration | 1 - .../base-files/etc/uci-defaults/02_migrate_xdsl_iface | 2 -- .../base-files/lib/preinit/05_layerscape_reorder_eth | 2 -- target/linux/layerscape/base-files/lib/upgrade/platform.sh | 1 - .../mediatek/base-files/lib/preinit/05_set_preinit_iface | 2 -- .../mediatek/base-files/lib/preinit/06_set_rps_sock_flow | 2 -- .../mediatek/mt7623/base-files/lib/preinit/07_set_iface_mac | 1 - .../mediatek/mt7623/base-files/lib/preinit/79_move_config | 1 - .../base-files/lib/preinit/05_set_preinit_iface_mpc85xx | 1 - target/linux/mvebu/base-files/lib/preinit/79_move_config | 1 - .../mvebu/cortexa9/base-files/etc/uci-defaults/03_wireless | 1 - .../mvebu/cortexa9/base-files/etc/uci-defaults/04_mambafan | 1 - target/linux/octeon/base-files/lib/preinit/79_move_config | 1 - target/linux/omap/base-files/lib/preinit/79_move_config | 1 - target/linux/pistachio/base-files/lib/upgrade/platform.sh | 1 - .../ramips/base-files/etc/uci-defaults/09_fix-checksum | 1 - .../mt7620/base-files/etc/uci-defaults/04_led_migration | 2 -- .../mt7621/base-files/etc/uci-defaults/04_led_migration | 2 -- .../base-files/lib/preinit/07_mt7621_bringup_dsa_master | 2 -- .../mt76x8/base-files/etc/uci-defaults/04_led_migration | 2 -- .../rt305x/base-files/etc/uci-defaults/04_led_migration | 2 -- .../rt305x/base-files/lib/preinit/04_handle_checksumming | 2 -- .../rt3883/base-files/lib/preinit/04_handle_checksumming | 2 -- target/linux/x86/64/base-files/lib/preinit/45_mount_xenfs | 1 - target/linux/x86/base-files/lib/preinit/02_load_x86_ucode | 1 - target/linux/x86/base-files/lib/preinit/15_essential_fs_x86 | 1 - target/linux/x86/base-files/lib/preinit/79_move_config | 1 - .../linux/x86/base-files/lib/preinit/81_upgrade_bootloader | 2 -- .../linux/x86/generic/base-files/lib/preinit/45_mount_xenfs | 1 - 61 files changed, 4 insertions(+), 99 deletions(-) mode change 100755 => 100644 target/linux/apm821xx/base-files/lib/upgrade/platform.sh mode change 100755 => 100644 target/linux/at91/base-files/lib/at91.sh mode change 100755 => 100644 target/linux/ath79/generic/base-files/lib/functions/k2t.sh mode change 100755 => 100644 target/linux/imx6/base-files/lib/imx6.sh mode change 100755 => 100644 target/linux/pistachio/base-files/lib/upgrade/platform.sh diff --git a/target/linux/apm821xx/base-files/lib/preinit/05_set_iface_mac_apm821xx b/target/linux/apm821xx/base-files/lib/preinit/05_set_iface_mac_apm821xx index 11955dd5a2..1f8c1c29fb 100644 --- a/target/linux/apm821xx/base-files/lib/preinit/05_set_iface_mac_apm821xx +++ b/target/linux/apm821xx/base-files/lib/preinit/05_set_iface_mac_apm821xx @@ -1,5 +1,3 @@ -#!/bin/sh - preinit_set_mac_address() { . /lib/functions.sh diff --git a/target/linux/apm821xx/base-files/lib/preinit/05_set_preinit_iface_apm821xx b/target/linux/apm821xx/base-files/lib/preinit/05_set_preinit_iface_apm821xx index a15a055a25..eabafc010b 100644 --- a/target/linux/apm821xx/base-files/lib/preinit/05_set_preinit_iface_apm821xx +++ b/target/linux/apm821xx/base-files/lib/preinit/05_set_preinit_iface_apm821xx @@ -1,5 +1,3 @@ -#!/bin/sh - apm821xx_set_preinit_iface() { ifname=eth0 } diff --git a/target/linux/apm821xx/base-files/lib/preinit/79_move_config b/target/linux/apm821xx/base-files/lib/preinit/79_move_config index 37d35b663b..1796e9f5f4 100644 --- a/target/linux/apm821xx/base-files/lib/preinit/79_move_config +++ b/target/linux/apm821xx/base-files/lib/preinit/79_move_config @@ -1,5 +1,3 @@ -#!/bin/sh - BOOTPART=/dev/sda1 move_config() { diff --git a/target/linux/apm821xx/base-files/lib/upgrade/platform.sh b/target/linux/apm821xx/base-files/lib/upgrade/platform.sh old mode 100755 new mode 100644 index 32e87513f3..cc095b36a1 --- a/target/linux/apm821xx/base-files/lib/upgrade/platform.sh +++ b/target/linux/apm821xx/base-files/lib/upgrade/platform.sh @@ -1,5 +1,3 @@ -#!/bin/sh - PART_NAME=firmware REQUIRE_IMAGE_METADATA=1 diff --git a/target/linux/arc770/base-files/lib/arc.sh b/target/linux/arc770/base-files/lib/arc.sh index 185aeedb2d..3ad0b33678 100644 --- a/target/linux/arc770/base-files/lib/arc.sh +++ b/target/linux/arc770/base-files/lib/arc.sh @@ -1,4 +1,3 @@ -#!/bin/sh # # Copyright (C) 2015 OpenWrt.org # diff --git a/target/linux/arc770/base-files/lib/preinit/01_preinit_arc.sh b/target/linux/arc770/base-files/lib/preinit/01_preinit_arc.sh index 192c91bf2d..c5cd905828 100644 --- a/target/linux/arc770/base-files/lib/preinit/01_preinit_arc.sh +++ b/target/linux/arc770/base-files/lib/preinit/01_preinit_arc.sh @@ -1,9 +1,7 @@ -#!/bin/sh - do_arc() { - . /lib/arc.sh + . /lib/arc.sh - arc_board_detect + arc_board_detect } boot_hook_add preinit_main do_arc diff --git a/target/linux/archs38/base-files/lib/preinit/01_preinit_arc.sh b/target/linux/archs38/base-files/lib/preinit/01_preinit_arc.sh index 192c91bf2d..c5cd905828 100644 --- a/target/linux/archs38/base-files/lib/preinit/01_preinit_arc.sh +++ b/target/linux/archs38/base-files/lib/preinit/01_preinit_arc.sh @@ -1,9 +1,7 @@ -#!/bin/sh - do_arc() { - . /lib/arc.sh + . /lib/arc.sh - arc_board_detect + arc_board_detect } boot_hook_add preinit_main do_arc diff --git a/target/linux/at91/base-files/lib/at91.sh b/target/linux/at91/base-files/lib/at91.sh old mode 100755 new mode 100644 index ea38925ea0..19a63e1200 --- a/target/linux/at91/base-files/lib/at91.sh +++ b/target/linux/at91/base-files/lib/at91.sh @@ -1,4 +1,3 @@ -#!/bin/sh # # Copyright (C) 2014 OpenWrt.org # diff --git a/target/linux/at91/base-files/lib/preinit/01_preinit_do_at91.sh b/target/linux/at91/base-files/lib/preinit/01_preinit_do_at91.sh index 5c981016a4..c812329568 100644 --- a/target/linux/at91/base-files/lib/preinit/01_preinit_do_at91.sh +++ b/target/linux/at91/base-files/lib/preinit/01_preinit_do_at91.sh @@ -1,5 +1,3 @@ -#!/bin/sh - do_at91() { . /lib/at91.sh diff --git a/target/linux/ath25/base-files/lib/preinit/15_preinit_iface_atheros b/target/linux/ath25/base-files/lib/preinit/15_preinit_iface_atheros index bd46cb9084..6b77f393a9 100644 --- a/target/linux/ath25/base-files/lib/preinit/15_preinit_iface_atheros +++ b/target/linux/ath25/base-files/lib/preinit/15_preinit_iface_atheros @@ -1,5 +1,3 @@ -#!/bin/sh - # reset button only supported on ar5315+ at the moment preinit_ip() { if [ -z "$pi_ifname" ]; then diff --git a/target/linux/ath79/generic/base-files/etc/uci-defaults/04_led_migration b/target/linux/ath79/generic/base-files/etc/uci-defaults/04_led_migration index cffc2e6c4b..1c7ecba5f8 100644 --- a/target/linux/ath79/generic/base-files/etc/uci-defaults/04_led_migration +++ b/target/linux/ath79/generic/base-files/etc/uci-defaults/04_led_migration @@ -1,5 +1,3 @@ -#!/bin/sh - . /lib/functions.sh . /lib/functions/migrations.sh diff --git a/target/linux/ath79/generic/base-files/etc/uci-defaults/09_fix-checksum b/target/linux/ath79/generic/base-files/etc/uci-defaults/09_fix-checksum index 085ad2e925..74c608b96d 100644 --- a/target/linux/ath79/generic/base-files/etc/uci-defaults/09_fix-checksum +++ b/target/linux/ath79/generic/base-files/etc/uci-defaults/09_fix-checksum @@ -1,4 +1,3 @@ -#!/bin/sh . /lib/functions.sh fix_seama_header() { diff --git a/target/linux/ath79/generic/base-files/lib/functions/k2t.sh b/target/linux/ath79/generic/base-files/lib/functions/k2t.sh old mode 100755 new mode 100644 index 1158df818b..f16734fa64 --- a/target/linux/ath79/generic/base-files/lib/functions/k2t.sh +++ b/target/linux/ath79/generic/base-files/lib/functions/k2t.sh @@ -1,4 +1,3 @@ -#!/bin/sh # # Copyright (C) 2018 Weijie Gao # diff --git a/target/linux/ath79/generic/base-files/lib/preinit/10_fix_eth_mac.sh b/target/linux/ath79/generic/base-files/lib/preinit/10_fix_eth_mac.sh index 59fd36b2e9..61577a376b 100644 --- a/target/linux/ath79/generic/base-files/lib/preinit/10_fix_eth_mac.sh +++ b/target/linux/ath79/generic/base-files/lib/preinit/10_fix_eth_mac.sh @@ -1,5 +1,3 @@ -#!/bin/sh - . /lib/functions.sh preinit_set_mac_address() { diff --git a/target/linux/ath79/mikrotik/base-files/etc/uci-defaults/04_led_migration b/target/linux/ath79/mikrotik/base-files/etc/uci-defaults/04_led_migration index 1a7b371a99..c12a7ac02c 100644 --- a/target/linux/ath79/mikrotik/base-files/etc/uci-defaults/04_led_migration +++ b/target/linux/ath79/mikrotik/base-files/etc/uci-defaults/04_led_migration @@ -1,5 +1,3 @@ -#!/bin/sh - . /lib/functions.sh . /lib/functions/migrations.sh diff --git a/target/linux/bcm27xx/base-files/lib/preinit/05_set_preinit_iface_brcm2708 b/target/linux/bcm27xx/base-files/lib/preinit/05_set_preinit_iface_brcm2708 index de221ae7ad..269465e301 100644 --- a/target/linux/bcm27xx/base-files/lib/preinit/05_set_preinit_iface_brcm2708 +++ b/target/linux/bcm27xx/base-files/lib/preinit/05_set_preinit_iface_brcm2708 @@ -1,4 +1,3 @@ -#!/bin/sh # Copyright (C) 2015-2016 OpenWrt.org # Copyright (C) 2017 LEDE project diff --git a/target/linux/bcm27xx/base-files/lib/preinit/79_move_config b/target/linux/bcm27xx/base-files/lib/preinit/79_move_config index b8738b645e..c9fb59a64f 100644 --- a/target/linux/bcm27xx/base-files/lib/preinit/79_move_config +++ b/target/linux/bcm27xx/base-files/lib/preinit/79_move_config @@ -1,4 +1,3 @@ -#!/bin/sh # Copyright (C) 2015 OpenWrt.org . /lib/upgrade/common.sh diff --git a/target/linux/bcm47xx/base-files/etc/uci-defaults/03_network_migration b/target/linux/bcm47xx/base-files/etc/uci-defaults/03_network_migration index e430b41d48..3b380e047a 100644 --- a/target/linux/bcm47xx/base-files/etc/uci-defaults/03_network_migration +++ b/target/linux/bcm47xx/base-files/etc/uci-defaults/03_network_migration @@ -1,4 +1,3 @@ -#!/bin/sh # # Copyright (C) 2014-2015 OpenWrt.org # diff --git a/target/linux/bcm47xx/base-files/etc/uci-defaults/09_fix_crc b/target/linux/bcm47xx/base-files/etc/uci-defaults/09_fix_crc index 346a532998..e9104a51cb 100644 --- a/target/linux/bcm47xx/base-files/etc/uci-defaults/09_fix_crc +++ b/target/linux/bcm47xx/base-files/etc/uci-defaults/09_fix_crc @@ -1,7 +1,5 @@ -#!/bin/sh # # Copyright (C) 2007 OpenWrt.org # -# mtd fixtrx firmware diff --git a/target/linux/bcm47xx/base-files/lib/preinit/01_sysinfo b/target/linux/bcm47xx/base-files/lib/preinit/01_sysinfo index 8c7bd399da..7cd0da5aab 100644 --- a/target/linux/bcm47xx/base-files/lib/preinit/01_sysinfo +++ b/target/linux/bcm47xx/base-files/lib/preinit/01_sysinfo @@ -1,5 +1,3 @@ -#!/bin/sh - do_sysinfo_bcm47xx() { local boardtype="$(nvram get boardtype)" local boardnum="$(nvram get boardnum)" diff --git a/target/linux/bcm53xx/base-files/etc/uci-defaults/09_fix_crc b/target/linux/bcm53xx/base-files/etc/uci-defaults/09_fix_crc index 16793ffa6b..eae84bb771 100644 --- a/target/linux/bcm53xx/base-files/etc/uci-defaults/09_fix_crc +++ b/target/linux/bcm53xx/base-files/etc/uci-defaults/09_fix_crc @@ -1,5 +1,3 @@ -#!/bin/sh - kernel_size=$(sed -n 's/mtd[0-9]*: \([0-9a-f]*\).*"\(kernel\|linux\)".*/\1/p' /proc/mtd) mtd ${kernel_size:+-c 0x$kernel_size} fixtrx firmware && exit 0 diff --git a/target/linux/bcm63xx/base-files/etc/uci-defaults/09_fix_crc b/target/linux/bcm63xx/base-files/etc/uci-defaults/09_fix_crc index fdb5ddec72..6c61f7d38c 100644 --- a/target/linux/bcm63xx/base-files/etc/uci-defaults/09_fix_crc +++ b/target/linux/bcm63xx/base-files/etc/uci-defaults/09_fix_crc @@ -1,8 +1,6 @@ -#!/bin/sh # # Copyright (C) 2007 OpenWrt.org # -# . /lib/functions.sh diff --git a/target/linux/cns3xxx/base-files/lib/cns3xxx.sh b/target/linux/cns3xxx/base-files/lib/cns3xxx.sh index 877f9f8749..ec694c4f7a 100644 --- a/target/linux/cns3xxx/base-files/lib/cns3xxx.sh +++ b/target/linux/cns3xxx/base-files/lib/cns3xxx.sh @@ -1,5 +1,3 @@ -#!/bin/sh - CNS3XXX_BOARD_NAME= CNS3XXX_MODEL= diff --git a/target/linux/cns3xxx/base-files/lib/preinit/01_sysinfo b/target/linux/cns3xxx/base-files/lib/preinit/01_sysinfo index cc7b5551e9..155fee42e0 100644 --- a/target/linux/cns3xxx/base-files/lib/preinit/01_sysinfo +++ b/target/linux/cns3xxx/base-files/lib/preinit/01_sysinfo @@ -1,5 +1,3 @@ -#!/bin/sh - do_sysinfo_cns3xxx() { . /lib/cns3xxx.sh diff --git a/target/linux/gemini/base-files/etc/uci-defaults/09_fix-checksum b/target/linux/gemini/base-files/etc/uci-defaults/09_fix-checksum index 5f79d1a65c..3acf20db5f 100644 --- a/target/linux/gemini/base-files/etc/uci-defaults/09_fix-checksum +++ b/target/linux/gemini/base-files/etc/uci-defaults/09_fix-checksum @@ -1,4 +1,3 @@ -#!/bin/sh # # Copyright (C) 2019 OpenWrt.org # diff --git a/target/linux/gemini/base-files/lib/preinit/05_set_ether_mac_gemini b/target/linux/gemini/base-files/lib/preinit/05_set_ether_mac_gemini index 3712975fa8..07edd85b52 100644 --- a/target/linux/gemini/base-files/lib/preinit/05_set_ether_mac_gemini +++ b/target/linux/gemini/base-files/lib/preinit/05_set_ether_mac_gemini @@ -1,5 +1,3 @@ -#!/bin/sh - . /lib/functions.sh . /lib/functions/system.sh diff --git a/target/linux/imx6/base-files/lib/imx6.sh b/target/linux/imx6/base-files/lib/imx6.sh old mode 100755 new mode 100644 index 63fff0f3c4..a9fd0cad94 --- a/target/linux/imx6/base-files/lib/imx6.sh +++ b/target/linux/imx6/base-files/lib/imx6.sh @@ -1,4 +1,3 @@ -#!/bin/sh # # Copyright (C) 2010-2013 OpenWrt.org # diff --git a/target/linux/imx6/base-files/lib/preinit/01_sysinfo b/target/linux/imx6/base-files/lib/preinit/01_sysinfo index 0a91aed010..73f9e596b2 100644 --- a/target/linux/imx6/base-files/lib/preinit/01_sysinfo +++ b/target/linux/imx6/base-files/lib/preinit/01_sysinfo @@ -1,5 +1,3 @@ -#!/bin/sh - do_sysinfo_imx6() { . /lib/imx6.sh diff --git a/target/linux/imx6/base-files/lib/preinit/79_move_config b/target/linux/imx6/base-files/lib/preinit/79_move_config index bdf397c4fc..7e30292049 100644 --- a/target/linux/imx6/base-files/lib/preinit/79_move_config +++ b/target/linux/imx6/base-files/lib/preinit/79_move_config @@ -1,5 +1,3 @@ -#!/bin/sh - . /lib/imx6.sh . /lib/functions.sh . /lib/upgrade/common.sh diff --git a/target/linux/ipq40xx/base-files/lib/preinit/05_set_iface_mac_ipq40xx.sh b/target/linux/ipq40xx/base-files/lib/preinit/05_set_iface_mac_ipq40xx.sh index f9ec8ab055..4d8113698e 100644 --- a/target/linux/ipq40xx/base-files/lib/preinit/05_set_iface_mac_ipq40xx.sh +++ b/target/linux/ipq40xx/base-files/lib/preinit/05_set_iface_mac_ipq40xx.sh @@ -1,5 +1,3 @@ -#!/bin/sh - . /lib/functions.sh preinit_set_mac_address() { diff --git a/target/linux/ipq40xx/base-files/lib/preinit/06_set_preinit_iface_ipq40xx.sh b/target/linux/ipq40xx/base-files/lib/preinit/06_set_preinit_iface_ipq40xx.sh index 42667d2dfb..50c289df31 100644 --- a/target/linux/ipq40xx/base-files/lib/preinit/06_set_preinit_iface_ipq40xx.sh +++ b/target/linux/ipq40xx/base-files/lib/preinit/06_set_preinit_iface_ipq40xx.sh @@ -1,5 +1,3 @@ -#!/bin/sh - set_preinit_iface() { . /lib/functions.sh diff --git a/target/linux/ipq806x/base-files/lib/upgrade/buffalo.sh b/target/linux/ipq806x/base-files/lib/upgrade/buffalo.sh index 77fa65e60e..6a51de4ee3 100644 --- a/target/linux/ipq806x/base-files/lib/upgrade/buffalo.sh +++ b/target/linux/ipq806x/base-files/lib/upgrade/buffalo.sh @@ -1,4 +1,3 @@ -#!/bin/sh # Copyright (C) 2018 OpenWrt.org # diff --git a/target/linux/lantiq/base-files/etc/uci-defaults/01_led_migration b/target/linux/lantiq/base-files/etc/uci-defaults/01_led_migration index b1e7be6bd2..961e39ee61 100644 --- a/target/linux/lantiq/base-files/etc/uci-defaults/01_led_migration +++ b/target/linux/lantiq/base-files/etc/uci-defaults/01_led_migration @@ -1,4 +1,3 @@ -#!/bin/sh # # Copyright (C) 2013 OpenWrt.org # diff --git a/target/linux/lantiq/base-files/etc/uci-defaults/02_migrate_xdsl_iface b/target/linux/lantiq/base-files/etc/uci-defaults/02_migrate_xdsl_iface index dd57ca6d39..2a87d0df70 100644 --- a/target/linux/lantiq/base-files/etc/uci-defaults/02_migrate_xdsl_iface +++ b/target/linux/lantiq/base-files/etc/uci-defaults/02_migrate_xdsl_iface @@ -1,5 +1,3 @@ -#!/bin/sh - . /lib/functions.sh IFNAME_CHANGED=0 diff --git a/target/linux/layerscape/base-files/lib/preinit/05_layerscape_reorder_eth b/target/linux/layerscape/base-files/lib/preinit/05_layerscape_reorder_eth index c4feec42bc..141aac8a6d 100644 --- a/target/linux/layerscape/base-files/lib/preinit/05_layerscape_reorder_eth +++ b/target/linux/layerscape/base-files/lib/preinit/05_layerscape_reorder_eth @@ -1,5 +1,3 @@ -#!/bin/sh - reorder_layerscape_interfaces() { if [ ! -f /tmp/sysinfo/board_name ]; then echo "No board name found, not doing reorder_layerscape_interfaces" diff --git a/target/linux/layerscape/base-files/lib/upgrade/platform.sh b/target/linux/layerscape/base-files/lib/upgrade/platform.sh index 013023295b..1e1e28987b 100644 --- a/target/linux/layerscape/base-files/lib/upgrade/platform.sh +++ b/target/linux/layerscape/base-files/lib/upgrade/platform.sh @@ -1,4 +1,3 @@ -#!/bin/sh # # Copyright 2015-2019 Traverse Technologies # diff --git a/target/linux/mediatek/base-files/lib/preinit/05_set_preinit_iface b/target/linux/mediatek/base-files/lib/preinit/05_set_preinit_iface index eb0bed8607..8d282818c6 100644 --- a/target/linux/mediatek/base-files/lib/preinit/05_set_preinit_iface +++ b/target/linux/mediatek/base-files/lib/preinit/05_set_preinit_iface @@ -1,5 +1,3 @@ -#!/bin/sh - set_preinit_iface() { ifconfig eth0 up ifname=lan1 diff --git a/target/linux/mediatek/base-files/lib/preinit/06_set_rps_sock_flow b/target/linux/mediatek/base-files/lib/preinit/06_set_rps_sock_flow index 9a84ff4bf5..49b1dd1ca6 100644 --- a/target/linux/mediatek/base-files/lib/preinit/06_set_rps_sock_flow +++ b/target/linux/mediatek/base-files/lib/preinit/06_set_rps_sock_flow @@ -1,5 +1,3 @@ -#!/bin/sh - set_rps_sock_flow() { echo 1024 > /proc/sys/net/core/rps_sock_flow_entries } diff --git a/target/linux/mediatek/mt7623/base-files/lib/preinit/07_set_iface_mac b/target/linux/mediatek/mt7623/base-files/lib/preinit/07_set_iface_mac index 7a73a2d84d..f64458526f 100644 --- a/target/linux/mediatek/mt7623/base-files/lib/preinit/07_set_iface_mac +++ b/target/linux/mediatek/mt7623/base-files/lib/preinit/07_set_iface_mac @@ -1,4 +1,3 @@ -#!/bin/sh # Copyright (C) 2018 OpenWrt.org RECOVERY_PART=/dev/mmcblk0p1 diff --git a/target/linux/mediatek/mt7623/base-files/lib/preinit/79_move_config b/target/linux/mediatek/mt7623/base-files/lib/preinit/79_move_config index 617336583e..895240a3bc 100644 --- a/target/linux/mediatek/mt7623/base-files/lib/preinit/79_move_config +++ b/target/linux/mediatek/mt7623/base-files/lib/preinit/79_move_config @@ -1,4 +1,3 @@ -#!/bin/sh # Copyright (C) 2015 OpenWrt.org . /lib/upgrade/common.sh diff --git a/target/linux/mpc85xx/base-files/lib/preinit/05_set_preinit_iface_mpc85xx b/target/linux/mpc85xx/base-files/lib/preinit/05_set_preinit_iface_mpc85xx index 748a87490e..be9325589f 100644 --- a/target/linux/mpc85xx/base-files/lib/preinit/05_set_preinit_iface_mpc85xx +++ b/target/linux/mpc85xx/base-files/lib/preinit/05_set_preinit_iface_mpc85xx @@ -1,4 +1,3 @@ -#!/bin/sh # # Copyright (C) 2013 OpenWrt.org # diff --git a/target/linux/mvebu/base-files/lib/preinit/79_move_config b/target/linux/mvebu/base-files/lib/preinit/79_move_config index 195be0e137..e63fcf9a6a 100644 --- a/target/linux/mvebu/base-files/lib/preinit/79_move_config +++ b/target/linux/mvebu/base-files/lib/preinit/79_move_config @@ -1,4 +1,3 @@ -#!/bin/sh # Copyright (C) 2015 OpenWrt.org . /lib/functions.sh diff --git a/target/linux/mvebu/cortexa9/base-files/etc/uci-defaults/03_wireless b/target/linux/mvebu/cortexa9/base-files/etc/uci-defaults/03_wireless index 79c74626f5..91bcbba253 100644 --- a/target/linux/mvebu/cortexa9/base-files/etc/uci-defaults/03_wireless +++ b/target/linux/mvebu/cortexa9/base-files/etc/uci-defaults/03_wireless @@ -1,4 +1,3 @@ -#!/bin/sh # # Copyright (C) 2015 OpenWrt.org # diff --git a/target/linux/mvebu/cortexa9/base-files/etc/uci-defaults/04_mambafan b/target/linux/mvebu/cortexa9/base-files/etc/uci-defaults/04_mambafan index 29c447d840..3ce9b68523 100644 --- a/target/linux/mvebu/cortexa9/base-files/etc/uci-defaults/04_mambafan +++ b/target/linux/mvebu/cortexa9/base-files/etc/uci-defaults/04_mambafan @@ -1,4 +1,3 @@ -#!/bin/sh # # Copyright (C) 2017 LEDE-Project.org # diff --git a/target/linux/octeon/base-files/lib/preinit/79_move_config b/target/linux/octeon/base-files/lib/preinit/79_move_config index a4130e26d8..866bef495b 100644 --- a/target/linux/octeon/base-files/lib/preinit/79_move_config +++ b/target/linux/octeon/base-files/lib/preinit/79_move_config @@ -1,4 +1,3 @@ -#!/bin/sh # Copyright (C) 2014 OpenWrt.org move_config() { diff --git a/target/linux/omap/base-files/lib/preinit/79_move_config b/target/linux/omap/base-files/lib/preinit/79_move_config index 74caee8a8a..f5bbb47310 100644 --- a/target/linux/omap/base-files/lib/preinit/79_move_config +++ b/target/linux/omap/base-files/lib/preinit/79_move_config @@ -1,4 +1,3 @@ -#!/bin/sh # Copyright (C) 2012-2015 OpenWrt.org move_config() { diff --git a/target/linux/pistachio/base-files/lib/upgrade/platform.sh b/target/linux/pistachio/base-files/lib/upgrade/platform.sh old mode 100755 new mode 100644 index 174c321d38..16ab341fb5 --- a/target/linux/pistachio/base-files/lib/upgrade/platform.sh +++ b/target/linux/pistachio/base-files/lib/upgrade/platform.sh @@ -1,4 +1,3 @@ -#!/bin/sh # # Copyright (C) 2017 OpenWrt.org # diff --git a/target/linux/ramips/base-files/etc/uci-defaults/09_fix-checksum b/target/linux/ramips/base-files/etc/uci-defaults/09_fix-checksum index 482659a2f6..f2408f8f3e 100644 --- a/target/linux/ramips/base-files/etc/uci-defaults/09_fix-checksum +++ b/target/linux/ramips/base-files/etc/uci-defaults/09_fix-checksum @@ -1,4 +1,3 @@ -#!/bin/sh # # Copyright (C) 2012 OpenWrt.org # diff --git a/target/linux/ramips/mt7620/base-files/etc/uci-defaults/04_led_migration b/target/linux/ramips/mt7620/base-files/etc/uci-defaults/04_led_migration index ba1a0df7e6..16ccd5cfef 100644 --- a/target/linux/ramips/mt7620/base-files/etc/uci-defaults/04_led_migration +++ b/target/linux/ramips/mt7620/base-files/etc/uci-defaults/04_led_migration @@ -1,5 +1,3 @@ -#!/bin/sh - . /lib/functions.sh . /lib/functions/migrations.sh diff --git a/target/linux/ramips/mt7621/base-files/etc/uci-defaults/04_led_migration b/target/linux/ramips/mt7621/base-files/etc/uci-defaults/04_led_migration index 1248dcec0f..f9cf3eae0a 100644 --- a/target/linux/ramips/mt7621/base-files/etc/uci-defaults/04_led_migration +++ b/target/linux/ramips/mt7621/base-files/etc/uci-defaults/04_led_migration @@ -1,5 +1,3 @@ -#!/bin/sh - . /lib/functions.sh . /lib/functions/migrations.sh diff --git a/target/linux/ramips/mt7621/base-files/lib/preinit/07_mt7621_bringup_dsa_master b/target/linux/ramips/mt7621/base-files/lib/preinit/07_mt7621_bringup_dsa_master index b8ebcc3f41..9a0da1716d 100644 --- a/target/linux/ramips/mt7621/base-files/lib/preinit/07_mt7621_bringup_dsa_master +++ b/target/linux/ramips/mt7621/base-files/lib/preinit/07_mt7621_bringup_dsa_master @@ -1,5 +1,3 @@ -#!/bin/sh - . /lib/functions.sh mt7621_bringup_dsa_master() { diff --git a/target/linux/ramips/mt76x8/base-files/etc/uci-defaults/04_led_migration b/target/linux/ramips/mt76x8/base-files/etc/uci-defaults/04_led_migration index 3f9f615c10..44815b2ddc 100644 --- a/target/linux/ramips/mt76x8/base-files/etc/uci-defaults/04_led_migration +++ b/target/linux/ramips/mt76x8/base-files/etc/uci-defaults/04_led_migration @@ -1,5 +1,3 @@ -#!/bin/sh - . /lib/functions.sh . /lib/functions/migrations.sh diff --git a/target/linux/ramips/rt305x/base-files/etc/uci-defaults/04_led_migration b/target/linux/ramips/rt305x/base-files/etc/uci-defaults/04_led_migration index b1a94bf81b..1009154cac 100644 --- a/target/linux/ramips/rt305x/base-files/etc/uci-defaults/04_led_migration +++ b/target/linux/ramips/rt305x/base-files/etc/uci-defaults/04_led_migration @@ -1,5 +1,3 @@ -#!/bin/sh - . /lib/functions.sh . /lib/functions/migrations.sh diff --git a/target/linux/ramips/rt305x/base-files/lib/preinit/04_handle_checksumming b/target/linux/ramips/rt305x/base-files/lib/preinit/04_handle_checksumming index 9a2361d057..e2e08937a3 100644 --- a/target/linux/ramips/rt305x/base-files/lib/preinit/04_handle_checksumming +++ b/target/linux/ramips/rt305x/base-files/lib/preinit/04_handle_checksumming @@ -1,5 +1,3 @@ -#!/bin/sh - # Netgear WNCE2001 has does a checksum check on boot and goes into recovery # tftp mode when the check fails. Initializing the JFFS2 partition triggers # this, so we make sure to zero checksum and size to be checksummed before diff --git a/target/linux/ramips/rt3883/base-files/lib/preinit/04_handle_checksumming b/target/linux/ramips/rt3883/base-files/lib/preinit/04_handle_checksumming index e2aef5f1f2..62927ff974 100644 --- a/target/linux/ramips/rt3883/base-files/lib/preinit/04_handle_checksumming +++ b/target/linux/ramips/rt3883/base-files/lib/preinit/04_handle_checksumming @@ -1,5 +1,3 @@ -#!/bin/sh - # Netgear WNCE2001 has does a checksum check on boot and goes into recovery # tftp mode when the check fails. Initializing the JFFS2 partition triggers # this, so we make sure to zero checksum and size to be checksummed before diff --git a/target/linux/x86/64/base-files/lib/preinit/45_mount_xenfs b/target/linux/x86/64/base-files/lib/preinit/45_mount_xenfs index ac484f6210..e57e354102 100644 --- a/target/linux/x86/64/base-files/lib/preinit/45_mount_xenfs +++ b/target/linux/x86/64/base-files/lib/preinit/45_mount_xenfs @@ -1,4 +1,3 @@ -#!/bin/sh # Copyright (C) 2010 OpenWrt.org do_mount_xenfs() { diff --git a/target/linux/x86/base-files/lib/preinit/02_load_x86_ucode b/target/linux/x86/base-files/lib/preinit/02_load_x86_ucode index fb309c75c1..9db3b58ada 100644 --- a/target/linux/x86/base-files/lib/preinit/02_load_x86_ucode +++ b/target/linux/x86/base-files/lib/preinit/02_load_x86_ucode @@ -1,4 +1,3 @@ -#!/bin/sh # Copyright (C) 2018 OpenWrt.org do_load_x86_ucode() { diff --git a/target/linux/x86/base-files/lib/preinit/15_essential_fs_x86 b/target/linux/x86/base-files/lib/preinit/15_essential_fs_x86 index 5d5453093f..78501d4956 100644 --- a/target/linux/x86/base-files/lib/preinit/15_essential_fs_x86 +++ b/target/linux/x86/base-files/lib/preinit/15_essential_fs_x86 @@ -1,4 +1,3 @@ -#!/bin/sh # Copyright (C) 2006-2010 OpenWrt.org # Copyright (C) 2010 Vertical Communications diff --git a/target/linux/x86/base-files/lib/preinit/79_move_config b/target/linux/x86/base-files/lib/preinit/79_move_config index 338398c947..444cd75e44 100644 --- a/target/linux/x86/base-files/lib/preinit/79_move_config +++ b/target/linux/x86/base-files/lib/preinit/79_move_config @@ -1,4 +1,3 @@ -#!/bin/sh # Copyright (C) 2012-2015 OpenWrt.org move_config() { diff --git a/target/linux/x86/base-files/lib/preinit/81_upgrade_bootloader b/target/linux/x86/base-files/lib/preinit/81_upgrade_bootloader index 1379c9b2cb..42f04d76a7 100644 --- a/target/linux/x86/base-files/lib/preinit/81_upgrade_bootloader +++ b/target/linux/x86/base-files/lib/preinit/81_upgrade_bootloader @@ -1,5 +1,3 @@ -#!/bin/sh - upgrade_bootloader() { local diskdev diff --git a/target/linux/x86/generic/base-files/lib/preinit/45_mount_xenfs b/target/linux/x86/generic/base-files/lib/preinit/45_mount_xenfs index ac484f6210..e57e354102 100644 --- a/target/linux/x86/generic/base-files/lib/preinit/45_mount_xenfs +++ b/target/linux/x86/generic/base-files/lib/preinit/45_mount_xenfs @@ -1,4 +1,3 @@ -#!/bin/sh # Copyright (C) 2010 OpenWrt.org do_mount_xenfs() { From 866ad466626e6a83831f79e9dd072c31a2b71d66 Mon Sep 17 00:00:00 2001 From: Adrian Schmutzler Date: Wed, 15 Apr 2020 21:51:59 +0200 Subject: [PATCH 2/8] ath79: add support for the TP-Link WBS210 v1 Specifications: - SoC: Atheros AR9344 - RAM: 64MB - Storage: 8 MB SPI NOR - Wireless: 2.4GHz N based built into SoC - Ethernet: 1x 10/100 Mbps with 24V POE IN, 1x 10/100 Mbps Installation: Flash factory image through stock firmware WEB UI or through TFTP To get to TFTP recovery just hold reset button while powering on for around 4-5 seconds and release. Rename factory image to recovery.bin Stock TFTP server IP:192.168.0.100 Stock device TFTP adress:192.168.0.254 Signed-off-by: Adrian Schmutzler --- target/linux/ath79/dts/ar9344_tplink_wbs210-v1.dts | 13 +++++++++++++ .../ath79/generic/base-files/etc/board.d/01_leds | 1 + .../ath79/generic/base-files/etc/board.d/02_network | 1 + .../generic/base-files/etc/board.d/03_gpio_switches | 1 + target/linux/ath79/image/generic-tp-link.mk | 12 ++++++++++++ 5 files changed, 28 insertions(+) create mode 100644 target/linux/ath79/dts/ar9344_tplink_wbs210-v1.dts diff --git a/target/linux/ath79/dts/ar9344_tplink_wbs210-v1.dts b/target/linux/ath79/dts/ar9344_tplink_wbs210-v1.dts new file mode 100644 index 0000000000..b89c0e29a5 --- /dev/null +++ b/target/linux/ath79/dts/ar9344_tplink_wbs210-v1.dts @@ -0,0 +1,13 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/dts-v1/; + +#include "ar9344_tplink_cpe_2port.dtsi" + +/ { + compatible = "tplink,wbs210-v1", "qca,ar9344"; + model = "TP-Link WBS210 v1"; +}; + +&led_link4 { + gpios = <&gpio 2 GPIO_ACTIVE_LOW>; +}; 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 5521379cea..8029cf7b5e 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 @@ -212,6 +212,7 @@ tplink,cpe210-v1|\ tplink,cpe220-v2|\ tplink,cpe220-v3|\ tplink,cpe510-v1|\ +tplink,wbs210-v1|\ tplink,wbs210-v2|\ tplink,wbs510-v1|\ tplink,wbs510-v2) 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 283e510416..f2ba49764b 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 @@ -110,6 +110,7 @@ ath79_setup_interfaces() tplink,cpe220-v2|\ tplink,cpe220-v3|\ tplink,cpe510-v1|\ + tplink,wbs210-v1|\ tplink,wbs210-v2|\ tplink,wbs510-v1|\ tplink,wbs510-v2|\ diff --git a/target/linux/ath79/generic/base-files/etc/board.d/03_gpio_switches b/target/linux/ath79/generic/base-files/etc/board.d/03_gpio_switches index 66b2a3e1d8..cc1b8ff412 100755 --- a/target/linux/ath79/generic/base-files/etc/board.d/03_gpio_switches +++ b/target/linux/ath79/generic/base-files/etc/board.d/03_gpio_switches @@ -66,6 +66,7 @@ tplink,cpe210-v1|\ tplink,cpe220-v2|\ tplink,cpe220-v3|\ tplink,cpe510-v1|\ +tplink,wbs210-v1|\ tplink,wbs210-v2|\ tplink,wbs510-v1|\ tplink,wbs510-v2) diff --git a/target/linux/ath79/image/generic-tp-link.mk b/target/linux/ath79/image/generic-tp-link.mk index 5fb36ca621..bd7eb3fc76 100644 --- a/target/linux/ath79/image/generic-tp-link.mk +++ b/target/linux/ath79/image/generic-tp-link.mk @@ -650,6 +650,18 @@ define Device/tplink_tl-wr902ac-v1 endef TARGET_DEVICES += tplink_tl-wr902ac-v1 +define Device/tplink_wbs210-v1 + $(Device/tplink-safeloader-okli) + SOC := ar9344 + IMAGE_SIZE := 7680k + DEVICE_MODEL := WBS210 + DEVICE_VARIANT := v1 + DEVICE_PACKAGES := rssileds + TPLINK_BOARD_ID := WBS210 + SUPPORTED_DEVICES += wbs210 +endef +TARGET_DEVICES += tplink_wbs210-v1 + define Device/tplink_wbs210-v2 $(Device/tplink-safeloader-okli) SOC := ar9344 From 636b62e8e232951154ac4ccd7972fda3f8de0379 Mon Sep 17 00:00:00 2001 From: Adrian Schmutzler Date: Tue, 16 Jun 2020 14:46:42 +0200 Subject: [PATCH 3/8] mediatek: fix IPv4-only corner case and commit in 99-net-ps The uci config section network.globals set up in /bin/config_generate will only be created if /proc/sys/net/ipv6 exists. Correspondingly, lacking IPv6 support, the command uci set network.globals.packet_steering=1 will fail with "uci: Invalid argument" as the network.globals config has not been set up. Fix that by adding the setup there as well. While at it, limit the uci commit to the network config file. Signed-off-by: Adrian Schmutzler --- target/linux/mediatek/base-files/etc/uci-defaults/99-net-ps | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/target/linux/mediatek/base-files/etc/uci-defaults/99-net-ps b/target/linux/mediatek/base-files/etc/uci-defaults/99-net-ps index accb72916e..596b33c5b4 100755 --- a/target/linux/mediatek/base-files/etc/uci-defaults/99-net-ps +++ b/target/linux/mediatek/base-files/etc/uci-defaults/99-net-ps @@ -1,3 +1,4 @@ +uci set network.globals='globals' uci set network.globals.packet_steering=1 uci set network.eth0=device uci set network.eth0.name=eth0 @@ -9,5 +10,7 @@ uci set network.lan2=device uci set network.lan2.name=lan2 uci set network.lan3=device uci set network.lan3.name=lan3 -uci commit + +uci commit network + exit 0 From e3eaf52ba3e6970d28dffe371a577e5eeea1b87e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Gonz=C3=A1lez=20Cabanelas?= Date: Tue, 16 Jun 2020 00:09:33 +0200 Subject: [PATCH 4/8] bcm63xx: use the generic nand upgrade on Sercomm devices MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Sercomm devices don't need the jffs2 cleanmarkers for the kernel partition. With the stock firmware they are only added when the bootloader partition is upgraded. Furthermore, on the Sercomm H500-s, the specific cfe_jffs2_upgrade_tar function causes OOB corruption. As a result of this, combined with the nature of the mtdsplit driver, the upgrade procedure ends in a bricked device. Use the generic nand_do_upgrade provided by the OpenWrt common functions. Signed-off-by: Daniel González Cabanelas --- target/linux/bcm63xx/base-files/lib/upgrade/platform.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/target/linux/bcm63xx/base-files/lib/upgrade/platform.sh b/target/linux/bcm63xx/base-files/lib/upgrade/platform.sh index 525d3b90b5..0d836729ee 100644 --- a/target/linux/bcm63xx/base-files/lib/upgrade/platform.sh +++ b/target/linux/bcm63xx/base-files/lib/upgrade/platform.sh @@ -70,12 +70,15 @@ platform_do_upgrade() { comtrend,vg-8050|\ comtrend,vr-3032u|\ huawei,hg253s-v2|\ - netgear,dgnd3700-v2|\ + netgear,dgnd3700-v2) + REQUIRE_IMAGE_METADATA=1 + cfe_jffs2_upgrade_tar "$1" + ;; sercomm,ad1018|\ sercomm,h500-s-lowi|\ sercomm,h500-s-vfes) REQUIRE_IMAGE_METADATA=1 - cfe_jffs2_upgrade_tar "$1" + nand_do_upgrade "$1" ;; *) default_do_upgrade "$1" From c4037a5b9eee09c96e5c8108f1b7aa439f96cb6b Mon Sep 17 00:00:00 2001 From: Sungbo Eo Date: Fri, 29 May 2020 22:06:10 +0900 Subject: [PATCH 5/8] mediatek: mt7623: refresh kernel 5.4 config By running make kernel_oldconfig and selecting relevant options. Signed-off-by: Sungbo Eo --- target/linux/mediatek/mt7623/config-5.4 | 51 ++++--------------------- 1 file changed, 7 insertions(+), 44 deletions(-) diff --git a/target/linux/mediatek/mt7623/config-5.4 b/target/linux/mediatek/mt7623/config-5.4 index 6e1ff28bd3..cbd16586bc 100644 --- a/target/linux/mediatek/mt7623/config-5.4 +++ b/target/linux/mediatek/mt7623/config-5.4 @@ -22,14 +22,12 @@ CONFIG_ARCH_HIBERNATION_POSSIBLE=y CONFIG_ARCH_KEEP_MEMBLOCK=y CONFIG_ARCH_MEDIATEK=y CONFIG_ARCH_MIGHT_HAVE_PC_PARPORT=y -# CONFIG_ARCH_MILBEAUT is not set CONFIG_ARCH_MULTIPLATFORM=y CONFIG_ARCH_MULTI_V6_V7=y CONFIG_ARCH_MULTI_V7=y CONFIG_ARCH_NR_GPIO=0 CONFIG_ARCH_OPTIONAL_KERNEL_RWX=y CONFIG_ARCH_OPTIONAL_KERNEL_RWX_DEFAULT=y -# CONFIG_ARCH_RDA is not set CONFIG_ARCH_SUPPORTS_ATOMIC_RMW=y CONFIG_ARCH_SUPPORTS_UPROBES=y CONFIG_ARCH_SUSPEND_POSSIBLE=y @@ -45,14 +43,10 @@ CONFIG_ARM_ARCH_TIMER_EVTSTREAM=y # CONFIG_ARM_ATAG_DTB_COMPAT is not set CONFIG_ARM_CPU_SUSPEND=y # CONFIG_ARM_CPU_TOPOLOGY is not set -# CONFIG_ARM_ERRATA_814220 is not set -# CONFIG_ARM_ERRATA_857271 is not set -# CONFIG_ARM_ERRATA_857272 is not set CONFIG_ARM_GIC=y CONFIG_ARM_HAS_SG_CHAIN=y CONFIG_ARM_L1_CACHE_SHIFT=6 CONFIG_ARM_L1_CACHE_SHIFT_6=y -# CONFIG_ARM_LPAE is not set CONFIG_ARM_MEDIATEK_CPUFREQ=y CONFIG_ARM_PATCH_IDIV=y CONFIG_ARM_PATCH_PHYS_VIRT=y @@ -63,17 +57,13 @@ CONFIG_ARM_UNWIND=y CONFIG_ARM_VIRT_EXT=y CONFIG_ATAGS=y CONFIG_AUTO_ZRELADDR=y -# CONFIG_BACKLIGHT_CLASS_DEVICE is not set CONFIG_BINFMT_FLAT_ARGVP_ENVP_ON_STACK=y CONFIG_BLK_DEV_LOOP=y CONFIG_BLK_MQ_PCI=y CONFIG_BLK_PM=y CONFIG_BOUNCE=y # CONFIG_CACHE_L2X0 is not set -CONFIG_CC_CAN_LINK=y -CONFIG_CC_HAS_ASM_INLINE=y CONFIG_CC_HAS_KASAN_GENERIC=y -CONFIG_CC_HAS_WARN_MAYBE_UNINITIALIZED=y CONFIG_CLEANCACHE=y CONFIG_CLKDEV_LOOKUP=y CONFIG_CLKSRC_MMIO=y @@ -103,7 +93,6 @@ CONFIG_COREDUMP=y CONFIG_CPU_32v6K=y CONFIG_CPU_32v7=y CONFIG_CPU_ABRT_EV7=y -# CONFIG_CPU_BPREDICT_DISABLE is not set CONFIG_CPU_CACHE_V7=y CONFIG_CPU_CACHE_VIPT=y CONFIG_CPU_COPY_V6=y @@ -120,9 +109,6 @@ CONFIG_CPU_FREQ_GOV_POWERSAVE=y # CONFIG_CPU_FREQ_GOV_USERSPACE is not set CONFIG_CPU_FREQ_STAT=y CONFIG_CPU_HAS_ASID=y -# CONFIG_CPU_HOTPLUG_STATE_CONTROL is not set -# CONFIG_CPU_ICACHE_DISABLE is not set -# CONFIG_CPU_ICACHE_MISMATCH_WORKAROUND is not set CONFIG_CPU_PABRT_V7=y CONFIG_CPU_PM=y CONFIG_CPU_RMAP=y @@ -138,7 +124,6 @@ CONFIG_CROSS_MEMORY_ATTACH=y CONFIG_CRYPTO_ACOMP2=y CONFIG_CRYPTO_AEAD=y CONFIG_CRYPTO_AEAD2=y -CONFIG_CRYPTO_AKCIPHER2=y CONFIG_CRYPTO_CRC32=y CONFIG_CRYPTO_CRC32C=y CONFIG_CRYPTO_CTR=y @@ -153,8 +138,6 @@ CONFIG_CRYPTO_HASH_INFO=y CONFIG_CRYPTO_HMAC=y CONFIG_CRYPTO_HW=y CONFIG_CRYPTO_JITTERENTROPY=y -CONFIG_CRYPTO_KPP2=y -CONFIG_CRYPTO_LIB_AES=y CONFIG_CRYPTO_LIB_SHA256=y CONFIG_CRYPTO_LZO=y CONFIG_CRYPTO_MANAGER=y @@ -188,7 +171,6 @@ CONFIG_DEBUG_UART_8250_SHIFT=2 CONFIG_DEBUG_UART_PHYS=0x11004000 CONFIG_DEBUG_UART_VIRT=0xf1004000 CONFIG_DEBUG_UNCOMPRESS=y -# CONFIG_DEBUG_USER is not set CONFIG_DMADEVICES=y CONFIG_DMA_ENGINE=y CONFIG_DMA_OF=y @@ -199,17 +181,13 @@ CONFIG_EDAC_ATOMIC_SCRUB=y CONFIG_EDAC_SUPPORT=y CONFIG_EINT_MTK=y CONFIG_ELF_CORE=y -# CONFIG_ENERGY_MODEL is not set CONFIG_EXT4_FS=y -# CONFIG_F2FS_CHECK_FS is not set CONFIG_F2FS_FS=y -# CONFIG_F2FS_FS_SECURITY is not set CONFIG_F2FS_FS_XATTR=y CONFIG_F2FS_STAT_FS=y CONFIG_FIXED_PHY=y CONFIG_FIX_EARLYCON_MEM=y CONFIG_FREEZER=y -# CONFIG_FSL_QDMA is not set CONFIG_FS_IOMAP=y CONFIG_FS_MBCACHE=y CONFIG_FW_LOADER_PAGED_BUF=y @@ -238,7 +216,6 @@ CONFIG_GENERIC_STRNCPY_FROM_USER=y CONFIG_GENERIC_STRNLEN_USER=y CONFIG_GPIOLIB=y CONFIG_GPIO_SYSFS=y -# CONFIG_HABANA_AI is not set CONFIG_HANDLE_DOMAIN_IRQ=y CONFIG_HARDEN_BRANCH_PREDICTOR=y CONFIG_HARDIRQS_SW_RESEND=y @@ -293,22 +270,19 @@ CONFIG_HOTPLUG_CPU=y CONFIG_HWMON=y CONFIG_HW_RANDOM=y CONFIG_HW_RANDOM_MTK=y +CONFIG_HZ=100 +CONFIG_HZ_100=y CONFIG_HZ_FIXED=0 CONFIG_I2C=y CONFIG_I2C_BOARDINFO=y CONFIG_I2C_CHARDEV=y CONFIG_I2C_MT65XX=y -# CONFIG_I2C_NVIDIA_GPU is not set CONFIG_ICPLUS_PHY=y -# CONFIG_IGC is not set CONFIG_IIO=y -# CONFIG_IIO_BUFFER is not set -# CONFIG_IIO_TRIGGER is not set CONFIG_INITRAMFS_COMPRESSION="" CONFIG_INITRAMFS_ROOT_GID=1000 CONFIG_INITRAMFS_ROOT_UID=1000 CONFIG_INITRAMFS_SOURCE="/openwrt/trunk/build_dir/target-arm_cortex-a7_musl-1.1.14_eabi/root-mediatek /openwrt/trunk/target/linux/generic/image/initramfs-base-files.txt" -CONFIG_INIT_STACK_NONE=y # CONFIG_IOMMU_DEBUGFS is not set # CONFIG_IOMMU_IO_PGTABLE_ARMV7S is not set # CONFIG_IOMMU_IO_PGTABLE_LPAE is not set @@ -344,11 +318,9 @@ CONFIG_MEDIATEK_WATCHDOG=y CONFIG_MEMFD_CREATE=y CONFIG_MFD_CORE=y CONFIG_MFD_MT6397=y -# CONFIG_MFD_STPMIC1 is not set CONFIG_MFD_SYSCON=y CONFIG_MIGHT_HAVE_CACHE_L2X0=y CONFIG_MIGRATION=y -# CONFIG_MISC_ALCOR_PCI is not set CONFIG_MMC=y CONFIG_MMC_BLOCK=y CONFIG_MMC_MTK=y @@ -388,8 +360,8 @@ CONFIG_NET_DEVLINK=y CONFIG_NET_DSA=y CONFIG_NET_DSA_MT7530=y CONFIG_NET_DSA_TAG_MTK=y -# CONFIG_NET_DSA_TAG_QCA is not set CONFIG_NET_FLOW_LIMIT=y +CONFIG_NET_MEDIATEK_OFFLOAD=y CONFIG_NET_MEDIATEK_SOC=y CONFIG_NET_SWITCHDEV=y # CONFIG_NET_VENDOR_AURORA is not set @@ -401,7 +373,6 @@ CONFIG_NO_HZ_COMMON=y CONFIG_NO_HZ_IDLE=y CONFIG_NR_CPUS=4 CONFIG_NVMEM=y -# CONFIG_NVMEM_REBOOT_MODE is not set CONFIG_NVMEM_SYSFS=y CONFIG_OF=y CONFIG_OF_ADDRESS=y @@ -423,10 +394,8 @@ CONFIG_PCIE_MEDIATEK=y CONFIG_PCIE_PME=y CONFIG_PCI_DOMAINS=y CONFIG_PCI_DOMAINS_GENERIC=y -# CONFIG_PCI_MESON is not set CONFIG_PCI_MSI=y CONFIG_PCI_MSI_IRQ_DOMAIN=y -# CONFIG_PCI_V3_SEMI is not set CONFIG_PERF_USE_VMALLOC=y CONFIG_PGTABLE_LEVELS=2 CONFIG_PHYLIB=y @@ -442,7 +411,6 @@ CONFIG_PINCTRL_MTK=y CONFIG_PINCTRL_MTK_MOORE=y CONFIG_PM=y CONFIG_PM_CLK=y -# CONFIG_PM_DEBUG is not set CONFIG_PM_GENERIC_DOMAINS=y CONFIG_PM_GENERIC_DOMAINS_OF=y CONFIG_PM_GENERIC_DOMAINS_SLEEP=y @@ -462,7 +430,6 @@ CONFIG_PWM=y CONFIG_PWM_MEDIATEK=y # CONFIG_PWM_MTK_DISP is not set CONFIG_PWM_SYSFS=y -# CONFIG_QCOM_SPMI_ADC5 is not set CONFIG_RAS=y CONFIG_RATIONAL=y CONFIG_RCU_CPU_STALL_TIMEOUT=21 @@ -471,9 +438,7 @@ CONFIG_RCU_NEED_SEGCBLIST=y CONFIG_RCU_STALL_COMMON=y CONFIG_REFCOUNT_FULL=y CONFIG_REGMAP=y -CONFIG_REGMAP_I2C=y CONFIG_REGMAP_MMIO=y -CONFIG_REGMAP_SPI=y CONFIG_REGULATOR=y CONFIG_REGULATOR_FIXED_VOLTAGE=y CONFIG_REGULATOR_GPIO=y @@ -488,8 +453,9 @@ CONFIG_RTC_CLASS=y # CONFIG_RTC_DRV_MT6397 is not set # CONFIG_RTC_DRV_MT7622 is not set CONFIG_RTC_I2C_AND_SPI=y +CONFIG_RTC_MC146818_LIB=y +# CONFIG_RTL8367S_GSW is not set CONFIG_RWSEM_SPIN_ON_OWNER=y -# CONFIG_SENSORS_OCC_P8_I2C is not set # CONFIG_SERIAL_8250_DMA is not set CONFIG_SERIAL_8250_FSL=y CONFIG_SERIAL_8250_MT6577=y @@ -505,6 +471,8 @@ CONFIG_SPI_BITBANG=y CONFIG_SPI_MASTER=y CONFIG_SPI_MEM=y CONFIG_SPI_MT65XX=y +# CONFIG_SPI_MTK_NOR is not set +# CONFIG_SPI_MTK_SNFI is not set CONFIG_SPMI=y CONFIG_SRCU=y # CONFIG_STRIP_ASM_SYMS is not set @@ -520,13 +488,10 @@ CONFIG_THERMAL_DEFAULT_GOV_STEP_WISE=y CONFIG_THERMAL_EMERGENCY_POWEROFF_DELAY_MS=0 CONFIG_THERMAL_GOV_STEP_WISE=y CONFIG_THERMAL_OF=y -# CONFIG_THUMB2_KERNEL is not set CONFIG_TICK_CPU_ACCOUNTING=y CONFIG_TIMER_OF=y CONFIG_TIMER_PROBE=y -# CONFIG_TI_CPSW_PHY_SEL is not set CONFIG_TREE_SRCU=y -# CONFIG_TRUSTED_FOUNDATIONS is not set CONFIG_UBIFS_FS=y # CONFIG_UBIFS_FS_ADVANCED_COMPR is not set CONFIG_UBIFS_FS_LZO=y @@ -536,10 +501,8 @@ CONFIG_UEVENT_HELPER_PATH="" CONFIG_UNCOMPRESS_INCLUDE="debug/uncompress.h" CONFIG_UNINLINE_SPIN_UNLOCK=y CONFIG_UNWINDER_ARM=y -# CONFIG_UNWINDER_FRAME_POINTER is not set CONFIG_USB=y CONFIG_USB_COMMON=y -# CONFIG_USB_EHCI_HCD is not set CONFIG_USB_SUPPORT=y CONFIG_USB_XHCI_HCD=y CONFIG_USB_XHCI_MTK=y From 014c101e0b4c50c13f3c64e6c716827095afa46e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20=C5=A0tetiar?= Date: Wed, 10 Jun 2020 16:01:06 +0200 Subject: [PATCH 6/8] mvebu: fix bootloader kernel commandline mangling MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Currently I'm unable to boot initramfs image with `console=ttyS0,115200` kernel commandline as the kernel commandline mangling resets kernel commandline if there is no `root=` option provided, efectively clearing whatever I pass to the kernel, making the `root=` option mandatory. So if the kernel commandline mangling is not appropriate just leave the kernel commandline as it is. Signed-off-by: Petr Štetiar --- ...Mangle-bootloader-s-kernel-arguments.patch | 61 +++++++++++-------- 1 file changed, 34 insertions(+), 27 deletions(-) diff --git a/target/linux/mvebu/patches-5.4/006-mvebu-Mangle-bootloader-s-kernel-arguments.patch b/target/linux/mvebu/patches-5.4/006-mvebu-Mangle-bootloader-s-kernel-arguments.patch index 2f942ea3af..5969a10a86 100644 --- a/target/linux/mvebu/patches-5.4/006-mvebu-Mangle-bootloader-s-kernel-arguments.patch +++ b/target/linux/mvebu/patches-5.4/006-mvebu-Mangle-bootloader-s-kernel-arguments.patch @@ -21,10 +21,10 @@ was found, resulting in blank cmdline and failure to boot. Signed-off-by: Michael Gray --- - arch/arm/Kconfig | 11 +++++ - arch/arm/boot/compressed/atags_to_fdt.c | 72 ++++++++++++++++++++++++++++++++- - init/main.c | 16 ++++++++ - 3 files changed, 98 insertions(+), 1 deletion(-) + arch/arm/Kconfig | 11 ++++ + arch/arm/boot/compressed/atags_to_fdt.c | 85 ++++++++++++++++++++++++- + init/main.c | 16 +++++ + 3 files changed, 111 insertions(+), 1 deletion(-) --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -57,7 +57,7 @@ Signed-off-by: Michael Gray #else #define do_extend_cmdline 0 #endif -@@ -67,6 +69,65 @@ static uint32_t get_cell_size(const void +@@ -67,6 +69,72 @@ static uint32_t get_cell_size(const void return cell_size; } @@ -78,7 +78,8 @@ Signed-off-by: Michael Gray + do { + ptr++; + ptr = strchr(ptr, 'r'); -+ if(!ptr) return dest; ++ if (!ptr) ++ goto no_append; + + } while (ptr != str && *(ptr-1) != ' '); + @@ -97,25 +98,31 @@ Signed-off-by: Michael Gray + + /* if append-rootblock property is set use it to append to command line */ + rootblock = getprop(fdt, "/chosen", "append-rootblock", &l); -+ if(rootblock != NULL) { -+ if(*dest != ' ') { -+ *dest = ' '; -+ dest++; -+ len++; -+ } -+ if (len + l + i <= COMMAND_LINE_SIZE) { -+ memcpy(dest, rootblock, l); -+ dest += l - 1; -+ memcpy(dest, ptr, i); -+ dest += i; -+ } -+ } else { -+ len = strlen(str); -+ if (len + 1 < COMMAND_LINE_SIZE) { -+ memcpy(dest, str, len); -+ dest += len; -+ } ++ if (rootblock == NULL) ++ goto no_append; ++ ++ if (*dest != ' ') { ++ *dest = ' '; ++ dest++; ++ len++; + } ++ ++ if (len + l + i <= COMMAND_LINE_SIZE) { ++ memcpy(dest, rootblock, l); ++ dest += l - 1; ++ memcpy(dest, ptr, i); ++ dest += i; ++ } ++ ++ return dest; ++ ++no_append: ++ len = strlen(str); ++ if (len + 1 < COMMAND_LINE_SIZE) { ++ memcpy(dest, str, len); ++ dest += len; ++ } ++ + return dest; +} +#endif @@ -123,7 +130,7 @@ Signed-off-by: Michael Gray static void merge_fdt_bootargs(void *fdt, const char *fdt_cmdline) { char cmdline[COMMAND_LINE_SIZE]; -@@ -86,12 +147,21 @@ static void merge_fdt_bootargs(void *fdt +@@ -86,12 +154,21 @@ static void merge_fdt_bootargs(void *fdt /* and append the ATAG_CMDLINE */ if (fdt_cmdline) { @@ -145,7 +152,7 @@ Signed-off-by: Michael Gray } *ptr = '\0'; -@@ -166,7 +236,9 @@ int atags_to_fdt(void *atag_list, void * +@@ -166,7 +243,9 @@ int atags_to_fdt(void *atag_list, void * else setprop_string(fdt, "/chosen", "bootargs", atag->u.cmdline.cmdline); @@ -156,7 +163,7 @@ Signed-off-by: Michael Gray if (memcount >= sizeof(mem_reg_property)/4) continue; if (!atag->u.mem.size) -@@ -210,6 +282,10 @@ int atags_to_fdt(void *atag_list, void * +@@ -210,6 +289,10 @@ int atags_to_fdt(void *atag_list, void * setprop(fdt, "/memory", "reg", mem_reg_property, 4 * memcount * memsize); } From 90f930e0c2fafe7c7b0b122ae932a9a2c007aead Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20=C5=A0tetiar?= Date: Fri, 12 Jun 2020 12:32:11 +0200 Subject: [PATCH 7/8] kernel: bump 5.4 to 5.4.46 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Refreshed patches. Run tested: qemu-x86-64, wrt3200acm Build tested: x86/64, imx6, mvebu/cortexa9, sunxi/a53 Signed-off-by: Petr Štetiar --- include/kernel-version.mk | 4 ++-- ...-net-dsa-ocelot-add-tagger-for-Ocelot-Felix-switches.patch | 2 +- .../401-net-ethernet-mediatek-support-net-labels.patch | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/kernel-version.mk b/include/kernel-version.mk index 89e26f6d96..fa62ccbe2a 100644 --- a/include/kernel-version.mk +++ b/include/kernel-version.mk @@ -8,11 +8,11 @@ endif LINUX_VERSION-4.14 = .180 LINUX_VERSION-4.19 = .123 -LINUX_VERSION-5.4 = .45 +LINUX_VERSION-5.4 = .46 LINUX_KERNEL_HASH-4.14.180 = 444ef973d9b6a6ea174e4a9086f0aea980d8575d13302e431ad688f22e27ed0e LINUX_KERNEL_HASH-4.19.123 = a79914d31a8d8c6b0e2bb0f2b143d615fe8a6c4dd2e0f36e97aa20efd69a993f -LINUX_KERNEL_HASH-5.4.45 = 103f039f34a9009c42ea643b4f473bda6bb9607d5ad7f63b56b3e2351615fe2e +LINUX_KERNEL_HASH-5.4.46 = 30074ff2f1a2498da391fad73fc0efaa2256416a08fff8835069b1c59ab31b8e remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1)))) sanitize_uri=$(call qstrip,$(subst @,_,$(subst :,_,$(subst .,_,$(subst -,_,$(subst /,_,$(1))))))) diff --git a/target/linux/layerscape/patches-5.4/701-net-0262-net-dsa-ocelot-add-tagger-for-Ocelot-Felix-switches.patch b/target/linux/layerscape/patches-5.4/701-net-0262-net-dsa-ocelot-add-tagger-for-Ocelot-Felix-switches.patch index f26850035a..38d9e0b5bd 100644 --- a/target/linux/layerscape/patches-5.4/701-net-0262-net-dsa-ocelot-add-tagger-for-Ocelot-Felix-switches.patch +++ b/target/linux/layerscape/patches-5.4/701-net-0262-net-dsa-ocelot-add-tagger-for-Ocelot-Felix-switches.patch @@ -73,7 +73,7 @@ Signed-off-by: David S. Miller struct packet_type; --- a/net/dsa/Kconfig +++ b/net/dsa/Kconfig -@@ -79,6 +79,13 @@ config NET_DSA_TAG_KSZ +@@ -80,6 +80,13 @@ config NET_DSA_TAG_KSZ Say Y if you want to enable support for tagging frames for the Microchip 8795/9477/9893 families of switches. diff --git a/target/linux/ramips/patches-5.4/401-net-ethernet-mediatek-support-net-labels.patch b/target/linux/ramips/patches-5.4/401-net-ethernet-mediatek-support-net-labels.patch index 69e3c296ca..206826c1b2 100644 --- a/target/linux/ramips/patches-5.4/401-net-ethernet-mediatek-support-net-labels.patch +++ b/target/linux/ramips/patches-5.4/401-net-ethernet-mediatek-support-net-labels.patch @@ -14,7 +14,7 @@ Signed-off-by: René van Dorst --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c -@@ -2779,6 +2779,7 @@ static const struct net_device_ops mtk_n +@@ -2784,6 +2784,7 @@ static const struct net_device_ops mtk_n static int mtk_add_mac(struct mtk_eth *eth, struct device_node *np) { @@ -22,7 +22,7 @@ Signed-off-by: René van Dorst const __be32 *_id = of_get_property(np, "reg", NULL); struct phylink *phylink; int phy_mode, id, err; -@@ -2869,6 +2870,9 @@ static int mtk_add_mac(struct mtk_eth *e +@@ -2874,6 +2875,9 @@ static int mtk_add_mac(struct mtk_eth *e eth->netdev[id]->irq = eth->irq[0]; eth->netdev[id]->dev.of_node = np; From 27724c2f54466803bf6e7d3efb637971ebcd139e Mon Sep 17 00:00:00 2001 From: Aleksander Jan Bajkowski Date: Sun, 14 Jun 2020 12:26:07 +0200 Subject: [PATCH 8/8] lantiq: switch to 5.4 Runtime tested on BT Home Hub 5A and D-Link DWR-966. Signed-off-by: Aleksander Jan Bajkowski --- target/linux/lantiq/Makefile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/target/linux/lantiq/Makefile b/target/linux/lantiq/Makefile index b2b10c57bb..ee305e7ce2 100644 --- a/target/linux/lantiq/Makefile +++ b/target/linux/lantiq/Makefile @@ -11,8 +11,7 @@ BOARDNAME:=Lantiq FEATURES:=squashfs SUBTARGETS:=xrx200 xway xway_legacy falcon ase -KERNEL_PATCHVER:=4.19 -KERNEL_TESTING_PATCHVER:=5.4 +KERNEL_PATCHVER:=5.4 define Target/Description Build firmware images for Lantiq SoC