Skip to content

Commit

Permalink
Update code repo and change repo TAG_SEARCH
Browse files Browse the repository at this point in the history
  • Loading branch information
Panxuefeng-loongson committed Nov 7, 2022
1 parent 3e8ae2d commit 476f3c4
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 13 deletions.
18 changes: 12 additions & 6 deletions build-farm/platform-specific-configurations/linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -135,17 +135,23 @@ if [ "${VARIANT}" == "${BUILD_VARIANT_DRAGONWELL}" ] && [ "$JAVA_FEATURE_VERSION
fi
export "${BOOT_JDK_VARIABLE}"="$PWD/jdk-8"
fi
elif [ "${VARIANT}" == "${BUILD_VARIANT_LOONGSON}" ]; then
if [ "$(uname -m)" = "loongarch64" ]; then
if [ -d /opt/j2sdk-images ]; then
export "${BOOT_JDK_VARIABLE}"=/opt/j2sdk-images
else
fi

if [ "${VARIANT}" == "${BUILD_VARIANT_LOONGSON}" ] && [ "$JAVA_FEATURE_VERSION" -eq 8 ]; then
if [ "${ARCHITECTURE}" == "loongarch64" ]; then
echo Loongson jdk8 requires a Loongson boot JDK - downloading one ...
mkdir -p "$PWD/jdk-8"
curl -L "http://ftp.loongnix.cn/Java/openjdk8/loongson8.1.11-jdk8u332b09-linux-loongarch64.tar.gz" | tar xpzf - --strip-components=1 -C "$PWD/jdk-8"
export "${BOOT_JDK_VARIABLE}"="$PWD/jdk-8"
fi
fi
else
echo "Only Java 8 is supported for now"
exit 1
fi

if [ "${ARCHITECTURE}" == "loongarch64" ]
then
export LANG=C
fi

if [ ! -d "$(eval echo "\$$BOOT_JDK_VARIABLE")" ]; then
Expand Down
2 changes: 1 addition & 1 deletion configureBuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ setRepository() {
elif [[ "${BUILD_CONFIG[BUILD_VARIANT]}" == "${BUILD_VARIANT_BISHENG}" ]]; then
suffix="openeuler-mirror/bishengjdk-${BUILD_CONFIG[OPENJDK_CORE_VERSION]:3}"
elif [[ "${BUILD_CONFIG[BUILD_VARIANT]}" == "${BUILD_VARIANT_LOONGSON}" ]]; then
suffix="Panxuefeng-loongson/jdk8u"
suffix="loongson/jdk8u"
elif [ "${BUILD_CONFIG[OPENJDK_CORE_VERSION]}" == "${JDK8_CORE_VERSION}" ] && [ "${BUILD_CONFIG[OS_ARCHITECTURE]}" == "armv7l" ] && [[ "${BUILD_CONFIG[BUILD_VARIANT]}" == "${BUILD_VARIANT_TEMURIN}" ]]; then
suffix="adoptium/aarch32-jdk8u";
elif [ "${BUILD_CONFIG[OPENJDK_CORE_VERSION]}" == "${JDK8_CORE_VERSION}" ] && [ "${BUILD_CONFIG[OS_ARCHITECTURE]}" == "armv7l" ] && [[ "${BUILD_CONFIG[BUILD_VARIANT]}" == "${BUILD_VARIANT_HOTSPOT}" ]]; then
Expand Down
13 changes: 7 additions & 6 deletions sbin/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -244,14 +244,15 @@ getOpenJdkVersion() {
version=$(echo "$version" | cut -d'-' -f 2 | cut -d'_' -f 1)
fi
elif [ "${BUILD_CONFIG[BUILD_VARIANT]}" == "${BUILD_VARIANT_LOONGSON}" ]; then
local loongsonVerFile=${BUILD_CONFIG[WORKSPACE_DIR]}/${BUILD_CONFIG[WORKING_DIR]}/${BUILD_CONFIG[OPENJDK_SOURCE_DIR]}/version.txt
local loongsonVerFile="${BUILD_CONFIG[WORKSPACE_DIR]}/${BUILD_CONFIG[TARGET_DIR]}/metadata/scmref.txt"
if [ -r "${loongsonVerFile}" ]; then
if [ "${BUILD_CONFIG[OPENJDK_CORE_VERSION]}" == "${JDK8_CORE_VERSION}" ]; then
local updateNum="$(cut -d'.' -f 2 <"${loongsonVerFile}")"
local buildNum="$(cut -d'.' -f 5 <"${loongsonVerFile}")"
version="jdk8u${updateNum}-b${buildNum}"
local updateNum="$(cat "$loongsonVerFile" | awk -F - '{print $1}' | awk -F u '{print $2}')"
local buildNum="$(cat "$loongsonVerFile" | awk -F - '{print $2}')"
version="jdk8u${updateNum}-${buildNum}"
else
echo "Only Java 8 is supported for now"
exit 1
fi
else
version=${BUILD_CONFIG[TAG]:-$(getFirstTagFromOpenJDKGitRepo)}
Expand Down Expand Up @@ -319,7 +320,7 @@ configureVersionStringParameter() {
BUILD_CONFIG[VENDOR_VM_BUG_URL]="https://gitee.com/openeuler/bishengjdk-${BUILD_CONFIG[OPENJDK_FEATURE_NUMBER]}/issues"
elif [[ "${BUILD_CONFIG[BUILD_VARIANT]}" == "${BUILD_VARIANT_LOONGSON}" ]]; then
BUILD_CONFIG[VENDOR]="Loongson"
BUILD_CONFIG[VENDOR_VERSION]="loongson"
BUILD_CONFIG[VENDOR_VERSION]="Loongson"
BUILD_CONFIG[VENDOR_BUG_URL]="https://github.com/loongson/jdk8u/issues"
BUILD_CONFIG[VENDOR_VM_BUG_URL]="https://github.com/loongson/jdk8u/issues"
fi
Expand Down Expand Up @@ -1399,7 +1400,7 @@ getFirstTagFromOpenJDKGitRepo() {
fi

if [ "${BUILD_CONFIG[BUILD_VARIANT]}" == "${BUILD_VARIANT_LOONGSON}" ]; then
TAG_SEARCH="ls-loongson-jdk8u-init"
TAG_SEARCH="jdk8u*ls-*"
fi

# If openj9 and the closed/openjdk-tag.gmk file exists which specifies what level the openj9 jdk code is based upon,
Expand Down

0 comments on commit 476f3c4

Please sign in to comment.