From patchwork Sun Nov 4 21:02:38 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Carlos Santos X-Patchwork-Id: 992793 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.138; helo=whitealder.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=datacom.com.br Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42p7Z148QSzB6N4 for ; Mon, 5 Nov 2018 08:03:05 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id EC98E86866; Sun, 4 Nov 2018 21:03:01 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id t1-+OnrQVjto; Sun, 4 Nov 2018 21:02:58 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id D7C90867BB; Sun, 4 Nov 2018 21:02:58 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 58C861BF3D1 for ; Sun, 4 Nov 2018 21:02:56 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 53BD722854 for ; Sun, 4 Nov 2018 21:02:56 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 2ZeCGQbfIZ5J for ; Sun, 4 Nov 2018 21:02:54 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail.datacom.com.br (mx.datacom.ind.br [177.66.5.10]) by silver.osuosl.org (Postfix) with ESMTPS id 18C412280F for ; Sun, 4 Nov 2018 21:02:54 +0000 (UTC) Received: from mail.datacom.com.br (localhost [127.0.0.1]) by mail.datacom.com.br (Postfix) with ESMTPS id 712091BA0A7F; Sun, 4 Nov 2018 19:03:19 -0200 (-02) Received: from localhost (localhost [127.0.0.1]) by mail.datacom.com.br (Postfix) with ESMTP id 613AC1BA05C7; Sun, 4 Nov 2018 19:03:19 -0200 (-02) Received: from mail.datacom.com.br ([127.0.0.1]) by localhost (mail.datacom.com.br [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id LeS9WAD_fdWa; Sun, 4 Nov 2018 19:03:19 -0200 (-02) Received: from p7-1130br.casantos.org (unknown [179.162.0.126]) by mail.datacom.com.br (Postfix) with ESMTPSA id F130A1BA05E9; Sun, 4 Nov 2018 19:03:18 -0200 (-02) From: Carlos Santos To: buildroot@buildroot.org Date: Sun, 4 Nov 2018 19:02:38 -0200 Message-Id: <20181104210241.20237-2-casantos@datacom.com.br> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181104210241.20237-1-casantos@datacom.com.br> References: <20181104210241.20237-1-casantos@datacom.com.br> Subject: [Buildroot] [PATCH 1/4] linux: enable MICROCODE_INTEL if intel-microcode is selected X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Maxime Hadjinlian MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" We already turn on kernel features for several packages, so let's do it for intel-microcode too, otherwise it's impossible to load the microcode (by means of iucode-tools). Signed-off-by: Carlos Santos --- linux/linux.mk | 3 +++ 1 file changed, 3 insertions(+) diff --git a/linux/linux.mk b/linux/linux.mk index 476ff16329..b0cdbe933d 100644 --- a/linux/linux.mk +++ b/linux/linux.mk @@ -323,6 +323,9 @@ define LINUX_KCONFIG_FIXUP_CMDS $(if $(BR2_PACKAGE_AUDIT), $(call KCONFIG_ENABLE_OPT,CONFIG_NET,$(@D)/.config) $(call KCONFIG_ENABLE_OPT,CONFIG_AUDIT,$(@D)/.config)) + $(if $(BR2_PACKAGE_INTEL_MICROCODE), + $(call KCONFIG_ENABLE_OPT,CONFIG_MICROCODE,$(@D)/.config) + $(call KCONFIG_ENABLE_OPT,CONFIG_MICROCODE_INTEL,$(@D)/.config)) $(if $(BR2_PACKAGE_KTAP), $(call KCONFIG_ENABLE_OPT,CONFIG_DEBUG_FS,$(@D)/.config) $(call KCONFIG_ENABLE_OPT,CONFIG_ENABLE_DEFAULT_TRACERS,$(@D)/.config) From patchwork Sun Nov 4 21:02:39 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Carlos Santos X-Patchwork-Id: 992791 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.137; helo=fraxinus.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=datacom.com.br Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42p7Yx41NGzB6N4 for ; Mon, 5 Nov 2018 08:03:01 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id E0D0B85E24; Sun, 4 Nov 2018 21:02:58 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id OuD6tp6SWepU; Sun, 4 Nov 2018 21:02:58 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 3AD5685DDC; Sun, 4 Nov 2018 21:02:58 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 49FE51C0F07 for ; Sun, 4 Nov 2018 21:02:56 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 4766C85DDC for ; Sun, 4 Nov 2018 21:02:56 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id aIFqP7Y2qZ6S for ; Sun, 4 Nov 2018 21:02:54 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail.datacom.com.br (mx.datacom.ind.br [177.66.5.10]) by fraxinus.osuosl.org (Postfix) with ESMTPS id 65F9885DDB for ; Sun, 4 Nov 2018 21:02:54 +0000 (UTC) Received: from mail.datacom.com.br (localhost [127.0.0.1]) by mail.datacom.com.br (Postfix) with ESMTPS id E4DE91BA05E9; Sun, 4 Nov 2018 19:03:19 -0200 (-02) Received: from localhost (localhost [127.0.0.1]) by mail.datacom.com.br (Postfix) with ESMTP id CE43B1BA05C7; Sun, 4 Nov 2018 19:03:19 -0200 (-02) Received: from mail.datacom.com.br ([127.0.0.1]) by localhost (mail.datacom.com.br [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id DYR61CFJKP4J; Sun, 4 Nov 2018 19:03:19 -0200 (-02) Received: from p7-1130br.casantos.org (unknown [179.162.0.126]) by mail.datacom.com.br (Postfix) with ESMTPSA id 6CC851BA08D7; Sun, 4 Nov 2018 19:03:19 -0200 (-02) From: Carlos Santos To: buildroot@buildroot.org Date: Sun, 4 Nov 2018 19:02:39 -0200 Message-Id: <20181104210241.20237-3-casantos@datacom.com.br> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181104210241.20237-1-casantos@datacom.com.br> References: <20181104210241.20237-1-casantos@datacom.com.br> Subject: [Buildroot] [PATCH 2/4] intel-microcode: bump to version 20180807a X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Maxime Hadjinlian MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" The big "intel-microcode.dat" text file is gone. Only binary files are provided, in the "intel-ucode" directory. Install it at /lib/firmware/, like linux-firmware does, and update the iucode-tool init script to use that path. We don't install the microcode under "intel-ucode-with-caveats", since it needs special commits in the Linux kernel (see "relnotes" for more information). Tested on an equipment with Intel C3000 processor. Signed-off-by: Carlos Santos --- package/intel-microcode/intel-microcode.hash | 4 ++-- package/intel-microcode/intel-microcode.mk | 16 +++++----------- package/iucode-tool/S00iucode-tool | 4 ++-- 3 files changed, 9 insertions(+), 15 deletions(-) diff --git a/package/intel-microcode/intel-microcode.hash b/package/intel-microcode/intel-microcode.hash index 999b27299d..183ba5aeec 100644 --- a/package/intel-microcode/intel-microcode.hash +++ b/package/intel-microcode/intel-microcode.hash @@ -1,3 +1,3 @@ # Locally computed -sha256 0b381face2df1b0a829dc4fa8fa93f47f39e11b1c9c22ebd44f8614657c1e779 microcode-20180312.tgz -sha256 6d4deb65ca688d930e188bf93f78430f134097b161e6df4a2ef00728e14965e3 license.txt +sha256 46ab18699ec42eb6cc01ee1846ec4d7ca979766dee2156f92d69e2f6df548137 microcode-20180807a.tgz +sha256 c4698c6105d59fec11ad0929e77a003445c560c7706c089990030acbf10c9372 license diff --git a/package/intel-microcode/intel-microcode.mk b/package/intel-microcode/intel-microcode.mk index e3134b6408..2113873509 100644 --- a/package/intel-microcode/intel-microcode.mk +++ b/package/intel-microcode/intel-microcode.mk @@ -4,23 +4,17 @@ # ################################################################################ -INTEL_MICROCODE_VERSION = 20180312 +INTEL_MICROCODE_VERSION = 20180807a INTEL_MICROCODE_SOURCE = microcode-$(INTEL_MICROCODE_VERSION).tgz -INTEL_MICROCODE_SITE = http://downloadmirror.intel.com/27591/eng +INTEL_MICROCODE_SITE = https://downloadmirror.intel.com/28087/eng INTEL_MICROCODE_STRIP_COMPONENTS = 0 INTEL_MICROCODE_LICENSE = PROPRIETARY -INTEL_MICROCODE_LICENSE_FILES = license.txt +INTEL_MICROCODE_LICENSE_FILES = license INTEL_MICROCODE_REDISTRIBUTE = NO -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 + $(INSTALL) -D -m 0644 -t $(TARGET_DIR)/lib/firmware/intel-ucode \ + $(@D)/intel-ucode/* endef $(eval $(generic-package)) diff --git a/package/iucode-tool/S00iucode-tool b/package/iucode-tool/S00iucode-tool index 0c1e409de2..a97b33c045 100644 --- a/package/iucode-tool/S00iucode-tool +++ b/package/iucode-tool/S00iucode-tool @@ -3,12 +3,12 @@ # Upload microcode into the processor. # -microcode_file="/usr/share/misc/intel-microcode.dat" +MICROCODE_DIR="/lib/firmware/intel-ucode" case "$1" in start) echo "Starting iucode-tool:" - /usr/sbin/iucode_tool -k $microcode_file + /usr/sbin/iucode_tool -k "$MICROCODE_DIR" echo "done" ;; stop) From patchwork Sun Nov 4 21:02:40 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Carlos Santos X-Patchwork-Id: 992794 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.136; helo=silver.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=datacom.com.br Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42p7Z40r2WzB6N4 for ; Mon, 5 Nov 2018 08:03:08 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 7C948228AE; Sun, 4 Nov 2018 21:03:05 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id CoPbi8agap4h; Sun, 4 Nov 2018 21:03:04 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 8409B2079D; Sun, 4 Nov 2018 21:03:04 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 79EF41BF3D1 for ; Sun, 4 Nov 2018 21:02:59 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 77A7987976 for ; Sun, 4 Nov 2018 21:02:59 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 1aDnWXymGiHh for ; Sun, 4 Nov 2018 21:02:55 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail.datacom.com.br (mx.datacom.ind.br [177.66.5.10]) by hemlock.osuosl.org (Postfix) with ESMTPS id E7918878F3 for ; Sun, 4 Nov 2018 21:02:54 +0000 (UTC) Received: from mail.datacom.com.br (localhost [127.0.0.1]) by mail.datacom.com.br (Postfix) with ESMTPS id 4F36C1BA067E; Sun, 4 Nov 2018 19:03:20 -0200 (-02) Received: from localhost (localhost [127.0.0.1]) by mail.datacom.com.br (Postfix) with ESMTP id 3B5961BA05C7; Sun, 4 Nov 2018 19:03:20 -0200 (-02) Received: from mail.datacom.com.br ([127.0.0.1]) by localhost (mail.datacom.com.br [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id KhbFwzCdHt79; Sun, 4 Nov 2018 19:03:20 -0200 (-02) Received: from p7-1130br.casantos.org (unknown [179.162.0.126]) by mail.datacom.com.br (Postfix) with ESMTPSA id D43D11BA067E; Sun, 4 Nov 2018 19:03:19 -0200 (-02) From: Carlos Santos To: buildroot@buildroot.org Date: Sun, 4 Nov 2018 19:02:40 -0200 Message-Id: <20181104210241.20237-4-casantos@datacom.com.br> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181104210241.20237-1-casantos@datacom.com.br> References: <20181104210241.20237-1-casantos@datacom.com.br> Subject: [Buildroot] [PATCH 3/4] iucode-tool: bump to version 2.3.1 X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Maxime Hadjinlian MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Brings several fixes and enhancements. Check the change log at https://gitlab.com/iucode-tool/iucode-tool/raw/v2.3.1/ChangeLog Tested on an equipment with Intel C3000 processor. Signed-off-by: Carlos Santos --- package/iucode-tool/iucode-tool.hash | 2 +- package/iucode-tool/iucode-tool.mk | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package/iucode-tool/iucode-tool.hash b/package/iucode-tool/iucode-tool.hash index 1dab8de978..6d8fb635d0 100644 --- a/package/iucode-tool/iucode-tool.hash +++ b/package/iucode-tool/iucode-tool.hash @@ -1,3 +1,3 @@ # Locally computed -sha256 9810daf925b8a9ca244adc4e1916bcab65601c9ebe87e91c2281f78055982971 iucode-tool_2.2.tar.xz +sha256 12b88efa4d0d95af08db05a50b3dcb217c0eb2bfc67b483779e33d498ddb2f95 iucode-tool_2.3.1.tar.xz sha256 ab15fd526bd8dd18a9e77ebc139656bf4d33e97fc7238cd11bf60e2b9b8666c6 COPYING diff --git a/package/iucode-tool/iucode-tool.mk b/package/iucode-tool/iucode-tool.mk index 38f9da438e..e900888d7d 100644 --- a/package/iucode-tool/iucode-tool.mk +++ b/package/iucode-tool/iucode-tool.mk @@ -4,7 +4,7 @@ # ################################################################################ -IUCODE_TOOL_VERSION = 2.2 +IUCODE_TOOL_VERSION = 2.3.1 IUCODE_TOOL_SOURCE = iucode-tool_$(IUCODE_TOOL_VERSION).tar.xz IUCODE_TOOL_SITE = https://gitlab.com/iucode-tool/releases/raw/master ifeq ($(BR2_PACKAGE_ARGP_STANDALONE),y) From patchwork Sun Nov 4 21:02:41 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Carlos Santos X-Patchwork-Id: 992792 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.133; helo=hemlock.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=datacom.com.br Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42p7Yy6Nx2zB6NF for ; Mon, 5 Nov 2018 08:03:02 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 11FE48798D; Sun, 4 Nov 2018 21:03:00 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id kTfCyBK1IPvn; Sun, 4 Nov 2018 21:02:57 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 827D38792A; Sun, 4 Nov 2018 21:02:57 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 3BA561BF3D1 for ; Sun, 4 Nov 2018 21:02:56 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 38E6C85DF2 for ; Sun, 4 Nov 2018 21:02:56 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Hhe-E10ScfQ8 for ; Sun, 4 Nov 2018 21:02:55 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail.datacom.com.br (mx.datacom.ind.br [177.66.5.10]) by fraxinus.osuosl.org (Postfix) with ESMTPS id D067685DDC for ; Sun, 4 Nov 2018 21:02:54 +0000 (UTC) Received: from mail.datacom.com.br (localhost [127.0.0.1]) by mail.datacom.com.br (Postfix) with ESMTPS id B0B641BA08D7; Sun, 4 Nov 2018 19:03:20 -0200 (-02) Received: from localhost (localhost [127.0.0.1]) by mail.datacom.com.br (Postfix) with ESMTP id 9D63F1BA05C7; Sun, 4 Nov 2018 19:03:20 -0200 (-02) Received: from mail.datacom.com.br ([127.0.0.1]) by localhost (mail.datacom.com.br [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id RUYm2ImT33aE; Sun, 4 Nov 2018 19:03:20 -0200 (-02) Received: from p7-1130br.casantos.org (unknown [179.162.0.126]) by mail.datacom.com.br (Postfix) with ESMTPSA id 433AA1BA0AB9; Sun, 4 Nov 2018 19:03:20 -0200 (-02) From: Carlos Santos To: buildroot@buildroot.org Date: Sun, 4 Nov 2018 19:02:41 -0200 Message-Id: <20181104210241.20237-5-casantos@datacom.com.br> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181104210241.20237-1-casantos@datacom.com.br> References: <20181104210241.20237-1-casantos@datacom.com.br> Subject: [Buildroot] [PATCH 4/4] iucode-tool: rewrite init script X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Maxime Hadjinlian MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" - Indent with tabs. - Use a function for start. - Use a dummy function that reports OK for stop, restart and reload. - Pass "-q" to iucode_tool to inhipt usual output taht would otherwise interfere with the operation status report. Signed-off-by: Carlos Santos --- package/iucode-tool/S00iucode-tool | 37 +++++++++++++++++++----------- 1 file changed, 23 insertions(+), 14 deletions(-) diff --git a/package/iucode-tool/S00iucode-tool b/package/iucode-tool/S00iucode-tool index a97b33c045..eb9f93ad6e 100644 --- a/package/iucode-tool/S00iucode-tool +++ b/package/iucode-tool/S00iucode-tool @@ -5,19 +5,28 @@ MICROCODE_DIR="/lib/firmware/intel-ucode" +start() { + printf 'Starting iucode-tool: ' + /usr/sbin/iucode_tool -q -k "$MICROCODE_DIR" + status="$?" + if [ "$status" = 0 ]; then + echo "OK" + else + echo "FAIL" + fi + return "$status" +} + +dummy() { + echo "$1" | sed 's/^./\U&\E/;s/p/pp/;s/$/ing iucode-tool: OK/' +} + case "$1" in - start) - echo "Starting iucode-tool:" - /usr/sbin/iucode_tool -k "$MICROCODE_DIR" - echo "done" - ;; - stop) - ;; - restart|reload) - ;; - *) - echo "Usage: $0 {start|stop|restart}" - exit 1 + start) + start;; + stop|restart|reload) + dummy "$1";; + *) + echo "Usage: $0 {start|stop|restart}" + exit 1 esac - -exit $?