From 7201d30bf21c116d8130b35aa1f387444a3ca830 Mon Sep 17 00:00:00 2001 From: Son Date: Wed, 7 Feb 2024 19:49:59 -0500 Subject: [PATCH] Add kernel page size checker for arm64 images --- scripts/start.sh | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/scripts/start.sh b/scripts/start.sh index 5b07f5421..87fb9f9a1 100644 --- a/scripts/start.sh +++ b/scripts/start.sh @@ -60,6 +60,18 @@ printf "\e[0;32m*****GENERATING CONFIGS*****\e[0m\n" cd /palworld || exit +# Get the architecture using dpkg +architecture=$(dpkg --print-architecture) + +# Get host kernel page size +kernel_page_size=$(getconf PAGESIZE) + +# Check kernel page size for arm64 hosts before running steamcmd +if [ "$architecture" == "arm64" ] && [ "$kernel_page_size" != "4096" ]; then + echo "Only ARM64 hosts with 4k page size is supported." + exit 1 +fi + if [ "${UPDATE_ON_BOOT,,}" = true ]; then printf "\e[0;32m%s\e[0m\n" "*****STARTING INSTALL/UPDATE*****" @@ -74,8 +86,6 @@ if [ "${UPDATE_ON_BOOT,,}" = true ]; then fi fi -# Get the architecture using dpkg -architecture=$(dpkg --print-architecture) # Check if the architecture is arm64 if [ "$architecture" == "arm64" ]; then # create an arm64 version of ./PalServer.sh