Releases: u-root/u-root
v0.14.0 - breaking u-root build system changes
Important
TL;DR: When Go modules are enabled, you won't be able to run u-root
from any arbitrary directory after this release. u-root
must be run somewhere with a Go module or Go workspace. (With GO111MODULE=off
the behavior should be as it always has been.)
u-root
will now work exactly when go build
works as well.
Use Go workspaces to compile commands from multiple modules together locally. A tool called goanywhere can create a workspace on the fly. Check out the README for more.
Go workspaces are not as suitable to be committed to a git repository. The recommended method for source-control-committed multi-module commands is described by the mkuimage README.
This change pulls in u-root/gobusybox#110, in which we stop supporting module builds without a go.mod. In essence, from this point forward, the u-root
tool will support builds exactly when go build
and go list
also work. u-root/gobusybox#110 reduces a lot of maintenance burden, trivially starts supporting Go workspaces and Go module replace directives, and increases gobusybox code's readability.
Multi-module builds can be done easily with standard Go methods, as described in the README. Go workspaces, vendored Go workspaces, Go modules, and vendored Go modules are all supported. Completely offline builds can easily done with vendored Go modules or workspaces.
For ease of use, the goanywhere tool was created. goanywhere
creates a temporary directory with a Go workspace of the given commands, and then execs a binary passing along the Go command paths. Use like goanywhere ./u-root/cmds/core/{init,gosh} ./cpu/cmds/cpud -- u-root [other u-root args]
. This approaches the easy usability of u-root
up to this point.
goanywhere
does not work with templates. goanywhere
only accepts file system paths at this time.
This also fixes the issue where binary
mode builds didn't always work in the same cases where gbb
builds worked. Both are now always supported in the exact same circumstances.
This change also pulls in u-root/mkuimage#28, in which we support generic template YAML files named ".mkuimage.yaml" in the current working directory or any of its parents. Templates support the existing command expansions, but also support configs (invoked with u-root -config=$config
) in which one can specify build configuration and mixed-builder (bb/binary) builds. They will be documented in a README at a later time.
Note
If you have any issues, please file an issue and use the last release before this change, which is v0.13.1
.
What's Changed
- cmds/core/df: remove redurant else by @binjip978 in #2933
- Add a playbook entry showing how to set verbose init by @rminnich in #2934
- pkg/dt: fix revive superfluous-else linter by @binjip978 in #2936
- Breaking change: u-root works exactly when go build or go list also work. by @hugelgupf in #2923
Full Changelog: v0.13.1...v0.14.0
v0.13.1
TL;DR
Maintenance release before the anticipated breaking change of #2923.
-
#2914 fixed a DHCP client forever hang introduced by #2845 in cases where the link never comes up.
-
cmds/boot/{systemboot,fbnetboot,localboot}
have been moved tocmds/exp/{systemboot,fbnetboot,localboot}
as they are less maintained than the remaining boot commands incmds/boot
.
What's Changed
- Enable GOCOVERDIR test coverage on dhclient test by @hugelgupf in #2905
- Modify boot.OSImages by @hugelgupf in #2902
- Collect pxeboot coverage by @hugelgupf in #2910
- Update uio by @hugelgupf in #2909
- update golangci-lint by @binjip978 in #2908
- Swap ubinary.NativeEndian for binary.NativeEndian by @hugelgupf in #2913
- dhclient: actually time out on DAD & routing by @hugelgupf in #2914
- move golangci-lint to config file by @binjip978 in #2912
- fix ST1005 incorrectly formatted error string by @binjip978 in #2915
- pkg/boot/bzimage: type should have the same receiver name by @binjip978 in #2916
- tools/testramfs: simplify clone flags by @binjip978 in #2917
- An update to vmtest by @hugelgupf in #2918
- pkg/spidev: uintptr can't be negative by @binjip978 in #2919
- fix deferring close before checking error by @binjip978 in #2920
- fix Printf with dynamic first argument and no further arguments by @binjip978 in #2921
- cmds/exp/ectool: add explicit type to constants by @binjip978 in #2922
- Remove kr/pty dependency by @hugelgupf in #2925
- Update README.md for Go version 1.21 by @johnnylinwiwynn in #2927
- nit: update precompiled arch kernel image url by @leongross in #2930
- fix linter version by @binjip978 in #2931
- Move less-maintained boot commands by @hugelgupf in #2924
Full Changelog: v0.13.0...v0.13.1
v0.13.0
Summary
- gosh is now the default shell. Head on over to #2900 if you have comments.
- elvish is scheduled for deletion in v0.14.0. Head on over to #2900 if you have comments.
- flash (SPI) tools have gotten a lot of improvements, try out the
cmds/fwtools/flash
command! Thank you @rminnich! - new commands:
cmds/core/nohup
, like the regularnohup
utility ("invoke a utility immune to hangups"). Thank you @binjip978!cmds/exp/dumpmemmap
, parses and dumps every interpretation of physical memory available on the system (/proc/iomem
,/sys/firmware/memmap
,/sys/firmware/fdt
, and/sys/kernel/debug/memblock
).
- kexec tooling has received cleanups, unit testing, and integration test coverage collection.
What's Changed
- build(deps): bump github.com/cloudflare/circl from 1.3.3 to 1.3.7 by @dependabot in #2842
- Increase test timeout to 15m by @hugelgupf in #2844
- dhclient: ensure DHCPv6 address is routable if using non-multicast address by @hugelgupf in #2845
- fix the mtd test if /dev/mtd0 can not be opened by @rminnich in #2846
- flash/op: add String() and Bytes() for OpCode by @rminnich in #2847
- Spidevchip by @rminnich in #2848
- pkg/flash: update flash to use chips package by @rminnich in #2849
- pkg/acpi: lift loop condition and remove Sprintf by @binjip978 in #2851
- fwtools/spidev: use the ID function from pkg spidev by @rminnich in #2853
- pkg/impi/ocp: remove comparison with boolean constants by @binjip978 in #2855
- Update vmtest, expand arm testing by @hugelgupf in #2857
- Update spidev command to use spidev.id by @rminnich in #2854
- pkg/gpio: wrap errors and remove second trim by @binjip978 in #2858
- Ping using x/net/icmp by @binjip978 in #2839
- pkg/tarutil: use testdata and a bit of test coverage by @binjip978 in #2860
- pkg/dhclient: wrap errors by @binjip978 in #2863
- wrap erros by @binjip978 in #2865
- New Docker Images & GH workflow to build them by @hugelgupf in #2867
- Retrigger build by @hugelgupf in #2868
- Enable console output for x86 kernel by @hugelgupf in #2869
- Pin versions in vmtest.yaml and enable multiboot and uefiboot tests by @hugelgupf in #2870
- Capitalize log statements by @hugelgupf in #2866
- cmds/exp/syscallfilter: build with more architectures by @binjip978 in #2871
- Collect coverage from kexec load commands by @hugelgupf in #2873
- Build edk2 univeral payload by @hugelgupf in #2875
- pkg/strace: fix linux/arm64 test by @binjip978 in #2876
- Spidevwrite by @rminnich in #2859
- kexec: memory map improvements (incl dumpmemmap command) by @hugelgupf in #2864
- cmds/core/hohup: nohup command by @binjip978 in #2861
- vfile: save memory by removing TOCTTOU protections by @hugelgupf in #2880
- memmap: rename /sys/firmware/memmap parser by @hugelgupf in #2881
- wrap errors by @binjip978 in #2879
- kexec: switch segments to use []byte by @hugelgupf in #2883
- FindSpace with options by @hugelgupf in #2878
- termios: support netbsd by @caarlos0 in #2882
- dt: API to create device trees compactly by @hugelgupf in #2885
- Tests for arm64 kexec, eliminate KexecOpts.Mmap{...} options by @hugelgupf in #2884
- kexec: remove JSON confg file by @hugelgupf in #2887
- fwtools/flash: allow user to set size and offset by @rminnich in #2889
- Reduce memory usage of amd64 userspace kexec by @hugelgupf in #2888
- Sfdp rules by @rminnich in #2890
- kexec arm64: also test memory map parsing logic, add ability to ignore additional pieces of physical memory by @hugelgupf in #2901
- Replace pkg/uio with uio/uio by @hugelgupf in #2896
- kexec,memory: some utilities by @hugelgupf in #2903
- Make gosh default shell by @hugelgupf in #2904
New Contributors
Full Changelog: v0.12.0...v0.13.0
v0.12.0
A lot has changed in ~1 year. The build system has better module support. Some improvements to the boot infrastructure. A lot of tinygo support. A better gosh shell.
What's Changed
- cmds/core/time: remove testutil by @binjip978 in #2602
- cmds/core/cmp: major cleanup; cmds/core/comm: minor cleanup, tinygo test works for both now by @rminnich in #2612
- cmds/core/time: make it build with tinygo, tidy up by @rminnich in #2613
- pkg/strace/epsocket: fix handling of IP4/IP6 by @rminnich in #2614
- vfile: add ability to ignore time conflicts by @hugelgupf in #2617
- cmds/exp/rush: make it build with tinygo by @rminnich in #2616
- boot: Load Options by @hugelgupf in #2618
- cmds/core/find: move command from main and add tests by @binjip978 in #2619
- boot: improved Load API by @hugelgupf in #2620
- cmds/core: rename commands in os/exec style by @binjip978 in #2624
- cmds/core/tar: add errors and end to end test by @binjip978 in #2625
- Introduce ipmi.OpenPath and make blobs.BlobStats public. by @chrisfenner in #2621
- Upgrade dhcp by @hugelgupf in #2627
- replace raw casts with a helper type for blob IDs by @chrisfenner in #2630
- boot: serialize downloaded image info for reload by @10000TB in #2629
- cmds/core/tail: fix follow by @binjip978 in #2628
- build(deps): bump golang.org/x/net from 0.1.0 to 0.7.0 by @dependabot in #2623
- pkg/ldd: filter dependencies without a filesystem path by @florianGla in #2633
- Tinygorush by @rminnich in #2634
- build(deps): bump golang.org/x/crypto from 0.0.0-20210921155107-089bfa567519 to 0.1.0 by @dependabot in #2636
- cmds/core/mktemp: remove testutil by @binjip978 in #2626
- menu: allow passing in loadOptions by @10000TB in #2637
- cmds/core/free: remove global flags and add tests by @binjip978 in #2638
- Remove the dependency on un-idiomatic Go strings for IPMI blobs. by @chrisfenner in #2640
- id remove testutils, add more tests by @binjip978 in #2641
- u-root command: add checkArgs function by @rminnich in #2642
- Simplify smbios_transfer and fix typos by @chrisfenner in #2643
- Add allowlist filtering for PCI devices by @andrewsun2898 in #2639
- cmds/core/base64: remove deprecated ioutil by @binjip978 in #2644
- cmds/core/gosh: replace go-prompt with bubbline by @MDr164 in #2606
- cmds/core/tail: use io.SeekEnd instead of deprecated os.SEEK_END by @binjip978 in #2645
- Dd for tinygo by @rminnich in #2646
- Tinygoupdate by @rminnich in #2647
- pkg/uzip: remove deprecated by @binjip978 in #2648
- cmds/exp/ssh: remove ioutil and double import by @binjip978 in #2650
- Add CreateTeeWriter function to logutil by @andrewsun2898 in #2652
- cmds/core/hexdump: use constants and os.WriteFile by @rminnich in #2651
- grep remove testutil by @binjip978 in #2649
- cmds/core/time: add -p flag to time command by @binjip978 in #2653
- cmds/core/wc: fix bug with early quit if file is not exists by @binjip978 in #2654
- Add correct tags and files such that govulncheck works by @rminnich in #2656
- netboot: trim down heap allocations. by @10000TB in #2655
- cmds/core/grep: fix line number (-n) by @binjip978 in #2658
- Strings format by @binjip978 in #2663
- Add file limit to cpio file creation by @andrewsun2898 in #2659
- cmds/core/wget: allow args after URL by @rminnich in #2672
- tamago: update to tamago 1.20.3 by @rminnich in #2673
- README.md: adjust -files documentation mistake and example by @rminnich in #2674
- pkg/boot/grub: Add multiboot2 and module2 grub keywords by @ShellyChang110 in #2664
- cmds/core/gosh: make autocomplete disable-able by @rminnich in #2675
- cmds/core/grep: add fixed strings flag by @binjip978 in #2677
- build(deps): bump github.com/cloudflare/circl from 1.1.0 to 1.3.3 by @dependabot in #2679
- Idea on how to fix: fork syscall bug by @robertmin1 in #2671
- cmds/core/grep: fix -l flag not showing filenames by @binjip978 in #2680
- cmds/core/grep: fix empty fixed-string by @binjip978 in #2683
- gosh: add a -interactive switch to disable terminal noise by @rminnich in #2684
- sync roadmap with current state of core commands by @binjip978 in #2686
- README: fix reference to bb docs, add note on templates by @orangecms in #2688
- HSS: Support reading HSS from EEPROM by @ylchenfj in #2690
- README: use internal references in description, dedup notes on embedding initramfs by @orangecms in #2689
- sort -C and -u flags by @binjip978 in #2691
- Add basic GRUB default boot entry support by @ShellyChang110 in #2693
- cmds/core/sort: add -f flag consider all chars uppercase by @binjip978 in #2694
- cmds/core/sort: add -b ignore blanks option by @binjip978 in #2695
- Remove unused DCE test by @hugelgupf in #2696
- cmds/core/sort: ignore blanks break ties by length by @binjip978 in #2697
- fix typo in help flags by @elee1766 in #2698
- Add stdin, stdout, stderr options to StartShell struct by @andrewsun2898 in #2699
- cmds/core/gosh: reintroduce nocomp mode without bubbline by @MDr164 in #2685
- cmds/core/sort: add numeric flag by @binjip978 in #2704
- pkg/dt: look-up direct children and prune sub-trees by @DavidDecotigny in #2708
- update to go-tpm 0.9.0 by @chrisfenner in #2703
- pkg/ldd: show Stderr output of interpreter in case of ExitError by @jochil in #2710
- grep improvements by @elee1766 in #2712
- build(deps): bump google.golang.org/grpc from 1.27.1 to 1.53.0 by @dependabot in #2713
- Update containerd/console version by @andrewsun2898 in #2715
- cmds/core/grep: remove unused struct and rearrange fields by @binjip978 in #2714
- use -s and -q as quite, remove global params by @binjip978 in #2716
- boot/localboot/grub.go: Fix typo by @ArthurHeymans in #2717
- cmds/core/find: add missing file types by @binjip978 in #2719
- Set default bubbline window size by @andrewsun2898 in #2720
- Introduce basic test for pkg/tss by @chrisfenner in #2722
- pkg/ls:FromOSFileInfo: fix a panic if fi.Sys() returns the wrong type by @rminnich in #2723
- kcmdline: improve command-line parsing & tests by @hugelgupf in #2718
- Fix argument name for shasum command by @a-urth in #2709
- Update README.md by @hugelgupf in #2729
- gosh: make tab complete optional at build by @hugelgupf in #2728
- Update gobusybox by @hugelgupf in #2727
- update test images by @rminnich in #2732
- strace: add riscv64 to pkg and cmd by @rminnich in #2730
- cmds/core/ping: fix counter bug by @binjip978 in #2724
- Change to use 'pxeboot' and 'boot' commands for systemboot since they are better maintained and used by @ShellyChang110 in #2705
- Add a playbook for solving problems...
v0.11.0
What's Changed
- cmds/core/which: fix default usage by @binjip978 in #2515
- bump release to v0.10.0 by @MDr164 in #2516
- pkg/dhclient: Allow custom client v6 port by @birdperson-lives in #2518
- pkg/syscallfilter: remove test obsoleted by go 1.19 by @rminnich in #2519
- update golang version of project and testimages to 1.19 by @RiSKeD in #2510
- Add
-cmdline
tofbnetboot
to override kernel cmdline args by @staticfloat in #2524 - cmds/core/shasum: work with multiple files by @binjip978 in #2525
- cmds/core/uniq: add ignore case flag by @binjip978 in #2520
- cmds/core/tail restructure for better test coverage by @binjip978 in #2526
- pkg/cpio: add utility function WriteRecordsAndDirs by @rminnich in #2532
- efivarfs: Fix fs_test.go to end with mutable file by @birdperson-lives in #2531
- cmds/core/tail: fix issue with multiple new lines by @binjip978 in #2533
- cmds/core/readlink: remove testutil by @binjip978 in #2534
- Rewrite cpio pkg tests as fuzzy tests by @RiSKeD in #2528
- fix unchecked errors in cmds/exp/netbootxyz & pkg/boot by @RiSKeD in #2539
- Fuzzing for grub related parsing by @RiSKeD in #2535
- cmds/core/ip: parse gateway IP instead of CIDR by @Lencerf in #2541
- pkg/boot/syslinux: fuzzing for syslinux configs by @RiSKeD in #2536
- oss-fuzz integration prep: add dictionaries & .options to improve fuz… by @RiSKeD in #2543
- pkg/pty/pty_test:Skip test if /dev/tty does not exist by @Lencerf in #2548
- add loong64 for ubinary by @zhangwenlong8911 in #2545
- termios: Support FreeBSD by @patmaddox in #2544
- Fix broken link by @leongross in #2546
- Fix broken CRC32 checks for signed bzimage files. by @abrender in #2547
- libinit: Implement ErrNoModulesFound by @Foxboron in #2501
- CI: replace golint with revive and run ineffassign in subdirectories by @RiSKeD in #2530
- cmds/core/cat: don't pass cmdline args as a [FILE] by @binjip978 in #2552
- Add missing syscall import in Darwin by @patmaddox in #2553
- Fix error checking fbnetboot/main.go by @abrender in #2556
- Improvement: Make gosh work by @ChriMarMe in #2554
- [fbnetboot] Fix error in retry logic. by @abrender in #2557
- [fbnetboot] Change type assertion to errors.As by @abrender in #2558
- pkg/dt: Move kernel-independent parts of parsing to fdt.go by @rminnich in #2560
- cmds/exp/gosh: fuzzing of gosh cmd by @RiSKeD in #2555
- pkg/dt: create idiomatic New(), minimize Linux special-ness by @rminnich in #2561
- [oss-fuzz integration]: misc fixes in fuzzing tests by @RiSKeD in #2562
- cmds/core/tee add test coverage by @binjip978 in #2542
- Tamago ci by @rminnich in #2564
- esxi, ipxe & smbios pkg: additional fuzzing tests by @RiSKeD in #2565
- cmds/core/wget: remove testutil by @binjip978 in #2540
- gotest: run benchmarks in VMs by @hugelgupf in #2581
- Remove old busybox by @hugelgupf in #2584
- Small independent fixes of #2583 by @hugelgupf in #2586
- binary builder: basic test by @hugelgupf in #2587
- Support Go package paths & GBB_PATH by @hugelgupf in #2588
- Actually compile Go VM tests; halve CircleCI test time by @hugelgupf in #2589
- pkg/termios: add openbsd support by @bradfitz in #2593
- cmds/core/tr: increase coverage and remove testutil by @binjip978 in #2585
- Move gosh to cmds/core by @jensdrenhaus in #2598
- pkg/termios: fix darwin regression from previous commit, add tests by @bradfitz in #2594
- Add debugfs to libinit by @ericvh in #2596
- Add ttyhvc0 to libinit by @ericvh in #2597
- Forthcleanup -- fix up code, tests, etc. by @rminnich in #2601
- cifuzz: do not report non-reproducible crashes by @RiSKeD in #2600
- cmds/core/cat: handle "-" to comply with POSIX by @binjip978 in #2567
- Fix follow mode in tail by @ericvh in #2595
- [mktemp] Remove hard coded /tmp in mktemp_test.go by @abrender in #2563
- cmds/core/ip: fix arg parsing by @Lencerf in #2605
- Tinygoize by @rminnich in #2604
- bump to v-1.11.0 by @rminnich in #2608
New Contributors
- @birdperson-lives made their first contribution in #2518
- @staticfloat made their first contribution in #2524
- @zhangwenlong8911 made their first contribution in #2545
- @patmaddox made their first contribution in #2544
- @leongross made their first contribution in #2546
- @bradfitz made their first contribution in #2593
- @ericvh made their first contribution in #2596
Full Changelog: v0.10.0...v0.11.0