From patchwork Thu Aug 22 05:12:35 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Assaf Inbal X-Patchwork-Id: 268954 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from fraxinus.osuosl.org (fraxinus.osuosl.org [140.211.166.137]) by ozlabs.org (Postfix) with ESMTP id 713982C007E for ; Thu, 22 Aug 2013 15:13:02 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 70AA18BC94; Thu, 22 Aug 2013 05:13:01 +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 L_VU6Dja2HG2; Thu, 22 Aug 2013 05:12:59 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 4DDD58BCEB; Thu, 22 Aug 2013 05:12:59 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from hemlock.osuosl.org (hemlock.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 25D991C2D9C for ; Thu, 22 Aug 2013 05:13:27 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id CF1F193713 for ; Thu, 22 Aug 2013 05:13:33 +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 yWZYp+FZr2AI for ; Thu, 22 Aug 2013 05:13:33 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-ea0-f174.google.com (mail-ea0-f174.google.com [209.85.215.174]) by hemlock.osuosl.org (Postfix) with ESMTPS id 1577E93124 for ; Thu, 22 Aug 2013 05:13:32 +0000 (UTC) Received: by mail-ea0-f174.google.com with SMTP id z15so658110ead.19 for ; Wed, 21 Aug 2013 22:12:55 -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; bh=qgudnuQoU5pgdhVKiFPf5PoayORZbEFaECvc3y6w5b8=; b=FpJLHSlY6o7N4xaJLthcgIZvd9Ie53p3ssKrFYi8HF9AtNURY2U4cVUaloUiPSWMR/ u92U7TomomAjgZRNxdNO2U6w9BEJn+UYOOPgSh5ZagKTaSt7c1TcZ45FK32S/o60dn4f WbvNHdO+vha8SxbpYhFr6k+F44nNbksA3HRxUmB8/ZU4iKkON2cTcerVwPsH4FpYzhSw 6LEAjO8HOiI9ZunAudAdrM9rqV3fs9h0l0tuFiFzk9+KTo/K36OvAj/tpkgMvnE3Lw2e h+dA4efELOlWSvkLjIv1MIEoi8khCFISBqho0ztPGEPACHsMDDbaW04TDCr0ONQbkX97 3WLA== X-Received: by 10.14.176.8 with SMTP id a8mr15854924eem.12.1377148375645; Wed, 21 Aug 2013 22:12:55 -0700 (PDT) Received: from ainbal-ubuntu.home.jungo.com (out.jungo.com. [212.150.239.254]) by mx.google.com with ESMTPSA id h52sm14808152eez.3.1969.12.31.16.00.00 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 21 Aug 2013 22:12:54 -0700 (PDT) From: Assaf Inbal To: buildroot@uclibc.org Date: Thu, 22 Aug 2013 08:12:35 +0300 Message-Id: <1377148355-21125-1-git-send-email-shmuelzon@gmail.com> X-Mailer: git-send-email 1.7.9.5 Cc: Assaf Inbal Subject: [Buildroot] [PATCH] getty: add the ability to pass options to getty 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 Signed-off-by: Assaf Inbal Acked-by: Arnout Vandecappelle (Essensium/Mind) --- system/Config.in | 7 +++++++ system/system.mk | 5 +++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/system/Config.in b/system/Config.in index d41f184..16558bf 100644 --- a/system/Config.in +++ b/system/Config.in @@ -230,6 +230,13 @@ config BR2_TARGET_GENERIC_GETTY_BAUDRATE default "57600" if BR2_TARGET_GENERIC_GETTY_BAUDRATE_57600 default "115200" if BR2_TARGET_GENERIC_GETTY_BAUDRATE_115200 +config BR2_TARGET_GENERIC_GETTY_OPTIONS + string "other random options to pass to getty" + default "" + help + Any other flags you want to pass to gettey, + Refer to getty --help for details. + config BR2_TARGET_GENERIC_GETTY_TERM string "Value to assign the TERM environment variable" default "vt100" diff --git a/system/system.mk b/system/system.mk index b4ddc3e..925f3f4 100644 --- a/system/system.mk +++ b/system/system.mk @@ -5,6 +5,7 @@ TARGET_GENERIC_PASSWD_METHOD := $(call qstrip,$(BR2_TARGET_GENERIC_PASSWD_METHOD 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_GETTY_OPTIONS:=$(call qstrip,$(BR2_TARGET_GENERIC_GETTY_OPTIONS)) target-generic-securetty: grep -q '^$(TARGET_GENERIC_GETTY)$$' $(TARGET_DIR)/etc/securetty || \ @@ -29,13 +30,13 @@ target-root-passwd: $(SED) "s,^root:[^:]*:,root:$$TARGET_GENERIC_ROOT_PASSWD_HASH:," $(TARGET_DIR)/etc/shadow target-generic-getty-busybox: - $(SED) '/# GENERIC_SERIAL$$/s~^.*#~$(TARGET_GENERIC_GETTY)::respawn:/sbin/getty -L $(TARGET_GENERIC_GETTY) $(TARGET_GENERIC_GETTY_BAUDRATE) $(TARGET_GENERIC_GETTY_TERM) #~' \ + $(SED) '/# GENERIC_SERIAL$$/s~^.*#~$(TARGET_GENERIC_GETTY)::respawn:/sbin/getty -L $(TARGET_GENERIC_GETTY_OPTIONS) $(TARGET_GENERIC_GETTY) $(TARGET_GENERIC_GETTY_BAUDRATE) $(TARGET_GENERIC_GETTY_TERM) #~' \ $(TARGET_DIR)/etc/inittab # In sysvinit inittab, the "id" must not be longer than 4 bytes, so we # skip the "tty" part and keep only the remaining. target-generic-getty-sysvinit: - $(SED) '/# GENERIC_SERIAL$$/s~^.*#~$(shell echo $(TARGET_GENERIC_GETTY) | tail -c+4)::respawn:/sbin/getty -L $(TARGET_GENERIC_GETTY) $(TARGET_GENERIC_GETTY_BAUDRATE) $(TARGET_GENERIC_GETTY_TERM) #~' \ + $(SED) '/# GENERIC_SERIAL$$/s~^.*#~$(shell echo $(TARGET_GENERIC_GETTY) | tail -c+4)::respawn:/sbin/getty -L $(TARGET_GENERIC_GETTY_OPTIONS) $(TARGET_GENERIC_GETTY) $(TARGET_GENERIC_GETTY_BAUDRATE) $(TARGET_GENERIC_GETTY_TERM) #~' \ $(TARGET_DIR)/etc/inittab # Find commented line, if any, and remove leading '#'s