簡體   English   中英

在OpenWrt上安裝JamVM 2.0:如何更改Makefile,使其使用OpenJDK庫?

[英]Installing JamVM 2.0 on OpenWrt : how to change the Makefile so it uses OpenJDK library?

我當前要在OpenWrt環境中安裝OpenHAB(目前在具有x86架構的虛擬機上安裝OpenHAB),並且它需要具有至少1.6版的Java運行時。

因此,我使用了OpenWrt 14.07(突破性障礙)SDK交叉編譯器,其中包括一個名為JamVM的緊湊型Java計算機。 對於1.x版,JamVM使用提供Java 1.5的GNU類路徑,但是自JamVM 2.0起,此程序允許使用提供Java 1.6至1.9的OpenJDK。 我只想生成包含此OpenJDK庫的JamVM軟件包,但是我對Makefile配置不熟悉。 這是設置了GNU類路徑庫的當前Makefile:


#
# 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中,我可以更改行

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

對此

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

但是,僅此更改,我的包就無法編譯

make /packages/lang/jamvm

是否有人知道該怎么辦?

謝謝你們

這不是那么容易。 對於OpenJDK 7,OpenWRT郵件列表上有Waldemar Brodkorb的許多補丁,對於OpenJDK 6,還有一些較舊的補丁。但是據我所知,它們只能使您構建x86版本。

我認為從OpenHAB捆綁包中刪除Java版本約束比使用JamVM交叉構建OpenJDK容易得多-別開玩笑了!

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM