master
Commits on Sep 1, 2021
-
cirrus ci: fix results parsing warning.
""" .cirrus.yml#L8 you've probably meant template_task """ Signed-off-by: David Hu <[email protected]>
Commits on Aug 27, 2021
-
kexec: Add the ability to use multiple cpio files
Sometimes users need to add files to the kexec cpio. A common request is to pass the kernel log buffer along. Modify kexec so that initramfs can now specify multiple cpio files, e.g. kexec -i 'a.cpio b.cpio c.cpio' The code uses strings.Fields, as that nicely handles the case of superfluous seperators, i.e. ' a b c ' returns [a b c]. Now, should someone desire to pass along, e.g., dmesg output, they can do this via script or programatically: mkdir /tmp/messageinabottle dmesg > /tmp/messageinabottle/log (cd /tmp && find messageinabottle -print | cpio -H newc -o > /tmp/m.cpio) kexec -i 'inird.cpio /tmp/m.cpio' A remaining question is how much of this work we ought to do in kexec. It could, for example, take a switch called extrafiles: kexec -extrafiles 'a b c' ... and build an in-memory cpio archive to be appended to the initrd. At some point, a line needs to be drawn, however, as to how much we put into a single command like kexec. Signed-off-by: Ronald G. Minnich <[email protected]>
Commits on Aug 26, 2021
-
uio: allow reading from io.Reader into a file at given path.
Signed-off-by: David Hu <[email protected]>
-
Signed-off-by: Rob Vandermeulen <[email protected]>
-
pkg/boot/menu: Fix panic while trying to restore terminal state
Calling term.Restore with oldstate == nil triggers a runtime error ( panic: runtime error: invalid memory address or nil pointer dereference ). Getting into this state is possible when the term.MakeRaw call fails, which can happen if /dev/tty ends up pointing to a broken serial console. With this change and a broken console, ShowMenuAndLoad will end up choosing the default entry instead of crashing itself. Signed-off-by: Rob Vandermeulen <[email protected]>
Commits on Aug 24, 2021
-
tools/makebb: add -c switch so it lists commands
In scripts, as used in, e.g., Harvey, it is important to know what commands are built into a bb. The glob passed to makebb will not always be the same as the actual commands that get built (there might be a match for a command that does not get built due to build constraints). The -c switch to bb will now list the commands that get built in. Signed-off-by: Ronald G. Minnich <[email protected]>
-
tools/vpdbootmanager: add usage description for set and delete
Signed-off-by: Johnny Lin <[email protected]>
-
pkg/vpd, tools/vpdbootmanager: add FlashromVpdSet method for 'set' an…
…d 'delete' By calling flashrom and vpd executables to set and delete vpd key-value. The ideal long-term method could be employing Linux mtd driver for writing flash VPD but this PR can provide a temporary workaround. Move pkg/ipmi/ocp/set_vpd.go to pkg/vpd/flashromvpd.go To set an existing vpd key to value: vpdbootmanager set key value If the key doesn't exist it would add it. To delete a key: vpdbootmanager delete key Signed-off-by: Johnny Lin <[email protected]>
-
Copy etc files to tmpfs and mount on etc
This change solves the problem of readonly initramfs updating the etc files. The init process copies the etc directory to /tmp/etc and bind mount to /etc. Tested: ``` ~/# mount none / rootfs rw 0 0 devtmpfs /dev devtmpfs rw,relatime 0 0 proc /proc proc rw,relatime 0 0 none /tmp tmpfs rw,relatime 0 0 devpts /dev/pts devpts rw,relatime,gid=0,mode=620,ptmxmode=666 0 0 none /dev/shm tmpfs rw,relatime 0 0 sysfs /sys sysfs rw,relatime 0 0 none /etc tmpfs rw,relatime 0 0 ~/# echo hihi >/tmp/etc/hello ~/# cat /etc/hello hihi ``` Signed-off-by: Medicine Yeh <[email protected]>
Commits on Aug 19, 2021
-
Add Block device filter checking for required partitions
This allows filtering for block devices that have a partitions 1,2,4 Signed-off-by: Colin Mitchell <[email protected]> Change-Id: I9f59e197b7376b1ac7e357b1fa00c2d7e1180054
Commits on Aug 18, 2021
-
Improve cmd/core/backoff test coverage
Signed-off-by: Christopher Meis <[email protected]>
-
Having valid time is important for HTTPS boot to work, as it prevents certificate validation failures due to invalid system time. This PR adds NTP support, enabled by default, to query NTP servers hard-coded in the image or returned by DHCPv4/v6. Failure to set time is not fatal and boot proceeds regardless. With no additional configuration and assumiong no NTP servers returned by the DHCP server, it's a no-op. Signed-off-by: Deomid "rojer" Ryabkov <[email protected]>
-
go get -u github.com/insomniacslk/dhcp go mod vendor go mod tidy Signed-off-by: Deomid "rojer" Ryabkov <[email protected]>
Commits on Aug 13, 2021
-
Move the modules warning before the build instructions
This caused trouble for someone today, as they followed the instructions in the order shown. Signed-off-by: Ronald G. Minnich <[email protected]>
Commits on Aug 12, 2021
-
[ntpdate] Take servers from cmdline, allow setting RTC
ntpdate(8) allows (in fact, requires) passing server(s) con the command line. Make u-root version allow that too. Default behavior of parsing servers from the config is preserved. Add -rtc that will set hardware clock along with system clock. Pull out the functionality into a library - this will be used in fbnetboot in a future PR. Signed-off-by: Deomid "rojer" Ryabkov <[email protected]>
-
[pkg/golang] Do not force rebuild of all packages
Go's caching is mature and can be trusted to detect changes. Signed-off-by: Deomid "rojer" Ryabkov <[email protected]>
Commits on Aug 11, 2021
-
Add a single test to each empty file
* These empty files are necessary for `go test` to instrument the package for code coverage. * Separately, our internal infra fails when a _test.go file contains no tests. Signed-off-by: Ryan O'Leary <[email protected]>
-
Use absolute path in wget tests
Our internal infra runs the subcommand under the wrong working directory. Signed-off-by: Ryan O'Leary <[email protected]>
-
Signed-off-by: Ryan O'Leary <[email protected]>
-
Check error return of wget Close method
Signed-off-by: Ryan O'Leary <[email protected]>
-
cmds/core/backoff: simple backoff command
backoff will run a command, repeatedly, with exponential backoff, until it succeeds or a timeout is passed. The default timeout is zero, meaning "run until success". The timeout is specified as a standard string duration, e.g. 30s, 10m, and so on. Signed-off-by: Ronald G. Minnich <[email protected]>
-
[tools/vpdbootmanager] Added command
get
And refactored pkg/vpd to be testable. The `get` command in vpdbootmanager allows to read VPD variables. Example: ``` ~/# vpdbootmanager get firmware_version firmware_version(RO) => 0.0.0 ``` If no arguments are passed to `get`, all the variables are read: ``` ~/# vpdbootmanager get firmware_version(RO) => 0.0.0 internal_versions(RO) => { "build_id": "6bc0645", ... } } } ~/# ``` Signed-off-by: Andrea Barberio <[email protected]>
Commits on Aug 10, 2021
-
Fix failed to unmount error message
The root cause was the wrong path of rmdir in (p *Pool) Mount(). Verified that this was caused by rmdir() with new error message format ``` 2021/08/06 10:21:05 Failed in UnmountAll: (Rmdir) directory not empty 2021/08/06 10:21:05 executing command "/bin/defaultsh" with args [] u-root-mounts716997181 ~/# ls /tmp/u-root-mounts716997181 sda sdb1 sdb2 ``` Signed-off-by: Medicine Yeh <[email protected]>
Commits on Aug 9, 2021
-
Add option to disable bootmenu edits and updated menu logic
Removed the spawned function in ShowMenuAndLoad in favor of file.SetDeadline(). Switched from Stdin to TTY to support this. Previous tests for menu.Choose spawned a xterm shell and had to use manual sleeps prevent races. The menu class used methods and member variables of xterm so a wrapper interface/class were made to support mocking+injection This shaved ~20s off the test time Signed-off-by: Colin Mitchell <[email protected]> Change-Id: I392d8e3d2629b8ae7cbf3b6fa47e9dbf2f28b015
-
trampoline: update for new version of gofmt
Run gofmt. Updates #2701. Signed-off-by: Than McIntosh <[email protected]>
-
trampoline: add an extremely rudimentary unit test
Add a unit test that invokes the main entry point in this package with bogus value, just to make sure it doesn't crash. This apparently needed so as to satify the CI coverage requirements. Updates #2701. Signed-off-by: Than McIntosh <[email protected]>
-
trampoline: fix assembly bugs in issue 2701 changes
Fix bugs in the assembly wrappers added to collect trampoline func addresses (missing return statements). Updates #2701. Signed-off-by: Than McIntosh <[email protected]>
-
trampoline: revise to work with Go 1.17 register ABI
Revises the recipe for obtaining the address (starting PC) of assembly routines from Go, so as to have something that works with the new (1.17+) register ABI. Fixes #2701. Signed-off-by: Than McIntosh <[email protected]>
Commits on Aug 3, 2021
-
Add build tags option to u-root command
Signed-off-by: Ryan O'Leary <[email protected]>
-
The old format was deprecated see "go help build". Signed-off-by: Ryan O'Leary <[email protected]>
Commits on Aug 1, 2021
-
Signed-off-by: Ryan O'Leary <[email protected]>
-
Require stringer be implemented for menu entries
We had a "hidden" dependency with the %s print. Signed-off-by: Ryan O'Leary <[email protected]>
Commits on Jul 30, 2021
-
vmtest: use same Go version to compile initramfs and Go tests
This makes sure the u-root initramfs as well as the Go tests to run in the VM are compiled with the same Go version as the test runner. Previously, if one did (cd integration/gotests && go1.13 test), the test runner and initramfs would be compiled with go1.13, but the Go VM tests would be compiled with `go` found in $PATH. Signed-off-by: Chris Koch <[email protected]>
-
uroot_test: add riscv to the build tests
Signed-off-by: Ronald G Minnich <[email protected]>
-
The big change is the switch to Go 1.15 and QEMU 6.0.0. This change fixes issues arising from this migration. This change also improves the logging of the gotest vmtest to help debug issues with this migration. Signed-off-by: Ryan O'Leary <[email protected]>