From patchwork Tue Nov 20 16:20:39 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomasz Maciej Nowak X-Patchwork-Id: 1000635 X-Patchwork-Delegate: blogic@openwrt.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=lists.openwrt.org (client-ip=198.137.202.133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=o2.pl Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="joV6Z627"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.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 42zsKN1h3cz9s0n for ; Wed, 21 Nov 2018 03:55:52 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Subject:MIME-Version:References: In-Reply-To:Message-Id:Date:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=etgMUEUoDajMvhWaTmjXS/c9qerxexpcktb1zzCYcFs=; b=joV6Z627MFfv5R bClMUUVWuhL6zEguTtH2TuCR2fCOqFk+9R3ma1IMALTW4VGe8fCAwTxmSFMoJbMPyafcwr1MBHzb7 3eeP8qU0HRC7TKcoxKtrAW1FpRx4XANzIOPfcSPMOEBgmdEVgcensStaIy5rAW8+nhAOs9slwQN0w vFB5dIG4Zn2cqP+G3+V+8UbIlVTaAHGsSnJZKSEFCNFJZM+QCik2hOvSp2VexIGh8IYmZI/WVr86W simmfLQs/kKPaPg7WPoa8RR06NLOiz+GHuGUUDTRsOSrEjMTfw4shZoNg22uiyvbw1xgUyyA+wFKq ySwQ/GK8gmWif+Fmu6aQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gP9JS-0003Fs-KF; Tue, 20 Nov 2018 16:55:46 +0000 Received: from mx-out.tlen.pl ([193.222.135.142]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gP9Bj-00070Y-N2 for openwrt-devel@lists.openwrt.org; Tue, 20 Nov 2018 16:47:49 +0000 Received: (wp-smtpd smtp.tlen.pl 21817 invoked from network); 20 Nov 2018 17:20:56 +0100 Received: from 131.ip-164-132-48.eu (HELO localhost.localdomain) (tomek_n@o2.pl@[164.132.48.131]) (envelope-sender ) by smtp.tlen.pl (WP-SMTPD) with ECDHE-RSA-AES256-GCM-SHA384 encrypted SMTP for ; 20 Nov 2018 17:20:56 +0100 From: Tomasz Maciej Nowak To: openwrt-devel@lists.openwrt.org Date: Tue, 20 Nov 2018 17:20:39 +0100 Message-Id: <20181120162044.16371-2-tomek_n@o2.pl> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181120162044.16371-1-tomek_n@o2.pl> References: <20181120162044.16371-1-tomek_n@o2.pl> MIME-Version: 1.0 X-WP-MailID: 45ab1d9ab8e4069f810b19c6796230cd X-WP-AV: skaner antywirusowy Poczty o2 X-WP-SPAM: NO 0000000 [0ZME] X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181120_084747_983452_9F925CC9 X-CRM114-Status: UNSURE ( 6.00 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 0.0 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [193.222.135.142 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (tomek_n[at]o2.pl) Subject: [OpenWrt-Devel] [PATCH v4 1/6] include/rootfs.mk: remove boot directory X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Tomasz Maciej Nowak Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org Currently every file in boot directory is copied over target /boot on root file system and is usually inaccessible because appropriate boot file system is mounted on top of it. Therefore remove /boot, which in result will also save space on target root file system. Signed-off-by: Tomasz Maciej Nowak --- include/rootfs.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/include/rootfs.mk b/include/rootfs.mk index 76425c017a..dc8621dbae 100644 --- a/include/rootfs.mk +++ b/include/rootfs.mk @@ -90,6 +90,7 @@ define prepare_rootfs rm -f $(1)/usr/lib/opkg/lists/* rm -f $(1)/usr/lib/opkg/info/*.postinst* rm -f $(1)/var/lock/*.lock + rm -rf $(1)/boot $(call clean_ipkg,$(1)) $(call mklibs,$(1)) endef From patchwork Tue Nov 20 16:20:40 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomasz Maciej Nowak X-Patchwork-Id: 1000634 X-Patchwork-Delegate: blogic@openwrt.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=lists.openwrt.org (client-ip=198.137.202.133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=o2.pl Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="F80bTKDM"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.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 42zsK270NVz9s0n for ; Wed, 21 Nov 2018 03:55:34 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Subject:MIME-Version:References: In-Reply-To:Message-Id:Date:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=2o8HJBjLaJiMk+oxtTgV5UQdNtMqw1U/u2859PU3Q9A=; b=F80bTKDMbGte8J aux2iiMvSpZrdrr5QxSZci7i285N7iSSZWiQGjNLnv5CVOmMusr5GNxbjwAClueaVPKUtupyiUBUz khq7LnXptnKYokwYHGeXC+X44TtA+NdyQ+AMSpT/2ZDOd80nZLjUtPB4UpsvHkygRBLg7yz5oldJn LX53dc1kPMd3XtAYVkPZn+3CWqNE+AmNSpYEZypgPxdUNTEDPIF3l6EEcYX5FHH/agtacrHERsBLo KHZXhapuwMR2EbM8gkL9LTCET86G8jSnQz+rA8q92m0Yv95naenymKVFUh8FRXT/YeB+4gV0nEvOQ NZIoKEfMlQ0B3mQJn8Bw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gP9J6-0002h9-9J; Tue, 20 Nov 2018 16:55:24 +0000 Received: from mx-out.tlen.pl ([193.222.135.142]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gP9Bj-00070Z-N0 for openwrt-devel@lists.openwrt.org; Tue, 20 Nov 2018 16:47:49 +0000 Received: (wp-smtpd smtp.tlen.pl 22793 invoked from network); 20 Nov 2018 17:20:56 +0100 Received: from 131.ip-164-132-48.eu (HELO localhost.localdomain) (tomek_n@o2.pl@[164.132.48.131]) (envelope-sender ) by smtp.tlen.pl (WP-SMTPD) with ECDHE-RSA-AES256-GCM-SHA384 encrypted SMTP for ; 20 Nov 2018 17:20:56 +0100 From: Tomasz Maciej Nowak To: openwrt-devel@lists.openwrt.org Date: Tue, 20 Nov 2018 17:20:40 +0100 Message-Id: <20181120162044.16371-3-tomek_n@o2.pl> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181120162044.16371-1-tomek_n@o2.pl> References: <20181120162044.16371-1-tomek_n@o2.pl> MIME-Version: 1.0 X-WP-MailID: b7b1e7f820055c4901ebfb10fd410613 X-WP-AV: skaner antywirusowy Poczty o2 X-WP-SPAM: NO 0000000 [obO0] X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181120_084747_973208_0F28B8F1 X-CRM114-Status: UNSURE ( 6.29 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 0.0 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [193.222.135.142 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (tomek_n[at]o2.pl) Subject: [OpenWrt-Devel] [PATCH v4 2/6] x86: mount writable bootfs X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Tomasz Maciej Nowak Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org Mount boot file system with rw option to allow installation of packages which install files to /boot directory. Signed-off-by: Tomasz Maciej Nowak --- .../linux/x86/base-files/lib/preinit/79_move_config | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/target/linux/x86/base-files/lib/preinit/79_move_config b/target/linux/x86/base-files/lib/preinit/79_move_config index 7b34d9e5da..debce43557 100644 --- a/target/linux/x86/base-files/lib/preinit/79_move_config +++ b/target/linux/x86/base-files/lib/preinit/79_move_config @@ -8,16 +8,12 @@ move_config() { if export_bootdevice && export_partdevice partdev 1; then mkdir -p /boot - if mount -t ext4 -o ro,noatime "/dev/$partdev" /boot; then - if [ -f /boot/sysupgrade.tgz ]; then - mount /boot -o remount,rw,noatime - mv -f /boot/sysupgrade.tgz / - mount /boot -o remount,ro,noatime - fi - mount --bind /boot/boot /boot + mount -t ext4 -o rw,noatime "/dev/$partdev" /boot + mount --bind /boot/boot /boot + if [ -f /boot/sysupgrade.tgz ]; then + mv -f /boot/sysupgrade.tgz / fi fi } boot_hook_add preinit_mount_root move_config - From patchwork Tue Nov 20 16:20:41 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomasz Maciej Nowak X-Patchwork-Id: 1000639 X-Patchwork-Delegate: blogic@openwrt.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=lists.openwrt.org (client-ip=198.137.202.133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=o2.pl Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="R0HLx0tS"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.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 42zsLK6ybDz9s0n for ; Wed, 21 Nov 2018 03:56:41 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Subject:MIME-Version:References: In-Reply-To:Message-Id:Date:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=wW44V4d9lsGi7zGsPGQkxxn/DBS6DpplFjWELe3jljk=; b=R0HLx0tSSPRi5H fOGcj5hUAMmUCGIxW1npb8kInd5q3SqSbmF3BZLCepkVF9iUhYUFAQK67J2ZXNyO43V1lW4VdGH3j qi//68GGLMSEpneYNkMGhxGZvzd+w0RqF0q5ghYq8TN9n4Q5iFtfXDjUNKZw8i9Ztb56IcNOe4MKA TLfwsuS7tR/YoqLyCxQiPpCx0HvXNNJVdoal9O62yl8is0wFzFch2t51zoCfcASwQ5J2kzKKRuO8w plbhLmSEXuslu4txB4gWFdWEks1JJKHXHgYI2xq30XGjdIzwyEyWnrsqNwnMPUHfXlu1UEYAdZNzm /XBrP9X6WZc8jez97L6g==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gP9KA-0004IU-NY; Tue, 20 Nov 2018 16:56:30 +0000 Received: from mx-out.tlen.pl ([193.222.135.142]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gP9Bj-000716-N6 for openwrt-devel@lists.openwrt.org; Tue, 20 Nov 2018 16:47:52 +0000 Received: (wp-smtpd smtp.tlen.pl 23747 invoked from network); 20 Nov 2018 17:20:57 +0100 Received: from 131.ip-164-132-48.eu (HELO localhost.localdomain) (tomek_n@o2.pl@[164.132.48.131]) (envelope-sender ) by smtp.tlen.pl (WP-SMTPD) with ECDHE-RSA-AES256-GCM-SHA384 encrypted SMTP for ; 20 Nov 2018 17:20:57 +0100 From: Tomasz Maciej Nowak To: openwrt-devel@lists.openwrt.org Date: Tue, 20 Nov 2018 17:20:41 +0100 Message-Id: <20181120162044.16371-4-tomek_n@o2.pl> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181120162044.16371-1-tomek_n@o2.pl> References: <20181120162044.16371-1-tomek_n@o2.pl> MIME-Version: 1.0 X-WP-MailID: f7021f3a160543202795547d32d82d87 X-WP-AV: skaner antywirusowy Poczty o2 X-WP-SPAM: NO 0000000 [AWOE] X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181120_084747_987058_0705F190 X-CRM114-Status: UNSURE ( 5.63 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 0.0 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [193.222.135.142 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (tomek_n[at]o2.pl) Subject: [OpenWrt-Devel] [PATCH v4 3/6] x86: add packages files to image bootfs X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Tomasz Maciej Nowak Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org Add files to bootfs image from selected as built-in packages, which want to install files to targets boot file system. Signed-off-by: Tomasz Maciej Nowak --- target/linux/x86/image/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/target/linux/x86/image/Makefile b/target/linux/x86/image/Makefile index b537c40f24..dbf8a8594b 100644 --- a/target/linux/x86/image/Makefile +++ b/target/linux/x86/image/Makefile @@ -85,6 +85,7 @@ ifneq ($(CONFIG_GRUB_IMAGES),) -e 's#@ROOT@#$(GRUB_ROOT)#g' \ -e 's#@TITLE@#$(GRUB_TITLE)#g' \ ./grub.cfg > $(KDIR)/root.grub/boot/grub/grub.cfg + -$(CP) $(STAGING_DIR_ROOT)/boot/. $(KDIR)/root.grub/boot/ PADDING="$(CONFIG_TARGET_IMAGES_PAD)" SIGNATURE="$(SIGNATURE)" PATH="$(TARGET_PATH)" $(SCRIPT_DIR)/gen_image_generic.sh \ $(BIN_DIR)/$(IMG_PREFIX)-combined-$(1).img \ $(CONFIG_TARGET_KERNEL_PARTSIZE) $(KDIR)/root.grub \ @@ -123,6 +124,7 @@ define Image/Build/iso -e 's#@TIMEOUT@#$(GRUB_TIMEOUT)#g' \ -e 's#@TITLE@#$(GRUB_TITLE)#g' \ ./grub-iso.cfg > $(KDIR)/root.grub/boot/grub/grub.cfg + -$(CP) $(STAGING_DIR_ROOT)/boot/. $(KDIR)/root.grub/boot/ mkisofs -R -b boot/grub/eltorito.img -no-emul-boot -boot-info-table \ -o $(KDIR)/root.iso $(KDIR)/root.grub $(TARGET_DIR) endef From patchwork Tue Nov 20 16:20:42 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomasz Maciej Nowak X-Patchwork-Id: 1000633 X-Patchwork-Delegate: blogic@openwrt.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=lists.openwrt.org (client-ip=198.137.202.133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=o2.pl Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="U1rP9gQC"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=infradead.org header.i=@infradead.org header.b="pZVLBVoq"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.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 42zsGQ0hDJz9s3C for ; Wed, 21 Nov 2018 03:53:18 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Subject:MIME-Version:References: In-Reply-To:Message-Id:Date:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=7mQN0tfnQ7E3Ah/4vaALsyNvXv7k5zxtbyz6b3TLVlI=; b=U1rP9gQCmeauHS BeJIhWJwl5L6LYQEpitL6hZE+Rr2G7zFnpaUJs9OR7ylXRCotVgLXC+OBzJvJB98pgjViNIgOTMhb mSxgefntB1y8pIgc3ROfzruKMnjwD0zuoMx5qIiSjFlyTFg2c8cLaBArwJ7OeHhYeFhursC9hVZe6 KUYBGSNUEM3nCJYVazUBU1RigcZJ3FKrhgSWmOOB8lA95CqZUxmsItq9knfMhsAQg5C7Yo0nSJnE2 1tNIxTjPgqFF1+GJ9QgYcv0U2sMXxsBbMIjMy0qS4AT324HK0w/vfM2QmlAcBj2XduScuuG8sxY91 SRkmKHHd7CFhxsPTPFOw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gP9Gk-0006iY-Pk; Tue, 20 Nov 2018 16:52:58 +0000 Received: from merlin.infradead.org ([205.233.59.134]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gP9B8-0006aa-9S for openwrt-devel@bombadil.infradead.org; Tue, 20 Nov 2018 16:47:10 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=M4ixIQ0qKB/PeszicE53vvBbOkRY3khLJ88y88B9YIA=; b=pZVLBVoqpXHWDW5qIenp0kecse 0T5ByBnNMlSqTRIyOLifiCNcxkj5nehgCjMFwEFJL/Zf7Wyrs1T3yyDXQdUQgtGvOOabV0L9n1n6L trW/YUzfBnlTo2A5kvu0ltMUHli0X9NQ2LC+VCl9D6XTbEme/RRPOoMReFxJ6RVW3mz8lvAuTpbZN nM96Vt2k59BCUFY6wB/7CQdPNcoxCnsNpC0gMhzFnuqeYqD2jVOLkpGWTo++rhEpYtbcHS1UErxJB tOdopxaFg7vvSb/jZwfw6xXOumHWg+MB4TqAHXqD+fMnldmkm+mXfbn14alcM9nIokpY4arwXsmiy r0nUuRQA==; Received: from mx-out.tlen.pl ([193.222.135.142]) by merlin.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gP8sy-0003ko-7Q for openwrt-devel@lists.openwrt.org; Tue, 20 Nov 2018 16:28:26 +0000 Received: (wp-smtpd smtp.tlen.pl 25131 invoked from network); 20 Nov 2018 17:20:57 +0100 Received: from 131.ip-164-132-48.eu (HELO localhost.localdomain) (tomek_n@o2.pl@[164.132.48.131]) (envelope-sender ) by smtp.tlen.pl (WP-SMTPD) with ECDHE-RSA-AES256-GCM-SHA384 encrypted SMTP for ; 20 Nov 2018 17:20:57 +0100 From: Tomasz Maciej Nowak To: openwrt-devel@lists.openwrt.org Date: Tue, 20 Nov 2018 17:20:42 +0100 Message-Id: <20181120162044.16371-5-tomek_n@o2.pl> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181120162044.16371-1-tomek_n@o2.pl> References: <20181120162044.16371-1-tomek_n@o2.pl> MIME-Version: 1.0 X-WP-MailID: bcff799c764d125cc1424dfb1a02be56 X-WP-AV: skaner antywirusowy Poczty o2 X-WP-SPAM: NO 0000000 [sfNU] X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181120_112824_462194_A9B06A20 X-CRM114-Status: UNSURE ( 8.58 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 0.0 (/) X-Spam-Report: SpamAssassin version 3.4.2 on merlin.infradead.org summary: Content analysis details: (0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [193.222.135.142 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (tomek_n[at]o2.pl) Subject: [OpenWrt-Devel] [PATCH v4 4/6] intel-microcode: remove dependency on iucode-tool X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Tomasz Maciej Nowak Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org It is not necessary to have iucode-tool present on target system to have functional intel-microcode package. The build time dependency is kept. Signed-off-by: Tomasz Maciej Nowak --- package/firmware/intel-microcode/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/firmware/intel-microcode/Makefile b/package/firmware/intel-microcode/Makefile index 6987c795c0..07db9b1f96 100644 --- a/package/firmware/intel-microcode/Makefile +++ b/package/firmware/intel-microcode/Makefile @@ -30,7 +30,7 @@ define Package/intel-microcode SECTION:=firmware CATEGORY:=Firmware URL:=$(PKG_SOURCE_URL) - DEPENDS:=@TARGET_x86 +iucode-tool + DEPENDS:=@TARGET_x86 TITLE:=Intel x86 CPU microcode endef From patchwork Tue Nov 20 16:20:43 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomasz Maciej Nowak X-Patchwork-Id: 1000636 X-Patchwork-Delegate: blogic@openwrt.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=lists.openwrt.org (client-ip=198.137.202.133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=o2.pl Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="po6fHBer"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.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 42zsKl3LD7z9s0n for ; Wed, 21 Nov 2018 03:56:11 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Subject:MIME-Version:References: In-Reply-To:Message-Id:Date:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=zbwnwzXHzxUQbMvptTJNzgqmeH/hMvhQeTJweRHwwzY=; b=po6fHBerqS4Rdp bb8+tcUfC+7R4mlBAJj7yT5aGknSnAMapK0CTPvjmx8gifT14irslvywbNVSJ+3EGfbhuEtpdMMOc 2iM57UES0em/21GpjPvKC9igaMsCKe/58jWr8cudZP4Db5Scj9RORTKNEmlGmzATf1NgDz+njkwzs OFKwN8RQraJ3AMIYdMeWsYV1KnAZOgwrzl+joMIjXg8/YBwJVJaw2bzw2YKe4YCHXv2Tq0w1VSluV lX+gflwxcnD5a/nMk1/EVWmR0bRveatw/z8DY+ppw+SVXIKCd6gdCBKCV/HyZZnwwdZJD+FQ11T9y iGzmKH/tZTmp/v4daEBg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gP9Ji-0003ds-AS; Tue, 20 Nov 2018 16:56:02 +0000 Received: from mx-out.tlen.pl ([193.222.135.142]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gP9Bj-00072T-N5 for openwrt-devel@lists.openwrt.org; Tue, 20 Nov 2018 16:47:50 +0000 Received: (wp-smtpd smtp.tlen.pl 27404 invoked from network); 20 Nov 2018 17:20:59 +0100 Received: from 131.ip-164-132-48.eu (HELO localhost.localdomain) (tomek_n@o2.pl@[164.132.48.131]) (envelope-sender ) by smtp.tlen.pl (WP-SMTPD) with ECDHE-RSA-AES256-GCM-SHA384 encrypted SMTP for ; 20 Nov 2018 17:20:59 +0100 From: Tomasz Maciej Nowak To: openwrt-devel@lists.openwrt.org Date: Tue, 20 Nov 2018 17:20:43 +0100 Message-Id: <20181120162044.16371-6-tomek_n@o2.pl> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181120162044.16371-1-tomek_n@o2.pl> References: <20181120162044.16371-1-tomek_n@o2.pl> MIME-Version: 1.0 X-WP-MailID: 81f72f74c0a77ecf457085f515ef2a19 X-WP-AV: skaner antywirusowy Poczty o2 X-WP-SPAM: NO 0000000 [8WPk] X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181120_084747_979636_45E9570E X-CRM114-Status: UNSURE ( 6.55 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 0.0 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [193.222.135.142 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (tomek_n[at]o2.pl) Subject: [OpenWrt-Devel] [PATCH v4 5/6] x86: add intel microcode entries to grub config X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Tomasz Maciej Nowak Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org Create initrd enries for x86 images, that'll load intel microcode as early as possible. To achieve that the test module for grub is enabled which provides shell-like conditionals. Also restrict the late load of microcode to AMD processors. Signed-off-by: Tomasz Maciej Nowak --- target/linux/x86/base-files/lib/preinit/02_load_x86_ucode | 6 ++++-- target/linux/x86/image/Makefile | 4 ++-- target/linux/x86/image/grub-iso.cfg | 3 +++ target/linux/x86/image/grub.cfg | 3 +++ 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/target/linux/x86/base-files/lib/preinit/02_load_x86_ucode b/target/linux/x86/base-files/lib/preinit/02_load_x86_ucode index fb309c75c1..d3a23e24b2 100644 --- a/target/linux/x86/base-files/lib/preinit/02_load_x86_ucode +++ b/target/linux/x86/base-files/lib/preinit/02_load_x86_ucode @@ -2,8 +2,10 @@ # Copyright (C) 2018 OpenWrt.org do_load_x86_ucode() { - if [ -e "/sys/devices/system/cpu/microcode/reload" ]; then - echo 1 > /sys/devices/system/cpu/microcode/reload + if grep -q AuthenticAMD /proc/cpuinfo; then + if [ -e "/sys/devices/system/cpu/microcode/reload" ]; then + echo 1 > /sys/devices/system/cpu/microcode/reload + fi fi } diff --git a/target/linux/x86/image/Makefile b/target/linux/x86/image/Makefile index dbf8a8594b..f8c3700d32 100644 --- a/target/linux/x86/image/Makefile +++ b/target/linux/x86/image/Makefile @@ -9,8 +9,8 @@ include $(INCLUDE_DIR)/image.mk export PATH=$(TARGET_PATH):/sbin -GRUB2_MODULES = biosdisk boot chain configfile ext2 linux ls part_msdos reboot serial vga -GRUB2_MODULES_ISO = biosdisk boot chain configfile iso9660 linux ls part_msdos reboot serial vga +GRUB2_MODULES = biosdisk boot chain configfile ext2 linux ls part_msdos reboot serial test vga +GRUB2_MODULES_ISO = biosdisk boot chain configfile iso9660 linux ls part_msdos reboot serial test vga GRUB_TERMINALS = GRUB_SERIAL_CONFIG = GRUB_TERMINAL_CONFIG = diff --git a/target/linux/x86/image/grub-iso.cfg b/target/linux/x86/image/grub-iso.cfg index 9c59bdf6d4..5d128aa3aa 100644 --- a/target/linux/x86/image/grub-iso.cfg +++ b/target/linux/x86/image/grub-iso.cfg @@ -7,4 +7,7 @@ set root='(cd)' menuentry "@TITLE@" { linux /boot/vmlinuz @CMDLINE@ noinitrd + if [ -s /boot/intel-ucode.img ]; then + initrd /boot/intel-ucode.img + fi } diff --git a/target/linux/x86/image/grub.cfg b/target/linux/x86/image/grub.cfg index dedfa0a636..a665686863 100644 --- a/target/linux/x86/image/grub.cfg +++ b/target/linux/x86/image/grub.cfg @@ -7,6 +7,9 @@ set root='(@ROOT@)' menuentry "@TITLE@" { linux /boot/vmlinuz @CMDLINE@ noinitrd + if [ -s /boot/intel-ucode.img ]; then + initrd /boot/intel-ucode.img + fi } menuentry "@TITLE@ (failsafe)" { linux /boot/vmlinuz failsafe=true @CMDLINE@ noinitrd From patchwork Tue Nov 20 16:20:44 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomasz Maciej Nowak X-Patchwork-Id: 1000637 X-Patchwork-Delegate: blogic@openwrt.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=lists.openwrt.org (client-ip=198.137.202.133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=o2.pl Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Xs9pDyby"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.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 42zsKt14t5z9s0n for ; Wed, 21 Nov 2018 03:56:18 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Subject:MIME-Version:References: In-Reply-To:Message-Id:Date:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=RiqLQ0HHIVTjKqS/TaBXbIEII26rBgejQP9EXbyTdy0=; b=Xs9pDybyULLXsU RqMbYL7CAiVfpdW14NoBgz1uNM6VQftfXekC0XDN3uJE0XGtVTtt+9pnERWxQnuCH5bpptEPXkytc iuhYL33oLf+BrCm9HkJtsL3burR/cHp3GVtzoHXIsOzk/rPnCaSeuU60Koh942gtTM2aEnoAdam4Z efOoMWzd3KlcOCY5fqdH9ARQohWndfsHRyh24jWzmpSD6qKWfraHXRSCXnBnF/EtQz40iRvmef2Yu zCbzEF6b30km4ZIQeaeZFNA8ZDTvj3LCn00ZIeZ3FE3+LUeyTw8uGFaCHecymSIg71yzmBaxqVnQ8 Phs+BmenDjMj4Gwey1tA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gP9Jv-0003y5-H1; Tue, 20 Nov 2018 16:56:15 +0000 Received: from mx-out.tlen.pl ([193.222.135.142]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gP9Bj-00074f-N6 for openwrt-devel@lists.openwrt.org; Tue, 20 Nov 2018 16:47:50 +0000 Received: (wp-smtpd smtp.tlen.pl 304 invoked from network); 20 Nov 2018 17:21:02 +0100 Received: from 131.ip-164-132-48.eu (HELO localhost.localdomain) (tomek_n@o2.pl@[164.132.48.131]) (envelope-sender ) by smtp.tlen.pl (WP-SMTPD) with ECDHE-RSA-AES256-GCM-SHA384 encrypted SMTP for ; 20 Nov 2018 17:21:02 +0100 From: Tomasz Maciej Nowak To: openwrt-devel@lists.openwrt.org Date: Tue, 20 Nov 2018 17:20:44 +0100 Message-Id: <20181120162044.16371-7-tomek_n@o2.pl> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181120162044.16371-1-tomek_n@o2.pl> References: <20181120162044.16371-1-tomek_n@o2.pl> MIME-Version: 1.0 X-WP-MailID: 9fa14ae0a1a619d7487c96d5b25f089d X-WP-AV: skaner antywirusowy Poczty o2 X-WP-SPAM: NO 0000000 [IePE] X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181120_084747_983560_325B4686 X-CRM114-Status: UNSURE ( 5.17 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 0.0 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [193.222.135.142 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (tomek_n[at]o2.pl) Subject: [OpenWrt-Devel] [PATCH v4 6/6] intel-microcode: create early load microcode image X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Tomasz Maciej Nowak Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org Create initrd image with packed microcode. This'll allow to load it at early boot stage. Signed-off-by: Tomasz Maciej Nowak --- package/firmware/intel-microcode/Makefile | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/package/firmware/intel-microcode/Makefile b/package/firmware/intel-microcode/Makefile index 07db9b1f96..4bd47b087a 100644 --- a/package/firmware/intel-microcode/Makefile +++ b/package/firmware/intel-microcode/Makefile @@ -35,15 +35,17 @@ define Package/intel-microcode endef define Build/Compile - IUCODE_TOOL=$(STAGING_DIR)/../host/bin/iucode_tool $(MAKE) -C $(PKG_BUILD_DIR) - mkdir $(PKG_BUILD_DIR)/intel-ucode-ipkg - $(STAGING_DIR)/../host/bin/iucode_tool -q \ - --write-firmware=$(PKG_BUILD_DIR)/intel-ucode-ipkg $(PKG_BUILD_DIR)/$(MICROCODE).bin + IUCODE_TOOL=$(STAGING_DIR)/../host/bin/iucode_tool \ + $(MAKE) -C $(PKG_BUILD_DIR) + $(STAGING_DIR)/../host/bin/iucode_tool -q --mini-earlyfw \ + --write-earlyfw=$(PKG_BUILD_DIR)/intel-ucode.cpio \ + $(PKG_BUILD_DIR)/$(MICROCODE).bin endef define Package/intel-microcode/install - $(INSTALL_DIR) $(1)/lib/firmware/intel-ucode - $(INSTALL_DATA) $(PKG_BUILD_DIR)/intel-ucode-ipkg/* $(1)/lib/firmware/intel-ucode + $(INSTALL_DIR) $(1)/boot + $(INSTALL_DATA) $(PKG_BUILD_DIR)/intel-ucode.cpio \ + $(1)/boot/intel-ucode.img endef $(eval $(call BuildPackage,intel-microcode))