Skip to content

Commit

Permalink
intel/desktop: improve push_image.bash detection
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Stewart <christian@aperture.us>
  • Loading branch information
paralin committed Nov 23, 2023
1 parent 38b1952 commit 19534ee
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
7 changes: 5 additions & 2 deletions scripts/push_image.bash
Expand Up @@ -29,6 +29,11 @@ if [ ! -d $WS ]; then
exit 1
fi

if [ -d ${WS}/efi-part/EFI/refind ] && [ -d ${WS}/intel ]; then
echo "Detected intel/desktop system, using push_intel_desktop.bash instead..."
exec ${SKIFF_ROOT}/scripts/push_intel_desktop.bash ${@}
fi

echo "Ensuring mountpoints..."
ssh $SSHSTR 'bash -s' <<'EOF'
set -xeo pipefail
Expand Down Expand Up @@ -121,5 +126,3 @@ sync && sync
EOF

echo "Done."


9 changes: 9 additions & 0 deletions scripts/push_intel_desktop.bash
Expand Up @@ -22,13 +22,19 @@ WORKSPACE_DIR=${SKIFF_ROOT}/workspaces/${SKIFF_WORKSPACE}
IMAGES_DIR=${WORKSPACE_DIR}/images
UIMG_PATH=${IMAGES_DIR}/bzImage
SQUASHFS_PATH="${IMAGES_DIR}/rootfs.squashfs"
SKIFF_INIT_PATH="${IMAGES_DIR}/skiff-init"

skiff_release_path="${IMAGES_DIR}/skiff-release"
if [ ! -f "$skiff_release_path" ]; then
echo "skiff-release not found, make sure Buildroot is done compiling."
exit 1
fi

if [ ! -f "${SKIFF_INIT_PATH}/skiff-init-squashfs" ]; then
echo "skiff-init-squashfs not found, make sure Buildroot is done compiling."
exit 1
fi

skiff_release=$(cat $skiff_release_path | grep "VERSION=" | cut -d= -f2)
# add -1 to the end of the release to avoid refind problems
skiff_release="${skiff_release}-1"
Expand All @@ -39,3 +45,6 @@ ${RS} $SQUASHFS_PATH ${TARGET}/${squashfs_filename}

echo "Copying kernel..."
${RS} $UIMG_PATH ${TARGET}/$(basename $UIMG_PATH)-skiffos-${skiff_release}

echo "Copying skiff-init..."
${RS} ${SKIFF_INIT_PATH}/ ${TARGET}/skiff-init/

0 comments on commit 19534ee

Please sign in to comment.