File: discover-ibm.sh

package info (click to toggle)
hw-detect 1.142
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 1,664 kB
  • sloc: sh: 1,408; makefile: 103; perl: 102; ansic: 39
file content (25 lines) | stat: -rwxr-xr-x 716 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#! /bin/sh
set -e

# Detect hardware from Open Firmware's exported device tree that are
# related to IBM pseries/js20 blades/rs6k machines.
#
# If the hardware is of use within d-i, then echo it and register-module it;
# otherwise, just use register-module.

for dir in $(find "/proc/device-tree/" -type d); do
	name="$(cat "$dir/name" 2>/dev/null || true)"
	device_type="$(cat "$dir/device_type" 2>/dev/null || true)"
	compatible="$(cat "$dir/compatible" 2>/dev/null || true)"

	# drivers/pseries
	if [ "$name" = l-lan ]; then
		echo "ibmveth:IBM Virtual Ethernet"
		register-module ibmveth
	fi
	# drivers/scsi
	if [ "$name" = v-scsi ]; then
		echo "ibmvscsic:IBM Virtual SCSI"
		register-module ibmvscsic
	fi
done