Skip to contentSkip to conversation

package/pdbg: new package

PATCH Superseded Joel Stanley 2 participants 7 messages Jul 25, 2016 – Jul 26, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/pdbg: new package

PowerPC FSI Debugger, for low level debugging of a Power8 CPU over FSI.

---
 package/pdbg/Config.in |  6 ++++++
 package/pdbg/pdbg.mk   | 14 ++++++++++++++
 2 files changed, 20 insertions(+)
 create mode 100644 package/pdbg/Config.in
 create mode 100644 package/pdbg/pdbg.mk
package/pdbg/Config.in new file +6 -0
new file mode 100644
index 000000000000..f25867fa2c41
@@ -0,0 +1,6 @@
+config BR2_PACKAGE_PDBG
+	bool "pdbg"
+	depends on BR2_arm
+	help
+	  PowerPC FSI Debugger, for low level debugging of a PowerPC CPU
+	  over FSI.
package/pdbg/pdbg.mk new file +14 -0
new file mode 100644
index 000000000000..48444567bee3
@@ -0,0 +1,14 @@
+################################################################################
+#
+# pdbg
+#
+################################################################################
+
+PDBG_VERSION = 90a7370a11e727f1482dea6ff2bd6aec20c64805
+
+PDBG_SITE = $(call github,open-power,pdbg,$(PDBG_VERSION))
+PDBG_LICENSE = Apache 2.0
+PDBG_LICENSE_FILES = COPYING
+PDBG_AUTORECONF = YES
+
+$(eval $(autotools-package))
Signature · 1 line
2.8.1
#1 lore raw

PATCH v2 1/1 package/pdbg: new package

PowerPC FSI Debugger, for low level debugging of a Power8 CPU over FSI.

---
v2:
- Fix whitespace in pdbg.mk
- Add URL to help text

 package/pdbg/Config.in |  8 ++++++++
 package/pdbg/pdbg.mk   | 13 +++++++++++++
 2 files changed, 21 insertions(+)
 create mode 100644 package/pdbg/Config.in
 create mode 100644 package/pdbg/pdbg.mk
package/pdbg/Config.in new file +8 -0
new file mode 100644
index 000000000000..cf37eb8aca41
@@ -0,0 +1,8 @@
+config BR2_PACKAGE_PDBG
+	bool "pdbg"
+	depends on BR2_arm
+	help
+	  PowerPC FSI Debugger, for low level debugging of a PowerPC CPU
+	  over FSI.
+
+	  https://github.com/open-power/pdbg
package/pdbg/pdbg.mk new file +13 -0
new file mode 100644
index 000000000000..9cc05cd728c0
@@ -0,0 +1,13 @@
+################################################################################
+#
+# pdbg
+#
+################################################################################
+
+PDBG_VERSION = 90a7370a11e727f1482dea6ff2bd6aec20c64805
+PDBG_SITE = $(call github,open-power,pdbg,$(PDBG_VERSION))
+PDBG_LICENSE = Apache 2.0
+PDBG_LICENSE_FILES = COPYING
+PDBG_AUTORECONF = YES
+
+$(eval $(autotools-package))
Signature · 1 line
2.8.1
#2 lore raw

PATCH v2 1/1 package/pdbg: new package

Hello,

package/pdbg/Config.in line 3

Quoted 9 lines · Joel Stanley
package/pdbg/Config.in new file +3 -0
new file mode 100644
index 000000000000..cf37eb8aca41
@@ -0,0 +1,8 @@
+config BR2_PACKAGE_PDBG
+	bool "pdbg"
+	depends on BR2_arm

Anything that makes it ARM-specific?

package/pdbg/Config.in line 6

Quoted 3 lines
package/pdbg/Config.in new file +3 -0
+	help
+	  PowerPC FSI Debugger, for low level debugging of a PowerPC CPU
+	  over FSI.

It would have been good to explain somewhere than pdbg runs on the BMC, which is generally an ARM-powered system monitoring/controlling a number of PowerPC CPUs. Otherwise, it feels odd to have a PowerPC-related package available only on the ARM architecture.

package/pdbg/Config.in

Quoted 5 lines
package/pdbg/Config.in new file +5 -0
+PDBG_VERSION = 90a7370a11e727f1482dea6ff2bd6aec20c64805
+PDBG_SITE = $(call github,open-power,pdbg,$(PDBG_VERSION))
+PDBG_LICENSE = Apache 2.0
+PDBG_LICENSE_FILES = COPYING
+PDBG_AUTORECONF = YES

Side note (unrelated to Buildroot packaging): had a look at the code, and this mapping of /dev/mem to then bing-bang some protocol on GPIOs from userspace is really, really nasty :-/

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#3 lore raw

PATCH v2 1/1 package/pdbg: new package

Hi Thomas,

Quoted 4 lines · Thomas Petazzoni

Hello,

On Mon, 25 Jul 2016 16:23:12 +0930, Joel Stanley wrote:

Quoted 11 lines

package/pdbg/Config.in line 3

Quoted 9 lines
package/pdbg/Config.in new file +3 -0
new file mode 100644
index 000000000000..cf37eb8aca41
@@ -0,0 +1,8 @@
+config BR2_PACKAGE_PDBG
+     bool "pdbg"
+     depends on BR2_arm

Anything that makes it ARM-specific?

Upstream has only ever tested the code on ARM. It does build for x86 (and power, and anything else I guess), but as you point out below it is only useful when run from a processor that is attached to a p8 host.

What's the general rule in this circumstance?

Quoted 9 lines

package/pdbg/Config.in line 6

Quoted 4 lines
package/pdbg/Config.in new file +3 -0
+     help
+       PowerPC FSI Debugger, for low level debugging of a PowerPC CPU
+       over FSI.

It would have been good to explain somewhere than pdbg runs on the BMC, which is generally an ARM-powered system monitoring/controlling a number of PowerPC CPUs. Otherwise, it feels odd to have a PowerPC-related package available only on the ARM architecture.

Sure, I will add some more text.

Quoted 10 lines

package/pdbg/Config.in

Quoted 6 lines
package/pdbg/Config.in new file +5 -0
+PDBG_VERSION = 90a7370a11e727f1482dea6ff2bd6aec20c64805
+PDBG_SITE = $(call github,open-power,pdbg,$(PDBG_VERSION))
+PDBG_LICENSE = Apache 2.0
+PDBG_LICENSE_FILES = COPYING
+PDBG_AUTORECONF = YES

Side note (unrelated to Buildroot packaging): had a look at the code, and this mapping of /dev/mem to then bing-bang some protocol on GPIOs from userspace is really, really nasty :-/

Yep! You and I are the same page here. To date the tool has been used on a BIOS vendor's BMC firmware, running a very old kernel that lacks the proper linux APIs for access to hardware. It's not ideal.

I've been slowly upstreaming a from-scratch kernel port. Once we have that in place pdbg can add support for doing GPIO through the kernel.

In the future near future we will add FSI support in the kernel, and from there perhaps use the Coldfire processor inside the Aspeed SoC to offload the bitbanging. Lots of work to do, but we're getting there.

Cheers,

Joel

#4 lore raw

PATCH v2 1/1 package/pdbg: new package

Hello,

Quoted 8 lines · Joel Stanley
Quoted 1 line

Anything that makes it ARM-specific?

Upstream has only ever tested the code on ARM. It does build for x86 (and power, and anything else I guess), but as you point out below it is only useful when run from a processor that is attached to a p8 host.

What's the general rule in this circumstance?

I believe in such cases we tend to make the package available on all architectures anyway. There is no inherent limitation in having it build and run on other architectures.

The only cases where we add architecture dependencies are:

- The package contains architecture-specific code.

- The package contains pre-built binaries for a given architecture (e.g. OpenGL blobs).

- The package is really relevant only for an architecture, like some GPU or VPU related stuff, where the GPU/VPU only exists for this architecture. We could say that pdbg falls into this category though.

Quoted 14 lines
Quoted 9 lines

package/pdbg/pdbg.mk line 11

Quoted 5 lines
package/pdbg/pdbg.mk new file +5 -0
+PDBG_VERSION = 90a7370a11e727f1482dea6ff2bd6aec20c64805
+PDBG_SITE = $(call github,open-power,pdbg,$(PDBG_VERSION))
+PDBG_LICENSE = Apache 2.0
+PDBG_LICENSE_FILES = COPYING
+PDBG_AUTORECONF = YES  

Side note (unrelated to Buildroot packaging): had a look at the code, and this mapping of /dev/mem to then bing-bang some protocol on GPIOs from userspace is really, really nasty :-/

Yep! You and I are the same page here. To date the tool has been used on a BIOS vendor's BMC firmware, running a very old kernel that lacks the proper linux APIs for access to hardware. It's not ideal.

Quoted 6 lines

I've been slowly upstreaming a from-scratch kernel port. Once we have that in place pdbg can add support for doing GPIO through the kernel.

In the future near future we will add FSI support in the kernel, and from there perhaps use the Coldfire processor inside the Aspeed SoC to offload the bitbanging. Lots of work to do, but we're getting there.

OK, sounds good.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#5 lore raw

PATCH v3 1/1 package/pdbg: new package

In reply to Joel Stanley

PowerPC FSI Debugger, for low level debugging of a Power8 CPU over FSI.

---
v3:
- do not restrict to ARM, as it builds on all CPU architectures
- metion where you might want to run pdbg in the help text

v2:
- Fix whitespace in pdbg.mk
- Add URL to help text

 package/pdbg/Config.in | 10 ++++++++++
 package/pdbg/pdbg.mk   | 13 +++++++++++++
 2 files changed, 23 insertions(+)
 create mode 100644 package/pdbg/Config.in
 create mode 100644 package/pdbg/pdbg.mk
package/pdbg/Config.in new file +10 -0
new file mode 100644
index 000000000000..5a3bcda48ba8
@@ -0,0 +1,10 @@
+config BR2_PACKAGE_PDBG
+	bool "pdbg"
+	help
+	  PowerPC FSI Debugger, for low level debugging of a IBM Power8 CPU
+	  over FSI.
+
+	  pdbg runs on a BMC, which is generally an ARM-powered system
+	  monitoring/controlling a host CPU.
+
+	  https://github.com/open-power/pdbg
package/pdbg/pdbg.mk new file +13 -0
new file mode 100644
index 000000000000..9cc05cd728c0
@@ -0,0 +1,13 @@
+################################################################################
+#
+# pdbg
+#
+################################################################################
+
+PDBG_VERSION = 90a7370a11e727f1482dea6ff2bd6aec20c64805
+PDBG_SITE = $(call github,open-power,pdbg,$(PDBG_VERSION))
+PDBG_LICENSE = Apache 2.0
+PDBG_LICENSE_FILES = COPYING
+PDBG_AUTORECONF = YES
+
+$(eval $(autotools-package))
Signature · 1 line
2.8.1
#6 lore raw

PATCH v3 1/1 package/pdbg: new package

Hello,

Quoted 8 lines · Joel Stanley

PowerPC FSI Debugger, for low level debugging of a Power8 CPU over FSI.

---
v3:
- do not restrict to ARM, as it builds on all CPU architectures
- metion where you might want to run pdbg in the help text

Quoted 6 lines

v2:
- Fix whitespace in pdbg.mk
- Add URL to help text

 package/pdbg/Config.in | 10 ++++++++++
 package/pdbg/pdbg.mk   | 13 +++++++++++++

You forgot to add the package to package/Config.in, and to add a hash file. I've added both and applied. Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com