Skip to content

Commit

Permalink
Update to latest Go and u-root
Browse files Browse the repository at this point in the history
This should fix the dependabot warnings.

This change also adds support for building the initramfs on Mac and
makes the switch to using Go modules.

Tested with `task -fv core:loader`

Signed-off-by: Ryan O'Leary <[email protected]>
  • Loading branch information
rjoleary committed Feb 11, 2023
1 parent 604e50e commit 2ceb1bb
Show file tree
Hide file tree
Showing 8 changed files with 81 additions and 120 deletions.
1 change: 0 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,6 @@ jobs:
command: |
sudo apt update
sudo apt install gcc-aarch64-linux-gnu fakeroot flex bison bc patch libssl-dev zlib1g-dev libelf-dev qemu-kvm
GO111MODULE=off go get github.com/u-root/u-root
sh -c "$(curl --location https://taskfile.dev/install.sh)" -- -d -b ~/.local/bin
# Because the included version is too old and lacks the -U flag...
- run:
Expand Down
10 changes: 1 addition & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,16 +92,8 @@ Get them for 32bit via e.g.:
sudo apt install gcc-arm-none-eabi mtd-utils golang fakeroot flex bison device-tree-compiler bc libssl-dev libelf-dev qemu-kvm
```

We also need both u-bmc and u-root in our GOPATH so install them with:
Clone to any directory (Go modules are supported!):
```
GO111MODULE=off go get github.com/u-root/u-root
GO111MODULE=off go get github.com/u-root/u-bmc
```
Or use git clone:
```
mkdir $GOPATH/src/github.com/u-root
cd $GOPATH/src/github.com/u-root
git clone https://github.com/u-root/u-root
git clone https://github.com/u-root/u-bmc
```

Expand Down
10 changes: 8 additions & 2 deletions Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,13 @@ env:

vars:
CPUS:
sh: echo $(($(grep -c processor /proc/cpuinfo) / 2))
sh: |
if [[ "$(uname -s)" = "Linux" ]]; then
grep -c processor /proc/cpuinfo # Linux
else
getconf _NPROCESSORS_ONLN # fallback (including apple)
fi
exit $?
dotenv: ['platform/{{.__TARGET}}/config.env', 'kernel.env']

Expand Down Expand Up @@ -48,7 +54,7 @@ tasks:
- mkdir -p build
- task: platform:build-{{.__TARGET}}
- echo "Done!"

# Remove compiled files
clean:
desc: Cleans up compiled files
Expand Down
32 changes: 17 additions & 15 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/u-root/u-bmc

go 1.17
go 1.19

require (
github.com/beevik/ntp v0.3.0
Expand All @@ -21,43 +21,45 @@ require (
github.com/prometheus/client_golang v1.11.0
github.com/spf13/afero v1.6.0
github.com/tarm/serial v0.0.0-20180830185346-98f6abe2eb07
github.com/u-root/gobusybox/src v0.0.0-20210529132627-adc854ea4425
github.com/u-root/u-root v0.0.0-20210903181157-ff1c8497f204
github.com/vishvananda/netlink v1.1.1-0.20200221165523-c79a4b7b4066
github.com/u-root/gobusybox/src v0.0.0-20221229083637-46b2883a7f90
github.com/u-root/u-root v0.11.1-0.20230209170558-eb85a1aedf89
github.com/vishvananda/netlink v1.1.1-0.20211118161826-650dca95af54
go.uber.org/zap v1.19.1
golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e
golang.org/x/net v0.0.0-20210614182718-04defd469f4e
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519
golang.org/x/net v0.5.0
golang.org/x/sync v0.1.0
golang.org/x/sys v0.5.0
google.golang.org/grpc v1.39.0
)

require (
github.com/beorn7/perks v1.0.1 // indirect
github.com/cespare/xxhash/v2 v2.1.1 // indirect
github.com/digitalocean/go-libvirt v0.0.0-20201209184759-e2a69bcd5bd1 // indirect
github.com/dustin/go-humanize v1.0.0 // indirect
github.com/dustin/go-humanize v1.0.1 // indirect
github.com/google/go-cmp v0.5.6 // indirect
github.com/google/goexpect v0.0.0-20210430020637-ab937bf7fd6f // indirect
github.com/google/goterm v0.0.0-20200907032337-555d40f16ae2 // indirect
github.com/josharian/native v0.0.0-20200817173448-b6b71def0850 // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/hashicorp/go-multierror v1.1.1 // indirect
github.com/josharian/native v1.0.1-0.20221213033349-c1e37c09b531 // indirect
github.com/klauspost/compress v1.10.6 // indirect
github.com/klauspost/pgzip v1.2.4 // indirect
github.com/matryer/is v1.4.0 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect
github.com/mdlayher/socket v0.0.0-20210307095302-262dc9984e00 // indirect
github.com/pierrec/lz4/v4 v4.1.17 // indirect
github.com/prometheus/client_model v0.2.0 // indirect
github.com/prometheus/common v0.26.0 // indirect
github.com/prometheus/procfs v0.6.0 // indirect
github.com/u-root/uio v0.0.0-20210528151154-e40b768296a7 // indirect
github.com/u-root/uio v0.0.0-20221213070652-c3537552635f // indirect
github.com/ulikunitz/xz v0.5.8 // indirect
github.com/vishvananda/netns v0.0.0-20210104183010-2eb08e3e575f // indirect
go.uber.org/atomic v1.9.0 // indirect
go.uber.org/multierr v1.7.0 // indirect
golang.org/x/mod v0.4.2 // indirect
golang.org/x/text v0.3.6 // indirect
golang.org/x/tools v0.1.5 // indirect
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect
golang.org/x/mod v0.8.0 // indirect
golang.org/x/text v0.6.0 // indirect
golang.org/x/tools v0.5.0 // indirect
google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013 // indirect
google.golang.org/protobuf v1.26.0 // indirect
gopkg.in/square/go-jose.v2 v2.1.9 // indirect
Expand Down
Loading

0 comments on commit 2ceb1bb

Please sign in to comment.