From 788e628ef030ab75eb700b4ad80725713cc40b69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Igor=20Pe=C4=8Dovnik?= Date: Sun, 6 Dec 2020 13:40:00 +0100 Subject: [PATCH] Make multicore support on headers making and don't stop in case of new features (#2422) --- patch/misc/general-packaging-4.14.y.patch | 2 +- patch/misc/general-packaging-4.4.y-rk3399.patch | 2 +- patch/misc/general-packaging-4.4.y-rockchip64.patch | 2 +- patch/misc/general-packaging-4.4.y.patch | 2 +- patch/misc/general-packaging-4.9.y.patch | 2 +- patch/misc/general-packaging-5.10.y.patch | 3 ++- patch/misc/general-packaging-5.3.y.patch | 3 ++- patch/misc/general-packaging-5.6.y.patch | 3 ++- patch/misc/general-packaging-5.8-9.y.patch | 3 ++- 9 files changed, 13 insertions(+), 9 deletions(-) diff --git a/patch/misc/general-packaging-4.14.y.patch b/patch/misc/general-packaging-4.14.y.patch index 0ae0a33503..6a1eea7f75 100644 --- a/patch/misc/general-packaging-4.14.y.patch +++ b/patch/misc/general-packaging-4.14.y.patch @@ -33,7 +33,7 @@ index 8c4bc5a2c..30bc0cffb 100644 + + # Create postinstall script for headers + if [[ "$1" == *headers* ]]; then -+ echo "cd /usr/src/linux-headers-$version; echo \"Compiling headers - please wait ...\"; find -type f -exec touch {} +;make -s scripts >/dev/null; make -s M=scripts/mod/ >/dev/null" >> $pdir/DEBIAN/postinst ++ echo "cd /usr/src/linux-headers-$version; echo \"Compiling headers - please wait ...\"; find -type f -exec touch {} +;yes "" | make oldconfig >/dev/null;make -j\$(grep -c 'processor' /proc/cpuinfo) -s scripts >/dev/null; make -s M=scripts/mod/ >/dev/null" >> $pdir/DEBIAN/postinst + echo "exit 0" >> $pdir/DEBIAN/postinst + chmod 775 $pdir/DEBIAN/postinst + fi diff --git a/patch/misc/general-packaging-4.4.y-rk3399.patch b/patch/misc/general-packaging-4.4.y-rk3399.patch index 0f61efa4de..bb0c925e77 100644 --- a/patch/misc/general-packaging-4.4.y-rk3399.patch +++ b/patch/misc/general-packaging-4.4.y-rk3399.patch @@ -23,7 +23,7 @@ index 6c3b038e..f4166fbe 100755 + + # Create postinstall script for headers + if [[ "$1" == *headers* ]]; then -+ echo "cd /usr/src/linux-headers-$version; echo \"Compiling headers - please wait ...\"; find -type f -exec touch {} +;make -s scripts >/dev/null; make -s M=scripts/mod/ >/dev/null" >> $pdir/DEBIAN/postinst ++ echo "cd /usr/src/linux-headers-$version; echo \"Compiling headers - please wait ...\"; find -type f -exec touch {} +;yes "" | make oldconfig >/dev/null;make -j\$(grep -c 'processor' /proc/cpuinfo) -s scripts >/dev/null; make -s M=scripts/mod/ >/dev/null" >> $pdir/DEBIAN/postinst + echo "exit 0" >> $pdir/DEBIAN/postinst + chmod 775 $pdir/DEBIAN/postinst + fi diff --git a/patch/misc/general-packaging-4.4.y-rockchip64.patch b/patch/misc/general-packaging-4.4.y-rockchip64.patch index 7ae3e19666..c5bfe253cb 100644 --- a/patch/misc/general-packaging-4.4.y-rockchip64.patch +++ b/patch/misc/general-packaging-4.4.y-rockchip64.patch @@ -23,7 +23,7 @@ index 6c3b038e..f4166fbe 100755 + + # Create postinstall script for headers + if [[ "$1" == *headers* ]]; then -+ echo "cd /usr/src/linux-headers-$version; echo \"Compiling headers - please wait ...\"; find -type f -exec touch {} +;make -s scripts >/dev/null; make -s M=scripts/mod/ >/dev/null" >> $pdir/DEBIAN/postinst ++ echo "cd /usr/src/linux-headers-$version; echo \"Compiling headers - please wait ...\"; find -type f -exec touch {} +;yes "" | make oldconfig >/dev/null;make -j\$(grep -c 'processor' /proc/cpuinfo) -s scripts >/dev/null; make -s M=scripts/mod/ >/dev/null" >> $pdir/DEBIAN/postinst + echo "exit 0" >> $pdir/DEBIAN/postinst + chmod 775 $pdir/DEBIAN/postinst + fi diff --git a/patch/misc/general-packaging-4.4.y.patch b/patch/misc/general-packaging-4.4.y.patch index 64d841b530..f6d351a7e6 100644 --- a/patch/misc/general-packaging-4.4.y.patch +++ b/patch/misc/general-packaging-4.4.y.patch @@ -23,7 +23,7 @@ index 6c3b038e..977a0624 100755 + + # Create postinstall script for headers + if [[ "$1" == *headers* ]]; then -+ echo "cd /usr/src/linux-headers-$version; echo \"Compiling headers - please wait ...\"; find -type f -exec touch {} +;make -s scripts >/dev/null; make -s M=scripts/mod/ >/dev/null" >> $pdir/DEBIAN/postinst ++ echo "cd /usr/src/linux-headers-$version; echo \"Compiling headers - please wait ...\"; find -type f -exec touch {} +;yes "" | make oldconfig >/dev/null;make -j\$(grep -c 'processor' /proc/cpuinfo) -s scripts >/dev/null; make -s M=scripts/mod/ >/dev/null" >> $pdir/DEBIAN/postinst + echo "exit 0" >> $pdir/DEBIAN/postinst + chmod 775 $pdir/DEBIAN/postinst + fi diff --git a/patch/misc/general-packaging-4.9.y.patch b/patch/misc/general-packaging-4.9.y.patch index acbee744ee..1db057cc15 100644 --- a/patch/misc/general-packaging-4.9.y.patch +++ b/patch/misc/general-packaging-4.9.y.patch @@ -23,7 +23,7 @@ index 0a2a7372..87edac65 100755 + + # Create postinstall script for headers + if [[ "$1" == *headers* ]]; then -+ echo "cd /usr/src/linux-headers-$version; echo \"Compiling headers - please wait ...\"; find -type f -exec touch {} +;make -s scripts >/dev/null; make -s M=scripts/mod/ >/dev/null" >> $pdir/DEBIAN/postinst ++ echo "cd /usr/src/linux-headers-$version; echo \"Compiling headers - please wait ...\"; find -type f -exec touch {} +;yes "" | make oldconfig >/dev/null;make -j\$(grep -c 'processor' /proc/cpuinfo) -s scripts >/dev/null; make -s M=scripts/mod/ >/dev/null" >> $pdir/DEBIAN/postinst + echo "exit 0" >> $pdir/DEBIAN/postinst + chmod 775 $pdir/DEBIAN/postinst + fi diff --git a/patch/misc/general-packaging-5.10.y.patch b/patch/misc/general-packaging-5.10.y.patch index 31852a11b6..d3e0464b77 100644 --- a/patch/misc/general-packaging-5.10.y.patch +++ b/patch/misc/general-packaging-5.10.y.patch @@ -15,7 +15,7 @@ diff --git a/scripts/package/builddeb b/scripts/package/builddeb index 1b11f8993..c21d931ea 100755 --- a/scripts/package/builddeb +++ b/scripts/package/builddeb -@@ -26,31 +26,61 @@ +@@ -26,31 +26,62 @@ create_package() { local pname="$1" pdir="$2" @@ -67,6 +67,7 @@ index 1b11f8993..c21d931ea 100755 +cd /usr/src/linux-headers-$version +echo "Compiling headers - please wait ..." +find -type f -exec touch {} + ++yes "" | make oldconfig >/dev/null +make -j\$(grep -c 'processor' /proc/cpuinfo) -s scripts >/dev/null +make -j\$(grep -c 'processor' /proc/cpuinfo) -s M=scripts/mod/ >/dev/null +exit 0 diff --git a/patch/misc/general-packaging-5.3.y.patch b/patch/misc/general-packaging-5.3.y.patch index 4445ec57de..b8a6491c43 100644 --- a/patch/misc/general-packaging-5.3.y.patch +++ b/patch/misc/general-packaging-5.3.y.patch @@ -26,7 +26,7 @@ diff --git a/scripts/package/builddeb b/scripts/package/builddeb index c4c580f547ef..2be8a687f878 100755 --- a/scripts/package/builddeb +++ b/scripts/package/builddeb -@@ -41,6 +41,43 @@ create_package() { +@@ -41,6 +41,44 @@ create_package() { # in case we are in a restrictive umask environment like 0077 chmod -R a+rX "$pdir" @@ -54,6 +54,7 @@ index c4c580f547ef..2be8a687f878 100755 +cd /usr/src/linux-headers-$version +echo "Compiling headers - please wait ..." +find -type f -exec touch {} + ++yes "" | make oldconfig >/dev/null +make -j\$(grep -c 'processor' /proc/cpuinfo) -s scripts >/dev/null +make -j\$(grep -c 'processor' /proc/cpuinfo) -s M=scripts/mod/ >/dev/null +exit 0 diff --git a/patch/misc/general-packaging-5.6.y.patch b/patch/misc/general-packaging-5.6.y.patch index 78c180242b..6b4a0b4681 100644 --- a/patch/misc/general-packaging-5.6.y.patch +++ b/patch/misc/general-packaging-5.6.y.patch @@ -15,7 +15,7 @@ diff --git a/scripts/package/builddeb b/scripts/package/builddeb index 6df3c9f..d33e1f3 100755 --- a/scripts/package/builddeb +++ b/scripts/package/builddeb -@@ -41,9 +41,46 @@ create_package() { +@@ -41,9 +41,47 @@ create_package() { # in case we are in a restrictive umask environment like 0077 chmod -R a+rX "$pdir" @@ -42,6 +42,7 @@ index 6df3c9f..d33e1f3 100755 +cat >> $pdir/DEBIAN/postinst << EOT +cd /usr/src/linux-headers-$version +echo "Compiling headers - please wait ..." ++yes "" | make oldconfig >/dev/null +find -type f -exec touch {} + +make -j\$(grep -c 'processor' /proc/cpuinfo) -s scripts >/dev/null +make -j\$(grep -c 'processor' /proc/cpuinfo) -s M=scripts/mod/ >/dev/null diff --git a/patch/misc/general-packaging-5.8-9.y.patch b/patch/misc/general-packaging-5.8-9.y.patch index cb6ebfe67e..0ed5ed3ee9 100644 --- a/patch/misc/general-packaging-5.8-9.y.patch +++ b/patch/misc/general-packaging-5.8-9.y.patch @@ -15,7 +15,7 @@ diff --git a/scripts/package/builddeb b/scripts/package/builddeb index 6df3c9f..d33e1f3 100755 --- a/scripts/package/builddeb +++ b/scripts/package/builddeb -@@ -41,9 +41,46 @@ create_package() { +@@ -41,9 +41,47 @@ create_package() { # in case we are in a restrictive umask environment like 0077 chmod -R a+rX "$pdir" @@ -43,6 +43,7 @@ index 6df3c9f..d33e1f3 100755 +cd /usr/src/linux-headers-$version +echo "Compiling headers - please wait ..." +find -type f -exec touch {} + ++yes "" | make oldconfig >/dev/null +make -j\$(grep -c 'processor' /proc/cpuinfo) -s scripts >/dev/null +make -j\$(grep -c 'processor' /proc/cpuinfo) -s M=scripts/mod/ >/dev/null +exit 0