Skip to content

Commit

Permalink
refactor: format/install script minor tweaks
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Stewart <[email protected]>
  • Loading branch information
paralin committed Sep 15, 2023
1 parent 5188b02 commit 08a365d
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
5 changes: 4 additions & 1 deletion configs/bananapi/common/scripts/format_sd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ if [ ! -b "$PI_SD" ]; then
fi

resources_path="${SKIFF_CURRENT_CONF_DIR}/resources"
ubootimg="$BUILDROOT_DIR/images/u-boot-sunxi-with-spl.bin"
ubootimg="${BUILDROOT_DIR}/images/u-boot-sunxi-with-spl.bin"

if [ ! -f "$ubootimg" ]; then
echo "can't find u-boot image at $ubootimg"
Expand Down Expand Up @@ -86,4 +86,7 @@ sudo $MKEXT4 -L "persist" ${PI_SD_SFX}2
echo "Flashing u-boot..."
sudo dd if=$ubootimg of=${PI_SD} conv=fsync bs=1024 seek=8

sleep 1
sudo partprobe ${PI_SD} || true

echo "Done!"
2 changes: 1 addition & 1 deletion configs/bananapi/common/scripts/install_sd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ if [ -b ${PI_SD}p1 ]; then
PI_SD_SFX=${PI_SD}p
fi

outp_path="${BUILDROOT_DIR}/output"
outp_path="${BUILDROOT_DIR}"
images_path="${outp_path}/images"
uimg_path="${images_path}/zImage"
squashfs_path="${images_path}/rootfs.squashfs"
Expand Down
2 changes: 1 addition & 1 deletion configs/orangepi/common/scripts/format_sd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ if [ ! -b "$PI_SD" ]; then
fi

resources_path="${SKIFF_CURRENT_CONF_DIR}/resources"
ubootimg="$BUILDROOT_DIR/output/images/u-boot-sunxi-with-spl.bin"
ubootimg="${BUILDROOT_DIR}/images/u-boot-sunxi-with-spl.bin"

if [ ! -f "$ubootimg" ]; then
echo "can't find u-boot image at $ubootimg"
Expand Down
3 changes: 1 addition & 2 deletions configs/pi/common/scripts/format_sd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ if [ -z "$SKIFF_NO_INTERACTIVE" ]; then
fi
fi

set -x
set -e
set -xe

echo "Zeroing out partition table..."
sudo dd if=/dev/zero of=${PI_SD} conv=fsync bs=1024 count=4900
Expand Down

0 comments on commit 08a365d

Please sign in to comment.