From 32c39ff7e15e173fb936462269e20411dce88a2a Mon Sep 17 00:00:00 2001 From: r00t Date: Thu, 21 May 2015 02:47:36 -0400 Subject: [PATCH] finalized split-iso. working --- lib/07-will_it_blend.func.sh | 1 + lib/08-stuffy.func.sh | 10 ++++++++-- lib/mk.chroot.sh | 4 ++-- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/lib/07-will_it_blend.func.sh b/lib/07-will_it_blend.func.sh index 1cc30e6..bc6458f 100644 --- a/lib/07-will_it_blend.func.sh +++ b/lib/07-will_it_blend.func.sh @@ -43,6 +43,7 @@ function will_it_blend () { local BUILDDIR="${BUILDDIR}${ARCHSUFFIX}" # now let's build the squashed image... and generate some checksums as well to verify download integrity. + rm -rf ${ARCHBOOT} mkdir -p ${ARCHBOOT}/${AIROOT} if [ ! -f "${ARCHBOOT}/${AIROOT}/airootfs.sfs" ] || [ "${CHROOTDIR}/root/.bash_history" -nt "${ARCHBOOT}/${AIROOT}/airootfs.sfs" ]; diff --git a/lib/08-stuffy.func.sh b/lib/08-stuffy.func.sh index 875376a..19c8fe6 100644 --- a/lib/08-stuffy.func.sh +++ b/lib/08-stuffy.func.sh @@ -59,8 +59,14 @@ EOF # create the embedded efiboot FAT stuff # how big should we make the disk? echo "Generating the EFI embedded FAT filesystem..." + rm -f ${TEMPDIR}/EFI/${DISTNAME}/efiboot.img FTSIZE=$(du -sc ${TEMPDIR}/{boot,EFI,loader} | tail -n1 | awk '{print $1}') - FATSIZE=$((${FTSIZE} + 64)) # let's give a little wiggle room + FATSIZE=$((${FTSIZE} + $(stat --format="%s" ${BASEDIR}/root.x86_64/usr/lib/prebootloader/PreLoader.efi ))) # now we need to calculate the space for various files we're going to include... + FATSIZE=$((${FTSIZE} + $(stat --format="%s" ${BASEDIR}/root.x86_64/usr/lib/prebootloader/HashTool.efi))) # now we need to calculate the space for various files we're going to include... + FATSIZE=$((${FTSIZE} + $(stat --format="%s" ${BASEDIR}/root.x86_64/usr/lib/gummiboot/gummibootx64.efi))) # now we need to calculate the space for various files we're going to include... + FATSIZE=$((${FTSIZE} + $(stat --format="%s" ${TEMPDIR}/EFI/shellx64_v1.efi))) # now we need to calculate the space for various files we're going to include... + FATSIZE=$((${FTSIZE} + $(stat --format="%s" ${TEMPDIR}/EFI/shellx64_v2.efi))) # now we need to calculate the space for various files we're going to include... + FATSIZE=$((${FATSIZE} + 64)) # let's give a little wiggle room ${RACECAR_CHK}truncate -s "${FATSIZE}"K ${TEMPDIR}/EFI/${DISTNAME}/efiboot.img ${RACECAR_CHK}mkfs.vfat -F 32 -n ${DISTNAME}_EFI ${TEMPDIR}/EFI/${DISTNAME}/efiboot.img >> "${LOGFILE}.${FUNCNAME}" 2>&1 #${RACECAR_CHK}mkfs.vfat -F32 -s2 -n ${DISTNAME}_EFI ${TEMPDIR}/EFI/${DISTNAME}/efiboot.img >> "${LOGFILE}.${FUNCNAME}" 2>&1 @@ -99,7 +105,7 @@ EOF cp ${BASEDIR}/root.x86_64/usr/lib/prebootloader/PreLoader.efi ${SRCDIR}/efiboot/EFI/boot/bootx64.efi cp ${BASEDIR}/root.x86_64/usr/lib/prebootloader/HashTool.efi ${SRCDIR}/efiboot/EFI/boot/. cp ${BASEDIR}/root.x86_64/usr/lib/gummiboot/gummibootx64.efi ${SRCDIR}/efiboot/EFI/boot/loader.efi # TODO: can i use syslinux.efi instead? - cp ${TEMPDIR}/EFI/shellx64_v* ${SRCDIR}/efiboot/EFI/. + cp ${TEMPDIR}/EFI/shellx64_v{1,2}.efi ${SRCDIR}/efiboot/EFI/. umount ${SRCDIR}/efiboot echo "EFI configuration complete..." diff --git a/lib/mk.chroot.sh b/lib/mk.chroot.sh index 5ffa786..957b90d 100755 --- a/lib/mk.chroot.sh +++ b/lib/mk.chroot.sh @@ -94,10 +94,10 @@ function mkchroot { echo "Local: ${LOCSUM64}" echo "Remote: ${CKSUM64}" echo "Fetching fresh copy." - curl -o latest.64.tar.gz "${RLSDIR}/${CURRLS64}" >> "${LOGFILE}.${FUNCNAME}" 2>&1 + curl -o latest.64.tar.gz "${RLSDIR}/${CURRLS64}" fi else - curl -o latest.64.tar.gz "${RLSDIR}/${CURRLS64}" >> "${LOGFILE}.${FUNCNAME}" 2>&1 + curl -o latest.64.tar.gz "${RLSDIR}/${CURRLS64}" fi if [ -f "latest.32.tar.gz" ];