Skip to content

Commit 56d817b

Browse files
committed
docs: add code style requirement and update CI badges
Signed-off-by: ZHANG Yuntian <[email protected]>
1 parent 1cecc0a commit 56d817b

File tree

1 file changed

+31
-1
lines changed

1 file changed

+31
-1
lines changed

README.md

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# overlays
2-
[![Build](https://github.com/radxa/overlays/actions/workflows/build.yml/badge.svg)](https://github.com/radxa/overlays/actions/workflows/build.yml)
2+
[![build](https://github.com/radxa-pkg/radxa-overlays/actions/workflows/build.yml/badge.svg)](https://github.com/radxa-pkg/radxa-overlays/actions/workflows/build.yml) [![Build & Release](https://github.com/radxa-pkg/radxa-overlays/actions/workflows/release.yml/badge.svg)](https://github.com/radxa-pkg/radxa-overlays/actions/workflows/release.yml)
33

44
Additional device tree overlays to support different hardware on Radxa products
55

@@ -33,6 +33,36 @@ As part of our CI pipeline, the built overlays are uploaded at the end. You can
3333

3434
Please be aware that artifacts expire over time, and they are not officially tested versions.
3535

36+
## Code style
37+
38+
We mandate reference style for our overlays. Please visit [DTO Syntax](https://source.android.com/docs/core/architecture/dto/syntax#reference) page to learn more.
39+
40+
If your existing overlay uses `target-path`, then the Android documentation does not show a clear migration path. Below is an example of how to convert them:
41+
42+
```dtos
43+
/{
44+
fragment@0 {
45+
target-path = "/";
46+
__overlay__ {
47+
some_node: some-node {
48+
some_prop = "okay";
49+
...
50+
};
51+
};
52+
};
53+
}
54+
```
55+
56+
```dtos
57+
&{/} {
58+
some_node: some-node {
59+
some_prop = "okay";
60+
...
61+
};
62+
}
63+
```
64+
65+
3666
## Metadata specs
3767

3868
Currently, we mandate a custom `metadata` node in overlays. This data is parsed by [`rsetup`](https://github.com/radxa-pkg/rsetup) to provide a human readable description and conflict detection. Below is a sample `metadata` node with detailed guidelines after:

0 commit comments

Comments
 (0)