blob: 06d77b6a9ec60b7cce88d1313583a27e53e1f1d7 [file] [log] [blame]
Brad Bishopd7bf8c12018-02-25 22:55:05 -05001SUMMARY = "Free and Open On-Chip Debugging, In-System Programming and Boundary-Scan Testing"
Andrew Geissler9aee5002022-03-30 16:27:02 +00002LICENSE = "GPL-2.0-only"
Brad Bishopd7bf8c12018-02-25 22:55:05 -05003LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
4DEPENDS = "libusb-compat libftdi"
Patrick Williams213cb262021-08-07 19:21:33 -05005RDEPENDS:${PN} = "libusb1"
Brad Bishopd7bf8c12018-02-25 22:55:05 -05006
Brad Bishop757e94a2018-09-07 18:58:51 +00007SRC_URI = " \
Andrew Geissler595f6302022-01-24 19:11:47 +00008 git://repo.or.cz/openocd.git;protocol=http;name=openocd;branch=master \
9 git://repo.or.cz/r/git2cl.git;protocol=http;destsuffix=tools/git2cl;name=git2cl;branch=master \
10 git://repo.or.cz/r/jimtcl.git;protocol=http;destsuffix=git/jimtcl;name=jimtcl;branch=master \
11 git://repo.or.cz/r/libjaylink.git;protocol=http;destsuffix=git/src/jtag/drivers/libjaylink;name=libjaylink;branch=master \
Patrick Williams7784c422022-11-17 07:29:11 -060012 file://0001-autosetup-cc-check-tools-check-only-the-name.patch \
Brad Bishopd7bf8c12018-02-25 22:55:05 -050013"
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080014
Brad Bishop757e94a2018-09-07 18:58:51 +000015SRCREV_FORMAT = "openocd"
Andrew Geissler32b11992021-03-31 13:37:05 -050016SRCREV_openocd = "f342aac0845a69d591ad39a025d74e9c765f6420"
Brad Bishop757e94a2018-09-07 18:58:51 +000017SRCREV_git2cl = "8373c9f74993e218a08819cbcdbab3f3564bbeba"
Andrew Geisslerd688a012020-09-18 13:36:00 -050018SRCREV_jimtcl = "0aa0fb4e3a38d38a49de9eb585d93d63a370dcf6"
19SRCREV_libjaylink = "9aa7a5957c07bb6e862fc1a6d3153d109c7407e4"
Brad Bishopd7bf8c12018-02-25 22:55:05 -050020
Andrew Geissler32b11992021-03-31 13:37:05 -050021PV = "0.11+gitr${SRCPV}"
Brad Bishopd7bf8c12018-02-25 22:55:05 -050022S = "${WORKDIR}/git"
23
24inherit pkgconfig autotools-brokensep gettext
25
Brad Bishop2f973922019-11-11 07:58:48 -050026BBCLASSEXTEND += "native nativesdk"
Brad Bishopd7bf8c12018-02-25 22:55:05 -050027
Brad Bishopa891d152019-09-13 06:17:45 -040028EXTRA_OECONF = "--enable-ftdi --disable-doxygen-html --disable-werror"
29
Brad Bishopd7bf8c12018-02-25 22:55:05 -050030do_configure() {
Brad Bishop757e94a2018-09-07 18:58:51 +000031 ./bootstrap nosubmodule
Brad Bishop19323692019-04-05 15:28:33 -040032 install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.guess ${S}/jimtcl/autosetup
33 install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.sub ${S}/jimtcl/autosetup
Brad Bishopd7bf8c12018-02-25 22:55:05 -050034 oe_runconf ${EXTRA_OECONF}
35}
36
37do_install() {
38 oe_runmake DESTDIR=${D} install
39 if [ -e "${D}${infodir}" ]; then
40 rm -Rf ${D}${infodir}
41 fi
42 if [ -e "${D}${mandir}" ]; then
43 rm -Rf ${D}${mandir}
44 fi
45 if [ -e "${D}${bindir}/.debug" ]; then
46 rm -Rf ${D}${bindir}/.debug
47 fi
48}
49
Patrick Williams213cb262021-08-07 19:21:33 -050050FILES:${PN} = " \
Brad Bishopd7bf8c12018-02-25 22:55:05 -050051 ${datadir}/openocd/* \
52 ${bindir}/openocd \
53 "
54
55PACKAGECONFIG[sysfsgpio] = "--enable-sysfsgpio,--disable-sysfsgpio"
Brad Bishope42b3e32020-01-15 22:08:42 -050056PACKAGECONFIG[remote-bitbang] = "--enable-remote-bitbang,--disable-remote-bitbang"
57PACKAGECONFIG ??= "sysfsgpio remote-bitbang"
Andrew Geissler8fc454f2020-12-11 16:27:59 -060058
59# Can't be built with ccache
60CCACHE_DISABLE = "1"