This commit is contained in:
BIN
.docs/assets/screenshot1.png
Normal file
BIN
.docs/assets/screenshot1.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 334 KiB |
24
.gitea/workflows/build.yaml
Normal file
24
.gitea/workflows/build.yaml
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
name: Build
|
||||||
|
run-name: ${{ gitea.actor }} is building
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- "*"
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
lint:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Check out repository code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
- name: Rust
|
||||||
|
uses: actions-rust-lang/setup-rust-toolchain@v1
|
||||||
|
with:
|
||||||
|
targets: x86_64-unknown-uefi
|
||||||
|
- name: Build
|
||||||
|
run: cargo build --release
|
||||||
|
- name: Release
|
||||||
|
uses: akkuman/gitea-release-action@v1
|
||||||
|
with:
|
||||||
|
files: |-
|
||||||
|
target/x86_64-unknown-uefi/release/uefi-video.efi
|
||||||
101
README.md
101
README.md
@@ -1,20 +1,95 @@
|
|||||||
# UEFI-Video
|

|
||||||
Media renderer embedded in UEFI boot environment
|
|
||||||
|
## Badges
|
||||||
|
|
||||||
|
[](https://choosealicense.com/licenses/mit/)
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
- Render GIF
|
|
||||||
- Render PNG
|
|
||||||
|
|
||||||
## Requirements
|
- PNG/GIF Decoder
|
||||||
- Rust toolchain
|
- Render still image
|
||||||
- Appropriate rust target
|
- Embed framed video to binary
|
||||||
|
|
||||||
|
## Roadmap
|
||||||
|
|
||||||
|
- Filesystem input support
|
||||||
|
- Encryption
|
||||||
|
|
||||||
|
## Screenshots
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
## Build/Run
|
||||||
|
|
||||||
|
### Prerequisites
|
||||||
|
|
||||||
|
- QEMU x86_64 emulator
|
||||||
|
- `OVMF.fd`
|
||||||
|
|
||||||
|
Clone the project
|
||||||
|
|
||||||
## Build
|
|
||||||
```bash
|
```bash
|
||||||
cargo build --target x86_64-unknown-uefi --release
|
git clone https://git.walruslab.org/mincomk/uefi-video.git
|
||||||
# result: uefi-video.efi
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## Test Info
|
Go to the project directory
|
||||||
Tested on:
|
|
||||||
- `x86_64-unknown-uefi`
|
```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 |
|
||||||
|
|||||||
Reference in New Issue
Block a user