The bad apple video but bootable, powered by 🦀
Preview
bad-apple-efi.mp4
The CPU must support AVX2 and FMA, which means an Intel Haswell (2013), AMD Excavator (2015) or newer CPU. If you are unsure whether your CPU supports these features, try booting and an unsupported CPU would display an error.
The system must boot through UEFI, legacy BIOS is not supported.
The following guide assumes you have rustup and the base-devel installed.
The package names are specific to Arch Linux, but install commands can be modified to equivalents for
other distributions.
# Install prerequisites
sudo pacman -S qemu-base qemu-ui-gtk ovmf clang llvm lld nasm ffmpeg
# Clone the repository
git clone --recurse-submodules https://github.com/CompeyDev/bad-apple-efi.git
cd bad-apple-efi
# Provide the video (see video section)
cp /path/to/bad_apple.webm bin/
# Build and run in QEMU
cargo xtask qemu-run| Key | Action |
|---|---|
| Space, Play | Play or Pause |
| Up Down, Vol+ Vol- | Change the volume |
| M, Mute | Mute or Unmute |
| Esc, Stop | Shut down |
Audio is played through the first HD Audio controller with an analog output, such as speakers or a headphone jack. Digital outputs like HDMI are not supported. Only PS/2 keyboards are supported, which includes most built-in laptop keyboards.
You must supply the video as an MP4 or WEBM file in the bin/ directory. Any codec
is accepted, ffmpeg is used to convert it to a compatible VP9 stream at build time.
The final VP9 stream is cached across builds, so the encoding process only runs once.
By default, the video is shaded in "two tone" mode for a more retro look. Full color
from the original display can be displayed by enabling the high_res build during
the build.
Arguments after an xtask's name are passed to cargo, and for qemu-run, arguments
after -- are passed to QEMU:
cargo xtask qemu-run --features high_res # full colour
cargo xtask qemu-run -- -display none # run headlessSoon.