Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pawelkn/framebuffer-animations
Framebuffer Animations is an open-source project designed to play GIF animations on a raw framebuffer device, primarily intended for use in embedded devices
https://github.com/pawelkn/framebuffer-animations
animation banana-pi crossplatform embedded embedded-systems framebuffer gif gif-animation raspberry-pi raspberry-pi-3 rust-lang
Last synced: about 1 month ago
JSON representation
Framebuffer Animations is an open-source project designed to play GIF animations on a raw framebuffer device, primarily intended for use in embedded devices
- Host: GitHub
- URL: https://github.com/pawelkn/framebuffer-animations
- Owner: pawelkn
- License: mit
- Created: 2023-09-04T12:33:46.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2024-03-05T11:49:02.000Z (9 months ago)
- Last Synced: 2024-09-28T10:20:57.567Z (about 2 months ago)
- Topics: animation, banana-pi, crossplatform, embedded, embedded-systems, framebuffer, gif, gif-animation, raspberry-pi, raspberry-pi-3, rust-lang
- Language: Rust
- Homepage:
- Size: 6.27 MB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Framebuffer Animations
Framebuffer Animations is an open-source project designed to play GIF animations on a raw framebuffer device, primarily intended for use in embedded devices. It provides a lightweight and efficient solution for rendering animated content on displays connected to embedded systems.
## Features
* Plays GIF animations on raw framebuffer devices,
* Lightweight and suitable for resource-constrained environments,
* The binary has no dependencies,
* Designed for use in embedded systems,
* Customizable for different display configurations,
* Written in Rust for performance and reliability.## Cross-Compilation
Cross-compiling Framebuffer Animations for your target embedded system is straightforward. Here's an example of cross-compilation for The NXP i.MX28 processor with support for the ARMv5TE instruction set.
1. Install the cross-compiler toolchain for your target.
2. Setup a target for Rust:
```bash
rustup target add armv5te-unknown-linux-gnueabi
```3. Clone the repository:
```bash
git clone https://github.com/pawelkn/framebuffer-animations.git
```4. Create a _.cargo_ subfolder in the project directory.
```bash
cd framebuffer-animations
mkdir .cargo
```5. Edit _.cargo/config_ file. Set the valid _gcc_ cross-compiler for your target. Set additional compiler flags, if needed. Example file content:
```ini
[target.armv5te-unknown-linux-gnueabi]
linker = "/home/pawel/buildroot/output/host/usr/bin/arm-buildroot-linux-gnueabi-gcc"
```6. Build the project:
```bash
cargo build --target=armv5te-unknown-linux-gnueabi --release
```## Deployment
Deployment of Framebuffer Animations depends on your specific embedded system and framebuffer device. However, here are some general steps to follow:
1. Transfer the built binary to your embedded device:
```bash
scp target/armv5te-unknown-linux-gnueabi/release/fba [email protected]:/usr/bin/
```2. Transfer example images:
```bash
scp -r images [email protected]:/root/
```3. Log in to your device via SSH.
```bash
ssh [email protected]
```4. Ensure that your framebuffer device exists and is accessible:
```bash
ls -l /dev/fb*
crw-rw---- 1 root root 29, 0 Jan 1 1970 /dev/fb0
```5. Run the example on your embedded device:
```bash
fba --device /dev/fb0 --interval 5 --once /root/images/spaceship-640x480.gif
```Enjoy your GIF animations on your embedded display!
## Command Line Arguments
The Framebuffer Animations accepts the following command line arguments:
- `--device`, `-d`: Specifies the framebuffer device file. Default is `/dev/fb0`.
- `--interval`, `-i`: Sets the interval step for displaying GIF frames in milliseconds. Default is 5 milliseconds.
- `--once`, `-o`: When provided, the GIF animation will play only one time. By default, it loops indefinitely.
- `gif_file`: The path to the GIF file that you want to play.
## Troubleshooting
If you encounter any issues while using Framebuffer Animations, first check, if the framebuffer is in sleep mode.
To leave Framebuffer sleep power mode:```bash
echo 0 > /sys/class/graphics/fb0/blank
```## Image Sources
The example images used in this project are sourced from:
* Spaceship - Kövesházi Dániel - https://dribbble.com/shots/3121924-Spaceship
## Buy Me A Coffee! ☕
If you find the project beneficial and would like to support me, please consider showing your appreciation by buying me a coffee on [Buy Me A Coffee](https://buycoffee.to/pawelkn)