# Codelab: QEMU edu driver

Drivers provide software interfaces for communicating with hardware (or virtual)
devices that are embedded in or connected to a system. In Fuchsia, drivers are
user-space [components](https://fuchsia.dev/docs/concepts/components/v2/introduction) running within the system's
[component topology](https://fuchsia.dev/docs/concepts/components/v2/topology), and the
[driver framework](https://fuchsia.dev/docs/concepts/drivers/driver_framework) builds on the concepts and tools
provided by the component framework. Drivers interact with each other and
non-driver components using [capabilities](https://fuchsia.dev/docs/concepts/components/v2/capabilities/README) and connections
established over FIDL.

In this codelab, you'll build a Fuchsia driver component that targets a virtual
device built into [QEMU](https://www.qemu.org/) (which underpins the
[Fuchsia emulator](https://fuchsia.dev/docs/development/tools/ffx/workflows/start-the-fuchsia-emulator)) named `edu`, which is an educational
device for writing drivers that computes the factorial of a given integer.
You'll also explore how to interact with drivers using the tools provided with
the Fuchsia SDK.

> [!NOTE]
> **Note:** For more details on the driver framework, see [Drivers](https://fuchsia.dev/docs/concepts/drivers/README) in the Concepts section.

## What you'll learn

- Discovering and binding to device nodes
- Registering and loading a new device driver
- Interacting with a running device driver

## Prerequisites

- An x64-based machine running Linux
- A configured Fuchsia SDK environment using the [SDK driver samples repository checkout](https://fuchsia.googlesource.com/sdk-samples/drivers)
- [Emulator product bundle](https://fuchsia.dev/docs/development/tools/ffx/workflows/start-the-fuchsia-emulator) for `core.x64`

## Before you begin

As part of the prerequisites, you created a **Bazel workspace** in the
`fuchsia-drivers/` directory. This is the directory that contains a
`WORKSPACE.bazel` file and it represents the root of the workspace. Throughout
the codelab, this root directory is referred to using the `//` prefix. For
example, the path `//fuchsia-codelab` represents a directory named
`fuchsia-codelab` at the root of the Bazel workspace.

> [!NOTE]
> **Note:** For more details on the Bazel build system and its terminology, see [Bazel core concepts](https://bazel.build/concepts/build-ref).

The Bazel workspace is also pre-configured with development tools provided by
the Fuchsia SDK in the `tools/` directory. This codelab assumes you are using
the SDK tools from within your Bazel workspace, so consider updating your `PATH`
to include the SDK's `tools/` directory or create a temporary alias using the
following commands:

    alias ffx=tools/ffx

    alias bazel=tools/bazel

[](https://issues.fuchsia.dev/issues/new?component=1439230&template=1881640&description=Issue+on:+https://fuchsia.dev/docs/development/drivers/tutorials/sdk_build_driver/introduction.md "Report a bug or suggest improvements on this page") [](https://cs.opensource.google/fuchsia/fuchsia/+/main:docs/development/drivers/tutorials/sdk_build_driver/introduction.md "View the source code of this page") [](https://ci.android.com/edit?repo=fuchsia/fuchsia/main&file=docs/development/drivers/tutorials/sdk_build_driver/introduction.md&cloneRepo=fuchsia/fuchsia:refs/heads/main&fullPath=fuchsia/docs/development/drivers/tutorials/sdk_build_driver/introduction.md "Edit the source code of this page")