Sunday, January 9, 2011

A.R. Drone's boot sequence

In order to be able to flash a custom kernel to A.R. Drone, it is necessary to understand it's boot sequence:
  1. After reset, the program counter starts at the beginning P6 internal ROM. In this internal ROM, some kind of pre-bootloader exists that evaluates external pins and selects the corresponding boot mode (e.g. boot over USB, NAND, IIC, UART, ... ). Depending on the selected mode, the peripherals are set-up and it is tried to boot over this peripheral.
    • Boot over NAND: The pre-bootloader starts the memory controller, copies the bootloader from NAND to internal RAM and sets the program counter to the address in internal RAM which basically starts the bootloader.
    • Boot over USB: The pre-bootloader listens to USB and waits for the "Hello P6" command. If received, it replies and awaits an image (the usb_bootloader.bin). The received data is copied to internal RAM and the program counter is changed to the internal RAM address wich in effect starts the bootloader.

  2. Depending on the started bootloader, either the UBI partitions are "mounted" and the kernel image is read or the bootloader waits until the kernel image is sent over USB.
  3. If the installer.plf (which is basically a kernel image) is booted over USB, the "init" command of this image awaits the actual firmware (ardrone_update.plf) over USB and installs the content to NAND.


  1. Hi.
    I have a malfunctioning drone and I am testing your tools. They are great, but I want to add one step to your Boot over USB sequence:
    After the "Hello P6" command, the drone changes something on the USB interface, and a 'new' device is detected: "Gadget Serial V2.4" and will ask for drivers again. This means that on a new computer the 1st update attempt will fail because the usb_flash utility will time out before you can install the drivers.
    Also, I made my cable with a low quality USB cable, and after "Hello P6" the system complains about a non-recognized USB device (VID_0000 PID_0000). Then I got a good quality USB 2.0 cable and I was able to correctly install the 2nd device, so I suspect the 2nd device negotiates for USB 2.0. If someone have this same problem it may be worth to try and make a better cable!
    Once again...great tools, keep the good work!
    Still I couldn't solve my drone problem :(

  2. Hi,
    Thanks for your useful post.

    My drone has been damaged and does not enter to busybox and shows 'kernel panic' error message.
    Now I want to boot it from USB, but when I connect a USB power the drone on, it doesn't recognize the USB.
    How can I force the drone to boot from USB? What files should be copied to USB for booting?

    Thanks a lot

  3. Hi,

    I know this is an old post but I'm grasping at straws now! I too am getting a kernel panic after I added to /lib. Have you any ideas how I could fix this?

    Many thanks,