From ae614fb397c2754e2b6dab896b58ec30b11af526 Mon Sep 17 00:00:00 2001 From: Olliver Schinagl Date: Wed, 14 Dec 2022 11:33:01 +0100 Subject: [PATCH 1/9] tools: Improve diffability/maintainability There's no purpose to squish multiple tools into a single line (and spread those out over multiple lines). It might look 'nice' in certain conditions, but it's annoying to maintain. For example, but not limited to: * adding/removing tools, causes hard to read diffs * Duplicates are harder to spot * Sorting can not be (easily?) automated With this proposed change, the above annoyances go away. Inserting a new tool can be done with a single line-change-diff, sorting can be done by any editor (in vi, select, :sort for example) and dupes are much easier to spot. Signed-off-by: Olliver Schinagl --- tools/Makefile | 42 +++++++++++++++++++++++++++++++++++++----- 1 file changed, 37 insertions(+), 5 deletions(-) diff --git a/tools/Makefile b/tools/Makefile index 5ba15c641b..6300180d3f 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -21,11 +21,43 @@ ifneq ($(CONFIG_SDK)$(CONFIG_PACKAGE_kmod-b43)$(CONFIG_BRCMSMAC_USE_FW_FROM_WL), BUILD_B43_TOOLS = y endif -tools-y += autoconf autoconf-archive automake bc bison cmake cpio dosfstools -tools-y += e2fsprogs expat fakeroot findutils firmware-utils flex gengetopt -tools-y += libressl libtool lzma m4 make-ext4fs meson missing-macros mkimage -tools-y += mklibs mtd-utils mtools ninja padjffs2 patch-image -tools-y += patchelf pkgconf quilt squashfskit4 sstrip zip zlib zstd +tools-y += autoconf +tools-y += autoconf-archive +tools-y += automake +tools-y += bc +tools-y += bison +tools-y += cmake +tools-y += cpio +tools-y += dosfstools +tools-y += e2fsprogs +tools-y += expat +tools-y += fakeroot +tools-y += findutils +tools-y += firmware-utils +tools-y += flex +tools-y += gengetopt +tools-y += libressl +tools-y += libtool +tools-y += lzma +tools-y += m4 +tools-y += make-ext4fs +tools-y += meson +tools-y += missing-macros +tools-y += mkimage +tools-y += mklibs +tools-y += mtd-utils +tools-y += mtools +tools-y += ninja +tools-y += padjffs2 +tools-y += patch-image +tools-y += patchelf +tools-y += pkgconf +tools-y += quilt +tools-y += squashfskit4 +tools-y += sstrip +tools-y += zip +tools-y += zlib +tools-y += zstd tools-$(if $(CONFIG_BUILD_ALL_HOST_TOOLS)$(BUILD_B43_TOOLS),y) += b43-tools tools-$(if $(CONFIG_BUILD_ALL_HOST_TOOLS)$(BUILD_ISL),y) += isl tools-$(if $(CONFIG_BUILD_ALL_HOST_TOOLS)$(BUILD_TOOLCHAIN),y) += gmp mpc mpfr From 113fd5b93be02cb47008744aa5640107344a3963 Mon Sep 17 00:00:00 2001 From: Olliver Schinagl Date: Mon, 3 Oct 2022 14:45:21 +0200 Subject: [PATCH 2/9] realtek: 5.10: Fix incorrect switch patches Add correct header to patche(s) to be correctly used by git am and have better tracking of it. See commit f1f97db627b2 ("realtek: Convert incorrect v5.10 patches"). Signed-off-by: Olliver Schinagl --- .../302-clocksource-add-otto-driver.patch | 53 +++++++++++++++++++ 1 file changed, 53 insertions(+) diff --git a/target/linux/realtek/patches-5.10/302-clocksource-add-otto-driver.patch b/target/linux/realtek/patches-5.10/302-clocksource-add-otto-driver.patch index 8b17ddaef0..81dff89f82 100644 --- a/target/linux/realtek/patches-5.10/302-clocksource-add-otto-driver.patch +++ b/target/linux/realtek/patches-5.10/302-clocksource-add-otto-driver.patch @@ -1,3 +1,56 @@ +From 3cc8011171186d906c547bc6f0c1f8e350edc7cf Mon Sep 17 00:00:00 2001 +From: Markus Stockhausen +Date: Mon, 3 Oct 2022 14:45:21 +0200 +Subject: [PATCH] realtek: resurrect timer driver + +Now that we provide a clock driver for the Reltek SOCs the CPU frequency might +change on demand. This has direct visible effects during operation + +- the CEVT 4K timer is no longer a stable clocksource +- after CPU frequencies changes time calculation works wrong +- sched_clock falls back to kernel default interval (100 Hz) +- timestamps in dmesg have only 2 digits left + +[ 0.000000] sched_clock: 32 bits at 100 Hz, resolution 10000000ns, wraps ... +[ 0.060000] pid_max: default: 32768 minimum: 301 +[ 0.070000] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear) +[ 0.070000] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear) +[ 0.080000] dyndbg: Ignore empty _ddebug table in a CONFIG_DYNAMIC_DEBUG_CORE build +[ 0.090000] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, ... + +Looking around where we can start the CEVT timer for RTL930X is a good basis. +Initially it was developed as a clocksource driver for the broken timer in that +specific SOC series. Afterwards it was shifted around to the CEVT location, +got SMP enablement and lost its clocksource feature. So we at least have +something to copy from. As the timers on these devices are well understood +the implementation follows this way: + +- leave the RTL930X implementation as is +- provide a new driver for RTL83XX devices only +- swap RTL930X driver at a later time + +Like the clock driver this patch contains a self contained module that is SOC +independet and already provides full support for the RTL838X, RTL839X and +RTL930X devices. Some of the new (or reestablished) features are: + +- simplified initialization routines +- SMP setup with CPU hotplug framework +- derived from LXB clock speed +- supplied clocksource +- dedicated register functions for better readability +- documentation about some caveats + +Signed-off-by: Markus Stockhausen +[remove unused header includes, remove old CONFIG_MIPS dependency, add +REALTEK_ prefix to driver symbol] +Signed-off-by: Sander Vanheule + +--- + drivers/clocksource/Kconfig | 12 +++ + drivers/clocksource/Makefile | 1 + + include/linux/cpuhotplug.h | 1 + + 3 files changed, 14 insertions(+) + --- a/drivers/clocksource/Kconfig +++ b/drivers/clocksource/Kconfig @@ -127,6 +127,17 @@ config RDA_TIMER From f649a7b5f337f1b2a69879b45ebafffec1380011 Mon Sep 17 00:00:00 2001 From: Olliver Schinagl Date: Mon, 3 Oct 2022 14:45:21 +0200 Subject: [PATCH 3/9] realtek: 5.15: Fix incorrect switch patches Add correct header to patche(s) to be correctly used by git am and have better tracking of it. See commit f1f97db627b2 ("realtek: Convert incorrect v5.10 patches"). Signed-off-by: Olliver Schinagl --- .../302-clocksource-add-otto-driver.patch | 53 +++++++++++++++++++ 1 file changed, 53 insertions(+) diff --git a/target/linux/realtek/patches-5.15/302-clocksource-add-otto-driver.patch b/target/linux/realtek/patches-5.15/302-clocksource-add-otto-driver.patch index fb1f464356..8f2f4c0c4a 100644 --- a/target/linux/realtek/patches-5.15/302-clocksource-add-otto-driver.patch +++ b/target/linux/realtek/patches-5.15/302-clocksource-add-otto-driver.patch @@ -1,3 +1,56 @@ +From 3cc8011171186d906c547bc6f0c1f8e350edc7cf Mon Sep 17 00:00:00 2001 +From: Markus Stockhausen +Date: Mon, 3 Oct 2022 14:45:21 +0200 +Subject: [PATCH] realtek: resurrect timer driver + +Now that we provide a clock driver for the Reltek SOCs the CPU frequency might +change on demand. This has direct visible effects during operation + +- the CEVT 4K timer is no longer a stable clocksource +- after CPU frequencies changes time calculation works wrong +- sched_clock falls back to kernel default interval (100 Hz) +- timestamps in dmesg have only 2 digits left + +[ 0.000000] sched_clock: 32 bits at 100 Hz, resolution 10000000ns, wraps ... +[ 0.060000] pid_max: default: 32768 minimum: 301 +[ 0.070000] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear) +[ 0.070000] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear) +[ 0.080000] dyndbg: Ignore empty _ddebug table in a CONFIG_DYNAMIC_DEBUG_CORE build +[ 0.090000] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, ... + +Looking around where we can start the CEVT timer for RTL930X is a good basis. +Initially it was developed as a clocksource driver for the broken timer in that +specific SOC series. Afterwards it was shifted around to the CEVT location, +got SMP enablement and lost its clocksource feature. So we at least have +something to copy from. As the timers on these devices are well understood +the implementation follows this way: + +- leave the RTL930X implementation as is +- provide a new driver for RTL83XX devices only +- swap RTL930X driver at a later time + +Like the clock driver this patch contains a self contained module that is SOC +independet and already provides full support for the RTL838X, RTL839X and +RTL930X devices. Some of the new (or reestablished) features are: + +- simplified initialization routines +- SMP setup with CPU hotplug framework +- derived from LXB clock speed +- supplied clocksource +- dedicated register functions for better readability +- documentation about some caveats + +Signed-off-by: Markus Stockhausen +[remove unused header includes, remove old CONFIG_MIPS dependency, add +REALTEK_ prefix to driver symbol] +Signed-off-by: Sander Vanheule + +--- + drivers/clocksource/Kconfig | 12 +++ + drivers/clocksource/Makefile | 1 + + include/linux/cpuhotplug.h | 1 + + 3 files changed, 14 insertions(+) + --- a/drivers/clocksource/Kconfig +++ b/drivers/clocksource/Kconfig @@ -127,6 +127,17 @@ config RDA_TIMER From af4417418749b9233c5a205affbcdea659cc685b Mon Sep 17 00:00:00 2001 From: Christian Marangi Date: Fri, 9 Dec 2022 18:09:32 +0100 Subject: [PATCH 4/9] CI: tools: reogranize and split workflow Generilize tools workflow for future usage in shared workflow for tools build. Split tools workflow to tools and push-containers: - tools just execute build test - push-containers build and push prebuilt containers Signed-off-by: Christian Marangi --- .github/workflows/build-tools.yml | 72 ++++++++++++++ .github/workflows/push-containers.yml | 86 +++++++++++++++++ .github/workflows/tools.yml | 133 +------------------------- 3 files changed, 163 insertions(+), 128 deletions(-) create mode 100644 .github/workflows/build-tools.yml create mode 100644 .github/workflows/push-containers.yml diff --git a/.github/workflows/build-tools.yml b/.github/workflows/build-tools.yml new file mode 100644 index 0000000000..ca415489c5 --- /dev/null +++ b/.github/workflows/build-tools.yml @@ -0,0 +1,72 @@ +name: Build host tools + +on: + workflow_call: + inputs: + generate_prebuilt_artifacts: + type: boolean + +permissions: + contents: read + +jobs: + build: + name: Build tools + runs-on: ubuntu-latest + container: registry.gitlab.com/openwrt/buildbot/buildworker-3.4.1 + + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + path: openwrt + + - name: Fix permission + run: chown -R buildbot:buildbot openwrt + + - name: Set configs for tools container + shell: su buildbot -c "sh -e {0}" + working-directory: openwrt + run: | + touch .config + echo CONFIG_DEVEL=y >> .config + echo CONFIG_AUTOREMOVE=y >> .config + echo CONFIG_CCACHE=y >> .config + + - name: Make prereq + shell: su buildbot -c "sh -e {0}" + working-directory: openwrt + run: make defconfig + + - name: Build tools + shell: su buildbot -c "sh -e {0}" + working-directory: openwrt + run: make tools/install -j$(nproc) BUILD_LOG=1 || ret=$? .github/workflows/scripts/show_build_failures.sh + + - name: Upload logs + if: always() + uses: actions/upload-artifact@v3 + with: + name: linux-buildbot-logs + path: openwrt/logs + + - name: Upload config + if: always() + uses: actions/upload-artifact@v3 + with: + name: linux-buildbot-config + path: openwrt/.config + + - name: Archive prebuilt tools + if: inputs.generate_prebuilt_artifacts == true + shell: su buildbot -c "sh -e {0}" + working-directory: openwrt + run: tar --mtime=now -cf tools.tar staging_dir/host build_dir/host dl + + - name: Upload prebuilt tools + if: inputs.generate_prebuilt_artifacts == true + uses: actions/upload-artifact@v3 + with: + name: linux-buildbot-prebuilt-tools + path: openwrt/tools.tar + retention-days: 1 diff --git a/.github/workflows/push-containers.yml b/.github/workflows/push-containers.yml new file mode 100644 index 0000000000..56e0daa611 --- /dev/null +++ b/.github/workflows/push-containers.yml @@ -0,0 +1,86 @@ +name: Build and Push prebuilt tools container + +on: + push: + paths: + - 'tools/**' + - '.github/workflows/build-tools.yml' + - '.github/workflows/push-containers.yml' + - '.github/workflows/Dockerfile.tools' + +permissions: + contents: read + +jobs: + build-linux-buildbot: + name: Build tools with buildbot container + uses: ./.github/workflows/build-tools.yml + with: + generate_prebuilt_artifacts: true + + push-tools-container: + needs: build-linux-buildbot + name: Push prebuilt tools container + runs-on: ubuntu-latest + + permissions: + contents: read + packages: write + + steps: + - name: Set lower case owner name + env: + OWNER: ${{ github.repository_owner }} + run: | + echo "OWNER_LC=${OWNER,,}" >> "$GITHUB_ENV" + + # Per branch tools container tag + # By default stick to latest + # For official test targetting openwrt stable branch + # Get the branch or parse the tag and push dedicated tools containers + # Any branch that will match this pattern openwrt-[0-9][0-9].[0-9][0-9] + # will refresh the tools container with the matching tag. + # (example branch openwrt-22.03 -> tools:openwrt-22.03) + # (example branch openwrt-22.03-test -> tools:openwrt-22.03) + - name: Determine tools container tag + run: | + CONTAINER_TAG=latest + + if [ ${{ github.ref_type }} == "branch" ]; then + if echo "${{ github.ref_name }}" | grep -q -E 'openwrt-[0-9][0-9]\.[0-9][0-9]'; then + CONTAINER_TAG="$(echo ${{ github.ref_name }} | sed 's/^\(openwrt-[0-9][0-9]\.[0-9][0-9]\).*/\1/')" + fi + elif [ ${{ github.ref_type }} == "tag" ]; then + if echo "${{ github.ref_name }}" | grep -q -E 'v[0-9][0-9]\.[0-9][0-9]\..+'; then + CONTAINER_TAG=openwrt-"$(echo ${{ github.ref_name }} | sed 's/v\([0-9][0-9]\.[0-9][0-9]\)\..\+/\1/')" + fi + fi + + echo "Tools container to push tools:$CONTAINER_TAG" + echo "CONTAINER_TAG=$CONTAINER_TAG" >> "$GITHUB_ENV" + + - name: Checkout + uses: actions/checkout@v3 + with: + path: 'openwrt' + + - name: Download prebuilt tools from build job + uses: actions/download-artifact@v3 + with: + name: linux-buildbot-prebuilt-tools + path: openwrt + + - name: Login to GitHub Container Registry + uses: docker/login-action@v2 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Build and push + uses: docker/build-push-action@v3 + with: + context: openwrt + push: true + tags: ghcr.io/${{ env.OWNER_LC }}/tools:${{ env.CONTAINER_TAG }} + file: openwrt/.github/workflows/Dockerfile.tools diff --git a/.github/workflows/tools.yml b/.github/workflows/tools.yml index 304b5f7d62..69ee456bce 100644 --- a/.github/workflows/tools.yml +++ b/.github/workflows/tools.yml @@ -4,10 +4,12 @@ on: pull_request: paths: - 'tools/**' + - '.github/workflows/build-tools.yml' - '.github/workflows/tools.yml' push: paths: - 'tools/**' + - '.github/workflows/build-tools.yml' - '.github/workflows/tools.yml' permissions: @@ -15,7 +17,7 @@ permissions: jobs: build-macos-latest: - if: github.event_name != 'push' + name: Build tools with macos latest runs-on: macos-latest steps: @@ -97,130 +99,5 @@ jobs: path: ${{ env.WORKPATH }}/openwrt/.config build-linux-buildbot: - runs-on: ubuntu-latest - container: registry.gitlab.com/openwrt/buildbot/buildworker-3.4.1 - - steps: - - name: Checkout - uses: actions/checkout@v3 - with: - path: 'openwrt' - - - name: Fix permission - run: | - chown -R buildbot:buildbot openwrt - - - name: Set configs for tools container - if: github.event_name == 'push' - shell: su buildbot -c "sh -e {0}" - working-directory: openwrt - run: | - touch .config - echo CONFIG_DEVEL=y >> .config - echo CONFIG_AUTOREMOVE=y >> .config - echo CONFIG_CCACHE=y >> .config - - - name: Make prereq - shell: su buildbot -c "sh -e {0}" - working-directory: openwrt - run: make defconfig - - - name: Build tools BuildBot Container - shell: su buildbot -c "sh -e {0}" - working-directory: openwrt - run: make tools/install -j$(nproc) BUILD_LOG=1 || ret=$? .github/workflows/scripts/show_build_failures.sh - - - name: Upload logs - if: always() - uses: actions/upload-artifact@v3 - with: - name: linux-buildbot-logs - path: openwrt/logs - - - name: Upload config - if: always() - uses: actions/upload-artifact@v3 - with: - name: linux-buildbot-config - path: openwrt/.config - - - name: Archive prebuilt tools - if: github.event_name == 'push' - shell: su buildbot -c "sh -e {0}" - working-directory: openwrt - run: tar --mtime=now -cf tools.tar staging_dir/host build_dir/host dl - - - name: Upload prebuilt tools - if: github.event_name == 'push' - uses: actions/upload-artifact@v3 - with: - name: linux-buildbot-prebuilt-tools - path: openwrt/tools.tar - retention-days: 1 - - push-tools-container: - needs: build-linux-buildbot - runs-on: ubuntu-latest - if: github.event_name == 'push' - - permissions: - contents: read - packages: write - - steps: - - name: Set lower case owner name - env: - OWNER: ${{ github.repository_owner }} - run: | - echo "OWNER_LC=${OWNER,,}" >> "$GITHUB_ENV" - - # Per branch tools container tag - # By default stick to latest - # For official test targetting openwrt stable branch - # Get the branch or parse the tag and push dedicated tools containers - # Any branch that will match this pattern openwrt-[0-9][0-9].[0-9][0-9] - # will refresh the tools container with the matching tag. - # (example branch openwrt-22.03 -> tools:openwrt-22.03) - # (example branch openwrt-22.03-test -> tools:openwrt-22.03) - - name: Determine tools container tag - run: | - CONTAINER_TAG=latest - - if [ ${{ github.ref_type }} == "branch" ]; then - if echo "${{ github.ref_name }}" | grep -q -E 'openwrt-[0-9][0-9]\.[0-9][0-9]'; then - CONTAINER_TAG="$(echo ${{ github.ref_name }} | sed 's/^\(openwrt-[0-9][0-9]\.[0-9][0-9]\).*/\1/')" - fi - elif [ ${{ github.ref_type }} == "tag" ]; then - if echo "${{ github.ref_name }}" | grep -q -E 'v[0-9][0-9]\.[0-9][0-9]\..+'; then - CONTAINER_TAG=openwrt-"$(echo ${{ github.ref_name }} | sed 's/v\([0-9][0-9]\.[0-9][0-9]\)\..\+/\1/')" - fi - fi - - echo "Tools container to push tools:$CONTAINER_TAG" - echo "CONTAINER_TAG=$CONTAINER_TAG" >> "$GITHUB_ENV" - - - name: Checkout - uses: actions/checkout@v3 - with: - path: 'openwrt' - - - name: Download prebuilt tools from build job - uses: actions/download-artifact@v3 - with: - name: linux-buildbot-prebuilt-tools - path: openwrt - - - name: Login to GitHub Container Registry - uses: docker/login-action@v2 - with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Build and push - uses: docker/build-push-action@v3 - with: - context: openwrt - push: true - tags: ghcr.io/${{ env.OWNER_LC }}/tools:${{ env.CONTAINER_TAG }} - file: openwrt/.github/workflows/Dockerfile.tools + name: Build tools with buildbot container + uses: ./.github/workflows/build-tools.yml From b4da12c2a0609975cf5ae03d3deb92012bf9e784 Mon Sep 17 00:00:00 2001 From: Josef Schlehofer Date: Thu, 22 Dec 2022 19:37:36 +0100 Subject: [PATCH 5/9] mpc85xx: drop empty patch as it backported to LTS kernel 5.15.70 This patch is part of Linux kernel 5.15.70, the content was removed, but the empty file is still being carried over the repository, so remove it once for all Fixes: e1b009c ("kernel: bump 5.15 to 5.15.70") Signed-off-by: Josef Schlehofer --- ...110-gpio-mpc8xxx-Fix-support-for-IRQ_TYPE_LEVEL_LOW-flow.patch | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 target/linux/mpc85xx/patches-5.15/110-gpio-mpc8xxx-Fix-support-for-IRQ_TYPE_LEVEL_LOW-flow.patch diff --git a/target/linux/mpc85xx/patches-5.15/110-gpio-mpc8xxx-Fix-support-for-IRQ_TYPE_LEVEL_LOW-flow.patch b/target/linux/mpc85xx/patches-5.15/110-gpio-mpc8xxx-Fix-support-for-IRQ_TYPE_LEVEL_LOW-flow.patch deleted file mode 100644 index e69de29bb2..0000000000 From cb7d662dac897dd7df6ba6ba60417db822bd68f2 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Sat, 24 Dec 2022 14:39:17 +0100 Subject: [PATCH 6/9] mac80211: Do not build brcmsmac on bcm47xx_legacy brcmsmac needs bcma. bcma is build into the kernel for the other bcm47xx subtargets, but not for the legacy target because it only uses ssb. We could build bcma as a module for bcm47xx_legacy, but none of these old devices uses a wifi card supported by brcsmac. Signed-off-by: Hauke Mehrtens --- package/kernel/mac80211/broadcom.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/kernel/mac80211/broadcom.mk b/package/kernel/mac80211/broadcom.mk index 67599acbad..90167941c4 100644 --- a/package/kernel/mac80211/broadcom.mk +++ b/package/kernel/mac80211/broadcom.mk @@ -381,7 +381,7 @@ define KernelPackage/brcmsmac $(call KernelPackage/mac80211/Default) TITLE:=Broadcom IEEE802.11n PCIe SoftMAC WLAN driver URL:=https://wireless.wiki.kernel.org/en/users/drivers/brcm80211 - DEPENDS+= +kmod-mac80211 +!TARGET_bcm47xx:kmod-bcma +kmod-lib-cordic +kmod-lib-crc8 +kmod-brcmutil +!BRCMSMAC_USE_FW_FROM_WL:brcmsmac-firmware + DEPENDS+=@!TARGET_bcm47xx_legacy +kmod-mac80211 +!TARGET_bcm47xx:kmod-bcma +kmod-lib-cordic +kmod-lib-crc8 +kmod-brcmutil +!BRCMSMAC_USE_FW_FROM_WL:brcmsmac-firmware FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/broadcom/brcm80211/brcmsmac/brcmsmac.ko AUTOLOAD:=$(call AutoProbe,brcmsmac) MENU:=1 From 0c405bceba11574b3d11c5612adfe5f70e2817fd Mon Sep 17 00:00:00 2001 From: John Audia Date: Wed, 21 Dec 2022 14:13:53 -0500 Subject: [PATCH 7/9] kernel: bump 5.15 to 5.15.85 All patches automatically rebased. Build system: x86_64 Build-tested: bcm2711/RPi4B Run-tested: bcm2711/RPi4B Signed-off-by: John Audia --- include/kernel-5.15 | 4 ++-- .../950-0600-xhci-quirks-add-link-TRB-quirk-for-VL805.patch | 2 +- .../950-0606-usb-xhci-add-VLI_TRB_CACHE_BUG-quirk.patch | 2 +- ...usb-xhci-add-a-quirk-for-Superspeed-bulk-OUT-transfe.patch | 2 +- .../hack-5.15/780-usb-net-MeigLink_modem_support.patch | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/include/kernel-5.15 b/include/kernel-5.15 index 5013ce44e2..c32d5f6d23 100644 --- a/include/kernel-5.15 +++ b/include/kernel-5.15 @@ -1,2 +1,2 @@ -LINUX_VERSION-5.15 = .84 -LINUX_KERNEL_HASH-5.15.84 = 318dc30cb059c2e35b59652b166b39804bb3a941f11878aae6119019a04b8217 +LINUX_VERSION-5.15 = .85 +LINUX_KERNEL_HASH-5.15.85 = 2c0bae29fac98e0a9408914a4551b2971365ac0000351cb255d6bd9aa0849808 diff --git a/target/linux/bcm27xx/patches-5.15/950-0600-xhci-quirks-add-link-TRB-quirk-for-VL805.patch b/target/linux/bcm27xx/patches-5.15/950-0600-xhci-quirks-add-link-TRB-quirk-for-VL805.patch index dc946b1c63..10820c6708 100644 --- a/target/linux/bcm27xx/patches-5.15/950-0600-xhci-quirks-add-link-TRB-quirk-for-VL805.patch +++ b/target/linux/bcm27xx/patches-5.15/950-0600-xhci-quirks-add-link-TRB-quirk-for-VL805.patch @@ -22,7 +22,7 @@ Signed-off-by: Jonathan Bell --- a/drivers/usb/host/xhci-pci.c +++ b/drivers/usb/host/xhci-pci.c -@@ -291,6 +291,7 @@ static void xhci_pci_quirks(struct devic +@@ -293,6 +293,7 @@ static void xhci_pci_quirks(struct devic if (pdev->vendor == PCI_VENDOR_ID_VIA && pdev->device == 0x3483) { xhci->quirks |= XHCI_LPM_SUPPORT; xhci->quirks |= XHCI_EP_CTX_BROKEN_DCS; diff --git a/target/linux/bcm27xx/patches-5.15/950-0606-usb-xhci-add-VLI_TRB_CACHE_BUG-quirk.patch b/target/linux/bcm27xx/patches-5.15/950-0606-usb-xhci-add-VLI_TRB_CACHE_BUG-quirk.patch index 4d477eb4e1..f3bb6384c6 100644 --- a/target/linux/bcm27xx/patches-5.15/950-0606-usb-xhci-add-VLI_TRB_CACHE_BUG-quirk.patch +++ b/target/linux/bcm27xx/patches-5.15/950-0606-usb-xhci-add-VLI_TRB_CACHE_BUG-quirk.patch @@ -53,7 +53,7 @@ Signed-off-by: Jonathan Bell cycle_state, type, max_packet, flags); --- a/drivers/usb/host/xhci-pci.c +++ b/drivers/usb/host/xhci-pci.c -@@ -292,6 +292,7 @@ static void xhci_pci_quirks(struct devic +@@ -294,6 +294,7 @@ static void xhci_pci_quirks(struct devic xhci->quirks |= XHCI_LPM_SUPPORT; xhci->quirks |= XHCI_EP_CTX_BROKEN_DCS; xhci->quirks |= XHCI_AVOID_DQ_ON_LINK; diff --git a/target/linux/bcm27xx/patches-5.15/950-0717-usb-xhci-add-a-quirk-for-Superspeed-bulk-OUT-transfe.patch b/target/linux/bcm27xx/patches-5.15/950-0717-usb-xhci-add-a-quirk-for-Superspeed-bulk-OUT-transfe.patch index 372ec6f8e7..34562507c2 100644 --- a/target/linux/bcm27xx/patches-5.15/950-0717-usb-xhci-add-a-quirk-for-Superspeed-bulk-OUT-transfe.patch +++ b/target/linux/bcm27xx/patches-5.15/950-0717-usb-xhci-add-a-quirk-for-Superspeed-bulk-OUT-transfe.patch @@ -26,7 +26,7 @@ Signed-off-by: Jonathan Bell --- a/drivers/usb/host/xhci-pci.c +++ b/drivers/usb/host/xhci-pci.c -@@ -293,6 +293,7 @@ static void xhci_pci_quirks(struct devic +@@ -295,6 +295,7 @@ static void xhci_pci_quirks(struct devic xhci->quirks |= XHCI_EP_CTX_BROKEN_DCS; xhci->quirks |= XHCI_AVOID_DQ_ON_LINK; xhci->quirks |= XHCI_VLI_TRB_CACHE_BUG; diff --git a/target/linux/generic/hack-5.15/780-usb-net-MeigLink_modem_support.patch b/target/linux/generic/hack-5.15/780-usb-net-MeigLink_modem_support.patch index eb11d9b700..60c5f6b762 100644 --- a/target/linux/generic/hack-5.15/780-usb-net-MeigLink_modem_support.patch +++ b/target/linux/generic/hack-5.15/780-usb-net-MeigLink_modem_support.patch @@ -29,7 +29,7 @@ Subject: [PATCH] net/usb/qmi_wwan: add MeigLink modem support #define QUECTEL_VENDOR_ID 0x2c7c /* These Quectel products use Quectel's vendor ID */ -@@ -1155,6 +1157,11 @@ static const struct usb_device_id option +@@ -1156,6 +1158,11 @@ static const struct usb_device_id option .driver_info = ZLP }, { USB_DEVICE(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_BG96), .driver_info = RSVD(4) }, From 59254010077c9086afee8a8b4c490943d6749065 Mon Sep 17 00:00:00 2001 From: John Audia Date: Wed, 21 Dec 2022 14:19:12 -0500 Subject: [PATCH 8/9] kernel: bump 5.10 to 5.10.161 All patches automatically rebased. Build system: x86_64 Build-tested: ramips/tplink_archer-a6-v3 Run-tested: ramips/tplink_archer-a6-v3 Signed-off-by: John Audia --- include/kernel-5.10 | 4 ++-- .../patches-5.10/802-usb-xhci-force-msi-renesas-xhci.patch | 2 +- .../hack-5.10/780-usb-net-MeigLink_modem_support.patch | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/kernel-5.10 b/include/kernel-5.10 index abfb0422d1..da007fc72d 100644 --- a/include/kernel-5.10 +++ b/include/kernel-5.10 @@ -1,2 +1,2 @@ -LINUX_VERSION-5.10 = .160 -LINUX_KERNEL_HASH-5.10.160 = 30d5076acae863941045880c4c5c5109d26a54a932168fa1324237e8aeaa840b +LINUX_VERSION-5.10 = .161 +LINUX_KERNEL_HASH-5.10.161 = 7aaaf6d0bcd8a2cfa14ad75f02ca62bb2de08aad3bee3eff198de49ea5254079 diff --git a/target/linux/apm821xx/patches-5.10/802-usb-xhci-force-msi-renesas-xhci.patch b/target/linux/apm821xx/patches-5.10/802-usb-xhci-force-msi-renesas-xhci.patch index 4ca2946481..00ca3fbade 100644 --- a/target/linux/apm821xx/patches-5.10/802-usb-xhci-force-msi-renesas-xhci.patch +++ b/target/linux/apm821xx/patches-5.10/802-usb-xhci-force-msi-renesas-xhci.patch @@ -13,7 +13,7 @@ produce a noisy warning. --- a/drivers/usb/host/xhci-pci.c +++ b/drivers/usb/host/xhci-pci.c -@@ -274,6 +274,7 @@ static void xhci_pci_quirks(struct devic +@@ -276,6 +276,7 @@ static void xhci_pci_quirks(struct devic pdev->device == 0x0015) { xhci->quirks |= XHCI_RESET_ON_RESUME; xhci->quirks |= XHCI_ZERO_64B_REGS; diff --git a/target/linux/generic/hack-5.10/780-usb-net-MeigLink_modem_support.patch b/target/linux/generic/hack-5.10/780-usb-net-MeigLink_modem_support.patch index 8718aedfa3..6d499b88fe 100644 --- a/target/linux/generic/hack-5.10/780-usb-net-MeigLink_modem_support.patch +++ b/target/linux/generic/hack-5.10/780-usb-net-MeigLink_modem_support.patch @@ -33,7 +33,7 @@ Submitted-by: Daniel Golle #define QUECTEL_VENDOR_ID 0x2c7c /* These Quectel products use Quectel's vendor ID */ -@@ -1155,6 +1157,11 @@ static const struct usb_device_id option +@@ -1156,6 +1158,11 @@ static const struct usb_device_id option .driver_info = ZLP }, { USB_DEVICE(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_BG96), .driver_info = RSVD(4) }, From c7d3bbb909bdcccd4f26f18b18cc1cb00500a874 Mon Sep 17 00:00:00 2001 From: Jan-Niklas Burfeind Date: Fri, 23 Dec 2022 22:03:14 +0100 Subject: [PATCH 9/9] sunxi: ensure NanoPi R1 has unique MAC address Ensure the MAC address for all NanoPi R1 boards is assigned uniquely for each board. The vendor ships the device in two variants; one with and one without eMMC; but both without static mac-addresses. In order to assign both board types unique MAC addresses, fall back on the same method used for the NanoPi R2S and R4S in case the EEPROM chip is not present by generating the board MAC from the SD card CID. [0] https://wiki.friendlyelec.com/wiki/index.php/NanoPi_R1#Hardware_Spec Similar too and based on: commit b5675f500daf ("rockchip: ensure NanoPi R4S has unique MAC address") Co-authored-by: David Bauer Signed-off-by: Jan-Niklas Burfeind --- .../base-files/files/lib/functions/system.sh | 8 ++++++ .../armv8/base-files/etc/board.d/02_network | 13 ++-------- .../sunxi/base-files/etc/board.d/02_network | 25 +++++++++++++++++++ 3 files changed, 35 insertions(+), 11 deletions(-) diff --git a/package/base-files/files/lib/functions/system.sh b/package/base-files/files/lib/functions/system.sh index 29de2e5dd6..176c10d065 100644 --- a/package/base-files/files/lib/functions/system.sh +++ b/package/base-files/files/lib/functions/system.sh @@ -204,6 +204,14 @@ macaddr_add() { echo $oui:$nic } +macaddr_generate_from_mmc_cid() { + local mmc_dev=$1 + + local sd_hash=$(sha256sum /sys/class/block/$mmc_dev/device/cid) + local mac_base=$(macaddr_canonicalize "$(echo "${sd_hash}" | dd bs=1 count=12 2>/dev/null)") + echo "$(macaddr_unsetbit_mc "$(macaddr_setbit_la "${mac_base}")")" +} + macaddr_geteui() { local mac=$1 local sep=$2 diff --git a/target/linux/rockchip/armv8/base-files/etc/board.d/02_network b/target/linux/rockchip/armv8/base-files/etc/board.d/02_network index b0e6479947..816045a480 100644 --- a/target/linux/rockchip/armv8/base-files/etc/board.d/02_network +++ b/target/linux/rockchip/armv8/base-files/etc/board.d/02_network @@ -17,15 +17,6 @@ rockchip_setup_interfaces() esac } -generate_mac_from_mmc_cid() -{ - local mmc_dev=$1 - - local sd_hash=$(sha256sum /sys/class/block/$mmc_dev/device/cid) - local mac_base=$(macaddr_canonicalize "$(echo "${sd_hash}" | dd bs=1 count=12 2>/dev/null)") - echo "$(macaddr_unsetbit_mc "$(macaddr_setbit_la "${mac_base}")")" -} - nanopi_r4s_get_mac() { local interface=$1 @@ -38,7 +29,7 @@ nanopi_r4s_get_mac() address=$(macaddr_setbit_la "$address") fi else - address=$(generate_mac_from_mmc_cid mmcblk1) + address=$(macaddr_generate_from_mmc_cid mmcblk1) if [ "$interface" = "lan" ]; then address=$(macaddr_add "$address" 1) fi @@ -56,7 +47,7 @@ rockchip_setup_macs() case "$board" in friendlyarm,nanopi-r2s) - wan_mac=$(generate_mac_from_mmc_cid mmcblk0) + wan_mac=$(macaddr_generate_from_mmc_cid mmcblk0) lan_mac=$(macaddr_add "$wan_mac" 1) ;; friendlyarm,nanopi-r4s) diff --git a/target/linux/sunxi/base-files/etc/board.d/02_network b/target/linux/sunxi/base-files/etc/board.d/02_network index 46ace1f67c..b295dc7daa 100644 --- a/target/linux/sunxi/base-files/etc/board.d/02_network +++ b/target/linux/sunxi/base-files/etc/board.d/02_network @@ -29,6 +29,27 @@ sunxi_setup_interfaces() esac } +nanopi_r1_get_mac() +{ + local interface=$1 + local eeprom_path="/sys/bus/i2c/devices/2-0051/eeprom" + local address + + if [ -f "$eeprom_path" ]; then + address=$(get_mac_binary "$eeprom_path" 0xfa) + if [ "$interface" = "lan" ]; then + address=$(macaddr_setbit_la "$address") + fi + else + address=$(macaddr_generate_from_mmc_cid mmcblk1) + if [ "$interface" = "lan" ]; then + address=$(macaddr_add "$address" 1) + fi + fi + + echo "$address" +} + sunxi_setup_macs() { local board="$1" @@ -37,6 +58,10 @@ sunxi_setup_macs() local label_mac="" case "$board" in + friendlyarm,nanopi-r1) + wan_mac=$(nanopi_r1_get_mac wan) + lan_mac=$(nanopi_r1_get_mac lan) + ;; friendlyarm,nanopi-r1s-h5) lan_mac=$(get_mac_binary "/sys/bus/i2c/devices/0-0051/eeprom" 0xfa) ;;