diff --git a/build.sh b/build.sh index 654fb2f..5649583 100755 --- a/build.sh +++ b/build.sh @@ -17,6 +17,7 @@ export STAGE export STAGE_DIR export STAGE_WORK_DIR export ROOTFS_DIR +export BOOTFS_DIR export IMG_FILE export ZIP_FILE @@ -67,6 +68,7 @@ main() { STAGE_DIR="$BASE_DIR/$STAGE" STAGE_WORK_DIR="$WORK_DIR/$STAGE" ROOTFS_DIR="$STAGE_WORK_DIR/rootfs" + BOOTFS_DIR="$ROOTFS_DIR/boot" IMG_FILE="$STAGE_WORK_DIR/$IMG_DATE-${IMG_NAME}.img" ZIP_FILE="$DEPLOY_DIR/image_$IMG_DATE-${IMG_NAME}.zip" @@ -74,7 +76,7 @@ main() { mkdir -p "$WORK_DIR" mkdir -p "$DEPLOY_DIR" mkdir -p "$ROOTFS_DIR" - mkdir -p "$ROOTFS_DIR/boot" + mkdir -p "$BOOTFS_DIR" pushd "$STAGE_DIR" > /dev/null diff --git a/stage0/04-boot-files/00-run.sh b/stage0/04-boot-files/00-run.sh index 2c976a8..42d1a89 100755 --- a/stage0/04-boot-files/00-run.sh +++ b/stage0/04-boot-files/00-run.sh @@ -1,4 +1,4 @@ #!/bin/bash -e -install -m 644 files/cmdline.txt ${ROOTFS_DIR}/boot/ -install -m 644 files/config.txt ${ROOTFS_DIR}/boot/ +install -m 644 files/cmdline.txt ${BOOTFS_DIR} +install -m 644 files/config.txt ${BOOTFS_DIR} diff --git a/stage0/13-image/00-run.sh b/stage0/13-image/00-run.sh index 5420586..47f9d48 100755 --- a/stage0/13-image/00-run.sh +++ b/stage0/13-image/00-run.sh @@ -4,7 +4,7 @@ unmount_image "$IMG_FILE" rm -f "$IMG_FILE" -BOOT_SIZE=$(du --apparent-size -s "$ROOTFS_DIR/boot" --block-size=1 | cut -f 1) +BOOT_SIZE=$(du --apparent-size -s "$BOOTFS_DIR" --block-size=1 | cut -f 1) TOTAL_SIZE=$(du --apparent-size -s "$ROOTFS_DIR" --exclude var/cache/apt/archives --block-size=1 | cut -f 1) IMG_SIZE=$((BOOT_SIZE + TOTAL_SIZE + (800 * 1024 * 1024))) @@ -51,4 +51,4 @@ mkdosfs -n boot -F 32 -v $BOOT_DEV > /dev/null mkfs.ext4 -O ^huge_file $ROOT_DEV > /dev/null mount -v $ROOT_DEV "$ROOTFS_DIR" -t ext4 -mount -v $BOOT_DEV "$ROOTFS_DIR/boot" -t vfat +mount -v $BOOT_DEV "$BOOTFS_DIR" -t vfat diff --git a/stage0/17-set-partuuid/00-run.sh b/stage0/17-set-partuuid/00-run.sh index 9a0e7b5..5a39202 100755 --- a/stage0/17-set-partuuid/00-run.sh +++ b/stage0/17-set-partuuid/00-run.sh @@ -8,4 +8,4 @@ ROOT_PARTUUID="${IMGID}-02" sed -i "s/BOOTDEV/PARTUUID=${BOOT_PARTUUID}/" ${ROOTFS_DIR}/etc/fstab sed -i "s/ROOTDEV/PARTUUID=${ROOT_PARTUUID}/" ${ROOTFS_DIR}/etc/fstab -sed -i "s/ROOTDEV/PARTUUID=${ROOT_PARTUUID}/" ${ROOTFS_DIR}/boot/cmdline.txt +sed -i "s/ROOTDEV/PARTUUID=${ROOT_PARTUUID}/" ${BOOTFS_DIR}/cmdline.txt