diff --git a/net-misc/tuxedo-yt6801/Manifest b/net-misc/tuxedo-yt6801/Manifest new file mode 100644 index 0000000..cf9a520 --- /dev/null +++ b/net-misc/tuxedo-yt6801/Manifest @@ -0,0 +1 @@ +DIST tuxedo-yt6801-1.0.31-1.noarch.rpm 115897 BLAKE2B 907d8176a10eef5463779cfa5c8d0e9c0732eccf0a566b15a446e1a2415d1633ce95fa16807819823e2893429b384cef75e5254931ac7332bfc95ceb9a3a6047 SHA512 11ebceb3481f53754a2c5dbfb40aa8981fef072b7e24151cd3efc3b5850e21343f1f14262d41b4e2c239afe4212dd9c5876d24d3e0f3ee3c71c58c19695d8106 diff --git a/net-misc/tuxedo-yt6801/tuxedo-yt6801-1.0.31.1.ebuild b/net-misc/tuxedo-yt6801/tuxedo-yt6801-1.0.31.1.ebuild new file mode 100644 index 0000000..4fe287a --- /dev/null +++ b/net-misc/tuxedo-yt6801/tuxedo-yt6801-1.0.31.1.ebuild @@ -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 < "${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 +} diff --git a/net-misc/yt6801/yt6801-1.0.30-r1.ebuild b/net-misc/yt6801/yt6801-1.0.30-r1.ebuild new file mode 100644 index 0000000..19270e2 --- /dev/null +++ b/net-misc/yt6801/yt6801-1.0.30-r1.ebuild @@ -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" +}