From 7bbf87cac73d19fc456efc9553bf898784a1ab55 Mon Sep 17 00:00:00 2001 From: Paul Philippov Date: Sat, 4 Mar 2023 12:52:34 -0500 Subject: [PATCH 1/4] Update help-uboot.md --- en/help-uboot.md | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/en/help-uboot.md b/en/help-uboot.md index 6accd7f..50d8544 100644 --- a/en/help-uboot.md +++ b/en/help-uboot.md @@ -205,6 +205,45 @@ sf erase 0x0 ${flashsize} sf write ${baseaddr} 0x0 ${filesize} ``` +### Flashing full image from TFTP + +Before you start, [prepare the enviroment](#prepare-the-enviroment). + +Download [full image binary for your SoC](https://openipc.org/supported-hardware/) +and place it in the root directory of your local FTFP server. + +Start the session and boot into the bootloader console interrupting booting +routine with a key combo. When in the console, set up parameters of your local +network, if needed. + +``` +setenv ipaddr 192.168.1.10 +setenv netmask 255.255.255.0 +setenv gatewayip 192.168.1.1 +setenv serverip 192.168.1.254 +``` + +Use the following commands to reflash your camera with the full image: + +Example for 8MB: +``` +mw.b ${baseaddr} 0xff ${flashsize} +tftpboot ${baseaddr} openipc-${soc}-lite-8mb.bin +sf probe 0; sf erase 0x0 ${flashsize}; sf write ${baseaddr} 0x0 ${filesize} +reset +``` + +Example for 16MB: +``` +mw.b ${baseaddr} 0xff ${flashsize} +tftpboot ${baseaddr} openipc-${soc}-ultimate-16mb.bin +sf probe 0; sf erase 0x0 ${flashsize}; sf write ${baseaddr} 0x0 ${filesize} +reset +``` +At the first boot, sign in into the bootloader shell once again and remap +partitioning running `run setnor16m` command. + + ### Reading binary image from SD card. Before you start, [prepare the enviroment](#prepare-the-enviroment). From 5589c32b9374676e93ebc92e9101b8e14b7e6e70 Mon Sep 17 00:00:00 2001 From: Paul Philippov Date: Sat, 4 Mar 2023 14:01:22 -0500 Subject: [PATCH 2/4] Update faq.md --- en/faq.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/en/faq.md b/en/faq.md index 5610c91..89330a8 100644 --- a/en/faq.md +++ b/en/faq.md @@ -4,6 +4,16 @@ Frequesntly Asked Questions --------------------------- +### How to strip U-Boot wrapper from a binary image + +``` +dd if=inputfile.img of=outputfile.bin bs=64 skip=1 +``` +alternatively +``` +tail -c +65 inputfile.img > outputfile.bin +``` + ### How to get into bootloader shell? [There is a handful of ways to get access to a locked bootloader shell](help-uboot.md#bypassing-password-protected-bootloader) From b58620114ef508da1ac3af35fe9a2b765f436cea Mon Sep 17 00:00:00 2001 From: Paul Philippov Date: Sat, 4 Mar 2023 14:07:10 -0500 Subject: [PATCH 3/4] Update faq.md --- en/faq.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/en/faq.md b/en/faq.md index 89330a8..68eff3f 100644 --- a/en/faq.md +++ b/en/faq.md @@ -4,8 +4,14 @@ Frequesntly Asked Questions --------------------------- -### How to strip U-Boot wrapper from a binary image +### How to strip U-Boot Image wrapper from a binary image +Sometimes vendor's firmware consists of binary images intended +for use with U-Boot image loader and prepended with headers in +[U-Boot Image wrapper format](https://formats.kaitai.io/uimage/). +The header should be stripped off before you can use such an image +as a raw binary file. Here's how you can strip the first 64 bytes +from a file: ``` dd if=inputfile.img of=outputfile.bin bs=64 skip=1 ``` From 5137a8100bbfbb97ff69ab06f2ad6883f9bd8278 Mon Sep 17 00:00:00 2001 From: Paul Philippov Date: Sat, 4 Mar 2023 14:07:41 -0500 Subject: [PATCH 4/4] Update faq.md --- en/faq.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/en/faq.md b/en/faq.md index 68eff3f..9d261d5 100644 --- a/en/faq.md +++ b/en/faq.md @@ -4,7 +4,7 @@ Frequesntly Asked Questions --------------------------- -### How to strip U-Boot Image wrapper from a binary image +### How to strip U-Boot Image wrapper header from a binary image Sometimes vendor's firmware consists of binary images intended for use with U-Boot image loader and prepended with headers in