fixing split arch
This commit is contained in:
parent
32c39ff7e1
commit
71a2e1ad88
1
.gitignore
vendored
1
.gitignore
vendored
@ -23,3 +23,4 @@
|
|||||||
/screenlog*
|
/screenlog*
|
||||||
/logs
|
/logs
|
||||||
*.swp
|
*.swp
|
||||||
|
*.lck
|
||||||
|
@ -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.
|
||||||
rm -rf ${ARCHBOOT}
|
# are we building split-arch ISOs?
|
||||||
|
if [[ "${MULTIARCH}" == "n" ]];
|
||||||
|
then
|
||||||
|
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" ];
|
||||||
|
@ -59,24 +59,30 @@ 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..."
|
||||||
rm -f ${TEMPDIR}/EFI/${DISTNAME}/efiboot.img
|
# are we building split-arch ISOs?
|
||||||
FTSIZE=$(du -sc ${TEMPDIR}/{boot,EFI,loader} | tail -n1 | awk '{print $1}')
|
if [[ "${MULTIARCH}" == "n" ]];
|
||||||
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...
|
then
|
||||||
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...
|
rm -f ${TEMPDIR}/EFI/${DISTNAME}/efiboot.img
|
||||||
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...
|
fi
|
||||||
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...
|
# 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=$(stat --format="%s" ${TEMPDIR}/boot/${UXNAME}.64.kern) # EFI/BDISK/bdisk.efi
|
||||||
FATSIZE=$((${FATSIZE} + 64)) # let's give a little wiggle room
|
FATSIZE=$((${FATSIZE} + $(stat --format="%s" ${TEMPDIR}/boot/${UXNAME}.64.img))) # EFI/BDISK/bdisk.img
|
||||||
${RACECAR_CHK}truncate -s "${FATSIZE}"K ${TEMPDIR}/EFI/${DISTNAME}/efiboot.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 -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}
|
||||||
cp ${TEMPDIR}/boot/${UXNAME}.64.kern ${SRCDIR}/efiboot/EFI/${DISTNAME}/${UXNAME}.efi
|
cp ${TEMPDIR}/boot/${UXNAME}.64.kern ${SRCDIR}/efiboot/EFI/${DISTNAME}/${UXNAME}.efi
|
||||||
cp ${TEMPDIR}/boot/${UXNAME}.64.img ${SRCDIR}/efiboot/EFI/${DISTNAME}/${UXNAME}.img
|
cp ${TEMPDIR}/boot/${UXNAME}.64.img ${SRCDIR}/efiboot/EFI/${DISTNAME}/${UXNAME}.img
|
||||||
mkdir -p ${SRCDIR}/efiboot/{EFI/boot,loader/entries}
|
mkdir -p ${SRCDIR}/efiboot/{EFI/boot,loader/entries}
|
||||||
# GETTING DEJA VU HERE.
|
# GETTING DEJA VU HERE.
|
||||||
cat > ${SRCDIR}/efiboot/loader/loader.conf << EOF
|
cat > ${SRCDIR}/efiboot/loader/loader.conf << EOF
|
||||||
timeout 3
|
timeout 3
|
||||||
default ${UXNAME}
|
default ${UXNAME}
|
||||||
|
@ -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..."
|
||||||
|
Loading…
Reference in New Issue
Block a user