From c33cdc2ca9cc85dddd6eea62eac4fca858b9e93e Mon Sep 17 00:00:00 2001 From: Fiona Klute Date: Wed, 29 Apr 2026 11:33:39 +0200 Subject: [PATCH] package/ugetty: support building "proxycommand" binary for host The "proxycommand" binary is used with SSH clients to connect to ugetty over serial. Building it as a host package makes it easy to use with Buildroot builds including ugetty on the target, without needing a separate install. Signed-off-by: Fiona Klute [Peter: use install -D] Signed-off-by: Peter Korsgaard --- package/Config.in.host | 1 + package/ugetty/Config.in.host | 13 +++++++++++++ package/ugetty/ugetty.mk | 10 ++++++++++ 3 files changed, 24 insertions(+) create mode 100644 package/ugetty/Config.in.host diff --git a/package/Config.in.host b/package/Config.in.host index b990ce8b14..bb6732a639 100644 --- a/package/Config.in.host +++ b/package/Config.in.host @@ -124,6 +124,7 @@ menu "Host utilities" source "package/ti-cgt-pru/Config.in.host" source "package/tipidee/Config.in.host" source "package/uboot-tools/Config.in.host" + source "package/ugetty/Config.in.host" source "package/util-linux/Config.in.host" source "package/utp_com/Config.in.host" source "package/uuu/Config.in.host" diff --git a/package/ugetty/Config.in.host b/package/ugetty/Config.in.host new file mode 100644 index 0000000000..6d907d1c38 --- /dev/null +++ b/package/ugetty/Config.in.host @@ -0,0 +1,13 @@ +config BR2_PACKAGE_HOST_UGETTY + bool "host ugetty" + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_8 # std=c17 + help + A minimal getty for embedded Linux that auto-detects the + client and dispatches incoming serial connections to a login + prompt, a PPP session, or the local SSH server as + appropriate. + + The host package builds only the "proxycommand" binary for + use with SSH clients to connect to ugetty over serial. + + https://github.com/ryancdotorg/ugetty diff --git a/package/ugetty/ugetty.mk b/package/ugetty/ugetty.mk index 0e306a02c2..1dc628540d 100644 --- a/package/ugetty/ugetty.mk +++ b/package/ugetty/ugetty.mk @@ -20,4 +20,14 @@ define UGETTY_INSTALL_TARGET_CMDS ln -snf ugetty $(TARGET_DIR)/sbin/getty endef +define HOST_UGETTY_BUILD_CMDS + $(HOST_CONFIGURE_OPTS) $(MAKE) -C $(@D) bin/proxycommand +endef + +define HOST_UGETTY_INSTALL_CMDS + $(INSTALL) -m 0755 -D $(@D)/bin/proxycommand \ + $(HOST_DIR)/bin/proxycommand +endef + $(eval $(generic-package)) +$(eval $(host-generic-package))