2015-07-21 247 views
0

我当前想要在OpenWrt环境中安装OpenHAB(现在它在具有x86架构的虚拟机上),并且它至少需要具有版本1.6的Java运行时。在OpenWrt上安装JamVM 2.0:如何更改Makefile以便使用OpenJDK库?

所以我使用了OpenWrt 14.07(Breaking Barrier)SDK交叉编译器,它包含一个名为JamVM的紧凑型Java机器。对于版本1.x,JamVM使用提供Java 1.5的GNU类路径,但自从JamVM 2.0以来,该程序允许使用提供Java 1.6到1.9的OpenJDK。我只需要生成包含此OpenJDK库的JamVM包,但我不熟悉Makefile配置。这是当前的Makefile与GNU类路径库设置好的:


# 
# Copyright (C) 2006-2015 OpenWrt.org 
# 
# This is free software, licensed under the GNU General Public License v2. 
# See /LICENSE for more information. 
# 

include $(TOPDIR)/rules.mk 

PKG_NAME:=jamvm 
PKG_VERSION:=2.0.0 
PKG_RELEASE:=1 
PKG_LICENSE:=GPL-2.0+ 
PKG_MAINTAINER:=Dana H. Myers <[email protected]> 

PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz 
PKG_SOURCE_URL:[email protected]/$(PKG_NAME) 
PKG_MD5SUM:=a6e3321ef4b3cfb4afc20bd75452e11e 

PKG_USE_MIPS16:=0 

PKG_FIXUP:=autoreconf 
PKG_INSTALL:=1 

include $(INCLUDE_DIR)/package.mk 

define Package/jamvm 
    SUBMENU:=Java 
    SECTION:=lang 
    CATEGORY:=Languages 
    TITLE:=A compact Java Virtual Machine 
    URL:=http://sourceforge.net/projects/jamvm 
    DEPENDS:=+zlib +libpthread +librt +classpath @!avr32 
endef 

define Package/jamvm/description 
JamVM is a new Java Virtual Machine which conforms to the JVM 
specification version (blue book). In comparison to most other VM's (free 
and commercial) it is extremely small.However, unlike other small VMs 
(e.g. KVM) it is designed to support the full specification, and includes 
support for object finalisation, Soft/Weak/Phantom References, the Java 
Native Interface (JNI) and the Reflection API. 
endef 

CONFIGURE_ARGS += \ 
    --with-java-runtime-library=gnuclasspath \ 
    --with-classpath-install-dir=/usr \ 
    --disable-int-inlining \ 
    --disable-shared \ 
    --without-pic 

MAKE_FLAGS += \ 
    GLIBJ_ZIP=$(STAGING_DIR)/usr/share/classpath/glibj.zip 

define Package/jamvm/install 
    $(INSTALL_DIR) $(1)/usr 
    $(CP) \ 
     $(PKG_INSTALL_DIR)/usr/bin \ 
     $(PKG_INSTALL_DIR)/usr/share \ 
     $(1)/usr/ 
endef 

define Build/InstallDev 
    $(CP) $(PKG_INSTALL_DIR)/* $(1)/ 
endef 

$(eval $(call BuildPackage,jamvm)) 

我知道,在CONFIGURE_ARGS,我行

--with-java-runtime-library=gnuclasspath \ 

改变这种

--with-java-runtime-library=openjdk7 \ 

但随着这一改变,我的包没有能够编译时我

make /packages/lang/jamvm 

有没有人知道该怎么办?

谢谢大家

回答

0

这并不容易。 OpenJDK 7的OpenWRT邮件列表中有许多来自Waldemar Brodkorb的补丁程序,以及OpenJDK 6的一些较早的补丁程序。但就我的理解而言,它们只能让您构建x86版本。

我认为从OpenHAB软件包中删除java版本限制比使用JamVM交叉构建OpenJDK更简单 - 不要开玩笑!

相关问题