diff mbox

intel-microcode: new package

Message ID 1348153949-30525-1-git-send-email-rbraun@sceen.net
State Superseded
Headers show

Commit Message

Richard Braun Sept. 20, 2012, 3:12 p.m. UTC
Signed-off-by: Richard Braun <rbraun@sceen.net>
---
 package/Config.in                          |    1 +
 package/intel-microcode/Config.in          |    7 +++++++
 package/intel-microcode/intel-microcode.mk |   22 ++++++++++++++++++++++
 3 files changed, 30 insertions(+), 0 deletions(-)
 create mode 100644 package/intel-microcode/Config.in
 create mode 100644 package/intel-microcode/intel-microcode.mk

Comments

Thomas Petazzoni Sept. 20, 2012, 8:36 p.m. UTC | #1
Dear Richard Braun,

On Thu, 20 Sep 2012 17:12:29 +0200, Richard Braun wrote:

> +INTEL_MICROCODE_VERSION = 20120606
> +INTEL_MICROCODE_SOURCE = microcode-$(INTEL_MICROCODE_VERSION).tgz
> +INTEL_MICROCODE_SITE = http://downloadmirror.intel.com/21385/eng
> +INTEL_MICROCODE_LICENSE = PROPRIETARY

Is there a license file somewhere that states that even though it is
proprietary, one has the right to redistribute the binaries?

> +# 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 $(INTEL_MICROCODE_DIR) -xf -

You can use $(@D) instead of $(INTEL_MICROCODE_DIR) here.

Thomas
Richard Braun Sept. 20, 2012, 9:12 p.m. UTC | #2
On Thu, Sep 20, 2012 at 10:36:46PM +0200, Thomas Petazzoni wrote:
> Is there a license file somewhere that states that even though it is
> proprietary, one has the right to redistribute the binaries?

On the Intel download site, after searching for the last version of the
microcode data file [1], the download link leads to a license agreement
page which describes three license terms, depending on the nature of the
distributor (network administrator, end user or OEM). I think the OEM
license applies to most buildroot users. Here is the content :

"OEM LICENSE: You may reproduce and distribute the Software only as an 
integral part of or incorporated in Your product or as a standalone 
Software maintenance update for existing end users of Your products, 
excluding any other standalone products, subject to these conditions:

1. This Software is licensed for use only in conjunction with Intel 
component products. Use of the Software in conjunction with non-Intel 
component products is not licensed hereunder.
2. You may not copy, modify, rent, sell, distribute or transfer any part 
of the Software except as provided in this Agreement, and you agree to 
prevent unauthorized copying of the Software.
3. You may not reverse engineer, decompile, or disassemble the Software. 
4. You may only distribute the Software to your customers pursuant to a 
written license agreement. Such license agreement may be a "break-the-
seal" license agreement. At a minimum such license shall safeguard 
Intel's ownership rights to the Software.
5. The Software may include portions offered on terms in addition to those
set out here, as set out in a license accompanying those portions."
Thomas Petazzoni Sept. 21, 2012, 8:35 a.m. UTC | #3
Dear Richard Braun,

On Thu, 20 Sep 2012 23:12:55 +0200, Richard Braun wrote:

> On the Intel download site, after searching for the last version of the
> microcode data file [1], the download link leads to a license agreement
> page which describes three license terms, depending on the nature of the
> distributor (network administrator, end user or OEM). I think the OEM
> license applies to most buildroot users. Here is the content :

Ok. Thanks. And there is no zip file or tarball that contains both
the license and the firmware? I'm simply worried about having just
FOO_LICENSE = PROPRIETARY without a proper license file that indicates
what license it is. Or maybe we need to put a special license file in
package/intel-microcode/ and find a way to tell the license
infrastructure that the license file is here rather than in the package
itself?

Cc'ing Luca on this.

Thomas
Richard Braun Sept. 22, 2012, 9:42 a.m. UTC | #4
On Fri, Sep 21, 2012 at 10:35:13AM +0200, Thomas Petazzoni wrote:
> Ok. Thanks. And there is no zip file or tarball that contains both
> the license and the firmware? I'm simply worried about having just
> FOO_LICENSE = PROPRIETARY without a proper license file that indicates
> what license it is. Or maybe we need to put a special license file in
> package/intel-microcode/ and find a way to tell the license
> infrastructure that the license file is here rather than in the package
> itself?

Unfortunately no, the microcode file is the only one.
Richard Braun Sept. 28, 2012, 12:17 p.m. UTC | #5
On Sat, Sep 22, 2012 at 11:42:03AM +0200, Richard Braun wrote:
> Unfortunately no, the microcode file is the only one.

While it's the only file, the license is actually embedded inside, in
plain text. I've modified the package to extract the license as a
separate file in the build directory. The package infrastructure also
had to be slightly change to save legal info for proprietary packages.
Patches will follow.
diff mbox

Patch

diff --git a/package/Config.in b/package/Config.in
index 58dd5e8..e8a3f50 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -212,6 +212,7 @@  source "package/hwdata/Config.in"
 source "package/i2c-tools/Config.in"
 source "package/input-event-daemon/Config.in"
 source "package/input-tools/Config.in"
+source "package/intel-microcode/Config.in"
 source "package/iostat/Config.in"
 source "package/irda-utils/Config.in"
 source "package/kbd/Config.in"
diff --git a/package/intel-microcode/Config.in b/package/intel-microcode/Config.in
new file mode 100644
index 0000000..495ebd7
--- /dev/null
+++ b/package/intel-microcode/Config.in
@@ -0,0 +1,7 @@ 
+config BR2_PACKAGE_INTEL_MICROCODE
+	bool "intel-microcode"
+	depends on BR2_x86_64 || BR2_i386
+	help
+	  This package provides an Intel microcode data file that can be
+	  used to correct processor errors. The iucode-tool package and
+	  proper kernel support are required to upload the microcode.
diff --git a/package/intel-microcode/intel-microcode.mk b/package/intel-microcode/intel-microcode.mk
new file mode 100644
index 0000000..5f60272
--- /dev/null
+++ b/package/intel-microcode/intel-microcode.mk
@@ -0,0 +1,22 @@ 
+#############################################################
+#
+# intel-microcode
+#
+#############################################################
+
+INTEL_MICROCODE_VERSION = 20120606
+INTEL_MICROCODE_SOURCE = microcode-$(INTEL_MICROCODE_VERSION).tgz
+INTEL_MICROCODE_SITE = http://downloadmirror.intel.com/21385/eng
+INTEL_MICROCODE_LICENSE = PROPRIETARY
+
+# 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 $(INTEL_MICROCODE_DIR) -xf -
+endef
+
+define INTEL_MICROCODE_INSTALL_TARGET_CMDS
+	$(INSTALL) -D -m 0644 $(@D)/microcode.dat \
+		$(TARGET_DIR)/usr/share/misc/intel-microcode.dat
+endef
+
+$(eval $(generic-package))