@@ -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
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 <tjlee@ambarella.com> --- system/system.mk | 6 ++++++ 1 file changed, 6 insertions(+)