Skip to content

Add Linux 6.12.11-479 with *ice* driver and firmware symlink #3200

Merged
merged 5 commits into from
Jan 27, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
46 changes: 46 additions & 0 deletions linux-6.12.11-479.bee
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
#!/bin/env beesh

# note: BEE_MAKEFLAGS="-j $(nproc)" ./linux-xxx.bee

KERNELVERSION=${PKGVERSION}

# append extra version to get for example 4.8-rc4
KERNELVERSION=${KERNELVERSION}${PKGEXTRAVERSION_DASH}

echo $KERNELVERSION

#SRCURL[0]="https://github.molgen.mpg.de/mariux64/linux/archive/refs/tags/mariux-$KERNELVERSION-$PKGREVISION.tar.gz"
SRCURL[0]="https://beehive.molgen.mpg.de/d80277dd7a2144b533d24d765f398f18/mariux-6.12.11-479.tar.gz"

KERNELLOCAL=".mx64.${PKGREVISION}"
FULLKERNELVERSION="${KERNELVERSION}${KERNELLOCAL}"

B=${S}

same_revision_files=$(ls ${BEE_PKGDIR}/linux-[0-9].[0-9]*-${PKGREVISION}.x86_64.bee.* 2>/dev/null) \
&& echo "A kernel with revision ${PKGREVISION} has already been build: $same_revision_files" \
&& exit


mee_configure() {
echo "configure $@"
echo "CONFIG_LOCALVERSION=\"$KERNELLOCAL\"" > .config
grep -v 'CONFIG_LOCALVERSION=' config-mpi >> .config
make olddefconfig
}

mee_build() {
echo "build $@"
make ${BEE_MAKEFLAGS}
}

mee_install() {
echo "install $@"

make modules_install INSTALL_MOD_PATH=${D}
make install INSTALL_PATH=${D}/boot

rm -rf ${D}/lib/modules/${FULLKERNELVERSION}/{source,build}

ln -sv bzImage-${FULLKERNELVERSION} ${D}/boot/mariux.${PKGREVISION}
}
3 changes: 2 additions & 1 deletion linux-firmware.be0
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env beesh

# BEE_VERSION linux-firmware-20230804_p7_g789aa815-1
# BEE_VERSION linux-firmware-20230804_p7_g789aa815-2

#SRCURL[0]="https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/snapshot/linux-firmware-789aa81504126c2b062d04aacea1570af950ad4f.tar.gz"
SRCURL[0]="https://beehive.molgen.mpg.de/5bcf7abbd3e88c64e24caf7f2f7370cc/linux-firmware-789aa81504126c2b062d04aacea1570af950ad4f.tar.gz"
Expand Down Expand Up @@ -38,4 +38,5 @@ mee_install() {
cp -ax ${S}/radeon $D/lib/firmware
cp -ax ${S}/rtl_nic $D/lib/firmware
cp -ax ${S}/intel $D/lib/firmware
ln -sv ice-1.3.30.0.pkg $D/lib/firmware/intel/ice/ddp/ice.pkg
}
102 changes: 102 additions & 0 deletions nvidia_current-535.230.02-0.bee
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
#!/bin/env beesh

# resources:
# http://www.nvidia.com/object/unix.html
# ./README.txt
# ./.manifest
# https://github.com/NVIDIA/nvidia-installer
# ./nvidia-installer -A
# ./nvidia-installer --ui=none --accept-license --no-kernel-module --expert
#

NVIDIA_ARCHIVE="NVIDIA-Linux-x86_64-${PKGVERSION}${PKGEXTRAVERSION:+-${PKGEXTRAVERSION}}.run"

#SRCURL[0]="https://de.download.nvidia.com/XFree86/Linux-x86_64/$PKGVERSION/NVIDIA-Linux-x86_64-$PKGVERSION.run"
SRCURL[0]="https://beehive.molgen.mpg.de/2e34184b91fa9bcc7cc5d4f8707ef0d6/NVIDIA-Linux-x86_64-535.230.02.run"


BEE_CONFIGURE=none

build_in_sourcedir

PREFIX=/usr/share/nvidia/${PKGVERSION}
LIBDIR=${PREFIX}/lib
BINDIR=${PREFIX}/bin

# fix tar option for user namespace usage (`unshare -U -r BEEFILE`)
export TAR_OPTIONS=--no-same-owner

mee_extract() {
rmdir ${S}
sh ${F}/${NVIDIA_ARCHIVE} -x --target ${S}
}

#mee_patch() {
# bee_patch
#}

mee_build() {
#bee_build
true
}

mee_install() {
#bee_install

mkdir -pv ${D}${PREFIX}/{bin,lib,drivers,man/man1}
mkdir -pv ${D}/usr/lib

NVDRV="nvidia_drv.so"

NVBIN=( \
"nvidia-cuda-mps-control" \
"nvidia-cuda-mps-server" \
"nvidia-debugdump" \
"nvidia-modprobe" \
"nvidia-persistenced" \
"nvidia-settings" \
"nvidia-smi" \
"nvidia-xconfig" \
)

for i in lib*.so.$PKGVERSION; do
install -v -t ${D}${LIBDIR} "$i"
ln -sv "${LIBDIR}/$i" ${D}/usr/lib/
if soname="$(soname "$i")"; then
#echo "$soname\n"
test -e "${D}${LIBDIR}/${soname}" || ln -sv "$i" "${D}${LIBDIR}/${soname}"
fi
done

# libglxserver_nvidia.so should reside in /usr/lib/xorg/modules/extensions,
# here we cheat away and stay in line with the /node/usr_share_mxgfx mechanism.
# Additional note: don't put/link libglx.so into /usr/lib.
ln -sv libglxserver_nvidia.so.$PKGVERSION ${D}${LIBDIR}/libglxserver_nvidia.so

# libnvidia-api was introduced with 525, but w/o a 'PKGVERSION'
install -v -t ${D}${LIBDIR} libnvidia-api.so.1

mkdir -vp ${D}/usr/lib/xorg/modules/extensions

cd ${D}/usr/lib/xorg/modules/extensions
ln -sv /usr/share/mxgfx/lib/libglxserver_nvidia.so libglxserver_nvidia.so
cd $B

echo "installing ${NVDRV} as drivers/$(basename ${NVDRV})";
install -c -v ${NVDRV} ${D}${PREFIX}/drivers

mkdir -pv ${D}/usr/share/man/man1

for i in ${NVBIN[@]} ; do
echo "installing ${i} as bin/${i}"
install -v -c -m 755 ${i} ${D}${BINDIR}
if [ -e ${i}.1.gz ]; then
install -v -c -m 644 ${i}.1.gz ${D}${PREFIX}/man/man1
fi
done

mkdir -pv ${D}/lib/firmware/nvidia/${PKGVERSION}
install -v -c -m 644 firmware/gsp_ga10x.bin ${D}/lib/firmware/nvidia/${PKGVERSION}
install -v -c -m 644 firmware/gsp_tu10x.bin ${D}/lib/firmware/nvidia/${PKGVERSION}

}
48 changes: 48 additions & 0 deletions nvidia_linux-6.12.11-479-535.230.02-0.bee
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
#!/bin/env beesh

NVIDIA_ARCHIVE="NVIDIA-Linux-x86_64-${PKGVERSION}.run"

#SRCURL[0]="https://de.download.nvidia.com/XFree86/Linux-x86_64/$PKGVERSION/NVIDIA-Linux-x86_64-$PKGVERSION.run"
SRCURL[0]="https://beehive.molgen.mpg.de/2e34184b91fa9bcc7cc5d4f8707ef0d6/NVIDIA-Linux-x86_64-535.230.02.run"

PATCHURL+=()

LINUXPKG=${PKGEXTRANAME}.${ARCH}

LINUXKLOCALVER=$(beeversion --format "%v.mx64.%r" "${LINUXPKG}")

# '4.4.mx64.75' to '4.4.0.mx64.75'
if [[ $LINUXKLOCALVER =~ ^([0-9]+\.[0-9]+)(\.mx64.*) ]]; then
LINUXKLOCALVER="${BASH_REMATCH[1]}.0${BASH_REMATCH[2]}"
fi


build_in_sourcedir
sourcesubdir_append kernel

: ${BEE_TMP_TMPDIR:=/tmp}

# fix tar option for user namespace usage (`unshare -U -r BEEFILE`)
export TAR_OPTIONS=--no-same-owner

mee_extract() {
rmdir ${S}
start_cmd sh ${F}/${NVIDIA_ARCHIVE} -x --target ${S}

if [ ! -d "${BEE_TMP_TMPDIR}/${LINUXPKG}/source" ] ; then
start_cmd gtar -xf ${BEE_BUILDARCHIVEDIR}/${LINUXPKG}.beebuild.tar.bz2 -C ${BEE_TMP_TMPDIR}
fi
LINUXSRCDIR="${BEE_TMP_TMPDIR}/${LINUXPKG}/source"
}

mee_build() {
make SYSSRC=${LINUXSRCDIR} CC=gcc module
}

mee_install() {
mkdir -pv ${D}${DATAROOTDIR}/nvidia/kernel/${LINUXKLOCALVER}/${PKGVERSION}

cp -v *.ko ${D}${DATAROOTDIR}/nvidia/kernel/${LINUXKLOCALVER}/${PKGVERSION}/

ln -s ${PKGVERSION} ${D}${DATAROOTDIR}/nvidia/kernel/${LINUXKLOCALVER}/current
}