From patchwork Mon Sep 23 10:58:45 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Timo Ketola X-Patchwork-Id: 1166017 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=exertus.fi Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=ExertusOy.onmicrosoft.com header.i=@ExertusOy.onmicrosoft.com header.b="LA+J1UCd"; dkim-atps=neutral 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 46cNtx69PJz9sP3 for ; Mon, 23 Sep 2019 22:30:01 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 9671D86BA1; Mon, 23 Sep 2019 12:29:57 +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 3xAK4GqIQJjH; Mon, 23 Sep 2019 12:29:56 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id E2CD186B58; Mon, 23 Sep 2019 12:29:55 +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 8AE9A1BF378 for ; Mon, 23 Sep 2019 12:29:54 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 86E388440D for ; Mon, 23 Sep 2019 12:29:54 +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 sHovIJ1Ca9_A for ; Mon, 23 Sep 2019 12:29:51 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from EUR02-HE1-obe.outbound.protection.outlook.com (mail-eopbgr10123.outbound.protection.outlook.com [40.107.1.123]) by fraxinus.osuosl.org (Postfix) with ESMTPS id 79127840B8 for ; Mon, 23 Sep 2019 12:29:51 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fa1pZrsAEdqXfMsPWTGkIdSycgfkXWWHH3q+2RiOplG6e5fe2EfwMyR8RinQvQIBmIwC61xe8dyaVT9Ba4Blor4FTcsvEvrW7AFjiExAKqxYjIczRLGK/5F2O12H2/6gw6GlFrADk5n4P8UKXoB6Fqhl2R229LNq3orqXZT5FhFEPVFTZQ6NSjGoY2+2qTos6snxsYORyOZdMLBsvLrRAGkW7jh9A3+bkvPufJ4ml0NuUiTqlP9i70bIRDGX5xKdY91NHZbNQfT1lutJfPP2YBh+l0/2z6WdWWPvE30VJrjsFSvAzeYIwCdT/aDKGNJ+hro3y3Djhq8v651nkvs55Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Am5HJmg4xq+ZVtHyk2RGIqfT01zKEakFttezHDMm8C0=; b=UO7/q1ExmaHNz9FQctGTcJ5588mFGtu6rcFkr21Hl5o/H6l3kPA69Rh//Hf3JW8W4jcVsmnlLFLDp4sVv63eNfRe2szUyh/C+TxGIhwPw9sKCKyoud5eMGSNxvNU6WUcsih0N0suhuJdPthxr5CKDbSrtLSfBIFEfsO0nn1vKP1Hl/7uNVNjyi0SjiIG0HR4D4LLjJNdPI2C2FCfuJmLk5Lv5RhkBIan0D4aaEZCkPCbJhkotEwqtvtmANKJaqHE9dFEjpUqwYmg9PVoqXlebptdLGALiBBnvZzn5HKnoM7FFeJZJwZLjS4zHG/7R3//JKQNANBOrELEOpv7gPdm5w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=exertus.fi; dmarc=pass action=none header.from=exertus.fi; dkim=pass header.d=exertus.fi; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ExertusOy.onmicrosoft.com; s=selector2-ExertusOy-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Am5HJmg4xq+ZVtHyk2RGIqfT01zKEakFttezHDMm8C0=; b=LA+J1UCdlVG/GiLf+WO0Gzos1eArqoDtRRmXlKyw37qH/+3aam/8cV86Zwg8/jT4cqu5wTGSeN6JWPora+9JkobMiDPiT+2iqp1inVotrJc9rQi9ell87gOv0EAhKhOqM3SZ/h37WqncdcWEhCXDyy3yAAH4DBrQntidHgG19Uk= Received: from DB7PR09MB2586.eurprd09.prod.outlook.com (20.177.121.12) by DB7PR09MB2316.eurprd09.prod.outlook.com (20.176.237.203) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2284.21; Mon, 23 Sep 2019 10:58:45 +0000 Received: from DB7PR09MB2586.eurprd09.prod.outlook.com ([fe80::444d:3fae:bdde:3c9d]) by DB7PR09MB2586.eurprd09.prod.outlook.com ([fe80::444d:3fae:bdde:3c9d%5]) with mapi id 15.20.2284.023; Mon, 23 Sep 2019 10:58:45 +0000 From: Timo Ketola To: "buildroot@buildroot.org" Thread-Topic: [PATCH 1/1] fs/cpio: make initramfs init script survive 'console=' kernel argument Thread-Index: AQHVcf3eNYGYWjz+FU+VayUjYPS5/g== Date: Mon, 23 Sep 2019 10:58:45 +0000 Message-ID: <80e3e080-0af3-99de-ff8f-9de5e3dca8a6@exertus.fi> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: HE1PR0401CA0062.eurprd04.prod.outlook.com (2603:10a6:3:19::30) To DB7PR09MB2586.eurprd09.prod.outlook.com (2603:10a6:10:4c::12) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Timo.Ketola@exertus.fi; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [193.210.47.3] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: f1ba0030-223e-4b33-edaa-08d74015010a x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(7021145)(8989299)(5600167)(711020)(4605104)(1401327)(4534185)(7022145)(4603075)(4627221)(201702281549075)(8990200)(7048125)(7024125)(7027125)(7023125)(2017052603328)(7193020); SRVR:DB7PR09MB2316; x-ms-traffictypediagnostic: DB7PR09MB2316: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:6430; x-forefront-prvs: 0169092318 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(136003)(376002)(39830400003)(366004)(396003)(346002)(199004)(189003)(52116002)(508600001)(476003)(4744005)(2616005)(486006)(86362001)(44832011)(31696002)(7736002)(36756003)(305945005)(6512007)(5640700003)(2351001)(6116002)(2906002)(2501003)(6486002)(31686004)(71200400001)(71190400001)(3846002)(66476007)(66556008)(6436002)(1730700003)(102836004)(81156014)(8676002)(81166006)(6916009)(6506007)(386003)(64756008)(66946007)(99286004)(25786009)(256004)(316002)(8936002)(26005)(186003)(5660300002)(66066001)(14454004)(66446008); DIR:OUT; SFP:1102; SCL:1; SRVR:DB7PR09MB2316; H:DB7PR09MB2586.eurprd09.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: exertus.fi does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: wMFaZk+yiZfdm9dvSoWLAnSAkTO+jFALIH5+db3Sw7U7e6nw9oCUVhDIqVtAgtvwtMg3G+YDWCJ1+ex9AhtIBtn1yEdV3av7IWm61lHMsfm0x6fhc0jAqriAHD6fm2VGn6SCMOnsjKkSy7hPK9QjL/c8S91jPQNpyDQSIgcXgFNnRSxqPr/borXbCa3kD5u5r0hiIJIdTECLjeZhRbnubKG6G8v8LbwyKNG7PPZ1fO7fmnELTMWm6OpodTCF+QTnxKyDRFAELcH6kx/kSiB3lxjLKkE3IXv2WA0eOIsgY8kPZgCeHwgG0AKltqtyglkazS26gLS1DixUEVZe4OMwT7bHxRrT5osvtkI+a6OnE7MrdksGMtlsaWYi/JVh9acsmbEa2VZ80E4u4+jscx+B0cYNOt2uVrZT4aPQgqJeQ58= x-ms-exchange-transport-forked: True Content-ID: <87624FE9CBB4854EAEB56B9514BF80EC@eurprd09.prod.outlook.com> MIME-Version: 1.0 X-OriginatorOrg: exertus.fi X-MS-Exchange-CrossTenant-Network-Message-Id: f1ba0030-223e-4b33-edaa-08d74015010a X-MS-Exchange-CrossTenant-originalarrivaltime: 23 Sep 2019 10:58:45.4937 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 2ff5ff20-bcb9-4615-b2a6-3bbeefd7b8e3 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: GGl/bCvxG+suy/qvBIfkP7JocKJPqg9OyFYIGKgI7Z3yIbcKRQACp2fEjlxb7lrI X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR09MB2316 Subject: [Buildroot] [PATCH 1/1] fs/cpio: make initramfs init script survive 'console=' kernel argument 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: , Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" When booting with 'console=' in the kernel command line (as e.g. U-Boot does with silent flags in effect), opening /dev/console fails. That is fatal in the /init script and kernel will panic. It is also needless, because the kernel tries to open it anyway (well, as long as we have console node in initramfs /dev; cpio.mk creates that alright). Signed-off-by: Timo Ketola --- fs/cpio/init | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/fs/cpio/init b/fs/cpio/init index dbe09ac..72b2401 100755 --- a/fs/cpio/init +++ b/fs/cpio/init @@ -1,7 +1,5 @@ #!/bin/sh # devtmpfs does not get automounted for initramfs /bin/mount -t devtmpfs devtmpfs /dev -exec 0/dev/console -exec 2>/dev/console + exec /sbin/init "$@"