From d9808f6659b2de683380a14e0be9192f961750cb Mon Sep 17 00:00:00 2001 From: Trammell hudson Date: Fri, 2 Mar 2018 09:37:31 -0500 Subject: [PATCH] build the superiotool, which requires a hack on the pciutils lib/types.h file --- Makefile | 27 ++++++++++++++------------- patches/pciutils-3.5.4.patch | 12 ++++++++++++ 2 files changed, 26 insertions(+), 13 deletions(-) create mode 100644 patches/pciutils-3.5.4.patch diff --git a/Makefile b/Makefile index 840a186f..ab2f5653 100644 --- a/Makefile +++ b/Makefile @@ -356,24 +356,25 @@ $(initrd_bin_dir)/busybox: $(build)/$(busybox_dir)/busybox # this must be built *AFTER* musl, but since coreboot depends on other things # that depend on musl it should be ok. # +COREBOOT_UTIL_DIR=$(build)/$(coreboot_dir)/util ifeq ($(CONFIG_COREBOOT),y) -$(eval $(call initrd_bin_add,$(build)/$(coreboot_dir)/util/cbmem/cbmem)) -#$(eval $(call initrd_bin_add,$(build)/$(coreboot_dir)/util/inteltool/inteltool)) +$(eval $(call initrd_bin_add,$(COREBOOT_UTIL_DIR)/cbmem/cbmem)) +$(eval $(call initrd_bin_add,$(COREBOOT_UTIL_DIR)/superiotool/superiotool)) +#$(eval $(call initrd_bin_add,$(COREBOOT_UTIL_DIR)/inteltool/inteltool)) endif -$(build)/$(coreboot_dir)/util/cbmem/cbmem: \ - $(build)/$(coreboot_dir)/.canary \ - musl.intermediate - $(call do,MAKE,cbmem,\ - $(MAKE) -C "$(dir $@)" CC="$(heads_cc)" \ - ) -$(build)/$(coreboot_dir)/util/inteltool/inteltool: \ - $(build)/$(coreboot_dir)/.canary \ - musl.intermediate - $(call do,MAKE,inteltool,\ - $(MAKE) -C "$(dir $@)" CC="$(heads_cc)" \ +$(COREBOOT_UTIL_DIR)/cbmem/cbmem \ +$(COREBOOT_UTIL_DIR)/superiotool/superiotool \ +$(COREBOOT_UTIL_DIR)/inteltool/inteltool \ +: $(build)/$(coreboot_dir)/.canary \ + musl.intermediate + $(call do,MAKE,$(notdir $@),\ + $(MAKE) -C "$(dir $@)" $(CROSS_TOOLS) \ ) +# superio depends on zlib and pciutils +$(COREBOOT_UTIL_DIR)/superiotool/superiotool: zlib.intermediate pciutils.intermediate + # # initrd image creation # diff --git a/patches/pciutils-3.5.4.patch b/patches/pciutils-3.5.4.patch new file mode 100644 index 00000000..67325201 --- /dev/null +++ b/patches/pciutils-3.5.4.patch @@ -0,0 +1,12 @@ +diff -u --recursive clean/pciutils-3.5.4/lib/types.h pciutils-3.5.4/lib/types.h +--- clean/pciutils-3.5.4/lib/types.h 2017-02-24 15:22:04.000000000 -0500 ++++ pciutils-3.5.4/lib/types.h 2018-03-02 09:31:29.115000000 -0500 +@@ -8,6 +8,8 @@ + + #include + ++#define PCI_HAVE_STDINT_H ++ + #ifndef PCI_HAVE_Uxx_TYPES + + #ifdef PCI_OS_WINDOWS