Compare commits
No commits in common. "5288b3da772dd51787d7bbce85f70c483cdd1fe2" and "1f26de8fc1e2cc95dbbfcb1050d7d2117dc96754" have entirely different histories.
5288b3da77
...
1f26de8fc1
|
@ -179,29 +179,6 @@ RUN <<-EOF
|
||||||
iso/
|
iso/
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
# Need sfdisk from util-linux
|
|
||||||
COPY --from=util-linux . .
|
|
||||||
RUN <<-EOF
|
|
||||||
set -eux
|
|
||||||
# Increase the size of the ISO by X MB to create space for the third partition
|
|
||||||
dd if=/dev/zero bs=1M count=51 >> airgap.iso
|
|
||||||
|
|
||||||
# Append a new partition that uses the additional space
|
|
||||||
echo ", +" | sfdisk --append airgap.iso
|
|
||||||
|
|
||||||
# Set the newly added third partition to FAT32
|
|
||||||
sfdisk --part-type airgap.iso 3 b
|
|
||||||
|
|
||||||
# Calculate the byte offset of the third partition
|
|
||||||
# This is done by finding the end of the first partition using fdisk, adding 1 sector,
|
|
||||||
# and multiplying by 512 (since each sector is 512 bytes).
|
|
||||||
OFFSET=$(fdisk -l airgap.iso | awk '/^airgap.iso1/ {print ($4 + 1) * 512}')
|
|
||||||
echo "Calculated OFFSET: $OFFSET"
|
|
||||||
|
|
||||||
# Format the third partition as FAT32 and label it 'USER'
|
|
||||||
mformat -v USER -i airgap.iso@@$OFFSET ::
|
|
||||||
EOF
|
|
||||||
|
|
||||||
## Minimal Autorun SD card image
|
## Minimal Autorun SD card image
|
||||||
COPY sdcard sdcard
|
COPY sdcard sdcard
|
||||||
RUN <<-EOF
|
RUN <<-EOF
|
||||||
|
|
8
Makefile
8
Makefile
|
@ -55,9 +55,7 @@ vm-bios: out/airgap.iso
|
||||||
-usbdevice tablet \
|
-usbdevice tablet \
|
||||||
-drive id=external,if=none,format=raw,file=out/sdcard.img \
|
-drive id=external,if=none,format=raw,file=out/sdcard.img \
|
||||||
-display gtk,show-menubar=off,zoom-to-fit=on \
|
-display gtk,show-menubar=off,zoom-to-fit=on \
|
||||||
-device usb-storage,drive=usbdrive \
|
-cdrom "out/airgap.iso"
|
||||||
-drive id=usbdrive,if=none,format=raw,file=out/airgap.iso \
|
|
||||||
-boot order=c
|
|
||||||
|
|
||||||
.PHONY: vm-efi
|
.PHONY: vm-efi
|
||||||
vm-efi: out/airgap.iso
|
vm-efi: out/airgap.iso
|
||||||
|
@ -72,9 +70,7 @@ vm-efi: out/airgap.iso
|
||||||
-usbdevice tablet \
|
-usbdevice tablet \
|
||||||
-drive id=external,if=none,format=raw,file=out/sdcard.img \
|
-drive id=external,if=none,format=raw,file=out/sdcard.img \
|
||||||
-display gtk,show-menubar=off,zoom-to-fit=on \
|
-display gtk,show-menubar=off,zoom-to-fit=on \
|
||||||
-device usb-storage,drive=usbdrive \
|
-cdrom "out/airgap.iso"
|
||||||
-drive id=usbdrive,if=none,format=raw,file=airgap.iso \
|
|
||||||
-boot order=c
|
|
||||||
|
|
||||||
## Signing, Verification, and Release Targets
|
## Signing, Verification, and Release Targets
|
||||||
|
|
||||||
|
|
|
@ -4,16 +4,7 @@ source /etc/profile
|
||||||
|
|
||||||
folder=${1?}
|
folder=${1?}
|
||||||
|
|
||||||
echo "Checking autorun in folder: ${folder}" >/dev/console
|
if [ -f "${folder}/autorun.sh.asc" ]; then
|
||||||
|
|
||||||
# Check if the folder is /media/USER and has autorun.sh
|
|
||||||
if [ "$folder" == "/media/USER" ] && [ -f "${folder}/autorun.sh" ]; then
|
|
||||||
echo "" >/dev/console
|
|
||||||
echo "++ Autorun: Found /media/USER/autorun.sh in a read-only directory" >/dev/console;
|
|
||||||
echo "** Autorun: Executing /media/USER/autorun.sh" >/dev/console
|
|
||||||
/bin/bash "/media/USER/autorun.sh" >/dev/console
|
|
||||||
|
|
||||||
elif [ -f "${folder}/autorun.sh.asc" ]; then
|
|
||||||
echo "" >/dev/console
|
echo "" >/dev/console
|
||||||
echo "++ Autorun: Found ${folder}/autorun.sh" >/dev/console;
|
echo "++ Autorun: Found ${folder}/autorun.sh" >/dev/console;
|
||||||
gpg --verify "${folder}/autorun.sh.asc" >/dev/null 2>&1 || {
|
gpg --verify "${folder}/autorun.sh.asc" >/dev/null 2>&1 || {
|
||||||
|
|
Loading…
Reference in New Issue