From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from ptx.hi.pengutronix.de ([2001:67c:670:100:1d::c0]) by metis.ext.pengutronix.de with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1hbiIy-0005yW-IE for ptxdist@pengutronix.de; Fri, 14 Jun 2019 11:15:28 +0200 Received: from mgr by ptx.hi.pengutronix.de with local (Exim 4.89) (envelope-from ) id 1hbiIy-000168-Af for ptxdist@pengutronix.de; Fri, 14 Jun 2019 11:15:28 +0200 Date: Fri, 14 Jun 2019 11:15:28 +0200 From: Michael Grzeschik Message-ID: <20190614091528.uzuyrvq5zbtsp7v6@pengutronix.de> References: <20190606221949.14709-1-m.grzeschik@pengutronix.de> <20190606221949.14709-2-m.grzeschik@pengutronix.de> <20190614071823.264mekfzfreokrtz@pengutronix.de> MIME-Version: 1.0 In-Reply-To: <20190614071823.264mekfzfreokrtz@pengutronix.de> Subject: Re: [ptxdist] [PATCH 2/2] host-openocd: add initial support List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: ptxdist@pengutronix.de Content-Type: multipart/mixed; boundary="===============2095383117==" Errors-To: ptxdist-bounces@pengutronix.de Sender: "ptxdist" To: ptxdist@pengutronix.de --===============2095383117== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="eweu7nkdbhwtj7qc" Content-Disposition: inline --eweu7nkdbhwtj7qc Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jun 14, 2019 at 09:18:23AM +0200, Michael Olbrich wrote: > On Fri, Jun 07, 2019 at 12:19:49AM +0200, Michael Grzeschik wrote: > > Signed-off-by: Michael Grzeschik > > --- > > patches/openocd-af952850/autogen.sh | 3 + > > rules/host-openocd.in | 12 ++++ > > rules/host-openocd.make | 89 +++++++++++++++++++++++++++++ > > 3 files changed, 104 insertions(+) > > create mode 100755 patches/openocd-af952850/autogen.sh > > create mode 100644 rules/host-openocd.in > > create mode 100644 rules/host-openocd.make > >=20 > > diff --git a/patches/openocd-af952850/autogen.sh b/patches/openocd-af95= 2850/autogen.sh > > new file mode 100755 > > index 000000000..7d344d32f > > --- /dev/null > > +++ b/patches/openocd-af952850/autogen.sh > > @@ -0,0 +1,3 @@ > > +#!/bin/bash > > + > > +exec ./bootstrap > > diff --git a/rules/host-openocd.in b/rules/host-openocd.in > > new file mode 100644 > > index 000000000..8c863598e > > --- /dev/null > > +++ b/rules/host-openocd.in > > @@ -0,0 +1,12 @@ > > +## SECTION=3Dhosttools > > + > > +menuconfig HOST_OPENOCD > > + tristate > > + prompt "openocd" > > + select HOST_LIBUSB > > + select HOST_JIMTCL > > + select HOST_LIBFTDI1 > > + help > > + The "Open On-Chip Debugger" provides JTAG/SWD access from GDB > > + (or directly with TCL scripts) to processors with ARM and MIPS > > + based cores. > > diff --git a/rules/host-openocd.make b/rules/host-openocd.make > > new file mode 100644 > > index 000000000..8a741856e > > --- /dev/null > > +++ b/rules/host-openocd.make > > @@ -0,0 +1,89 @@ > > +# -*-makefile-*- > > +# > > +# Copyright (C) 2013 by Michael Grzeschik > > +# > > +# See CREDITS for details about who has contributed to this project. > > +# > > +# For further information about the PTXdist project and license condit= ions > > +# see the README file. > > +# > > + > > +# > > +# We provide this package > > +# > > +HOST_PACKAGES-$(PTXCONF_HOST_OPENOCD) +=3D host-openocd > > + > > +# > > +# Paths and names > > +# > > +HOST_OPENOCD_VERSION :=3D af952850 > > +HOST_OPENOCD_MD5 :=3D fa6841d4e4e76d1626406a99d5b1851d > > +HOST_OPENOCD :=3D openocd-$(HOST_OPENOCD_VERSION) > > +HOST_OPENOCD_SUFFIX :=3D tar.bz2 > > +HOST_OPENOCD_URL :=3D git://git.code.sf.net/p/openocd/code;tag=3D$(HOS= T_OPENOCD_VERSION) > > +HOST_OPENOCD_SOURCE :=3D $(SRCDIR)/$(HOST_OPENOCD).$(HOST_OPENOCD_SUFF= IX) > > +HOST_OPENOCD_DIR :=3D $(HOST_BUILDDIR)/$(HOST_OPENOCD) > > + > > +# --------------------------------------------------------------------= -------- > > +# Prepare > > +# --------------------------------------------------------------------= -------- > > + > > +# > > +# autoconf > > +# > > +HOST_OPENOCD_CONF_TOOL :=3D autoconf > > +HOST_OPENOCD_CONF_ENV :=3D \ > > + CCACHE=3Dnone \ >=20 > Indent with on tab. Right, will fix. >=20 > > + LDFLAGS=3D"-L$(PTXDIST_SYSROOT_HOST)/usr/lib" \ > > + CFLAGS=3D"-I$(PTXDIST_SYSROOT_HOST)/usr/include" >=20 > The flags should be added via HOST_OPENOCD_LDFLAGS / HOST_OPENOCD_CPPFLAG= S. > However, why do you need sysroot-host/usr/...? These directories should be > empty. Why should they be empty? Aren't there all host packages installed? This is needed because otherwise openocd won't find libjim and headers to compile and link against. I did not see any other way, then setting these variables. >=20 > > +HOST_OPENOCD_CONF_OPT :=3D \ > > + $(HOST_AUTOCONF) \ >=20 > One tab. will fix > Michael >=20 > > + --enable-shared \ > > + --disable-static \ > > + --disable-werror \ > > + --disable-internal-jimtcl \ > > + --disable-internal-libjaylink \ > > + --enable-dummy \ > > + --enable-ftdi \ > > + --enable-stlink \ > > + --disable-ti-icdi \ > > + --disable-ulink \ > > + --disable-usb-blaster-2 \ > > + --disable-ft232r \ > > + --disable-vsllink \ > > + --disable-xds110 \ > > + --disable-osbdm \ > > + --disable-opendous \ > > + --disable-aice \ > > + --disable-usbprog \ > > + --disable-rlink \ > > + --disable-armjtagew \ > > + --disable-cmsis-dap \ > > + --disable-kitprog \ > > + --disable-usb_blaster \ > > + --disable-presto\ > > + --disable-openjtag \ > > + --disable-jlink \ > > + --disable-parport \ > > + --disable-parport-ppdev \ > > + --disable-parport-giveio \ > > + --disable-jtag_vpi \ > > + --disable-amtjtagaccel \ > > + --disable-zy1000 \ > > + --disable-zy1000-master \ > > + --disable-ioutil \ > > + --disable-ep93xx \ > > + --disable-at91rm9200 \ > > + --disable-bcm2835gpio \ > > + --disable-imx_gpio \ > > + --disable-gw16012 \ > > + --disable-oocd_trace \ > > + --disable-buspirate \ > > + --disable-sysfsgpio \ > > + --disable-minidriver-dummy \ > > + --disable-target-64 \ > > + --disable-remote-bitbang \ > > + --disable-doxygen-pdf \ > > + --disable-doxygen-html > > + > > +# vim: syntax=3Dmake > > --=20 > > 2.20.1 > >=20 > >=20 > > _______________________________________________ > > ptxdist mailing list > > ptxdist@pengutronix.de >=20 > --=20 > Pengutronix e.K. | | > Industrial Linux Solutions | http://www.pengutronix.de/ | > Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | > Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | >=20 > _______________________________________________ > ptxdist mailing list > ptxdist@pengutronix.de --=20 Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | --eweu7nkdbhwtj7qc Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEElXvEUs6VPX6mDPT8C+njFXoeLGQFAl0DZa0ACgkQC+njFXoe LGSIiBAAgUxBV2DsZBPV4WnB/QWW+3f5LFqldvHLynhJsk1+79EVc2iMeuYDj9P9 2rp5E17qLcAE4BAbR+ckfzAQKB4QmoLu1+YIZoYd9COLJAHCR+34PCbZlxQAL2ln 7P7VmH9Ivu+vS7cQJ0TNF7GmcoJWPcYpeTFg87L4YTMwUp8TfvOdqV8wtQ9i7kas fgW8w0trMk+SR69IRWjiMhYW1XDXauuKxkXi7pXlqDB3bjSUw1gMxW4FYQotswAW mdHL0M+8a3QdbaofbDl6+NOTZBvU7cJuUpUPPzreHU/0ytM2fibYzwi6jZ7PtqXr NTlaGNTGvkC82X+ppY/IxB4sh3Tnmbm2ZmFJ6YzAysuXIOZ+VcxYJ98Gn6OkyFdq ZZ57ghmXiiNA52F0eRBLJMcDG+1VZEkGIj3eQluZdo6q2XWIEplIcEzpiAnjDtHy PVg/PVmec4O48kOGd7zvm5IxUN83GfizUVkI09nHORccZtUV87o7nsAtTsCzc6ML ktyzhx+HNNrP/mE/ldpuqcnu810Ja7KlrmDRXkTQZlcefcuwbghyWkN6PClfeDCX n6+CX6gsCkSGl2jgE/wGp459dJGLm4SlC1RvbOvExdn5YXuQGxOLyojTKDBRzJsX JkFl3g+Q0AqCt+Cv1yZfAgxQCls/EUOLf+E4ohnj9qJlQJJLOo0= =P5hJ -----END PGP SIGNATURE----- --eweu7nkdbhwtj7qc-- --===============2095383117== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KcHR4ZGlzdCBt YWlsaW5nIGxpc3QKcHR4ZGlzdEBwZW5ndXRyb25peC5kZQ== --===============2095383117==--