Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions net-misc/tuxedo-yt6801/Manifest
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
DIST tuxedo-yt6801-1.0.31-1.noarch.rpm 115897 BLAKE2B 907d8176a10eef5463779cfa5c8d0e9c0732eccf0a566b15a446e1a2415d1633ce95fa16807819823e2893429b384cef75e5254931ac7332bfc95ceb9a3a6047 SHA512 11ebceb3481f53754a2c5dbfb40aa8981fef072b7e24151cd3efc3b5850e21343f1f14262d41b4e2c239afe4212dd9c5876d24d3e0f3ee3c71c58c19695d8106
84 changes: 84 additions & 0 deletions net-misc/tuxedo-yt6801/tuxedo-yt6801-1.0.31.1.ebuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
# Copyright 2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

inherit rpm linux-mod-r1

DESCRIPTION="Driver for Motorcomm YT6801 Gigabit Ethernet controller"
HOMEPAGE="https://en.motor-comm.com/product/ethernet-control-chip"
SRC_URI="https://rpm.tuxedocomputers.com/fedora/43/x86_64/base/tuxedo-yt6801-$(ver_rs 3 '-').noarch.rpm"

S="${WORKDIR}"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"

IUSE="doc"

RDEPEND="
!!net-misc/yt6801
"

upstream_version=$(ver_cut 1-3)
aspm=1

src_prepare() {
cat <<EOF > "${S}/usr/src/tuxedo-yt6801-${upstream_version}/Makefile"
yt6801-objs := fuxi-gmac-common.o fuxi-gmac-desc.o fuxi-gmac-ethtool.o fuxi-gmac-hw.o \
fuxi-gmac-net.o fuxi-gmac-pci.o fuxi-gmac-phy.o fuxi-efuse.o fuxi-gmac-ioctl.o
obj-m += yt6801.o

all:
\$(MAKE) -C \$(KERNELDIR) M=\$(PWD) modules

clean:
\$(MAKE) -C \$(KERNELDIR) M=\$(PWD) clean
EOF

default
}

src_compile() {
local modlist=(
yt6801=kernel/drivers/net/ethernet/motorcomm:usr/src/tuxedo-yt6801-${upstream_version}
)
local modargs=(
KERNELDIR="${KV_OUT_DIR}"
KCFLAGS+="-DFXGMAC_INT_MODERATION_ENABLED=1 -DFXGMAC_PHY_SLEEP_ENABLE"
)

board_name="$(cat /sys/class/dmi/id/board_name)"

# Disable ASPM on some devices
if [ "GXxHRXx" == "$board_name" ] || [ "GM5IXxA" == "$board_name" ]; then
aspm=0
else
# ASPM enabled
modargs+=(
KCFLAGS+="-DFXGMAC_ASPM_ENABLED -DFXGMAC_EPHY_LOOPBACK_DETECT_ENABLED"
)
fi

linux-mod-r1_src_compile
}

src_install() {
# Install the license file
insinto /usr/share/licenses/${P}
doins "${S}/usr/share/licenses/tuxedo-yt6801/LICENSE"

# Install the documentation
use doc && dodoc "${S}/usr/src/tuxedo-yt6801-${upstream_version}/Notice.txt"

linux-mod-r1_src_install
}

pkg_postinst() {
linux-mod-r1_pkg_postinst

if [ ${aspm} = 0 ]; then
elog "ASPM support has been disabled due to limitations on your machine"
fi
}
34 changes: 34 additions & 0 deletions net-misc/yt6801/yt6801-1.0.30-r1.ebuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

inherit linux-mod-r1 udev

DESCRIPTION="Linux device driver for Motorcomm YT6801 Gigabit Ethernet controllers"
HOMEPAGE="https://www.motor-comm.com/product/ethernet-control-chip"
SRC_URI="https://www.motor-comm.com/Public/Uploads/uploadfile/files/20250430/yt6801-linux-driver-${PV}.zip"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="amd64 ~x86"

PATCHES=( )
S="${WORKDIR}"

src_compile() {
local modlist=(
${PN}=src:src
)
local modargs=(
KERNELDIR="${KV_OUT_DIR}"
)

linux-mod-r1_src_compile
}

pkg_postinst() {
linux-mod-r1_pkg_postinst

ewarn "You should consider migrating to net-misc/tuxedo-yt6801 to benefit from latest TUXEDO patches"
}