blob: c7d754fdbad49cd07f6fe1a76c422651cfaceca4 [file] [log] [blame]
Brad Bishopd7bf8c12018-02-25 22:55:05 -05001SUMMARY = "Free and Open On-Chip Debugging, In-System Programming and Boundary-Scan Testing"
2LICENSE = "GPLv2"
3LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
4DEPENDS = "libusb-compat libftdi"
5RDEPENDS_${PN} = "libusb1"
6
Brad Bishop757e94a2018-09-07 18:58:51 +00007SRC_URI = " \
8 git://repo.or.cz/openocd.git;protocol=http;name=openocd \
9 git://repo.or.cz/r/git2cl.git;protocol=http;destsuffix=tools/git2cl;name=git2cl \
10 git://repo.or.cz/r/jimtcl.git;protocol=http;destsuffix=git/jimtcl;name=jimtcl \
11 git://repo.or.cz/r/libjaylink.git;protocol=http;destsuffix=git/src/jtag/drivers/libjaylink;name=libjaylink \
Brad Bishop26bdd442019-08-16 17:08:17 -040012 file://0001-Do-not-include-syscrtl.h-with-glibc.patch \
Andrew Geisslerbffdb3e2020-08-21 16:13:29 -050013 file://0001-bitbang-Make-bitbang_swd-extern-definition.patch \
Brad Bishopd7bf8c12018-02-25 22:55:05 -050014"
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080015
Brad Bishop757e94a2018-09-07 18:58:51 +000016SRCREV_FORMAT = "openocd"
Brad Bishop2f973922019-11-11 07:58:48 -050017SRCREV_openocd = "ded67990255cc1e63c77832ffd6e6bef9120873d"
Brad Bishop757e94a2018-09-07 18:58:51 +000018SRCREV_git2cl = "8373c9f74993e218a08819cbcdbab3f3564bbeba"
Brad Bishop2f973922019-11-11 07:58:48 -050019SRCREV_jimtcl = "dc4ba7770d580800634f90b67a24e077b4a26d98"
Andrew Geissler2ee498a2020-05-29 15:52:06 -050020SRCREV_libjaylink = "3322dfa5e7aa56f5b12b7f2197e3e6b850b7b66e"
Brad Bishopd7bf8c12018-02-25 22:55:05 -050021
22PV = "0.10+gitr${SRCPV}"
23S = "${WORKDIR}/git"
24
25inherit pkgconfig autotools-brokensep gettext
26
Brad Bishop2f973922019-11-11 07:58:48 -050027BBCLASSEXTEND += "native nativesdk"
Brad Bishopd7bf8c12018-02-25 22:55:05 -050028
Brad Bishopa891d152019-09-13 06:17:45 -040029EXTRA_OECONF = "--enable-ftdi --disable-doxygen-html --disable-werror"
30
Brad Bishopd7bf8c12018-02-25 22:55:05 -050031do_configure() {
Brad Bishop757e94a2018-09-07 18:58:51 +000032 ./bootstrap nosubmodule
Brad Bishop19323692019-04-05 15:28:33 -040033 install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.guess ${S}/jimtcl/autosetup
34 install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.sub ${S}/jimtcl/autosetup
Brad Bishopd7bf8c12018-02-25 22:55:05 -050035 oe_runconf ${EXTRA_OECONF}
36}
37
38do_install() {
39 oe_runmake DESTDIR=${D} install
40 if [ -e "${D}${infodir}" ]; then
41 rm -Rf ${D}${infodir}
42 fi
43 if [ -e "${D}${mandir}" ]; then
44 rm -Rf ${D}${mandir}
45 fi
46 if [ -e "${D}${bindir}/.debug" ]; then
47 rm -Rf ${D}${bindir}/.debug
48 fi
49}
50
51FILES_${PN} = " \
52 ${datadir}/openocd/* \
53 ${bindir}/openocd \
54 "
55
56PACKAGECONFIG[sysfsgpio] = "--enable-sysfsgpio,--disable-sysfsgpio"
Brad Bishope42b3e32020-01-15 22:08:42 -050057PACKAGECONFIG[remote-bitbang] = "--enable-remote-bitbang,--disable-remote-bitbang"
58PACKAGECONFIG ??= "sysfsgpio remote-bitbang"