Originally posted by shmerl
View Post
https://www.usenix.org/system/files/...er-minnich.pdf
The challenge to using Go in a storage-constrained environment such as firmware is that advanced language features lead to big binaries.
Even a date program is about 2 MiB. One Go binary, implementing one function, is twice as large as a BusyBox binary implementing many functions.
As of this writing, a typical BIOS FLASH part is 16 MiB.
Fitting many Go binaries into a single BIOS flash part is not practical.
The Go compiler is very fast and its sheer speed points to a solution: to compile programs only when they are used.
We can build a root file system which has almost no binaries except the Go compiler itself.
The compiled programs and packages can be saved to a RAM-based file system.
U-root is our proof of concept of this idea.
U-root contains only 5 binaries, 4 of them from the Go toolchain ,and the 5th an init binary.
The rest of the programs are contained in BIOS FLASH in source form, including packages.
The general idea is ease of use and probably ease of downstream modification to fix issues, as you are shipping mostly source files and not binaries. Remember that this thing is still supposed to give freedoms to the end user.
Leave a comment: