From patchwork Tue Oct 1 12:50:28 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe Blaess X-Patchwork-Id: 1169910 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=logilin.fr 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 46jK8Q5Qcmz9s7T for ; Tue, 1 Oct 2019 22:58:46 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 0A2C087877; Tue, 1 Oct 2019 12:58:45 +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 FF7HIBqMW83G; Tue, 1 Oct 2019 12:58:42 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id A3A6087874; Tue, 1 Oct 2019 12:58:41 +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 88F381BF9BA for ; Tue, 1 Oct 2019 12:58:40 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 7E6F684C5F for ; Tue, 1 Oct 2019 12:58:40 +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 tRhwp-sdZSHQ for ; Tue, 1 Oct 2019 12:58:39 +0000 (UTC) X-Greylist: delayed 00:07:48 by SQLgrey-1.7.6 Received: from 7.mo69.mail-out.ovh.net (7.mo69.mail-out.ovh.net [46.105.50.32]) by hemlock.osuosl.org (Postfix) with ESMTPS id 0397E87089 for ; Tue, 1 Oct 2019 12:58:38 +0000 (UTC) Received: from player778.ha.ovh.net (unknown [10.109.146.53]) by mo69.mail-out.ovh.net (Postfix) with ESMTP id 490036B230 for ; Tue, 1 Oct 2019 14:50:49 +0200 (CEST) Received: from blaess.fr (unknown [90.115.206.145]) (Authenticated sender: christophe@blaess.fr) by player778.ha.ovh.net (Postfix) with ESMTPSA id 9C977A5F0056; Tue, 1 Oct 2019 12:50:43 +0000 (UTC) From: Christophe Blaess To: buildroot@buildroot.org Date: Tue, 1 Oct 2019 14:50:28 +0200 Message-Id: <20191001125028.5094-1-mailist@logilin.fr> X-Mailer: git-send-email 2.17.1 X-Ovh-Tracer-Id: 5451607349184047006 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedufedrgeeggdehiecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfqggfjpdevjffgvefmvefgnecuuegrihhlohhuthemucehtddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd Subject: [Buildroot] [PATCH 1/1] board/raspberrypi/post-build.sh: avoid HDMI login when getty disabled 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: Christophe Blaess , Peter Seiderer , Martin Bark , Stephen Bos MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" From: Christophe Blaess When the "Run a getty after boot" option is disabled, the inittab line starting getty on serial console is commented out. But the line running an HDMI login on Raspberry Pi is still enabled. With this patch the HDMI line is removed. Co-authored-by: Christophe Blaess Co-authored-by: Stephen Bos Signed-off-by: Christophe Blaess --- board/raspberrypi/post-build.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/board/raspberrypi/post-build.sh b/board/raspberrypi/post-build.sh index 5e5eb71100..7f4e1cc8bf 100755 --- a/board/raspberrypi/post-build.sh +++ b/board/raspberrypi/post-build.sh @@ -3,9 +3,11 @@ set -u set -e -# Add a console on tty1 if [ -e ${TARGET_DIR}/etc/inittab ]; then - grep -qE '^tty1::' ${TARGET_DIR}/etc/inittab || \ - sed -i '/GENERIC_SERIAL/a\ + # Remove tty1 line + sed -i '/^tty1::/d' ${TARGET_DIR}/etc/inittab + # Add a tty1 line if GENERIC_SERIAL is present (and not commented) + sed -i '/^[^#].*GENERIC_SERIAL/a\ tty1::respawn:/sbin/getty -L tty1 0 vt100 # HDMI console' ${TARGET_DIR}/etc/inittab fi +