top of page
  • Linkedin

General Discussions

Public·2 members

An Introduction to Infrabase for Running Linux/LVGL on QEMU/AArch64

Infrabase is a lightweight build and deployment environment tailored for embedded systems development. Although it leverages BitBake as its core build engine, it differs significantly from Yocto in design and philosophy — prioritizing simplicity, efficiency, and flexibility over complexity.


Unlike traditional Linux distributions, Infrabase does not come pre-packaged with system layers or components. Instead, it provides the foundational tools necessary to build a variety of distributions — including Buildroot, debootstrap, and even Yocto/Poky — depending on the requirements of your project.


In this article, we'll demonstrate how to use Infrabase to build and deploy a basic LVGL (Light and Versatile Graphics Library) application running on a Linux system emulated using QEMU in virt64 mode. Our chosen distribution for this setup is Buildroot.


⚠️ Note: The default Buildroot configuration for the QEMU/virt64 machine includes a significant number of components (such as graphics libraries, DRM, kmscube, mesa3d-demos, etc.). These are not strictly necessary for running a framebuffer-based LVGL application. Additionally, this setup uses systemd as the system and service manager.


Prerequisites

Before proceeding, ensure that:


  • You have experience with embedded Linux development.

  • A compatible ARM AArch64 toolchain is installed on your system.


Step 1: Clone the Infrabase Repository


Start by cloning the Infrabase repository from GitHub:

git clone https://github.com/EDGEMTech/infrabase

Step 2: Build the Environment


Navigate to the repository root and initiate the build with:

./build.sh -a

Since we use QEMU/virt64, we need to build it with:

./build.sh -q

This command launches a full build process, compiling:


  • The U-Boot bootloader

  • The Linux kernel

  • A Buildroot-based root filesystem

  • All defined user-space applications

🕒 Depending on your system, the build may take up to an hour, as the current Buildroot setup includes numerous components.


Step 3: Deploy the System


After the build completes, deploy the environment using:

./deploy.sh -a

The script performs the following:


  • Creates a virtual SD card image under the filesystem/ directory.

  • Partitions and populates the image:

  • Partition 1: U-Boot bootloader

  • Partition 2: ITB (Image Tree Blob) file containing the kernel, device tree (DT), and a minimal initrd

  • Partition 3 (rootfs): Full Buildroot root filesystem

  • /root directory: All user-space applications


💡 Note: Although the bootloader is written to the SD card (as required for real hardware), QEMU uses the bootloader directly via its command-line arguments during emulation.


Step 4: Launch the Emulated System


To start the emulated environment with graphical support, run:

./stg

You should now see two separate windows:

ree
Starting the emulated environment (automatic login without password is configured)
  1. A serial console window (acting as a virtual UART)

  2. A framebuffer window (displaying the graphical output)


Step 5: Run the LVGL Application


In the serial console window, launch the LVGL demo with:

./lvglsim

This will start the simple LVGL application, displaying the familiar LVGL demo interface in the framebuffer window.


ree
Starting lvglsim application initiates the framebuffer and displays the LVGL widgets

You move your mouse cursor to the GUI and should be able to navigate within the application and interacts with it.


Infrabase: A Growing Project


Infrabase is still in its early stages of development. While it already provides a functional and streamlined environment for embedded Linux system builds, there is still much room for improvement and optimization. So, don't be too rude and thank you for your understanding and patience.


We are actively working to expand its capabilities, improve usability, and support more platforms and configurations. Your feedback, ideas, and contributions are not only welcome — they’re essential to the project’s growth.


Whether you’re interested in improving build scripts, enhancing documentation, adding support for new distributions, or fixing bugs, we’d be happy to have you on board. Infrabase is a constantly evolving toolset, and the community around it is key to its success.


What’s Next


In the next article, we will explore how to debug the LVGL application running in QEMU using Visual Studio Code with a GDB GUI frontend — enabling a more interactive and developer-friendly debugging experience.


84 Views
bottom of page