blob: d30d9c346639a4c0fe74d4ed830fdcae3b03c997 [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"
Patrick Williams8e7b46e2023-05-01 14:19:06 -05003LIC_FILES_CHKSUM = "file://COPYING;md5=599d2d1ee7fc84c0467b3d19801db870"
Brad Bishopd7bf8c12018-02-25 22:55:05 -05004DEPENDS = "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 \
Patrick Williams8e7b46e2023-05-01 14:19:06 -050010 git://github.com/msteveb/jimtcl.git;protocol=http;destsuffix=git/jimtcl;name=jimtcl;branch=master \
Andrew Geissler595f6302022-01-24 19:11:47 +000011 git://repo.or.cz/r/libjaylink.git;protocol=http;destsuffix=git/src/jtag/drivers/libjaylink;name=libjaylink;branch=master \
Brad Bishopd7bf8c12018-02-25 22:55:05 -050012"
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080013
Brad Bishop757e94a2018-09-07 18:58:51 +000014SRCREV_FORMAT = "openocd"
Patrick Williams8e7b46e2023-05-01 14:19:06 -050015SRCREV_openocd = "91bd4313444c5a949ce49d88ab487608df7d6c37"
Brad Bishop757e94a2018-09-07 18:58:51 +000016SRCREV_git2cl = "8373c9f74993e218a08819cbcdbab3f3564bbeba"
Patrick Williams8e7b46e2023-05-01 14:19:06 -050017SRCREV_jimtcl = "fcbb4499a6b46ef69e7a95da53e30796e20817f0"
Andrew Geisslerd688a012020-09-18 13:36:00 -050018SRCREV_libjaylink = "9aa7a5957c07bb6e862fc1a6d3153d109c7407e4"
Brad Bishopd7bf8c12018-02-25 22:55:05 -050019
Patrick Williams8e7b46e2023-05-01 14:19:06 -050020PV = "0.12+gitr${SRCPV}"
Brad Bishopd7bf8c12018-02-25 22:55:05 -050021S = "${WORKDIR}/git"
22
23inherit pkgconfig autotools-brokensep gettext
24
Brad Bishop2f973922019-11-11 07:58:48 -050025BBCLASSEXTEND += "native nativesdk"
Brad Bishopd7bf8c12018-02-25 22:55:05 -050026
Patrick Williams8e7b46e2023-05-01 14:19:06 -050027EXTRA_OECONF = "--enable-ftdi --enable-jtag_vpi --enable-buspirate --disable-doxygen-html --disable-werror"
Brad Bishopa891d152019-09-13 06:17:45 -040028
Brad Bishopd7bf8c12018-02-25 22:55:05 -050029do_configure() {
Brad Bishop757e94a2018-09-07 18:58:51 +000030 ./bootstrap nosubmodule
Brad Bishop19323692019-04-05 15:28:33 -040031 install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.guess ${S}/jimtcl/autosetup
32 install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.sub ${S}/jimtcl/autosetup
Brad Bishopd7bf8c12018-02-25 22:55:05 -050033 oe_runconf ${EXTRA_OECONF}
34}
35
36do_install() {
37 oe_runmake DESTDIR=${D} install
38 if [ -e "${D}${infodir}" ]; then
39 rm -Rf ${D}${infodir}
40 fi
41 if [ -e "${D}${mandir}" ]; then
42 rm -Rf ${D}${mandir}
43 fi
44 if [ -e "${D}${bindir}/.debug" ]; then
45 rm -Rf ${D}${bindir}/.debug
46 fi
47}
48
Patrick Williams213cb262021-08-07 19:21:33 -050049FILES:${PN} = " \
Brad Bishopd7bf8c12018-02-25 22:55:05 -050050 ${datadir}/openocd/* \
51 ${bindir}/openocd \
52 "
53
54PACKAGECONFIG[sysfsgpio] = "--enable-sysfsgpio,--disable-sysfsgpio"
Brad Bishope42b3e32020-01-15 22:08:42 -050055PACKAGECONFIG[remote-bitbang] = "--enable-remote-bitbang,--disable-remote-bitbang"
56PACKAGECONFIG ??= "sysfsgpio remote-bitbang"
Andrew Geissler8fc454f2020-12-11 16:27:59 -060057
58# Can't be built with ccache
59CCACHE_DISABLE = "1"