New Device howto

This page contains a clear guide for bringing up a previously unsupported and unknown device, and for getting support into the sunxi repositories.

=Step 1: Find out all you can=

Before you rush into things, it really pays to find out all you can about your device. Bringing up a new board is not rocket science, but it is non-trivial and time consuming, so it pays to spend a few hours on google and on our wiki to find out what is publicly known about your device.

When googling, you will find that android forum posts are a treasure trove of badly dispersed information. This ranges from basic android usage information all the way to device disassembly and pictures of the mainboard. If you are really lucky, someone will have posted information on how to expose the UART (serial). Part of your task is making this horribly inaccessible information easily and neatly available, at least for those bits that are relevant for the sunxi project.

As for the sunxi website, it is a really good idea to investigate similar specced devices with the same SoC. It often happens that devices get rebranded. If you are really lucky, you might find that your hardware is already supported. If not, you will be able to find out what other names your device was branded under, and you can include that information on the wiki page which you will create in step 2. You might also find similar devices with similar mainboards, but with just different bits bolted on, in which case you still might find some valuable information (like how to wire up the UART).

It also pays to check out the boards file from our u-boot repository, and see if your device is already listed there. Similarly, have a look through our Boards repository to see whether your device fex is listed there.

=Step 2: Create a wiki page=

If you have determined that your device is unique, then go ahead and create a new page. If your device is similar to an already documented device, then still create a new page and crosslink the two under a "similar devices" section. If it is a plain rebadger, then just add to an existing wiki page.

The process of and details for creating a new device page is described in our new device page howto.

=Step 3: Retrieve crucial information from the stock OS=

Please use our retrieving device information howto to retrieve the bootinfo and .fex files. You will need them later on in Step 5 and Step 6.

=Step 4: Get a serial console (optional)=

Like any ARMv7 system, you are pretty much lost when anything goes wrong, unless you have access to a serial console (UART). If you intend to bring up a new device, it will really pay off to spend the time and effort to try to gain access to the serial console.

You will need a 3.3V TTL UART to USB converter usually, or a level changer to standard RS232 to be able to successfully talk to the serial port on sunxi hardware.

Some devices directly expose their UART, so all you really need to do is hook things up. Mobile devices never export a UART directly, or do not provide easy access to the UART. Here you will need to disassemble your device, locate the UART pins (if there are any) on the motherboard, solder on some wires and route them to the outside. This is of course a severely non-trivial task.

For more detailed information, refer to our (currently useless) UART howto

=Step 5: Add support to u-boot= =Step 6: Add support to sunxi-boards= =Step 7: Get your changes upstream=