Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package: add agent-proxy target and host packages
@ 2022-05-07 16:13 Rufus Segar
  2022-05-07 16:13 ` [Buildroot] [PATCH 1/1] package: add kdmx " Rufus Segar
  2022-10-14 21:11 ` [Buildroot] [PATCH 1/1] package: add agent-proxy " Thomas Petazzoni via buildroot
  0 siblings, 2 replies; 4+ messages in thread
From: Rufus Segar @ 2022-05-07 16:13 UTC (permalink / raw)
  To: buildroot; +Cc: Rufus Segar, Thomas Petazzoni

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

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))
-- 
2.36.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [Buildroot] [PATCH 1/1] package: add kdmx target and host packages
  2022-05-07 16:13 [Buildroot] [PATCH 1/1] package: add agent-proxy target and host packages Rufus Segar
@ 2022-05-07 16:13 ` Rufus Segar
  2022-10-14 21:14   ` Thomas Petazzoni via buildroot
  2022-10-14 21:11 ` [Buildroot] [PATCH 1/1] package: add agent-proxy " Thomas Petazzoni via buildroot
  1 sibling, 1 reply; 4+ messages in thread
From: Rufus Segar @ 2022-05-07 16:13 UTC (permalink / raw)
  To: buildroot; +Cc: Rufus Segar, Thomas Petazzoni

Signed-off-by: Rufus Segar <rhs@riseup.net>
---
 package/Config.in           |  1 +
 package/Config.in.host      |  1 +
 package/kdmx/Config.in      | 12 ++++++++++++
 package/kdmx/Config.in.host | 12 ++++++++++++
 package/kdmx/kdmx.mk        | 33 +++++++++++++++++++++++++++++++++
 5 files changed, 59 insertions(+)
 create mode 100644 package/kdmx/Config.in
 create mode 100644 package/kdmx/Config.in.host
 create mode 100644 package/kdmx/kdmx.mk

diff --git a/package/Config.in b/package/Config.in
index 8892134133..9adaf4c5a2 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -105,6 +105,7 @@ menu "Debugging, profiling and benchmark"
 	source "package/gdb/Config.in"
 	source "package/google-breakpad/Config.in"
 	source "package/iozone/Config.in"
+	source "package/kdmx/Config.in"
 	source "package/kexec/Config.in"
 	source "package/kexec-lite/Config.in"
 	source "package/ktap/Config.in"
diff --git a/package/Config.in.host b/package/Config.in.host
index cd1c34b5a3..9bb5f0587f 100644
--- a/package/Config.in.host
+++ b/package/Config.in.host
@@ -45,6 +45,7 @@ menu "Host utilities"
 	source "package/jh71xx-tools/Config.in.host"
 	source "package/jq/Config.in.host"
 	source "package/jsmin/Config.in.host"
+	source "package/kdmx/Config.in.host"
 	source "package/kmod/Config.in.host"
 	source "package/libp11/Config.in.host"
 	source "package/lld/Config.in.host"
diff --git a/package/kdmx/Config.in b/package/kdmx/Config.in
new file mode 100644
index 0000000000..af338e6bda
--- /dev/null
+++ b/package/kdmx/Config.in
@@ -0,0 +1,12 @@
+config BR2_PACKAGE_KDMX
+	bool "kdmx"
+	help
+	  kdmx is a program designed to split GDB packets and other
+	  trafic coming from a target on a serial line into 2 separate
+	  pseudo-ttys.
+
+	  The most common use of this is to run kgdb and console on a
+	  single serial port, but should be usable for alternating
+	  gdbserver or console over a serial line as well.
+
+	  git://git.kernel.org/pub/scm/utils/kernel/kgdb/agent-proxy.git
diff --git a/package/kdmx/Config.in.host b/package/kdmx/Config.in.host
new file mode 100644
index 0000000000..5080659171
--- /dev/null
+++ b/package/kdmx/Config.in.host
@@ -0,0 +1,12 @@
+config BR2_PACKAGE_HOST_KDMX
+	bool "host kdmx"
+	help
+	  kdmx is a program designed to split GDB packets and other
+	  trafic coming from a target on a serial line into 2 separate
+	  pseudo-ttys.
+
+	  The most common use of this is to run kgdb and console on a
+	  single serial port, but should be usable for alternating
+	  gdbserver or console over a serial line as well.
+
+	  git://git.kernel.org/pub/scm/utils/kernel/kgdb/agent-proxy.git
diff --git a/package/kdmx/kdmx.mk b/package/kdmx/kdmx.mk
new file mode 100644
index 0000000000..42e17003b0
--- /dev/null
+++ b/package/kdmx/kdmx.mk
@@ -0,0 +1,33 @@
+################################################################################
+#
+# kdmx
+#
+################################################################################
+
+KDMX_VERSION = agent-proxy-1.97
+KDMX_SITE = git://git.kernel.org/pub/scm/utils/kernel/kgdb/agent-proxy.git
+KDMX_LICENSE = GPL-2.0+
+KDMX_LICENSE_FILES = COPYING
+
+define KDMX_BUILD_CMDS
+	$(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D)/kdmx
+endef
+
+define KDMX_INSTALL_STAGING_CMDS
+	$(INSTALL) -D -m 0755 $(@D)/kdmx/kdmx $(STAGING_DIR)/usr/bin
+endef
+
+define KDMX_INSTALL_TARGET_CMDS
+	$(INSTALL) -D -m 0755 $(@D)/kdmx/kdmx $(TARGET_DIR)/usr/bin
+endef
+
+define HOST_KDMX_BUILD_CMDS
+	$(HOST_CONFIGURE_OPTS) $(MAKE) -C $(@D)/kdmx
+endef
+
+define HOST_KDMX_INSTALL_CMDS
+	$(HOST_CONFIGURE_OPTS) $(INSTALL) -D -m 0755 $(@D)/kdmx/kdmx $(HOST_DIR)/bin
+endef
+
+$(eval $(generic-package))
+$(eval $(host-generic-package))
-- 
2.36.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [Buildroot] [PATCH 1/1] package: add agent-proxy target and host packages
  2022-05-07 16:13 [Buildroot] [PATCH 1/1] package: add agent-proxy target and host packages Rufus Segar
  2022-05-07 16:13 ` [Buildroot] [PATCH 1/1] package: add kdmx " Rufus Segar
@ 2022-10-14 21:11 ` Thomas Petazzoni via buildroot
  1 sibling, 0 replies; 4+ messages in thread
From: Thomas Petazzoni via buildroot @ 2022-10-14 21:11 UTC (permalink / raw)
  To: Rufus Segar; +Cc: buildroot

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
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Buildroot] [PATCH 1/1] package: add kdmx target and host packages
  2022-05-07 16:13 ` [Buildroot] [PATCH 1/1] package: add kdmx " Rufus Segar
@ 2022-10-14 21:14   ` Thomas Petazzoni via buildroot
  0 siblings, 0 replies; 4+ messages in thread
From: Thomas Petazzoni via buildroot @ 2022-10-14 21:14 UTC (permalink / raw)
  To: Rufus Segar; +Cc: buildroot

Hello Rufus,

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

> Signed-off-by: Rufus Segar <rhs@riseup.net>
> ---
>  package/Config.in           |  1 +
>  package/Config.in.host      |  1 +
>  package/kdmx/Config.in      | 12 ++++++++++++
>  package/kdmx/Config.in.host | 12 ++++++++++++
>  package/kdmx/kdmx.mk        | 33 +++++++++++++++++++++++++++++++++
>  5 files changed, 59 insertions(+)
>  create mode 100644 package/kdmx/Config.in
>  create mode 100644 package/kdmx/Config.in.host
>  create mode 100644 package/kdmx/kdmx.mk

Thanks a lot for your proposal!

I'm a bit confused by the difference between agent-proxy and kdmx.
Could you clarify?

Also, kdmx is part of the agent-proxy code-base. So instead of being a
separate package in Buildroot, the existing agent-proxy package should
be extended to allow the build/installation or either agent-proxy or
kdmx, or both.

Could you have a look into this?

Thanks a lot!

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-10-14 21:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-05-07 16:13 [Buildroot] [PATCH 1/1] package: add agent-proxy target and host packages Rufus Segar
2022-05-07 16:13 ` [Buildroot] [PATCH 1/1] package: add kdmx " Rufus Segar
2022-10-14 21:14   ` Thomas Petazzoni via buildroot
2022-10-14 21:11 ` [Buildroot] [PATCH 1/1] package: add agent-proxy " Thomas Petazzoni via buildroot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox