# $HeadURL$ $LastChangedRevision$ ifndef FACILITY_DRIVERS_MK FACILITY_DRIVERS_MK = 1 # In pass #1: load recipe generators # In pass #0: load generated recipes include method-driverinstall.mk # Do not install stuff in this facility; the network may be down! # Variables mentioned both in pass#1 and pass#0. # Tell recipe generators what to generate recipes for ifeq ($(PCMS_PASS_NUM),1) all.driverinstall: firmware-realtek.driverinstall firmware-amd-graphics.driverinstall firmware-atheros.driverinstall intel-media-va-driver.driverinstall i965-va-driver.driverinstall # The real Makefile else ifeq ($(PCMS_PASS_NUM),0) all.facility: drivers.facility drivers.facility: install-drivers.fix configure-drivers.fix touch $@ install-drivers.fix: install-drivers-cpu.fix install-drivers-net.fix install-drivers-audio.fix install-drivers-video.fix install-drivers-misc.fix touch $@ install-drivers-cpu.fix: touch $@ # Unfortunately, containers can see physical hardware (run 'lspci' # to verify this), so to avoid installing drivers for hardware on # the physical host (e.g. drivers for specific models of NIC) then # we need to bracket all driver installation inside checks that # this is not a container. This stanza deals with CPU drivers, but # the same check is present for other drivers types (e.g. network, # video, audio) below. Actually, currently there are no drivers # for CPUs, so this stanza is pointless but is present for symmetry. ifneq ($(HOST_HARDWARE_PROFILE),container) endif install-drivers-net.fix: touch $@ ifneq ($(HOST_HARDWARE_PROFILE),container) ifneq ($(shell lspci -n | fgrep 10ec:8168),) install-drivers-net.fix: firmware-realtek.driverinstall else ifneq ($(shell lspci -n | fgrep 10ec:8136),) install-drivers-video.fix: firmware-realtek.driverinstall endif ifneq ($(shell lspci -n | fgrep 168c:0042),) install-drivers-net.fix: firmware-atheros.driverinstall endif endif install-drivers-audio.fix: touch $@ ifneq ($(HOST_HARDWARE_PROFILE),container) # Fake audio hardware in destkops and laptops without it. ifneq ($(HOST_INSTALL_PROFILE),server) ifeq ($(shell lspci | grep -i audio),) install-drivers-audio.fix: install-driver-audio-dummy.fix endif endif endif install-driver-audio-dummy.fix: /etc/modules-load.d/snd-dummy.conf touch $@ /etc/modules-load.d/snd-dummy.conf: lineinfile --after=EOF --text='snd-dummy' --file=$@ install-drivers-video.fix: touch $@ ifneq ($(HOST_HARDWARE_PROFILE),container) ifeq ($(shell lspci -n | fgrep 1002:98e4),) install-drivers-video.fix: firmware-amd-graphics.driverinstall endif ifneq ($(shell lspci -n | fgrep 1002:9802),) install-drivers-video.fix: firmware-amd-graphics.driverinstall endif ifneq ($(shell lspci -n | fgrep 1002:9807),) install-drivers-video.fix: firmware-amd-graphics.driverinstall endif ifneq ($(shell lspci -n | fgrep 1002:15dd),) install-drivers-video.fix: firmware-amd-graphics.driverinstall endif ifneq ($(shell lspci -n | fgrep 8086:3e98),) install-drivers-net.fix: intel-media-va-driver.driverinstall i965-va-driver.driverinstall endif endif install-drivers-misc.fix: touch $@ configure-drivers.fix: touch $@ drivers.facility: repos.facility endif # PCMS_PASS_NUM endif # FACILITY_DRIVERS_MK