https://github.com/ryanwebber/dolly-linux
A toy x86_64 linux userspace
https://github.com/ryanwebber/dolly-linux
Last synced: 5 months ago
JSON representation
A toy x86_64 linux userspace
- Host: GitHub
- URL: https://github.com/ryanwebber/dolly-linux
- Owner: ryanwebber
- Created: 2025-03-01T04:05:07.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-03-12T05:25:25.000Z (over 1 year ago)
- Last Synced: 2025-03-12T06:25:43.808Z (over 1 year ago)
- Language: C
- Homepage:
- Size: 123 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Dolly Linux
[](https://github.com/ryanwebber/dolly-linux/actions/workflows/docker-image.yml)
A toy x86_64 linux userspace made from scratch, as a learning exercise.

## Plan
- [x] Build a kernel
- [x] Implement an init binary
- [x] Construct the initramfs
- [x] Package and build a bootable disk image
- [x] Implement a bare minimum libc and libc runtime
- [x] Statically link binaries with our own libc
- [ ] Implement BSS zero-ing in crt0
- [ ] Implement a basic terminal emulator
- [ ] Try and port some simple software
- [ ] Mount a persistent filesystem
- [ ] Implement an installer in the live image?
- [ ] Implement an x-server implementation?
- [ ] Implement dynamic linking support?
- [ ] Implement a bootloader?
## Building
With the dependencies installed, the image can be build with the default cmake target.
```sh
mkdir build && cd build
cmake ..
make
```
Buiding with docker (or podman) is also supported.
```sh
podman build -t dolly-linux .
podman cp dolly-linux:/distbuild/build/x86_64-dolly-linux.iso .
```
Note: Build has only been tested on arm64 macOS, so cross-compilation is the default behavior.
## Developing
With the [Dev Containers](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers)
extension installed in VSCode, the project will automatically be mounted in a development container with
all the necessary dependencies installed. From here, you can attach a terminal to the container (or use
the built-in terminal) to run `cmake` and build the image, and changes to the source will be reflected
on the host filesystem.