|
@@ -227,6 +227,7 @@ endef
|
|
|
|
|
|
ifneq ($(call qstrip,$(BR2_TARGET_GENERIC_GETTY_PORT)),)
|
|
ifneq ($(call qstrip,$(BR2_TARGET_GENERIC_GETTY_PORT)),)
|
|
# systemd needs getty.service for VTs and serial-getty.service for serial ttys
|
|
# systemd needs getty.service for VTs and serial-getty.service for serial ttys
|
|
|
|
+# also patch the file to use the correct baud-rate, the default baudrate is 115200 so look for that
|
|
define SYSTEMD_INSTALL_SERVICE_TTY
|
|
define SYSTEMD_INSTALL_SERVICE_TTY
|
|
if echo $(BR2_TARGET_GENERIC_GETTY_PORT) | egrep -q 'tty[0-9]*$$'; \
|
|
if echo $(BR2_TARGET_GENERIC_GETTY_PORT) | egrep -q 'tty[0-9]*$$'; \
|
|
then \
|
|
then \
|
|
@@ -235,7 +236,11 @@ define SYSTEMD_INSTALL_SERVICE_TTY
|
|
SERVICE="serial-getty"; \
|
|
SERVICE="serial-getty"; \
|
|
fi; \
|
|
fi; \
|
|
ln -fs ../../../../lib/systemd/system/$${SERVICE}@.service \
|
|
ln -fs ../../../../lib/systemd/system/$${SERVICE}@.service \
|
|
- $(TARGET_DIR)/etc/systemd/system/getty.target.wants/$${SERVICE}@$(BR2_TARGET_GENERIC_GETTY_PORT).service
|
|
|
|
|
|
+ $(TARGET_DIR)/etc/systemd/system/getty.target.wants/$${SERVICE}@$(BR2_TARGET_GENERIC_GETTY_PORT).service; \
|
|
|
|
+ if [ $(call qstrip,$(BR2_TARGET_GENERIC_GETTY_BAUDRATE)) -gt 0 ] ; \
|
|
|
|
+ then \
|
|
|
|
+ $(SED) 's,115200,$(BR2_TARGET_GENERIC_GETTY_BAUDRATE),' $(TARGET_DIR)/lib/systemd/system/$${SERVICE}@.service; \
|
|
|
|
+ fi
|
|
endef
|
|
endef
|
|
endif
|
|
endif
|
|
|
|
|