Skip to content

Building from sources

gtxaspec edited this page Aug 14, 2024 · 18 revisions

Prerequisites

To successfully compile the firmware, you need a modern Linux distribution equipped with up-to-date system libraries and tools. Specifically:

Important

Building is currently supported only on x86_64 platforms. Attempting to build on RISC-V or ARM64 hosts will result in failure.

  • Required Distribution: Recent versions of Debian or Ubuntu, are recommended.
  • Essential Libraries and Tools:
    • glibc 2.31 or newer: Ensure your system's C library is up-to-date to avoid compatibility issues.
    • GNU awk: Required for processing scripts during the build.

If you are using an older operating system or prefer not to install additional packages on your existing system, consider using Podman, Docker or LXC containers. These provide a clean and isolated environment, ideal for ensuring compatibility and replicability of the build process.

For detailed instructions on setting up and using containers to compile firmware, visit our Container Development page.

Downloading the repository

Step 1: Clone the Repository

Start by cloning the Thingino firmware repository to your local machine. Open a terminal and run the following command:

git clone --depth=1 --recurse-submodules \
--shallow-submodules https://github.com/themactep/thingino-firmware

Step 2: Navigate to the Firmware Directory

Change into the cloned directory:

cd thingino-firmware

Guided Compilation

Step 1: Launch the Configuration Menu

Run the user configuration script:

./user-menu.sh

Upon running the script, you will see the main menu:

image

Select "Guided Compilation" from the menu.

image

Step 2: Select Your Device Profile

  1. Select Device: Choose a device profile from the list. You can select either a Camera Profile or a Module Profile:
    • Camera Profile: Includes all necessary configurations for the device, such as GPIOs.
    • Module Profile: Basic configuration suitable for experienced developers.

image

Click OK to confirm your selection.

Step 3: Install Prerequisites

Select "Install prerequisites" from the menu to install the necessary components for compilation.

image

Step 4: Compile the Firmware

Select "Step 3: Make Firmware" to start the compilation process.

image

Please wait while the firmware compiles; this may take some time. This step also creates the necessary images to flash the firmware onto your device.

Step 5: Retrieving the Compiled Firmware

image

Upon completion, a message will indicate that the process is done. You can find the firmware images in your home directory under:

HOME FOLDER/output/<profile_name>/images

For example:

  • thingino-teacup.bin – This full image includes the bootloader and is used for fresh installations.
  • thingino-teacup-update.bin – This image does not include the bootloader and is suitable for updating your device without erasing your bootloader or environment variables.

Conclusion

Congratulations! You have successfully compiled and prepared the Thingino firmware for installation. Follow the above steps to recompile or update the firmware as needed.

Manual Compilation

  • Run make and select a device profile.
  • Upon completion, a message will indicate that the process is done. You can find the firmware images in your home directory under:
HOME FOLDER/output/<profile_name>/images

For example:

  • thingino-teacup.bin – This full image includes the bootloader and is used for fresh installations.
  • thingino-teacup-update.bin – This image does not include the bootloader and is suitable for updating your device without erasing your bootloader or environment variables.
Clone this wiki locally