forked from openjdk/jdk
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'rivos/main' into rivos/merge-jdk-22+13
- Loading branch information
Showing
31 changed files
with
2,681 additions
and
132 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
set sysroot /sysroot/focal-riscv64 | ||
|
||
handle SIGILL nostop noprint | ||
handle SIGSEGV nostop noprint |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
# | ||
# Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. | ||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | ||
# | ||
# This code is free software; you can redistribute it and/or modify it | ||
# under the terms of the GNU General Public License version 2 only, as | ||
# published by the Free Software Foundation. Oracle designates this | ||
# particular file as subject to the "Classpath" exception as provided | ||
# by Oracle in the LICENSE file that accompanied this code. | ||
# | ||
# This code is distributed in the hope that it will be useful, but WITHOUT | ||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | ||
# version 2 for more details (a copy is included in the LICENSE file that | ||
# accompanied this code). | ||
# | ||
# You should have received a copy of the GNU General Public License version | ||
# 2 along with this work; if not, write to the Free Software Foundation, | ||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. | ||
# | ||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA | ||
# or visit www.oracle.com if you need additional information or have any | ||
# questions. | ||
# | ||
|
||
name: 'Create sysroot' | ||
description: 'Create the sysroot to cross-compile and test the OpenJDK' | ||
inputs: | ||
target-cpu: | ||
description: 'Target CPU architecture' | ||
required: true | ||
gnu-arch: | ||
description: 'GNU CPU architecture' | ||
required: true | ||
debian-arch: | ||
description: 'Debian CPU architecture' | ||
required: true | ||
debian-repository: | ||
description: 'Debian repository' | ||
required: true | ||
debian-version: | ||
description: 'Debian version' | ||
required: true | ||
debian-keyring: | ||
description: 'Debian keyring' | ||
required: false | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: 'Check cache for sysroot' | ||
id: get-cached-sysroot | ||
uses: actions/cache@v3 | ||
with: | ||
path: sysroot | ||
key: sysroot-${{ inputs.debian-arch }}-${{ inputs.debian-version }}-${{ hashFiles('./.github/actions/create-sysroot/action.yml') }} | ||
|
||
- name: 'Install sysroot dependencies' | ||
run: sudo apt-get install debootstrap qemu-user-static | ||
shell: bash | ||
if: steps.get-cached-sysroot.outputs.cache-hit != 'true' | ||
|
||
- name: 'Create sysroot' | ||
run: > | ||
sudo debootstrap | ||
--arch=${{ inputs.debian-arch }} | ||
--verbose | ||
--include=fakeroot,symlinks,build-essential,make,libx11-dev,libxext-dev,libxrender-dev,libxrandr-dev,libxtst-dev,libxt-dev,libcups2-dev,libfontconfig1-dev,libasound2-dev,libfreetype-dev,libpng-dev,libatomic1 | ||
--resolve-deps | ||
--variant=minbase | ||
$(test -n "${{ inputs.debian-keyring }}" && echo "--keyring=${{ inputs.debian-keyring }}") | ||
${{ inputs.debian-version }} | ||
sysroot | ||
${{ inputs.debian-repository }} | ||
shell: bash | ||
if: steps.get-cached-sysroot.outputs.cache-hit != 'true' | ||
|
||
- name: 'Prepare sysroot' | ||
run: | | ||
# Prepare sysroot and remove unused files to minimize cache | ||
sudo chroot sysroot symlinks -cr . | ||
sudo rm -rf sysroot/{dev,proc,run,sys} | ||
shell: bash | ||
if: steps.get-cached-sysroot.outputs.cache-hit != 'true' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
# | ||
# Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. | ||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | ||
# | ||
# This code is free software; you can redistribute it and/or modify it | ||
# under the terms of the GNU General Public License version 2 only, as | ||
# published by the Free Software Foundation. Oracle designates this | ||
# particular file as subject to the "Classpath" exception as provided | ||
# by Oracle in the LICENSE file that accompanied this code. | ||
# | ||
# This code is distributed in the hope that it will be useful, but WITHOUT | ||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | ||
# version 2 for more details (a copy is included in the LICENSE file that | ||
# accompanied this code). | ||
# | ||
# You should have received a copy of the GNU General Public License version | ||
# 2 along with this work; if not, write to the Free Software Foundation, | ||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. | ||
# | ||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA | ||
# or visit www.oracle.com if you need additional information or have any | ||
# questions. | ||
# | ||
|
||
name: 'Initialize Platform Variables' | ||
description: 'Initialize the platform-specific variables used for cross-compilation' | ||
inputs: | ||
platform: | ||
description: 'Target Platform' | ||
required: true | ||
outputs: | ||
target-cpu: | ||
description: 'Target CPU Archictecture' | ||
value: ${{ steps.platform-variables.outputs.target-cpu }} | ||
gnu-arch: | ||
description: 'Target GNU Architecture' | ||
value: ${{ steps.platform-variables.outputs.gnu-arch }} | ||
debian-arch: | ||
description: 'Target Debian Architecture' | ||
value: ${{ steps.platform-variables.outputs.debian-arch }} | ||
debian-repository: | ||
description: 'Target Debian Repository' | ||
value: ${{ steps.platform-variables.outputs.debian-repository }} | ||
debian-version: | ||
description: 'Target Debian Version' | ||
value: ${{ steps.platform-variables.outputs.debian-version }} | ||
gnu-abi: | ||
description: 'Target GNU ABI' | ||
value: ${{ steps.platform-variables.outputs.gnu-abi }} | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: 'Initialize platform variables' | ||
id: platform-variables | ||
run: | | ||
if [[ '${{ inputs.platform }}' == 'linux-aarch64' ]]; then | ||
echo "target-cpu=aarch64" >> $GITHUB_OUTPUT | ||
echo "gnu-arch=aarch64" >> $GITHUB_OUTPUT | ||
echo "debian-arch=arm64" >> $GITHUB_OUTPUT | ||
echo "debian-repository=https://httpredir.debian.org/debian/" >> $GITHUB_OUTPUT | ||
echo "debian-version=bullseye" >> $GITHUB_OUTPUT | ||
elif [[ '${{ inputs.platform }}' == 'linux-arm' ]]; then | ||
echo "target-cpu=arm" >> $GITHUB_OUTPUT | ||
echo "gnu-arch=arm" >> $GITHUB_OUTPUT | ||
echo "gnu-abi=eabihf" >> $GITHUB_OUTPUT | ||
echo "debian-arch=armhf" >> $GITHUB_OUTPUT | ||
echo "debian-repository=https://httpredir.debian.org/debian/" >> $GITHUB_OUTPUT | ||
echo "debian-version=bullseye" >> $GITHUB_OUTPUT | ||
elif [[ '${{ inputs.platform }}' == 'linux-s390x' ]]; then | ||
echo "target-cpu=s390x" >> $GITHUB_OUTPUT | ||
echo "gnu-arch=s390x" >> $GITHUB_OUTPUT | ||
echo "debian-arch=s390x" >> $GITHUB_OUTPUT | ||
echo "debian-repository=https://httpredir.debian.org/debian/" >> $GITHUB_OUTPUT | ||
echo "debian-version=bullseye" >> $GITHUB_OUTPUT | ||
elif [[ '${{ inputs.platform }}' == 'linux-ppc64le' ]]; then | ||
echo "target-cpu=ppc64le" >> $GITHUB_OUTPUT | ||
echo "gnu-arch=powerpc64le" >> $GITHUB_OUTPUT | ||
echo "debian-arch=ppc64el" >> $GITHUB_OUTPUT | ||
echo "debian-repository=https://httpredir.debian.org/debian/" >> $GITHUB_OUTPUT | ||
echo "debian-version=bullseye" >> $GITHUB_OUTPUT | ||
elif [[ '${{ inputs.platform }}' == 'linux-riscv64' ]]; then | ||
echo "target-cpu=riscv64" >> $GITHUB_OUTPUT | ||
echo "gnu-arch=riscv64" >> $GITHUB_OUTPUT | ||
echo "debian-arch=riscv64" >> $GITHUB_OUTPUT | ||
echo "debian-repository=https://httpredir.debian.org/debian/" >> $GITHUB_OUTPUT | ||
echo "debian-version=sid" >> $GITHUB_OUTPUT | ||
else | ||
echo "Unknown platform ${{ inputs.platform }}" | ||
exit 1 | ||
fi | ||
shell: bash |
Oops, something went wrong.