From 9dd9e1d7063718ad767579b39e5b6e22274dbff6 Mon Sep 17 00:00:00 2001 From: Paul Menzel Date: Mon, 15 Aug 2016 17:47:27 +0200 Subject: [PATCH 1/4] linux: Add version 4.8-rc2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Announcement for Linux 4.8-rc1 [1]: > It's been two weeks, and the merge window for 4.8 is thus closed. > > Due to travel last week, I actually still have a few pull requests > pending in my inbox that I just wanted to take another look at before > merging, but the large bulk of the merge window material has been > merged, and I wanted to make sure there aren't any new ones coming in. > > This seems to be building up to be one of the bigger releases lately, > but let's see how it all ends up. The merge window has been fairly > normal, although the patch itself looks somewhat unusual: over 20% of > the patch is documentation updates, due to conversion of the drm and > media documentation from docbook to the Sphinx doc format. There are > other doc updates, but that's the big bulk of it. > > If you ignore the documentation format change, things look fairly > regular, with about 60% of the non-documentation diffs being drivers > (gpu, networking, media, sound, etc) and about 15% being arch updates > (arm, powerpc and x86 dominate, but there's mips and s390 too). > > The rest is spread out - core networking, tooling (mainly perf), > include files, core kernel, vfs and low-level filesystems (xfs stands > out). Few areas escaped: > > 10787 files changed, 612208 insertions(+), 272098 deletions(-) > > Go out and test. The diffs and logs are too big to post, so as usual > for rc1, I'm just appending my "merge log" for a very high-level view. Announcement for Linux 4.8-rc2 [2]. While at it, select `EARLY_PRINTK_DBGP` as an alternative to the serial port to get Linux kernel messages [3]. ``` $ diff -u /boot/config-4.7.0.mx64.94 /boot/config-4.8.0-rc2.mx64.95 […] -# CONFIG_EARLY_PRINTK_DBGP is not set +CONFIG_EARLY_PRINTK_DBGP=y […] ``` [1] https://lkml.org/lkml/2016/8/7/93 [2] https://lkml.org/lkml/2016/8/14/874 [3] https://www.kernel.org/doc/Documentation/x86/earlyprintk.txt --- linux-4.8_rc2-95.bee | 73 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100755 linux-4.8_rc2-95.bee diff --git a/linux-4.8_rc2-95.bee b/linux-4.8_rc2-95.bee new file mode 100755 index 000000000..9dea21157 --- /dev/null +++ b/linux-4.8_rc2-95.bee @@ -0,0 +1,73 @@ +#!/bin/env beesh + +# note: CONFIG=/boot/config-WHATEVER BEE_MAKEFLAGS='-j 40' ./linux-xxx.bee + +KERNELVERSION=4.8.0-rc2 + +echo $KERNELVERSION + +SRCURL[0]="https://cdn.kernel.org/pub/linux/kernel/v4.x/testing/linux-4.8-rc2.tar.xz" + +# EXCLUDE="" + +#CONFIG= + +KERNELLOCAL=".mx64.95" +FULLKERNELVERSION="${KERNELVERSION}${KERNELLOCAL}" + +B=${S} + +mee_patch() { + echo "PATCH $@" + bee_patch $@ +} + +mee_configure() { + echo "configure $@" + if [ -e /proc/config.gz ] ; then + zcat /proc/config.gz >config-current + RUNNING=config-current + else + RUNNING=/boot/config-$(uname -r) + fi + + : ${CONFIG:=${RUNNING}} + + if [ ! -e ${CONFIG} ] ; then + echo "can't find config '${CONFIG}'" + exit 1 + fi + + cp -v ${CONFIG} .config + + LOCALVERSION="\"${KERNELLOCAL}\"" + sed -i -e "s@CONFIG_LOCALVERSION=.*@CONFIG_LOCALVERSION=${LOCALVERSION}@" .config + + echo "doing make -C ${S} olddefconfig in ${PWD} .." + + make olddefconfig + + echo "doing make -C ${S} menuconfig in ${PWD} .." + + make menuconfig +} + +mee_build() { + echo "build $@" + make ${BEE_MAKEFLAGS} +} + +mee_install() { + echo "install $@" + + make modules_install INSTALL_MOD_PATH=${D} + make install INSTALL_PATH=${D}/boot +# make firmware_install INSTALL_MOD_PATH=${D} + + rm -v ${D}/lib/modules/${FULLKERNELVERSION}/{source,build} + + ln -sv /usr/src/linux/${PKGALLPKG}/source ${D}/lib/modules/${FULLKERNELVERSION}/source + ln -sv /usr/src/linux/${PKGALLPKG}/build ${D}/lib/modules/${FULLKERNELVERSION}/build + + ln -sv bzImage-${FULLKERNELVERSION} ${D}/boot/mariux.${PKGREVISION} +} From a088e97bb6b657d6160895a1932701ef5ba761d7 Mon Sep 17 00:00:00 2001 From: Paul Menzel Date: Wed, 17 Aug 2016 12:10:22 +0200 Subject: [PATCH 2/4] nvidia_linux: Build 367.18 for Linux 4.8-rc2 The source has to be patched, so that it builds with Linux 4.8-rc2 [1][2]. Note, that due to the handling of the extraversion `-rc2`, this is currently put into the wrong directory, and `sudo /sbin/nvidiactl` fails. [1] http://rglinuxtech.com/?p=1788 [2] https://devtalk.nvidia.com/default/topic/954279/linux/nvidia-367-35-dkms-build-errors-for-a-4-7-0-kernel/ --- nvidia_linux-4.8_rc2-95-367.18-0.bee | 90 ++++++++++++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100755 nvidia_linux-4.8_rc2-95-367.18-0.bee diff --git a/nvidia_linux-4.8_rc2-95-367.18-0.bee b/nvidia_linux-4.8_rc2-95-367.18-0.bee new file mode 100755 index 000000000..284851dbd --- /dev/null +++ b/nvidia_linux-4.8_rc2-95-367.18-0.bee @@ -0,0 +1,90 @@ +#!/bin/env beesh + +# calculate package extra versions and legacy level +# - use extraversions to define nvidia extraversion and/or legacy level +# - legacy level should be the last part of extraversion +# - legacy level 2 to 5 will be calculated from version number.. + +mxnvversion=${PKGEXTRAVERSION##*_} +: ${mxnvversion=current} + +nvextraversion="${PKGEXTRAVERSION_DASH}" + +if [ "${mxnvversion:0:6}" = "legacy" -o "${mxnvversion}" = "current" ] ; then + nvextraversion="${nvextraversion%_*}" + nvextraversion="${nvextraversion#-${mxnvversion}}" +else + if [ "${PKGVERSION:0:4}" = "340." ] ; then + mxnvversion="legacy5" + elif [ "${PKGVERSION:0:4}" = "304." ] ; then + mxnvversion="legacy4" + elif [ "${PKGVERSION:0:7}" = "173.14." ] ; then + mxnvversion="legacy3" + elif [ "${PKGVERSION:0:6}" = "96.43." ] ; then + mxnvversion="legacy2" + else + mxnvversion="current" + fi +fi + +print_info "calculated mxnvversion = '${mxnvversion}'" +print_info "calculated nvextraversion = '${nvextraversion}'" + +NVIDIA_ARCHIVE="NVIDIA-Linux-x86_64-${PKGVERSION}${nvextraversion}.run" + +SRCURL[0]="ftp://download.nvidia.com/XFree86/Linux-x86_64/${PKGVERSION}/${NVIDIA_ARCHIVE}" +PATCHURL+=('/src/mariux/patches/0001-nvidia-uvm-Remove-definition-of-radix_tree_empty.patch') +PATCHURL+=('/src/mariux/patches/0002-nvidia-drm-Update-code-for-new-function-signature.patch') +PATCHURL+=('/src/mariux/patches/0003-kernel-Adapt-source-for-Linux-4.8.patch') + +LINUXPKG=${PKGEXTRANAME}.${ARCH} + +LINUXKLOCALVER=$(beeversion --format "%v.mx64.%r" "${LINUXPKG}") + +# '4.4.mx64.75' to '4.4.0.mx64.75' +if [[ $LINUXKLOCALVER =~ ^([0-9]+\.[0-9]+)(\.mx64.*) ]]; then + LINUXKLOCALVER="${BASH_REMATCH[1]}.0${BASH_REMATCH[2]}" +fi + + +build_in_sourcedir +sourcesubdir_append kernel + +: ${BEE_TMP_TMPDIR:=/tmp} + +mee_extract() { + LINUXBUILDARCHIVE="${BEE_BUILDARCHIVEDIR}/${LINUXPKG}.beebuild.tar.bz2" + + print_info "extracting nvidia archive .." + + start_cmd rmdir ${S} + start_cmd sh ${F}/${NVIDIA_ARCHIVE} -x --target ${S} + + if [ -d "/usr/src/linux/${LINUXPKG}/source" ] ; then + LINUXSRCDIR="/usr/src/linux/${LINUXPKG}/source" + elif [ -d "${BEE_TMP_TMPDIR}/${LINUXPKG}/source" ] ; then + LINUXSRCDIR="${BEE_TMP_TMPDIR}/${LINUXPKG}/source" + else + print_info "extracting linux build ${LINUXPKG} .." + start_cmd gtar -xf "${LINUXBUILDARCHIVE}" -C ${BEE_TMP_TMPDIR} + LINUXSRCDIR="${BEE_TMP_TMPDIR}/${LINUXPKG}/source" + fi + + print_info "using kernel sources from ${LINUXSRCDIR} .." +} + +mee_build_pre() { + ln -s ${LINUXSRCDIR}/include ${S}/include +} + +mee_build() { + start_cmd make SYSSRC=${LINUXSRCDIR} module +} + +mee_install() { + mkdir -pv ${D}${DATAROOTDIR}/nvidia/kernel/${LINUXKLOCALVER}/${PKGVERSION} + + cp -v *.ko ${D}${DATAROOTDIR}/nvidia/kernel/${LINUXKLOCALVER}/${PKGVERSION}/ + + ln -s ${PKGVERSION} ${D}${DATAROOTDIR}/nvidia/kernel/${LINUXKLOCALVER}/${mxnvversion} +} From d50a8c83325d4f8f13e10abc69fba35b49788120 Mon Sep 17 00:00:00 2001 From: Paul Menzel Date: Thu, 18 Aug 2016 20:15:05 +0200 Subject: [PATCH 3/4] nvidia_linux-4.8_rc2: Put modules in correct directory MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adapt the script to take the extra version into account, and put the modules into the correct directory. * before: /usr/share/nvidia/kernel/4.8.0.mx64.95 * after: /usr/share/nvidia/kernel/4.8.0-rc2.mx64.95 Here are some examples used for testing. ``` $ test=$(beeversion --format "%V.mx64.%r" linux-4.8_rc2-95.x86_64); if [[ $test =~ ^([0-9]+\.[0-9]+)_?(.*)(\.mx64.*) ]]; then echo "${BASH_REMATCH[1]}.0-${BASH_REMATCH[2]}${BASH_REMATCH[3]}"; fi 4.8.0-rc2.mx64.95 test=$(beeversion --format "%V.mx64.%r" linux-4.8-95.x86_64); if [[ $test =~ ^([0-9]+\.[0-9]+)_?(.*)(\.mx64.*) ]]; then echo "${BASH_REMATCH[1]}.0-${BASH_REMATCH[2]}${BASH_REMATCH[3]}"; fi 4.8.0-.mx64.95 $ test=$(beeversion --format "%V.mx64.%r" linux-4.8_rc2-95.x86_64); if [[ $test =~ ^([0-9]+\.[0-9]+)(_?.*)(\.mx64.*) ]]; then echo "${BASH_REMATCH[1]}.0${BASH_REMATCH[2]}${BASH_REMATCH[3]}"; fi 4.8.0_rc2.mx64.95 $ test=$(beeversion --format "%V.mx64.%r" linux-4.8-95.x86_64); if [[ $test =~ ^([0-9]+\.[0-9]+)(_?.*)(\.mx64.*) ]]; then echo "${BASH_REMATCH[1]}.0${BASH_REMATCH[2]}${BASH_REMATCH[3]}"; fi 4.8.0.mx64.95 ``` As you can see, it currently doesn’t work, when the package has no extra version. --- ...95-367.18-0.bee => nvidia_linux-4.8_rc2-95-367.18-1.bee | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) rename nvidia_linux-4.8_rc2-95-367.18-0.bee => nvidia_linux-4.8_rc2-95-367.18-1.bee (91%) diff --git a/nvidia_linux-4.8_rc2-95-367.18-0.bee b/nvidia_linux-4.8_rc2-95-367.18-1.bee similarity index 91% rename from nvidia_linux-4.8_rc2-95-367.18-0.bee rename to nvidia_linux-4.8_rc2-95-367.18-1.bee index 284851dbd..86e39d9db 100755 --- a/nvidia_linux-4.8_rc2-95-367.18-0.bee +++ b/nvidia_linux-4.8_rc2-95-367.18-1.bee @@ -39,11 +39,12 @@ PATCHURL+=('/src/mariux/patches/0003-kernel-Adapt-source-for-Linux-4.8.patch') LINUXPKG=${PKGEXTRANAME}.${ARCH} -LINUXKLOCALVER=$(beeversion --format "%v.mx64.%r" "${LINUXPKG}") +LINUXKLOCALVER=$(beeversion --format "%V.mx64.%r" "${LINUXPKG}") # '4.4.mx64.75' to '4.4.0.mx64.75' -if [[ $LINUXKLOCALVER =~ ^([0-9]+\.[0-9]+)(\.mx64.*) ]]; then - LINUXKLOCALVER="${BASH_REMATCH[1]}.0${BASH_REMATCH[2]}" +# '4.8_rc2.mx64.95' to '4.8.0-rc2.mx64.95' +if [[ $LINUXKLOCALVER =~ ^([0-9]+\.[0-9]+)_?(.*)(\.mx64.*) ]]; then + LINUXKLOCALVER="${BASH_REMATCH[1]}.0-${BASH_REMATCH[2]}${BASH_REMATCH[3]}" fi From 5aef24ce0cfe5812b629c4ae9873a4878a3aef9f Mon Sep 17 00:00:00 2001 From: Paul Menzel Date: Fri, 19 Aug 2016 15:45:15 +0200 Subject: [PATCH 4/4] nvidia_linux-4.8_rc2: Support packages without extra version Currently, Using a Linux release without an extra version, a dash is added to the directory name, breaking the script `/sbin/nvidiactl`. Fix it by composing the correct name with the *e* placeholder. Note, this requires at least bee 1.2.11, so that the format placeholder *d* is present in `beeversion`. --- ...5-367.18-1.bee => nvidia_linux-4.8_rc2-95-367.18-2.bee | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) rename nvidia_linux-4.8_rc2-95-367.18-1.bee => nvidia_linux-4.8_rc2-95-367.18-2.bee (91%) diff --git a/nvidia_linux-4.8_rc2-95-367.18-1.bee b/nvidia_linux-4.8_rc2-95-367.18-2.bee similarity index 91% rename from nvidia_linux-4.8_rc2-95-367.18-1.bee rename to nvidia_linux-4.8_rc2-95-367.18-2.bee index 86e39d9db..510e1889d 100755 --- a/nvidia_linux-4.8_rc2-95-367.18-1.bee +++ b/nvidia_linux-4.8_rc2-95-367.18-2.bee @@ -39,12 +39,12 @@ PATCHURL+=('/src/mariux/patches/0003-kernel-Adapt-source-for-Linux-4.8.patch') LINUXPKG=${PKGEXTRANAME}.${ARCH} -LINUXKLOCALVER=$(beeversion --format "%V.mx64.%r" "${LINUXPKG}") +LINUXKLOCALVER=$(beeversion --format "%v%d.mx64.%r" "${LINUXPKG}") # '4.4.mx64.75' to '4.4.0.mx64.75' -# '4.8_rc2.mx64.95' to '4.8.0-rc2.mx64.95' -if [[ $LINUXKLOCALVER =~ ^([0-9]+\.[0-9]+)_?(.*)(\.mx64.*) ]]; then - LINUXKLOCALVER="${BASH_REMATCH[1]}.0-${BASH_REMATCH[2]}${BASH_REMATCH[3]}" +# '4.8-rc2.mx64.95' to '4.8.0-rc2.mx64.95' +if [[ $LINUXKLOCALVER =~ ^([0-9]+\.[0-9]+)(-?.*)(\.mx64.*) ]]; then + LINUXKLOCALVER="${BASH_REMATCH[1]}.0${BASH_REMATCH[2]}${BASH_REMATCH[3]}" fi