@@ -187,6 +187,9 @@ m4_define([JTAG_DPI_ADAPTER],
187
187
m4_define ( [ JTAG_VPI_ADAPTER] ,
188
188
[ [ [ jtag_vpi] , [ JTAG VPI Adapter] , [ JTAG_VPI] ] ] )
189
189
190
+ m4_define ( [ RSHIM_ADAPTER] ,
191
+ [ [ [ rshim] , [ BlueField SoC via rshim] , [ RSHIM] ] ] )
192
+
190
193
# The word 'Adapter' in "Dummy Adapter" below must begin with a capital letter
191
194
# because there is an M4 macro called 'adapter'.
192
195
m4_define ( [ DUMMY_ADAPTER] ,
@@ -285,10 +288,6 @@ AS_IF([test "x$debug_malloc" = "xyes" -a "x$have_glibc" = "xyes"], [
285
288
AC_DEFINE ( [ _DEBUG_FREE_SPACE_] ,[ 1] , [ Include malloc free space in logging] )
286
289
] )
287
290
288
- AC_ARG_ENABLE ( [ rshim] ,
289
- AS_HELP_STRING ( [ --enable-rshim] , [ Enable building the rshim driver] ) ,
290
- [ build_rshim=$enableval] , [ build_rshim=no] )
291
-
292
291
AC_ARG_ENABLE ( [ dmem] ,
293
292
AS_HELP_STRING ( [ --enable-dmem] , [ Enable building the dmem driver] ) ,
294
293
[ build_dmem=$enableval] , [ build_dmem=no] )
@@ -320,6 +319,7 @@ AC_ARG_ADAPTERS([
320
319
VDEBUG_ADAPTER,
321
320
JTAG_DPI_ADAPTER,
322
321
JTAG_VPI_ADAPTER,
322
+ RSHIM_ADAPTER,
323
323
PCIE_ADAPTERS,
324
324
LIBJAYLINK_ADAPTERS
325
325
] ,[ auto] )
@@ -383,19 +383,24 @@ AC_ARG_ENABLE([sysfsgpio],
383
383
AS_HELP_STRING ( [ --enable-sysfsgpio] , [ Enable building support for programming driven via sysfs gpios.] ) ,
384
384
[ build_sysfsgpio=$enableval] , [ build_sysfsgpio=no] )
385
385
386
+ can_build_rshim=no
387
+
386
388
AS_CASE ( [ $host_os] ,
387
389
[ linux*] , [
388
390
is_linux=yes
391
+ can_build_rshim=yes
389
392
] ,
390
393
[
391
394
AS_IF ( [ test "x$build_sysfsgpio" = "xyes"] , [
392
395
AC_MSG_ERROR ( [ sysfsgpio is only available on linux] )
393
396
] )
394
397
395
- AS_CASE ( [ $host_os] , [ freebsd*] , [ ] ,
398
+ AS_CASE ( [ $host_os] , [ freebsd*] , [
399
+ can_build_rshim=yes
400
+ ] ,
396
401
[
397
- AS_IF ( [ test "x$build_rshim " = "xyes"] , [
398
- AC_MSG_ERROR ( [ build_rshim is only available on linux or freebsd] )
402
+ AS_IF ( [ test "x$enable_rshim " = "xyes"] , [
403
+ AC_MSG_ERROR ( [ rshim is only available on linux or freebsd] )
399
404
] )
400
405
] )
401
406
@@ -514,12 +519,6 @@ AS_IF([test "x$build_parport" = "xyes"], [
514
519
AC_DEFINE ( [ BUILD_PARPORT] , [ 0] , [ 0 if you don't want parport.] )
515
520
] )
516
521
517
- AS_IF ( [ test "x$build_rshim" = "xyes"] , [
518
- AC_DEFINE ( [ BUILD_RSHIM] , [ 1] , [ 1 if you want to debug BlueField SoC via rshim.] )
519
- ] , [
520
- AC_DEFINE ( [ BUILD_RSHIM] , [ 0] , [ 0 if you don't want to debug BlueField SoC via rshim.] )
521
- ] )
522
-
523
522
AS_IF ( [ test "x$build_dmem" = "xyes"] , [
524
523
AC_DEFINE ( [ BUILD_DMEM] , [ 1] , [ 1 if you want to debug via Direct Mem.] )
525
524
] , [
@@ -718,6 +717,8 @@ PROCESS_ADAPTERS([LINUXSPIDEV_ADAPTER], ["x$is_linux" = "xyes"], [Linux spidev])
718
717
PROCESS_ADAPTERS([ VDEBUG_ADAPTER] , [ true] , [ unused] )
719
718
PROCESS_ADAPTERS([ JTAG_DPI_ADAPTER] , [ true] , [ unused] )
720
719
PROCESS_ADAPTERS([ JTAG_VPI_ADAPTER] , [ true] , [ unused] )
720
+ PROCESS_ADAPTERS([ RSHIM_ADAPTER] , [ "x$can_build_rshim" = "xyes"] ,
721
+ [ internal error: validation should happen beforehand] )
721
722
PROCESS_ADAPTERS([ DUMMY_ADAPTER] , [ true] , [ unused] )
722
723
723
724
AS_IF ( [ test "x$enable_linuxgpiod" != "xno"] , [
@@ -783,7 +784,6 @@ AM_CONDITIONAL([USE_LIBFTDI], [test "x$use_libftdi" = "xyes"])
783
784
AM_CONDITIONAL([ USE_LIBGPIOD] , [ test "x$use_libgpiod" = "xyes"] )
784
785
AM_CONDITIONAL([ USE_HIDAPI] , [ test "x$use_hidapi" = "xyes"] )
785
786
AM_CONDITIONAL([ USE_LIBJAYLINK] , [ test "x$use_libjaylink" = "xyes"] )
786
- AM_CONDITIONAL([ RSHIM] , [ test "x$build_rshim" = "xyes"] )
787
787
AM_CONDITIONAL([ DMEM] , [ test "x$build_dmem" = "xyes"] )
788
788
AM_CONDITIONAL([ HAVE_CAPSTONE] , [ test "x$enable_capstone" != "xno"] )
789
789
@@ -876,6 +876,7 @@ m4_foreach([adapter], [USB1_ADAPTERS,
876
876
VDEBUG_ADAPTER,
877
877
JTAG_DPI_ADAPTER,
878
878
JTAG_VPI_ADAPTER,
879
+ RSHIM_ADAPTER,
879
880
DUMMY_ADAPTER,
880
881
OPTIONAL_LIBRARIES,
881
882
COVERAGE] ,
0 commit comments