From patchwork Wed Oct 31 17:02:58 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: 991553 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=2607:7c80:54:e::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="bKbEkYok"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::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 42lZSZ4Xy9z9s3T for ; Thu, 1 Nov 2018 04:04:30 +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=bKbEkYoksJadjx sgS2uUZ+7m7yUGylzmABc5s6j7NvRGQg/iBg4C9dRNXcONd3y1Ay48ggZB4ZbuB3UvwMT8uKftk85 DK3JrNkfBpK2qiPcO3u7VptgFaVMTZkukSl9ljOLxt1/3M3r3g5/MUYjMAUlvomtbiIfkENrlC5dJ bel04Eg/3u81YUpbstaKzRTqdhbO+73FnSG7vk/3SVF9os/zZVv0RTRPIYtaz0q0xC9oauJs1Ddwk AUfdrLsBKCsRjj80uVNYvSz/KOZSGapQyaJT8Hg/fl7cvLD+CSO8b4eASWJzjMUoLn9DD7MsbrsYp QjRVjk06M7SN/b40opyA==; 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 1gHtun-0001MB-R9; Wed, 31 Oct 2018 17:04:21 +0000 Received: from mx-out.tlen.pl ([193.222.135.148]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gHtuS-0000wn-4s for openwrt-devel@lists.openwrt.org; Wed, 31 Oct 2018 17:04:03 +0000 Received: (wp-smtpd smtp.tlen.pl 25465 invoked from network); 31 Oct 2018 18:03:45 +0100 Received: from 131.ip-164-132-48.eu (HELO vaio-vpcz1.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 ; 31 Oct 2018 18:03:45 +0100 From: Tomasz Maciej Nowak To: openwrt-devel@lists.openwrt.org Date: Wed, 31 Oct 2018 18:02:58 +0100 Message-Id: <20181031170301.6936-3-tomek_n@o2.pl> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181031170301.6936-1-tomek_n@o2.pl> References: <20181031170301.6936-1-tomek_n@o2.pl> MIME-Version: 1.0 X-WP-MailID: 3b361e9d48baa2f75326d7d99482738a X-WP-AV: skaner antywirusowy Poczty o2 X-WP-SPAM: NO 0000000 [AfPV] X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181031_100400_377029_AEDE30E6 X-CRM114-Status: UNSURE ( 6.64 ) 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_MSPIKE_H2 RBL: Average reputation (+2) [193.222.135.148 listed in wl.mailspike.net] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [193.222.135.148 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 v3 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 -