fixing split arch

This commit is contained in:
brent s. 2015-05-21 15:31:49 -04:00
parent 32c39ff7e1
commit 71a2e1ad88
4 changed files with 25 additions and 12 deletions

1
.gitignore vendored
View File

@ -23,3 +23,4 @@
/screenlog* /screenlog*
/logs /logs
*.swp *.swp
*.lck

View File

@ -43,7 +43,11 @@ function will_it_blend () {
local BUILDDIR="${BUILDDIR}${ARCHSUFFIX}" local BUILDDIR="${BUILDDIR}${ARCHSUFFIX}"


# now let's build the squashed image... and generate some checksums as well to verify download integrity. # now let's build the squashed image... and generate some checksums as well to verify download integrity.
# are we building split-arch ISOs?
if [[ "${MULTIARCH}" == "n" ]];
then
rm -rf ${ARCHBOOT} rm -rf ${ARCHBOOT}
fi
mkdir -p ${ARCHBOOT}/${AIROOT} mkdir -p ${ARCHBOOT}/${AIROOT}
if [ ! -f "${ARCHBOOT}/${AIROOT}/airootfs.sfs" ] || [ "${CHROOTDIR}/root/.bash_history" -nt "${ARCHBOOT}/${AIROOT}/airootfs.sfs" ]; if [ ! -f "${ARCHBOOT}/${AIROOT}/airootfs.sfs" ] || [ "${CHROOTDIR}/root/.bash_history" -nt "${ARCHBOOT}/${AIROOT}/airootfs.sfs" ];

View File

@ -59,17 +59,23 @@ EOF
# create the embedded efiboot FAT stuff # create the embedded efiboot FAT stuff
# how big should we make the disk? # how big should we make the disk?
echo "Generating the EFI embedded FAT filesystem..." echo "Generating the EFI embedded FAT filesystem..."
# are we building split-arch ISOs?
if [[ "${MULTIARCH}" == "n" ]];
then
rm -f ${TEMPDIR}/EFI/${DISTNAME}/efiboot.img rm -f ${TEMPDIR}/EFI/${DISTNAME}/efiboot.img
FTSIZE=$(du -sc ${TEMPDIR}/{boot,EFI,loader} | tail -n1 | awk '{print $1}') fi
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... # 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=$(stat --format="%s" ${TEMPDIR}/boot/${UXNAME}.64.kern) # EFI/BDISK/bdisk.efi
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=$((${FATSIZE} + $(stat --format="%s" ${TEMPDIR}/boot/${UXNAME}.64.img))) # EFI/BDISK/bdisk.img
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=$((${FATSIZE} + $(stat --format="%s" ${BASEDIR}/root.x86_64/usr/lib/prebootloader/PreLoader.efi))) # EFI/boot/bootx64.efi
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} + $(stat --format="%s" ${BASEDIR}/root.x86_64/usr/lib/prebootloader/HashTool.efi))) # EFI/boot/HashTool.efi
FATSIZE=$((${FATSIZE} + 64)) # let's give a little wiggle room FATSIZE=$((${FATSIZE} + $(stat --format="%s" ${BASEDIR}/root.x86_64/usr/lib/gummiboot/gummibootx64.efi))) # EFI/boot/loader.efi
${RACECAR_CHK}truncate -s "${FATSIZE}"K ${TEMPDIR}/EFI/${DISTNAME}/efiboot.img FATSIZE=$((${FATSIZE} + $(stat --format="%s" ${TEMPDIR}/EFI/shellx64_v1.efi)))
FATSIZE=$((${FATSIZE} + $(stat --format="%s" ${TEMPDIR}/EFI/shellx64_v2.efi)))
FATSIZE=$((${FATSIZE} + $(du -sb ${TEMPDIR}/loader | tail -n1 | awk '{print $1}'))) # loader/* (okay so i cheated a little here.)
FATSIZE=$((${FATSIZE} + 786432)) # let's give a little wiggle room; 768k should do it. -_-
${RACECAR_CHK}truncate -s "${FATSIZE}" ${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 -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
mkdir -p ${SRCDIR}/efiboot mkdir -p ${SRCDIR}/efiboot
mount ${TEMPDIR}/EFI/${DISTNAME}/efiboot.img ${SRCDIR}/efiboot mount ${TEMPDIR}/EFI/${DISTNAME}/efiboot.img ${SRCDIR}/efiboot
mkdir -p ${SRCDIR}/efiboot/EFI/${DISTNAME} mkdir -p ${SRCDIR}/efiboot/EFI/${DISTNAME}

View File

@ -157,6 +157,8 @@ EOF
# Disable NetworkManager. Fuck that shit. # Disable NetworkManager. Fuck that shit.
ln -s /dev/null ${i}/etc/systemd/system/NetworkManager.service ln -s /dev/null ${i}/etc/systemd/system/NetworkManager.service
ln -s /dev/null ${i}/etc/systemd/system/NetworkManager-dispatcher.service ln -s /dev/null ${i}/etc/systemd/system/NetworkManager-dispatcher.service
# Remove the machine-id file so it's automatically generated.
rm -f ${i}/etc/machine-id
# Prep pacman # Prep pacman
echo "Prepping ${i}. This will take a while..." echo "Prepping ${i}. This will take a while..."
echo -n "...Key initializing..." echo -n "...Key initializing..."