From 2a2f1ad851f655a1ca7c681d8c23f922b8ee3aa3 Mon Sep 17 00:00:00 2001 From: Donald Buczek Date: Thu, 14 Dec 2017 14:38:09 +0100 Subject: [PATCH] linux-4.9.68: Add spl/zfs modules Add kernel modules required for the ZFS filesystem. http://zfsonlinux.org/ Patch by Thomas Kreitler --- linux-4.9.68-193.bee | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/linux-4.9.68-193.bee b/linux-4.9.68-193.bee index 3d9091717..50f5be668 100755 --- a/linux-4.9.68-193.bee +++ b/linux-4.9.68-193.bee @@ -58,6 +58,49 @@ build_aacraid_driver_update_and_do_depmod() { popd } +plaininstall_for_modules() { + local dir=$1 + local tar=$2 + local url=$3 + local xflags=$4 + ( + test -e $tar || wget $url + test -d $dir || tar xvf $tar + cd $dir + ./configure \ + --prefix=/usr \ + --with-linux=${S} \ + --with-linux-obj=${B} \ + $xflags + cd module + # depmod call fails when build as user, and would eventually mess up system dirs when run as root + sed -i -e 's/depmod/echo skipping depmod/' Makefile + make ${BEE_MAKEFLAGS} + make modules_install INSTALL_MOD_PATH=${D} + ) +} + +build_spl_zfs_extra_modules_and_do_depmod() { + pushd . + + echo "spl/zfs" + + mkdir -pv ${B}/spl_zfs_extra + cd ${B}/spl_zfs_extra + + plaininstall_for_modules spl-0.7.3 spl-0.7.3.tar.gz \ + https://github.com/zfsonlinux/zfs/releases/download/zfs-0.7.3/spl-0.7.3.tar.gz + + plaininstall_for_modules zfs-0.7.3 zfs-0.7.3.tar.gz \ + https://github.com/zfsonlinux/zfs/releases/download/zfs-0.7.3/zfs-0.7.3.tar.gz \ + "--with-spl=${B}/spl_zfs_extra/spl-0.7.3" + + cd ${D}/lib/modules/${FULLKERNELVERSION} + depmod -a -b ${D} ${FULLKERNELVERSION} + + popd +} + mee_patch() { echo "PATCH $@" bee_patch $@ @@ -851,6 +894,7 @@ mee_install() { # make firmware_install INSTALL_MOD_PATH=${D} build_aacraid_driver_update_and_do_depmod + build_spl_zfs_extra_modules_and_do_depmod rm -v ${D}/lib/modules/${FULLKERNELVERSION}/{source,build}