Skip to content

TIny-Hacker/zgc4-flash-tools

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

ZGC4 Flash Tools

This repository contains scripts for working with Zero ZGC4 flash dumps, to be used alongside the Zero ZGC4 emulation QEMU fork.

build-main-flash

This script can be used to generate a usable internal flash file without dumping one from physical hardware. It requires the v2.25.0 flasher update file, available in Zero's Discord server.

Usage: ./build-main-flash.sh <flasher-update> <flash-out>

To use the emulator, you'll need to create an empty 8MB binary file as well to use as the external flash. One way to do that is with dd: dd if=/dev/zero of=external-flash.bin bs=1M count=8

After launching the emulator once to format the newly created external flash, use the send-file script to transfer a valid firmware update file (>= v2.25.0) to the external flash's "exchange" directory. After launching the emulator a second time, the flasher program should detect the firmware update and install it, providing a functional system.

send-file

This script can be used to copy a file to the filesystem on an external flash image. You'll need a properly formatted external flash image to start (see above). The script requires GNU Mtools to be installed.

Usage: ./send-file.sh <flash-in> <file> [flash-out]

If flash-out is not provided, the changes will be written to the provided input flash file.

Files will be copied to the "exchange" directory on the filesystem, which will be created if it does not already exist. If the file being copied already exists in the filesystem, you will be prompted to resolve the issue. For example:

[info] Extracting FS region
[info] Copying file into FS
Long file name "v2.27.1.bin" already exists.
a)utorename A)utorename-all r)ename R)ename-all o)verwrite O)verwrite-all
s)kip S)kip-all q)uit (aArRoOsSq):

About

Scripts for working with Zero ZGC4 flash dumps

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages