aircable/Brewie_B20_ReLinux
GitHub: aircable/Brewie_B20_ReLinux
该项目提供了一套将旧版嵌入式 Linux BSP 迁移到 Buildroot 和主线 Linux 的工具与完整方法论,并以 Brewie B20 为范例。
Stars: 1 | Forks: 0
# ReLinux: Brewie B20 BSP 迁移
一个基于 Buildroot 的 Linux BSP 迁移项目,旨在将 Brewie B20 (Allwinner A13) 从旧的厂商 BSP 迁移到现代上游 Linux。
## 项目概述
本仓库记录了将旧版嵌入式 Linux 系统迁移到现代主线 kernel 支持的完整工作流程。Brewie B20 采用 Allwinner A13 SoC 和旧的 FEX 配置。
## 仓库结构
```
├── board/
│ └── brewie/
│ ├── sun5i-brewie.dts # Main device tree (mainline)
├── configs/
│ └── brewie_b20_defconfig # Buildroot configuration
├── scripts/
│ ├── fex-report.py # FEX analysis tool
│ ├── fex2dts.py # FEX to DTS converter
│ └── report.md # Hardware analysis report
├── SDcard/ # Recovered boot partition from the original Linux
├── ARCHITECTURE.md # Hardware architecture documentation
├── DISCOVERY.md # Hardware discovery notes
├── PLAN.md # Project milestones and status
├── AGENT.md # Engineering guidelines
└── several text files with discovery commands and logs
```
## 本仓库中的文件及其作用
- brewie_b20_defconfig 选择 kernel、U-Boot、ext4 rootfs 以及 genimage 流程。
- sun5i-brewie.dts 是开发板的硬件描述。
- genimage.cfg 定义 sdcard.img。
- post-image.sh 运行 genimage。
- 根目录下的 README 现在将该仓库标识为 Brewie BSP 工具包,而不仅仅是通用的 Buildroot。
- board/brewie/B20/rootfs-overlay/.gitkeep 的存在只是为了让 overlay 路径能在 git 中保留;它并不是一个有意义的运行时文件。
## 快速开始
### 分析
对原始 2014 版 Linux 的分析已经完成。但此处发布的相关工具可供类似项目使用。
```
cd scripts
python3 fex-report.py SDcard/script.fex
python3 fex2dts.py SDcard/script.fex > board/brewie/sun5i-brewie.dts
```
### Buildroot 集成
```
# 在 buildroot 目录中
cp configs/brewie_b20_defconfig configs/
make brewie_b20_defconfig
make
```
## 硬件概览
| 组件 | 详情 |
|-----------|---------|
| SoC | Allwinner A13 (sun5i), ARM Cortex-A8 |
| RAM | 512 MB DDR3 |
| PMIC | AXP209 |
| LCD | 480x272 RGB 并行接口 |
| 触摸 | ft5x06 (I2C) |
| RTC | PCF8563 (I2C) |
| UART | UART1 控制台 (115200n8) |
## 里程碑
- [x] FEX 恢复与分析
- [x] 设备树生成
- [x] 硬件检测 (I2C 设备)
- [x] Kernel 编译 (Buildroot)
- [ ] 硬件测试
## 许可证
文档:CC-BY-SA 4.0
脚本:MIT
设备树:GPL-2.0
标签:BSP迁移, Buildroot, 安全渗透, 嵌入式Linux, 工具链, 硬件适配, 设备树, 逆向工具