]> git.kernelconcepts.de Git - karo-tx-uboot.git/blob - doc/README.android-fastboot
Merge branch 'master' of git://git.denx.de/u-boot-mpc85xx
[karo-tx-uboot.git] / doc / README.android-fastboot
1 Android Fastboot
2 ~~~~~~~~~~~~~~~~
3
4 Overview
5 ========
6 The protocol that is used over USB is described in
7 README.android-fastboot-protocol in same directory.
8
9 The current implementation does not yet support the erase command or the
10 "oem format" command, and there is minimal support for the flash command;
11 it only supports eMMC devices.
12
13 Client installation
14 ===================
15 The counterpart to this gadget is the fastboot client which can
16 be found in Android's platform/system/core repository in the fastboot
17 folder. It runs on Windows, Linux and even OSX. Linux user are lucky since
18 they only need libusb.
19 Windows users need to bring some time until they have Android SDK (currently
20 http://dl.google.com/android/installer_r12-windows.exe) installed. You
21 need to install ADB package which contains the required glue libraries for
22 accessing USB. Also you need "Google USB driver package" and "SDK platform
23 tools". Once installed the usb driver is placed in your SDK folder under
24 extras\google\usb_driver. The android_winusb.inf needs a line like
25
26    %SingleBootLoaderInterface% = USB_Install, USB\VID_0451&PID_D022
27
28 either in the [Google.NTx86] section for 32bit Windows or [Google.NTamd64]
29 for 64bit Windows. VID and PID should match whatever the fastboot is
30 advertising.
31
32 Board specific
33 ==============
34 The fastboot gadget relies on the USB download gadget, so the following
35 options must be configured:
36
37 CONFIG_USBDOWNLOAD_GADGET
38 CONFIG_G_DNL_VENDOR_NUM
39 CONFIG_G_DNL_PRODUCT_NUM
40 CONFIG_G_DNL_MANUFACTURER
41
42 NOTE: The CONFIG_G_DNL_VENDOR_NUM must be one of the numbers supported by
43 the fastboot client. The list of vendor IDs supported can be found in the
44 fastboot client source code (fastboot.c) mentioned above.
45
46 The fastboot function is enabled by defining CONFIG_CMD_FASTBOOT and
47 CONFIG_ANDROID_BOOT_IMAGE.
48
49 The fastboot protocol requires a large memory buffer for downloads. This
50 buffer should be as large as possible for a platform. The location of the
51 buffer and size are set with CONFIG_USB_FASTBOOT_BUF_ADDR and
52 CONFIG_USB_FASTBOOT_BUF_SIZE.
53
54 In Action
55 =========
56 Enter into fastboot by executing the fastboot command in u-boot and you
57 should see:
58 |GADGET DRIVER: usb_dnl_fastboot
59
60 On the client side you can fetch the bootloader version for instance:
61 |>fastboot getvar bootloader-version
62 |bootloader-version: U-Boot 2014.04-00005-gd24cabc
63 |finished. total time: 0.000s
64
65 or initiate a reboot:
66 |>fastboot reboot
67
68 and once the client comes back, the board should reset.
69
70 You can also specify a kernel image to boot. You have to either specify
71 the an image in Android format _or_ pass a binary kernel and let the
72 fastboot client wrap the Android suite around it. On OMAP for instance you
73 take zImage kernel and pass it to the fastboot client:
74
75 |>fastboot -b 0x80000000 -c "console=ttyO2 earlyprintk root=/dev/ram0
76 |       mem=128M" boot zImage
77 |creating boot image...
78 |creating boot image - 1847296 bytes
79 |downloading 'boot.img'...
80 |OKAY [  2.766s]
81 |booting...
82 |OKAY [ -0.000s]
83 |finished. total time: 2.766s
84
85 and on the gadget side you should see:
86 |Starting download of 1847296 bytes
87 |........................................................
88 |downloading of 1847296 bytes finished
89 |Booting kernel..
90 |## Booting Android Image at 0x81000000 ...
91 |Kernel load addr 0x80008000 size 1801 KiB
92 |Kernel command line: console=ttyO2 earlyprintk root=/dev/ram0 mem=128M
93 |   Loading Kernel Image ... OK
94 |OK
95 |
96 |Starting kernel ...