Skip to content

Commit b5fd75e

Browse files
Update BusyBox installation and environment initialization stages (#39)
Update the env init scripts and document polished --------- Co-authored-by: Charliechen114514 <725610365@qq.com>
1 parent 4c57711 commit b5fd75e

3 files changed

Lines changed: 15 additions & 23 deletions

File tree

document/scripts/init/env-init.sh.md

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -42,17 +42,16 @@ check_linux_dependencies
4242

4343
| 选项 | 说明 |
4444
|------|------|
45-
| `--stage <1|2|3|4>` | 检查特定构建阶段的依赖包 |
45+
| `--stage <1|2|3>` | 检查特定构建阶段的依赖包 |
4646
| `-h, --help` | 显示帮助信息 |
4747

4848
### 阶段说明
4949

5050
| 阶段 | 构建目标 | 说明 |
5151
|------|----------|------|
5252
| 1 | U-Boot | U-Boot 引导程序 |
53-
| 2 | Linux | NXP BSP 内核 |
54-
| 3 | Mainline Linux | 主线内核 |
55-
| 4 | BusyBox | BusyBox 工具集 |
53+
| 2 | Linux | NXP BSP & Mainline 内核 |
54+
| 3 | BusyBox | BusyBox 工具集 |
5655

5756
## 依赖包列表
5857

@@ -207,14 +206,11 @@ check_python_module elftools python3-pyelftools
207206
# 检查 U-Boot 依赖
208207
./scripts/init/env-init.sh --stage 1
209208

210-
# 检查 Linux 依赖
209+
# 检查 Linux 依赖(NXP BSP & Mainline)
211210
./scripts/init/env-init.sh --stage 2
212211

213-
# 检查 Mainline Linux 依赖
214-
./scripts/init/env-init.sh --stage 3
215-
216212
# 检查 BusyBox 依赖
217-
./scripts/init/env-init.sh --stage 4
213+
./scripts/init/env-init.sh --stage 3
218214
```
219215

220216
### 作为库使用

document/tutorial/start/02_env_init_guide.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@
3232
# 检查 Stage 2 (Linux Kernel) 依赖
3333
./scripts/init/env-init.sh --stage 2
3434

35-
# 检查 Stage 4 (BusyBox) 依赖
36-
./scripts/init/env-init.sh --stage 4
35+
# 检查 Stage 3 (BusyBox) 依赖
36+
./scripts/init/env-init.sh --stage 3
3737
```
3838

3939
## 依赖包列表
@@ -52,7 +52,8 @@
5252
- libncurses-dev
5353
- imagemagick
5454

55-
### Stage 2: Linux Kernel (Mainline)
55+
### Stage 2: Linux Kernel (Mainline/NXP BSP)
56+
目前,项目默认的选项为NXP BSP,不过两者使用的依赖完全一致!
5657
- build-essential
5758
- bc
5859
- bison

scripts/init/env-init.sh

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -281,11 +281,10 @@ Usage: $(basename "$0") [OPTIONS]
281281
检查主机依赖包并可选安装缺失的依赖。
282282
283283
OPTIONS:
284-
--stage <1|2|3|4> 检查特定构建阶段的依赖包
284+
--stage <1|2|3> 检查特定构建阶段的依赖包
285285
1 = U-Boot依赖
286-
2 = Linux依赖
287-
3 = Mainline Linux依赖
288-
4 = BusyBox依赖
286+
2 = Linux依赖(NXP BSP & Mainline)
287+
3 = BusyBox依赖
289288
-h, --help 显示此帮助信息
290289
291290
EXAMPLES:
@@ -313,21 +312,17 @@ if [[ "$(basename "$0")" == "env-init.sh" ]]; then
313312
check_linux_dependencies
314313
;;
315314
3)
316-
log_info "检查 Stage 3 (Mainline Linux) 依赖包..."
317-
check_linux_dependencies
318-
;;
319-
4)
320-
log_info "检查 Stage 4 (BusyBox) 依赖包..."
315+
log_info "检查 Stage 3 (BusyBox) 依赖包..."
321316
check_busybox_dependencies
322317
;;
323318
*)
324-
echo "Usage: $0 [--stage 1|2|3|4]"
319+
echo "Usage: $0 [--stage 1|2|3]"
325320
echo "Use '$0 --help' for more information"
326321
exit 1
327322
;;
328323
esac
329324
else
330-
echo "Usage: $0 [--stage 1|2|3|4]"
325+
echo "Usage: $0 [--stage 1|2|3]"
331326
echo "Use '$0 --help' for more information"
332327
exit 1
333328
fi

0 commit comments

Comments
 (0)