From 39da6e92bce4dfa67f285fa03cbb7958460e24ea 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 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 6a2db6043..d8e6e768b 100755 --- a/linux-4.9.68-193.bee +++ b/linux-4.9.68-193.bee @@ -57,6 +57,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 $@ @@ -852,6 +895,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}