Fixed tools/env utilities
[u-boot-openmoko/mini2440.git] / api / README
blob6df225f584b5b7d815b8c6338b9b57fccbf471a5
1 U-Boot machine/arch independent API for external apps
2 =====================================================
4 1.  Main assumptions
6   - there is a single entry point (syscall) to the API
8   - per current design the syscall is a C-callable function in the U-Boot
9     text, which might evolve into a real syscall using machine exception trap
10     once this initial version proves functional
12   - the consumer app is responsible for producing appropriate context (call
13     number and arguments)
15   - upon entry, the syscall dispatches the call to other (existing) U-Boot
16     functional areas like networking or storage operations
18   - consumer application will recognize the API is available by searching
19     a specified (assumed by convention) range of address space for the
20     signature
22   - the U-Boot integral part of the API is meant to be thin and non-intrusive,
23     leaving as much processing as possible on the consumer application side,
24     for example it doesn't keep states, but relies on hints from the app and
25     so on
27   - optional (CONFIG_API)
30 2. Calls
32   - console related (getc, putc, tstc etc.)
33   - system (reset, platform info)
34   - time (delay, current)
35   - env vars (enumerate all, get, set)
36   - devices (enumerate all, open, close, read, write); currently two classes
37     of devices are recognized and supported: network and storage (ide, scsi,
38     usb etc.)
41 3. Structure overview
43   - core API, integral part of U-Boot, mandatory
44     - implements the single entry point (mimics UNIX syscall)
46   - glue
47     - entry point at the consumer side, allows to make syscall, mandatory
48       part
50     - helper conveniency wrappers so that consumer app does not have to use
51       the syscall directly, but in a more friendly manner (a la libc calls),
52       optional part
54   - consumer application
55     - calls directly, or leverages the provided glue mid-layer