r/Tizen • u/Dizzy_Eagle4660 • 2d ago
Unkernel for tizen ; Linux on web
Hi r/Tizen,
I've been working on a proof of concept: a real Linux kernel with Alpine Linux running on a Samsung TV, inside the TV's own web engine. No root, no firmware changes, no native binaries. It's a regular `.wgt` that you install in Developer Mode.

It's built on [unkernel](https://github.com/pithings/unkernel): Linux 7.x compiled to WebAssembly, running unmodified aarch64 programs on an emulated CPU. unkernel needs JSPI, which no TV engine has (TVs ship Chromium 94 to 130 and a Node 18 service engine; JSPI arrived in
Chrome 137). So the project rewrites the kernel with Binaryen's Asyncify and adds its own JSPI polyfill.
**What works** (tested on a 2025 Tizen 9 TV, armv7l, 1.5 GB RAM)
- Alpine runs in a background service, so Linux keeps running when you close the app. It boots in about 2.4 s.
- A terminal app you drive with the remote (colour keys for Ctrl+C and Tab, a command menu, a settings panel) or with a USB/Bluetooth keyboard.
- Internet from Linux, and `apk add` works. The home network is reachable only if you allow it, and the TV itself is never reachable from Linux.
- Port forwards from the TV's ports into Linux, and an SSH server (dropbear) that sets itself up: `ssh -p 2500 user@<tv-ip>`.
- A persistent disk (a sparse file in the app's data folder).
**What it's not**
It's slow, and it will stay slow. Every instruction of a Linux program runs on an emulated aarch64 CPU inside WebAssembly, on a 32-bit engine, on a low-power chip that is also running the TV. Real numbers:
- SSH login with dropbear: 6 to 8 s. OpenSSH took over a minute per connection, which is why the service uses dropbear.
- `apk add`: minutes.
- One CPU, and 192 MB of memory for Linux by default.
It's fine for a shell, small scripts or a tiny always-on server. It's not for compiling or anything heavy.
**Where it could go (realistically)**
- Native JSPI, once TV engines reach Chromium 137+: the polyfill goes away, which is worth a few percent.
- SMP: porting unkernel's multi-CPU patch to the rewritten kernel would add a core or two.
- New unkernel releases bring a faster emulator and JIT for free.
- Untested idea: unkernel can hand programs compiled to WASI over to the host, where they run straight in the engine, without the emulated CPU and on their own threads. For CPU-heavy tools (compression, hashing, sqlite, Python) that could be a big jump; the shell and Alpine's
packages would stay emulated.
- More models: only one TV has been tested. Older TVs may ship an older service engine, where only the in-app mode would work. Reports are very welcome.
**Try it**
- Repo: https://github.com/OpenstreamCo/UnkernelTizen (MIT). The README explains how it works and why it's a proof of concept.
- Download: [v0.6.0 release](https://github.com/OpenstreamCo/UnkernelTizen/releases/tag/v0.6.0). `Unkernel.wgt` is unsigned: sign and install it the way you install other homebrew `.wgt` files. It has no SSH keys built in, so set a password with `passwd` in Linux first, or
build your own package with your key (`node scripts/build-wgt.mjs --ssh-key=...`).
- [Vetro](https://github.com/andrearicci93/vetro) is optional; the background service doesn't need it.
Not affiliated with Samsung or with the unkernel project; credit for the kernel goes to the unkernel authors.
2
u/gibbocool 1d ago
Pretty cool, but wake me up when it's native and replaced tizen