summaryrefslogtreecommitdiff
path: root/rbutil/mks5lboot/README
diff options
context:
space:
mode:
Diffstat (limited to 'rbutil/mks5lboot/README')
-rw-r--r--rbutil/mks5lboot/README209
1 files changed, 209 insertions, 0 deletions
diff --git a/rbutil/mks5lboot/README b/rbutil/mks5lboot/README
new file mode 100644
index 0000000000..c2df299867
--- /dev/null
+++ b/rbutil/mks5lboot/README
@@ -0,0 +1,209 @@
1mks5lboot
2---------
3
4A tool to install/uninstall a dual bootloader into a s5l8702 based
5device:
6
7 - iPod Classic 6G
8 - iPod Nano 3G (TODO)
9
10
11Usage
12-----
13
14 mks5lboot --bl-inst <bootloader.ipod> [-p <pid>] [--single]
15 --bl-uninst <platform> [-p <pid>]
16 --dfuscan [--loop [<sec>]] [-p <pid>]
17 --dfusend <infile.dfu> [-p <pid>]
18 --dfureset [--loop [<sec>]] [-p <pid>]
19 --mkdfu-inst <bootloader.ipod> <outfile.dfu> [--single]
20 --mkdfu-uninst <platform> <outfile.dfu>
21 --mkdfu-raw <filename.bin> <outfile.dfu>
22
23Commands:
24 --bl-inst Install file <bootloader.ipod> into an iPod device
25 (same as --mkdfu-inst and --dfusend).
26 --bl-uninst Remove a bootloader from an iPod device (same as
27 --mkdfu-uninst and --dfusend).
28
29 --dfuscan scan for DFU USB devices and outputs the status.
30 --dfusend send DFU image <infile.dfu> to the device.
31 --dfureset reset DFU USB device bus.
32
33 --mkdfu-inst Build a DFU image containing an installer for
34 <bootloader.ipod>, save it as <outfile.dfu>.
35 --mkdfu-uninst Build a DFU image containing an uninstaler for
36 <platform> devices, save it as <outfile.dfu>.
37 --mkdfu-raw Build a DFU image containing raw executable
38 code, save it as <outfile.dfu>. <infile.bin>
39 is the code you want to run, it is loaded at
40 address 0x2200030c and executed.
41
42 <bootloader.ipod> is the rockbox bootloader that you want to
43 install (previously scrambled with tools/scramble utility).
44
45 <platform> is the name of the platform (type of device) for
46 which the DFU uninstaller will be built. Currently supported
47 platform names are:
48 ipod6g: iPod Classic 6G
49
50Options:
51 -p, --pid <pid> Use a specific <pid> (Product Id) USB device,
52 if this option is ommited then it uses the
53 first USB DFU device found.
54 -l, --loop <sec> Run the command every <sec> seconds, default
55 period (<sec> ommited) is 1 seconds.
56 -S, --single Be careful using this option. The bootloader
57 is installed for single boot, the original
58 Apple NOR boot is destroyed (if it exists),
59 and only Rockbox can be used.
60
61
62Dual bootloader installation
63----------------------------
64
65Prerequisites:
66
67 - An iPod Classic 6th with Apple firmware installed and running, current
68 supported FW versions for existing models:
69
70 Classic 6th 80/160 Late 2007 (1G): 1.1.2
71 Classic 6th 120 Late 2008 (2G): 2.0.1
72 Classic 6th 160 Late 2009 (3G): 2.0.4
73 Classic 6th 160 Late 2012 (4G): 2.0.5
74
75 - If your iPod is formated using Apple partitions you must convert this
76 ipod to FAT32 format (aka a "winpod"), see http://www.rockbox.org/
77 wiki/IpodConversionToFAT32
78
79 - It is recommended to install the RB firmware before installing the dual
80 bootloader for the first time. Install Rockbox using RockboxUtility or
81 download the latest daily build and uncompress it into the root folder
82 of the iPod.
83
84 Windows only:
85
86 - If iTunes is installed:
87 . Configure iTunes: Summary -> Options -> check "Enable disk use".
88
89 - If iTunes is not installed:
90 . You need a DFU USB driver for your device. To check if there is a
91 valid USB driver installed, put your device on DFU mode and choose
92 one of either:
93 a) Use Windows Device Manager to verify if you USB DFU device is
94 present.
95 b) Use mks5lboot tool running "mks5lboot --dfuscan", common output:
96 . When the DFU device is found and a valid driver is installed:
97 [INFO] DFU device state: 2
98 . When the device is found but there is no driver installed:
99 [ERR] Could not open USB device: LIBUSB_ERROR_NOT_SUPPORTED
100 . Then the device is found but driver is not valid (probably a
101 libusb-win32 driver is installed):
102 [ERR] Could not set USB configuration: LIBUSB_ERROR_NOT_FOUND
103 . If there is no valid DFU driver installed, try one of these:
104 a) Use Zadig (http://zadig.akeo.ie/) to build and install a WinUSB
105 (libusb.info) or libusbK driver for your device. Note that
106 libusb-win32 (libusb0) drivers are not valid for mks5lboot.
107 b) Use Apple Mobile Device USB driver (included with iTunes).
108
109Command line install:
110
111 - If you are using iTunes on Windows, close iTunes and kill (or pause)
112 iTunesHelper.exe before entering DFU mode.
113
114 - Put you device on DFU mode by pressing and holding SELECT+MENU buttons
115 for about 12 seconds.
116
117 You can notice when the device enters DFU mode running the next command
118 to scan the USB bus every second (press Ctrl-C to abort the scan):
119 mks5lboot --dfuscan --loop
120
121 - To install or update a bootloader, build the DFU installer and send it
122 to the device:
123 mks5lboot --bl-inst /path/to/bootloader-ipod6g.ipod
124
125 When the DFU imagen is loaded and executed, the device emits an 'alive'
126 tone (2000Hz/100ms). When the bootloader is successfully installed then
127 a dual tone beep sounds (1000Hz/100ms+2000Hz/150ms) and the device
128 reboots. If something went bad then 330Hz/500ms tone is emited and the
129 device reboots. When three 330Hz tones sounds, it means that the NOR
130 got corrupted and the device must be restored using iTunes (should not
131 happen).
132
133 - To remove a previously installed bootloader, build the DFU uninstaler
134 and send it to the device:
135 mks5lboot --bl-uninst ipod6g
136
137 If USB access is denied, try to run the mks5lboot tool using a privileged
138 user (i.e. Administrator or root).
139
140
141Dual-Boot
142---------
143
144The purpose of this program is to provide dual-boot between the original
145firmware and the new (rockbox) firmware.
146
147The button press check is done ~800 ms. after power-up or reboot, then:
148
149 SELECT + MENU: resets the device after ~5 seconds, then if SELECT+MENU
150 remains pressed the device enters DFU mode after an
151 additional period of ~8 seconds.
152 SELECT + LEFT: enter OF diagnostics (after ~7 seconds).
153 SELECT + PLAY: enter OF diskmode (after ~7 seconds).
154 SELECT + RIGHT: enter bootloader USB mode.
155 MENU: enter OF
156 Hold Switch locked: enter OF (see below for details).
157 Any other combination: launch Rockbox.
158
159Switch current firmware:
160
161 Tries to behave like ipod Video, see http://download.rockbox.org/manual/
162 rockbox-ipodvideo/rockbox-buildch3.html#x5-290003.1.3
163
164 Apple is the current FW:
165 - Stop playback and wait a few seconds for hard disk spin-down.
166 - Press and hold SELECT+MENU, after ~5 seconds the player hard resets,
167 release the buttons when the screen goes black.
168
169 Rockbox is the current FW:
170 - Shut down the device using "Long Play" key press.
171 - Once the device is powered off, there are three ways to enter OF:
172 1) Press and hold MENU button for at least ~800 ms.
173 2) Turn on the Hold switch immediately after turning the player on,
174 it must be done before "Loading Rockbox..." message appears (~3
175 seconds from power-on). Be careful, if the hold switch is locked
176 when Rockbox starts then your RB settings will be cleared!
177 3) You can also load the original firmware by shutting down the
178 device, then clicking the Hold switch on and connecting the iPod
179 to your computer.
180
181
182Single-Boot
183-----------
184
185Use --single option if the Apple firmware is not installed on your iPod
186and/or you want to force the installation of the bootloader to use Rockbox
187as unique firmware. The single-boot installer writes the bootloader on the
188NOR with no previous check, the original Apple NOR boot is destroyed if it
189exists.
190
191To build the DFU single-boot installer and send it to the device:
192 mks5lboot --bl-inst --single /path/to/bootloader-ipod6g.ipod
193
194
195Compilation
196-----------
197
198Needs libusb > 1.0 installed, tested on:
199
200Linux: gcc-4.9.2 + libusb-1.0.19
201Windows XP: mingw32-gcc-4.8.1 + libusbx-1.0.15
202OS X 10.11: clang-7.3.0 + libusb-1.0.20
203
204
205Hacking
206-------
207
208See comments in mkdfu.c, ipoddfu.c, dualboot.c and bootloader/ipod6g.c for
209more information.