From ada47377b53ac9c9ff0a199d3e1635ba2a0bd2d1 Mon Sep 17 00:00:00 2001 From: The-going <48602507+The-going@users.noreply.github.com> Date: Sun, 28 Nov 2021 23:31:24 +0300 Subject: [PATCH] Patches megous current branch to v5.10.82 (#3294) * Kernel switch tag: v5.10.82 * Rework series megouse for v5.10.82 * Switch new packaging for kernel 5.10 and more --- .../families/include/sunxi64_common.inc | 26 ++++++++++++------- .../sources/families/include/sunxi_common.inc | 26 ++++++++++++------- lib/compilation-prepare.sh | 6 +---- .../ARM-dts-sunxi-Add-aliases-fro-mmc.patch | 12 ++++----- patch/kernel/archive/sunxi-5.10/series.conf | 2 +- 5 files changed, 40 insertions(+), 32 deletions(-) diff --git a/config/sources/families/include/sunxi64_common.inc b/config/sources/families/include/sunxi64_common.inc index b832699fbb..0bec3d2c8f 100644 --- a/config/sources/families/include/sunxi64_common.inc +++ b/config/sources/families/include/sunxi64_common.inc @@ -14,7 +14,7 @@ case $BRANCH in current) KERNEL_VERSION_LEVEL="5.10" - KERNELSWITCHOBJ="tag=v5.10.81" + KERNELSWITCHOBJ="tag=v5.10.82" ;; edge) @@ -23,15 +23,21 @@ case $BRANCH in ;; esac -if [ "$KERNEL_VERSION_LEVEL" == "5.4" ]; then - KERNELSOURCE="https://github.com/megous/linux" - KERNELSOURCENAME='name=megous' - KERNELBRANCH="branch:orange-pi-$KERNEL_VERSION_LEVEL" -else - KERNELSOURCE=$MAINLINE_KERNEL_SOURCE - KERNELSOURCENAME='name=origin' - KERNELBRANCH="branch:linux-${KERNEL_VERSION_LEVEL}.y" -fi +case "$KERNEL_VERSION_LEVEL" in + + 5.10|5.15) + KERNELSOURCE=$MAINLINE_KERNEL_SOURCE + KERNELSOURCENAME='name=origin' + KERNELBRANCH="branch:linux-${KERNEL_VERSION_LEVEL}.y" + ;; + + *) + KERNELSOURCE="https://github.com/megous/linux" + KERNELSOURCENAME='name=megous' + KERNELBRANCH="branch:orange-pi-$KERNEL_VERSION_LEVEL" + ;; +esac + KERNELPATCHDIR='sunxi-'$BRANCH # An optional parameter for switching to a git object such as a tag, commit, diff --git a/config/sources/families/include/sunxi_common.inc b/config/sources/families/include/sunxi_common.inc index 7f765c155f..2150f0478a 100644 --- a/config/sources/families/include/sunxi_common.inc +++ b/config/sources/families/include/sunxi_common.inc @@ -15,7 +15,7 @@ case $BRANCH in current) KERNEL_VERSION_LEVEL="5.10" - KERNELSWITCHOBJ="tag=v5.10.81" + KERNELSWITCHOBJ="tag=v5.10.82" ;; edge) @@ -24,15 +24,21 @@ case $BRANCH in ;; esac -if [ "$KERNEL_VERSION_LEVEL" == "5.4" ]; then - KERNELSOURCE="https://github.com/megous/linux" - KERNELSOURCENAME='name=megous' - KERNELBRANCH="branch:orange-pi-$KERNEL_VERSION_LEVEL" -else - KERNELSOURCE=$MAINLINE_KERNEL_SOURCE - KERNELSOURCENAME='name=origin' - KERNELBRANCH="branch:linux-${KERNEL_VERSION_LEVEL}.y" -fi +case "$KERNEL_VERSION_LEVEL" in + + 5.10|5.15) + KERNELSOURCE=$MAINLINE_KERNEL_SOURCE + KERNELSOURCENAME='name=origin' + KERNELBRANCH="branch:linux-${KERNEL_VERSION_LEVEL}.y" + ;; + + *) + KERNELSOURCE="https://github.com/megous/linux" + KERNELSOURCENAME='name=megous' + KERNELBRANCH="branch:orange-pi-$KERNEL_VERSION_LEVEL" + ;; +esac + KERNELPATCHDIR='sunxi-'$BRANCH # An optional parameter for switching to a git object such as a tag, commit, diff --git a/lib/compilation-prepare.sh b/lib/compilation-prepare.sh index 4a9c7ad337..a78715c499 100644 --- a/lib/compilation-prepare.sh +++ b/lib/compilation-prepare.sh @@ -24,7 +24,7 @@ compilation_prepare() # Maintaining one from central location starting with 5.3+ # Temporally set for new "default->legacy,next->current" family naming - if linux-version compare "${version}" ge 5.12; then + if linux-version compare "${version}" ge 5.10; then if test -d ${kerneldir}/debian then @@ -41,10 +41,6 @@ compilation_prepare() chmod 755 ${kerneldir}/scripts/package/{builddeb,mkdebian} - elif linux-version compare "${version}" ge 5.10; then - display_alert "Adjusting" "packaging" "info" - cd "$kerneldir" || exit - process_patch_file "${SRC}/patch/misc/general-packaging-5.10.y.patch" "applying" elif linux-version compare "${version}" ge 5.8.17 \ && linux-version compare "${version}" le 5.9 \ || linux-version compare "${version}" ge 5.9.2; then diff --git a/patch/kernel/archive/sunxi-5.10/megous/ARM-dts-sunxi-Add-aliases-fro-mmc.patch b/patch/kernel/archive/sunxi-5.10/megous/ARM-dts-sunxi-Add-aliases-fro-mmc.patch index 549cde63e3..15d933eec5 100644 --- a/patch/kernel/archive/sunxi-5.10/megous/ARM-dts-sunxi-Add-aliases-fro-mmc.patch +++ b/patch/kernel/archive/sunxi-5.10/megous/ARM-dts-sunxi-Add-aliases-fro-mmc.patch @@ -52,13 +52,13 @@ index 009e012b4691..8e7d20e814f0 100644 #include / { -+ aliases { -+ mmc0 = &mmc0; -+ mmc1 = &mmc1; -+ mmc2 = &mmc2; -+ }; ++ aliases { ++ mmc0 = &mmc0; ++ mmc1 = &mmc1; ++ mmc2 = &mmc2; ++ }; + - cpu0_opp_table: opp_table0 { + cpu0_opp_table: opp-table-cpu { compatible = "operating-points-v2"; opp-shared; -- diff --git a/patch/kernel/archive/sunxi-5.10/series.conf b/patch/kernel/archive/sunxi-5.10/series.conf index 1bb3350b10..43c87ea656 100644 --- a/patch/kernel/archive/sunxi-5.10/series.conf +++ b/patch/kernel/archive/sunxi-5.10/series.conf @@ -185,7 +185,7 @@ megous/misc-modem-power-GPIO-debugging-API.patch megous/power-supply-cw2015-Silence-cw2015.patch megous/media-cedrus-Fix-missing-cleanup-in-error-path.patch - megous/arm64-dts-pinebook-pro-Fix-display-initialization.patch +- megous/arm64-dts-pinebook-pro-Fix-display-initialization.patch megous/media-cedrus-Fix-failure-to-clean-up-hardware-on-pro.patch megous/arm64-dts-rk3399-pinebook-pro-Fix-USB-PD-charging.patch megous/ARM-dts-sunxi-Add-mmc-aliases.patch