diff mbox series

[1/1] package: add agent-proxy target and host packages

Message ID 20220507161338.2125859-1-rhs@riseup.net
State Accepted
Headers show
Series [1/1] package: add agent-proxy target and host packages | expand

Commit Message

Rufus Segar May 7, 2022, 4:13 p.m. UTC
Signed-off-by: Rufus Segar <rhs@riseup.net>
---
 package/Config.in                  |  1 +
 package/Config.in.host             |  1 +
 package/agent-proxy/Config.in      | 11 ++++++++++
 package/agent-proxy/Config.in.host | 11 ++++++++++
 package/agent-proxy/agent-proxy.mk | 33 ++++++++++++++++++++++++++++++
 5 files changed, 57 insertions(+)
 create mode 100644 package/agent-proxy/Config.in
 create mode 100644 package/agent-proxy/Config.in.host
 create mode 100644 package/agent-proxy/agent-proxy.mk

Comments

Thomas Petazzoni Oct. 14, 2022, 9:11 p.m. UTC | #1
Hello Rugus,

On Sat,  7 May 2022 17:13:37 +0100
Rufus Segar <rhs@riseup.net> wrote:

> Signed-off-by: Rufus Segar <rhs@riseup.net>

Thanks a lot for your contribution. Believe it or not, but after some
many months, I finally took the time to review and apply your patch.

However, I did quite a few changes:

 - I kept only the host variant of the package. Indeed, my
   understanding is that agent-proxy is meant to be executed on the
   developer workstation to de-multiplex the kgdb traffic from the
   console traffic. Therefore it was not clear why a target variant was
   needed. Of course, if additional justification/explanation is given,
   the target variant can be re-added via a follow-up patch.

 - Addition of an entry in the DEVELOPERS file

 - Addition of a .hash file with the hash of the tarball and hash of
   the COPYING file.

See below for some other comments.

> +AGENT_PROXY_VERSION = agent-proxy-1.97
> +AGENT_PROXY_SITE = git://git.kernel.org/pub/scm/utils/kernel/kgdb/agent-proxy.git
> +AGENT_PROXY_LICENSE = GPL-2.0+

This was not correct: the license is GPL-2.0 only.

> +AGENT_PROXY_LICENSE_FILES = COPYING
> +
> +define AGENT_PROXY_BUILD_CMDS
> +	$(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) all
> +endef
> +
> +define AGENT_PROXY_INSTALL_STAGING_CMDS
> +	$(INSTALL) -D -m 0755 $(@D)/agent-proxy $(STAGING_DIR)/usr/bin

This had not effect since AGENT_PROXY_INSTALL_STAGING is not set to
YES. But anyway, I dropped this since I dropped the target variant;

> +endef
> +
> +define AGENT_PROXY_INSTALL_TARGET_CMDS
> +	$(INSTALL) -D -m 0755 $(@D)/agent-proxy $(TARGET_DIR)/usr/bin
> +endef
> +
> +define HOST_AGENT_PROXY_BUILD_CMDS
> +	$(HOST_CONFIGURE_OPTS) $(MAKE) -C $(@D)
> +endef
> +
> +define HOST_AGENT_PROXY_INSTALL_CMDS
> +	$(HOST_CONFIGURE_OPTS) $(INSTALL) -D -m 0755 $(@D)/agent-proxy $(HOST_DIR)/bin

$(HOST_CONFIGURE_OPTS) not needed here, and we want the full
destination path as the last argument, i.e $(HOST_DIR)/bin/agent-proxy.

Once again, thanks a lot for this contribution!

Best regards,

Thomas
diff mbox series

Patch

diff --git a/package/Config.in b/package/Config.in
index 8892134133..40e41d77a9 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -83,6 +83,7 @@  menu "Compressors and decompressors"
 endmenu
 
 menu "Debugging, profiling and benchmark"
+	source "package/agent-proxy/Config.in"
 	source "package/babeltrace2/Config.in"
 	source "package/blktrace/Config.in"
 	source "package/bonnie/Config.in"
diff --git a/package/Config.in.host b/package/Config.in.host
index cd1c34b5a3..e71008f9d9 100644
--- a/package/Config.in.host
+++ b/package/Config.in.host
@@ -2,6 +2,7 @@  menu "Host utilities"
 
 	source "package/abootimg/Config.in.host"
 	source "package/aespipe/Config.in.host"
+	source "package/agent-proxy/Config.in.host"
 	source "package/android-tools/Config.in.host"
 	source "package/asn1c/Config.in.host"
 	source "package/babeltrace2/Config.in.host"
diff --git a/package/agent-proxy/Config.in b/package/agent-proxy/Config.in
new file mode 100644
index 0000000000..fb66599589
--- /dev/null
+++ b/package/agent-proxy/Config.in
@@ -0,0 +1,11 @@ 
+config BR2_PACKAGE_AGENT_PROXY
+	bool "agent-proxy"
+	help
+	  This is a simple, small proxy which was intended for use with
+	  kgdb, or gdbserver type connections where you want to share a
+	  text console and a debug session.
+
+	  The idea is that you use the agent-proxy to connect to a
+	  serial port directly or to a remote terminal server.
+
+	  git://git.kernel.org/pub/scm/utils/kernel/kgdb/agent-proxy.git
diff --git a/package/agent-proxy/Config.in.host b/package/agent-proxy/Config.in.host
new file mode 100644
index 0000000000..34697665d4
--- /dev/null
+++ b/package/agent-proxy/Config.in.host
@@ -0,0 +1,11 @@ 
+config BR2_PACKAGE_HOST_AGENT_PROXY
+	bool "host agent-proxy"
+	help
+	  This is a simple, small proxy which was intended for use with
+	  kgdb, or gdbserver type connections where you want to share a
+	  text console and a debug session.
+
+	  The idea is that you use the agent-proxy to connect to a
+	  serial port directly or to a remote terminal server.
+
+	  git://git.kernel.org/pub/scm/utils/kernel/kgdb/agent-proxy.git
diff --git a/package/agent-proxy/agent-proxy.mk b/package/agent-proxy/agent-proxy.mk
new file mode 100644
index 0000000000..faec7fba32
--- /dev/null
+++ b/package/agent-proxy/agent-proxy.mk
@@ -0,0 +1,33 @@ 
+################################################################################
+#
+# agent-proxy
+#
+################################################################################
+
+AGENT_PROXY_VERSION = agent-proxy-1.97
+AGENT_PROXY_SITE = git://git.kernel.org/pub/scm/utils/kernel/kgdb/agent-proxy.git
+AGENT_PROXY_LICENSE = GPL-2.0+
+AGENT_PROXY_LICENSE_FILES = COPYING
+
+define AGENT_PROXY_BUILD_CMDS
+	$(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) all
+endef
+
+define AGENT_PROXY_INSTALL_STAGING_CMDS
+	$(INSTALL) -D -m 0755 $(@D)/agent-proxy $(STAGING_DIR)/usr/bin
+endef
+
+define AGENT_PROXY_INSTALL_TARGET_CMDS
+	$(INSTALL) -D -m 0755 $(@D)/agent-proxy $(TARGET_DIR)/usr/bin
+endef
+
+define HOST_AGENT_PROXY_BUILD_CMDS
+	$(HOST_CONFIGURE_OPTS) $(MAKE) -C $(@D)
+endef
+
+define HOST_AGENT_PROXY_INSTALL_CMDS
+	$(HOST_CONFIGURE_OPTS) $(INSTALL) -D -m 0755 $(@D)/agent-proxy $(HOST_DIR)/bin
+endef
+
+$(eval $(generic-package))
+$(eval $(host-generic-package))