Skip to content

Framebuffer Animations is an open-source project designed to play GIF animations on a raw framebuffer device, primarily intended for use in embedded devices

License

Notifications You must be signed in to change notification settings

pawelkn/framebuffer-animations

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

drawing

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:

rustup target add armv5te-unknown-linux-gnueabi
  1. Clone the repository:
git clone https://github.com/pawelkn/framebuffer-animations.git
  1. Create a .cargo subfolder in the project directory.
cd framebuffer-animations
mkdir .cargo
  1. Edit .cargo/config file. Set the valid gcc cross-compiler for your target. Set additional compiler flags, if needed. Example file content:
[target.armv5te-unknown-linux-gnueabi]
linker = "/home/pawel/buildroot/output/host/usr/bin/arm-buildroot-linux-gnueabi-gcc"
  1. Build the project:
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:
scp target/armv5te-unknown-linux-gnueabi/release/fba [email protected]:/usr/bin/
  1. Transfer example images:
scp -r images [email protected]:/root/
  1. Log in to your device via SSH.
  1. Ensure that your framebuffer device exists and is accessible:
ls -l /dev/fb*
crw-rw----    1 root     root       29,   0 Jan  1  1970 /dev/fb0
  1. Run the example on your embedded device:
fba --device /dev/fb0 --interval 5 --once /root/images/spaceship-640x480.gif

Enjoy your GIF animations on your embedded display!

gif

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:

echo 0 > /sys/class/graphics/fb0/blank

Image Sources

The example images used in this project are sourced from:

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

About

Framebuffer Animations is an open-source project designed to play GIF animations on a raw framebuffer device, primarily intended for use in embedded devices

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages