Git Product home page Git Product logo

Embox Coverity Scan Build Status

Embox is a configurable RTOS designed for resource constrained and embedded systems. Embox's main idea is to use Linux software without Linux.

Achievements

Key features

  • POSIX-compliant
  • C++ support
  • File systems: FAT, ext2/3/4, ...
  • TCP/IP: BSD sockets; supported protocols: UDP, HTTP, ARP, NTP, ICMP, ...
  • Cross-platform: ARM, MIPS, x86, RISC-V, Microblaze, SPARC, PowerPC, E2K
  • Popular platforms: STM32, i.MX6, RaPi, ...
  • Provides popular desktop software on MCU (e.g. STM32): Qt, OpenCV, PJSIP, dropbear, ...
  • Unix-like shell utilities: ls, cat, mount, ...
  • Popular programming languages: java, python, lua, tcl, lisp, ruby, js, scheme

Contacts

Mailing lists:

Telegram chats:

Documentation

Getting started

Here's a quick overview on how to build and run Embox.

Required environment:

  • gcc and make
  • cross compiler for the target platform

Preparing environment

For Debian-based systems (most packages are installed out of box though):

$ sudo apt-get install build-essential gcc-multilib curl libmpc-dev python

For Arch Linux:

$ sudo pacman -S make gcc-multilib cpio qemu
$ yay -S python2-bin

For MAC OS X (requires MacPorts installed):

$ sudo port install i386-elf-gcc i386-elf-binutils cpio gawk qemu

For any system with Docker (more info on wiki Emdocker):

$ ./scripts/docker/docker_start.sh
$ . ./scripts/docker/docker_rc.sh

Building Embox

First of all:

$ git clone https://github.com/embox/embox.git embox
$ cd embox

Since Embox is highly configurable project, it is necessary to specify modules to be built and params for them. To build the OS make command is used. All commands described below are called from the embox directory, which includes src/, templates/, ...

Configuring the project

For configuring it is necessary to specify parameters and modules supposed to be included into the system. There are two ways to set up a current config:

  • make confload-<template> - build artefacts generated in a fixed place
  • ./confset <template> - build artefacts maintained in project dependent working paths

While make confload-<template> is used, files from the template's folder are copied into './conf' folder. You can modify them. While confset <template> is used, files from the template's folder are copied into ./work/<template>/conf folder and a link './conf' is created to ./work/<template>/conf. This usage is suited for quick switching between your templates, because full rebuilds are avoided. Moreover, working conf-settings are retained as well, when you switch build e.g. between real target and qemu and back again. Only downside of using the confset method: more SSD/HDD usage, dependent on number of parallel projects.

Embox has several templates prepared, to list them use the following command:

$ make confload

The simplest way to load a template is to specify its name in the command:

$ ./confset <template>

or

$ make confload-<template>

For the quick overview you can use one of qemu templates that exist for most architectures, that is, x86/qemu for x86:

$ ./confset x86/qemu   (yet no autocomplete/-suggest when only a part is typed: to Do)

or

$ make confload-x86/qemu

Building the image

After configuring the project just run make to build:

$ make

Running on QEMU

The resulting image can now be run on QEMU. The simplest way is to execute ./scripts/qemu/auto_qemu script:

$ sudo ./scripts/qemu/auto_qemu

sudo is requried to setup a TUN/TAP device necessary to emulate networking.

After the system is loaded, you’ll see the embox> prompt, now you are able to run commands. For example, help lists all existing commands.

To test the connection:

ping 10.0.2.16

If everything's fine, you can connect to the Embox terminal via telnet.

To exit Qemu type ctrl + A and X after that.

Debugging

You can use the same script with -s -S -machine accel=tcg flags for debugging:

$ sudo ./scripts/qemu/auto_qemu -s -S -machine accel=tcg

After running that QEMU waits for a connection from a gdb-client. Run gdb in the other terminal:

$ gdb ./build/base/bin/embox
...
(gdb) target extended-remote :1234
(gdb) continue

The system starts to load.

At any moment in gdb terminal you can type ctrl + C and see the stack of the current thread (backtrace) or set breakpoints (break <function name>, break <file name>:<line number>).

Other architectures

Embox supports the following CPU architectures: x86, ARM, Microblaze, SPARC, PPC, MIPS.

In order to work with architectures other than x86 you'll need a cross compiler. After installing the cross compiler just repeat the step above, starting with configuring:

make confload-<arch>/qemu
make
sudo ./scripts/qemu/auto_qemu

The output is quite the same as in the case of the x86 architecture.

Networking support

Embox supports networking on qemu x86, ARM, MIPS and Microblaze.

Embox's Projects

crosstool icon crosstool

Script to build toolchain for various architectures

embox icon embox

Modular and configurable OS for embedded applications

etna_viv icon etna_viv

Etnaviv is a project to build a FOSS driver for the Vivante GCxxx series of embedded GPUs - laanwj's personal fork - upstream is https://github.com/etnaviv/etna_viv

openlibm icon openlibm

High quality system independent, portable, open source libm implementation

pjsip icon pjsip

Scripts for building pjsip environment for host machine

qemu icon qemu

QEMU branches - rpi (Raspberry Pi) - firebee

webthing-c icon webthing-c

POSIX-compatible implementation of a Web Thing server

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.