From: openocd-gerrit <ope...@us...> - 2025-10-11 16:14:37
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Main OpenOCD repository". The branch, master has been updated via 39ed0b0bbaac63c88d1e4b9ffe85e209bdb6b059 (commit) from 6d51e6b900a1d2ec2446f042c8294109ecda7483 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 39ed0b0bbaac63c88d1e4b9ffe85e209bdb6b059 Author: Marc Schink <de...@za...> Date: Sun Aug 17 14:11:39 2025 +0000 adapter/parport: Deprecate direct I/O support We deprecate direct I/O support in favor of ppdev for the following reasons: - Linux supports ppdev since ~2.4 (released ~24 years ago) and it is enabled by default on major distros (Ubuntu, Fedora). So it is effectively ubiquitous - FreeBSD provides no direct I/O support, so ppdev (ppi) is the only viable option - Direct I/O requires root/elevated privileges which is inadvisable - Removing direct I/O reduces build and driver complexity and yields a smaller, easier-to-maintain codebase - Supporting only ppdev allows us to simplify the codebase by using device files (e.g., /dev/parport0) instead of numeric identifiers Windows is the only rationale to keep direct I/O, but the user base appears minimal to nonexistent and no active contributors can test the Windows driver. Change-Id: Ia6d5ed6e8c5faa2a9b4919ca97c5cf9033372a64 Signed-off-by: Marc Schink <de...@za...> Reviewed-on: https://review.openocd.org/c/openocd/+/9151 Reviewed-by: Antonio Borneo <bor...@gm...> Tested-by: jenkins diff --git a/configure.ac b/configure.ac index 128c565a0..84d9739b4 100644 --- a/configure.ac +++ b/configure.ac @@ -356,7 +356,7 @@ AC_ARG_ENABLE([parport_ppdev], AC_ARG_ENABLE([parport_giveio], AS_HELP_STRING([--enable-parport-giveio], - [Enable use of giveio for parport (for CygWin only)]), + [Enable use of giveio for parport (deprecated, for CygWin only)]), [parport_use_giveio=$enableval], [parport_use_giveio=]) AC_ARG_ENABLE([gw16012], @@ -825,6 +825,12 @@ AS_IF([test "x$build_gw16012" = "xyes"], [ AC_MSG_WARN([Gateworks GW16012 JTAG adapter is deprecated and support will be removed in the next release!]) ]) +AS_IF([test "x$parport_use_giveio" = "xyes" || test [ "x$enable_parport" != "xno" -a "x$parport_use_ppdev" = "xno"]], [ + echo + echo + AC_MSG_WARN([Parallel port access with direct I/O is deprecated and support will be removed in the next release!]) +]) + echo echo echo OpenOCD configuration summary diff --git a/doc/openocd.texi b/doc/openocd.texi index d6f9736b8..4229f831b 100644 --- a/doc/openocd.texi +++ b/doc/openocd.texi @@ -3225,6 +3225,7 @@ The default port number is 0. When using direct I/O, the number is the I/O port number. The default port number is 0x378 (LTP1). +@b{Note:} Direct I/O support is deprecated and will be removed in the future. @end deffn @deffn {Config Command} {parport write_on_exit} (@option{on}|@option{off}) diff --git a/src/jtag/drivers/parport.c b/src/jtag/drivers/parport.c index 09e312ec2..b29562b84 100644 --- a/src/jtag/drivers/parport.c +++ b/src/jtag/drivers/parport.c @@ -341,6 +341,8 @@ static int parport_init(void) #endif /* not __FreeBSD__, __FreeBSD_kernel__ */ #else /* not PARPORT_USE_PPDEV */ + LOG_WARNING("DEPRECATED: Parallel port access with direct I/O is deprecated and support will be removed in the next release"); + if (!parport_port) { parport_port = 0x378; LOG_WARNING("No parallel port specified, using default 0x378 (LPT1)"); ----------------------------------------------------------------------- Summary of changes: configure.ac | 8 +++++++- doc/openocd.texi | 1 + src/jtag/drivers/parport.c | 2 ++ 3 files changed, 10 insertions(+), 1 deletion(-) hooks/post-receive -- Main OpenOCD repository |