From e88366a34e14c03ac7413441c73d7464e29a6ff9 Mon Sep 17 00:00:00 2001 From: Paul Menzel Date: Thu, 30 Mar 2017 15:03:31 +0200 Subject: [PATCH 1/3] linux: Add stable version 4.9.18 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Select *ChaosKey random number generator driver support*. > Say Y here if you want to connect an AltusMetrum ChaosKey or > Araneus Alea I to your computer's USB port. These devices > are hardware random number generators which hook into the > kernel entropy pool to ensure a large supply of entropy for > /dev/random and /dev/urandom and also provides direct access > via /dev/chaoskeyX > > To compile this driver as a module, choose M here: the > module will be called chaoskey. ``` $ diff -u /boot/config-4.9.17.mx64.145 /boot/config-4.9.18.mx64.146 --- /boot/config-4.9.17.mx64.145 2017-03-24 17:02:42.000000000 +0100 +++ /boot/config-4.9.18.mx64.146 2017-03-30 15:35:52.000000000 +0200 […] @@ -2276,7 +2276,11 @@ # CONFIG_IPMI_SSIF is not set CONFIG_IPMI_WATCHDOG=y CONFIG_IPMI_POWEROFF=y -# CONFIG_HW_RANDOM is not set +CONFIG_HW_RANDOM=m +# CONFIG_HW_RANDOM_TIMERIOMEM is not set +CONFIG_HW_RANDOM_INTEL=m +CONFIG_HW_RANDOM_AMD=m +CONFIG_HW_RANDOM_VIA=m # CONFIG_NVRAM is not set # CONFIG_R3964 is not set # CONFIG_APPLICOM is not set @@ -3347,6 +3351,7 @@ # CONFIG_USB_HSIC_USB3503 is not set # CONFIG_USB_HSIC_USB4604 is not set # CONFIG_USB_LINK_LAYER_TEST is not set +CONFIG_USB_CHAOSKEY=m # CONFIG_UCSI is not set # ``` Changes for Linux 4.9.18 [1][2][3]: > Greg Kroah-Hartman announced today the general availability of new > maintenance updates for the long-term supported Linux 4.4 and 4.9 > kernel series, as well as the latest Linux 4.10 kernel. > > Linux 4.10.6, 4.9.18 LTS, and 4.4.57 LTS are now the most advanced > builds of the stable kernel branches mentioned above, and they're here > only five days after the release of their previous maintenance > updates, namely Linux kernel 4.10.5, Linux kernel 4.9.17 LTS, and > Linux kernel 4.4.56 LTS. > > These are small patches changing 31 files (with 188 insertions and 114 > deletions) for Linux kernel 4.10.6, 28 files (with 169 insertions and > 116 deletions) for Linux kernel 4.9.18 LTS, and 38 files (with 192 > insertions and 179 deletions) for Linux kernel 4.4.57 LTS. > > "I'm announcing the release of the 4.10.6 [4.9.18 and 4.4.57] kernel. > All users of the 4.10 [4.9 and 4.4] kernel series must upgrade. The > updated git trees can be found at: > git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git > linux-4.10.y, > git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git > linux-4.9.y, and > git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git > linux-4.4.y," said Greg Kroah-Hartman. > > ### Coming soon to a GNU/Linux distro near you ### > > According to the appended shortlogs of each of the three kernel > updates released today, most of the changes are updated drivers for > things like SCSI, ISDN, CPUfreq, GPU (AMDGPU), HV, ACPI, PINCTRL, USB, > and MD. The PA-RISC, PowerPC (PPC), s390, and x86 architectures also > received a few improvements, along with the EXT4, GFS2, and NFS > filesystems. > > As expected, the usual core kernel and mm changes are also present in > all of them. If you're using a GNU/Linux distribution powered by a > kernel from the long-term supported Linux 4.4 or 4.9 kernel series, or > the more advanced Linux 4.10 branch, you are urged to update to > versions 4.10.6, 4.9.18 and 4.4.57 as soon as possible. > > OS vendors can download the Linux kernel 4.9.18 LTS and 4.4.57 LTS, as > well as the Linux kernel 4.10.6 source tarballs right now from > kernel.org or via our website, and they can browse the updated git > tree at the normal git web browser > http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary. [1] https://lkml.org/lkml/2017/3/27/295 [2] http://news.softpedia.com/news/linux-kernels-4-10-6-4-9-18-lts-and-4-4-57-lts-released-with-updated-drivers-514312.shtml [3] https://cdn.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.9.18 --- linux-4.9.18-146.bee | 79 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100755 linux-4.9.18-146.bee diff --git a/linux-4.9.18-146.bee b/linux-4.9.18-146.bee new file mode 100755 index 000000000..fc68c0aaa --- /dev/null +++ b/linux-4.9.18-146.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 aa669d6887c0b773ad7be7a058d902236b914a74 Mon Sep 17 00:00:00 2001 From: Paul Menzel Date: Thu, 30 Mar 2017 15:13:38 +0200 Subject: [PATCH 2/3] nvidia_linux: Build 340.102 for Linux 4.9.18 --- nvidia_linux-4.9.18-146-340.102-0.bee | 90 +++++++++++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100755 nvidia_linux-4.9.18-146-340.102-0.bee diff --git a/nvidia_linux-4.9.18-146-340.102-0.bee b/nvidia_linux-4.9.18-146-340.102-0.bee new file mode 100755 index 000000000..2fe37caa3 --- /dev/null +++ b/nvidia_linux-4.9.18-146-340.102-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/nvidia_340_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 c4a6638fad03e949669f4ba0dd3f5bbf73520e79 Mon Sep 17 00:00:00 2001 From: Paul Menzel Date: Thu, 30 Mar 2017 15:14:49 +0200 Subject: [PATCH 3/3] nvidia_linux: Build 375.39 for Linux 4.9.18 --- nvidia_linux-4.9.18-146-375.39-0.bee | 87 ++++++++++++++++++++++++++++ 1 file changed, 87 insertions(+) create mode 100755 nvidia_linux-4.9.18-146-375.39-0.bee diff --git a/nvidia_linux-4.9.18-146-375.39-0.bee b/nvidia_linux-4.9.18-146-375.39-0.bee new file mode 100755 index 000000000..955b9ebe2 --- /dev/null +++ b/nvidia_linux-4.9.18-146-375.39-0.bee @@ -0,0 +1,87 @@ +#!/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}" + +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} +}