From a37e1f434dc1bb232ab05a1f48d537d28c85d7a0 Mon Sep 17 00:00:00 2001 From: Trammell hudson Date: Tue, 30 Jul 2019 15:36:57 +0200 Subject: [PATCH] add Intel msrtools commands --- Makefile | 1 + boards/qemu-coreboot/qemu-coreboot.config | 1 + modules/msrtools | 26 +++++++++++++++++++++++ 3 files changed, 28 insertions(+) create mode 100644 modules/msrtools diff --git a/Makefile b/Makefile index 74818a11..cc5cac6a 100644 --- a/Makefile +++ b/Makefile @@ -424,6 +424,7 @@ bin_modules-$(CONFIG_NEWT) += newt bin_modules-$(CONFIG_CAIRO) += cairo bin_modules-$(CONFIG_FBWHIPTAIL) += fbwhiptail bin_modules-$(CONFIG_LIBREMKEY) += libremkey-hotp-verification +bin_modules-$(CONFIG_MSRTOOLS) += msrtools $(foreach m, $(bin_modules-y), \ $(call map,initrd_bin_add,$(call bins,$m)) \ diff --git a/boards/qemu-coreboot/qemu-coreboot.config b/boards/qemu-coreboot/qemu-coreboot.config index d670dc21..1dc02569 100644 --- a/boards/qemu-coreboot/qemu-coreboot.config +++ b/boards/qemu-coreboot/qemu-coreboot.config @@ -21,6 +21,7 @@ CONFIG_GPG2=y CONFIG_LVM2=y CONFIG_MBEDTLS=y CONFIG_DROPBEAR=y +CONFIG_MSRTOOLS=y #Uncomment only one of the following block #Required for graphical gui-init (FBWhiptail) diff --git a/modules/msrtools b/modules/msrtools new file mode 100644 index 00000000..9adfab0c --- /dev/null +++ b/modules/msrtools @@ -0,0 +1,26 @@ +modules-$(CONFIG_MSRTOOLS) += msrtools + +msrtools_depends := $(musl_dep) + +msrtools_version := git +msrtools_repo := https://github.com/osresearch/msr-tools + +#msrtools_version := 1.3 +msrtools_dir := msrtools-$(msrtools_version) +msrtools_tar := msr-tools-$(msrtools_version).tar.gz +msrtools_url := https://github.com/intel/msr-tools/archive/msr-tools-$(msrtools_version).tar.gz +msrtools_hash := e8205aa3d19e536080f5974ed06ab9a88c4c3f37870c2f6a3a08a2f39302c22c + +msrtools_target := \ + $(CROSS_TOOLS) \ + CFLAGS="-I$(INSTALL)/include" \ + LDFLAGS="-L$(INSTALL)/lib" \ + +msrtools_output := \ + wrmsr \ + rdmsr \ + cpuid \ + +msrtools_libraries := \ + +msrtools_configure :=