-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTaskfile.yml
72 lines (70 loc) · 1.69 KB
/
Taskfile.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
---
version: '3'
tasks:
bootloader:
silent: true
cmds:
- task: build
- task: initfs
- task: kpart
build:
cmds:
- CGO_ENABLED=0 go build -o {{.out}} -trimpath
- strip {{.out}}
dir: cmd
silent: true
vars:
out: ../init
clean:
cmds:
- rm -f init bootloader*.bin *.cpio*
silent: true
default:
aliases: ["run"]
cmds:
- mkdir -p {{.dir}}
- defer: rm -fr {{.dir}}
- env TMPDIR={{.dir}} go run cmd/main.go
silent: true
vars:
dir: ${TMPDIR:-/tmp}/$(basename $PWD)
gofumpt:
aliases: ["fmt"]
cmds:
- gofumpt -l . | xargs -rtn1 gofumpt -w
silent: true
initfs:
cmds:
- find init lib libexec -print0 | cpio -v -o -d -H newc > initramfs.cpio
- xz -kf -9 --check=crc32 initramfs.cpio
silent: true
kpart:
cmds:
- cmd: |
depthchargectl build $board_arg \
--verbose \
--output bootloader.kpart.bin \
--root none \
--boot-mountpoint none \
--root-mountpoint none \
--kernel-cmdline "console=tty1 loglevel=1 sideboot.config=sideboot.trogdor.cfg sideboot.partition=UUID=3f99f65c-4c1d-4994-917c-ebcee66c9a92" \
--kernel kernel/vmlinuz \
--fdtdir kernel/dtbs \
--initramfs initramfs.cpio.xz
# --board arm64-generic
silent: true
mod:
cmds:
- go mod tidy
- go mod vendor
silent: true
staticcheck:
aliases: ["lint"]
cmds:
- cmd: find {{.ITEM}} -type f -iname '*.go' | xargs -r staticcheck
for:
var: packages
silent: true
vars:
packages:
sh: find . -maxdepth 1 -type d -not -iname '.*'