Latest Posts (20 found)
Uros Popovic 6 days ago

Build like a Google engineer: modern Bazel with modules, Go and Typst

A hands-on guide to modern Bazel with the module system: pinned toolchains, third-party Go libraries, images rendered with Typst, a custom rule backed by a Go tool, and a Go server with everything embedded, all built with one command.

0 views
Uros Popovic 1 weeks ago

Building a static website with Bazel

Build a complete static website with a single Bazel command using Pageforge: templates, Markdown posts, listings, tags, static files, a local dev server, and a zip ready for Cloudflare Pages.

0 views
Uros Popovic 10 months ago

Writing your first compiler

Build your first compiler with minimal, high-level, modern code. With only a few files of Go and C code, we can set up a workflow that dynamically fetches everything needed, including the LLVM library itself, and builds a portable compiler. This is a modern stack, it's reproducible, and you do not need to read dozens of pages to get started.

0 views
Uros Popovic 1 years ago

How to use Linux vsock for fast VM communication

Discover how to bypass the network stack for Host-to-VM communication using Linux Virtual Sockets (AF_VSOCK). This article details how to use these sockets to build a high-performance gRPC service in C++ that communicates directly over the hypervisor bus, avoiding TCP/IP overhead entirely.

0 views
Uros Popovic 1 years ago

How to reverse engineer USB HID on Linux

Discover how Linux exposes raw USB device data, even without a driver. This article details how to use /dev/hidraw and the HID report descriptor to reverse-engineer and read real-time data from a UPS.

0 views
Uros Popovic 1 years ago

How KVM and QEMU run VMs in Linux

Learn the distinct roles of QEMU and KVM in Linux virtualization. This article explains how they complement each other to run virtual machines at near-native speed.

0 views
Uros Popovic 1 years ago

PC cooler control with a $2 microcontroller, no development board

Walkthrough for a small embedded system based on ATmega328p which controls a PC cooler fan. The focus of this experiment is on using only open-source CLI software tooling for the solution. Additionally, no development boards were used, just the bare microcontroller, which should be helpful in transitioning to building your own boards.

1 views
Uros Popovic 1 years ago

Custom CPU simulation and testing

Walkthrough for how the Mrav CPU project handles RTL simulation and other testing aspects.

1 views
Uros Popovic 1 years ago

Running Go tools in a browser

Quick overview of how Go tools for the Mrav custom CPU are run inside a browser by leveraging WASM. The project is built with Bazel using Go rules.

0 views
Uros Popovic 1 years ago

RTL generation for custom CPU Mrav

Overview of how SystemVerilog RTL code is generated in the build flow for the Mrav custom CPU core.

0 views
Uros Popovic 1 years ago

Embedded bare-metal C with Bazel and AVR

Practical example of using Bazel to build an embedded C program, bare-metal. Concrete example with AVR ATmega328p.

0 views
Uros Popovic 1 years ago

Making a custom CPU

First part of the series explaining the development of a custom CPU called Mrav and the tooling for it. Lessons learned from working on Google TPU chips.

0 views
Uros Popovic 1 years ago

Cross-compiling C and Go via cgo with Bazel

Walkthrough for cross compiling a mixed C and Go binary for another platform using cgo and Bazel. Example is done with x86_64/Linux compiling for RISC-V/Linux.

0 views
Uros Popovic 1 years ago

Linux VM without VM software - User Mode Linux

Quick demonstration of using User Mode Linux (UML) to run a Linux VM inside Linux's userspace, without additional VM software or even root permissions

1 views
Uros Popovic 1 years ago

Machines build machines - AI creates a bootable VM

See how AI is pushing the boundaries of computer engineering. I'm sharing my journey driving AI to build a functional RISC-V 32-bit VM simulation, reaching the milestone of booting OpenSBI. Discover the process behind this AI-assisted journey and what's next on the path to a fully bootable Linux kernel and potentially an FPGA implementation.

0 views
Uros Popovic 1 years ago

Bare metal JavaScript on RISC-V

Explore how to run JavaScript directly on bare metal, like microcontrollers. This post shows you how to get JavaScript code executing on embedded hardware without an operating system, opening up new ways to program these chips. The example is done on a RISC-V VM.

0 views