-
Notifications
You must be signed in to change notification settings - Fork 51
u-root: rewrite and clean up the chapters #195
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
4b808e2
to
fb637e3
Compare
src/u-root.md
Outdated
invocations are very fast, usually a millisecond or so. | ||
|
||
U-root blurs the line between script-based distros such as Perl Linux[^24] and | ||
u-root is an embeddable root file system intended to be placed in a flash |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
u-root is an embeddable root file system intended to be placed in a flash | |
u-root is a build system that can be used to generate a LinuxBoot userspace implemented in Go |
Does u-root include unique code or use other projects?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is both; u-root has its own sources for e.g. its commands such as ls, cat etc and boot loaders, corresponding libraries (pkg in Go terms) and so on, and uses other libraries and tools, vendored.
How about "u-root builds a root file system with a userspace implemented in Go"?
The project itself is not limited to Linux or particularly LinuxBoot, aiming to be a universal rootfs for any purpose.
I later learned that universal is what the u in u-root is for; I had first thought it was micro-.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well the next sentence already says that it's written in Go, so that would be redundant here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The u-root project consists of a build tool and sources to generate a root file system for use with a Linux kernel, suitable as part of a firmware image stored in a flash device.
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
... and I should not make half the sentence a link, but only the "Go, a modern, type-safe language" part.
## U-root and embedded systems | ||
## Embedded systems | ||
|
||
Embedding kernels and root file systems in BIOS flash is a common technique for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Embed" is used at several places in the article and it isn't clear what it means. At places it refers to placing the kernel and root file system as an image in a binary image, as opposed to on a filesystem or disc partition. And then it also seems to refer to embedded systems.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yea it's quite confusing, I agree; I'd keep this as-is for now and rethink it for another iteration
Both UEFI[^12] and AMT[^4] are embedded operating systems, loaded from flash that | ||
run network-facing software. Attacks against UEFI have been extensively | ||
studied[^9]. Most printers are network-attached and are a very popular | ||
## Safety and security |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be in # Benefits of using Go for firmware
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yea I thought about, and then again, this paragraph picks up this idea of "embedded systems" and is mostly generic.
I would rather, eventually, want to make this a dedicated chapter, and reference that from both a Go perspective (here) and possibly a Rust perspective at some point.
Since the init program itself is only 132 lines of code and is easy to change, | ||
## u-root design | ||
|
||
Designed to be a suitable option for embedded systems, the u-root build system |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah! Here it is a build system. It isn't possible to download official pre-built binaries, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is, though it's not being kept up to date. u-root is rather meant to be used for per-purpose customization, much like BusyBox and Buildroot.
I had set up https://github.com/linuxboot/u-root-builder with CI build artifacts attached, and later, Chris forked it (OOB, not on GitHub) to https://github.com/u-root/u-root-distro; it needs work to be kept up to date. This stuff was mainly used for workshops / trying things out.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://book.linuxboot.org/u-root-qemu-demo.html is based on the prebuilt binaries
format. It is usually compressed and contained in a Linux kernel image, known as | ||
`bzImage` on x86. A bootloader (for example, syslinux) or firmware (for example, | ||
coreboot) loads the kernel into memory and starts it. The Linux kernel sets up | ||
a RAM-based root file system and unpacks the u-root file system into it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe move this to generic docs since it isn't u-root specific?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yea, I'd like to do that in another iteration, just rephrased it a bit here to be more accurate
Drop outdated notes. The source build option had to be discarded since the Go toolchain kept growing in size. The shell has been changed over time, was Elvish at some point, is currently Gosh, and may change again. Remove redundant paragraphs between u-root.md and u-root-golang.md, referencing instead. Signed-off-by: Daniel Maslowski <[email protected]>
3278350
to
f5aab5b
Compare
Signed-off-by: Daniel Maslowski <[email protected]>
f5aab5b
to
8225607
Compare
Drop outdated notes. The source build option had to be discarded since the Go toolchain kept growing in size.
The shell has been changed over time, was Elvish at some point, is currently Gosh, and may change again.
Remove redundant paragraphs between u-root.md and u-root-golang.md, referencing instead.