diff --git a/sysutils/twa-kmod/Makefile b/sysutils/twa-kmod/Makefile new file mode 100644 index 000000000000..361e15647562 --- /dev/null +++ b/sysutils/twa-kmod/Makefile @@ -0,0 +1,33 @@ +PORTNAME= twa-kmod +PORTVERSION= 20230821 +CATEGORIES= sysutils + +MAINTAINER= dinoex@FreeBSD.org +COMMENT= 3ware 9000/9500/9550/9650 series SATA RAID controllers driver +WWW= https://github.com/dinoex/twa-kmod/ + +LICENSE= BSD2CLAUSE + +ONLY_FOR_ARCHS= amd64 +ONLY_FOR_ARCHS_REASON= not yet tested on non amd64 +#IGNORE_FreeBSD_13= included in base system +IGNORE_FreeBSD_15= not supported on FreeBSD 15.x + +USES= kmod uidfix +USE_GITHUB= yes +GH_ACCOUNT= dinoex +PATCH_WRKSRC= ${WRKSRC}/sys/dev/twa +WRKROOT= ${WRKDIR}/${PORTNAME}-${PKGVERSION} +BUILD_WRKSRC= ${WRKSRC}/sys/modules/twa +INSTALL_WRKSRC= ${BUILD_WRKSRC} +MAKE_ENV+= SRCTOP=${WRKSRC} +CFLAGS+= -Wno-error=unused-but-set-variable +CFLAGS+= -Wno-error=implicit-int +CFLAGS+= -I${WRKSRC}/sys +PLIST_FILES= ${KMODDIR}/twa.ko \ + share/man/man4/twa.4.gz + +post-install: + ${INSTALL_MAN} ${WRKSRC}/share/man/man4/twa.4 ${STAGEDIR}${PREFIX}/share/man/man4/ + +.include diff --git a/sysutils/twa-kmod/distinfo b/sysutils/twa-kmod/distinfo new file mode 100644 index 000000000000..fa140c3a7478 --- /dev/null +++ b/sysutils/twa-kmod/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1712228053 +SHA256 (dinoex-twa-kmod-20230821_GH0.tar.gz) = 2fceb2bc71e62b6fcad1a2da2a723f51ad67ea815541d463bd72400c3ffe133b +SIZE (dinoex-twa-kmod-20230821_GH0.tar.gz) = 56738 diff --git a/sysutils/twa-kmod/files/patch-tw_osl_freebsd.c b/sysutils/twa-kmod/files/patch-tw_osl_freebsd.c new file mode 100644 index 000000000000..28250caaeab9 --- /dev/null +++ b/sysutils/twa-kmod/files/patch-tw_osl_freebsd.c @@ -0,0 +1,21 @@ +--- tw_osl_freebsd.c.orig 2024-04-04 10:43:09 UTC ++++ tw_osl_freebsd.c +@@ -67,8 +67,8 @@ static struct cdevsw twa_cdevsw = { + .d_name = "twa", + }; + +-static devclass_t twa_devclass; + ++ + /* + * Function name: twa_open + * Description: Called when the controller is opened. +@@ -194,7 +194,7 @@ static driver_t twa_pci_driver = { + sizeof(struct twa_softc) + }; + +-DRIVER_MODULE(twa, pci, twa_pci_driver, twa_devclass, 0, 0); ++DRIVER_MODULE(twa, pci, twa_pci_driver, 0, 0); + MODULE_DEPEND(twa, cam, 1, 1, 1); + MODULE_DEPEND(twa, pci, 1, 1, 1); + diff --git a/sysutils/twa-kmod/pkg-descr b/sysutils/twa-kmod/pkg-descr new file mode 100644 index 000000000000..b426f3c2db5a --- /dev/null +++ b/sysutils/twa-kmod/pkg-descr @@ -0,0 +1,2 @@ +The twa driver provides support for AMCC's 3ware 9000/9500/9550/9650 +series SATA RAID controllers for FreeBSD-14