Commit graph

3 commits

Author SHA1 Message Date
Amaury Pouly
83155f32bf jz4760b_tools: improve usbboot tool
Change-Id: I21b61a3f56d718bef3aa0cf5096359c463c1f93a
2017-01-24 15:23:21 +01:00
Amaury Pouly
c90d42dcc6 jz4670_tools: add usbboot tool, tweak Makefile and packtool
Although the jz4740 contains a similar tool to usbboot, its command-line
interface is not very useful, also it does not compile by default because it
relies on some external code, and it contains code specific to some JZ4740
devices.

Change-Id: I22688238d147e21fb0fd524466b333b6003d4ff1
2016-04-08 18:54:46 +01:00
Amaury Pouly
b130b50734 Add jz4760 tool
This tool can pack/unpack a jz4760 archive (like the one used for the fiio
x1/x3/x5), and can descramble/scramble (it's the same operation) a firmware
file (the sys.bin file in the archive). I did my best to keep the compatibility
with the leaked Fiio/Ingenic tool which has the same name.

I wrote the tools from scratch, but here are some remarks:
- the format used is a slightly modified IHFS used in the older JZ4640 series,
  I used the information on the wiki about the IHFS format
- the CRC computation done was already reversed engineered by someone on the
  forums but I realised this later
- There are a few unknown fields in the headers, see comments in the source code
- The firmware scrambling was discovered by pure guess, I realised there were
  some repetitve sequences, some I guessed it was a rotative XOR and ran some
  analysis to find the most probable sequence

Change-Id: Ib83735b3db8475be5de9c94231714e88668a0340
2015-03-29 14:08:28 +02:00