@@ -165,6 +165,9 @@ m4_define([LIBFTDI_USB1_ADAPTERS],
165165m4_define ( [ LIBGPIOD_ADAPTERS] ,
166166 [ [ [ linuxgpiod] , [ Linux GPIO bitbang through libgpiod] , [ LINUXGPIOD] ] ] )
167167
168+ m4_define ( [ REMOTE_BITBANG_ADAPTER] ,
169+ [ [ [ remote_bitbang] , [ Remote Bitbang driver] , [ REMOTE_BITBANG] ] ] )
170+
168171m4_define ( [ LIBJAYLINK_ADAPTERS] ,
169172 [ [ [ jlink] , [ SEGGER J-Link Programmer] , [ JLINK] ] ] )
170173
@@ -179,6 +182,15 @@ m4_define([LINUXSPIDEV_ADAPTER],
179182m4_define ( [ VDEBUG_ADAPTER] ,
180183 [ [ [ vdebug] , [ Cadence Virtual Debug Interface] , [ VDEBUG] ] ] )
181184
185+ m4_define ( [ JTAG_DPI_ADAPTER] ,
186+ [ [ [ jtag_dpi] , [ JTAG DPI Adapter] , [ JTAG_DPI] ] ] )
187+
188+ m4_define ( [ JTAG_VPI_ADAPTER] ,
189+ [ [ [ jtag_vpi] , [ JTAG VPI Adapter] , [ JTAG_VPI] ] ] )
190+
191+ m4_define ( [ RSHIM_ADAPTER] ,
192+ [ [ [ rshim] , [ BlueField SoC via rshim] , [ RSHIM] ] ] )
193+
182194# The word 'Adapter' in "Dummy Adapter" below must begin with a capital letter
183195# because there is an M4 macro called 'adapter'.
184196m4_define ( [ DUMMY_ADAPTER] ,
@@ -277,10 +289,6 @@ AS_IF([test "x$debug_malloc" = "xyes" -a "x$have_glibc" = "xyes"], [
277289 AC_DEFINE ( [ _DEBUG_FREE_SPACE_] ,[ 1] , [ Include malloc free space in logging] )
278290] )
279291
280- AC_ARG_ENABLE ( [ rshim] ,
281- AS_HELP_STRING ( [ --enable-rshim] , [ Enable building the rshim driver] ) ,
282- [ build_rshim=$enableval] , [ build_rshim=no] )
283-
284292AC_ARG_ENABLE ( [ dmem] ,
285293 AS_HELP_STRING ( [ --enable-dmem] , [ Enable building the dmem driver] ) ,
286294 [ build_dmem=$enableval] , [ build_dmem=no] )
@@ -305,10 +313,14 @@ AC_ARG_ADAPTERS([
305313 LIBFTDI_ADAPTERS,
306314 LIBFTDI_USB1_ADAPTERS,
307315 LIBGPIOD_ADAPTERS,
316+ REMOTE_BITBANG_ADAPTER,
308317 LINUXSPIDEV_ADAPTER,
309318 SERIAL_PORT_ADAPTERS,
310319 DUMMY_ADAPTER,
311320 VDEBUG_ADAPTER,
321+ JTAG_DPI_ADAPTER,
322+ JTAG_VPI_ADAPTER,
323+ RSHIM_ADAPTER,
312324 PCIE_ADAPTERS,
313325 LIBJAYLINK_ADAPTERS
314326 ] ,[ auto] )
@@ -327,14 +339,6 @@ AC_ARG_ENABLE([parport_giveio],
327339 [ Enable use of giveio for parport (for CygWin only)] ) ,
328340 [ parport_use_giveio=$enableval] , [ parport_use_giveio=] )
329341
330- AC_ARG_ENABLE ( [ jtag_vpi] ,
331- AS_HELP_STRING ( [ --enable-jtag_vpi] , [ Enable building support for JTAG VPI] ) ,
332- [ build_jtag_vpi=$enableval] , [ build_jtag_vpi=no] )
333-
334- AC_ARG_ENABLE ( [ jtag_dpi] ,
335- AS_HELP_STRING ( [ --enable-jtag_dpi] , [ Enable building support for JTAG DPI] ) ,
336- [ build_jtag_dpi=$enableval] , [ build_jtag_dpi=no] )
337-
338342AC_ARG_ENABLE ( [ amtjtagaccel] ,
339343 AS_HELP_STRING ( [ --enable-amtjtagaccel] , [ Enable building the Amontec JTAG-Accelerator driver] ) ,
340344 [ build_amtjtagaccel=$enableval] , [ build_amtjtagaccel=no] )
@@ -380,19 +384,24 @@ AC_ARG_ENABLE([sysfsgpio],
380384 AS_HELP_STRING ( [ --enable-sysfsgpio] , [ Enable building support for programming driven via sysfs gpios.] ) ,
381385 [ build_sysfsgpio=$enableval] , [ build_sysfsgpio=no] )
382386
387+ can_build_rshim=no
388+
383389AS_CASE ( [ $host_os] ,
384390 [ linux*] , [
385391 is_linux=yes
392+ can_build_rshim=yes
386393 ] ,
387394 [
388395 AS_IF ( [ test "x$build_sysfsgpio" = "xyes"] , [
389396 AC_MSG_ERROR ( [ sysfsgpio is only available on linux] )
390397 ] )
391398
392- AS_CASE ( [ $host_os] , [ freebsd*] , [ ] ,
399+ AS_CASE ( [ $host_os] , [ freebsd*] , [
400+ can_build_rshim=yes
401+ ] ,
393402 [
394- AS_IF ( [ test "x$build_rshim " = "xyes"] , [
395- AC_MSG_ERROR ( [ build_rshim is only available on linux or freebsd] )
403+ AS_IF ( [ test "x$enable_rshim " = "xyes"] , [
404+ AC_MSG_ERROR ( [ rshim is only available on linux or freebsd] )
396405 ] )
397406 ] )
398407
@@ -414,10 +423,6 @@ AC_ARG_ENABLE([internal-libjaylink],
414423 [ Enable building internal libjaylink] ) ,
415424 [ use_internal_libjaylink=$enableval] , [ use_internal_libjaylink=no] )
416425
417- AC_ARG_ENABLE ( [ remote-bitbang] ,
418- AS_HELP_STRING ( [ --enable-remote-bitbang] , [ Enable building support for the Remote Bitbang driver] ) ,
419- [ build_remote_bitbang=$enableval] , [ build_remote_bitbang=no] )
420-
421426AS_CASE ( [ "${host_cpu}"] ,
422427 [ i?86|x86*] , [ ] ,
423428 [
@@ -515,12 +520,6 @@ AS_IF([test "x$build_parport" = "xyes"], [
515520 AC_DEFINE ( [ BUILD_PARPORT] , [ 0] , [ 0 if you don't want parport.] )
516521] )
517522
518- AS_IF ( [ test "x$build_rshim" = "xyes"] , [
519- AC_DEFINE ( [ BUILD_RSHIM] , [ 1] , [ 1 if you want to debug BlueField SoC via rshim.] )
520- ] , [
521- AC_DEFINE ( [ BUILD_RSHIM] , [ 0] , [ 0 if you don't want to debug BlueField SoC via rshim.] )
522- ] )
523-
524523AS_IF ( [ test "x$build_dmem" = "xyes"] , [
525524 AC_DEFINE ( [ BUILD_DMEM] , [ 1] , [ 1 if you want to debug via Direct Mem.] )
526525] , [
@@ -578,19 +577,6 @@ AS_IF([test "x$parport_use_giveio" = "xyes"], [
578577 AC_DEFINE ( [ PARPORT_USE_GIVEIO] , [ 0] , [ 0 if you don't want parport to use giveio.] )
579578] )
580579
581- AS_IF ( [ test "x$build_jtag_vpi" = "xyes"] , [
582- AC_DEFINE ( [ BUILD_JTAG_VPI] , [ 1] , [ 1 if you want JTAG VPI.] )
583- ] , [
584- AC_DEFINE ( [ BUILD_JTAG_VPI] , [ 0] , [ 0 if you don't want JTAG VPI.] )
585- ] )
586-
587- AS_IF ( [ test "x$build_jtag_dpi" = "xyes"] , [
588- AC_DEFINE ( [ BUILD_JTAG_DPI] , [ 1] , [ 1 if you want JTAG DPI.] )
589- ] , [
590- AC_DEFINE ( [ BUILD_JTAG_DPI] , [ 0] , [ 0 if you don't want JTAG DPI.] )
591- ] )
592-
593-
594580AS_IF ( [ test "x$build_amtjtagaccel" = "xyes"] , [
595581 AC_DEFINE ( [ BUILD_AMTJTAGACCEL] , [ 1] , [ 1 if you want the Amontec JTAG-Accelerator driver.] )
596582] , [
@@ -625,13 +611,6 @@ AS_IF([test "x$use_internal_jimtcl" = "xyes"], [
625611 ] )
626612] )
627613
628- AS_IF ( [ test "x$build_remote_bitbang" = "xyes"] , [
629- build_bitbang=yes
630- AC_DEFINE ( [ BUILD_REMOTE_BITBANG] , [ 1] , [ 1 if you want the Remote Bitbang driver.] )
631- ] , [
632- AC_DEFINE ( [ BUILD_REMOTE_BITBANG] , [ 0] , [ 0 if you don't want the Remote Bitbang driver.] )
633- ] )
634-
635614AS_IF ( [ test "x$build_sysfsgpio" = "xyes"] , [
636615 build_bitbang=yes
637616 AC_DEFINE ( [ BUILD_SYSFSGPIO] , [ 1] , [ 1 if you want the SysfsGPIO driver.] )
@@ -730,18 +709,27 @@ PROCESS_ADAPTERS([HIDAPI_USB1_ADAPTERS], ["x$use_hidapi" = "xyes" -a "x$use_libu
730709PROCESS_ADAPTERS([ LIBFTDI_ADAPTERS] , [ "x$use_libftdi" = "xyes"] , [ libftdi] )
731710PROCESS_ADAPTERS([ LIBFTDI_USB1_ADAPTERS] , [ "x$use_libftdi" = "xyes" -a "x$use_libusb1" = "xyes"] , [ libftdi and libusb-1.x] )
732711PROCESS_ADAPTERS([ LIBGPIOD_ADAPTERS] , [ "x$use_libgpiod" = "xyes"] , [ Linux libgpiod] )
712+ PROCESS_ADAPTERS([ REMOTE_BITBANG_ADAPTER] , [ true] , [ unused] )
733713PROCESS_ADAPTERS([ LIBJAYLINK_ADAPTERS] , [ "x$use_internal_libjaylink" = "xyes" -o "x$use_libjaylink" = "xyes"] , [ libjaylink-0.2] )
734714PROCESS_ADAPTERS([ PCIE_ADAPTERS] , [ "x$is_linux" = "xyes"] , [ Linux build] )
735715PROCESS_ADAPTERS([ SERIAL_PORT_ADAPTERS] , [ "x$can_build_buspirate" = "xyes"] ,
736716 [ internal error: validation should happen beforehand] )
737717PROCESS_ADAPTERS([ LINUXSPIDEV_ADAPTER] , [ "x$is_linux" = "xyes"] , [ Linux spidev] )
738718PROCESS_ADAPTERS([ VDEBUG_ADAPTER] , [ true] , [ unused] )
719+ PROCESS_ADAPTERS([ JTAG_DPI_ADAPTER] , [ true] , [ unused] )
720+ PROCESS_ADAPTERS([ JTAG_VPI_ADAPTER] , [ true] , [ unused] )
721+ PROCESS_ADAPTERS([ RSHIM_ADAPTER] , [ "x$can_build_rshim" = "xyes"] ,
722+ [ internal error: validation should happen beforehand] )
739723PROCESS_ADAPTERS([ DUMMY_ADAPTER] , [ true] , [ unused] )
740724
741725AS_IF ( [ test "x$enable_linuxgpiod" != "xno"] , [
742726 build_bitbang=yes
743727] )
744728
729+ AS_IF ( [ test "x$enable_remote_bitbang" != "xno"] , [
730+ build_bitbang=yes
731+ ] )
732+
745733AS_IF ( [ test "x$enable_stlink" != "xno" -o "x$enable_ti_icdi" != "xno" -o "x$enable_nulink" != "xno"] , [
746734 AC_DEFINE ( [ BUILD_HLADAPTER] , [ 1] , [ 1 if you want the High Level JTAG driver.] )
747735 AM_CONDITIONAL([ HLADAPTER] , [ true] )
@@ -783,12 +771,9 @@ AM_CONDITIONAL([BCM2835GPIO], [test "x$build_bcm2835gpio" = "xyes"])
783771AM_CONDITIONAL([ IMX_GPIO] , [ test "x$build_imx_gpio" = "xyes"] )
784772AM_CONDITIONAL([ AM335XGPIO] , [ test "x$build_am335xgpio" = "xyes"] )
785773AM_CONDITIONAL([ BITBANG] , [ test "x$build_bitbang" = "xyes"] )
786- AM_CONDITIONAL([ JTAG_VPI] , [ test "x$build_jtag_vpi" = "xyes"] )
787- AM_CONDITIONAL([ JTAG_DPI] , [ test "x$build_jtag_dpi" = "xyes"] )
788774AM_CONDITIONAL([ USB_BLASTER_DRIVER] , [ test "x$enable_usb_blaster" != "xno" -o "x$enable_usb_blaster_2" != "xno"] )
789775AM_CONDITIONAL([ AMTJTAGACCEL] , [ test "x$build_amtjtagaccel" = "xyes"] )
790776AM_CONDITIONAL([ GW16012] , [ test "x$build_gw16012" = "xyes"] )
791- AM_CONDITIONAL([ REMOTE_BITBANG] , [ test "x$build_remote_bitbang" = "xyes"] )
792777AM_CONDITIONAL([ SYSFSGPIO] , [ test "x$build_sysfsgpio" = "xyes"] )
793778AM_CONDITIONAL([ USE_LIBUSB1] , [ test "x$use_libusb1" = "xyes"] )
794779AM_CONDITIONAL([ IS_CYGWIN] , [ test "x$is_cygwin" = "xyes"] )
@@ -800,7 +785,6 @@ AM_CONDITIONAL([USE_LIBFTDI], [test "x$use_libftdi" = "xyes"])
800785AM_CONDITIONAL([ USE_LIBGPIOD] , [ test "x$use_libgpiod" = "xyes"] )
801786AM_CONDITIONAL([ USE_HIDAPI] , [ test "x$use_hidapi" = "xyes"] )
802787AM_CONDITIONAL([ USE_LIBJAYLINK] , [ test "x$use_libjaylink" = "xyes"] )
803- AM_CONDITIONAL([ RSHIM] , [ test "x$build_rshim" = "xyes"] )
804788AM_CONDITIONAL([ DMEM] , [ test "x$build_dmem" = "xyes"] )
805789AM_CONDITIONAL([ HAVE_CAPSTONE] , [ test "x$enable_capstone" != "xno"] )
806790
@@ -887,9 +871,13 @@ m4_foreach([adapter], [USB1_ADAPTERS,
887871 HIDAPI_ADAPTERS, HIDAPI_USB1_ADAPTERS, LIBFTDI_ADAPTERS,
888872 LIBFTDI_USB1_ADAPTERS,
889873 LIBGPIOD_ADAPTERS,
874+ REMOTE_BITBANG_ADAPTER,
890875 LIBJAYLINK_ADAPTERS, PCIE_ADAPTERS, SERIAL_PORT_ADAPTERS,
891876 LINUXSPIDEV_ADAPTER,
892877 VDEBUG_ADAPTER,
878+ JTAG_DPI_ADAPTER,
879+ JTAG_VPI_ADAPTER,
880+ RSHIM_ADAPTER,
893881 DUMMY_ADAPTER,
894882 OPTIONAL_LIBRARIES,
895883 COVERAGE] ,
0 commit comments