From patchwork Sun May 26 20:14:29 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Spenser Gilliland X-Patchwork-Id: 246455 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ozlabs.org (Postfix) with ESMTP id ED1E42C0299 for ; Mon, 27 May 2013 06:14:59 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id B225F8BFEF; Sun, 26 May 2013 20:14:57 +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 XpSzCfYwYG0Y; Sun, 26 May 2013 20:14:56 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 27F058C39A; Sun, 26 May 2013 20:14:56 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 43EA78F75E for ; Sun, 26 May 2013 20:14:48 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id B5FD385610 for ; Sun, 26 May 2013 20:14:40 +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 mN-xiZtM91nR for ; Sun, 26 May 2013 20:14:38 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail-ie0-f173.google.com (mail-ie0-f173.google.com [209.85.223.173]) by whitealder.osuosl.org (Postfix) with ESMTPS id 627AD8BA2C for ; Sun, 26 May 2013 20:14:38 +0000 (UTC) Received: by mail-ie0-f173.google.com with SMTP id k5so16867316iea.18 for ; Sun, 26 May 2013 13:14:37 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=Mj1ROQMsj5kmAeRB8wid0Lqw2k/XeTpY7Yw9ppLibi0=; b=Ycn0ryaV129HRUJJMd9y8MNeKWTXF1llFGxfiWqaeqA38Y+G8Xis9yRZV3YwhNWTuy 7tZaLHAaqWZnZgnCkQHMj9PIRYwqMgeg1lMwy48dCw+PUAXd2xkHFytix/wWonkEDfLi IHzEU5Gsskq4K1N6XMbGMXIYlwtrE3PXXSz8zy73fUAtswsrkRIl3GIpM+nuQUwGt3Qn spi/qNsoy4fRtUW4vbKrGUBv9CCxBiELjr5woeX8c5dvRDZ1FoZOKPFeLo4DfVOZd1Pk kvqYBWY8xNJ/TKAXSEXVwS46Qx3/uOrXo3CTsBCidGzqp/Ja5hXojKVxDllaXKXeQpDV LfWg== X-Received: by 10.50.118.7 with SMTP id ki7mr3597349igb.35.1369599277699; Sun, 26 May 2013 13:14:37 -0700 (PDT) Received: from bourban.gateway.2wire.net (108-90-245-135.lightspeed.cicril.sbcglobal.net. [108.90.245.135]) by mx.google.com with ESMTPSA id xc3sm9942006igb.10.2013.05.26.13.14.36 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 26 May 2013 13:14:37 -0700 (PDT) From: Spenser Gilliland To: buildroot@busybox.net Date: Sun, 26 May 2013 15:14:29 -0500 Message-Id: <1369599269-18876-1-git-send-email-spenser@gillilanding.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1342149545-10417-1-git-send-email-roylee17@gmail.com> References: <1342149545-10417-1-git-send-email-roylee17@gmail.com> X-Gm-Message-State: ALoCoQmzDbxcWKgvSvyDFX1/rw8ki4xqMiJKeYcRqYqyYS2wkvkr9MRSoexcYSCYOvvDtfdfUxfV Cc: Tzu-Jung Lee Subject: [Buildroot] [PATCH 1/1] skeleton: add default login port to /etc/securetty X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: buildroot-bounces@busybox.net From: Tzu-Jung Lee We ran into a "Login incorrect" problem when running the same rootfs image across platforms with different loging ports ttyS0/1/2/3. Simply assignning "console" to BR2_TARGET_GENERIC_GETTY_PORT, which in turn modifies the /etc/inittab, is not enough because the "console" device was missing in the /etc/securetty. While current securetty has enumerated a lot of ttys, this patch should save some efforts to enumerate more. Change-Id: Ifb1239c80eb86528345b24eb8d04b52b67aa1209 Signed-off-by: Tzu-Jung Lee Signed-off-by: Spenser Gilliland Acked-by: Arnout Vandecappelle (Essensium/Mind) --- support/scripts/graph-depends | 1 + system/system.mk | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/support/scripts/graph-depends b/support/scripts/graph-depends index 50b8670..ac24086 100755 --- a/support/scripts/graph-depends +++ b/support/scripts/graph-depends @@ -161,6 +161,7 @@ def remove_redundant_deps(deps): return newdeps TARGET_EXCEPTIONS = [ + "target-generic-securetty", "target-generic-issue", "target-generic-getty-busybox", "target-generic-do-remount-rw", diff --git a/system/system.mk b/system/system.mk index 44a33ae..04ad12d 100644 --- a/system/system.mk +++ b/system/system.mk @@ -9,6 +9,10 @@ TARGET_GENERIC_GETTY:=$(call qstrip,$(BR2_TARGET_GENERIC_GETTY_PORT)) TARGET_GENERIC_GETTY_BAUDRATE:=$(call qstrip,$(BR2_TARGET_GENERIC_GETTY_BAUDRATE)) TARGET_GENERIC_GETTY_TERM:=$(call qstrip,$(BR2_TARGET_GENERIC_GETTY_TERM)) +target-generic-securetty: + grep -q ^$(TARGET_GENERIC_GETTY)$ $(TARGET_DIR)/etc/securetty || \ + echo $(TARGET_GENERIC_GETTY) >> $(TARGET_DIR)/etc/securetty + target-generic-hostname: mkdir -p $(TARGET_DIR)/etc echo "$(TARGET_GENERIC_HOSTNAME)" > $(TARGET_DIR)/etc/hostname @@ -40,6 +44,10 @@ target-generic-do-remount-rw: target-generic-dont-remount-rw: $(SED) '/^[^#].*# REMOUNT_ROOTFS_RW$$/s~^~#~' $(TARGET_DIR)/etc/inittab +ifneq ($(TARGET_GENERIC_GETTY), ) +TARGETS += target-generic-securetty +endif + ifneq ($(TARGET_GENERIC_HOSTNAME),) TARGETS += target-generic-hostname endif