Skip to content

Commit 10f542f

Browse files
authored
Merge pull request #11 from UrkiMimi/ipod_touch_2g
Document how to generate the filesystem-it2g-readonly.img
2 parents 2161bcf + 76881e4 commit 10f542f

File tree

1 file changed

+38
-2
lines changed

1 file changed

+38
-2
lines changed

README.md

+38-2
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,50 @@
33
This README contains the instructions on how to generate the NAND image for the iPod Touch 2G that can be read by [QEMU-iOS](https://github.com/devos50/qemu-ios).
44
For this, you must put the `filesystem-it2g-readonly.img` file of the filesystem that will be included in the NAND image in the root of this repository.
55

6-
First, compile the binary with the following command:
6+
7+
## Compiling Instructions
8+
To compile, run this command to compile the binary:
79

810
```
911
gcc generate_nand.c -o generate_nand
1012
```
1113

14+
## Converting the filesystem into an image
15+
Converting the filesystem to an image is somewhat simple. You first need to convert the filesystem read-only with hdiutil:
16+
17+
```
18+
hdiutil convert -format UDRO filesystem-it2g-writable.dmg -o filesystem-it2g-readonly.dmg
19+
```
20+
21+
Before converting `filesystem-it2g-readonly.dmg` you will need to find what partition you need to convert. You can find this out easily by using dmg2img to list the disk partitions.
22+
23+
```
24+
username@Macbook-Air qemu-ios-generate-nand %dmg2img -l filesystem-it2g-readonly.dmg
25+
26+
dmg2img v1.6.7 (c) vu1tur ([email protected])
27+
28+
filesystem-it2g-readonly.dmg --> (partition list)
29+
30+
partition 0: Driver Descriptor Map (DDM : 0)
31+
partition 1: (Apple_Free : 1)
32+
partition 2: Apple (Apple_partition_map : 2)
33+
partition 3: Macintosh (Apple_Driver_ATAPI : 3)
34+
partition 4: (Apple_Free : 4)
35+
partition 5: Mac_OS_X (Apple_HFSX : 5)
36+
partition 6: (Apple_Free : 6)
37+
```
38+
39+
For me, partition 5 is the one I need to convert. Now convert the image with the partition number like so:
40+
41+
```
42+
dmg2img -p 5 filesystem-it2g-readonly.dmg
43+
```
44+
45+
# Generating the NAND Image
46+
47+
1248
Before generating the NAND image, make sure to remove any prior NAND data by running `rm -rf nand`.
13-
Then, generate your NAND image by running the compiled binary:
49+
Using the filesystem image we generated from earlier, run this command from the binary you compiled.
1450

1551
```
1652
./generate_nand

0 commit comments

Comments
 (0)