diff options
| author | IskandarMa <epiciskandar@gmail.com> | 2022-01-19 02:24:02 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-01-18 18:24:02 +0000 |
| commit | f6a7f4d4aca4a1808850e2dcd8cc223ae5202062 (patch) | |
| tree | fefc9beff20ea6438e9c1927d83319ed4c85a6b0 /docs/zh-cn/getting_started_vagrant.md | |
| parent | 8a3dfe2246c4a6182cf18349e9c4d0d28cae4ec5 (diff) | |
| download | qmk_firmware-f6a7f4d4aca4a1808850e2dcd8cc223ae5202062.tar.gz qmk_firmware-f6a7f4d4aca4a1808850e2dcd8cc223ae5202062.zip | |
update the Chinese translation based on the latest English version (#14924)
Co-authored-by: peepeetee <43021794+peepeetee@users.noreply.github.com>
Co-authored-by: Joy Lee <chang.li@westberrytech.com>
Co-authored-by: LitoMore <LitoMore@users.noreply.github.com>
Co-authored-by: Dasky <32983009+daskygit@users.noreply.github.com>
Diffstat (limited to 'docs/zh-cn/getting_started_vagrant.md')
| -rw-r--r-- | docs/zh-cn/getting_started_vagrant.md | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/docs/zh-cn/getting_started_vagrant.md b/docs/zh-cn/getting_started_vagrant.md new file mode 100644 index 000000000..5e5de4455 --- /dev/null +++ b/docs/zh-cn/getting_started_vagrant.md | |||
| @@ -0,0 +1,61 @@ | |||
| 1 | # Vagrant快速上手指引 | ||
| 2 | |||
| 3 | <!--- | ||
| 4 | original document: 0.15.12:docs/getting_started_vagrant.md | ||
| 5 | git diff 0.15.12 HEAD -- docs/getting_started_vagrant.md | cat | ||
| 6 | --> | ||
| 7 | |||
| 8 | 本工程包含一份 `Vagrantfile`,可以方便地在不更改你系统环境情况下完成新固件文件的构建工作。这同时也保证了在你拉取该工程代码后的编译环境与也使用Vagrantfile的其它人的一致。当你需要其他人协助你排查遇到的问题时会方便很多。 | ||
| 9 | |||
| 10 | ## 需求 | ||
| 11 | |||
| 12 | 本工程中的 `Vagrantfile` 需要安装[Vagrant](https://www.vagrantup.com/)以及可用的虚拟机服务: | ||
| 13 | |||
| 14 | * [VirtualBox](https://www.virtualbox.org/) (5.0.12及以后版本) | ||
| 15 | * 卖点是'最适用于Vagrant的平台' | ||
| 16 | * [VMware Workstation](https://www.vmware.com/products/workstation) 及 [Vagrant VMware插件](https://www.vagrantup.com/vmware) | ||
| 17 | * (付费购买的)VMware插件需要在经过正版授权的VMware Workstation/Fusion上运行 | ||
| 18 | * [Docker](https://www.docker.com/) | ||
| 19 | |||
| 20 | 安装了Vagrant之后,在安装合适的虚拟机服务后可能需要重启机器。拉取本工程后在工程目录下执行 'vagrant up' 将启动一个包含了所有本工程所需工具的构建环境(虚拟机或是容器)。最后会有一个vagrant启动提示告知你一切正常就绪,否则你也可以参考一下下面的构建文档。 | ||
| 21 | |||
| 22 | ## 刷写固件 | ||
| 23 | |||
| 24 | 比较“简单”的方案是在你的宿主系统上借助以下工具刷写固件: | ||
| 25 | |||
| 26 | * [QMK工具箱](https://github.com/qmk/qmk_toolbox) (推荐) | ||
| 27 | * [Teensy Loader](https://www.pjrc.com/teensy/loader.html) | ||
| 28 | |||
| 29 | 如果你希望通过命令行进行编程工作,可以在Vagrantfile中取消掉['modifyvm']的注释以允许USB直通到Linux环境,既可以使用dfu-util/dfu-programmer之类的命令行工具进行编程工作,或是安装Teensy的命令行版本。 | ||
| 30 | |||
| 31 | ## Vagrantfile概览 | ||
| 32 | 开发环境被配置为运行QMK Docker镜像 `qmkfm/qmk_cli`,不仅让各系统下的功能预期一致,也是我们CI环境的镜像。 | ||
| 33 | |||
| 34 | ## FAQ | ||
| 35 | |||
| 36 | ### 为什么我的VirtualBox环境会有问题? | ||
| 37 | VirtualBox 5的某些版本与工程中Vagrantfile中指定的VirtualBox扩展存在兼容问题。如果你遇到了/vagrant挂载不成功的问题,请升级VirtualBox至5.0.12或更高版本。**或者,可以尝试执行如下命令:** | ||
| 38 | |||
| 39 | ```console | ||
| 40 | vagrant plugin install vagrant-vbguest | ||
| 41 | ``` | ||
| 42 | |||
| 43 | ### 如何移除一个现有环境? | ||
| 44 | 不再需要这个环境了是吗?在本工程目录下的任何位置,执行: | ||
| 45 | |||
| 46 | ```console | ||
| 47 | vagrant destroy | ||
| 48 | ``` | ||
| 49 | |||
| 50 | ### 如果我是想直接用Docker呢? | ||
| 51 | 想在不使用虚拟机技术的情况下也能使用Vagrant工作流?Vagrangfile已配置为允许绕过运行虚拟机,直接运行容器。通过如下方式执行命令可以强制使用Docker来启动环境: | ||
| 52 | ```console | ||
| 53 | vagrant up --provider=docker | ||
| 54 | ``` | ||
| 55 | |||
| 56 | ### 如何访问虚拟机环境而非Docker容器? | ||
| 57 | 通过如下方法跳过 `vagrant` 的用户初始化过程以在QMK构建镜像中直接执行: | ||
| 58 | |||
| 59 | ```console | ||
| 60 | vagrant ssh -c 'sudo -i' | ||
| 61 | ``` | ||
