summaryrefslogtreecommitdiff
path: root/data/dmg2img
diff options
context:
space:
mode:
authorJay Freeman <saurik@saurik.com>2008-02-03 12:53:13 +0000
committerJay Freeman <saurik@saurik.com>2008-02-03 12:53:13 +0000
commit67e75c0a6e38d03241c3df50c7787235bd946580 (patch)
tree059e27a9fcf2b7460e8667fe897bb183daf1ca22 /data/dmg2img
parent71aa834872c85e4dc89cff67688f9c8062c3fef5 (diff)
Added dmg2img, with fixes for getting good data out of multi-partition compressed images.
git-svn-id: http://svn.telesphoreo.org/trunk@46 514c082c-b64e-11dc-b46d-3d985efe055d
Diffstat (limited to 'data/dmg2img')
-rw-r--r--data/dmg2img/_metadata/description1
l---------data/dmg2img/_metadata/license1
l---------data/dmg2img/_metadata/maintainer1
-rw-r--r--data/dmg2img/_metadata/priority1
-rw-r--r--data/dmg2img/_metadata/section1
-rw-r--r--data/dmg2img/_metadata/version1
-rw-r--r--data/dmg2img/dmg2img.tar.gzbin0 -> 10916 bytes
-rw-r--r--data/dmg2img/make.sh6
-rw-r--r--data/dmg2img/offset.diff22
-rw-r--r--data/dmg2img/optimizer.diff11
10 files changed, 45 insertions, 0 deletions
diff --git a/data/dmg2img/_metadata/description b/data/dmg2img/_metadata/description
new file mode 100644
index 000000000..2a3351074
--- /dev/null
+++ b/data/dmg2img/_metadata/description
@@ -0,0 +1 @@
+converts compressed dmgs to HFS+
diff --git a/data/dmg2img/_metadata/license b/data/dmg2img/_metadata/license
new file mode 120000
index 000000000..9c13a9a0f
--- /dev/null
+++ b/data/dmg2img/_metadata/license
@@ -0,0 +1 @@
+../../../licenses/gpl-2 \ No newline at end of file
diff --git a/data/dmg2img/_metadata/maintainer b/data/dmg2img/_metadata/maintainer
new file mode 120000
index 000000000..0fa66e077
--- /dev/null
+++ b/data/dmg2img/_metadata/maintainer
@@ -0,0 +1 @@
+../../../people/saurik \ No newline at end of file
diff --git a/data/dmg2img/_metadata/priority b/data/dmg2img/_metadata/priority
new file mode 100644
index 000000000..134d9bc32
--- /dev/null
+++ b/data/dmg2img/_metadata/priority
@@ -0,0 +1 @@
+optional
diff --git a/data/dmg2img/_metadata/section b/data/dmg2img/_metadata/section
new file mode 100644
index 000000000..f1d43c641
--- /dev/null
+++ b/data/dmg2img/_metadata/section
@@ -0,0 +1 @@
+archive
diff --git a/data/dmg2img/_metadata/version b/data/dmg2img/_metadata/version
new file mode 100644
index 000000000..573541ac9
--- /dev/null
+++ b/data/dmg2img/_metadata/version
@@ -0,0 +1 @@
+0
diff --git a/data/dmg2img/dmg2img.tar.gz b/data/dmg2img/dmg2img.tar.gz
new file mode 100644
index 000000000..de5588362
--- /dev/null
+++ b/data/dmg2img/dmg2img.tar.gz
Binary files differ
diff --git a/data/dmg2img/make.sh b/data/dmg2img/make.sh
new file mode 100644
index 000000000..430845bef
--- /dev/null
+++ b/data/dmg2img/make.sh
@@ -0,0 +1,6 @@
+pkg:extract
+cd *
+pkg:patch
+make CC=arm-apple-darwin-gcc
+pkg: mkdir -p /usr/bin
+pkg: mv dmg2img /usr/bin
diff --git a/data/dmg2img/offset.diff b/data/dmg2img/offset.diff
new file mode 100644
index 000000000..880994251
--- /dev/null
+++ b/data/dmg2img/offset.diff
@@ -0,0 +1,22 @@
+diff -ru dmg2img/dmg2img.c dmg2img+iPhone/dmg2img.c
+--- dmg2img/dmg2img.c 2007-08-07 08:53:45.000000000 +0000
++++ dmg2img+iPhone/dmg2img.c 2008-01-30 18:54:01.000000000 +0000
+@@ -180,8 +180,9 @@
+ if (verbose)
+ printf("decompressing:\n");
+
++ in_offs = 0;
+ percent = 0.0;
+- for (i = 0; i < partnum; i++) {
++ for (i = 0; i < partnum && in_offs != addr; i++) {
+ if (verbose)
+ printf("opening partition %d ...",i);
+ if (verbose>=3)
+@@ -199,6 +200,7 @@
+ out_size = convert_char4(parts[i]+offset+20)*0x200;
+ in_offs = convert_char4(parts[i]+offset+28);
+ in_size = convert_char4(parts[i]+offset+36);
++ fseek(FOUT, out_offs, SEEK_SET);
+ if (out_size!=0) {
+ if (block_type == BT_ZLIB) {
+ if (verbose>=3)
diff --git a/data/dmg2img/optimizer.diff b/data/dmg2img/optimizer.diff
new file mode 100644
index 000000000..e2e464236
--- /dev/null
+++ b/data/dmg2img/optimizer.diff
@@ -0,0 +1,11 @@
+diff -ru dmg2img/Makefile dmg2img+iPhone/Makefile
+--- dmg2img/Makefile 2007-08-07 05:43:12.000000000 +0000
++++ dmg2img+iPhone/Makefile 2008-01-30 18:53:21.000000000 +0000
+@@ -1,6 +1,6 @@
+ BIN_DIR = /usr/bin
+ CC = gcc
+-CFLAGS = -O3
++CFLAGS = -O0
+
+ all: clean dmg2img
+