Skip to content
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

The Big Merge - Welcome SystemBoot #1255

Merged
merged 137 commits into from
Jun 19, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
137 commits
Select commit Hold shift + click to select a range
d74b17e
Initial commit
insomniacslk Apr 23, 2018
dba59c4
Added uinit program
insomniacslk Apr 23, 2018
4b915e4
Create README.md
insomniacslk Apr 23, 2018
fef93d9
Update README.md
insomniacslk Apr 23, 2018
10dc861
Fixed import paths
insomniacslk Apr 24, 2018
6d6e247
Adding .stickler.yml
stickler-ci Apr 24, 2018
ea0fcf3
Merge pull request #1 from insomniacslk/add-stickler-config
insomniacslk Apr 24, 2018
01a649d
grub parser supports linuxefi and initrdefi too
insomniacslk Apr 24, 2018
8a166e5
Merge branch 'master' of github.com:insomniacslk/systemboot
insomniacslk Apr 24, 2018
e1d9145
Escape quoted dollar sign for grub2 config
insomniacslk Apr 25, 2018
94815ef
UserClass is now a command line option
insomniacslk Apr 27, 2018
49267da
Validating downloaded file path
insomniacslk Apr 30, 2018
9b17daa
Replaced debug flag with quiet flag
insomniacslk Apr 30, 2018
8100453
Handling HTTP status code != 200
insomniacslk Apr 30, 2018
83c782f
Fixed typo in format string
insomniacslk Apr 30, 2018
5f13300
Default user class set to "linuxboot"
insomniacslk May 1, 2018
991415d
Added simple VPD library (#7)
insomniacslk May 4, 2018
7253829
Added Travis-CI configuration (#9)
insomniacslk May 4, 2018
98e9899
Fix tests on go1.10 (#10)
insomniacslk May 4, 2018
b4b12f9
Refactored into function to get GPT table info, and more verbose output
insomniacslk May 15, 2018
44e368e
More verbose netboot output
insomniacslk May 15, 2018
eaa59c3
Added booter support, NullBooter and NetBooter (#15)
insomniacslk May 16, 2018
9ecf70b
Add TPM 1.2 / 2.0 support (#17)
May 24, 2018
410d4af
Add RSA signature verification and crypto package
May 24, 2018
be208d1
Redesigned to have a TPM interface and TPM1 and TPM2 implementations
insomniacslk May 25, 2018
16260fb
Linter
insomniacslk May 25, 2018
901e8cf
Addressed feedback, and added error check
insomniacslk May 28, 2018
4f8da5b
Merge pull request #21 from insomniacslk/tpm_interface
May 28, 2018
1a9282e
created tpm.Info, refactored around it. Fixed potential FD leak
insomniacslk May 28, 2018
f1f27a8
Merge pull request #22 from insomniacslk/tpm_info
May 28, 2018
c33b6c8
Fix return error, add test vars documentation
May 28, 2018
30c2aea
Add RSA signature verification and crypto package (#20)
insomniacslk May 28, 2018
16aa9e4
Bugfixes for tpm1 code, refactoring, and tested NewTPM (#23)
insomniacslk May 29, 2018
788d78f
[tpm] unit test TPM1.ReadPCR
insomniacslk May 30, 2018
1a2ce8a
Reverted previous commit that I pushed without PR
insomniacslk May 30, 2018
d033d92
[tpm] unit test TPM1.ReadPCR
insomniacslk May 30, 2018
1d0fb81
Also tested negative case
insomniacslk May 30, 2018
7c2d412
Merge pull request #27 from insomniacslk/tpm_test_readpcr
May 30, 2018
455537d
Add initial recovery interface (#24)
Jun 12, 2018
defd25c
Move features from localboot into generic diskutils package (#29)
Jun 12, 2018
1f46a77
Feed hw random into /dev/random to fill entropy pool (#19)
Jun 12, 2018
476b594
Create LICENSE (#30)
insomniacslk Jun 12, 2018
0d9f898
TPM1 extension and fixes (#31)
Jun 15, 2018
26a7d75
Update README.md
insomniacslk Jun 15, 2018
6ceac52
Added CodeCov support
insomniacslk Jun 16, 2018
85bfd8d
Merge pull request #33 from systemboot/codecov2
Jun 17, 2018
d8e3c1e
Add function for getting mountpoint by device (#34)
Jun 21, 2018
0b3658e
Add TPM reseal support (#35)
Jun 22, 2018
b30b38f
Add crypto extensions [1/3] (#36)
Jul 11, 2018
a642c9c
Updated import paths from insomniacslk to systemboot (#39)
insomniacslk Jul 11, 2018
0e09a2b
Added pkg/booter/README.md (#40)
insomniacslk Jul 27, 2018
49d849a
Simplify localboot/BootConfig and add -dryrun
insomniacslk Aug 5, 2018
bd5a022
Merge pull request #42 from systemboot/simplify_localboot_bootconfig
Aug 6, 2018
613d9ea
Added BootConfig definition
insomniacslk Aug 6, 2018
b070291
omitempty and devictree
insomniacslk Aug 6, 2018
ddfe370
added missing omitempty
insomniacslk Aug 6, 2018
4ea052b
Added BootConfig definition (#43)
insomniacslk Aug 6, 2018
9c2d597
Added list of projects that use systemboot
insomniacslk Aug 6, 2018
8ff069a
comma to dot
insomniacslk Aug 6, 2018
63b7d05
Added list of projects that use systemboot (#44)
insomniacslk Aug 6, 2018
fd6bdec
Added ManifestConfig (#47)
insomniacslk Aug 7, 2018
2b34416
Updated usage of dependencies (#49)
insomniacslk Aug 13, 2018
a36ddde
pkg/bootconfig: Added Manifest.GetBootConfig, and tests
insomniacslk Aug 28, 2018
c7bd23f
Added systemboot banner (#53)
insomniacslk Aug 30, 2018
33bfbbe
Switched to indexes instead of names; names are now optional
insomniacslk Aug 31, 2018
f4bfc9f
Removed stale comment
insomniacslk Aug 31, 2018
11cab82
Merge branch 'master' into bootconfig_getbootconfig_and_tests
insomniacslk Aug 31, 2018
167a6ee
pkg/bootconfig: Added Manifest.GetBootConfig, and tests (#51)
insomniacslk Aug 31, 2018
9bbda24
Added FromZip to unpack boot configurations from a zip file (#54)
insomniacslk Sep 25, 2018
ea47e2e
localboot: added grub and path mode, and registered localbooter for V…
insomniacslk Sep 28, 2018
2394465
Fix return value for NetBooter.Boot (#58)
insomniacslk Oct 2, 2018
22ca8e2
README: Fix link to OpenCellular wiki (#59)
rnestler Oct 7, 2018
6dee006
Updated README.md with build instructions (#60)
insomniacslk Oct 25, 2018
e02f9c5
Make the invalid fields message more chatty (#61)
rminnich Oct 25, 2018
bf59668
Support blockdev stats for kernel 4.18+ (#62)
insomniacslk Oct 25, 2018
a0f8cbd
TravisCI: build systemboot with u-root
insomniacslk Oct 25, 2018
d9c57b8
Build on 1.10 and 1.11 as 1.8 and 1.9 are too old
insomniacslk Oct 25, 2018
6606c22
More verbosity in the CI
insomniacslk Oct 25, 2018
d1c0613
Merge pull request #64 from systemboot/build_systemboot_ci
Oct 26, 2018
0809fc6
Unified pkg/bootconfig/BootConfig and localboot/BootConfig (#65)
insomniacslk Oct 26, 2018
0da2895
Call KexecBin with the right parameter order
insomniacslk Oct 27, 2018
2157e7d
Merge pull request #67 from systemboot/fix_kexecbin
Oct 27, 2018
d3d49d9
Added coreboot diagram
insomniacslk Nov 4, 2018
daf790e
Merge pull request #68 from systemboot/diagram
Nov 4, 2018
686b5f4
Remove TSS from systemboot (#69)
Nov 12, 2018
12a6042
Update to reflect dhcp new Exchange interface
insomniacslk Nov 27, 2018
0ff1867
Added badges; updated .gitignore
insomniacslk Nov 27, 2018
e6718e1
RFC: netboot from all interfaces (#73)
Natolumin Nov 29, 2018
ac46a48
Add TPM measurement support
insomniacslk Nov 30, 2018
8ae3e19
logging TPM opening errors
insomniacslk Dec 1, 2018
d8a4968
Simplified interface
insomniacslk Dec 1, 2018
b38c402
Add TPM measurement support (#76)
insomniacslk Dec 3, 2018
5973dd7
uinit: Don't lose debug output in default cmds
Natolumin Nov 30, 2018
601595f
Bootconfig fixes/improvements (#79)
Natolumin Dec 4, 2018
8595959
add DHCPv4 support (#80)
pmazzini Dec 8, 2018
1d0973a
Added info about linuxboot book
insomniacslk Dec 8, 2018
72475fe
pkg/bootconfig: refactored, and added NewManifest
insomniacslk Dec 20, 2018
c797e5c
Drop support for Go 1.10
insomniacslk Jan 15, 2019
6be15bc
localboot: added newlines where missing
insomniacslk Jan 23, 2019
73e30c4
Added info to build and run on Qemu
insomniacslk Jan 27, 2019
b5bdb0b
netboot: added support for retryable HTTP failures
insomniacslk Feb 5, 2019
f4fd778
netboot: added delay for HTTP retries
insomniacslk Feb 6, 2019
5156563
Fix netboot for dhcpv4 having invalid argument type (#103)
rctl Mar 14, 2019
2cb3e04
Add cacert support to netboot
BigValen Mar 12, 2019
6a7bef8
Update to Go 1.12
insomniacslk Apr 2, 2019
c4e0a62
Add vpd util to manage boot entries
rctl Mar 14, 2019
495cfe4
[netbooter] pass the correct flags to netboot
insomniacslk Apr 12, 2019
d17ec5c
Don't read CA Certs from VPD, read them from the filesystem instead
Apr 15, 2019
108c4c8
Scaffolding for fixmynetboot
insomniacslk Apr 15, 2019
c9f8d74
Scaffolding for fixmynetboot
insomniacslk Apr 15, 2019
459d837
Merge branch 'fixmynetboot' of github.com:systemboot/systemboot into …
insomniacslk Apr 16, 2019
fe11527
Scaffolding for fixmynetboot (#111)
insomniacslk Apr 16, 2019
23b30c2
[fixmynetboot] added check for local unicast addresses
insomniacslk Apr 17, 2019
81e519e
[pkg/checker] refactored fixmynetboot in pkg/checker and cli
insomniacslk Apr 18, 2019
8bb5c4b
[fixmynetboot] add ethtool checks
insomniacslk Apr 18, 2019
0dc2cff
[checker] Added CommandExecutor checker
insomniacslk Apr 29, 2019
872d1ce
[checker] Explicitly set stdin/out/err in CommandExecutor
insomniacslk Apr 30, 2019
e54affd
Add docker/qemu integration test run to travis.yml
yarikk May 1, 2019
ff04b81
[netboot] Call fixmynetboot if netboot fails
insomniacslk May 3, 2019
b5f8835
Remove kexecbin package support
zaolin May 13, 2019
c4936da
uinit: Add interactive mode
zaolin May 14, 2019
4b9fc5d
add config flag to selct bootconfig
jensdrenhaus Mar 1, 2019
e50761f
Merge pull request #105 from systemboot/bootconfig-flag
zaolin Jun 5, 2019
14e7509
Merge branch 'master' into interactive
zaolin Jun 5, 2019
1695fcd
invert interactive flag, only forbig user interaction, don't change s…
tfg13 Jun 5, 2019
74360c9
Merge pull request #124 from systemboot/interactive
Jun 5, 2019
42c3375
Efi integration (#106)
jensdrenhaus Jun 7, 2019
73a89e2
Merge remote-tracking branch 'systemboot/master' into big-merge-3
hugelgupf Jun 19, 2019
9ddf883
Move systemboot commands.
hugelgupf Jun 7, 2019
46d9e44
systemboot: fix up imports to use u-root packages
hugelgupf Jun 7, 2019
3ddab31
Vendor systemboot dependencies
hugelgupf Jun 19, 2019
4998982
Combine READMEs from u-root and systemboot
hugelgupf Jun 7, 2019
78b7afa
Fix systemboot lint errors
hugelgupf Jun 7, 2019
735afdc
Add license declaration to systemboot files
hugelgupf Jun 7, 2019
8f592f9
Remove systemboot Travis configuration
hugelgupf Jun 19, 2019
6ed3522
Fix up systemboot uinit to use fbnetboot
hugelgupf Jun 19, 2019
941d0ed
Add systemboot template, which includes systemboot uinit
hugelgupf Jun 19, 2019
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,4 @@ vmlinux

# Vim swap files
*.swp
.*.swp
5 changes: 5 additions & 0 deletions .stickler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
linters:
golint:
fixer: true
fixers:
enable: true
104 changes: 103 additions & 1 deletion Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

74 changes: 62 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,29 +7,75 @@

# Description

u-root contains simple Go versions of many standard Linux tools, similar to
busybox. It's a pure Go userland!
u-root embodies four different projects.

u-root stands for "universal root". It can create an initramfs in two different
modes:
* Go versions of many standard Linux tools, such as [ls](cmds/core/ls/ls.go),
[cp](cmds/core/cp/cp.go), or [shutdown](cmds/core/shutdown/shutdown.go). See
[cmds/core](cmds/core) for most of these.

* source mode: Go toolchain binaries + simple shell + Go source for tools to
be compiled on the fly by the shell.
* Go bootloaders that use `kexec` to boot Linux or multiboot kernels such as
ESXi, Xen, or tboot. They are meant to be used with
[LinuxBoot](https://www.linuxboot.org). With that, parsers for
[GRUB config files](pkg/diskboot) or [syslinux config files](pkg/syslinux)
are to make transition to LinuxBoot easier.

* A way to create very small Go programs using
[busybox mode](pkg/uroot/builder/bb/README.md) or source mode (see below).

* A way to create initramfs (an archive of files) to use with Linux kernels.

# Creating Initramfs Archives

u-root can create an initramfs in two different modes:

* source mode includes Go toolchain binaries + simple shell + Go source files
in the initramfs archive. Tools are compiled from source on the fly by the
shell.

When you try to run a command that is not built, it is compiled first and
stored in tmpfs. From that point on, when you run the command, you get the
one in tmpfs. Don't worry: the Go compiler is pretty fast.

* bb mode: One busybox-like binary comprising all the Go tools you ask to
include.
include. See [here for how it works](pkg/uroot/builder/bb/README.md).

In this mode, u-root copies and rewrites the source of the tools you asked
to include to be able to compile everything into one busybox-like binary.

# Contributing
# SystemBoot

For information about contributing, including how we sign off commits, please
see CONTRIBUTING.md
SystemBoot is a set of bootloaders written in Go. It is meant to be a
distribution for LinuxBoot to create a system firmware + bootloader. All of
these use `kexec` to boot. The commands are in [cmds/boot](cmds/boot).

* `pxeboot`: a network boot client that uses DHCP and HTTP or TFTP to get a
boot configuration which can be parsed as PXELinux or iPXE configuration
files to get a boot program.

* `fbnetboot`: a network boot client that uses DHCP and HTTP to get a boot
program based on Linux, and boots it. To be merged with `pxeboot`.

* `localboot`: a tool that finds bootable kernel configurations on the local
disks and boots them.

* `boot2`: similar to `localboot`, finds a bootable kernel configuration on
disk (GRUB or syslinux) and boots it. To be merged into `localboot`.

* `uinit`: a wrapper around `netboot` and `localboot` that just mimicks a
BIOS/UEFI BDS behaviour, by looping between network booting and local
booting. The name `uinit` is necessary to be picked up as boot program by
u-root.

This project started as a loose collection of programs in u-root by various
LinuxBoot contributors, as well as a personal experiment by
[Andrea Barberio](https://github.com/insomniacslk) that has since been merged
in. It is now an effort of a broader community and graduated to a real project
for system firmwares.

More detailed information about the build process for a full LinuxBoot firmware
image using u-root/systemboot and coreboot can be found in the
[LinuxBoot book](https://github.com/linuxboot/book) chapter 11,
[LinuxBoot using coreboot, u-root and systemboot](https://github.com/linuxboot/book/blob/master/11.coreboot.u-root.systemboot/README.md).

# Usage

Expand All @@ -45,9 +91,12 @@ You can now use the u-root command to build an initramfs. Here are some
examples:

```shell
# Build a bb-mode cpio initramfs of all the Go cmds in ./cmds/...
# Build a bb-mode cpio initramfs of all the Go cmds in ./cmds/core/...
u-root -build=bb

# Generate a bb-mode archive with bootloaders
u-root -build=bb core boot

# Generate a cpio archive named initramfs.cpio.
u-root -format=cpio -build=source -o initramfs.cpio

Expand Down Expand Up @@ -157,7 +206,8 @@ If you want to see u-root on real hardware, this

# Contributions

See [CONTRIBUTING.md](CONTRIBUTING.md)
For information about contributing, including how we sign off commits, please
see [CONTRIBUTING.md](CONTRIBUTING.md).

Improving existing commands (e.g., additional currently unsupported flags) is
very welcome. In this case it is not even required to build an initramfs, just
Expand Down
Loading