fixing split arch
This commit is contained in:
parent
32c39ff7e1
commit
71a2e1ad88
1
.gitignore
vendored
1
.gitignore
vendored
@ -23,3 +23,4 @@
|
||||
/screenlog*
|
||||
/logs
|
||||
*.swp
|
||||
*.lck
|
||||
|
@ -43,7 +43,11 @@ 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.
|
||||
# are we building split-arch ISOs?
|
||||
if [[ "${MULTIARCH}" == "n" ]];
|
||||
then
|
||||
rm -rf ${ARCHBOOT}
|
||||
fi
|
||||
mkdir -p ${ARCHBOOT}/${AIROOT}
|
||||
|
||||
if [ ! -f "${ARCHBOOT}/${AIROOT}/airootfs.sfs" ] || [ "${CHROOTDIR}/root/.bash_history" -nt "${ARCHBOOT}/${AIROOT}/airootfs.sfs" ];
|
||||
|
@ -59,17 +59,23 @@ EOF
|
||||
# create the embedded efiboot FAT stuff
|
||||
# how big should we make the disk?
|
||||
echo "Generating the EFI embedded FAT filesystem..."
|
||||
# are we building split-arch ISOs?
|
||||
if [[ "${MULTIARCH}" == "n" ]];
|
||||
then
|
||||
rm -f ${TEMPDIR}/EFI/${DISTNAME}/efiboot.img
|
||||
FTSIZE=$(du -sc ${TEMPDIR}/{boot,EFI,loader} | tail -n1 | awk '{print $1}')
|
||||
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
|
||||
fi
|
||||
# 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=$((${FATSIZE} + $(stat --format="%s" ${TEMPDIR}/boot/${UXNAME}.64.img))) # EFI/BDISK/bdisk.img
|
||||
FATSIZE=$((${FATSIZE} + $(stat --format="%s" ${BASEDIR}/root.x86_64/usr/lib/prebootloader/PreLoader.efi))) # EFI/boot/bootx64.efi
|
||||
FATSIZE=$((${FATSIZE} + $(stat --format="%s" ${BASEDIR}/root.x86_64/usr/lib/prebootloader/HashTool.efi))) # EFI/boot/HashTool.efi
|
||||
FATSIZE=$((${FATSIZE} + $(stat --format="%s" ${BASEDIR}/root.x86_64/usr/lib/gummiboot/gummibootx64.efi))) # EFI/boot/loader.efi
|
||||
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 -F32 -s2 -n ${DISTNAME}_EFI ${TEMPDIR}/EFI/${DISTNAME}/efiboot.img >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
||||
mkdir -p ${SRCDIR}/efiboot
|
||||
mount ${TEMPDIR}/EFI/${DISTNAME}/efiboot.img ${SRCDIR}/efiboot
|
||||
mkdir -p ${SRCDIR}/efiboot/EFI/${DISTNAME}
|
||||
|
@ -157,6 +157,8 @@ EOF
|
||||
# Disable NetworkManager. Fuck that shit.
|
||||
ln -s /dev/null ${i}/etc/systemd/system/NetworkManager.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
|
||||
echo "Prepping ${i}. This will take a while..."
|
||||
echo -n "...Key initializing..."
|
||||
|
Loading…
Reference in New Issue
Block a user