@@ -5,6 +5,7 @@ set -eu -o pipefail
55# # Update docker image tag, because kernel build is using `uname -r` when defining package version variable
66# KERNEL_VERSION=$(curl -s https://www.kernel.org | grep '<strong>' | head -3 | tail -1 | cut -d'>' -f3 | cut -d'<' -f1)
77KERNEL_VERSION=5.12.8
8+ PKGREL=2
89# KERNEL_REPOSITORY=git://kernel.ubuntu.com/virgin/linux-stable.git
910KERNEL_REPOSITORY=https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
1011REPO_PATH=$( pwd)
@@ -19,17 +20,18 @@ echo "CPU threads: $(nproc --all)"
1920grep ' model name' /proc/cpuinfo | uniq
2021
2122get_next_version () {
22- curl -s https://mbp-ubuntu-kernel.herokuapp.com/ -L | grep " linux-image-${KERNEL_VERSION} -${1} " > /dev/null
23- OLD_BUILD_EXIST=$?
24- if test $OLD_BUILD_EXIST -eq 0
25- then
26- LATEST_BUILD=$( curl -s https://mbp-ubuntu-kernel.herokuapp.com/ -L | grep " linux-image-${KERNEL_VERSION} -${1} " |
27- grep a | cut -d' >' -f2 | cut -d' <' -f1 |
28- sort -r | head -n 1 | cut -d' -' -f6 | cut -d' _' -f1)
29- else
30- LATEST_BUILD=0
31- fi
32- echo " $(( LATEST_BUILD+ 1 )) "
23+ echo $PKGREL
24+ # curl -s https://mbp-ubuntu-kernel.herokuapp.com/ -L | grep "linux-image-${KERNEL_VERSION}-${1}" > /dev/null
25+ # OLD_BUILD_EXIST=$?
26+ # if test $OLD_BUILD_EXIST -eq 0
27+ # then
28+ # LATEST_BUILD=$(curl -s https://mbp-ubuntu-kernel.herokuapp.com/ -L | grep "linux-image-${KERNEL_VERSION}-${1}" |
29+ # grep a | cut -d'>' -f2 | cut -d'<' -f1 |
30+ # sort -r | head -n 1 | cut -d'-' -f6 | cut -d'_' -f1)
31+ # else
32+ # LATEST_BUILD=0
33+ # fi
34+ # echo "$((LATEST_BUILD+1))"
3335}
3436
3537# ## Clean up
@@ -68,7 +70,7 @@ echo >&2 "===]> Info: Applying patches... "
6870while IFS= read -r file; do
6971 echo " ==> Adding $file "
7072 patch -p1 < " $file "
71- done < <( find " ${WORKING_PATH} /patches" -type f -name " *.patch" | grep -vE ' [2]00[0-9] ' | sort)
73+ done < <( find " ${WORKING_PATH} /patches" -type f -name " *.patch" | sort)
7274
7375chmod a+x " ${KERNEL_PATH} " /debian/rules
7476chmod a+x " ${KERNEL_PATH} " /debian/scripts/*
@@ -85,22 +87,7 @@ make olddefconfig
8587echo " " > " ${KERNEL_PATH} " /.scmversion
8688
8789# Build Deb packages
88- make -j " $( getconf _NPROCESSORS_ONLN) " deb-pkg LOCALVERSION=-mbp KDEB_PKGVERSION=" $( make kernelversion) -$( get_next_version mbp-alt) "
89-
90- # Create alternative Kernel
91- echo >&2 " ===]> Info: Create alternative kernel ... "
92- make distclean
93- make clean
94- while IFS= read -r file; do
95- echo " ==> Adding $file "
96- patch -p1 < " $file "
97- done < <( find " ${WORKING_PATH} /patches" -type f -name " *.patch" | grep -E ' [2]00[0-9]' | sort)
98- cp " ${WORKING_PATH} /templates/default-config" " ${KERNEL_PATH} /.config"
99- make olddefconfig
100- echo " " > " ${KERNEL_PATH} " /.scmversion
101-
102- # Build Deb packages
103- make -j " $( getconf _NPROCESSORS_ONLN) " deb-pkg LOCALVERSION=-mbp-alt KDEB_PKGVERSION=" $( make kernelversion) -$( get_next_version mbp) "
90+ make -j " $( getconf _NPROCESSORS_ONLN) " deb-pkg LOCALVERSION=-mbp-16X-wifi KDEB_PKGVERSION=" $( make kernelversion) -$( get_next_version) "
10491
10592# ### Copy artifacts to shared volume
10693echo >&2 " ===]> Info: Copying debs and calculating SHA256 ... "
0 commit comments