-
Notifications
You must be signed in to change notification settings - Fork 269
Development
Thingino is an external tree of the Buildroot tool. So the best possible documentation is available here.
Thingino uses a slightly modified version of Buildroot, allowing to create better symlinks for truly relocatable toolchain.
Thingino uses its own Makefile to do most of the pre-build configuration. It then passes the build command to Buildroot.
Buildroot's native make directives are accessible from firmware using the br- prefix, e.g. make br-help will show help output from the Buildroot Makefile, while make help will only show help from the Thingino Makefile.
Prefixed Buildroot make directives to work with a package at different stages:
-
br-[pkgname]- Build and install [pkgname] and all its dependencies -
br-[pkgname]-source- Only download the source files for [pkgname] -
br-[pkgname]-extract- Extract [pkgname] sources -
br-[pkgname]-patch- Apply patches to [pkgname] -
br-[pkgname]-depends- Build [pkgname]'s dependencies -
br-[pkgname]-configure- Build [pkgname] up to the configure step -
br-[pkgname]-build- Build [pkgname] up to the build step -
br-[pkgname]-dirclean- Remove [pkgname] build directory -
br-[pkgname]-reconfigure- Restart the build from the configure step -
br-[pkgname]-rebuild- Restart the build from the build step -
br-[pkgname]-reinstall- Restart the build from the install step -
br-[pkgname]-show-info- Generate info about [pkgname], as a JSON blurb -
br-[pkgname]-show-depends- List packages on which [pkgname] depends -
br-[pkgname]-show-rdepends- List packages which have [pkgname] as a dependency -
br-[pkgname]-show-recursive-depends- Recursively list packages on which [pkgname] depends -
br-[pkgname]-show-recursive-rdepends- Recursively list packages which have [pkgname] as a dependency -
br-[pkgname]-graph-depends- Generate a graph of [pkgname]'s dependencies -
br-[pkgname]-graph-rdepends- Generate a graph of [pkgname]'s reverse dependencies -
br-menuconfig- Run Buildroot menuconfig -
br-savedefconfig- Save board defconfig -
br-busybox-menuconfig- Run BusyBox menuconfig -
br-linux-menuconfig- Run Linux kernel menuconfig -
br-linux-savedefconfig- Run Linux kernel savedefconfig -
br-linux-update-defconfig- Save the Linux configuration to the path specified by BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE -
br-list-defconfigs- List all defconfigs (pre-configured minimal systems) -
br-source- Download all sources needed for offline-build -
br-external-deps- List external packages used -
br-legal-info- Generate info about license compliance -
br-show-info- Generate info about packages, as a JSON blurb -
br-pkg-stats- Generate info about packages as JSON and HTML -
br-printvars- Dump internal variables selected with VARS=... -
br-make V=0|1- 0 => quiet build (default), 1 => verbose build
Thingino adds a few shortcut directives of its own:
-
bootstrap- Install prerequisites -
clean- Removetargetdirectory and.configfile for the given board -
distclean- Remove all building files for the given board -
rebuild-[pkgname]- Combinedircleanandrebuild -
pack_full- Download a corresponding bootloader and create a full firmware file -
pack_update- Create a firmware update file without a bootloader -
update_ota IP=192.168.1.10- Upload and install firmware update, leave bootloader and most settings -
upgrade_ota IP=192.168.1.10- Upload and install full firmware including bootloader
These toolchains are designed to support various Ingenic SoC targets and leverage different versions of GCC (GNU Compiler Collection) and libc implementations (GNU and musl).
The following toolchains are available for development:
-
GNU GCC Toolchains for XBurst1:
toolchain_xburst1_gnu_gcc12toolchain_xburst1_gnu_gcc13
-
Musl GCC Toolchains for XBurst1:
toolchain_xburst1_musl_gcc12toolchain_xburst1_musl_gcc13
-
Musl GCC Toolchains for XBurst2:
toolchain_xburst2_musl_gcc12toolchain_xburst2_musl_gcc13
-
XBurst1 Targets:
- T10/T20/T21/T23/T30/T31 SoCs
-
XBurst2 Targets:
- A1/T40/T41 SoCs
The toolchains are based on two versions of the GCC compiler:
- GCC 12
- GCC 13
These versions ensure compatibility with a wide range of software, offering developers the flexibility to choose a toolchain that best suits their project's requirements.
When selecting a toolchain for your project, consider the following:
- Target Architecture: Ensure the toolchain supports your SoC (XBurst1 vs. XBurst2).
- Libc Implementation: Decide between GNU libc and musl libc based on your project's needs. Musl libc is designed for static linking and simplicity, while GNU libc offers extensive features and dynamic linking support.
Musl is the default recommended toolchain for Thingino development.- GCC Version: Newer versions of GCC may offer better optimizations and more features. However, compatibility with your codebase should be verified.
Up to date Toolchains releases are always available on the releases page. Toolchains are updated weekly.
Are you looking to start development with Thingino but worried about cluttering your system with additional software? An efficient solution is to utilize containers for development! This approach gives you a fully operational Debian system contained within a virtual environment, already set up for your development needs.
Docker image for developing Thingino firmware in a standardized and reproducible environment across different machines.
git clone https://github.com/themactep/docker-worker.git ~/docker-worker
cd ~/docker-worker
./run.sh thingino
LXC serves as a lightweight alternative to Docker and is quite straightforward to use, especially if you're accustomed to Debian-based systems.
Set Up Your Development Environment:
We've made installation easy with a prepared setup script, which automates the creation and configuration of a new container specifically for Thingino development. This script will prompt you to install LXC (if not installed), the platform we'll use to create and manage our isolated development environments. Once LXC is installed, you can prepare your Thingino development environment.
Download and execute the setup script by entering these commands in your terminal (ensure you're in the directory where you wish to download the script):
git clone https://github.com/gtxaspec/thingino-lxc && cd thingino-lxc
sudo bash setup_thingino_lxc.shFull source code to the installer is available here: thingino-lxc
This script will automatically generate an LXC container named 'thingino-development' and install all the necessary tools and software required for Thingino development, including various thingino related repositories.
The script will automatically attach to the container after installation, dropping you to the command prompt. You are now ready to start developing!
Whenever you're ready to start working, accessing your dedicated Thingino environment is simple:
1. Open Your Terminal:
Launch your terminal to begin.
2. Attach to Your Container:
Enter the following command to access your development environment:
attach-thinginoBy running this command, you'll be placed directly into your Thingino development workspace inside the container, where you can code, build, and test within an isolated and dedicated environment.
Exiting the Container
To finish your session and return to your host system's command line, type exit and press Enter. This command logs you out from the 'dev' user. If you're still inside the container, typing exit again will disconnect you from it.
Remember, your LXC container retains its state between sessions, allowing you to pick up right where you left off by reattaching using the same command.
Installation Demonstration Video:
output.mp4
- Isolation: Keeps your primary operating system clean and unaffected.
- Reproducible: Simplifies the process of replicating or deleting the development environment.
- Efficiency: Containers typically use resources more sparingly than full virtual machines.
Now, you're all set to enjoy hassle-free development with Thingino in a clean, organized environment!
- Wiki Home
- About the Project
- Getting Started
-
Supported Cameras
- Cameras
- 360 AP1PA3
- AliExpress LTIA‐37FJZ (Vanhua Z55 module)
- AOQEE C1
- Aosu C5L
- Cinnado
- Dekco DC5L
- Eufy
- Galayou/Wansview
- Hualai (Wyze/Atom/Neos/Personal)
- iFlytek XFP301‐M
- Jienuo JN-107-AR-E-WIFI
- Jooan A6M
- LaView L2
- LongPlus X07
- LSC 3215672
- Sannce I21AG
- Sonoff Cam‐S2 and B1P
- TP-Link Tapo C100/C110/C111
- Wuuk Y0510
- Xiaomi
- Configuration
- Integration
- Development