Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,27 @@ u-root embodies four different projects.
For u-root on Linux, certain Kconfig options are necessary. Basic defconfigs are
in [`configs/`](configs/). See also the [configs README](configs/README.md).

# Demo

Below is a demo of what it looks like, on OSX (but tested on Linux too).
To recreate this demo:
```shell
git clone --depth 1 https://github.com/u-root/u-root
cd u-root/tools/testramfs
go build
GOARCH=amd64 GOOS=linux ./testramfs ../.. # ../.. is the path to u-root source
```

It goes by quickly, but the process of rewriting 115 commands into Go packages,
via the Go AST package (i.e. compiler front end); and recompiling all that
into one command and generating an initramfs, takes 7 seconds.
For arm64 and riscv64, the time is also about 7 seconds.
The entire set of commands, including VM boot and exit, is 31 seconds.
Note: you do not need to supply an amd64, arm64, or riscv64 kernel; it is
built-in to the package. GOARCH=arm64 and GOARCH=riscv64 work too.

[View Demo](https://htmlpreview.github.io/?https://github.com/u-root/u-root/blob/main/tools/testramfs/cinema/index.html)

# Usage

Make sure your Go version is >= 1.21.
Expand Down
13 changes: 13 additions & 0 deletions tools/testramfs/cinema/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/asciinema-player@3.6.3/dist/bundle/asciinema-player.min.css" />
Comment thread
orangecms marked this conversation as resolved.
</head>
<body>
<div id="demo"></div>
<script src="https://cdn.jsdelivr.net/npm/asciinema-player@3.6.3/dist/bundle/asciinema-player.min.js"></script>
<script>
AsciinemaPlayer.create('linux_amd64.cast', document.getElementById('demo'));
Comment thread
orangecms marked this conversation as resolved.
</script>
</body>
</html>
Loading