Skip to content

Commit

Permalink
Commit templates & dependencies
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Koch <[email protected]>
  • Loading branch information
hugelgupf committed Feb 28, 2024
1 parent af95c5c commit da7e0f3
Show file tree
Hide file tree
Showing 7 changed files with 570 additions and 24 deletions.
32 changes: 16 additions & 16 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,27 +6,27 @@ on:
pull_request:
branches: [ "main" ]

# Cancel running workflows on new push to a PR.
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
build:
strategy:
matrix:
template: [core, all, embedded, minimal]
template: ["core", "boot core", "world"]
arch: [amd64, arm, arm64, riscv64]

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
repository: u-root/u-root

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.21'
- uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: '1.21'

- name: Build
run: |
go build .
GOARCH=${{ matrix.arch }} ./u-root -uroot-source . \
-o u-root-${{ matrix.arch }}-${{ matrix.template }}.cpio \
${{ matrix.template }}
- name: Build
run: |
go install github.com/u-root/mkuimage/cmd/mkuimage@latest
GOARCH=${{ matrix.arch }} mkuimage -config=default \
${{ matrix.template }}
13 changes: 5 additions & 8 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,22 @@ jobs:
publish:
strategy:
matrix:
template: [core, all, embedded, minimal]
template: ["core", "boot core", "world"]
arch: [amd64, arm, arm64, riscv64]

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
with:
repository: u-root/u-root

- name: Set up Go
- uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: '1.21'

- name: Build
run: |
go build .
GOARCH=${{ matrix.arch }} ./u-root -uroot-source . \
go install github.com/u-root/mkuimage/cmd/mkuimage@latest
GOARCH=${{ matrix.arch }} mkuimage -config=default \
-o ${{ matrix.arch }}-${{ matrix.template }}.cpio \
${{ matrix.template }}
xz --check=crc32 -9 --lzma2=dict=1MiB \
Expand Down
18 changes: 18 additions & 0 deletions .mkuimage.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
commands:
world:
- github.com/u-root/u-root/cmds/*/*

core:
- github.com/u-root/u-root/cmds/core/*

boot:
- github.com/u-root/u-root/cmds/boot/*boot*

cpu:
- github.com/u-root/u-root/cmds/core/*
- github.com/u-root/cpu/cmds/cpud

configs:
default:
init: init
shell: gosh
174 changes: 174 additions & 0 deletions deps.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,174 @@
//go:build distro

package main

import (
_ "github.com/u-root/cpu/cmds/cpud"
_ "github.com/u-root/u-root/cmds/boot/boot"
_ "github.com/u-root/u-root/cmds/boot/fitboot"
_ "github.com/u-root/u-root/cmds/boot/pxeboot"
_ "github.com/u-root/u-root/cmds/contrib/fbptcat"
_ "github.com/u-root/u-root/cmds/core/backoff"
_ "github.com/u-root/u-root/cmds/core/base64"
_ "github.com/u-root/u-root/cmds/core/basename"
_ "github.com/u-root/u-root/cmds/core/blkid"
_ "github.com/u-root/u-root/cmds/core/cat"
_ "github.com/u-root/u-root/cmds/core/chmod"
_ "github.com/u-root/u-root/cmds/core/chroot"
_ "github.com/u-root/u-root/cmds/core/cmp"
_ "github.com/u-root/u-root/cmds/core/comm"
_ "github.com/u-root/u-root/cmds/core/cp"
_ "github.com/u-root/u-root/cmds/core/cpio"
_ "github.com/u-root/u-root/cmds/core/date"
_ "github.com/u-root/u-root/cmds/core/dd"
_ "github.com/u-root/u-root/cmds/core/df"
_ "github.com/u-root/u-root/cmds/core/dhclient"
_ "github.com/u-root/u-root/cmds/core/dirname"
_ "github.com/u-root/u-root/cmds/core/dmesg"
_ "github.com/u-root/u-root/cmds/core/echo"
_ "github.com/u-root/u-root/cmds/core/elvish"
_ "github.com/u-root/u-root/cmds/core/false"
_ "github.com/u-root/u-root/cmds/core/find"
_ "github.com/u-root/u-root/cmds/core/free"
_ "github.com/u-root/u-root/cmds/core/fusermount"
_ "github.com/u-root/u-root/cmds/core/gosh"
_ "github.com/u-root/u-root/cmds/core/gpgv"
_ "github.com/u-root/u-root/cmds/core/gpt"
_ "github.com/u-root/u-root/cmds/core/grep"
_ "github.com/u-root/u-root/cmds/core/gzip"
_ "github.com/u-root/u-root/cmds/core/hexdump"
_ "github.com/u-root/u-root/cmds/core/hostname"
_ "github.com/u-root/u-root/cmds/core/hwclock"
_ "github.com/u-root/u-root/cmds/core/id"
_ "github.com/u-root/u-root/cmds/core/init"
_ "github.com/u-root/u-root/cmds/core/insmod"
_ "github.com/u-root/u-root/cmds/core/io"
_ "github.com/u-root/u-root/cmds/core/ip"
_ "github.com/u-root/u-root/cmds/core/kexec"
_ "github.com/u-root/u-root/cmds/core/kill"
_ "github.com/u-root/u-root/cmds/core/lddfiles"
_ "github.com/u-root/u-root/cmds/core/ln"
_ "github.com/u-root/u-root/cmds/core/lockmsrs"
_ "github.com/u-root/u-root/cmds/core/losetup"
_ "github.com/u-root/u-root/cmds/core/ls"
_ "github.com/u-root/u-root/cmds/core/lsdrivers"
_ "github.com/u-root/u-root/cmds/core/lsmod"
_ "github.com/u-root/u-root/cmds/core/man"
_ "github.com/u-root/u-root/cmds/core/md5sum"
_ "github.com/u-root/u-root/cmds/core/mkdir"
_ "github.com/u-root/u-root/cmds/core/mkfifo"
_ "github.com/u-root/u-root/cmds/core/mknod"
_ "github.com/u-root/u-root/cmds/core/mktemp"
_ "github.com/u-root/u-root/cmds/core/more"
_ "github.com/u-root/u-root/cmds/core/mount"
_ "github.com/u-root/u-root/cmds/core/msr"
_ "github.com/u-root/u-root/cmds/core/mv"
_ "github.com/u-root/u-root/cmds/core/netcat"
_ "github.com/u-root/u-root/cmds/core/nohup"
_ "github.com/u-root/u-root/cmds/core/ntpdate"
_ "github.com/u-root/u-root/cmds/core/pci"
_ "github.com/u-root/u-root/cmds/core/ping"
_ "github.com/u-root/u-root/cmds/core/poweroff"
_ "github.com/u-root/u-root/cmds/core/printenv"
_ "github.com/u-root/u-root/cmds/core/ps"
_ "github.com/u-root/u-root/cmds/core/pwd"
_ "github.com/u-root/u-root/cmds/core/readlink"
_ "github.com/u-root/u-root/cmds/core/rm"
_ "github.com/u-root/u-root/cmds/core/rmmod"
_ "github.com/u-root/u-root/cmds/core/rsdp"
_ "github.com/u-root/u-root/cmds/core/scp"
_ "github.com/u-root/u-root/cmds/core/seq"
_ "github.com/u-root/u-root/cmds/core/shasum"
_ "github.com/u-root/u-root/cmds/core/shutdown"
_ "github.com/u-root/u-root/cmds/core/sleep"
_ "github.com/u-root/u-root/cmds/core/sluinit"
_ "github.com/u-root/u-root/cmds/core/sort"
_ "github.com/u-root/u-root/cmds/core/sshd"
_ "github.com/u-root/u-root/cmds/core/strace"
_ "github.com/u-root/u-root/cmds/core/strings"
_ "github.com/u-root/u-root/cmds/core/stty"
_ "github.com/u-root/u-root/cmds/core/switch_root"
_ "github.com/u-root/u-root/cmds/core/sync"
_ "github.com/u-root/u-root/cmds/core/tail"
_ "github.com/u-root/u-root/cmds/core/tar"
_ "github.com/u-root/u-root/cmds/core/tee"
_ "github.com/u-root/u-root/cmds/core/time"
_ "github.com/u-root/u-root/cmds/core/timeout"
_ "github.com/u-root/u-root/cmds/core/touch"
_ "github.com/u-root/u-root/cmds/core/tr"
_ "github.com/u-root/u-root/cmds/core/true"
_ "github.com/u-root/u-root/cmds/core/truncate"
_ "github.com/u-root/u-root/cmds/core/ts"
_ "github.com/u-root/u-root/cmds/core/umount"
_ "github.com/u-root/u-root/cmds/core/uname"
_ "github.com/u-root/u-root/cmds/core/uniq"
_ "github.com/u-root/u-root/cmds/core/unmount"
_ "github.com/u-root/u-root/cmds/core/unshare"
_ "github.com/u-root/u-root/cmds/core/uptime"
_ "github.com/u-root/u-root/cmds/core/watchdog"
_ "github.com/u-root/u-root/cmds/core/watchdogd"
_ "github.com/u-root/u-root/cmds/core/wc"
_ "github.com/u-root/u-root/cmds/core/wget"
_ "github.com/u-root/u-root/cmds/core/which"
_ "github.com/u-root/u-root/cmds/core/xargs"
_ "github.com/u-root/u-root/cmds/core/yes"
_ "github.com/u-root/u-root/cmds/exp/acpicat"
_ "github.com/u-root/u-root/cmds/exp/acpigrep"
_ "github.com/u-root/u-root/cmds/exp/ansi"
_ "github.com/u-root/u-root/cmds/exp/bootvars"
_ "github.com/u-root/u-root/cmds/exp/bzimage"
_ "github.com/u-root/u-root/cmds/exp/cbmem"
_ "github.com/u-root/u-root/cmds/exp/console"
_ "github.com/u-root/u-root/cmds/exp/crc"
_ "github.com/u-root/u-root/cmds/exp/disk_unlock"
_ "github.com/u-root/u-root/cmds/exp/dmidecode"
_ "github.com/u-root/u-root/cmds/exp/dumpebda"
_ "github.com/u-root/u-root/cmds/exp/dumpmemmap"
_ "github.com/u-root/u-root/cmds/exp/ectool"
_ "github.com/u-root/u-root/cmds/exp/ed"
_ "github.com/u-root/u-root/cmds/exp/efivarfs"
_ "github.com/u-root/u-root/cmds/exp/esxiboot"
_ "github.com/u-root/u-root/cmds/exp/fbnetboot"
_ "github.com/u-root/u-root/cmds/exp/fbsplash"
_ "github.com/u-root/u-root/cmds/exp/fdtdump"
_ "github.com/u-root/u-root/cmds/exp/field"
_ "github.com/u-root/u-root/cmds/exp/fixrsdp"
_ "github.com/u-root/u-root/cmds/exp/forth"
_ "github.com/u-root/u-root/cmds/exp/freq"
_ "github.com/u-root/u-root/cmds/exp/getty"
_ "github.com/u-root/u-root/cmds/exp/hdparm"
_ "github.com/u-root/u-root/cmds/exp/ipmidump"
_ "github.com/u-root/u-root/cmds/exp/kconf"
_ "github.com/u-root/u-root/cmds/exp/localboot"
_ "github.com/u-root/u-root/cmds/exp/lsfabric"
_ "github.com/u-root/u-root/cmds/exp/madeye"
_ "github.com/u-root/u-root/cmds/exp/modprobe"
_ "github.com/u-root/u-root/cmds/exp/netbootxyz"
_ "github.com/u-root/u-root/cmds/exp/newsshd"
_ "github.com/u-root/u-root/cmds/exp/nvme_unlock"
_ "github.com/u-root/u-root/cmds/exp/page"
_ "github.com/u-root/u-root/cmds/exp/partprobe"
_ "github.com/u-root/u-root/cmds/exp/pflask"
_ "github.com/u-root/u-root/cmds/exp/pox"
_ "github.com/u-root/u-root/cmds/exp/pxeserver"
_ "github.com/u-root/u-root/cmds/exp/readelf"
_ "github.com/u-root/u-root/cmds/exp/readpe"
_ "github.com/u-root/u-root/cmds/exp/run"
_ "github.com/u-root/u-root/cmds/exp/rush"
_ "github.com/u-root/u-root/cmds/exp/smbios_transfer"
_ "github.com/u-root/u-root/cmds/exp/smn"
_ "github.com/u-root/u-root/cmds/exp/srvfiles"
_ "github.com/u-root/u-root/cmds/exp/ssh"
_ "github.com/u-root/u-root/cmds/exp/syscallfilter"
_ "github.com/u-root/u-root/cmds/exp/systemboot"
_ "github.com/u-root/u-root/cmds/exp/tac"
_ "github.com/u-root/u-root/cmds/exp/tcz"
_ "github.com/u-root/u-root/cmds/exp/uefiboot"
_ "github.com/u-root/u-root/cmds/exp/vboot"
_ "github.com/u-root/u-root/cmds/exp/vmboot"
_ "github.com/u-root/u-root/cmds/exp/watch"
_ "github.com/u-root/u-root/cmds/exp/zbi"
_ "github.com/u-root/u-root/cmds/exp/zimage"
_ "github.com/u-root/u-root/cmds/fwtools/flash"
_ "github.com/u-root/u-root/cmds/fwtools/spidev"
)
2 changes: 2 additions & 0 deletions gen.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
//go:generate gentpldeps -o deps.go -t distro -p main
package main
84 changes: 84 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
module github.com/u-root/u-root-distro

go 1.21

require (
github.com/u-root/cpu v0.0.0-20240116214325-5529b02a0e41
github.com/u-root/u-root v0.14.0
)

require (
github.com/ProtonMail/go-crypto v0.0.0-20221026131551-cf6655e29de4 // indirect
github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be // indirect
github.com/atotto/clipboard v0.1.4 // indirect
github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect
github.com/beevik/ntp v0.3.0 // indirect
github.com/bobuhiro11/gokvm v0.0.8-0.20231003020000-f53faca69d28 // indirect
github.com/brutella/dnssd v1.2.9 // indirect
github.com/cenkalti/backoff/v4 v4.1.3 // indirect
github.com/charmbracelet/bubbles v0.15.1-0.20230123181021-a6a12c4a31eb // indirect
github.com/charmbracelet/bubbletea v0.24.1 // indirect
github.com/charmbracelet/lipgloss v0.7.1 // indirect
github.com/cloudflare/circl v1.3.7 // indirect
github.com/containerd/console v1.0.4-0.20230706203907-8f6c4e4faef5 // indirect
github.com/creack/pty v1.1.21 // indirect
github.com/dustin/go-humanize v1.0.1 // indirect
github.com/gliderlabs/ssh v0.3.5 // indirect
github.com/go-ole/go-ole v1.2.6 // indirect
github.com/google/go-cmp v0.5.9 // indirect
github.com/google/go-tpm v0.9.1-0.20230914180155-ee6cbcd136f8 // indirect
github.com/google/uuid v1.3.0 // indirect
github.com/insomniacslk/dhcp v0.0.0-20231206064809-8c70d406f6d2 // indirect
github.com/intel-go/cpuid v0.0.0-20200819041909-2aa72927c3e2 // indirect
github.com/josharian/native v1.1.0 // indirect
github.com/jsimonetti/rtnetlink v1.3.5 // indirect
github.com/kevinburke/ssh_config v1.2.0 // indirect
github.com/klauspost/compress v1.17.4 // indirect
github.com/klauspost/pgzip v1.2.6 // indirect
github.com/knz/bubbline v0.0.0-20230717192058-486954f9953f // indirect
github.com/lucasb-eyer/go-colorful v1.2.0 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/mattn/go-localereader v0.0.1 // indirect
github.com/mattn/go-runewidth v0.0.14 // indirect
github.com/mdlayher/netlink v1.7.2 // indirect
github.com/mdlayher/packet v1.1.2 // indirect
github.com/mdlayher/socket v0.5.0 // indirect
github.com/mdlayher/vsock v1.2.1 // indirect
github.com/miekg/dns v1.1.55 // indirect
github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6 // indirect
github.com/muesli/cancelreader v0.2.2 // indirect
github.com/muesli/reflow v0.3.0 // indirect
github.com/muesli/termenv v0.15.1 // indirect
github.com/orangecms/go-framebuffer v0.0.0-20200613202404-a0700d90c330 // indirect
github.com/pborman/getopt/v2 v2.1.0 // indirect
github.com/pierrec/lz4/v4 v4.1.18 // indirect
github.com/rck/unit v0.0.3 // indirect
github.com/rekby/gpt v0.0.0-20200219180433-a930afbc6edc // indirect
github.com/rivo/uniseg v0.4.4 // indirect
github.com/sahilm/fuzzy v0.1.0 // indirect
github.com/shirou/gopsutil v3.21.11+incompatible // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/tklauser/go-sysconf v0.3.11 // indirect
github.com/tklauser/numcpus v0.6.1 // indirect
github.com/u-root/iscsinl v0.1.1-0.20210528121423-84c32645822a // indirect
github.com/u-root/uio v0.0.0-20240209044354-b3d14b93376a // indirect
github.com/ulikunitz/xz v0.5.11 // indirect
github.com/vishvananda/netlink v1.2.1-beta.2 // indirect
github.com/vishvananda/netns v0.0.4 // indirect
github.com/vtolstov/go-ioctl v0.0.0-20151206205506-6be9cced4810 // indirect
github.com/yusufpapurcu/wmi v1.2.3 // indirect
golang.org/x/arch v0.2.0 // indirect
golang.org/x/crypto v0.19.0 // indirect
golang.org/x/exp v0.0.0-20240222234643-814bf88cf225 // indirect
golang.org/x/mod v0.15.0 // indirect
golang.org/x/net v0.21.0 // indirect
golang.org/x/sync v0.6.0 // indirect
golang.org/x/sys v0.17.0 // indirect
golang.org/x/term v0.17.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/tools v0.18.0 // indirect
gopkg.in/yaml.v2 v2.2.8 // indirect
mvdan.cc/sh/v3 v3.7.0 // indirect
pack.ag/tftp v1.0.1-0.20181129014014-07909dfbde3c // indirect
src.elv.sh v0.16.0-rc1.0.20220116211855-fda62502ad7f // indirect
)
Loading

0 comments on commit da7e0f3

Please sign in to comment.