Skip to contentSkip to conversation

microcode-ctl: add new recipe

PATCH In review [email protected] 2 participants 4 messages Jun 15, 2017 – Jun 16, 2017

lore
Share & tools
lore
#0 lore raw

v2 cover microcode-ctl: add new recipe

From: Jackie Huang <[email protected]>

v2 comments:
- fix the licenses and add Intel-ucode license file
- remove the un-needed MACHINE specific variable

--
The following changes since commit 0abf5af3ffd3d13c009a8ffcd5a6f045c36be837:

opencv: fix runtime dependencies. (2017-06-12 06:56:45 +0200)

are available in the git repository at:

git://git.pokylinux.org/poky-contrib.git jhuang0/r_up_microcode-v2_170614_0
http://git.pokylinux.org/cgit.cgi//log/?h=jhuang0/r_up_microcode-v2_170614_0

Jackie Huang (1):
microcode-ctl: add new recipe

 meta-oe/licenses/Intel-ucode                       | 30 ++++++++++
 .../0001-add-support-for-other-distributions.patch | 27 +++++++++
 .../files/0001-fix-the-help-return-code.patch      | 57 +++++++++++++++++++
 .../files/fix-No-GNU_HASH-in-the-elf-binary.patch  | 30 ++++++++++
 .../microcode-ctl/files/microcode_ctl.service      | 11 ++++
 .../recipes-bsp/microcode-ctl/microcode-ctl_git.bb | 65 ++++++++++++++++++++++
 6 files changed, 220 insertions(+)
 create mode 100644 meta-oe/licenses/Intel-ucode
 create mode 100644 meta-oe/recipes-bsp/microcode-ctl/files/0001-add-support-for-other-distributions.patch
 create mode 100644 meta-oe/recipes-bsp/microcode-ctl/files/0001-fix-the-help-return-code.patch
 create mode 100644 meta-oe/recipes-bsp/microcode-ctl/files/fix-No-GNU_HASH-in-the-elf-binary.patch
 create mode 100644 meta-oe/recipes-bsp/microcode-ctl/files/microcode_ctl.service
 create mode 100755 meta-oe/recipes-bsp/microcode-ctl/microcode-ctl_git.bb
Signature · 1 line
2.11.0
#1 lore raw

PATCH v2 1/1 microcode-ctl: add new recipe

From: Jackie Huang <[email protected]>

The microcode_ctl utility is a companion to the
IA32 microcode driver.

---
 meta-oe/licenses/Intel-ucode                       | 30 ++++++++++
 .../0001-add-support-for-other-distributions.patch | 27 +++++++++
 .../files/0001-fix-the-help-return-code.patch      | 57 +++++++++++++++++++
 .../files/fix-No-GNU_HASH-in-the-elf-binary.patch  | 30 ++++++++++
 .../microcode-ctl/files/microcode_ctl.service      | 11 ++++
 .../recipes-bsp/microcode-ctl/microcode-ctl_git.bb | 65 ++++++++++++++++++++++
 6 files changed, 220 insertions(+)
 create mode 100644 meta-oe/licenses/Intel-ucode
 create mode 100644 meta-oe/recipes-bsp/microcode-ctl/files/0001-add-support-for-other-distributions.patch
 create mode 100644 meta-oe/recipes-bsp/microcode-ctl/files/0001-fix-the-help-return-code.patch
 create mode 100644 meta-oe/recipes-bsp/microcode-ctl/files/fix-No-GNU_HASH-in-the-elf-binary.patch
 create mode 100644 meta-oe/recipes-bsp/microcode-ctl/files/microcode_ctl.service
 create mode 100755 meta-oe/recipes-bsp/microcode-ctl/microcode-ctl_git.bb
meta-oe/licenses/Intel-ucode new file +30 -0
new file mode 100644
index 000000000..964953bb9
@@ -0,0 +1,30 @@
+    Copyright (c) <1995-2017>, Intel Corporation.
+All rights reserved.
+
+Redistribution. Redistribution and use in binary form, without modification, are
+permitted provided that the following conditions are met:
+    .Redistributions must reproduce the above copyright notice and the following
+disclaimer in the documentation and/or other materials provided with the
+distribution.
+    .Neither the name of Intel Corporation nor the names of its suppliers may be used
+to endorse or promote products derived from this software without specific prior
+written permission.
+    .No reverse engineering, decompilation, or disassembly of this software is
+permitted.
+    ."Binary form" includes any format commonly used for electronic conveyance
+which is a reversible, bit-exact translation of binary representation to ASCII or
+ISO text, for example, "uuencode."
+
+DISCLAIMER. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT
+HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
+WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
+OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
meta-oe/recipes-bsp/microcode-ctl/files/0001-add-support-for-other-distributions.patch new file +27 -0
new file mode 100644
index 000000000..fe5428493
@@ -0,0 +1,27 @@
+Subject: [PATCH] add support for other distributions
+
+Upstream-Status: Inappropriate [OE specific]
+
+Signed-off-by: Jackie Huang <[email protected]>
+---
+ microcode_ctl.start | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/microcode_ctl.start b/microcode_ctl.start
+index 6fa9d72..e9321d0 100755
+--- a/microcode_ctl.start
++++ b/microcode_ctl.start
+@@ -47,8 +47,8 @@ elif [ -f /etc/slackware-version ]; then
+ 		END=slack_end
+ 	fi
+ else
+-	echo "$0: Can't guess distribution, aborting!"
+-	exit 1
++	START=
++	END=
+ fi
+ 
+ # Lets just be sure we have a device file...
+-- 
+2.11.0
+
meta-oe/recipes-bsp/microcode-ctl/files/0001-fix-the-help-return-code.patch new file +57 -0

57 lines not on this page · raw message

meta-oe/recipes-bsp/microcode-ctl/files/fix-No-GNU_HASH-in-the-elf-binary.patch new file +30 -0
new file mode 100644
index 000000000..87d8f7dfe
@@ -0,0 +1,30 @@
+From a5d4baf79ee332cf73e5259a2568958babcdbce2 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <[email protected]>
+Date: Mon, 1 Aug 2016 07:00:35 -0400
+Subject: [PATCH] fix No GNU_HASH in the elf binary
+
+Let recipe's LDFLAGS work in Makefile.
+
+Upstream-Status: Inappropriate [embedded specific]
+
+Signed-off-by: Hongxu Jia <[email protected]>
+---
+ Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile b/Makefile
+index 590ae7e..d4e0610 100644
+--- a/Makefile
++++ b/Makefile
+@@ -37,7 +37,7 @@ RCFILETO        = $(RCDIR)/$(RCHOMEDIR)
+ all: microcode_ctl
+ 
+ microcode_ctl: microcode_ctl.c
+-	$(CC) $(CFLAGS) -o $(PROGRAM) microcode_ctl.c
++	$(CC) $(CFLAGS) -o $(PROGRAM) microcode_ctl.c $(LDFLAGS)
+ 	mkdir intel-ucode amd-ucode
+ 	tar xfz $(MICROCODE_INTEL) -C intel-ucode
+ 	tar --strip-components 1 -xf $(MICROCODE_AMD) -C amd-ucode
+-- 
+2.8.1
+
meta-oe/recipes-bsp/microcode-ctl/files/microcode_ctl.service new file +11 -0
new file mode 100644
index 000000000..0658ff378
@@ -0,0 +1,11 @@
+[Unit]
+Description=Apply Cpu Microcode
+
+[Service]
+Type=forking
+KillMode=process
+RemainAfterExit=yes
+ExecStart=@SBINDIR@/microcode_ctl -Qu
+
+[Install]
+WantedBy=multi-user.target
meta-oe/recipes-bsp/microcode-ctl/microcode-ctl_git.bb new file +65 -0

65 lines not on this page · raw message

Signature · 1 line
2.11.0
#2 lore raw
Quoted 3 lines · On 15 June 2017 at 02:36, <[email protected]> wrote:

The microcode_ctl utility is a companion to the
IA32 microcode driver.

Wouldn't it make sense for this to be in meta-intel, alongside the microcode? Also what's the difference between this and iucode-tool, which is already in meta-intel?

Ross

#3 lore raw
Quoted 9 lines

From: Burton, Ross [mailto:[email protected]]
Sent: Thursday, June 15, 2017 19:41
To: Huang, Jie (Jackie)
Cc: OpenEmbedded Devel List
Subject: Re: [oe] [meta-oe][PATCH 1/1 v2] microcode-ctl: add new recipe

Quoted 5 lines

On 15 June 2017 at 02:36, <[email protected]> wrote:
The microcode_ctl utility is a companion to the IA32 microcode driver.

Wouldn't it make sense for this to be in meta-intel, alongside the microcode? Also what's the difference between this and iucode-tool, which is already in meta-intel?

Sorry I didn't use meta-intel and not aware of that, and yes, it make senses to be in meta-intel, I will investigate the difference to see if this still needed.

Thanks,
Jackie

Quoted 3 lines

Ross