# $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 # The real Makefile else ifeq ($(PCMS_PASS_NUM),0) all.facility: drivers.facility drivers.facility: install-drivers.fix configure-drivers.fix activate-drivers.fix touch $@ activate-drivers.fix: configure-drivers.fix install-drivers.fix msg --progname=$(PROGNAME) --debug=$(VERBOSELEVEL) warning "rebooting in 5s ..." touch $@ sleep 5 reboot # Prevent reboot removing activate-drivers.fix, which would result in # a second invocation (with the drivers now active) doing a second reboot, # ad infinitum. .PRECIOUS: activate-drivers.fix install-drivers.fix: install-drivers-cpu.fix install-drivers-net.fix install-drivers-audio.fix install-drivers-video.fix install-drivers-misc.fix touch $@ # amd64-microcode is installed by pcms-install (because we have no network # when this makefile runs). However, here we record that the package is # needed. install-drivers-cpu.fix: touch $@ install-drivers-net.fix: touch $@ ifneq ($(shell lspci -n | fgrep 10ec:8168),) install-drivers-net.fix: firmware-realtek.driverinstall endif install-drivers-audio.fix: touch $@ install-drivers-video.fix: touch $@ ifneq ($(shell lspci -n | fgrep 1002:98e4),) install-drivers-video.fix: firmware-amd-graphics.driverinstall else ifneq ($(shell lspci -n | fgrep 1002:9802),) install-drivers-video.fix: firmware-amd-graphics.driverinstall endif install-drivers-misc.fix: touch $@ configure-drivers.fix: grub.facility touch $@ drivers.facility: repos.facility # Ensure hostname is set before reboot in order not to have to set hostname again activate-drivers.fix: hostname.facility endif # PCMS_PASS_NUM endif # FACILITY_DRIVERS_MK