You are not logged in.

#1 2019-03-23 14:59:41

salsadoom
Member
Registered: 2011-02-03
Posts: 32

[REQUEST] Kernel driver dkms for r8125 Realtek 2.5gbe gaming ethernet

Hi guys,

Yeah my new laptop has one of these. There doesn't seem to be much linux related stuff to this particular nic when I googled it, but Realtek actually does make a driver, it says for kernels up to 4.15, but it compiled and loaded just fine on 5.0.3-arch1 and seems to work exactly as expected. I'm not really familiar with how to make dkms packages and pretty new to making AUR packages in general so help would be a grand thing.

Now, I'm not sure why, but realtek seems to make it annoying to actually download the driver. It send me some silly email which had an expiring link on it. But here is the url for that https://www.realtek.com/en/component/zo … s-software

Thanks for any help fellas!

EDIT: This mirror might be a better choice. https://github.com/heri16/r8125

Last edited by salsadoom (2019-03-23 15:35:09)

Offline

#2 2019-03-23 20:59:14

loqs
Member
Registered: 2014-03-06
Posts: 17,192

Re: [REQUEST] Kernel driver dkms for r8125 Realtek 2.5gbe gaming ethernet

The following might help you get started.  Dynamic_Kernel_Module_Support#DKMS_package_creation
PKGBUILD

_pkgbase=r8125
pkgname=r8125-dkms
pkgver=9.001.00
pkgrel=1
pkgdesc=""
arch=('x86_64')
url=""
license=('GPL')
depends=('dkms')
makedepends=('git')
conflicts=("${_pkgbase}")
source=('git+https://github.com/heri16/r8125.git#commit=4e36be7c52f0f122a0578e30995057c4ce2e7702'
        'dkms.conf.in'
        )
md5sums=('SKIP'
         '3c2a6cca70a64678cefec35dcf847c96')

package() {
  install -Dm644 dkms.conf.in "${pkgdir}"/usr/src/${_pkgbase}-${pkgver}/dkms.conf

  sed -e "s/@_PKGBASE@/${_pkgbase}/" \
      -e "s/@PKGVER@/${pkgver}/" \
      -i "${pkgdir}"/usr/src/${_pkgbase}-${pkgver}/dkms.conf

  cp -r ${_pkgbase}/src/* "${pkgdir}"/usr/src/${_pkgbase}-${pkgver}/
}

dkms.conf.in

PACKAGE_NAME="@_PKGBASE@"
PACKAGE_VERSION="@PKGVER@"
BUILT_MODULE_NAME[0]="r8125"
DEST_MODULE_LOCATION[0]="/kernel/drivers/net/ethernet"
AUTOINSTALL="yes"

Edit:
Removed empty build function,  corrected location to ethernet

Last edited by loqs (2019-03-23 21:28:00)

Offline

Board footer

Powered by FluxBB