Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
187 commits
Select commit Hold shift + click to select a range
598c62a
pkg/securelaunch: use bytes.Equals instead bytes.Compare
binjip978 Apr 10, 2025
9640da5
cmds/exp/netbootxyz: fix staticcheck gosimple issues
binjip978 Apr 12, 2025
5b7ddb7
pkg/boot/universalpayload: omit comparison with boolean constant
binjip978 Apr 12, 2025
5b03078
pkg/boot/menu: omit redundant nil check
binjip978 Apr 12, 2025
c2c4fe8
cmds/exp/tcpdump: use String() instead of fmt.Sprintf
binjip978 Apr 12, 2025
1e6b090
cmds/core/netcat: eliminate dead condition
Apr 11, 2025
54895c5
pkg/netcat: move SSLOptions.GenerateTLSConfiguration() to temporary s…
Apr 11, 2025
b7e857a
netcat: clean up SSL option processing
Apr 11, 2025
e3be209
integration/generic-tests/netcat_test: make netcatVM() variadic
Apr 14, 2025
b5d4025
integration/generic-tests: add netcat SSL tests
Apr 14, 2025
eb2382b
cmds/core/netcat: clean-up usage message
Apr 10, 2025
ee241b0
build(deps): bump golang.org/x/net from 0.37.0 to 0.38.0
dependabot[bot] Apr 16, 2025
b5e3690
pkg/watchdogd: remove cleanup loop
binjip978 Apr 13, 2025
98badbe
pkg/boot/bls: remove redundant brake
binjip978 Apr 17, 2025
665a02a
golangci: add gosimple (part of staticcheck) linter
binjip978 Apr 17, 2025
4606a94
cmds/core/echo: use ReplaceAll
binjip978 Apr 19, 2025
41e46d4
pkg/smbios: Provide a new method to get SMBIOS3 header size
AjanZhong Apr 3, 2025
443bcfe
pkg/boot/universalpayload: Provide SMBIO3 info in device tree
AjanZhong Apr 3, 2025
90ae175
pkg/boot/universalpayload: Separate Load method to Load and Exec
AjanZhong Apr 10, 2025
3331571
pkg/boot/universalpayload: Suppress warning message printing
AjanZhong Apr 10, 2025
85effb4
pkg/boot/universalpayload: Add test case to cover SMBIOS3 node
AjanZhong Apr 15, 2025
510c604
golangci: migrate to v2
binjip978 Apr 21, 2025
ac885c3
cmds/core/ip: add missing newline to print
quite Apr 22, 2025
f0e05c3
.circleci/images: enable the tc-u32 filter type in kernel configs
Apr 22, 2025
783d474
.vmtest.yaml: advance to kernels with the tc-u32 filter type enabled
Apr 25, 2025
3538648
pkg/tc: fix qdisc parent parsing
Apr 16, 2025
6c598ca
pkg/tc: simplify ShowQdisc
Apr 24, 2025
c5e2ab2
pkg/tc: print qdisc handle and parent in ShowQdisc
Apr 24, 2025
54874cd
pkg/tc: print r2q, default, and direct_qlen for HTB qdisc
Apr 24, 2025
769d565
pkg/tc: fix getTickInUsec and CalcXMitTime, for parsing HTB class args
Apr 24, 2025
6629be8
pkg/tc: remove debug output from ParseHTBClassArgs
Apr 24, 2025
dd14b99
pkg/tc: print class handle and parent in ShowClass
Apr 24, 2025
3c4d7c2
pkg/tc: print prio, rate, ceil, burst, and cburst for HTB class
Apr 24, 2025
530ebee
pkg/tc: slightly extend filter priority parsing
Apr 16, 2025
1a3c738
pkg/tc: fix priority and EtherType management for filters
Apr 22, 2025
58c921f
pkg/tc: remove debug output from AddFilter
Apr 24, 2025
ab89420
pkg/tc: tweak ShowFilter output
Apr 24, 2025
de2f62b
pkg/tc: add minimal tc-u32 filter parser and formatter
Apr 17, 2025
73ac2c0
integration/generic-tests: add "tc" integration test
Apr 16, 2025
881d56d
pkg/tftp: fix TransferMode
Apr 24, 2025
78890dc
pkg/tftp: fix upload multiple files
Apr 28, 2025
35c2a2f
cmds/exp/tftp: fix parsing port number
Apr 28, 2025
382310d
cmds/exp/tftp: clean up help text
Apr 28, 2025
b4be65d
cmds/exp/tftpd: Add a simple TFTP server
Apr 24, 2025
6408c2d
integration/generic-tests: Add tftp test
Apr 24, 2025
ba931e6
cmds/exp/tftp: remove markdown docu
Apr 29, 2025
ec860cf
cmds/core/echo: remove non-existant \e backslash escape
quite May 2, 2025
6714235
pkg/boot/universalpayload: Add PCI Root Bridge Device Tree nodes
AjanZhong Apr 17, 2025
13f07fe
pkg/boot/universalpayload: Add test case for PCI Root Bridge info
AjanZhong Apr 19, 2025
18bc2d9
cmds/core/pidof: add pidof command
binjip978 Apr 26, 2025
07416f5
cmds/core/pidof: add platform dependent collect
binjip978 Apr 27, 2025
c3921fc
cmds/exp/tc: adapt help messages
Apr 30, 2025
89d8dab
ci: increase VM test timeout to 20 min
May 7, 2025
204dcbb
cmds/core/ip: remove unused code
Apr 9, 2025
35f4166
cmds/core/ip: remove more unused code
Apr 9, 2025
c3f7afd
cmds/core/ip: refactor add|append|replace|delete
Apr 10, 2025
d500c1b
cmds/core/ip: restructure code for ip route
Apr 11, 2025
a38d984
cmds/core/ip: write new 'ip route' parser
Apr 14, 2025
1e56209
integration/generic-test: rename helper function in brctl test
Apr 9, 2025
b6b92bc
integration/generic-tests: add ip test
Apr 9, 2025
3bdb469
ci: add kernel config options for ip tunneling
leongross May 15, 2025
a5aed3a
pkg/cpio: fix Debug output
binjip978 May 18, 2025
115330b
ci: missing virtual tunneling kernel config
leongross May 20, 2025
aefe477
cmds/core/ip: remove unused flag in tunnel subcommand help text
RiSKeD May 13, 2025
486f973
cmds/core/ip: add key option for tunnel subcommand
RiSKeD May 13, 2025
8d8fc53
cmds/core/ip: fix tunnel mode prints
RiSKeD May 13, 2025
6d43859
cmds/core/ip: fix validation boolean default on tunnel deletion
RiSKeD May 13, 2025
12a2350
cmds/core/ip: enhance ip tunnel show output
RiSKeD May 13, 2025
0cd1306
cmds/core/ip: support for 'dev' in tunnel show cmd
RiSKeD May 14, 2025
0485dc4
integration/generic-tests: add ip tunnel {add | del | show } cmds
RiSKeD May 14, 2025
348ae7c
integration/generic-tests: pin kernel images with tunneling support
RiSKeD May 16, 2025
ddc74d6
integration/generic-tests: add ipip, vti, gre tunnel modes
RiSKeD May 15, 2025
ca8a3e1
cmds/core/ip: fix ip neigh add cmd by correct NUD default
RiSKeD May 12, 2025
40609fe
integration/generic-tests: add ip neigh cmds to ip test
RiSKeD May 12, 2025
ecce2f8
cmds/core/ip: improve ip neigh show prints
RiSKeD May 12, 2025
58e6d56
cmds/core/ip: fix NUD state parsing in neigh subcommand
RiSKeD May 12, 2025
d4ac5d7
cmds/core/ip: add parsing function for both addr and CIDR
RiSKeD May 13, 2025
dd29375
cmds/core/ip: neigh show is filterable by IP or CIDR
RiSKeD May 13, 2025
3beeb45
cmds/core/ip: fix & extend ip neigh flush capabilities
RiSKeD May 13, 2025
d0550a2
integration/generic-tests: add ip neigh show cmd to ip test
RiSKeD May 13, 2025
0386538
cmds/core/ip: neigh subcommand accepts delete as del
RiSKeD May 13, 2025
2da3934
integration/generic-tests: add ip neigh replace cmd to ip test
RiSKeD May 13, 2025
ed52566
cmds/core/ip: add additional testcase for parseAddressOrCIDR
RiSKeD May 15, 2025
b723bfe
integration/generic-tests: remove additional prints from ip test
RiSKeD May 15, 2025
0563620
cmds/core/ip: add additional testcases for neigh funcs
RiSKeD May 22, 2025
a34e77a
integration/generic-tests: test ip flush functionality
RiSKeD May 22, 2025
53fe1d4
cmd/exp: traceroute: add functionality for -p/-port
leongross May 21, 2025
eab425a
cmd/exp: traceroute: error on invalid protocol
leongross May 22, 2025
62b6118
test: pin image hash for ghcr.io/hugelgupf/vmtest/qemu
leongross May 25, 2025
9935e1b
Change the version in go.mod so go download works
rminnich May 25, 2025
ac8f2b2
cmds/core/lsfd: add a minimal lsfd command
binjip978 Apr 28, 2025
8d9547b
cmds/core/lsfd: add some smoke tests
binjip978 May 1, 2025
794e324
tools: update status quo with lsfd
binjip978 May 11, 2025
d24f600
integration/generic: add traceroute
leongross May 13, 2025
ac5216c
cmds/exp: traceroute: add udpv6 fallback option for local networks
leongross May 29, 2025
3f165c1
cmds/exp/traceroute: fix checksum to be non-zero
leongross May 30, 2025
66331f0
cmds/exp: traceroute: linter nits
leongross May 30, 2025
84d4df7
integration/generic: traceroute: improve sync
leongross May 30, 2025
9747061
Delete pkg/ip directory
May 30, 2025
54a842e
cmds/core/pidof: add single -s flag
binjip978 Jun 1, 2025
3f27db3
cmds/core/pidof: use correct args with flags
binjip978 Jun 5, 2025
70f1377
cmds/core/sshd: just use the default shell
Jun 5, 2025
b5ec1a2
cmds/core/sshd: implement sftp (scp)
Jun 9, 2025
146e482
cmds/core/pidof: add quite flag
binjip978 Jun 7, 2025
ddbe793
build(deps): bump brace-expansion in /docs
dependabot[bot] Jun 11, 2025
0029d75
build(deps): bump github.com/cloudflare/circl from 1.3.7 to 1.6.1
dependabot[bot] Jun 10, 2025
0dfc947
tools/tinygo: sshd no longer works
binjip978 Jun 13, 2025
499618c
cmds/core/base64: add encode/decode tests
binjip978 Jun 24, 2025
ecb3cb8
cmds/core/base64: fix bug with Encoder writer
binjip978 Jun 24, 2025
8926c7b
cmds/core/grep: fully remove can't open file test
binjip978 Jun 22, 2025
7af71d1
cmds/core/backoff: fix 30s default timeout
binjip978 Jun 24, 2025
ac6d77c
account for https://github.com/torvalds/linux/commit/9c54baab4401db24…
abarisani Jun 17, 2025
bd0856c
remove CRC32 test
abarisani Jun 17, 2025
39f572a
remove crc32 field from testImage struct
abarisani Jun 17, 2025
74aa3d1
make gofmt happy
abarisani Jun 18, 2025
0c1018d
cmds/core/cmp: replace goto with else
binjip978 Jun 28, 2025
096794b
cmds/core/date: fix +%j calculation
binjip978 Jun 30, 2025
2f029ef
update vendor to use latest uimage
rminnich Jul 1, 2025
956ffaa
Add termios support for Plan 9
rminnich Jun 25, 2025
5721ed3
remove blind deref of route.Dst in routeAdd
rminnich Jun 25, 2025
d547727
pkg/boot/universalpayload: Bypass ineligible region in PCI RB info
AjanZhong May 8, 2025
9a91dad
pkg/boot/universalpayload: Update PCI Root Bridge fetch logic
AjanZhong May 22, 2025
4be254f
pkg/boot/universalpayload: Update test case for PCI RB
AjanZhong Jun 16, 2025
19f8146
pkg/boot/universalpayload: Add test case for getReserverdMemoryMap
AjanZhong Jun 27, 2025
46f11cd
pkg/boot/universalpayload: Add test case for skipReservedRange
AjanZhong Jun 27, 2025
6431b6c
pkg/boot/universalpayload: Add test case to cover isValidPCIDeviceName
AjanZhong Jul 1, 2025
c9a0e09
pkg/boot/universalpayload: Add test case to cover updateResourceRanges
AjanZhong Jul 1, 2025
7c63f6a
Log console log level changes to improve debuggability
pohaosu Jul 7, 2025
a001f53
feat: add `pkg/core` package with interface for the core utils
andreynering Jul 4, 2025
2cf0a15
feat(cp): refactor `cp` core util to use the new api design
andreynering Jul 4, 2025
4da09ed
feat(rm): refactor `rm` core util to use the new api design
andreynering Jul 4, 2025
bbeab64
feat(cat): refactor `cat` core util to use the new api design
andreynering Jul 4, 2025
ad27c2b
feat(touch): refactor `touch` core util to use the new api design
andreynering Jul 4, 2025
486b5f1
feat(mkdir): refactor `mkdir` core util to use the new api design
andreynering Jul 4, 2025
11b8f52
feat(mv): refactor `mv` core util to use the new api design
andreynering Jul 4, 2025
28d5be8
feat(chmod): refactor `chmod` core util to use the new api design
andreynering Jul 4, 2025
97b6528
feat(ls): refactor `ls` core util to use the new api design
andreynering Jul 4, 2025
66cbe33
refactor(coreutils): de-duplicate the `resolvePath` functions
andreynering Jul 4, 2025
f3501b9
refactor(core): do not ask for command name as first argument
andreynering Jul 7, 2025
f212a5f
fix(core): fix `mv` core util failing tests
andreynering Jul 7, 2025
b25316b
fix(coreutils): standardize error printing / do not use `log` package
andreynering Jul 7, 2025
66a6387
refactor(core): change interface to return a single error on run
andreynering Jul 7, 2025
cc6a3d6
chore: run `modernize`
andreynering Jul 7, 2025
00daad4
chore: add missing license headers
andreynering Jul 7, 2025
02e3ce7
feat(find): refactor `find` core util to use the new api design
andreynering Jul 7, 2025
b4e4f59
feat(xargs): refactor `xargs` core util to use the new api design
andreynering Jul 7, 2025
4a28475
refator: bring back the `log` package
andreynering Jul 9, 2025
a7bd7fd
refactor(core): have both `Run` and `RunContext` on the interface
andreynering Jul 9, 2025
6bc74e2
refactor(core): simplify passing stdin to tests
andreynering Jul 10, 2025
cb03ec8
refactor(core): make all command implementation unexported
andreynering Jul 10, 2025
c2b9e48
Add UROOT_PHYS_ADDR_SIZE option for UPL
andrewsun2 Jul 24, 2025
676f560
fix(core-utils): fix use of joint flags, like in `rm -rf`
andreynering Jul 21, 2025
7540466
chore(deps): upgrade `github.com/spf13/pflag` to v1.0.7
andreynering Jul 22, 2025
05837e2
fix(find): allow flags and args to be at any position
andreynering Jul 22, 2025
b019017
refactor(find): don't use `pflag` and handle flags manually
andreynering Jul 24, 2025
dba4685
chore: run `modernize` for the whole codebase
andreynering Jul 21, 2025
5f0abce
chore: format all files with `gofumpt`
andreynering Jul 21, 2025
a8e4d08
style: do not wrap lines
andreynering Jul 24, 2025
89ecf12
build(deps): bump form-data from 4.0.0 to 4.0.4 in /docs
dependabot[bot] Jul 31, 2025
8710979
.circleci/images: Add VFP and NEON support for arm kernel config
AjanZhong Aug 7, 2025
1422ddd
.vmtest.yaml: Update ARM kernel image hash
AjanZhong Aug 7, 2025
00bfd41
Workflows: Remove GOARM=5 for QEMU instance during integration test
AjanZhong Aug 7, 2025
7b50ad4
cleanup:remove pflag from tools/testramfs
rminnich Aug 7, 2025
7b544ee
feat(mktemp): refactor `mktemp` core util to use the new api design
andreynering Jul 22, 2025
b90ac36
feat(tar): refactor `tar` core util to use the new api design
andreynering Jul 22, 2025
b28627b
feat(gzip): refactor `gzip` core util to use the new api design
andreynering Jul 22, 2025
44519d5
feat(shasum): refactor `shasum` core util to use the new api design
andreynering Jul 25, 2025
e7ba481
refactor(shasum): remove unused parameter
andreynering Jul 25, 2025
5e77210
feat(base64): refactor `base64` core util to use the new api design
andreynering Aug 7, 2025
1a68779
cleanup: remove pflag usage from cmd/flash
rminnich Aug 9, 2025
b072edc
cleanup: exp/tftp: remove pflag package
rminnich Aug 7, 2025
ec1a824
cleanup: remove shell-script-based tftp test
rminnich Aug 8, 2025
e12143c
exp/tfpt: fix spelling in test
rminnich Aug 9, 2025
58474a9
cleanup: pkg/grub: remove pflag
rminnich Aug 9, 2025
b6c6143
Remove all references to removed Baseboard Info table
andrewsun2 Aug 8, 2025
ef80f41
kmodule: insert independent modules in parallel
khazhyk Aug 6, 2025
50c7c00
kmodule: export concurrent-safe module prober
khazhyk Aug 8, 2025
c3217ac
Add "\r" to some messages
jelischer Mar 26, 2025
c9a322d
Update menu.go
jelischer Jul 24, 2025
5f0f02d
Revert "Update menu.go"
AjanZhong Aug 22, 2025
2856670
Revert "Add "\r" to some messages"
AjanZhong Aug 22, 2025
0d0587c
pkg/boot/universalpayload: Skip system memory in handoff blocks.
AjanZhong Aug 22, 2025
4a4bdd3
configs/arm: add CONFIG_COMPAT_32BIT_TIME
orangecms Aug 24, 2025
837dc4e
configs/README: reference minimum Go requirements
orangecms Aug 24, 2025
9e36852
README: add note on minimum requirements for Linux
orangecms Aug 24, 2025
9b8feff
core/ps: when using /proc/<pid>/cmdline, replace null by space
rminnich Aug 27, 2025
dce6001
update to ulikunits/xz 5.15
rminnich Sep 2, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
17 changes: 16 additions & 1 deletion .circleci/images/kernel-amd64/config_linux.txt
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,24 @@ CONFIG_NET_SCH_CODEL=y
CONFIG_NET_SCH_FQ_CODEL=y
CONFIG_NET_CLS=y
CONFIG_NET_CLS_BASIC=y
CONFIG_NET_CLS_U32=y
CONFIG_NET_CLS_ACT=y
CONFIG_NET_ACT_GACT=y

# Network tunneling
CONFIG_INET6_ESP=y
CONFIG_INET6_ESPINTCP=y
CONFIG_INET6_ESP_OFFLOAD=y
CONFIG_INET6_IPCOMP=y
CONFIG_INET_IPCOMP=y
CONFIG_IPV6_SIT_6RD=y
CONFIG_IPV6_VTI=y
CONFIG_NET_FOU_IP_TUNNELS=y
CONFIG_NET_IPGRE=y
CONFIG_NET_IPGRE_DEMUX=y
CONFIG_NET_IPIP=y
CONFIG_NET_IPVTI=y

# 9P net filesystem
CONFIG_NET_9P=y
CONFIG_NET_9P_VIRTIO=y
Expand Down Expand Up @@ -167,4 +182,4 @@ CONFIG_GCOV_PROFILE_ALL=y
CONFIG_WATCHDOG=y
CONFIG_WATCHDOG_CORE=y
CONFIG_WATCHDOG_HANDLE_BOOT_ENABLED=y
CONFIG_WATCHDOG_OPEN_TIMEOUT=0
CONFIG_WATCHDOG_OPEN_TIMEOUT=0
18 changes: 18 additions & 0 deletions .circleci/images/kernel-arm/config_linux.txt
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,23 @@ CONFIG_NET_SCH_CODEL=y
CONFIG_NET_SCH_FQ_CODEL=y
CONFIG_NET_CLS=y
CONFIG_NET_CLS_BASIC=y
CONFIG_NET_CLS_U32=y
CONFIG_NET_CLS_ACT=y
CONFIG_NET_ACT_GACT=y

# Network tunneling
CONFIG_INET6_ESP=y
CONFIG_INET6_IPCOMP=y
CONFIG_INET_IPCOMP=y
CONFIG_IPV6_GRE=y
CONFIG_IPV6_IOAM6_LWTUNNEL=y
CONFIG_IPV6_VTI=y
CONFIG_NET_FOU=y
CONFIG_NET_IPGRE=y
CONFIG_NET_IPGRE_DEMUX=y
CONFIG_NET_IPIP=y
CONFIG_NET_IPVTI=y

# GPIO test - mock GPIO libraries
CONFIG_GPIOLIB=y
CONFIG_GPIO_MOCKUP=y
Expand Down Expand Up @@ -160,3 +174,7 @@ CONFIG_RTC_DRV_PL031=y
CONFIG_DEBUG_FS=y
CONFIG_GCOV_KERNEL=y
CONFIG_GCOV_PROFILE_ALL=y

# Enable VFP and NEON
CONFIG_VFP=y
CONFIG_NEON=y
15 changes: 14 additions & 1 deletion .circleci/images/kernel-arm64/config_linux.txt
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,22 @@ CONFIG_NET_SCH_CODEL=y
CONFIG_NET_SCH_FQ_CODEL=y
CONFIG_NET_CLS=y
CONFIG_NET_CLS_BASIC=y
CONFIG_NET_CLS_U32=y
CONFIG_NET_CLS_ACT=y
CONFIG_NET_ACT_GACT=y

# Network tunneling
CONFIG_INET6_IPCOMP=y
CONFIG_INET_IPCOMP=y
CONFIG_IPV6_GRE=y
CONFIG_IPV6_IOAM6_LWTUNNEL=y
CONFIG_IPV6_VTI=y
CONFIG_NET_FOU_IP_TUNNELS=y
CONFIG_NET_IPGRE=y
CONFIG_NET_IPGRE_DEMUX=y
CONFIG_NET_IPIP=y
CONFIG_NET_IPVTI=y

# GPIO test - mock GPIO libraries
CONFIG_GPIOLIB=y
CONFIG_GPIO_MOCKUP=y
Expand Down Expand Up @@ -168,4 +181,4 @@ CONFIG_EFI_BOOTLOADER_CONTROL=y

# Watchdog
CONFIG_WATCHDOG=y
CONFIG_WATCHDOG_CORE=y
CONFIG_WATCHDOG_CORE=y
8 changes: 4 additions & 4 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.22'
go-version: '1.24'
cache: false
- name: golangci-lint
uses: golangci/golangci-lint-action@v6
uses: golangci/golangci-lint-action@v7
with:
version: v1.64.5
args: --out-format=line-number --timeout=5m
version: v2.1.2
args: --timeout=5m
7 changes: 1 addition & 6 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,6 @@ jobs:
vmarch: 'amd64'
pattern: '.'

# QEMU's -M virt only supports GOARM=5, so add goarm=5 only for
# arm configs
- vmarch: arm
goarm: '5'

env:
GO_VERSION: ${{ matrix.go-version }}
VMTEST_ARCH: ${{ matrix.vmarch }}
Expand All @@ -60,7 +55,7 @@ jobs:
mkdir gocov
VMTEST_GOCOVERDIR=$(pwd)/gocov \
VMTEST_GO_PROFILE=vmcoverage.txt runvmtest -- \
go test -v -timeout=15m \
go test -v -timeout=20m \
-covermode=atomic ${{ matrix.extra-arg }} \
-coverprofile=coverage.txt ./${{ matrix.pattern }}

Expand Down
75 changes: 42 additions & 33 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,37 +1,46 @@
version: "2"
linters:
disable-all: true
default: none
enable:
- revive
- errorlint
- ineffassign
- revive
- staticcheck
- stylecheck
- errorlint

linters-settings:
staticcheck:
checks: ["all", "-SA1019"]
stylecheck:
checks: ["all", "-ST1003"]
errorlint:
errorf: true
asserts: false
comparison: false

issues:
exclude-dirs:
- pkg/uroot/test
exclude-rules:
- linters: [revive]
text: "don't use underscores"
- linters: [revive]
text: "don't use ALL_CAPS"
- linters: [revive]
text: "stutter"
- linters: [revive]
text: "unexported-return"
- linters: [revive]
text: "unused-parameter"
- linters: [revive]
text: "superfluous-else"
- linters: [revive]
text: "empty-block"
settings:
errorlint:
errorf: true
asserts: false
comparison: false
staticcheck:
checks:
- all
- -SA1019
- -ST1003
- -QF*
exclusions:
presets:
- comments
rules:
- linters:
- revive
text: don't use underscores
- linters:
- revive
text: don't use ALL_CAPS
- linters:
- revive
text: stutter
- linters:
- revive
text: unexported-return
- linters:
- revive
text: unused-parameter
- linters:
- revive
text: superfluous-else
- linters:
- revive
text: empty-block
paths:
- pkg/uroot/test
12 changes: 6 additions & 6 deletions .vmtest.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
amd64:
VMTEST_QEMU:
container: "ghcr.io/hugelgupf/vmtest/qemu:main"
container: "ghcr.io/hugelgupf/vmtest/qemu:main@sha256:d5b3d31f39edb6394d20bdd76027512f956d78af9c6e49ecf2ab9ab59944638a"
template: "{{.qemu}}/bin/qemu-system-x86_64 -L {{.qemu}}/pc-bios -m 1G"
directories:
qemu: "/zqemu"

VMTEST_KERNEL:
container: "ghcr.io/u-root/u-root/test-kernel-amd64@sha256:0b4f399fd61f2f5e060c86216150ec12439851101921337add61402c185e8007"
container: "ghcr.io/u-root/u-root/test-kernel-amd64@sha256:8b6e8c08724ef0aa2809685c7adb98e1b9b000f79fa790ec254c3176ecc5ec93"
template: "{{.bzImage}}"
files:
bzImage: "/bzImage"
Expand All @@ -25,26 +25,26 @@ amd64:

arm:
VMTEST_QEMU:
container: "ghcr.io/hugelgupf/vmtest/qemu:main"
container: "ghcr.io/hugelgupf/vmtest/qemu:main@sha256:d5b3d31f39edb6394d20bdd76027512f956d78af9c6e49ecf2ab9ab59944638a"
template: "{{.qemu}}/bin/qemu-system-arm -M virt,highmem=off -L {{.qemu}}/pc-bios"
directories:
qemu: "/zqemu"

VMTEST_KERNEL:
container: "ghcr.io/u-root/u-root/test-kernel-arm@sha256:0429fa0ab8dbc4d1913f1c2b8ccc45fa8000897c801ed90b90c14a15e1f32020"
container: "ghcr.io/u-root/u-root/test-kernel-arm@sha256:0550f61f1a620033fc20ec642361f53c00fa8d02b077a637bef41fe62b71461a"
template: "{{.zImage}}"
files:
zImage: "/zImage"

arm64:
VMTEST_QEMU:
container: "ghcr.io/hugelgupf/vmtest/qemu:main"
container: "ghcr.io/hugelgupf/vmtest/qemu:main@sha256:d5b3d31f39edb6394d20bdd76027512f956d78af9c6e49ecf2ab9ab59944638a"
template: "{{.qemu}}/bin/qemu-system-aarch64 -machine virt -cpu max -m 1G -L {{.qemu}}/pc-bios"
directories:
qemu: "/zqemu"

VMTEST_KERNEL:
container: "ghcr.io/u-root/u-root/test-kernel-arm64@sha256:e48f32266071edaec44445da98375fe512b1532640e256f9f7138633e0000866"
container: "ghcr.io/u-root/u-root/test-kernel-arm64@sha256:d0b65ec5584fef929828324b0f998ad7e853c95bcc2288a163ebdf64401fe5a0"
template: "{{.Image}}"
files:
Image: "/Image"
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ u-root embodies four different projects.
kernels such as ESXi, Xen, or tboot. They are meant to be used with
[LinuxBoot](https://www.linuxboot.org).

## Requirements

For u-root on Linux, certain Kconfig options are necessary. Basic defconfigs are
in [`configs/`](configs/). See also the [configs README](configs/README.md).

# Usage

Make sure your Go version is >= 1.21.
Expand Down
2 changes: 1 addition & 1 deletion cmds/boot/boot/boot_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ func main() {

log.Printf("Booting from the following block devices: %v", blockDevs)

var l = ulog.Null
l := ulog.Null
if *verbose {
l = ulog.Log
}
Expand Down
1 change: 0 additions & 1 deletion cmds/contrib/fbptcat/fbptcat.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,4 @@ func main() {
}
fmt.Printf("Index: %d,Hook Type: %s, Processor Identifier/APIC ID: %d, Timestamp: %d, Guid: %s, Description: %s\n", i, measurementRecord.HookType, measurementRecord.ProcessorIdentifier, measurementRecord.Timestamp, measurementRecord.GUID.String(), measurementRecord.Description)
}

}
38 changes: 31 additions & 7 deletions cmds/core/backoff/main.go → cmds/core/backoff/backoff.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2012-2021 the u-root Authors. All rights reserved
// Copyright 2012-2025 the u-root Authors. All rights reserved
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

Expand All @@ -11,13 +11,13 @@
// backoff will run the command until it succeeds or a timeout has passed.
// The default timeout is 30s.
// If -v is set, it will show what it is running, each time it is tried.
// If no args are given, it will just return.
// If no args are given, it will print command help.
//
// Example:
// $ backoff echo hi
// hi
// $
// $ backoff -v -t 2s false
// $ backoff -v -t=2s false
// 2022/03/31 14:29:37 Run ["false"]
// 2022/03/31 14:29:37 Set timeout to 2s
// 2022/03/31 14:29:37 "false" []:exit status 1
Expand All @@ -31,16 +31,40 @@ package main

import (
"flag"
"fmt"
"log"
"os"
"os/exec"
"time"

"github.com/cenkalti/backoff/v4"
)

var (
timeout = flag.String("t", "", "Timeout for command")
verbose = flag.Bool("v", true, "Log each attempt to run the command")
v = func(string, ...interface{}) {}
timeout = flag.Duration("t", 30*time.Second, "Timeout for command")
verbose = flag.Bool("v", false, "Log each attempt to run the command")
v = func(string, ...any) {}

errNoCmd = fmt.Errorf("no command passed")
)

func run(timeout time.Duration, c string, a ...string) error {
if c == "" {
return errNoCmd
}
b := backoff.NewExponentialBackOff()
b.MaxElapsedTime = timeout
f := func() error {
cmd := exec.Command(c, a...)
cmd.Stdin, cmd.Stdout, cmd.Stderr = os.Stdin, os.Stdout, os.Stderr
err := cmd.Run()
v("%q %q:%v", c, a, err)
return err
}

return backoff.Retry(f, b)
}

func main() {
flag.Parse()
if *verbose {
Expand All @@ -52,7 +76,7 @@ func main() {
os.Exit(1)
}
v("Run %q", a)
if err := runit(*timeout, a[0], a[1:]...); err != nil {
if err := run(*timeout, a[0], a[1:]...); err != nil {
log.Fatalf("Error: %v", err)
}
}
Loading