Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions README.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -501,6 +501,30 @@ ostool --workdir /path/to/kernel run qemu
sudo setcap cap_net_bind_service=+eip $(which ostool)
```

When using a system TFTP root on Linux (`/srv/tftp` by default), ostool stages
FIT images under `/srv/tftp/ostool` and removes the staging directory with the
regular user's permissions after each run. Configure a dedicated group for
this directory:

```bash
# One-time setup
sudo groupadd ostool
sudo usermod -aG ostool "$USER"
sudo install -d -o root -g ostool -m 2775 /srv/tftp/ostool
```

After setup, log in again. Alternatively, start a shell with the new group in
the current terminal:

```bash
newgrp ostool
```

Skip `groupadd` if the `ostool` group already exists. Run `newgrp ostool`, log in
again to activate the new group; restarting `tftpd-hpa` is not required. ostool
does not use `sudo rmdir` after a run; cleanup returns an error when the
directory does not grant group write access.

### Debug Configuration

```toml
Expand Down
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -498,6 +498,27 @@ ostool --workdir /path/to/kernel run qemu
sudo setcap cap_net_bind_service=+eip $(which ostool)
```

在 Linux 上使用系统 TFTP 根目录(默认 `/srv/tftp`)时,ostool 会在
`/srv/tftp/ostool` 下暂存 FIT 镜像,并在任务结束后使用普通用户权限删除暂存目录。
请为该目录配置专用用户组:

```bash
# 首次配置
sudo groupadd ostool
sudo usermod -aG ostool "$USER"
sudo install -d -o root -g ostool -m 2775 /srv/tftp/ostool
```

配置完成后,重新登录;也可以在当前终端启动一个已应用新用户组的 shell:

```bash
newgrp ostool
```

如果 `ostool` 组已经存在,可以跳过 `groupadd`。执行 `newgrp ostool` 或重新登录后,
新用户组权限才会生效;不需要重启 `tftpd-hpa`。ostool 不会在任务结束时使用
`sudo rmdir`;目录缺少组写权限时,清理操作会返回错误。

### 调试配置

```toml
Expand Down
Loading