From c8ef8f9010f9064a78bcbf5d02b149ae3b8dd5a5 Mon Sep 17 00:00:00 2001 From: Paul Menzel Date: Thu, 11 Jan 2018 13:34:29 +0100 Subject: [PATCH] linux-4.14.13: Build out of tree aacraid module Thomas reports the problem below [1]. > further testing of the stock aacraid-driver yielded some deficits in > the sys-fs representation. Aparently it doesn't link the disk devices > to enclosure slots, a thing that the off-tree microsemi driver does > (and the LSI driver also, so i deem it's 'good-practice' in modern HBA > drivers). Indeed it doesn't affect the functionality, but it hampers > maintenance and client-tools a bit more than just a bit. > Here is the location info of the missing sys-fs parts > short way, where as the `device` part is missing: > ``` > #ls -la /sys/class/enclosure/7:0:80:0/Disk001 > drwxr-xr-x 3 root system 0 Jan 10 13:08 . > drwxr-xr-x 19 root system 0 Jan 10 13:07 .. > -rw-r--r-- 1 root system 4096 Jan 11 12:56 active > lrwxrwxrwx 1 root system 0 Jan 10 13:08 device -> > ../../../../../../../port-7:1/end_device-7:1/target7:0:65/7:0:65:0 > -rw-r--r-- 1 root system 4096 Jan 11 12:56 fault > -rw-r--r-- 1 root system 4096 Jan 11 12:56 locate > drwxr-xr-x 2 root system 0 Jan 11 12:56 power > -rw-r--r-- 1 root system 4096 Jan 11 12:56 power_status > -r--r--r-- 1 root system 4096 Jan 11 12:56 slot > -rw-r--r-- 1 root system 4096 Jan 11 12:56 status > -r--r--r-- 1 root system 4096 Jan 11 12:56 type > -rw-r--r-- 1 root system 4096 Jan 11 12:56 uevent > ``` > The true location would be: > ``` > /sys/devices/pci0000:00/0000:00:03.0/0000:04:00.0/host7/port-7:16/end_device-7:16/target7:0:80/7:0:80:0/enclosure/7:0:80:0/Disk001 > ``` [1] https://github.molgen.mpg.de/mariux64/bee-files/pull/571 --- linux-4.14.13-201.bee | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/linux-4.14.13-201.bee b/linux-4.14.13-201.bee index 15dae82c0..ece2e5e7c 100755 --- a/linux-4.14.13-201.bee +++ b/linux-4.14.13-201.bee @@ -29,6 +29,35 @@ same_revision_files=$(ls ${BEE_PKGDIR}/linux-[0-9].[0-9]*-${PKGREVISION}.x86_64. && echo "A kernel with revision ${PKGREVISION} has already been build: $same_revision_files" \ && exit +# aacraid +# https://storage.microsemi.com/en-us/downloads/linux_source/linux_source_code/productid=aha-1000-8e&dn=microsemi+adaptec+hba+1000-8e.php +# http://download.adaptec.com/raid/aac/linux/aacraid-linux-src-1.2.1-55022.tgz +# http://twiki.molgen.mpg.de/foswiki/Medv/SoftwareRaid +# CONFIG_SCSI_AACRAID=m +# +build_aacraid_driver_update_and_do_depmod() { + local DRIVERBUILD=55022 + + pushd . + + echo "aacraid driver" + + mkdir -pv ${B}/aacraid_update + cd ${B}/aacraid_update + tar -xf /src/mariux/beeroot/downloads/aacraid_source_1.2.1-${DRIVERBUILD}.tgz + cd aacraid-1.2.1-${DRIVERBUILD} + chmod -x * + make -C ${B} M=${B}/aacraid_update/aacraid-1.2.1-${DRIVERBUILD} modules + + mkdir -pv ${D}/lib/modules/${FULLKERNELVERSION}/updates/drivers/scsi/aacraid + cp -v aacraid.ko ${D}/lib/modules/${FULLKERNELVERSION}/updates/drivers/scsi/aacraid + + cd ${D}/lib/modules/${FULLKERNELVERSION} + depmod -a -b ${D} ${FULLKERNELVERSION} + + popd +} + plaininstall_for_modules() { local dir=$1 local tar=$2 @@ -856,6 +885,7 @@ mee_install() { make install INSTALL_PATH=${D}/boot # 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}