From patchwork Tue May 21 09:56:31 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tzu-Jung Lee X-Patchwork-Id: 245241 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from hemlock.osuosl.org (hemlock.osuosl.org [140.211.166.133]) by ozlabs.org (Postfix) with ESMTP id 0F53E2C00AD for ; Tue, 21 May 2013 19:54:08 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id BCE0DA020F; Tue, 21 May 2013 09:54:04 +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 J2UEEOH8-URf; Tue, 21 May 2013 09:54:02 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 64A5FA01F7; Tue, 21 May 2013 09:54:02 +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 3CC618F75E for ; Tue, 21 May 2013 09:54:10 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id C894F8B1E1 for ; Tue, 21 May 2013 09:54:02 +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 RyqRAVTtXBKc for ; Tue, 21 May 2013 09:54:02 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-pa0-f47.google.com (mail-pa0-f47.google.com [209.85.220.47]) by whitealder.osuosl.org (Postfix) with ESMTPS id 326888B957 for ; Tue, 21 May 2013 09:54:02 +0000 (UTC) Received: by mail-pa0-f47.google.com with SMTP id kl13so538380pab.20 for ; Tue, 21 May 2013 02:54:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer; bh=12dykCpj2443iz8/a9qxA+Dnjm0WTUW+O3ApV5eLGts=; b=ZPZZrCbv4I8Ena4D7ElW0iMjMieuLlPPrgxnaTQTKKCz0Bvf+wa7Ib+zvCEmU7fJUI 4onq9qP8RlCbsHPWu7AN7q3WCSH+e+pL1etlWvk2/74o0EmVoGdvzQN3VS4yjrWQvyIM cH2IpF7cingMcEgGcoOCrToM66O9e7oYRzAi7OFSL3BxvSVnoIhqG7QvJpIi2wQCpwBe kpKrooTeIr0QXCQwN80IaS+pH5U1eo72/T7JEfitpp9TgI63ueVbNzP+s2WhW5a2X/pb /GpYAyZX+idK1EMKxXwM8of2IIPgrV8N7HI2zVhiEl6mVsD7vdOUJkJu3A3VEKlhuPLe biBA== X-Received: by 10.68.193.138 with SMTP id ho10mr1783253pbc.163.1369130042089; Tue, 21 May 2013 02:54:02 -0700 (PDT) Received: from localhost.ambarella.net ([60.248.184.238]) by mx.google.com with ESMTPSA id ih1sm2048642pbb.44.2013.05.21.02.54.00 for (version=TLSv1.1 cipher=RC4-SHA bits=128/128); Tue, 21 May 2013 02:54:01 -0700 (PDT) From: Tzu-Jung Lee To: buildroot@busybox.net Date: Tue, 21 May 2013 17:56:31 +0800 Message-Id: <1369130191-15503-1-git-send-email-tjlee@ambarella.com> X-Mailer: git-send-email 1.8.2.1 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 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 --- system/system.mk | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/system/system.mk b/system/system.mk index 44a33ae..67d3113 100644 --- a/system/system.mk +++ b/system/system.mk @@ -40,6 +40,9 @@ target-generic-do-remount-rw: target-generic-dont-remount-rw: $(SED) '/^[^#].*# REMOUNT_ROOTFS_RW$$/s~^~#~' $(TARGET_DIR)/etc/inittab +target-generic-securetty: + grep -q $(TARGET_GENERIC_GETTY) $(TARGET_DIR)/etc/securetty || echo $(TARGET_GENERIC_GETTY) >> $(TARGET_DIR)/etc/securetty + ifneq ($(TARGET_GENERIC_HOSTNAME),) TARGETS += target-generic-hostname endif @@ -60,4 +63,7 @@ TARGETS += target-generic-do-remount-rw else TARGETS += target-generic-dont-remount-rw endif +ifneq ($(TARGET_GENERIC_GETTY),) +TARGETS += target-generic-securetty +endif endif