From owner-svn-ports-head@freebsd.org Thu Sep 24 10:29:00 2015 Return-Path: Delivered-To: svn-ports-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A1C76A07B3E; Thu, 24 Sep 2015 10:29:00 +0000 (UTC) (envelope-from pi@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 922FD1083; Thu, 24 Sep 2015 10:29:00 +0000 (UTC) (envelope-from pi@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8OAT03i071571; Thu, 24 Sep 2015 10:29:00 GMT (envelope-from pi@FreeBSD.org) Received: (from pi@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8OASwdg071561; Thu, 24 Sep 2015 10:28:58 GMT (envelope-from pi@FreeBSD.org) Message-Id: <201509241028.t8OASwdg071561@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pi set sender to pi@FreeBSD.org using -f From: Kurt Jaeger Date: Thu, 24 Sep 2015 10:28:58 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r397686 - in head/net: . isboot-kmod isboot-kmod/files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Sep 2015 10:29:00 -0000 Author: pi Date: Thu Sep 24 10:28:58 2015 New Revision: 397686 URL: https://svnweb.freebsd.org/changeset/ports/397686 Log: New port: net/isboot-kmod This installs Daisuke Aoyama's isboot kernel module, which allows booting FreeBSD directly from an iSCSI root disk. If your BIOS supports iSCSI you may configure your target settings in the BIOS and boot directly. If not, you may PXE boot using software that contains iSCSI support such as iPXE. The module reads the iSCSI Boot Firmware Table (IBFT) to configure the network and re-attach the volume once the kernel begins execution. WWW: http://shell.peach.ne.jp/aoyama/archives/2115 (Japanese) PR: 203294 Submitted by: John Nielsen Added: head/net/isboot-kmod/ head/net/isboot-kmod/Makefile (contents, props changed) head/net/isboot-kmod/distinfo (contents, props changed) head/net/isboot-kmod/files/ head/net/isboot-kmod/files/patch-iscsi.c (contents, props changed) head/net/isboot-kmod/files/pkg-message.in (contents, props changed) head/net/isboot-kmod/pkg-descr (contents, props changed) Modified: head/net/Makefile Modified: head/net/Makefile ============================================================================== --- head/net/Makefile Thu Sep 24 09:48:17 2015 (r397685) +++ head/net/Makefile Thu Sep 24 10:28:58 2015 (r397686) @@ -248,6 +248,7 @@ SUBDIR += ipsumdump SUBDIR += ipsvd SUBDIR += irrd + SUBDIR += isboot-kmod SUBDIR += isc-dhcp41-client SUBDIR += isc-dhcp41-relay SUBDIR += isc-dhcp41-server Added: head/net/isboot-kmod/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net/isboot-kmod/Makefile Thu Sep 24 10:28:58 2015 (r397686) @@ -0,0 +1,28 @@ +# $FreeBSD$ + +PORTNAME= isboot-kmod +PORTVERSION= 0.2.10 +CATEGORIES= net +MASTER_SITES= http://www.peach.ne.jp/archives/isboot/ +DISTNAME= isboot-${PORTVERSION} + +MAINTAINER= john@jnielsen.net +COMMENT= Kernel module enabling iSCSI boot + +LICENSE= BSD2CLAUSE + +USES= kmod uidfix +SUB_FILES= pkg-message +WRKSRC_SUBDIR= src +PLIST_FILES= ${KMODDIR}/isboot.ko +PORTDOCS= README + +OPTIONS_DEFINE= DOCS VIMAGE +VIMAGE_DESC= Build for a kernel with 'options VIMAGE' +VIMAGE_CFLAGS= -DVIMAGE + +post-install-DOCS-on: + ${MKDIR} ${STAGEDIR}${DOCSDIR} + cd ${WRKDIR}/${DISTNAME} && ${INSTALL_MAN} ${PORTDOCS} ${STAGEDIR}${DOCSDIR} + +.include Added: head/net/isboot-kmod/distinfo ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net/isboot-kmod/distinfo Thu Sep 24 10:28:58 2015 (r397686) @@ -0,0 +1,2 @@ +SHA256 (isboot-0.2.10.tar.gz) = b801708256f789e1032f7be2db79f886919fddb7b9b26ec1835f68a8237c3b48 +SIZE (isboot-0.2.10.tar.gz) = 30268 Added: head/net/isboot-kmod/files/patch-iscsi.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net/isboot-kmod/files/patch-iscsi.c Thu Sep 24 10:28:58 2015 (r397686) @@ -0,0 +1,56 @@ +--- iscsi.c.orig 2015-09-23 05:51:43 UTC ++++ iscsi.c +@@ -1036,24 +1036,30 @@ isboot_append_param(pdu_t *pp, char *for + return (n); + } + +-#if __FreeBSD_version >= 1000050 ++#if __FreeBSD_version < 1000050 ++static void ++isboot_free_mbufext(void *p, void *optarg) ++#endif ++#if __FreeBSD_version >= 1000050 && __FreeBSD_version < 1100000 ++#define EXT_FREE_OK 0 + static int + isboot_free_mbufext(struct mbuf *m, void *p, void *optarg) +-#else ++#endif ++#if __FreeBSD_version >= 1100000 + static void +-isboot_free_mbufext(void *p, void *optarg) ++isboot_free_mbufext(struct mbuf *m, void *p, void *optarg) + #endif + { + + ISBOOT_TRACE("isboot_free_mbufext\n"); + if (p == NULL) +-#if __FreeBSD_version >= 1000050 ++#if __FreeBSD_version >= 1000050 && __FreeBSD_version < 1100000 + return (EXT_FREE_OK); + #else + return; + #endif + isboot_free_mext(p); +-#if __FreeBSD_version >= 1000050 ++#if __FreeBSD_version >= 1000050 && __FreeBSD_version < 1100000 + return (EXT_FREE_OK); + #endif + } +@@ -1072,7 +1078,7 @@ isboot_xmit_pdu(struct isboot_sess *sess + + sizeof(pp->hdr_dig) > MHLEN) { + panic("AHS=%d is too large", pp->ahs_len); + } +- MGETHDR(mh, M_TRYWAIT, MT_DATA); ++ MGETHDR(mh, M_WAITOK, MT_DATA); + mh->m_pkthdr.rcvif = NULL; + memcpy(mh->m_data, &pp->ipdu, ISCSI_BHS_LEN); + mh->m_len = ISCSI_BHS_LEN; +@@ -1099,7 +1105,7 @@ isboot_xmit_pdu(struct isboot_sess *sess + /* allocate external buffer and add it to mbuf */ + ds_dd = isboot_malloc_mext(ISCSI_ALIGN(pp->ds_len) + + sizeof(pp->ds_dig)); +- MGET(md, M_TRYWAIT, MT_DATA); ++ MGET(md, M_WAITOK, MT_DATA); + #if __FreeBSD_version >= 800016 + MEXTADD(md, (caddr_t)ds_dd, (ISCSI_ALIGN(pp->ds_len) + + sizeof(pp->ds_dig)), Added: head/net/isboot-kmod/files/pkg-message.in ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net/isboot-kmod/files/pkg-message.in Thu Sep 24 10:28:58 2015 (r397686) @@ -0,0 +1,5 @@ +Remember to have the module loaded at boot by adding the following to +/boot/loader.conf: + isboot_load="YES" + +See %%DOCSDIR%%/README for additional information. Added: head/net/isboot-kmod/pkg-descr ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net/isboot-kmod/pkg-descr Thu Sep 24 10:28:58 2015 (r397686) @@ -0,0 +1,9 @@ +This installs Daisuke Aoyama's isboot kernel module, which allows +booting FreeBSD directly from an iSCSI root disk. If your BIOS +supports iSCSI you may configure your target settings in the BIOS +and boot directly. If not, you may PXE boot using software that +contains iSCSI support such as iPXE. The module reads the iSCSI +Boot Firmware Table (IBFT) to configure the network and re-attach +the volume once the kernel begins execution. + +WWW: http://shell.peach.ne.jp/aoyama/archives/2115 (Japanese)