首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在JamVM上安装OpenWrt 2.0 :如何更改Makefile,使其使用OpenJDK库?

在JamVM上安装OpenWrt 2.0 :如何更改Makefile,使其使用OpenJDK库?
EN

Stack Overflow用户
提问于 2015-07-21 01:42:53
回答 1查看 2.6K关注 0票数 0

目前,我希望在一个OpenHAB环境中安装OpenWrt (目前它是在虚拟机上安装x86体系结构),而且它需要至少有一个版本1.6的x86运行时。

因此,我使用了OpenWrt 14.07 (打破屏障) SDK交叉编译器,它包括一个名为JamVM的小型Java机器。对于1.x版本,JamVM使用的是提供Java1.5的,但是自从JamVM 2.0以来,这个程序允许使用提供Java1.6到1.9的OpenJDK。我只想生成包含这个JamVM库的OpenJDK包,但我不熟悉Makefile配置。下面是设置了GNU类路径库的当前Makefile:

代码语言:javascript
复制
#
# 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 <k6jq@comcast.net>

PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=@SF/$(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中,我可以更改行

代码语言:javascript
复制
--with-java-runtime-library=gnuclasspath \

到这个

代码语言:javascript
复制
--with-java-runtime-library=openjdk7 \

但是有了这个变化,我的包就不能编译了

代码语言:javascript
复制
make /packages/lang/jamvm

有人知道该怎么做吗?

谢谢大家

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2015-10-16 18:21:56

没那么容易。OpenWRT邮件列表中的OpenJDK 7和OpenJDK 6中有许多来自Waldemar的补丁,但据我所知,它们只允许您构建x86版本。

我认为从OpenHAB包中删除java版本的约束比将OpenJDK与JamVM交叉构建要容易得多--不是开玩笑!

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/31528993

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档