Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
96 commits
Select commit Hold shift + click to select a range
9117864
Replace the SO3 logo
Jun 12, 2026
fdc7951
Complete introduction doc
Jun 12, 2026
1e72277
Add initial build
Jun 12, 2026
7e2047b
Second alignment of scripts and env
Jun 12, 2026
5eddc8b
Migrate SO3 build system to Infrabase (bitbake); nest sources under so3/
Jun 13, 2026
a1d472e
Merge branch 'main' into 255-migrate-the-so3-build-system-to-infrabas…
Jun 13, 2026
20155e4
Merge branch 'infrabase-build-system' into 255-migrate-the-so3-build-…
Jun 13, 2026
60a02ac
Remove the obsolete in-tree qemu/ (built by meta-qemu now)
Jun 13, 2026
ffb859d
avz: build the hypervisor from a fetched (pinned) SO3 kernel
Jun 13, 2026
3099dce
uboot: pin CROSS_COMPILE per platform (IB_TOOLCHAIN)
Jun 13, 2026
52b0dc9
usr-so3: fetch lvgl instead of a git submodule
Jun 13, 2026
060a2e7
qemu: build per-platform softmmu target, preserving the other arch
Jun 13, 2026
b0bb77c
so3: auto-distclean the in-tree kernel on arch change
Jun 14, 2026
32e4ddc
meta: fix virt32 builds (OVERRIDES space + stale usr build dir)
Jun 14, 2026
63f30c4
scripts: add virt32 support to st.sh / stg.sh
Jun 14, 2026
5d812b1
u-boot: untrack the in-tree tree (it is fetched, like qemu/avz)
Jun 14, 2026
6cae089
uboot: regenerate the patch set cleanly via updiff
Jun 14, 2026
172de4c
so3: route arm32 fcntl64 (NR 221) to the fcntl handler
Jun 14, 2026
891050f
so3: cooperatively tear down WAITING threads on process kill
Jun 14, 2026
57230e5
usr/lvgl: raise LV_MEM_SIZE to 4 MB for the widgets demo
Jun 14, 2026
cbcc384
usr: add fb_test, a minimal direct /dev/fb draw app
Jun 14, 2026
cd42610
so3: map the PL111 framebuffer non-cacheable
Jun 14, 2026
1ddcf4f
scripts: virt32 stg.sh uses the GTK display, drops virtio-gpu
Jun 14, 2026
75eb416
usr: fb_test repaints only the moving square each frame
Jun 14, 2026
06a639e
so3: make console Ctrl-C reliable (foreground SIGINT + prompt cancel)
Jun 14, 2026
027bf9b
scripts: virt64 stg.sh uses GTK display, drops virtio-gpu
Jun 14, 2026
546679e
scripts: build.sh repairs stale recipe workdirs before clean/build
Jun 15, 2026
8facbbe
meta-usr: fix usr-so3 do_clean fifo failure (lvgl append nuked WORKDIR)
Jun 15, 2026
e5f8ee6
local.conf: SO3 follows IB_PLATFORM (drop IB_PLATFORM:so3); add virt3…
Jun 15, 2026
aba56dd
scripts: st.sh/stg.sh enable EL2 for the SO3-on-AVZ boot
Jun 15, 2026
f2c9ce0
bsp/local.conf: virt64 ATF+OP-TEE boot chain (flash0 assembly)
Jun 15, 2026
d249bfa
usr: add lvgl_widgets — standalone lv_demo_widgets app
Jun 15, 2026
b387945
so3: fix PL050 keyboard/mouse IRQ numbers in virt dts (36/37 -> 11/12)
Jun 15, 2026
bc5772f
so3: fix Ctrl-C hang on multi-threaded apps (SIGINT process teardown)
Jun 15, 2026
c5fe663
so3: fix QEMU mouse cursor (clamp off-by-one + GTK pointer grab)
Jun 15, 2026
4849a32
stg.sh: force GTK onto XWayland (GDK_BACKEND=x11) for the relative mouse
Jun 15, 2026
414d1fb
so3: absolute pointer (so3,absmouse) — replace relative PS/2 mouse un…
Jun 15, 2026
426841b
stg.sh: route GTK through XWayland (GDK_BACKEND=x11) for HiDPI Wayland
Jun 15, 2026
337f750
Clean up and update .gitignore
Jun 15, 2026
041afe1
patch.bbclass: per-recipe updiff excludes; fix qemu build-artifact po…
Jun 15, 2026
74c7a97
doc: overhaul for Infrabase build, display/input, and the absolute po…
Jun 15, 2026
3ee6f1f
doc: fix diagram edge routing so arrows no longer cross boxes
Jun 15, 2026
7056aa3
doc: agency-left/capsule-right in the capsule diagram; logo contrast
Jun 15, 2026
500cadd
doc: actually fix the sidebar logo contrast (white card, !important)
Jun 15, 2026
91c4dea
doc: use a light-blue logo card instead of white
Jun 15, 2026
e789d38
doc: darken the logo card light-blue slightly (#e6f2ff -> #c5ddf5)
Jun 15, 2026
ff73742
docker: adapt the lv_perf images & CI to the Infrabase build
Jun 15, 2026
a6c5686
build.sh: only require root for BSPs whose do_build actually mounts; …
Jun 15, 2026
1672a4e
docker/README: build/run the lv_perf images with --network=host
Jun 15, 2026
0f4cc86
docker/Dockerfile.toolchains: add the GNU/Linux U-Boot cross toolchains
Jun 16, 2026
409ab1c
docker/scripts/run.sh: default PLATFORM from QEMU_ARCH; check sdcard …
Jun 16, 2026
1468832
docker: install rsync/parted and create the sdcard at run time (build…
Jun 16, 2026
76e2ece
docker/scripts/run.sh: guard against non-standalone (AVZ/ATF) deploym…
Jun 16, 2026
3e34188
docker: move/rename the root drun/drunit helpers into docker/scripts
Jun 16, 2026
f96ebcb
doc: document host toolchain/build prerequisites in build_system.rst
Jun 16, 2026
b233f47
usr/sh: refactor for quality (fix 7 bugs, restructure)
Jun 16, 2026
04831de
usr/sh: add quoting/$VAR expansion and full pipe/redirection support
Jun 16, 2026
cb1dcbc
usr/sh: interactive line editing — history and arrow keys
Jun 16, 2026
3241e21
usr/sh: add Home/End keys and a 'history' builtin
Jun 16, 2026
446a9a7
kernel+usr/sh: per-process cwd with chdir/getcwd, and cd/pwd builtins
Jun 16, 2026
49caaee
usr/sh: cwd-aware prompt and root-based command lookup
Jun 16, 2026
5a4196e
fs+usr: add mkdir/rmdir/rm (mkdirat/unlinkat syscalls, FAT write ops)
Jun 16, 2026
738e2ed
fs: enforce file/dir type in unlink/rmdir (st_mode + EISDIR/ENOTDIR)
Jun 16, 2026
d1f6549
fs+usr: add cat/touch/mv/cp (rename via renameat/renameat2)
Jun 16, 2026
ff90ef7
treewide: attribute REDS copyright headers to "REDS Institute from HE…
Jun 16, 2026
f77e8ff
usr/ls: add -l long listing (type, size, mtime)
Jun 16, 2026
e0beca8
vfs: stop warning on open() creation mode (touch/cp are normal callers)
Jun 16, 2026
63dc945
usr/ls: handle a file argument (list it instead of failing)
Jun 16, 2026
5c6496d
kernel: add PL031 RTC, real wall-clock time, and touch via utimensat
Jun 16, 2026
527f9ed
verdin: build SO3 as an AVZ guest on the Toradex Verdin iMX8MP
Jun 16, 2026
d3203f5
verdin: U-Boot 2024.07 / imx-boot firmware build (capsule-free)
Jun 16, 2026
8ed4ad0
verdin: capsule-free TEZI deploy for the AVZ+SO3 image
Jun 16, 2026
02b248b
verdin: add SO3 standalone (bare-metal) variant alongside the AVZ guest
Jun 16, 2026
1c3c721
target: drop obsolete bare-name ITS symlinks; SO3 uses specific ITS n…
Jun 16, 2026
13cd434
arch/arm32: drop the obsolete arm32 Raspberry Pi 4 (rpi4) platform
Jun 16, 2026
fca275b
Secure attach_infrabase task
Jun 16, 2026
f5b0c94
avz: read FIT <load>/<entry> by actual cell width (fix 32-bit ITS)
Jun 16, 2026
6561f1f
avz: load the agency guest from a separate ITB (x1)
Jun 16, 2026
b9f136c
avz: inject guest initrd from the ITB ramdisk node into /chosen
Jun 16, 2026
2ecad8b
so3/avz: split AVZ + SO3 guest into separate ITBs (2-ITB boot)
Jun 16, 2026
07951eb
doc: document the virt64 two-ITB AVZ boot (ITS split)
Jun 17, 2026
8f5e07c
so3/avz: name the AVZ ITB <plat>_avz.its and split rpi4/verdin (2-ITB)
Jun 17, 2026
5046d61
Small doc update and clean up
Jun 17, 2026
5a5c113
build: track recipe patches missing from git (fix CI parse)
Jun 17, 2026
a8b69f0
gitignore: track infrabase recipe sources instead of forcing git add -f
Jun 17, 2026
0c00d18
musl-toolchain: --disable-maintainer-mode for gcc build (fix CI)
Jun 17, 2026
03968a1
ci(DIAG): dump musl-toolchain do_build log + resources on failure
Jun 17, 2026
77bb981
musl-toolchain: retry tarball downloads; revert CI diagnostic
Jun 17, 2026
b78af76
scripts: add ci-local.sh to run the Build workflow locally
Jun 17, 2026
be980f1
musl-toolchain: fetch GNU sources from canonical host (fix flaky CI)
Jun 17, 2026
1089499
ci(style): scope clang-format to first-party, format violators
Jun 17, 2026
97585d5
build: align shared infra with the edgem1 product tree
Jun 17, 2026
822a8fa
doc: modernize README; drop the stale HEIG-VD forum link
Jun 17, 2026
523b1eb
doc: drop the defunct HEIG-VD discussion forum references
Jun 17, 2026
9233362
doc: expand README intro; describe SO3 as a polymorphic OS
Jun 17, 2026
cd7bd20
rootfs-linux: privileged archive copy in do_deploy
Jun 17, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
43 changes: 34 additions & 9 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,14 +1,39 @@
# Docker build context excludes (mainly for docker/Dockerfile.lvperf_* which
# `COPY . /so3`). Keep the context small and reproducible: drop VCS data, the
# bitbake work tree and the fetched component trees — Infrabase re-fetches and
# re-patches the latter during the image build.

# VCS / IDE
.git
.github
.metadata
*/.project
*/.cproject
.git
.github
*.o
bsp/
*/sdcard.*
rootfs/board
*/*.itb
usr/lib/libxml2
usr/build

# Sphinx documentation build output
doc/build

# Infrabase bitbake work tree (huge, host-specific, regenerated)
build/tmp
build/cache
build/bitbake.lock
build/bitbake-cookerdaemon.log

# Fetched + patched component trees (re-fetched & re-patched by Infrabase)
qemu
u-boot
avz
atf
qemu.back
u-boot.back

# Generated disk / boot images
filesystem/*.img*
filesystem/*.itb
filesystem/flash0.img

# In-tree build artefacts (regenerated by the build)
*.o
so3/so3/so3.bin
so3/usr/build
so3/usr/out
47 changes: 22 additions & 25 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,39 +7,36 @@ on:
pull_request:
branches: ["main"]

# Smoke-build SO3 with Infrabase (bitbake) inside the so3-env image. Both the
# kernel (build.sh -k so3) and the user space (build.sh -x usr-so3, which also
# builds the MUSL toolchain via meta-toolchain) are non-privileged, so a plain
# `docker run` (no --privileged) is enough. The repo is mounted at /so3.
jobs:
build-so3:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
# We use the virtXX_fb configs as they're based on the normal virtXX configs with aditional fb support
CONFIG: ['virt32_fb_defconfig',
'virt64_fb_defconfig',
'virt32_lvperf_defconfig',
]
PLATFORM: [virt32, virt64]
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Build
run: |
docker run --rm -v "${PWD}:/so3" ghcr.io/smartobjectoriented/so3-env:latest bash -c "cd so3 && make ${{ matrix.CONFIG }} && make -j`nproc`"

build-usr:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
CMAKE_TOOLCHAIN_FILE: ['aarch64-linux-musl.cmake',
'arm-linux-musl.cmake']
BUILD_TYPE: ['Debug', 'Release']
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: 'true'

- name: Build
- name: Build kernel + user space (Infrabase)
run: |
docker run --rm -t -v "${PWD}:/so3" ghcr.io/smartobjectoriented/so3-env:latest bash -c "mkdir usr/build && cd usr/build && cmake --no-warn-unused-cli -DCMAKE_C_FLAGS='-Werror' -Wno-dev -DCMAKE_BUILD_TYPE=${{ matrix.BUILD_TYPE }} -DCMAKE_TOOLCHAIN_FILE=../${{matrix.CMAKE_TOOLCHAIN_FILE }} .. && make -j`nproc`"
docker run --rm -v "${PWD}:/so3" \
ghcr.io/smartobjectoriented/so3-env:latest bash -c '
set -e
cd /so3
echo "IB_PLATFORM = \"${{ matrix.PLATFORM }}\"" >> build/conf/local.conf
. ./env.sh
build.sh -k so3
build.sh -x usr-so3 || {
rc=$?
echo "=== build failed (rc=$rc); tail of musl-toolchain do_build log ==="
tail -n 120 build/tmp/work/musl-toolchain-1.0-r0/temp/log.do_build* 2>/dev/null || true
exit $rc
}
'
15 changes: 11 additions & 4 deletions .github/workflows/style.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,18 @@ jobs:
strategy:
fail-fast: false
matrix:
# check-path must be a real directory, otherwise the action silently
# falls back to scanning the whole repo. The SO3 sources are nested
# under so3/ since the Infrabase migration: so3/so3 (kernel) and
# so3/usr (user space). Vendored/third-party trees carry their own
# style and are excluded: micropython and libxml2 (tracked), the
# usr/lib/linux headers, and lvgl (fetched at build time / gitignored,
# listed for safety).
path:
- check: "so3"
exclude: ".S"
- check: "usr/src"
exclude: "(micropython|lv_)"
- check: "so3/so3"
exclude: '\.S$'
- check: "so3/usr"
exclude: '(micropython|libxml2|usr/lib/linux|lvgl|lv_)'
steps:
- uses: actions/checkout@v4
- name: Run clang-format style check for C/C++/Protobuf programs.
Expand Down
66 changes: 55 additions & 11 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,22 @@

**/build

# The top-level infrabase metadata tree (/build) is matched by **/build above,
# which used to force recipe sources (patches, .bb/.inc, conf) to be added with
# `git add -f` — easy to forget, and a forgotten patch breaks CI parsing. Un-ignore
# /build, re-ignore everything one level under it, then re-include only the source
# dirs. Build output stays ignored: build/tmp (also build/.gitignore), build/cache,
# build/bitbake.lock, logs/artifacts (*.log, *.o, *.dtb, *.itb, ... from the rules
# above). Nested build/ dirs elsewhere (optee_os, agency, avz) remain ignored.
!/build/
/build/*
!/build/conf/
!/build/meta-*/

# The fetched ATF source tree lives at the repo root (/atf), like /u-boot, /avz,
# qemu. Anchor to /atf so the bare name doesn't also match the meta-atf recipe
# directory (build/meta-atf/recipes-atf/atf), which holds tracked recipe sources.
/atf/
#vmlinux*
uImage*
domains*
Expand Down Expand Up @@ -55,14 +71,42 @@ agency/rootfs/target/**
!agency/rootfs/board/**/*.d

*asm-offsets.s
so3/so3
so3/so3.bin
usr/lib/libc/include/asm
rootfs/rootfs.fat
filesystem/sdcard.img.*
so3/scripts/basic/fixdep
so3/scripts/dtc/dtc
so3/scripts/kconfig/conf
so3/scripts/kconfig/lex.zconf.c
so3/scripts/kconfig/zconf.hash.c
so3/scripts/kconfig/zconf.tab.c
# SO3 sources are now nested under so3/ (so3/so3 = kernel, so3/usr, so3/rootfs, so3/target)
so3/so3/so3
so3/so3/so3.bin
so3/usr/lib/libc/include/asm
so3/rootfs/rootfs.fat
# lvgl is fetched at build time (meta-usr lvgl bbappend, :lvgl override), not a submodule
so3/usr/lib/lvgl/
so3/so3/scripts/basic/fixdep
so3/so3/scripts/dtc/dtc
so3/so3/scripts/kconfig/conf
so3/so3/scripts/kconfig/lex.zconf.c
so3/so3/scripts/kconfig/zconf.hash.c
so3/so3/scripts/kconfig/zconf.tab.c

# AVZ out-of-tree (O=) build dir — only the script + readme are tracked,
# everything else is generated by `build.sh -x avz`.
/avz/*
!/avz/build.sh
!/avz/README.md

# u-boot is FETCHED (meta-uboot recipe: github 2022.04 @ pinned SRCREV +
# the SO3 patch set), like qemu/avz — not kept in-tree. The build attaches
# the fetched tree here (backing any prior copy up to u-boot.back).
/u-boot/

# filesystem/ is entirely build output (sdcard images, u-boot.bin, work symlink)
/filesystem/

# Junk / build backups
*.deb
*.back
# patch/quilt reject & backup files (e.g. do_updiff regeneration leftovers)
*.orig
*.rej
# do_attach_infrabase dirty-tree guard manifests (sibling of each attached
# component tree, e.g. avz.attach.sha256, u-boot.attach.sha256)
*.attach.sha256
__pycache__/
/scripts.old/
3 changes: 0 additions & 3 deletions .gitmodules

This file was deleted.

72 changes: 58 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,73 @@
<p align="center">
<img src="doc/source/img/SO3_with_text.png" alt="SO3" width="420">
</p>

# Welcome to SO3 — the Smart Object Oriented (SOO) Operating System

Welcome to the Smart Object Oriented (SOO) Operating System (code name SO3)
***************************************************************************
SO3 is a compact, lightweight, full-featured and extensible operating system,
particularly well suited to embedded and IoT systems. It is the result of
several years of research and development at the REDS Institute of HEIG-VD, has
long been used as a teaching platform, and today forms the foundation of the
**SOO** framework.

For any information and discussions around SO3, please have a look at the [SO3 discussion forum](https://discourse.heig-vd.ch/c/so3).
## A polymorphic operating system

Feel free to post any comments/suggestions/remarks about SO3. If you wish to participate to development, please simply ask us and we will manage separate branches of development.
The most distinctive feature of SO3 is that it is **polymorphic**: from a
**single source tree**, the very same code base can be configured and built into
three different kinds of system.

Furthermore, the full documentation is available [here](https://smartobjectoriented.github.io/so3)
- **Standalone OS** — SO3 runs directly on the hardware as a conventional
monolithic OS (kernel at **EL1**, user applications at **EL0** on ARM64). This
is the configuration used for teaching and for plain embedded products.
- **AVZ hypervisor** — built with `CONFIG_AVZ`, the same tree becomes **AVZ**
(*Agency VirtualiZer*), a lightweight type-1 hypervisor running at **EL2** that
hosts one or more guest *domains* — the primary guest being the *agency*.
- **SO3 capsule (S3C)** — on top of AVZ, the **SOO** framework adds *SO3
capsules*: lightweight, self-contained guests running at EL1 beside a Linux
*agency* and cooperating with it through split (frontend/backend) drivers. The
capsule (guest) side lives in this repository; the Linux agency and the rest
of the SOO framework live in a separate one.

SO3 targets ARM 32-bit and 64-bit, is multicore, and is kept *as compact as
possible*. It ships with a MUSL-based user space and integrations such as LVGL,
lwIP and MicroPython.

We would like to extend our heartfelt thanks to our sponsors for their generous support in funding the development of the SO3 ecosystem, especially [HEIG-VD](http://www.heig-vd.ch) and the [Hasler Foundations](https://haslerstiftung.ch/en/welcome-to-the-hasler-foundation)
## Documentation

The complete and up-to-date documentation — philosophy, architecture, build
system, user guide, debugging and more — is the source of truth. It lives in
[`doc/`](doc/) and is published at:

Be careful with the requirements of various configs.
### 👉 https://smartobjectoriented.github.io/so3

- If you use avz -> ./st must have virtualization on => use ./stv
- If you use the framebuffer (LVGL case) -> ./stg to start QEMU with the graphic display
Start there for everything about building, configuring, running and debugging
SO3.

To build the patch related to the CI:
## Supported targets

- diff -Naur <source> <result> > so3_ci.patch
and put the ci/so3_ci.patch in ci/
- QEMU `virt` — ARM 32-bit and 64-bit
- Raspberry Pi 4 (64-bit)
- Toradex Verdin iMX8M Plus

To apply the patch, in the root:
- patch -p1 < ci/so3_ci.patch
## Contributing

The `main` branch always holds the last released version.

> [!IMPORTANT]
> Do not push directly to `main`. Each development is tracked by an issue with
> its own branch; open a merge/pull request as soon as it is stable enough for
> review.

If you would like to contribute, please first get in touch with the maintainer at
[info@soo.tech](mailto:info@soo.tech).

## Credits

We warmly thank our sponsors for their generous support in funding the
development of the SO3 ecosystem, in particular
[HEIG-VD](https://www.heig-vd.ch) and the
[Hasler Foundation](https://haslerstiftung.ch/en/welcome-to-the-hasler-foundation).

## License

SO3 is released under the [GNU General Public License v2](LICENSE).
7 changes: 0 additions & 7 deletions avz/README.md

This file was deleted.

49 changes: 0 additions & 49 deletions avz/build.sh

This file was deleted.

Binary file removed bsp/rpi4/bcm2708-rpi-b-plus.dtb
Binary file not shown.
Binary file removed bsp/rpi4/bcm2708-rpi-b.dtb
Binary file not shown.
Binary file removed bsp/rpi4/bcm2708-rpi-cm.dtb
Binary file not shown.
Binary file removed bsp/rpi4/bcm2708-rpi-zero-w.dtb
Binary file not shown.
Binary file removed bsp/rpi4/bcm2708-rpi-zero.dtb
Binary file not shown.
Binary file removed bsp/rpi4/bcm2709-rpi-2-b.dtb
Binary file not shown.
Binary file removed bsp/rpi4/bcm2710-rpi-2-b.dtb
Binary file not shown.
Binary file removed bsp/rpi4/bcm2710-rpi-3-b-plus.dtb
Binary file not shown.
Binary file removed bsp/rpi4/bcm2710-rpi-3-b.dtb
Binary file not shown.
Binary file removed bsp/rpi4/bcm2710-rpi-cm3.dtb
Binary file not shown.
Binary file removed bsp/rpi4/bcm2711-rpi-4-b.dtb
Binary file not shown.
Loading
Loading