Commit e903e7a9 authored by David Johnson's avatar David Johnson

Add e1000e and igb drivers.

(updated e1000e is needed, for instance, for nuc i3s with the new i219-v chip.)
parent 9a8f8fb0
NAME = e1000e
PKGNAME = $(NAME)-dkms
VERSION ?= 3.4.2.3
PKGVERSION ?= $(VERSION)-0
BUILDDIR = build
SOURCEDIR = $(BUILDDIR)/$(NAME)-$(VERSION)
FILENAME = $(NAME)-$(VERSION).tar.gz
TARBALLDIR = ../../tarballs
TARBALL = $(TARBALLDIR)/$(FILENAME)
FETCH = ../../scripts/fetch.sh
DEBPKGDIR = ..
DEBPKGNAME = $(PKGNAME)_$(PKGVERSION)_all.deb
DEBPKGPATH = $(DEBPKGDIR)/$(DEBPKGNAME)
RPMPKGPATH = $(BUILDDIR)/RPMS/noarch/$(PKGNAME)-$(PKGVERSION).noarch.rpm
all:
clean: deb-clean rpm-clean
$(TARBALL):
$(FETCH) $(TARBALLDIR) $(FILENAME)
$(SOURCEDIR): $(TARBALL)
if [ -d $(SOURCEDIR) ]; then rm -rf $(SOURCEDIR); fi
mkdir -p $(BUILDDIR)
tar -xzf $(TARBALL) -C $(BUILDDIR)
touch $(SOURCEDIR)
$(DEBPKGPATH): | $(SOURCEDIR)
dpkg-buildpackage -us -uc
deb: $(DEBPKGPATH)
deb-install: deb
dpkg -i $(DEBPKGPATH)
deb-clean:
rm -rf $(SOURCEDIR) $(DEBPKGPATH) $(DEBPKGDIR)/$(PKGNAME)_*
$(BUILDDIR)/SOURCES/$(FILENAME): $(TARBALL)
mkdir -p $(BUILDDIR)/SOURCES
cp -p $(TARBALL) $(BUILDDIR)/SOURCES/$(FILENAME)
cp -p dkms.conf $(BUILDDIR)/SOURCES
$(RPMPKGPATH): rpm/$(PKGNAME).spec $(BUILDDIR)/SOURCES/$(FILENAME)
mkdir -p $(BUILDDIR)/{BUILD,RPMS/noarch}
rpmbuild --define "_topdir "$(shell readlink -f $(BUILDDIR)) -ba rpm/$(PKGNAME).spec
rpm: $(RPMPKGPATH)
rpm-clean:
rm -rf $(RPMPKGPATH) $(BUILDDIR)/{BUILD,BUILDROOT,RPMS,SOURCES,SPECS,SRPMS}
rpm-install: rpm
rpm -iv $(RPMPKGPATH)
.PHONY: all clean deb deb-install deb-clean
e1000e-dkms (3.4.2.3-0) unstable; urgency=medium
* e1000e 3.4.2.3 DKMS package.
-- David M. Johnson <johnsond@flux.utah.edu> Mon, 04 Feb 2019 07:41:11 -0600
Source: e1000e-dkms
Maintainer: Testbed Operations <testbed-ops@flux.utah.edu>
Build-Depends: debhelper (>= 9), dkms
Package: e1000e-dkms
Architecture: all
Depends: ${misc:Depends}
Description: DKMS source for the e1000e driver
#!/usr/bin/make -f
include /usr/share/dpkg/pkg-info.mk
MODNAME = e1000e
%:
dh $@ --with dkms
override_dh_install:
echo 'obj-y += src/' > build/$(MODNAME)-$(DEB_VERSION_UPSTREAM)/Makefile
dh_install \
build/$(MODNAME)-$(DEB_VERSION_UPSTREAM)/* \
usr/src/$(MODNAME)-dkms-$(DEB_VERSION_UPSTREAM)
override_dh_dkms:
dh_dkms -V $(DEB_VERSION_UPSTREAM) -- dkms.conf
override_dh_auto_configure:
override_dh_auto_build:
override_dh_auto_test:
override_dh_auto_install:
override_dh_auto_clean:
PACKAGE_NAME="e1000e-dkms"
PACKAGE_VERSION="#MODULE_VERSION#"
BUILT_MODULE_LOCATION=src/
BUILT_MODULE_NAME[0]="e1000e"
DEST_MODULE_LOCATION[0]="/updates/dkms"
AUTOINSTALL="YES"
REMAKE_INITRD="YES"
%define module e1000e
%define name %{module}-dkms
%define version 3.4.2.3
%define release 0
%define srcdirname %{module}-%{version}
Source: http://www.emulab.net/downloads/linux-dkms/%{module}-%{version}.tar.gz
Summary: DKMS version of the e1000e kernel module
Name: %{name}
Version: %{version}
License: GPLv2
Release: 0
BuildArch: noarch
Requires: dkms gcc kernel-devel
%description
DKMS version of the e1000e kernel module.
%prep
%setup -n %{srcdirname}
%install
rm -rf %{buildroot}
mkdir -p %{buildroot}/usr/src/%{module}-%{version}/
cp -pR %{_builddir}/%{srcdirname}/* %{buildroot}/usr/src/%{module}-%{version}/
echo 'obj-y += src/' > %{buildroot}/usr/src/%{module}-%{version}/Makefile
cp -p %{_sourcedir}/dkms.conf %{buildroot}/usr/src/%{module}-%{version}/
%clean
rm -rf %{buildroot}
%files
%defattr(0644,root,root)
%attr(0755,root,root) /usr/src/%{module}-%{version}/
%post
occurrences=`/usr/sbin/dkms status | grep "%{module}" | grep "%{version}" | wc -l`
if [ $occurrences -eq 0 ]; then
/usr/sbin/dkms add -m %{module} -v %{version}
fi
/usr/sbin/dkms build -m %{module} -v %{version}
/usr/sbin/dkms install -m %{module} -v %{version}
exit 0
%preun
/usr/sbin/dkms remove -m %{module} -v %{version} --all
exit 0
%changelog
* Mon Feb 04 2019 David M. Johnson <johnsond@flux.utah.edu> 3.4.2.3-0
- Initial release of DKMS version of the e1000e kernel module.
NAME = igb
PKGNAME = $(NAME)-dkms
VERSION ?= 5.3.5.22
PKGVERSION ?= $(VERSION)-0
BUILDDIR = build
SOURCEDIR = $(BUILDDIR)/$(NAME)-$(VERSION)
FILENAME = $(NAME)-$(VERSION).tar.gz
TARBALLDIR = ../../tarballs
TARBALL = $(TARBALLDIR)/$(FILENAME)
FETCH = ../../scripts/fetch.sh
DEBPKGDIR = ..
DEBPKGNAME = $(PKGNAME)_$(PKGVERSION)_all.deb
DEBPKGPATH = $(DEBPKGDIR)/$(DEBPKGNAME)
RPMPKGPATH = $(BUILDDIR)/RPMS/noarch/$(PKGNAME)-$(PKGVERSION).noarch.rpm
all:
clean: deb-clean rpm-clean
$(TARBALL):
$(FETCH) $(TARBALLDIR) $(FILENAME)
$(SOURCEDIR): $(TARBALL)
if [ -d $(SOURCEDIR) ]; then rm -rf $(SOURCEDIR); fi
mkdir -p $(BUILDDIR)
tar -xzf $(TARBALL) -C $(BUILDDIR)
touch $(SOURCEDIR)
$(DEBPKGPATH): | $(SOURCEDIR)
dpkg-buildpackage -us -uc
deb: $(DEBPKGPATH)
deb-install: deb
dpkg -i $(DEBPKGPATH)
deb-clean:
rm -rf $(SOURCEDIR) $(DEBPKGPATH) $(DEBPKGDIR)/$(PKGNAME)_*
$(BUILDDIR)/SOURCES/$(FILENAME): $(TARBALL)
mkdir -p $(BUILDDIR)/SOURCES
cp -p $(TARBALL) $(BUILDDIR)/SOURCES/$(FILENAME)
cp -p dkms.conf $(BUILDDIR)/SOURCES
$(RPMPKGPATH): rpm/$(PKGNAME).spec $(BUILDDIR)/SOURCES/$(FILENAME)
mkdir -p $(BUILDDIR)/{BUILD,RPMS/noarch}
rpmbuild --define "_topdir "$(shell readlink -f $(BUILDDIR)) -ba rpm/$(PKGNAME).spec
rpm: $(RPMPKGPATH)
rpm-clean:
rm -rf $(RPMPKGPATH) $(BUILDDIR)/{BUILD,BUILDROOT,RPMS,SOURCES,SPECS,SRPMS}
rpm-install: rpm
rpm -iv $(RPMPKGPATH)
.PHONY: all clean deb deb-install deb-clean
igb-dkms (5.3.5.22-0) unstable; urgency=medium
* igb 5.3.5.22 DKMS package.
-- David M. Johnson <johnsond@flux.utah.edu> Mon, 04 Feb 2019 07:46:28 -0600
Source: igb-dkms
Maintainer: Testbed Operations <testbed-ops@flux.utah.edu>
Build-Depends: debhelper (>= 9), dkms
Package: igb-dkms
Architecture: all
Depends: ${misc:Depends}
Description: DKMS source for the igb driver
#!/usr/bin/make -f
include /usr/share/dpkg/pkg-info.mk
MODNAME = igb
%:
dh $@ --with dkms
override_dh_install:
echo 'obj-y += src/' > build/$(MODNAME)-$(DEB_VERSION_UPSTREAM)/Makefile
dh_install \
build/$(MODNAME)-$(DEB_VERSION_UPSTREAM)/* \
usr/src/$(MODNAME)-dkms-$(DEB_VERSION_UPSTREAM)
override_dh_dkms:
dh_dkms -V $(DEB_VERSION_UPSTREAM) -- dkms.conf
override_dh_auto_configure:
override_dh_auto_build:
override_dh_auto_test:
override_dh_auto_install:
override_dh_auto_clean:
PACKAGE_NAME="igb-dkms"
PACKAGE_VERSION="#MODULE_VERSION#"
BUILT_MODULE_LOCATION=src/
BUILT_MODULE_NAME[0]="igb"
DEST_MODULE_LOCATION[0]="/updates/dkms"
AUTOINSTALL="YES"
REMAKE_INITRD="YES"
%define module igb
%define name %{module}-dkms
%define version 5.3.5.22
%define release 0
%define srcdirname %{module}-%{version}
Source: http://www.emulab.net/downloads/linux-dkms/%{module}-%{version}.tar.gz
Summary: DKMS version of the igb kernel module
Name: %{name}
Version: %{version}
License: GPLv2
Release: 0
BuildArch: noarch
Requires: dkms gcc kernel-devel
%description
DKMS version of the igb kernel module.
%prep
%setup -n %{srcdirname}
%install
rm -rf %{buildroot}
mkdir -p %{buildroot}/usr/src/%{module}-%{version}/
cp -pR %{_builddir}/%{srcdirname}/* %{buildroot}/usr/src/%{module}-%{version}/
echo 'obj-y += src/' > %{buildroot}/usr/src/%{module}-%{version}/Makefile
cp -p %{_sourcedir}/dkms.conf %{buildroot}/usr/src/%{module}-%{version}/
%clean
rm -rf %{buildroot}
%files
%defattr(0644,root,root)
%attr(0755,root,root) /usr/src/%{module}-%{version}/
%post
occurrences=`/usr/sbin/dkms status | grep "%{module}" | grep "%{version}" | wc -l`
if [ $occurrences -eq 0 ]; then
/usr/sbin/dkms add -m %{module} -v %{version}
fi
/usr/sbin/dkms build -m %{module} -v %{version}
/usr/sbin/dkms install -m %{module} -v %{version}
exit 0
%preun
/usr/sbin/dkms remove -m %{module} -v %{version} --all
exit 0
%changelog
* Mon Feb 04 2019 David M. Johnson <johnsond@flux.utah.edu> 5.3.5.22-0
- Initial release of DKMS version of the igb kernel module.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment