intel-microcode: use <PKG>_STRIP_COMPONENTS
authorLuca Ceresoli <luca@lucaceresoli.net>
Sat, 11 Jul 2015 14:15:06 +0000 (16:15 +0200)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Sat, 11 Jul 2015 22:51:19 +0000 (00:51 +0200)
Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/intel-microcode/intel-microcode.mk

index 4e8ea906c624f67fbaa3d505b046b3ea8c6e2803..23c4b3ebfb474f7de404861eccdcd616d8e3deeb 100644 (file)
@@ -7,17 +7,17 @@
 INTEL_MICROCODE_VERSION = 20150107
 INTEL_MICROCODE_SOURCE = microcode-$(INTEL_MICROCODE_VERSION).tgz
 INTEL_MICROCODE_SITE = http://downloadmirror.intel.com/24616/eng
+INTEL_MICROCODE_STRIP_COMPONENTS = 0
 INTEL_MICROCODE_LICENSE = PROPRIETARY
 INTEL_MICROCODE_LICENSE_FILES = license.txt
 INTEL_MICROCODE_REDISTRIBUTE = NO
 
-# N.B. Don't strip any path components during extraction.
-define INTEL_MICROCODE_EXTRACT_CMDS
-       gzip -d -c $(DL_DIR)/$(INTEL_MICROCODE_SOURCE) | \
-       tar --strip-components=0 -C $(@D) -xf -
+define INTEL_MICROCODE_EXTRACT_LICENSE
        head -n 33 $(@D)/microcode.dat > $(@D)/license.txt
 endef
 
+INTEL_MICROCODE_POST_EXTRACT_HOOKS += INTEL_MICROCODE_EXTRACT_LICENSE
+
 define INTEL_MICROCODE_INSTALL_TARGET_CMDS
        $(INSTALL) -D -m 0644 $(@D)/microcode.dat \
                $(TARGET_DIR)/usr/share/misc/intel-microcode.dat