|
3 | 3 | 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).
|
4 | 4 | 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.
|
5 | 5 |
|
6 |
| -First, compile the binary with the following command: |
| 6 | + |
| 7 | +## Compiling Instructions |
| 8 | +To compile, run this command to compile the binary: |
7 | 9 |
|
8 | 10 | ```
|
9 | 11 | gcc generate_nand.c -o generate_nand
|
10 | 12 | ```
|
11 | 13 |
|
| 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 | + |
12 | 48 | 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. |
14 | 50 |
|
15 | 51 | ```
|
16 | 52 | ./generate_nand
|
|
0 commit comments