Files
uefi-video/README.md
mincomk 1e037c529a
Some checks failed
Lint / lint (push) Failing after 5m11s
docs: update README
2025-06-02 17:19:21 +09:00

96 lines
2.2 KiB
Markdown

![header](https://capsule-render.vercel.app/api?type=waving&height=300&color=gradient&text=UEFI%20Video&section=header)
## Badges
[![MIT License](https://img.shields.io/badge/License-MIT-green.svg)](https://choosealicense.com/licenses/mit/)
![Build](https://git.walruslab.org/mincomk/uefi-video/actions/workflows/build.yaml/badge.svg)
## Features
- PNG/GIF Decoder
- Render still image
- Embed framed video to binary
## Roadmap
- Filesystem input support
- Encryption
## Screenshots
![App Screenshot](.docs/assets/screenshot1.png)
## Build/Run
### Prerequisites
- QEMU x86_64 emulator
- `OVMF.fd`
Clone the project
```bash
git clone https://git.walruslab.org/mincomk/uefi-video.git
```
Go to the project directory
```bash
cd uefi-video
```
Modify config as you want: [Configuration](#Configuration)
And build
```bash
cargo build
```
Or run directly with QEMU
```bash
cargo run
```
## Making IMG
`.img` generation is intended to use from Linux. Contribution is welcome to support docs of other OS.
```bash
dd if=/dev/zero of=boot.img bs=1M count=512 status=progress
mkfs.fat -F 32 boot.img
sudo mount boot.img mnt --mkdir
mkdir -p mnt/EFI/BOOT
# Change uefi-video.efi to the desired file.
# It's in releases if you download, and it's in target/x86_64-unknown-uefi/release if you build your own.
cp uefi-video.efi mnt/EFI/BOOT/bootx64.efi
sudo umount mnt
rmdir mnt
# use boot.img as you want
```
## Configuration
You can configure the project with `config.rs`.
### Default Config
```rust
// src/config.rs
pub static DATA: &[u8] = include_bytes!("../assets/rainbow.png");
pub static MEDIA_TYPE: MediaType = MediaType::ImagePNG;
pub static SCALE: f32 = 1.0;
```
### Config Entries
| Name | Content | Notes |
| ------------ | ----------------------------------------------- | ----------------------------------- |
| `DATA` | `include_bytes!("ASSET_FILE")` | Path is relative to `src` directory |
| `MEDIA_TYPE` | `MediaType::ImagePNG` or `MedidaType::VideoGIF` | Should match content of `DATA` |
| `SCALE` | A scale factor | `1.0` is an original size |