Merge branch 'master' of github:OpenIPC/wiki

pull/74/head
Igor Zalatov 2023-03-06 10:27:47 +03:00
commit b6f4da52e5
2 changed files with 55 additions and 0 deletions

View File

@ -4,6 +4,22 @@
Frequesntly Asked Questions
---------------------------
### 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
[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
```
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)

View File

@ -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).