Skip to content

Platform Build & Release

Kernel, device tree and display bring-up

Below Android entirely — how the kernel learns what hardware exists, why a new board shows a black screen, and the layer where automotive projects lose the most schedule.

Advanced6 minKernel · Device tree · Bring-up

Everything else in this curriculum assumes Android is running. This topic is about the stage before that — where a board is new, nothing works, and the question is why.

The kernel does not know what hardware exists#

On a PC, hardware announces itself — PCI devices are discoverable. On an embedded board, most hardware cannot. A display controller wired to particular pins has no way to say so.

So the board is described rather than discovered, in a .

A device tree fragment, conceptually
&i2c1 {
    status = "okay";
    clock-frequency = <400000>;
 
    touchscreen@4a {
        compatible = "vendor,touch-controller";
        reg = <0x4a>;
        interrupt-parent = <&gpio2>;
        interrupts = <11 IRQ_TYPE_EDGE_FALLING>;
        reset-gpios = <&gpio2 12 GPIO_ACTIVE_LOW>;
    };
};

Why a new board shows a black screen#

This is the classic bring-up failure, and it has a short list of causes.

Working down the list
# 1. Did the display driver load at all?
adb shell dmesg | grep -iE 'drm|panel|display|dsi'
 
# 2. Does the kernel think a display exists?
adb shell ls /sys/class/drm/
adb shell cat /sys/class/drm/*/status      # connected / disconnected
 
# 3. Does Android see it?
adb shell dumpsys display | grep -E 'mDisplayId|uniqueId|real'
 
# 4. Is anything being composed onto it?
adb shell dumpsys SurfaceFlinger | grep -A10 'Display '

CAN interfaces#

Same pattern, different subsystem. The vehicle network controller has to be described and its driver loaded before anything above can see it.

Is there a CAN interface at all?
adb shell ip link show                  # look for can0
adb shell ip -details link show can0    # bitrate, state
adb shell dmesg | grep -i can
 
# Bring it up and watch traffic
adb shell ip link set can0 up type can bitrate 500000
adb shell candump can0

The Android kernel is not the mainline kernel#

What to check on a new board#

A rough order that finds most problems:

Bring-up smoke test
adb shell dmesg | grep -iE 'error|fail|timeout' | head -40
 
adb shell ls /sys/class/drm/            # displays
adb shell ip link show                  # network and CAN interfaces
adb shell ls /dev/ | grep -iE 'can|video|i2c|spi'
adb shell cat /proc/interrupts | head -30
adb shell dumpsys display
adb shell lshal                         # which HALs came up

Where schedule actually goes#

Next#

Testing and debugging, once the board is stable enough to run on.

References & further reading

Code links target the main branch on cs.android.com. AOSP moves — if a path 404s, search the symbol instead.