echo ""; \ for kversion in 3.9.5-301.fc19.x86_64 4.16.13-300.fc28.x86_64 4.16.13-300.fc28.x86_64+debug 4.16.14-300.fc28.x86_64 4.16.14-300.fc28.x86_64+debug 4.16.15-300.fc28.x86_64 4.16.15-300.fc28.x86_64+debug 4.16.9-300.fc28.x86_64; do \ LINUX_BUILD_DIR="/lib/modules/$kversion/build/" ;\ echo "INFO: Building KERNEL VERSION $kversion LINUX_BUILD_DIR: $LINUX_BUILD_DIR" ;\ if [ -d $LINUX_BUILD_DIR ]; then \ mkdir -p `pwd`/bin/$kversion ;\ rm -f drivers/misc/*.o ;\ rm -f drivers/misc/*.ko ;\ rm -f drivers/misc/*.mod.c ;\ rm -f drivers/misc/.*.cmd ;\ rm -rf drivers/misc/.tmp_versions ;\ make -C $LINUX_BUILD_DIR V=1 M=`pwd`/drivers/misc modules ;\ if [ -f drivers/misc/hpilo.ko ]; then \ mv -vf drivers/misc/hpilo.ko `pwd`/bin/$kversion/. ;\ echo "INFO: Build for KERNEL VERSION: $kversion LINUX_BUILD_DIR: $LINUX_BUILD_DIR successful" ;\ echo " " ;\ else \ echo "BUILD ERROR: Build for KERNEL VERSION: $kversion LINUX_BUILD_DIR: $LINUX_BUILD_DIR FAILED" ;\ echo " " ;\ exit 1 ;\ fi ;\ else \ echo " " ;\ echo "INFO: THERE IS NO BUILD DIRECTORY FOR VERSION: $kversion" ;\ echo " The LINUX_BUILD_DIR resolves to: $LINUX_BUILD_DIR" ;\ echo " There was no hpilo.ko driver built for this Linux Version" ;\ echo " " ;\ fi ;\ done INFO: Building KERNEL VERSION 3.9.5-301.fc19.x86_64 LINUX_BUILD_DIR: /lib/modules/3.9.5-301.fc19.x86_64/build/ INFO: THERE IS NO BUILD DIRECTORY FOR VERSION: 3.9.5-301.fc19.x86_64 The LINUX_BUILD_DIR resolves to: /lib/modules/3.9.5-301.fc19.x86_64/build/ There was no hpilo.ko driver built for this Linux Version INFO: Building KERNEL VERSION 4.16.13-300.fc28.x86_64 LINUX_BUILD_DIR: /lib/modules/4.16.13-300.fc28.x86_64/build/ make[1]: Entering directory '/usr/src/kernels/4.16.13-300.fc28.x86_64' test -e include/generated/autoconf.h -a -e include/config/auto.conf || ( \ echo >&2; \ echo >&2 " ERROR: Kernel configuration is invalid."; \ echo >&2 " include/generated/autoconf.h or include/config/auto.conf are missing.";\ echo >&2 " Run 'make oldconfig && make prepare' on kernel src to fix it."; \ echo >&2 ; \ /bin/false) mkdir -p /opt/hp/hp-ilo/drivers/misc/.tmp_versions ; rm -f /opt/hp/hp-ilo/drivers/misc/.tmp_versions/* make -f ./scripts/Makefile.build obj=/opt/hp/hp-ilo/drivers/misc gcc -Wp,-MD,/opt/hp/hp-ilo/drivers/misc/.hpilo.o.d -nostdinc -isystem /usr/lib/gcc/x86_64-redhat-linux/8/include -I./arch/x86/include -I./arch/x86/include/generated -I./include -I./arch/x86/include/uapi -I./arch/x86/include/generated/uapi -I./include/uapi -I./include/generated/uapi -include ./include/linux/kconfig.h -D__KERNEL__ -DCONFIG_CC_STACKPROTECTOR -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -fshort-wchar -Werror-implicit-function-declaration -Wno-format-security -std=gnu89 -fno-PIE -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -m64 -falign-jumps=1 -falign-loops=1 -mno-80387 -mno-fp-ret-in-387 -mpreferred-stack-boundary=3 -mskip-rax-setup -mtune=generic -mno-red-zone -mcmodel=kernel -funit-at-a-time -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -DCONFIG_AS_CFI_SECTIONS=1 -DCONFIG_AS_FXSAVEQ=1 -DCONFIG_AS_SSSE3=1 -DCONFIG_AS_CRC32=1 -DCONFIG_AS_AVX=1 -DCONFIG_AS_AVX2=1 -DCONFIG_AS_AVX512=1 -DCONFIG_AS_SHA1_NI=1 -DCONFIG_AS_SHA256_NI=1 -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -mindirect-branch=thunk-extern -mindirect-branch-register -DRETPOLINE -fno-delete-null-pointer-checks -Wno-frame-address -Wno-format-truncation -Wno-format-overflow -Wno-int-in-bool-context -O2 --param=allow-store-data-races=0 -DCC_HAVE_ASM_GOTO -Wframe-larger-than=2048 -fstack-protector-strong -Wno-unused-but-set-variable -Wno-unused-const-variable -fvar-tracking-assignments -g -pg -mfentry -DCC_USING_FENTRY -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -fno-merge-all-constants -fmerge-constants -fno-stack-check -fconserve-stack -Werror=implicit-int -Werror=strict-prototypes -Werror=date-time -Werror=incompatible-pointer-types -Werror=designated-init -Wno-packed-not-aligned -DMODULE -DKBUILD_BASENAME='"hpilo"' -DKBUILD_MODNAME='"hpilo"' -c -o /opt/hp/hp-ilo/drivers/misc/hpilo.o /opt/hp/hp-ilo/drivers/misc/hpilo.c /opt/hp/hp-ilo/drivers/misc/hpilo.c:606:22: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘ilo_map_device’ static int __devinit ilo_map_device(struct pci_dev *pdev, struct ilo_hwinfo *hw) ^~~~~~~~~~~~~~ /opt/hp/hp-ilo/drivers/misc/hpilo.c:673:22: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘ilo_probe’ static int __devinit ilo_probe(struct pci_dev *pdev, ^~~~~~~~~ /opt/hp/hp-ilo/drivers/misc/hpilo.c:784:14: error: ‘ilo_probe’ undeclared here (not in a function); did you mean ‘ilo_close’? .probe = ilo_probe, ^~~~~~~~~ ilo_close /opt/hp/hp-ilo/drivers/misc/hpilo.c:785:14: error: implicit declaration of function ‘__devexit_p’ [-Werror=implicit-function-declaration] .remove = __devexit_p(ilo_remove), ^~~~~~~~~~~ /opt/hp/hp-ilo/drivers/misc/hpilo.c:785:14: warning: initialization of ‘void (*)(struct pci_dev *)’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion] /opt/hp/hp-ilo/drivers/misc/hpilo.c:785:14: note: (near initialization for ‘ilo_driver.remove’) /opt/hp/hp-ilo/drivers/misc/hpilo.c:785:14: error: initializer element is not constant /opt/hp/hp-ilo/drivers/misc/hpilo.c:785:14: note: (near initialization for ‘ilo_driver.remove’) cc1: some warnings being treated as errors make[2]: *** [scripts/Makefile.build:331: /opt/hp/hp-ilo/drivers/misc/hpilo.o] Error 1 make[1]: *** [Makefile:1565: _module_/opt/hp/hp-ilo/drivers/misc] Error 2 make[1]: Leaving directory '/usr/src/kernels/4.16.13-300.fc28.x86_64' BUILD ERROR: Build for KERNEL VERSION: 4.16.13-300.fc28.x86_64 LINUX_BUILD_DIR: /lib/modules/4.16.13-300.fc28.x86_64/build/ FAILED make: *** [Makefile:20: build] Error 1