Skip to content

Commit 0ddd68a

Browse files
committed
Update README for mkuimage->uimage make
Signed-off-by: Chris Koch <[email protected]>
1 parent 03eff59 commit 0ddd68a

File tree

1 file changed

+19
-19
lines changed

1 file changed

+19
-19
lines changed

README.md

+19-19
Original file line numberDiff line numberDiff line change
@@ -27,27 +27,27 @@ $ go1.21.5 version
2727
# Now use go1.21.5 in place of go
2828
```
2929

30-
Download and install mkuimage either via git:
30+
Download and install uimage either via git:
3131

3232
```shell
3333
git clone https://github.com/u-root/mkuimage
34-
cd mkuimage/cmd/mkuimage
34+
cd mkuimage/cmd/uimage
3535
go install
3636
```
3737

3838
Or install directly with go:
3939

4040
```shell
41-
go install github.com/u-root/mkuimage/cmd/mkuimage@latest
41+
go install github.com/u-root/mkuimage/cmd/uimage@latest
4242
```
4343

4444
> [!NOTE]
45-
> The `mkuimage` command will end up in `$GOPATH/bin/mkuimage`, so you may
45+
> The `uimage` command will end up in `$GOPATH/bin/uimage`, so you may
4646
> need to add `$GOPATH/bin` to your `$PATH`.
4747
4848
## Examples
4949

50-
Here are some examples of using the `mkuimage` command to build an initramfs.
50+
Here are some examples of using the `uimage` command to build an initramfs.
5151

5252
```shell
5353
git clone https://github.com/u-root/u-root
@@ -57,7 +57,7 @@ git clone https://github.com/u-root/cpu
5757
Build gobusybox binaries of these two commands and add to initramfs:
5858

5959
```shell
60-
$ mkuimage ./u-root/cmds/core/{init,gosh}
60+
$ uimage make ./u-root/cmds/core/{init,gosh}
6161

6262
$ cpio -ivt < /tmp/initramfs.linux_amd64.cpio
6363
...
@@ -70,7 +70,7 @@ lrwxrwxrwx 0 root root 2 Jan 1 1970 bbin/init -> bb
7070
Add symlinks for shell and init:
7171

7272
```shell
73-
$ mkuimage -initcmd=init -defaultsh=gosh ./u-root/cmds/core/{init,gosh}
73+
$ uimage make -initcmd=init -defaultsh=gosh ./u-root/cmds/core/{init,gosh}
7474

7575
$ cpio -ivt < /tmp/initramfs.linux_amd64.cpio
7676
...
@@ -84,7 +84,7 @@ lrwxrwxrwx 0 root root 9 Jan 1 1970 init -> bbin/init
8484
Build everything from core without ls and losetup:
8585

8686
```shell
87-
$ mkuimage ./u-root/cmds/core/* -./u-root/cmds/core/{ls,losetup}
87+
$ uimage make ./u-root/cmds/core/* -./u-root/cmds/core/{ls,losetup}
8888
```
8989

9090
Build an initramfs with init, gosh and cpud in a gobusybox binary:
@@ -99,7 +99,7 @@ Build an initramfs with init, gosh and cpud in a gobusybox binary:
9999
> To properly resolve these dependencies, head down to the [multi-module uimages section](#multi-module-uimages).
100100
101101
```shell
102-
$ mkuimage ./u-root/cmds/core/{init,gosh} ./cpu/cmds/cpud
102+
$ uimage make ./u-root/cmds/core/{init,gosh} ./cpu/cmds/cpud
103103
...
104104
01:24:15 INFO GBB_STRICT is not set.
105105
01:24:15 INFO [WARNING] github.com/u-root/cpu/cmds/cpud depends on github.com/u-root/u-root @ version v0.11.1-0.20230913033713-004977728a9d
@@ -115,12 +115,12 @@ lrwxrwxrwx 0 root root 2 Jan 1 1970 bbin/init -> bb
115115
...
116116
```
117117

118-
`GBB_PATH` is a place that mkuimage will look for commands. Each colon-separated
118+
`GBB_PATH` is a place that uimage will look for commands. Each colon-separated
119119
`GBB_PATH` element is concatenated with patterns from the command-line and
120120
checked for existence. For example:
121121

122122
```shell
123-
GBB_PATH=$(pwd)/u-root:$(pwd)/cpu mkuimage \
123+
GBB_PATH=$(pwd)/u-root:$(pwd)/cpu uimage make \
124124
cmds/core/{init,gosh} \
125125
cmds/cpud
126126

@@ -137,7 +137,7 @@ If you add binaries with `-files` are listed, their ldd dependencies will be
137137
included as well.
138138

139139
```shell
140-
$ mkuimage -files /bin/bash
140+
$ uimage make -files /bin/bash
141141

142142
$ cpio -ivt < /tmp/initramfs.linux_amd64.cpio
143143
...
@@ -156,7 +156,7 @@ lrwxrwxrwx 0 root root 42 Jan 1 1970 lib64/ld-linux-x86-64.so.
156156
You can determine placement with colons:
157157

158158
```shell
159-
$ mkuimage -files "/bin/bash:sbin/sh"
159+
$ uimage make -files "/bin/bash:sbin/sh"
160160

161161
$ cpio -ivt < /tmp/initramfs.linux_amd64.cpio
162162
...
@@ -168,7 +168,7 @@ For example on Debian, if you want to add two kernel modules for testing,
168168
executing your currently booted kernel:
169169

170170
```shell
171-
$ mkuimage -files "$HOME/hello.ko:etc/hello.ko" -files "$HOME/hello2.ko:etc/hello2.ko" ./u-root/cmds/core/*
171+
$ uimage make -files "$HOME/hello.ko:etc/hello.ko" -files "$HOME/hello2.ko:etc/hello2.ko" ./u-root/cmds/core/*
172172
$ qemu-system-x86_64 -kernel /boot/vmlinuz-$(uname -r) -initrd /tmp/initramfs.linux_amd64.cpio
173173
```
174174

@@ -177,7 +177,7 @@ $ qemu-system-x86_64 -kernel /boot/vmlinuz-$(uname -r) -initrd /tmp/initramfs.li
177177
To cross compile for an ARM, on Linux:
178178

179179
```shell
180-
GOARCH=arm mkuimage ./u-root/cmds/core/*
180+
GOARCH=arm uimage make ./u-root/cmds/core/*
181181
```
182182

183183
If you are on OSX, and wish to build for Linux on AMD64:
@@ -213,7 +213,7 @@ has native uimage support.
213213

214214
## Multi-module uimages
215215

216-
Rather than having mkuimage decide how to resolve dependencies across
216+
Rather than having uimage decide how to resolve dependencies across
217217
multi-module repositories, you may also create a go.mod with all commands you
218218
intend to use in them.
219219

@@ -247,20 +247,20 @@ mod tidy` to add these dependencies to `go.mod`:
247247
```sh
248248
go mod tidy
249249

250-
mkuimage \
250+
uimage make \
251251
github.com/u-root/u-root/cmds/core/ip \
252252
github.com/u-root/u-root/cmds/core/init \
253253
github.com/hugelgupf/p9/cmd/p9ufs
254254
```
255255

256256
## Build Modes
257257

258-
mkuimage can create an initramfs in two different modes, specified by `-build`:
258+
uimage can create an initramfs in two different modes, specified by `-build`:
259259

260260
* `bb` mode: One busybox-like binary comprising all the Go tools you ask to
261261
include.
262262
See [the gobusybox README for how it works](https://github.com/u-root/gobusybox).
263-
In this mode, mkuimage copies and rewrites the source of the tools you asked
263+
In this mode, uimage copies and rewrites the source of the tools you asked
264264
to include to be able to compile everything into one busybox-like binary.
265265

266266
* `binary` mode: each specified binary is compiled separately and all binaries

0 commit comments

Comments
 (0)