Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/gigabyte-ampere-cuttlefish-installer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,10 @@ jobs:
sshpass -p cuttlefish ssh -o "StrictHostKeyChecking no" -o "UserKnownHostsFile /dev/null" -p 33322 vsoc-01@localhost 'ulimit -a'
test $(sshpass -p cuttlefish ssh -o "StrictHostKeyChecking no" -o "UserKnownHostsFile /dev/null" -p 33322 vsoc-01@localhost 'ulimit -n') -ge 2048
sshpass -p cuttlefish ssh -o "StrictHostKeyChecking no" -o "UserKnownHostsFile /dev/null" -p 33322 vsoc-01@localhost 'update-alternatives --display iptables' | grep "link currently points to /usr/sbin/iptables-legacy"
- name: Test Java version
run: |
sshpass -p cuttlefish ssh -o "StrictHostKeyChecking no" -o "UserKnownHostsFile /dev/null" -p 33322 vsoc-01@localhost 'java --version'
sshpass -p cuttlefish ssh -o "StrictHostKeyChecking no" -o "UserKnownHostsFile /dev/null" -p 33322 vsoc-01@localhost 'java --version' | grep 21.0
- name: Shutdown qemu
run: |
sshpass -p cuttlefish ssh -o "StrictHostKeyChecking no" -o "UserKnownHostsFile /dev/null" -p 33322 vsoc-01@localhost 'echo cuttlefish | sudo -S -k shutdown -h 1'
Expand Down
31 changes: 31 additions & 0 deletions gigabyte-ampere-cuttlefish-installer/preseed/after_install_1.sh
Original file line number Diff line number Diff line change
Expand Up @@ -133,3 +133,34 @@ docker pull ${ORCHESTRATION_IMAGE}:${ORCHESTRATION_TAG}
kill $DOCKER_PID
wait $DOCKER_PID
umount /sys/fs/cgroup

# Install JDK.
#
# JDK it's not required to launch a CF device. It's required to run
# some of Tradefed tests that are run from the CF host side like
# some CF gfx tests, adb tests, etc.
DEBARCH=$(dpkg-architecture -qDEB_BUILD_ARCH)

if [[ "${DEBARCH}" == "amd64" ]]; then
JDK_ARCH=x64
# https://download.java.net/java/GA/jdk21.0.2/f2283984656d49d69e91c558476027ac/13/GPL/openjdk-21.0.2_linux-x64_bin.tar.gz.sha256
export JDK21_SHA256SUM=a2def047a73941e01a73739f92755f86b895811afb1f91243db214cff5bdac3f
elif [[ "${DEBARCH}" == "arm64" ]]; then
JDK_ARCH=aarch64
# https://download.java.net/java/GA/jdk21.0.2/f2283984656d49d69e91c558476027ac/13/GPL/openjdk-21.0.2_linux-aarch64_bin.tar.gz.sha256
export JDK21_SHA256SUM=08db1392a48d4eb5ea5315cf8f18b89dbaf36cda663ba882cf03c704c9257ec2
else
echo "** ERROR: UNEXEPCTED ARCH **"; exit 1;
fi
mkdir -p /tmp/java
wget -P /tmp/java "https://download.java.net/java/GA/jdk21.0.2/f2283984656d49d69e91c558476027ac/13/GPL/openjdk-21.0.2_linux-${JDK_ARCH}_bin.tar.gz"
if ! echo "$JDK21_SHA256SUM /tmp/java/openjdk-21.0.2_linux-${JDK_ARCH}_bin.tar.gz" | sudo chroot /mnt/image /usr/bin/sha256sum -c ; then
echo "** ERROR: KEY MISMATCH **"; popd >/dev/null; exit 1;
fi
tar xvzf "/tmp/java/openjdk-21.0.2_linux-${JDK_ARCH}_bin.tar.gz" -C /usr/java
rm "/tmp/java/openjdk-21.0.2_linux-${JDK_ARCH}_bin.tar.gz"
ENV_JAVA_HOME='/usr/java/jdk-21.0.2'
echo "JAVA_HOME=$ENV_JAVA_HOME" | tee -a /etc/environment >/dev/null
echo "JAVA_HOME=$ENV_JAVA_HOME" | tee -a /etc/profile >/dev/null
echo 'PATH=$JAVA_HOME/bin:$PATH' | tee -a /etc/profile >/dev/null
echo "PATH=$ENV_JAVA_HOME/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games" | tee -a /etc/environment >/dev/null
Loading