gnaghi edited this page Nov 7, 2017 · 13 revisions

Building ingenic-boot

These build instructions are for Linux; building on other operating systems is untested.

First make sure you have all build dependencies installed. This includes the standard packages you need to compile (GCC, Make etc) and the libraries "libusb" (package libusb-1.0-0 on Debian/Ubuntu) and "libconfuse" (package libconfuse0 or libconfuse-dev on Debian/Ubuntu), plus their development packages. Also make sure you have the version control system git installed.

To fetch the source and build it, run these commands:

git clone git://github.com/gcwnow/ingenic-boot.git
cd ingenic-boot
make 

The script named ingenic-boot at the top of the source dir is the most convenient way to use ingenic-boot.

Images

The images you can flash are the master boot record mbr.bin, the boot loader ubiboot-<hwconf>.bin, the system image system.bin and the data image data.bin. The system image is a vfat file system containing the kernel and rootfs. The data image is an ext4 file system containing pre-installed applications and room for user data to be added later.

You can use the tools from the imager repository to create the MBR, system and data images.

Select hardware configuration

There are different hardware variants of the GCW Zero: prototypes (PCB v1.1 with 256MB DDR2 SDRAM) and production units (PCB v2.0 with 512MB MDDR SDRAM). The third type (PCB v1.1 with 512MB DDR2 SDRAM) was not released. You can easily see the difference between a prototype and production unit by turning on the Zero: if the green power LED turns on, it's a production unit.

The production variant is the default one, since eventually there will be many more people with a production unit than with a prototype unit. If you have a prototype unit, you must either add --config=gcw0_v11_ddr2_256mb to the ingenic-boot command line, or set a new default by changing the symlink fw/current.cfg to point to gcw0_v11_ddr2_256mb.cfg.

Re-flashing the GCW Zero

NOTE: This process will erase all data on the internal SD card of the Zero. If you have valuable data there, make a backup first!

While powering on or rebooting the Zero, hold the SELECT key. This puts the JZ4770 into USB boot mode.

To perform the flashing, run:

./ingenic-boot --mbr=mbr.bin --boot=ubiboot-v20_mddr_512mb.bin --system=system.bin --data=data.bin

Partial re-flash

You can also do a partial re-flash by supplying only one or two of these images to ingenic-boot. However, the data partition is resized on the Zero's first boot after reflashing, such that it spans the entire remainder of the SD card. This means that if you reflash the MBR you must reflash the data partition as well, otherwise the Zero's kernel will refuse to mount the data partition because the file system on it is larger than the partition that contains it.

Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.