Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 13 additions & 11 deletions .github/workflows/iso.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,28 @@
os=$(uname -s)
case "$os" in
(Darwin)
true
echo -e "GET http://github.com HTTP/1.0\n\n" | nc github.com 80 > /dev/null 2>&1
if [ $? -eq 0 ]; then
true
else
echo "Please connect to the internet"
exit 1
fi
;;
(Linux)
true
if wget -q --spider --timeout=5 --tries=1 http://github.com >/dev/null 2>&1; then
true
else
echo "Please connect to the internet"
exit 1
fi
;;
(*)
echo "This script is meant to be run only on Linux or macOS"
exit 1
;;
esac

echo -e "GET http://github.com HTTP/1.0\n\n" | nc github.com 80 > /dev/null 2>&1

if [ $? -eq 0 ]; then
true
else
echo "Please connect to the internet"
exit 1
fi

set -e

cd $HOME/Downloads
Expand Down
2 changes: 2 additions & 0 deletions 02_build_image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ touch "${IMAGE_PATH}"/ubuntu
cp -r "${ROOT_PATH}"/files/preseed "${IMAGE_PATH}"/preseed
cp "${ROOT_PATH}/files/grub/grub.cfg" "${IMAGE_PATH}"/isolinux/grub.cfg

echo >&2 "===]> Info: Reset firmware flag for fresh boot... "
rm -f "${CHROOT_PATH}/etc/get_apple_firmware_attempted" || true

echo >&2 "===]> Info: Compress the chroot... "
cd "${WORKING_PATH}"
Expand Down
6 changes: 6 additions & 0 deletions files/chroot_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,12 @@ printf 'apple-bce' >>/etc/modules-load.d/t2.conf
#printf '\n# display f* key in touchbar\noptions apple-ib-tb fnmode=1\n' >> /etc/modprobe.d/apple-tb.conf
#printf '\n# delay loading of the touchbar driver\ninstall apple-ib-tb /bin/sleep 7; /sbin/modprobe --ignore-install apple-ib-tb' >> /etc/modprobe.d/delay-tb.conf

echo >&2 "===]> Info: Setup auto-fetch firmware service... "

curl -s https://raw.githubusercontent.com/t2linux/wiki/refs/heads/master/docs/tools/get-apple-firmware.service -o /etc/systemd/system/get-apple-firmware.service

systemctl enable get-apple-firmware.service

echo >&2 "===]> Info: Update initramfs... "

## Add custom drivers to be loaded at boot
Expand Down