Skip to content

Commit

Permalink
add support for riscv64
Browse files Browse the repository at this point in the history
Signed-off-by: Bo YU <[email protected]>
  • Loading branch information
yuzibo committed Sep 14, 2024
1 parent 36ccbc1 commit 9583ff6
Show file tree
Hide file tree
Showing 18 changed files with 170 additions and 3 deletions.
14 changes: 13 additions & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,18 @@ def getNativeJdkUrl(String os, String arch) { // To update the used JDK version
"""
}
return "file://${WORKSPACE}/repackage-win32.aarch64-jdk/jdk.tar.gz"
} else if ('linux'.equals(os) && 'riscv64'.equals(arch)) {
// Downloading jdk and renew it for riscv64 architecture on Linux
dir("${WORKSPACE}/repackage-linux.riscv64-jdk") {
sh """
curl -L 'https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.12%2B7/OpenJDK17U-jdk_riscv64_linux_hotspot_17.0.12_7.tar.gz' > jdk.tar.gz
tar -xzf jdk.tar.gz jdk-17.0.12+7/include/ jdk-17.0.12+7/lib/
rm jdk.tar.gz
cd jdk-17.0.12+7
tar -czf ../jdk.tar.gz include/ lib/
"""
}
return "file://${WORKSPACE}/repackage-linux.riscv64-jdk/jdk.tar.gz"
}
return "https://download.eclipse.org/justj/jres/17/downloads/20230428_1804/org.eclipse.justj.openjdk.hotspot.jre.minimal.stripped-17.0.7-${os}-${arch}.tar.gz"
}
Expand Down Expand Up @@ -181,7 +193,7 @@ pipeline {
axes {
axis {
name 'PLATFORM'
values 'cocoa.macosx.aarch64' , 'cocoa.macosx.x86_64', 'gtk.linux.aarch64', 'gtk.linux.ppc64le', 'gtk.linux.x86_64', 'win32.win32.aarch64', 'win32.win32.x86_64'
values 'cocoa.macosx.aarch64' , 'cocoa.macosx.x86_64', 'gtk.linux.aarch64', 'gtk.linux.ppc64le', 'gtk.linux.x86_64', 'win32.win32.aarch64', 'win32.win32.x86_64', 'gtk.linux.riscv64'
}
}
stages {
Expand Down
22 changes: 22 additions & 0 deletions bundles/org.eclipse.equinox.launcher.gtk.linux.riscv64/.project
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>org.eclipse.equinox.launcher.gtk.linux.riscv64</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.pde.ManifestBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.SchemaBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.pde.PluginNature</nature>
</natures>
</projectDescription>
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-Vendor: %providerName
Bundle-SymbolicName: org.eclipse.equinox.launcher.gtk.linux.riscv64;singleton:=true
Bundle-Version: 1.2.1100.qualifier
Fragment-Host: org.eclipse.equinox.launcher;bundle-version="[1.6.0,1.7.0)"
Eclipse-PlatformFilter: (& (osgi.ws=gtk) (osgi.os=linux) (osgi.arch=riscv64))
Bundle-Localization: launcher.gtk.linux.riscv64
Eclipse-BundleShape: dir
36 changes: 36 additions & 0 deletions bundles/org.eclipse.equinox.launcher.gtk.linux.riscv64/about.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<title>About</title>
</head>
<body lang="EN-US">
<h2>About This Content</h2>

<p>November 30, 2017</p>
<h3>License</h3>

<p>
The Eclipse Foundation makes available all content in this plug-in
(&quot;Content&quot;). Unless otherwise indicated below, the Content
is provided to you under the terms and conditions of the Eclipse
Public License Version 2.0 (&quot;EPL&quot;). A copy of the EPL is
available at <a href="http://www.eclipse.org/legal/epl-2.0">http://www.eclipse.org/legal/epl-2.0</a>.
For purposes of the EPL, &quot;Program&quot; will mean the Content.
</p>

<p>
If you did not receive this Content directly from the Eclipse
Foundation, the Content is being redistributed by another party
(&quot;Redistributor&quot;) and different terms and conditions may
apply to your use of any object code in the Content. Check the
Redistributor's license that was provided with the Content. If no such
license exists, contact the Redistributor. Unless otherwise indicated
below, the terms and conditions of the EPL still apply to any source
code in the Content and such source code may be obtained at <a
href="http://www.eclipse.org/">http://www.eclipse.org</a>.
</p>

</body>
</html>
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
###############################################################################
# Copyright (c) 2024 ISCAS(PLCT Lab). and others.
#
# This program and the accompanying materials
# are made available under the terms of the Eclipse Public License 2.0
# which accompanies this distribution, and is available at
# https://www.eclipse.org/legal/epl-2.0/
#
# SPDX-License-Identifier: EPL-2.0
#
# Contributors:
# Bo YU <[email protected]>.
# CHEN Xuan <[email protected]> - initial API and implementation
###############################################################################
bin.includes = META-INF/,\
launcher.gtk.linux.riscv64.properties,\
about.html

generateSourceBundle=false
binaryTag=LBv1-1904

# Maven properties, see https://github.com/eclipse/tycho/wiki/Tycho-Pomless
tycho.pomless.parent = ../../launcher-binary-parent
pom.model.property.os = linux
pom.model.property.ws = gtk
pom.model.property.arch = riscv64
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
###############################################################################
# Copyright (c) 2024 ISCAS(PLCT Lab). and others.
#
# This program and the accompanying materials
# are made available under the terms of the Eclipse Public License 2.0
# which accompanies this distribution, and is available at
# https://www.eclipse.org/legal/epl-2.0/
#
# SPDX-License-Identifier: EPL-2.0
#
# Contributors:
# Bo YU <[email protected]>.
# CHEN Xuan <[email protected]>. - initial API and implementation
###############################################################################
pluginName = Equinox Launcher Linux RISCV64 Fragment
providerName = Eclipse.org - Equinox
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ Bundle-NativeCode: nativefile1.txt;
processor=loongarch;
osname=Linux,
nativefile1.txt;
processor=riscv64;
processor=riscv;
osname=Linux,
nativefile1.txt;
processor=s390;
processor=s390x;
osname=Linux,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ Bundle-NativeCode: nativefile2.txt;
processor=loongarch;
osname=Linux,
nativefile2.txt;
processor=riscv64;
processor=riscv;
osname=Linux,
nativefile2.txt;
processor=Sparc;
osname=Solaris;
osname=SunOS,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ Bundle-NativeCode: nativefile.txt;
processor=loongarch;
osname=Linux,
nativefile.txt;
processor=riscv64;
processor=riscv;
osname=Linux,
nativefile.txt;
processor=Sparc;
osname=Solaris;
osname=SunOS,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ Bundle-NativeCode: nativefile.txt;
processor=loongarch;
osname=Linux,
nativefile.txt;
processor=riscv64;
processor=riscv;
osname=Linux,
nativefile.txt;
processor=Sparc;
osname=Solaris;
osname=SunOS,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

68k # Motorola 68000 and up
ARM # Intel Strong ARM
aarch64 arm64
aarch64 arm64 # 64 bit arm architecture
Alpha # Compaq (ex DEC)
Ignite psc1k # PTSC
Mips # SGI
Expand All @@ -29,7 +29,8 @@ PowerPC-64-LE ppc64le # IBM Power PC 64-bit Little Endian
Sparc # SUN
x86 pentium i386 i486 i586 i686 # Intel
s390 # IBM System 390
s390x # IBM System 390 (64-bit)
s390x # IBM System 390 (64-bit)
v850e # NEC V850E
x86-64 amd64 em64t x86_64 # 64 bit x86 architecture
loongarch64 LoongArch64 # 64 bit loongarch architecture
riscv64 # 64 bit riscv architecture
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,6 @@ root.macosx.cocoa.aarch64.permissions.755=Eclipse.app/Contents/MacOS/launcher

root.linux.gtk.x86_64=bin/gtk/linux/x86_64,gtk_root
root.linux.gtk.x86_64.permissions.755=launcher

root.linux.gtk.riscv64=bin/gtk/linux/riscv64,gtk_root
root.linux.gtk.riscv64.permissions.755=launcher
7 changes: 7 additions & 0 deletions features/org.eclipse.equinox.executable.feature/feature.xml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,13 @@
arch="x86_64"
version="0.0.0"/>

<plugin
id="org.eclipse.equinox.launcher.gtk.linux.riscv64"
os="linux"
ws="gtk"
arch="riscv64"
version="0.0.0"/>

<plugin
id="org.eclipse.equinox.launcher.win32.win32.aarch64"
os="win32"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,10 @@ case $defaultOS in
defaultOSArch="loongarch64"
defaultJava=DEFAULT_JAVA_EXEC
;;
"riscv64")
defaultOSArch="riscv64"
defaultJava=DEFAULT_JAVA_EXEC
;;
*)
echo "*** Unknown MODEL <${MODEL}>"
;;
Expand Down
1 change: 1 addition & 0 deletions features/org.eclipse.equinox.executable.feature/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@
<include name="cocoa/macosx/aarch64/**/*"/>
<include name="gtk/linux/ppc64le/**/*"/>
<include name="gtk/linux/aarch64/**/*"/>
<include name="gtk/linux/riscv64/**/*"/>
<include name="gtk/linux/x86_64/**/*"/>
<include name="win32/win32/aarch64/**/*"/>
<include name="win32/win32/x86_64/**/*"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,6 @@ root.linux.gtk.x86_64.permissions.755=libcairo-swt.so

root.linux.gtk.loongarch64=bin/gtk/linux/loongarch64,gtk_root
root.linux.gtk.loongarch64.permissions.755=launcher

root.linux.gtk.riscv64=bin/gtk/linux/riscv64,gtk_root
root.linux.gtk.riscv64.permissions.755=launcher
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,14 @@
</copy>
<chmod perm="755" dir="${feature.base}/linux.gtk.loongarch64/${collectingFolder}" includes="launcher" />
</target>
<target name="rootFileslinux_gtk_riscv64">
<mkdir dir="${feature.base}/linux.gtk.riscv64/${collectingFolder}"/>
<copy todir="${feature.base}/linux.gtk.riscv64/${collectingFolder}" failonerror="true" overwrite="true">
<fileset dir="${basedir}/bin/gtk/linux/riscv64" includes="**" />
<fileset dir="${basedir}/gtk_root" includes="**" />
</copy>
<chmod perm="755" dir="${feature.base}/linux.gtk.riscv64/${collectingFolder}" includes="launcher" />
</target>
<target name="rootFileslinux_gtk_ia64">
<mkdir dir="${feature.base}/linux.gtk.ia64/${collectingFolder}"/>
<copy todir="${feature.base}/linux.gtk.ia64/${collectingFolder}" failonerror="true" overwrite="true">
Expand Down Expand Up @@ -168,6 +176,7 @@
<antcall target="rootFileslinux_gtk_ppc64le"/>
<antcall target="rootFileslinux_gtk_aarch64"/>
<antcall target="rootFileslinux_gtk_x86_64"/>
<antcall target="rootFileslinux_gtk_riscv64"/>
</target>

<target name="zip.distribution" depends="init" description="Create a zip containing all the plug-ins and features for the feature: org.eclipse.platform.launchers.">
Expand Down
1 change: 1 addition & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,7 @@
<module>bundles/org.eclipse.equinox.launcher.cocoa.macosx.aarch64</module>
<module>bundles/org.eclipse.equinox.launcher.gtk.linux.aarch64</module>
<module>bundles/org.eclipse.equinox.launcher.gtk.linux.ppc64le</module>
<module>bundles/org.eclipse.equinox.launcher.gtk.linux.riscv64</module>
<module>bundles/org.eclipse.equinox.launcher.gtk.linux.x86_64</module>
<module>bundles/org.eclipse.equinox.launcher.win32.win32.aarch64</module>
<module>bundles/org.eclipse.equinox.launcher.win32.win32.x86_64</module>
Expand Down

0 comments on commit 9583ff6

Please sign in to comment.