|
| 1 | ++++ |
| 2 | +title = "DeployKit: Device-specific Quirks" |
| 3 | +description = "" |
| 4 | ++++ |
| 5 | + |
| 6 | +# Format Description |
| 7 | + |
| 8 | +A quirk configuration is written in TOML, in the following format: |
| 9 | + |
| 10 | +```toml |
| 11 | +[model] |
| 12 | +# Two modes of operation: |
| 13 | +# |
| 14 | +# - dmi:Match by DMI (modalias, or model alias), useful for model matching. |
| 15 | +# - path:Match by path, usually ones found in sysfs. |
| 16 | +type = [dmi|path] |
| 17 | + |
| 18 | +# path_pattern/dmi_pattern may not be specified at the same time. |
| 19 | + |
| 20 | +# Match by path - does a path exist (usually in sysfs)? Wildcards are allowed. |
| 21 | +# |
| 22 | +# For example, to match an LEFI-based platform. |
| 23 | +# |
| 24 | +# The following must be specified if type = path. |
| 25 | +path_pattern = "/sys/firmware/lefi" |
| 26 | + |
| 27 | +# Match by DMI - taken from /sys/class/dmi/id/modalias, wildcards are allowed. |
| 28 | +# |
| 29 | +# For instance, the modalias for Loongson XA61200: |
| 30 | +# |
| 31 | +# dmi:bvnLoongson:bvrLoongson-UDK2018-V4.0.05756-prestable202405:bd05/23/24145323:svnLoongson:pnLoongson-3A6000-HV-7A2000-1w-V0.1-EVB:pvrToBeFilledByO.E.M:rvnToBeFilledByO.E.M:rnLoongson-3A6000-HV-7A2000-1w-EVB-V1.21:rvrToBeFilledByO.E.M:cvnLoongson:ct3:cvrToBeFilledByO.E.M:skuToBeFilledByO.E.M: |
| 32 | +# |
| 33 | +# The following will match the motherboard/series: |
| 34 | +# |
| 35 | +# dmi:*svnLoongson:*pnLoongson-3A6000-HV-7A2000-1w-V0.1-EVB:* |
| 36 | +# |
| 37 | +# And the following will match a specific motherboard revision: |
| 38 | +# |
| 39 | +# dmi:*svnLoongson:*rnLoongson-3A6000-HV-7A2000-1w-EVB-V1.21:* |
| 40 | +# |
| 41 | +# The following must be specified if type = dmi |
| 42 | +dmi_pattern = "dmi:*svnLoongson:*rnLoongson-3A6000-HV-7A2000-1w-EVB-V1.21:*" |
| 43 | + |
| 44 | +[quirk] |
| 45 | +# A command to execute for the quirk. The command to launch must have its |
| 46 | +# executable bit set (and the correct shebang specified, if it is a script). |
| 47 | +command = "/usr/share/deploykit-backend/quirks/loongson-xa61200/quirk.bash" |
| 48 | + |
| 49 | +# Skip one or multiple stages, useful for platforms that may not be capable |
| 50 | +# of runnning certain installation procedures. |
| 51 | +# |
| 52 | +# Refer to deploykit-backend, specifically the `enum InstallationStage' in |
| 53 | +# install/src/lib.rs for a list of installation stages. |
| 54 | +# |
| 55 | +# Optional. The following example skips GRUB installation and SSH keygen. |
| 56 | +skip_stages = ["InstallGrub", "GenerateSshKey"] |
| 57 | + |
| 58 | +``` |
| 59 | + |
| 60 | +# File Placement |
| 61 | + |
| 62 | +Quirks should be placed under `/usr/share/deploykit-backend/quirks` and organised by a single-level subdirectory: |
| 63 | + |
| 64 | +``` |
| 65 | +- /usr/share/deploykit-backend/quirks |
| 66 | + - ./loongson-xa61200 # Model |
| 67 | + - ./quirk.toml # Quirk Configuration |
| 68 | +``` |
0 commit comments