mirror of
https://github.com/pentoo/pentoo-overlay
synced 2026-04-20 05:41:12 +02:00
pentoo-livecd: simplify bdh
the nvidia support detection routines don't work anymore, so just skip it
This commit is contained in:
parent
6c03b50c72
commit
7bd49960d9
2 changed files with 34 additions and 34 deletions
|
|
@ -121,48 +121,48 @@ start() {
|
|||
fi
|
||||
#first we detect if the nvidia binary driver can actually support the hardware
|
||||
NV_TARBALL="$(FETCHCOMMAND="false" RESUMECOMMAND="false" FEATURES="-getbinpkg" emerge --getbinpkg=n --color=n -f nvidia-drivers --nodeps 2> /dev/zero | \
|
||||
grep "run BLAKE2B SHA512 size ;-) ..." | awk '{print $2}')"
|
||||
grep "run BLAKE2B SHA512 size ;-) ..." | awk '{print $3}' | sed -e 'x/\x1b\[[0-9;]*m//g')"
|
||||
|
||||
if [ -n "${NV_TARBALL}" ]; then
|
||||
cd "$(mktemp -d -t nvidia-detectXXXX)" || exit 1
|
||||
# cd "$(mktemp -d -t nvidia-detectXXXX)" || exit 1
|
||||
|
||||
#stolen from unpacker.eclass
|
||||
exe="tail -n +$(grep -a '^skip=' "$(portageq envvar DISTDIR)/${NV_TARBALL}" | cut -d= -f2) '$(portageq envvar DISTDIR)/${NV_TARBALL}'"
|
||||
eval ${exe} | unxz -d | tar --no-same-owner -xf - --wildcards --no-anchored 'README.txt'
|
||||
# exe="tail -n +$(grep -a '^skip=' "$(portageq envvar DISTDIR)/${NV_TARBALL}" | cut -d= -f2) $(portageq envvar DISTDIR)/${NV_TARBALL}"
|
||||
# eval ${exe} | unxz -d | tar --no-same-owner -xf - --wildcards --no-anchored 'README.txt'
|
||||
|
||||
if [ -f README.txt ]; then
|
||||
# if [ -f README.txt ]; then
|
||||
#stolen from debian's nvidia-detect rules file
|
||||
#https://packages.debian.org/source/sid/nvidia-graphics-drivers
|
||||
sed -e '0,/A. Supported\|APPENDIX A: SUPPORTED/d' \
|
||||
-e '0,/Appendix A. Supported\|APPENDIX A: SUPPORTED/d' \
|
||||
-e '0,/^Below\|APPENDIX B/{/ 0x/s/.* 0x\([0-9a-fA-F]\{4\}\).*/10de\1/p; /^.\{41\} [0-9a-fA-F]\{4\} /s/^.\{41\} \([0-9a-fA-F]\{4\}\) .*/10de\1/p};d' \
|
||||
README.txt \
|
||||
| tr a-f A-F | sort -u > list.txt
|
||||
# sed -e '0,/A. Supported\|APPENDIX A: SUPPORTED/d' \
|
||||
# -e '0,/Appendix A. Supported\|APPENDIX A: SUPPORTED/d' \
|
||||
# -e '0,/^Below\|APPENDIX B/{/ 0x/s/.* 0x\([0-9a-fA-F]\{4\}\).*/10de\1/p; /^.\{41\} [0-9a-fA-F]\{4\} /s/^.\{41\} \([0-9a-fA-F]\{4\}\) .*/10de\1/p};d' \
|
||||
# README.txt \
|
||||
# | tr a-f A-F | sort -u > list.txt
|
||||
|
||||
if [ -f list.txt ]; then
|
||||
#stolen from nvidia-detect code
|
||||
NVIDIA_VGA=$(sudo lspci -mmn -d 10de: | awk '{ gsub("\"",""); print $3 $4 }')
|
||||
|
||||
for pciid in ${NVIDIA_VGA^^}
|
||||
do
|
||||
if grep -q "${pciid}" list.txt ; then
|
||||
NVIDIA_SUPPORTED=1
|
||||
fi
|
||||
done
|
||||
if [ "${NVIDIA_SUPPORTED}" = "1" ]; then
|
||||
# if [ -f list.txt ]; then
|
||||
# #stolen from nvidia-detect code
|
||||
# NVIDIA_VGA=$(sudo lspci -mmn -d 10de: | awk '{ gsub("\"",""); print $3 $4 }')
|
||||
#
|
||||
# for pciid in ${NVIDIA_VGA^^}
|
||||
# do
|
||||
# if grep -q "${pciid}" list.txt ; then
|
||||
# NVIDIA_SUPPORTED=1
|
||||
# fi
|
||||
# done
|
||||
# if [ "${NVIDIA_SUPPORTED}" = "1" ]; then
|
||||
switch_to_nvidia
|
||||
else
|
||||
eerror "NVIDIA binary driver requested but doesn't support this hardware, trying nouveau"
|
||||
switch_to_nouveau
|
||||
fi
|
||||
else
|
||||
eerror "Failed to extract or sort PCIIDs from NVIDIA README.txt, please report this."
|
||||
eend 1
|
||||
fi
|
||||
else
|
||||
eerror "Failed to unpack README from NVIDIA drivers, please report this."
|
||||
eend 1
|
||||
fi
|
||||
# else
|
||||
# eerror "NVIDIA binary driver requested but doesn't support this hardware, trying nouveau"
|
||||
# switch_to_nouveau
|
||||
# fi
|
||||
# else
|
||||
# eerror "Failed to extract or sort PCIIDs from NVIDIA README.txt, please report this."
|
||||
# eend 1
|
||||
# fi
|
||||
# else
|
||||
# eerror "Failed to unpack README from NVIDIA drivers, please report this."
|
||||
# eend 1
|
||||
# fi
|
||||
|
||||
else
|
||||
eerror "Missing nvidia-drivers distfile, please download it first or run \"/etc/init.d/binary-driver-handler aufs-module\""
|
||||
|
|
@ -38,7 +38,7 @@ src_install() {
|
|||
newsbin "${FILESDIR}"/makemo-2020.3 makemo
|
||||
newsbin "${FILESDIR}"/livecd-setpass-r13 livecd-setpass
|
||||
|
||||
newinitd "${FILESDIR}"/binary-driver-handler.initd-2023.1 binary-driver-handler
|
||||
newinitd "${FILESDIR}"/binary-driver-handler.initd-2023.2 binary-driver-handler
|
||||
|
||||
exeinto /etc/skel/Desktop
|
||||
#network manager shortcuts
|
||||
Loading…
Reference in a new issue