* jbigi / NBI / wrapper / installer:

jbigi and wrapper files for arm.
    Compiled on trimslice with gcc version 4.4.5 (Ubuntu/Linaro 4.4.4-14ubuntu5) 
    Log postinstall errors to postinstall.log.
    java version "1.6.0_18"
    OpenJDK Runtime Environment (IcedTea6 1.8.7) (6b18-1.8.7-0ubuntu2.1)
    OpenJDK Zero VM (build 14.0-b16, mixed mode)
    GMP 4.3.2 (half the size of 5.0.2, and no speed difference) LGPLv3
    Wrapper 3.5.9 GPLv2
    All binaries stripped.

    As on the Android emulator, the stock BigInteger.modPow()
    has some serious bug on arm.
    Without the libjbigi checked in here, the JVM crashes almost immediately.
This commit is contained in:
zzz
2011-06-14 18:11:43 +00:00
parent 730965812b
commit bb8b428598
9 changed files with 52 additions and 7 deletions

View File

@ -493,6 +493,9 @@
<copy todir="pkg-temp/lib/wrapper/solaris/">
<fileset dir="installer/lib/wrapper/solaris/" />
</copy>
<copy todir="pkg-temp/lib/wrapper/linux-arm/">
<fileset dir="installer/lib/wrapper/linux-arm/" />
</copy>
</target>
<target name="preppkg-windows" depends="preppkg-base, buildexe">
@ -521,6 +524,7 @@
<copy file="installer/lib/wrapper/all/wrapper.jar" todir="pkg-temp/lib" />
</target>
<!-- x86 linux only -->
<target name="preppkg-linux" depends="preppkg-base">
<copy file="installer/resources/runplain.sh" todir="pkg-temp/" />
<!-- <copy file="apps/i2psnark/launch-i2psnark" todir="pkg-temp/" /> old feature that per zzz isn't used-->

View File

@ -140,6 +140,15 @@ public class NativeBigInteger extends BigInteger {
/** all libjbibi builds are identical to pentium3, case handled in getMiddleName2() */
private final static String JBIGI_OPTIMIZATION_VIAC32 = "viac32";
/**
* Non-x86, no fallbacks to older libs or to "none"
* @since 0.8.7
*/
private final static String JBIGI_OPTIMIZATION_ARM = "arm";
/**
* Operating systems
*/
private static final boolean _isWin = System.getProperty("os.name").startsWith("Win");
private static final boolean _isOS2 = System.getProperty("os.name").startsWith("OS/2");
private static final boolean _isMac = System.getProperty("os.name").startsWith("Mac");
@ -164,6 +173,8 @@ public class NativeBigInteger extends BigInteger {
private static final boolean _isX86 = System.getProperty("os.arch").contains("86") ||
System.getProperty("os.arch").equals("amd64");
private static final boolean _isArm = System.getProperty("os.arch").startsWith("arm");
/* libjbigi.so vs jbigi.dll */
private static final String _libPrefix = (_isWin || _isOS2 ? "" : "lib");
private static final String _libSuffix = (_isWin || _isOS2 ? ".dll" : _isMac ? ".jnilib" : ".so");
@ -173,12 +184,16 @@ public class NativeBigInteger extends BigInteger {
static {
if (_isX86) // Don't try to resolve CPU type on PPC and other non x86 hardware
sCPUType = resolveCPUType();
else if (_isArm)
sCPUType = JBIGI_OPTIMIZATION_ARM;
else
sCPUType = null;
loadNative();
}
/** Tries to resolve the best type of CPU that we have an optimized jbigi-dll/so for.
/**
* Tries to resolve the best type of CPU that we have an optimized jbigi-dll/so for.
* This is for x86 only.
* @return A string containing the CPU-type or null if CPU type is unknown
*/
private static String resolveCPUType() {
@ -639,9 +654,12 @@ public class NativeBigInteger extends BigInteger {
rv.add(_libPrefix + getMiddleName1() + JBIGI_OPTIMIZATION_ATHLON64 + _libSuffix);
}
}
// add libjbigi-xxx-none.so
// Add libjbigi-xxx-none_64.so
if (_is64)
rv.add(_libPrefix + getMiddleName1() + "none_64" + _libSuffix);
// Add libjbigi-xxx-none.so
// Note that libjbigi-osx-none.jnilib is a 'fat binary' with both PPC and x86-32
if (!_isArm)
rv.add(getResourceName(false));
return rv;
}

View File

@ -1,3 +1,10 @@
2011-06-14 zzz
* Jbigi / NBI / wrapper / installer:
jbigi and wrapper files for arm.
Compiled on trimslice with gcc version 4.4.5 (Ubuntu/Linaro 4.4.4-14ubuntu5)
Log postinstall errors to postinstall.log.
* RateStat: final
2011-06-13 duck
* Finnish, Italian, Polish and Vietnamese translations, thanks Transifex teams.

Binary file not shown.

View File

@ -0,0 +1,6 @@
Wrapper build instructions (Ubuntu):
export ANT_HOME=/usr/share/ant
export JAVA_HOME=/usr/lib/jvm/java-6-openjdk
cp src/c/Makefile-linux-x86-32.make src/c/Makefile-linux-arm-32.make
build32.sh

Binary file not shown.

Binary file not shown.

View File

@ -23,11 +23,15 @@ chmod 755 ./runplain.sh
# chmod 755 ./uninstall_i2p_service_unix
ERROR_MSG="Cannot determine operating system type. From the subdirectory in lib/wrapper matching your operating system, please move i2psvc to your base I2P directory, and move the remaining two files to the lib directory."
LOGFILE=./postinstall.log
HOST_OS=`./osid`
if [ "X$HOST_OS" = "X" -o $HOST_OS = "unknown" ]; then
if [ "X$HOST_OS" = "X" -o "X$HOST_OS" = "Xunknown" ]; then
echo "$ERROR_MSG"
echo "Host OS is $HOST_OS" >> $LOGFILE
echo "Host architecture is $OS_ARCH" >> $LOGFILE
echo "$ERROR_MSG" >> $LOGFILE
exit 1
fi
@ -36,7 +40,10 @@ X86_64=`echo "${OS_ARCH}" | grep x86_64`
case $HOST_OS in
debian | fedora | gentoo | linux | mandrake | redhat | suse )
if [ "X$X86_64" = "X" ]; then
if [ `echo $OS_ARCH |grep arm` ]; then
wrapperpath="./lib/wrapper/linux-arm"
cp ${wrapperpath}/libwrapper.so ./lib/
elif [ "X$X86_64" = "X" ]; then
wrapperpath="./lib/wrapper/linux"
cp ${wrapperpath}/libwrapper.so ./lib/
else
@ -47,7 +54,7 @@ case $HOST_OS in
fi
;;
freebsd )
if [ ! `uname -m |grep amd64` ]; then
if [ ! `echo $OS_ARCH | grep amd64` ]; then
wrapperpath="./lib/wrapper/freebsd"
cp ${wrapperpath}/libwrapper.so ./lib/
else
@ -67,6 +74,9 @@ case $HOST_OS in
;;
* )
echo "${ERROR_MSG}"
echo "Host OS is $HOST_OS" >> $LOGFILE
echo "Host architecture is $OS_ARCH" >> $LOGFILE
echo "$ERROR_MSG" >> $LOGFILE
exit 1
;;
esac

View File

@ -18,7 +18,7 @@ public class RouterVersion {
/** deprecated */
public final static String ID = "Monotone";
public final static String VERSION = CoreVersion.VERSION;
public final static long BUILD = 26;
public final static long BUILD = 27;
/** for example "-test" */
public final static String EXTRA = "";