Skip to contentSkip to conversation

Added package for RxTx Library

Buildroot JennyM 2 participants 2 messages Mar 1, 2012

lore
Share & tools
lore

JennyM

author
#0 lore raw

Hi,
I am new to buildroot and am using it to develop a cross compilation
toochain and filesystem for an embedded ARM9/Linux platform.
I have jamvm already running some java applications on the embedded platform. However I would like to use SerialRxTx from my java code. I tried some of the already prepared .so files from the RXTX download site and they are not working so I am coming to the conclusion that it necessary for me to compile my own.
So from your message below it seems like you may have made this step easier for me. What is the current status of the patch? Can I use it and what is the process for patching my current version of buildroot?

Thanks

Quoted 200 lines · PauloCosta

I've created a package for RxTx, a library that supports acessing serial ports from Java (http://users.frii.com/jarvi/rxtx/)

I would appreciate any comments/suggestions on this patch

Thanks

diff -urpN ../buildroot-snapshot/package/java/Config.in buildroot-snapshot/package/java/Config.in
--- ../buildroot-snapshot/package/java/Config.in 2009-11-10
05:37:36.000000000 -0200
+++ buildroot-snapshot/package/java/Config.in 2010-01-11
19:23:37.233768118 -0200

(quoted diff) +1 -0
@@ -2,4 +2,5 @@ menu "Java"
 source "package/java/classpath/Config.in"
 source "package/java/jamvm/Config.in"
 source "package/java/concierge/Config.in"
+source "package/java/rxtx/Config.in"
 endmenu

diff -urpN ../buildroot-snapshot/package/java/rxtx/Config.in buildroot-snapshot/package/java/rxtx/Config.in
--- ../buildroot-snapshot/package/java/rxtx/Config.in 1969-12-31
21:00:00.000000000 -0300
+++ buildroot-snapshot/package/java/rxtx/Config.in 2010-01-11
19:24:42.000000000 -0200

(quoted diff) +5 -0
@@ -0,0 +1,7 @@
+config BR2_PACKAGE_RXTX
+	bool "rxtx"
+        depends on BR2_PACKAGE_CLASSPATH
+	help
+	  RXTX is a native lib providing serial and parallel communication for

the Java Development Toolkit (JDK).

(quoted diff) +2 -0
+
+	  http://rxtx.qbang.org/pub/rxtx

diff -urpN ../buildroot-snapshot/package/java/rxtx/rxtx-2.1-7r2-UTS.patch buildroot-snapshot/package/java/rxtx/rxtx-2.1-7r2-UTS.patch --- ../buildroot-snapshot/package/java/rxtx/rxtx-2.1-7r2-UTS.patch

1969-12-31 21:00:00.000000000 -0300

+++ buildroot-snapshot/package/java/rxtx/rxtx-2.1-7r2-UTS.patch 2010-01-12
14:51:25.000000000 -0200

(quoted diff) +32 -0
@@ -0,0 +1,110 @@
+--- a/configure.in.orig	2004-10-17 16:23:02.000000000 +0200
++++ b/configure.in	2006-10-26 21:25:32.000000000 +0200
+@@ -466,1 +466,1 @@
+-	1.2*|1.3*|1.4*|1.5*) 
++	1.2*|1.3*|1.4*|1.5*|1.6*)
+@@ -536,1 +536,1 @@
+-	1.2*|1.3*|1.4*|1.5*) 
++	1.2*|1.3*|1.4*|1.5*|1.6*)
+@@ -672,1 +672,1 @@
+-	1.2*|1.3*|1.4*|1.5*)
++	1.2*|1.3*|1.4*|1.5*|1.6*)
+@@ -7241 +724,1 @@
+-	1.2*|1.3*|1.4*|1.5*)
++	1.2*|1.3*|1.4*|1.5*|1.6*)
+--- a/src/SerialImp.h.orgi	2004-10-17 16:23:02.000000000 +0200
++++ b/src/SerialImp.h	2006-10-26 21:25:32.000000000 +0200
+@@ -466,1 +466,1 @@
+-int printj(JNIEnv *env, wchar_t *fmt, ...);
++//int printj(JNIEnv *env, wchar_t *fmt, ...);
+
+--- a/src/I2CImp.c.orig	2004-10-17 16:23:02.000000000 +0200
++++ b/src/I2CImp.c	2006-10-26 21:25:32.000000000 +0200
+@@ -87,6 +87,7 @@
+ 	if( !handler.sa_handler ) signal( SIGIO, SIG_IGN );
+ #endif /* !__FreeBSD__ */
+ #if defined(__linux__) 
++#if 0
+ 	/* Lets let people who upgraded kernels know they may have problems */
+ 	if (uname (&name) == -1)
+ 	{
+@@ -98,6 +99,7 @@
+ 		fprintf(stderr, "\n\n\nRXTX WARNING:  This library was compiled to run

with OS release %s and you are currently running OS release %s. In some cases this can be a problem. Try recompiling RXTX if you notice strange behavior. If you just compiled RXTX make sure /usr/include/linux is a symbolic link to the include files that came with the kernel source and not an older copy.\n\n\npress enter to continue\n",UTS_RELEASE,name.release);

(quoted diff) +18 -0
+ 		getchar();
+ 	}
++#endif
+ #endif /* __linux__ */
+ #endif /* WIN32 */
+ }
+--- a/src/RawImp.c.orig	2004-10-16 18:20:35.000000000 +0200
++++ b/src/RawImp.c	2006-10-26 21:25:59.000000000 +0200
+@@ -231,6 +231,7 @@
+ 	if( !handler.sa_handler ) signal( SIGIO, SIG_IGN );
+ #endif /* !__FreeBSD__ */
+ #if defined(__linux__) 
++#if 0
+ 	/* Lets let people who upgraded kernels know they may have problems */
+ 	if (uname (&name) == -1)
+ 	{
+@@ -242,6 +243,7 @@
+ 		fprintf(stderr, "\n\n\nRXTX WARNING:  This library was compiled to run

with OS release %s and you are currently running OS release %s. In some cases this can be a problem. Try recompiling RXTX if you notice strange behavior. If you just compiled RXTX make sure /usr/include/linux is a symbolic link to the include files that came with the kernel source and not an older copy.\n\n\npress enter to continue\n",UTS_RELEASE,name.release);

(quoted diff) +18 -0
+ 		getchar();
+ 	}
++#endif
+ #endif /* __linux__ */
+ #endif /* WIN32 */
+ }
+--- a/src/RS485Imp.c.orig	2004-10-16 18:20:35.000000000 +0200
++++ b/src/RS485Imp.c	2006-10-26 21:26:23.000000000 +0200
+@@ -87,6 +87,7 @@
+ 	if( !handler.sa_handler ) signal( SIGIO, SIG_IGN );
+ #endif /* !__FreeBSD__ */
+ #if defined(__linux__) 
++#if 0
+ 	/* Lets let people who upgraded kernels know they may have problems */
+ 	if (uname (&name) == -1)
+ 	{
+@@ -98,6 +99,7 @@
+ 		fprintf(stderr, "\n\n\nRXTX WARNING:  This library was compiled to run

with OS release %s and you are currently running OS release %s. In some cases this can be a problem. Try recompiling RXTX if you notice strange behavior. If you just compiled RXTX make sure /usr/include/linux is a symbolic link to the include files that came with the kernel source and not an older copy.\n\n\npress enter to continue\n",UTS_RELEASE,name.release);

(quoted diff) +42 -0
+ 		getchar();
+ 	}
++#endif
+ #endif /* __linux__ */
+ #endif /* WIN32 */
+ }
+--- a/src/SerialImp.c.orig	2006-01-29 23:19:04.000000000 +0100
++++ b/src/SerialImp.c	2006-10-26 21:26:59.000000000 +0200
+@@ -280,6 +280,7 @@
+ 	gettimeofday(&seloop, NULL);
+ #endif /* DEBUG_TIMING */
+ #if defined(DEBUG) && defined(__linux__)
++#if 0
+ 	/* Lets let people who upgraded kernels know they may have problems */
+ 	if (uname (&name) == -1)
+ 	{
+@@ -295,6 +296,7 @@
+ 		getchar();
+ 	}
+ 	LEAVE( "RXTXPort:Initialize" );
++#endif
+ #endif /* DEBUG && __linux__ */
+ }
+ 
+--- a/src/SerialImp.cpp.orig	2004-10-12 10:59:27.000000000 +0200
++++ b/src/SerialImp.cpp	2006-10-26 21:27:44.000000000 +0200
+@@ -102,6 +102,7 @@
+ 	if( !handler.sa_handler ) signal( SIGIO, SIG_IGN );
+ #endif /* !__FreeBSD__ */
+ #ifdef DEBUG
++#if 0
+ 	/* Lets let people who upgraded kernels know they may have problems */
+ 	if (uname (&name) == -1)
+ 	{
+@@ -114,6 +115,7 @@
+ 			name.release);
+ 		getchar();
+ 	}
++#endif
+ #endif /* DEBUG */
+ #endif /* __BEOS__ */
+ #endif /* WIN32 */

diff -urpN ../buildroot-snapshot/package/java/rxtx/rxtx.mk buildroot-snapshot/package/java/rxtx/rxtx.mk
--- ../buildroot-snapshot/package/java/rxtx/rxtx.mk 1969-12-31
21:00:00.000000000 -0300
+++ buildroot-snapshot/package/java/rxtx/rxtx.mk 2010-01-12
15:01:16.000000000 -0200

(quoted diff) +12 -0
@@ -0,0 +1,16 @@
+#############################################################
+#
+# rxtx
+#
+#############################################################
+RXTX_VERSION = 2.1-7r2
+RXTX_SOURCE = rxtx-$(RXTX_VERSION).tgz
+RXTX_SITE = http://rxtx.qbang.org/pub/rxtx
+RXTX_AUTORECONF = YES
+RXTX_INSTALL_STAGING = NO
+RXTX_INSTALL_TARGET = YES
+RXTX_INSTALL_TARGET_OPT = RXTX_PATH=$(TARGET_DIR)/usr/lib/classpath

JHOME=$(TARGET_DIR)/usr/lib install

(quoted diff) +4 -0
+
+RXTX_DEPENDENCIES = uclibc classpath
+
+$(eval $(call AUTOTARGETS,package/java,rxtx))

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

Signature · 2 lines
View this message in context: http://old.nabble.com/Added-package-for-RxTx-Library-tp27131856p33414226.html
Sent from the Buildroot (busybox) mailing list archive at Nabble.com.
#1 lore raw

Hello,

Le Thu, 1 Mar 2012 00:47:05 -0800 (PST),
JennyM <[email protected]> a ?crit :

Quoted 10 lines

I am new to buildroot and am using it to develop a cross compilation
toochain and filesystem for an embedded ARM9/Linux platform. I have jamvm already running some java applications on the embedded platform. However I would like to use SerialRxTx from my java code. I tried some of the already prepared .so files from the RXTX download site and they are not working so I am coming to the conclusion that it necessary for me to compile my own.
So from your message below it seems like you may have made this step easier for me. What is the current status of the patch? Can I use it and what is the process for patching my current version of buildroot?

The patch has not been merged (I don't remember why), but more importantly, the Java support in Buildroot has been removed in 2012.02. Nobody was taking care of it, so we marked it deprecated a few releases ago, no-one stepped up to maintain it, so it has finally been removed.

If you are interested in bringing the Java/jamvm support in Buildroot up-to-date, we would definitely be interested by your patches.

Best regards,

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com