From patchwork Sun May 26 20:40:25 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Spenser Gilliland X-Patchwork-Id: 246458 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 B04CD2C0174 for ; Mon, 27 May 2013 06:41:06 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 9ED678D1E1; Sun, 26 May 2013 20:41:03 +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 zM57i9bx68BX; Sun, 26 May 2013 20:40:42 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 4A2538D0F1; Sun, 26 May 2013 20:40:41 +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 4EB288F75E for ; Sun, 26 May 2013 20:40:47 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id DA4DD8D0E4 for ; Sun, 26 May 2013 20:40:39 +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 Hh2o1BmtjQi5 for ; Sun, 26 May 2013 20:40:33 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail-ie0-f182.google.com (mail-ie0-f182.google.com [209.85.223.182]) by whitealder.osuosl.org (Postfix) with ESMTPS id B4EEF8D0F1 for ; Sun, 26 May 2013 20:40:32 +0000 (UTC) Received: by mail-ie0-f182.google.com with SMTP id a14so17016088iee.27 for ; Sun, 26 May 2013 13:40:32 -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=aGHYSnUQZ0WO1DMFDpGoTDL+ethZiNoTAgLYJ6qPmNE=; b=g94xxFwdNRcgGkNE4LevZOCZ6LwGM+XvZGs1qtBJRQ7iQIftalsT+hyw9XPjf22XHF /+L+43yFkBhOxYXk8TSINFonAL+618gYoR1h9FOw1E3VnLgc582/CySr2FilTFG2aYuT E2G4yIO3Ke29g7lxZnrYoORRfBmiYd+7SdveL9AWF+h52GwlE/RXxAGoOXqzfuIbPs7d 3QoAwW6LsZyusnKrY2MWsQUU5nMrEYH51X/icEHKxMergjbZOU4vftLi9R0tPmmoeph4 aVyUzVEe+wQiPGFueyIPABwgdiIiio8zgoEtNyYKhIm5wG1BmXwiSSrfDJv286nq0mtm 6+6g== X-Received: by 10.50.114.42 with SMTP id jd10mr3492031igb.101.1369600831910; Sun, 26 May 2013 13:40:31 -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 xc3sm10034966igb.10.2013.05.26.13.40.30 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 26 May 2013 13:40:31 -0700 (PDT) From: Spenser Gilliland To: buildroot@busybox.net Date: Sun, 26 May 2013 15:40:25 -0500 Message-Id: <1369600825-19785-1-git-send-email-spenser@gillilanding.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1369599269-18876-1-git-send-email-spenser@gillilanding.com> References: <1369599269-18876-1-git-send-email-spenser@gillilanding.com> X-Gm-Message-State: ALoCoQmiYh8yxu6MFSS4NqSDOkge2hLJxVIyx3N/la70DTDI3pKVSycnJFiHpZcZkyb4GtgBYB1o 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. 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..3e11a51 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