Skip to content

Commit b610071

Browse files
committed
Updated H700 docuemntation
1 parent 11d859b commit b610071

File tree

1 file changed

+51
-1
lines changed

1 file changed

+51
-1
lines changed

docs/guides/h700-firmware-extract.md

+51-1
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,33 @@ And for boot-package:
264264
$ dd if=RG35XXH-EN16GB-OS240330.IMG of=boot_package.img bs=1024 skip=16400 count=20464
265265
```
266266

267+
For boot.img and env.img, those are coming directly from partitions 1 and 2 of that image. To extract those, first run fdisk -l against the image:
268+
269+
```bash
270+
$ fdisk -l RG35XXH-EN16GB-OS240330.IMG
271+
Disk RG35XXH-EN16GB-OS240330.IMG: 14.41 GiB, 15476981760 bytes, 30228480 sectors
272+
Units: sectors of 1 * 512 = 512 bytes
273+
Sector size (logical/physical): 512 bytes / 512 bytes
274+
I/O size (minimum/optimal): 512 bytes / 512 bytes
275+
Disklabel type: gpt
276+
Disk identifier: AB6F3888-569A-4926-9668-80941DCB40BC
277+
278+
Device Start End Sectors Size Type
279+
RG35XXH-EN16GB-OS240330.IMG1 73728 8880127 8806400 4.2G Microsoft basic data
280+
RG35XXH-EN16GB-OS240330.IMG2 8880128 8945663 65536 32M Microsoft basic data
281+
RG35XXH-EN16GB-OS240330.IMG3 8945664 8978431 32768 16M Microsoft basic data
282+
RG35XXH-EN16GB-OS240330.IMG4 8978432 9109503 131072 64M Microsoft basic data
283+
RG35XXH-EN16GB-OS240330.IMG5 9109504 25886719 16777216 8G Microsoft basic data
284+
RG35XXH-EN16GB-OS240330.IMG6 25886720 30226431 4339712 2.1G Microsoft basic data
285+
```
286+
287+
Then extract partitions 1 and 2 with:
288+
289+
```bash
290+
dd if=RG35XXH-EN16GB-OS240330.IMG of=boot.img bs=512 skip=73728 count=8806400
291+
dd if=RG35XXH-EN16GB-OS240330.IMG of=env.img bs=512 skip=8880128 count=8945663
292+
```
293+
267294
If you use the SDCARD, just replace ``RG35XXH-EN16GB-OS240330.IMG`` with the device of your sdcard. In this example is /dev/sdh but you will need to identify the correct device.
268295

269296
```bash
@@ -276,9 +303,32 @@ And for boot-package:
276303
$ sudo dd if=/dev/sdh of=boot_package.img bs=1024 skip=16400 count=20464
277304
```
278305

306+
To extract the boot.img and env.img (partitions 1 and 2) we can just dump the sdcard partitions directly:
307+
308+
```bash
309+
$ sudo dd if=/dev/sdh1 of=boot.img bs=1024
310+
$ sudo dd if=/dev/sdh2 of=env.img bs=1024
311+
```
279312

280313
## Putting everything back together
281314

282-
Once you have the main elements (boot0.img, boot-package.img, boot.img, and env.img) you can reconstruct a working SDCARD
315+
Once you have the main elements (boot0.img, boot-package.img, boot.img, and env.img) you can reconstruct a working SDCARD:
316+
317+
* Create a new gpt based SDCARD with 4 partitions and make sure the first partition starts at block 73728.
318+
* Flash the internal partitions boot0 and boot_package.img:
319+
320+
```bash
321+
sudo dd if=boot0.img of=/dev/sdh bs=1024 seek=8
322+
sudo dd if=boot_package.img of=/dev/sdh bs=1024 seek=16400
323+
```
324+
325+
* Flash the boot.img and env.img
326+
327+
```bash
328+
sudo dd if=boot.img of=/dev/sdh1 bs=1024
329+
sudo dd if=env.img of=/dev/sdh2 bs=1024
330+
```
331+
332+
Partition 3 of the sdcard is boot-resource, that typically contains ``bootlogo.bmp`` that is the boot splash screen logo, as well as the rootfs in squashfs format (``boot/batocera``).
283333

284334

0 commit comments

Comments
 (0)