support links from device pages to their installation methods

This commit is contained in:
Daniel Barlow 2023-11-09 23:02:35 +00:00
parent a9760d239c
commit 5e046490de
4 changed files with 17 additions and 6 deletions

2
ci.nix
View file

@ -59,7 +59,7 @@ let
installPhase = '' installPhase = ''
mkdir -p $out/nix-support $out/share/doc/ mkdir -p $out/nix-support $out/share/doc/
cd doc cd doc
cp modules-generated.rst $out cp *-generated.rst $out
ln -s ${json} $out/options.json ln -s ${json} $out/options.json
cp -a _build/html $out/share/doc/liminix cp -a _build/html $out/share/doc/liminix
echo "file source-dist \"$out/share/doc/liminix\"" \ echo "file source-dist \"$out/share/doc/liminix\"" \

View file

@ -6,7 +6,7 @@
# Mainline linux 5.19 doesn't have device-tree support for this device # Mainline linux 5.19 doesn't have device-tree support for this device
# or even for the SoC, so we use the extensive OpenWrt kernel patches # or even for the SoC, so we use the extensive OpenWrt kernel patches
{ rec {
system = { system = {
crossSystem = { crossSystem = {
config = "mips-unknown-linux-musl"; config = "mips-unknown-linux-musl";
@ -51,6 +51,7 @@
OpenWrt web page: https://openwrt.org/toh/gl.inet/gl-ar750 OpenWrt web page: https://openwrt.org/toh/gl.inet/gl-ar750
''; '';
installer = "flashimage";
module = {pkgs, config, ... }: module = {pkgs, config, ... }:
let let
@ -102,7 +103,7 @@
FEATURE_DD_IBS_OBS = "y"; # ath10k_cal_data needs skip_bytes,fullblock FEATURE_DD_IBS_OBS = "y"; # ath10k_cal_data needs skip_bytes,fullblock
}; };
hardware = { hardware = {
defaultOutput = "flashimage"; defaultOutput = installer;
loadAddress = "0x80060000"; loadAddress = "0x80060000";
entryPoint = "0x80060000"; entryPoint = "0x80060000";
flash = { flash = {

View file

@ -5,8 +5,18 @@ let
builtins.readDir ../devices; builtins.readDir ../devices;
texts = lib.mapAttrsToList (n: t: texts = lib.mapAttrsToList (n: t:
let d = import ../devices/${n}/default.nix; let d = import ../devices/${n}/default.nix;
d' = { description = "no description for ${n}"; } // d; d' = {
in d'.description ) description = "no description for ${n}";
} // d;
installer =
if d ? installer
then ''
The default installation route for this device is
:ref:`system-outputs-${d.installer}`
''
else "";
in (d'.description + installer))
devices; devices;
in in
writeText "hwdoc" '' writeText "hwdoc" ''

View file

@ -7,5 +7,5 @@
(each [_ option (ipairs (yaml.load (io.read "*a")))] (each [_ option (ipairs (yaml.load (io.read "*a")))]
(when (. outputs option.name) (when (. outputs option.name)
(print (.. ".. _" option.name) "\n") (print (.. ".. _" (string.gsub option.name "%." "-") ":") "\n")
(print option.description))) (print option.description)))