Modified intel-gpu-info to not require lspci
Signed-off-by: James Ketrenos <james.p.ketrenos@intel.com>
This commit is contained in:
parent
82aba14ec6
commit
8a9be3721e
@ -73,13 +73,10 @@ RUN apt-get -q update \
|
|||||||
#
|
#
|
||||||
# NOTE: We use DEBIAN_FRONTEND=noninteractive to prevent krb5-user from
|
# NOTE: We use DEBIAN_FRONTEND=noninteractive to prevent krb5-user from
|
||||||
# trying to prompt for configuration details during install.
|
# trying to prompt for configuration details during install.
|
||||||
#
|
|
||||||
# pciutils is needed for lspci used by assets/intel-gpu-info
|
|
||||||
RUN apt-get -q update \
|
RUN apt-get -q update \
|
||||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends -q \
|
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends -q \
|
||||||
locales \
|
locales \
|
||||||
software-properties-common \
|
software-properties-common
|
||||||
pciutils
|
|
||||||
|
|
||||||
# Set up locales
|
# Set up locales
|
||||||
RUN localedef -c -f UTF-8 -i en_US en_US.UTF-8
|
RUN localedef -c -f UTF-8 -i en_US en_US.UTF-8
|
||||||
|
@ -265,14 +265,24 @@ devices+=(0x4551 "ehl_4x4" "Intel(R) HD Graphics (Elkhart Lake 4x4)")
|
|||||||
devices+=(0x4541 "ehl_2x4" "Intel(R) HD Graphics (Elkhart Lake 2x4)")
|
devices+=(0x4541 "ehl_2x4" "Intel(R) HD Graphics (Elkhart Lake 2x4)")
|
||||||
count=${#devices[*]}
|
count=${#devices[*]}
|
||||||
found=0
|
found=0
|
||||||
for id in $(lspci -n | sed -nE 's,^.*8086:([a-f0-9]*).*$,0x\U\1,pg'); do
|
intel_devices=($({
|
||||||
device=0
|
find -L /sys/bus/pci/devices -maxdepth 2 -name vendor |
|
||||||
while (( ${device} < ${count} )); do
|
while read vendor; do
|
||||||
(( "${devices[$device]}" == "$id" )) && {
|
[[ "$(cat ${vendor})" == "0x8086" ]] && {
|
||||||
echo "${devices[$((device+2))]}"
|
device=$(cat ${vendor/vendor/device})
|
||||||
|
echo "${device}"
|
||||||
|
}
|
||||||
|
done
|
||||||
|
} | sort -u))
|
||||||
|
|
||||||
|
for device in ${intel_devices[@]}; do
|
||||||
|
index=0
|
||||||
|
while (( ${index} < ${count} )); do
|
||||||
|
(( "${devices[${index}]}" == "${device}" )) && {
|
||||||
|
echo "${devices[$((index+2))]}"
|
||||||
found=1
|
found=1
|
||||||
}
|
}
|
||||||
device=$((device+3))
|
index=$((index+3))
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
|
|
||||||
|
@ -4,13 +4,10 @@
|
|||||||
#
|
#
|
||||||
# NOTE: We use DEBIAN_FRONTEND=noninteractive to prevent krb5-user from
|
# NOTE: We use DEBIAN_FRONTEND=noninteractive to prevent krb5-user from
|
||||||
# trying to prompt for configuration details during install.
|
# trying to prompt for configuration details during install.
|
||||||
#
|
|
||||||
# pciutils is needed for lspci used by assets/intel-gpu-info
|
|
||||||
RUN apt-get -q update \
|
RUN apt-get -q update \
|
||||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends -q \
|
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends -q \
|
||||||
locales \
|
locales \
|
||||||
software-properties-common \
|
software-properties-common
|
||||||
pciutils
|
|
||||||
|
|
||||||
# Set up locales
|
# Set up locales
|
||||||
RUN localedef -c -f UTF-8 -i en_US en_US.UTF-8
|
RUN localedef -c -f UTF-8 -i en_US en_US.UTF-8
|
||||||
|
Loading…
x
Reference in New Issue
Block a user