From d5dd1a534cb5fb35110cb43cd4dcab47c18c368e Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Mon, 28 Dec 2020 14:43:01 +0100 Subject: [PATCH 1/2] Remove some bpi changes --- .../lib/preinit/06_set_rps_sock_flow | 8 -- .../base-files/lib/preinit/07_set_iface_mac | 48 ----------- .../base-files/lib/preinit/79_move_config | 19 ----- .../base-files/lib/preinit/90_init_jffs2 | 7 -- .../base-files/lib/upgrade/platform.sh | 85 ------------------- 5 files changed, 167 deletions(-) delete mode 100644 root/target/linux/mediatek/base-files/lib/preinit/06_set_rps_sock_flow delete mode 100644 root/target/linux/mediatek/base-files/lib/preinit/07_set_iface_mac delete mode 100644 root/target/linux/mediatek/base-files/lib/preinit/79_move_config delete mode 100644 root/target/linux/mediatek/base-files/lib/preinit/90_init_jffs2 delete mode 100755 root/target/linux/mediatek/base-files/lib/upgrade/platform.sh diff --git a/root/target/linux/mediatek/base-files/lib/preinit/06_set_rps_sock_flow b/root/target/linux/mediatek/base-files/lib/preinit/06_set_rps_sock_flow deleted file mode 100644 index 9a84ff4b..00000000 --- a/root/target/linux/mediatek/base-files/lib/preinit/06_set_rps_sock_flow +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh - -set_rps_sock_flow() { - echo 1024 > /proc/sys/net/core/rps_sock_flow_entries -} - -boot_hook_add preinit_main set_rps_sock_flow - diff --git a/root/target/linux/mediatek/base-files/lib/preinit/07_set_iface_mac b/root/target/linux/mediatek/base-files/lib/preinit/07_set_iface_mac deleted file mode 100644 index 1ad70145..00000000 --- a/root/target/linux/mediatek/base-files/lib/preinit/07_set_iface_mac +++ /dev/null @@ -1,48 +0,0 @@ -#!/bin/sh -# Copyright (C) 2018 OpenWrt.org - -RECOVERY_PART=/dev/mmcblk0p1 - -preinit_set_mac_address() { - local mac - - . /lib/functions.sh - . /lib/functions/system.sh - - case $(board_name) in - 'bananapi,bpi-r2'|\ - "unielec,u7623"*) - if [ -b $RECOVERY_PART ]; then - insmod nls_cp437 - insmod nls_iso8859-1 - insmod fat - insmod vfat - mkdir -p /tmp/recovery - mount -o rw,noatime $RECOVERY_PART /tmp/recovery - - if [ -f "/tmp/recovery/mac_addr" ]; - then - mac=$(cat /tmp/recovery/mac_addr) - else - mac=$(cat /sys/class/net/eth0/address) - echo "$mac" > /tmp/recovery/mac_addr - fi - - sync - umount /tmp/recovery - rm -rf /tmp/recovery - fi - - ip link set dev lan address $mac 2> /dev/null - - mac=$(macaddr_add $mac 1) - - ip link set dev wan1 address $mac 2>/dev/null - ip link set dev wan2 address $mac 2>/dev/null - ip link set dev wan3 address $mac 2>/dev/null - ip link set dev wan4 address $mac 2>/dev/null - ;; - esac -} - -boot_hook_add preinit_main preinit_set_mac_address diff --git a/root/target/linux/mediatek/base-files/lib/preinit/79_move_config b/root/target/linux/mediatek/base-files/lib/preinit/79_move_config deleted file mode 100644 index e8e62883..00000000 --- a/root/target/linux/mediatek/base-files/lib/preinit/79_move_config +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/sh -# Copyright (C) 2015 OpenWrt.org - -RECOVERY_PART=/dev/mmcblk0p1 - -move_config() { - if [ -b $RECOVERY_PART ]; then - insmod nls_cp437 - insmod nls_iso8859-1 - insmod fat - insmod vfat - mkdir -p /recovery - mount -o rw,noatime $RECOVERY_PART /recovery - [ -f /recovery/sysupgrade.tgz ] && mv -f /recovery/sysupgrade.tgz / - umount /recovery - fi -} - -boot_hook_add preinit_mount_root move_config diff --git a/root/target/linux/mediatek/base-files/lib/preinit/90_init_jffs2 b/root/target/linux/mediatek/base-files/lib/preinit/90_init_jffs2 deleted file mode 100644 index 8a510b74..00000000 --- a/root/target/linux/mediatek/base-files/lib/preinit/90_init_jffs2 +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh -do_firstboot() { - if [ "$(mount | grep jffs2)" = "" ]; then - /sbin/firstboot -y - fi -} -boot_hook_add preinit_main do_firstboot \ No newline at end of file diff --git a/root/target/linux/mediatek/base-files/lib/upgrade/platform.sh b/root/target/linux/mediatek/base-files/lib/upgrade/platform.sh deleted file mode 100755 index ee69952e..00000000 --- a/root/target/linux/mediatek/base-files/lib/upgrade/platform.sh +++ /dev/null @@ -1,85 +0,0 @@ -platform_do_upgrade() { - local board=$(board_name) - case "$board" in - "unielec,u7623"*) - #Keep the persisten random mac address (if it exists) - mkdir -p /tmp/recovery - mount -o rw,noatime /dev/mmcblk0p1 /tmp/recovery - [ -f "/tmp/recovery/mac_addr" ] && \ - mv -f /tmp/recovery/mac_addr /tmp/ - umount /tmp/recovery - - #1310720 is the offset in bytes from the start of eMMC and to - #the location of the kernel (2560 512 byte sectors) - get_image "$1" | dd of=/dev/mmcblk0 bs=1310720 seek=1 conv=fsync - - mount -o rw,noatime /dev/mmcblk0p1 /tmp/recovery - [ -f "/tmp/mac_addr" ] && mv -f /tmp/mac_addr /tmp/recovery - sync - umount /tmp/recovery - ;; - bananapi,bpi-r2) - local tar_file="$1" - - echo "flashing kernel" - tar xf $tar_file sysupgrade-7623n-bananapi-bpi-r2/kernel -O | mtd write - kernel - - echo "flashing rootfs" - tar xf $tar_file sysupgrade-7623n-bananapi-bpi-r2/root -O | mtd write - rootfs - ;; - *) - default_do_upgrade "$ARGV" - ;; - esac -} - -PART_NAME=firmware - -platform_check_image() { - local board=$(board_name) - - [ "$#" -gt 1 ] && return 1 - - case "$board" in - bananapi,bpi-r2) - local tar_file="$1" - local kernel_length=`(tar xf $tar_file sysupgrade-7623n-bananapi-bpi-r2/kernel -O | wc -c) 2> /dev/null` - local rootfs_length=`(tar xf $tar_file sysupgrade-7623n-bananapi-bpi-r2/root -O | wc -c) 2> /dev/null` - [ "$kernel_length" = 0 -o "$rootfs_length" = 0 ] && { - echo "The upgrade image is corrupt." - return 1 - } - ;; - "unielec,u7623"*) - local magic="$(get_magic_long "$1")" - [ "$magic" != "27051956" ] && { - echo "Invalid image type." - return 1 - } - return 0 - ;; - - *) - echo "Sysupgrade is not supported on your board yet." - return 1 - ;; - esac - - return 0 -} - -platform_copy_config_emmc() { - mkdir -p /recovery - mount -o rw,noatime /dev/mmcblk0p1 /recovery - cp -af "$CONF_TAR" /recovery/ - sync - umount /recovery -} - -platform_copy_config() { - case "$(board_name)" in - "unielec,u7623"*) - platform_copy_config_emmc - ;; - esac -} From ff8441888822ef418a99e9761dd237eb4537c167 Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Wed, 30 Dec 2020 16:53:02 +0100 Subject: [PATCH 2/2] Close issues after 90 days instead of 120 --- .github/workflows/stale.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index 0df84802..7c2090c3 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -12,9 +12,9 @@ jobs: - uses: actions/stale@v3.0.10 with: repo-token: ${{ secrets.GITHUB_TOKEN }} - stale-issue-message: "This issue is stale because it has been open 120 days with no activity. Remove stale label or comment or this will be closed in 5 days" - stale-pr-message: 'It has been open 120 days with no activity. Remove stale label or comment or this will be closed in 5 days' - days-before-stale: 120 + stale-issue-message: "This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 5 days" + stale-pr-message: 'It has been open 90 days with no activity. Remove stale label or comment or this will be closed in 5 days' + days-before-stale: 90 days-before-close: 5 exempt-issue-labels: 'work-in-progress,enhancement' exempt-pr-labels: 'work-in-progress,enhancement'