Skip to content

Commit

Permalink
Update kernel to 5.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
brimstone committed Jul 11, 2019
1 parent d4794cc commit ad9f852
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
9 changes: 5 additions & 4 deletions kernel/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
PCD_VERSION ?= $(shell git describe --tags --always --dirty)

KERNEL_VERSION ?= 5.0.2
KERNEL_VERSION ?= 5.2
FULL_VERSION ?= 5.2.0
LOCAL_VERSION ?= -${PCD_VERSION}
ARCH ?= amd64

Expand Down Expand Up @@ -32,7 +33,7 @@ ${INSTALL_PATH}: linux/linux
xt_conntrack \
binfmt_misc; do \
if [ -z "$$(grep "/$$f.ko" out/lib/modules/${KERNEL_VERSION}${LOCAL_VERSION}/modules.*)" ] \
&& [ -z "$$(grep "$(echo "/$$f.ko" | tr '-_' '_-')" out/lib/modules/${KERNEL_VERSION}${LOCAL_VERSION}/modules.*)" ] \
&& [ -z "$$(grep "$(echo "/$$f.ko" | tr '-_' '_-')" out/lib/modules/${FULL_VERSION}${LOCAL_VERSION}/modules.*)" ] \
; then \
modules="$$modules $$f"; \
fi; \
Expand All @@ -41,7 +42,7 @@ ${INSTALL_PATH}: linux/linux
echo "Can't find:$$modules"; \
exit 1; \
fi
depmod -b ${INSTALL_PATH} ${KERNEL_VERSION}${LOCAL_VERSION}
depmod -b ${INSTALL_PATH} ${FULL_VERSION}${LOCAL_VERSION}
cp linux/System.map ${INSTALL_PATH}
tar -C ${INSTALL_PATH} -cf out.tar lib System.map
mv ${INSTALL_PATH}/vmlinuz* kernel.gz
Expand All @@ -61,7 +62,7 @@ linux: ../download/linux-${KERNEL_VERSION}.tar.xz
$(eval $(call cache,\
https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-${KERNEL_VERSION}.tar.xz, \
../download/linux-${KERNEL_VERSION}.tar.xz, \
43bfea3a6b24b4e5f63190409a199bee8cb93dbea01c52ad7f017078ebdf7c9b)) #kernel
54ad66f672e1a831b574f5e704e8a05f1e6180a8245d4bdd811208a6cb0ac1e7)) #kernel

clean:
-rm linux-${KERNEL_VERSION}.tar.xz
Expand Down
5 changes: 5 additions & 0 deletions kernel/update
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,9 @@

kernel="$(curl -s https://www.kernel.org/ | grep -oE 'http[^ ]*tar.xz' | uniq -d | sed 's/^.*linux-//;s/.tar.xz//')"

echo "Kernel version: $kernel"

sha256sum="$(curl "https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-${kernel}.tar.xz" |sha256sum)"
sha256sum="${sha256sum%% *}"
sed -i "s/KERNEL_VERSION ?= .*$/KERNEL_VERSION ?= $kernel/" Makefile
sed -i "/#kernel/s/^[a-z0-9]*/$sha256sum/" Makefile

0 comments on commit ad9f852

Please sign in to comment.