From 221560666d3d7c06687585c554e3ce87ad63659a Mon Sep 17 00:00:00 2001 From: Paul Menzel Date: Thu, 26 Jan 2017 11:51:35 +0100 Subject: [PATCH 1/3] linux: Add stable version 4.9.6 Do as Greg says [1][2][3][4]: > All users of the 4.9 kernel series must upgrade. Changes for Linux 4.9.3 [5][6]: > ### Lots of XFS improvements, numerous updated drivers ### > > As the headline suggests, a big part of the Linux kernel 4.9.3 patch are > various improvements for the XFS file system, but as expected, the > biggest part is represented by updated drivers, this time for USB, > wireless (ath10k, rtlwifi), IOMMU, iiO, hwmon, Intel i915, CLK, and a > little bit of MMC, PINCTRL, PCI, SCSI, and IRQ Chip. Architecture > changes are also present, for ARM, ARM64/AArch64, MIPS, x86, CRIS, s390, > and PA-RISC. > > Besides the usual mm and core kernel noise, the Linux 4.9.3 kernel also > updates the sound and networking stacks with mac80211, wireless > (nl80211), Intel Skylake, Intel HDA, and Samsung I2S changes. It's a > really big one, the biggest so far since the release of Linux kernel 4.9 > on December 11, 2016, and if you've already managed to migrate your > systems to this new stable branch, we recommend upgrading immediately. > > The Linux kernel 4.9.3 source archive is available for download right > now from kernel.org or via our web portal if you fancy compiling your > own kernel, and it should soon land in the stable software repositories > of your favorite GNU/Linux distribution. We urge OS vendors to update to > Linux 4.9 as soon as possible, especially if they're still using Linux > 4.8, which reached end of life last week. Changes for Linux 4.9.4 [7][8]: > "Networking improvements all over, some ARM and ARM64 changes" > > From the appended shortlog, we can notice that the major changes in the > Linux 4.9.4 patch are mostly networking improvements, both for the > drivers stack, which received better support for Realtek Wi-Fi cards and > Mellanox (mlx5) Ethernet adapters, and the networking stack, bringing > various fixes to the IPv4, IPv6, SCTP, and SunRPC protocols, as well as > the Distributed Switch Architecture (DSA) subsystem. > > Numerous ARM and ARM64/AArch64 changes are also present in the Linux > 4.9.4 kernel, along with small bug fixes to the PowerPC (PPC) and x86 > hardware architectures. Other than that, there's a quirk for the > Plantronics BT600 high-fidelity Bluetooth USB adapter, and some minor > fixes to the Intel i915 graphics driver. The Linux kernel 4.9.4 source > archive is now available for download from kernel.org. > > If you're using a GNU/Linux distribution powered by a kernel from the > Linux 4.9 series, we urge you to update to Linux 4.9.4 as soon as > possible, or as soon as the new version lands in the stable software > repositories of the operating system you're currently using as daily > driver. On this occasion, we're also urging OS vendors to move to the > Linux 4.9 kernel series are soon as possible, especially if they're > using Linux 4.8, which reached end of life last week. Changes for Linux 4.9.5 [9][10]: > ### Radeon SMC firmware selection updated for Southern Islands family ### > > From the appended shortlog, we can notice that the biggest part of the > Linux kernel 4.9.5 patch includes updated drivers. This time, the > developers managed to improve the support for open-source Radeon, Intel > i915, Tegra, and VC4 graphics drivers, but there are also updated I2C, > CPUFreq, ACPI, DMA, InfiniBand, Ethernet (Mellanox MLX5), wireless > (Intersil), NVM Express (NVMe), PINCTRL, USB, TTY, and remoteproc > drivers. > > Other than that, Linux kernel 4.9.5 includes various PowerPC (PPC), x86 > (KVM changes mostly), ARM64/AArch64, Btrfs, NFS, OCFS2, and XFS > improvements, along with the usual mm and core kernel noise, tooling > fixes, and an updated networking stack with a fix for the new 802.11 > netlink interface public header. If you're using the Linux 4.9 kernel > series on your GNU/Linux distribution, we recommend updating as soon as > possible to version 4.9.5, which you can download right now from our > website. Changes for Linux 4.9.6 [11]: The release contains a few WLAN, PCI, and x86 fixes. [1] https://lwn.net/Articles/711469/ "Linux 4.9.3 " [2] https://lkml.org/lkml/2017/1/15/68 "Linux 4.9.4" [3] https://lkml.org/lkml/2017/1/20/161 "Linux 4.9.5" [4] https://lkml.org/lkml/2017/1/26/35 "Linux 4.9.6" [5] http://news.softpedia.com/news/linux-kernel-4-9-3-rolls-out-with-over-200-changes-lots-of-xfs-improvements-511789.shtml [6] https://cdn.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.9.3 [7] http://news.softpedia.com/news/linux-kernel-4-9-4-released-with-various-arm-arm64-and-networking-improvements-511855.shtml [8] https://cdn.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.9.4 [10] https://cdn.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.9.5 [11] https://cdn.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.9.6 --- linux-4.9.6-135.bee | 79 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100755 linux-4.9.6-135.bee diff --git a/linux-4.9.6-135.bee b/linux-4.9.6-135.bee new file mode 100755 index 000000000..fc68c0aaa --- /dev/null +++ b/linux-4.9.6-135.bee @@ -0,0 +1,79 @@ +#!/bin/env beesh + +# note: CONFIG=/boot/config-WHATEVER BEE_MAKEFLAGS='-j 40' ./linux-xxx.bee + +KERNELVERSION=${PKGVERSION} +if [ -z "${PKGVERSION[3]}" ] ; then + KERNELVERSION=${KERNELVERSION}.0 +fi + +# append extra version to get for example 4.8.0-rc4 +KERNELVERSION=${KERNELVERSION}${PKGEXTRAVERSION_DASH} + +echo $KERNELVERSION + +SRCURL[0]="https://cdn.kernel.org/pub/linux/kernel/v${PKGVERSION[1]}.x/linux-${PKGVERSION}${PKGEXTRAVERSION_DASH}.tar.xz" + +# EXCLUDE="" + +#CONFIG= + +KERNELLOCAL=".mx64.${PKGREVISION}" +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 12c8aa7b5a745332cc67cfc7bc241bc0eb9ee5ea Mon Sep 17 00:00:00 2001 From: Paul Menzel Date: Thu, 26 Jan 2017 12:17:04 +0100 Subject: [PATCH 2/3] nvidia_linux: Build 340.98 for Linux 4.9.6 --- nvidia_linux-4.9.6-135-340.98-0.bee | 91 +++++++++++++++++++++++++++++ 1 file changed, 91 insertions(+) create mode 100755 nvidia_linux-4.9.6-135-340.98-0.bee diff --git a/nvidia_linux-4.9.6-135-340.98-0.bee b/nvidia_linux-4.9.6-135-340.98-0.bee new file mode 100755 index 000000000..4b3587014 --- /dev/null +++ b/nvidia_linux-4.9.6-135-340.98-0.bee @@ -0,0 +1,91 @@ +#!/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-kernel-Adapt-340.98-source-for-Linux-4.9.patch') +PATCHURL+=('/src/mariux/patches/nvidia_340.98_runtimefix_for_kernel_4.9.patch') + +LINUXPKG=${PKGEXTRANAME}.${ARCH} + +LINUXKLOCALVER=$(beeversion --format "%v%-e.mx64.%r" "${LINUXPKG}") + +# '4.4.mx64.75' to '4.4.0.mx64.75' +# '4.8.6.mx64.115' to '4.8.6.mx64.115' +# '4.8-rc2.mx64.95' to '4.8.0-rc2.mx64.95' +if [[ $LINUXKLOCALVER =~ ^([0-9]+\.[0-9]+)(-rc[0-9]{1,2})?(\.mx64.*) ]]; then + LINUXKLOCALVER="${BASH_REMATCH[1]}.0${BASH_REMATCH[2]}${BASH_REMATCH[3]}" +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 5eb598ca64576590af58a29c7bfee0e0112d9609 Mon Sep 17 00:00:00 2001 From: Paul Menzel Date: Thu, 26 Jan 2017 12:17:44 +0100 Subject: [PATCH 3/3] nvidia_linux: Build 367.57 for Linux 4.9.6 --- nvidia_linux-4.9.6-135-367.57-0.bee | 90 +++++++++++++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100755 nvidia_linux-4.9.6-135-367.57-0.bee diff --git a/nvidia_linux-4.9.6-135-367.57-0.bee b/nvidia_linux-4.9.6-135-367.57-0.bee new file mode 100755 index 000000000..9fe567d6b --- /dev/null +++ b/nvidia_linux-4.9.6-135-367.57-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-kernel-Adapt-source-for-Linux-4.9.patch') + +LINUXPKG=${PKGEXTRANAME}.${ARCH} + +LINUXKLOCALVER=$(beeversion --format "%v%-e.mx64.%r" "${LINUXPKG}") + +# '4.4.mx64.75' to '4.4.0.mx64.75' +# '4.8.6.mx64.115' to '4.8.6.mx64.115' +# '4.8-rc2.mx64.95' to '4.8.0-rc2.mx64.95' +if [[ $LINUXKLOCALVER =~ ^([0-9]+\.[0-9]+)(-rc[0-9]{1,2})?(\.mx64.*) ]]; then + LINUXKLOCALVER="${BASH_REMATCH[1]}.0${BASH_REMATCH[2]}${BASH_REMATCH[3]}" +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} +}