From b259439aee02a65a104369f9f704916e00a38cb4 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 25 Sep 2025 02:06:14 +0000 Subject: [PATCH 2/2] Fix bootloader installation logic and update documentation Co-authored-by: longzheng268 <38132402+longzheng268@users.noreply.github.com> --- README.md | 13 ++++++++++++- install_bl.py | 6 +++++- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 3543f23..661c0e6 100644 --- a/README.md +++ b/README.md @@ -392,6 +392,17 @@ Select language [1-English, 2-中文, 3-Русский]: - CR6606, CR6608, CR6609, TR608, TR609: `pb-boot-cr660x.img` - **安装命令**: `python3 install_bl.py breed` +#### 7a. 安装原厂U-Boot引导加载器 +- **U-Boot特点**: + - 设备原厂Bootloader + - 设备特定的引导程序 + - 用于恢复原厂引导环境 +- **支持型号**: + - R3G: `uboot_r3g.bin` + - R3P: `uboot_r3p.bin` + - RM2100: `uboot_rm2100.bin` +- **安装命令**: `python3 install_bl.py uboot` + #### 8. 测试功能 开发和调试用途的测试功能。 @@ -703,7 +714,7 @@ git push origin feature/new-feature - **Permanent SSH access** with customizable credentials - **Full firmware backup** and selective partition backup - **Custom firmware installation** including OpenWrt support -- **Bootloader replacement** (Breed support for R3G/R3P/RM2100/RA71/CR660x/TR60x series) +- **Bootloader replacement** (Breed support for R3G/R3P/RM2100/RA71/CR660x/TR60x series, U-Boot support for R3G/R3P/RM2100) - **Multi-language support** (EN/RU/ZH language packs with Chinese menu interface) - **Advanced features** like password change, log reading, feature unlocking diff --git a/install_bl.py b/install_bl.py index 96a544b..d76e333 100644 --- a/install_bl.py +++ b/install_bl.py @@ -35,7 +35,11 @@ if bl_name == 'breed': fn_local = fn_dir + 'breed_r3g_eng.bin' if bl_name == 'uboot': - fn_local = fn_dir + 'uboot_{}.bin'.format(dn) + # Check if device has a specific uboot file available + supported_uboot_devices = ['R3G', 'R3P', 'RM2100'] + if dn not in supported_uboot_devices: + die("U-Boot bootloader is not available for this device! Supported devices: {}".format(', '.join(supported_uboot_devices))) + fn_local = fn_dir + 'uboot_{}.bin'.format(dn.lower()) if not fn_local: die('Incorrect bootloader name!')