* [Buildroot] [PATCH 1/1] busybox: write commented login line in /etc/inittab when getty disabled
@ 2019-10-01 13:09 Stephen Bos
2019-10-25 20:02 ` Matthew Weber
2019-10-27 11:52 ` Thomas Petazzoni
0 siblings, 2 replies; 4+ messages in thread
From: Stephen Bos @ 2019-10-01 13:09 UTC (permalink / raw)
To: buildroot
From: Stephen Bos <stephen.bos@hagergroup.com>
When the "Run a getty" option is disabled, busybox doesn't remove the
/etc/inittab line from previous builds. With this patch, the line is
correctly commented out.
Signed-off-by: Stephen Bos <stephen.bos@hagergroup.com>
Co-authored-by: Stephen Bos <stephen.bos@hagergroup.com>
Co-authored-by: Christophe Blaess <christophe.blaess@logilin.fr>
---
package/busybox/busybox.mk | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/package/busybox/busybox.mk b/package/busybox/busybox.mk
index a154584592..cc9921dabe 100644
--- a/package/busybox/busybox.mk
+++ b/package/busybox/busybox.mk
@@ -218,8 +218,12 @@ define BUSYBOX_SET_GETTY
$(SED) '/# GENERIC_SERIAL$$/s~^.*#~$(SYSTEM_GETTY_PORT)::respawn:/sbin/getty -L $(SYSTEM_GETTY_OPTIONS) $(SYSTEM_GETTY_PORT) $(SYSTEM_GETTY_BAUDRATE) $(SYSTEM_GETTY_TERM) #~' \
$(TARGET_DIR)/etc/inittab
endef
-BUSYBOX_TARGET_FINALIZE_HOOKS += BUSYBOX_SET_GETTY
+else
+define BUSYBOX_SET_GETTY
+ $(SED) '/# GENERIC_SERIAL$$/s~^.*#~#ttyS0::respawn:/sbin/getty -L ttyS0 115200 vt100 #~' $(TARGET_DIR)/etc/inittab
+endef
endif # BR2_TARGET_GENERIC_GETTY
+BUSYBOX_TARGET_FINALIZE_HOOKS += BUSYBOX_SET_GETTY
BUSYBOX_TARGET_FINALIZE_HOOKS += SYSTEM_REMOUNT_ROOT_INITTAB
--
2.17.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH 1/1] busybox: write commented login line in /etc/inittab when getty disabled
2019-10-01 13:09 [Buildroot] [PATCH 1/1] busybox: write commented login line in /etc/inittab when getty disabled Stephen Bos
@ 2019-10-25 20:02 ` Matthew Weber
2019-10-25 20:17 ` Carlos Santos
2019-10-27 11:52 ` Thomas Petazzoni
1 sibling, 1 reply; 4+ messages in thread
From: Matthew Weber @ 2019-10-25 20:02 UTC (permalink / raw)
To: buildroot
Stephen,
On Tue, Oct 1, 2019 at 8:49 AM Stephen Bos <mailist@logilin.fr> wrote:
>
> From: Stephen Bos <stephen.bos@hagergroup.com>
>
> When the "Run a getty" option is disabled, busybox doesn't remove the
> /etc/inittab line from previous builds. With this patch, the line is
> correctly commented out.
>
> Signed-off-by: Stephen Bos <stephen.bos@hagergroup.com>
> Co-authored-by: Stephen Bos <stephen.bos@hagergroup.com>
> Co-authored-by: Christophe Blaess <christophe.blaess@logilin.fr>
1) Setup a basic busybox build and verified console was setup with
getty after a full build
2) Unchecked the getty and verified it was commended out in inittab
after a rebuild
3) Enabled getty and changed tty used, rebuilt and verified tty string updated
4) Disabled getty and verified it was commended out after a rebuild
Tested-by Matt Weber <matthew.weber@rockwellcollins.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH 1/1] busybox: write commented login line in /etc/inittab when getty disabled
2019-10-25 20:02 ` Matthew Weber
@ 2019-10-25 20:17 ` Carlos Santos
0 siblings, 0 replies; 4+ messages in thread
From: Carlos Santos @ 2019-10-25 20:17 UTC (permalink / raw)
To: buildroot
On Fri, Oct 25, 2019 at 5:02 PM Matthew Weber <matthew.weber@collins.com> wrote:
>
> Stephen,
>
> On Tue, Oct 1, 2019 at 8:49 AM Stephen Bos <mailist@logilin.fr> wrote:
> >
> > From: Stephen Bos <stephen.bos@hagergroup.com>
> >
> > When the "Run a getty" option is disabled, busybox doesn't remove the
> > /etc/inittab line from previous builds. With this patch, the line is
> > correctly commented out.
> >
> > Signed-off-by: Stephen Bos <stephen.bos@hagergroup.com>
> > Co-authored-by: Stephen Bos <stephen.bos@hagergroup.com>
> > Co-authored-by: Christophe Blaess <christophe.blaess@logilin.fr>
>
> 1) Setup a basic busybox build and verified console was setup with
> getty after a full build
> 2) Unchecked the getty and verified it was commended out in inittab
> after a rebuild
> 3) Enabled getty and changed tty used, rebuilt and verified tty string updated
> 4) Disabled getty and verified it was commended out after a rebuild
>
> Tested-by Matt Weber <matthew.weber@rockwellcollins.com>
I like the idea but a corresponding change should be made to sysvinit.
--
Carlos Santos <unixmania@gmail.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH 1/1] busybox: write commented login line in /etc/inittab when getty disabled
2019-10-01 13:09 [Buildroot] [PATCH 1/1] busybox: write commented login line in /etc/inittab when getty disabled Stephen Bos
2019-10-25 20:02 ` Matthew Weber
@ 2019-10-27 11:52 ` Thomas Petazzoni
1 sibling, 0 replies; 4+ messages in thread
From: Thomas Petazzoni @ 2019-10-27 11:52 UTC (permalink / raw)
To: buildroot
On Tue, 1 Oct 2019 15:09:48 +0200
Stephen Bos <mailist@logilin.fr> wrote:
> From: Stephen Bos <stephen.bos@hagergroup.com>
>
> When the "Run a getty" option is disabled, busybox doesn't remove the
> /etc/inittab line from previous builds. With this patch, the line is
> correctly commented out.
>
> Signed-off-by: Stephen Bos <stephen.bos@hagergroup.com>
> Co-authored-by: Stephen Bos <stephen.bos@hagergroup.com>
> Co-authored-by: Christophe Blaess <christophe.blaess@logilin.fr>
> ---
> package/busybox/busybox.mk | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
We normally don't really care about such issue, because it only occurs
when you do a full build, change the configuration, and then run "make"
again, without doing a full clean build. Buildroot never guarantees
that the build output will be correct in such situations.
But well, in this specific case it is very cheap to do, so ok, fair
enough.
Applied, thanks!
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-10-27 11:52 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-01 13:09 [Buildroot] [PATCH 1/1] busybox: write commented login line in /etc/inittab when getty disabled Stephen Bos
2019-10-25 20:02 ` Matthew Weber
2019-10-25 20:17 ` Carlos Santos
2019-10-27 11:52 ` Thomas Petazzoni
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.