xref: /openbmc/qemu/rust/hw/char/pl011/README.md (revision 37fdb2f5)
1*37fdb2f5SManos Pitsidianakis# PL011 QEMU Device Model
2*37fdb2f5SManos Pitsidianakis
3*37fdb2f5SManos PitsidianakisThis library implements a device model for the PrimeCell® UART (PL011)
4*37fdb2f5SManos Pitsidianakisdevice in QEMU.
5*37fdb2f5SManos Pitsidianakis
6*37fdb2f5SManos Pitsidianakis## Build static lib
7*37fdb2f5SManos Pitsidianakis
8*37fdb2f5SManos PitsidianakisHost build target must be explicitly specified:
9*37fdb2f5SManos Pitsidianakis
10*37fdb2f5SManos Pitsidianakis```sh
11*37fdb2f5SManos Pitsidianakiscargo build --target x86_64-unknown-linux-gnu
12*37fdb2f5SManos Pitsidianakis```
13*37fdb2f5SManos Pitsidianakis
14*37fdb2f5SManos PitsidianakisReplace host target triplet if necessary.
15*37fdb2f5SManos Pitsidianakis
16*37fdb2f5SManos Pitsidianakis## Generate Rust documentation
17*37fdb2f5SManos Pitsidianakis
18*37fdb2f5SManos PitsidianakisTo generate docs for this crate, including private items:
19*37fdb2f5SManos Pitsidianakis
20*37fdb2f5SManos Pitsidianakis```sh
21*37fdb2f5SManos Pitsidianakiscargo doc --no-deps --document-private-items --target x86_64-unknown-linux-gnu
22*37fdb2f5SManos Pitsidianakis```
23*37fdb2f5SManos Pitsidianakis
24*37fdb2f5SManos PitsidianakisTo include direct dependencies like `bilge` (bitmaps for register types):
25*37fdb2f5SManos Pitsidianakis
26*37fdb2f5SManos Pitsidianakis```sh
27*37fdb2f5SManos Pitsidianakiscargo tree --depth 1 -e normal --prefix none \
28*37fdb2f5SManos Pitsidianakis | cut -d' ' -f1 \
29*37fdb2f5SManos Pitsidianakis | xargs printf -- '-p %s\n' \
30*37fdb2f5SManos Pitsidianakis | xargs cargo doc --no-deps --document-private-items --target x86_64-unknown-linux-gnu
31*37fdb2f5SManos Pitsidianakis```
32