Skip to content

Commit

Permalink
Fix chroot_correct_qemu execution
Browse files Browse the repository at this point in the history
  • Loading branch information
guysoft committed Feb 4, 2025
1 parent 45d797f commit 15370fe
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 2 additions & 0 deletions src/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -599,6 +599,8 @@ function load_module_config() {
function chroot_correct_qemu() {
local host_arch="$1"
local target_arch="$2"
local chroot_script="$3"
local custom_pi_os_path="$4"

# Validate inputs
if [[ -z "$host_arch" ]] || [[ -z "$target_arch" ]]; then
Expand Down
7 changes: 4 additions & 3 deletions src/custompios
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ set -e

export LC_ALL=C

source ${CUSTOM_PI_OS_PATH}/common.sh
source "${CUSTOM_PI_OS_PATH}"/common.sh

echo_green -e "\nBUILD STARTED @ $(date)!\n"

Expand Down Expand Up @@ -51,7 +51,6 @@ function execute_chroot_script() {
chmod 755 chroot_script
cp "${CUSTOM_PI_OS_PATH}"/common.sh common.sh
chmod 755 common.sh

chroot_correct_qemu "$(uname -m)" "$BASE_ARCH" "$2" "${CUSTOM_PI_OS_PATH}"

# Handle exported items
Expand Down Expand Up @@ -100,7 +99,7 @@ install_cleanup_trap
install_fail_on_error_trap
unmount_image $BASE_MOUNT_PATH force || true

pushd $BASE_WORKSPACE
pushd "${BASE_WORKSPACE}"
if [ -e *.img ]; then
rm *.img
fi
Expand Down Expand Up @@ -179,6 +178,8 @@ pushd $BASE_WORKSPACE
echo "No remote and submodules config detected"
fi
echo $ARMBIAN_CONFIG_TXT_FILE
# if you need anything from common running in execute_chroot_script, export it here
export -f chroot_correct_qemu
export -f execute_chroot_script
bash -x "${CHROOT_SCRIPT}"

Expand Down

0 comments on commit 15370fe

Please sign in to comment.