diagrams and simulation

This commit is contained in:
deeaitch committed 2026-10-11 07:21:11 -04:00
1 parent bf9871eb9e
commit d65910a7c5
18 files changed
+926 -4

No files matched your search

+79
View File
@@ -0,0 +1,79 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" contentScriptType="application/ecmascript" contentStyleType="text/css" height="1029px" preserveAspectRatio="none" style="width:766px;height:1029px;" version="1.1" viewBox="0 0 766 1029" width="766px" zoomAndPan="magnify"><defs/><g><text fill="#000000" font-family="sans-serif" font-size="18" lengthAdjust="spacingAndGlyphs" textLength="451" x="169" y="19.2419">A/B storage: logical areas and access responsibilities</text><!--MD5=[840fabc209cb087dc2fa62a6d2b2ef1b]
cluster Device storage (logical areas, not a partition table)--><rect fill="#FFFFFF" height="831" style="stroke: #000000; stroke-width: 1.5;" width="372" x="383" y="48.5158"/><text fill="#000000" font-family="sans-serif" font-size="14" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="350" x="394" y="65.4818">Device storage (logical areas, not a partition table)</text><!--MD5=[dce4c2b5694dd28223e7b1d160ba96c4]
cluster data--><path d="M425,552.5158 C425,542.5158 569,542.5158 569,542.5158 C569,542.5158 713,542.5158 713,552.5158 L713,845.5158 C713,855.5158 569,855.5158 569,855.5158 C569,855.5158 425,855.5158 425,845.5158 L425,552.5158 " fill="#FFFFFF" style="stroke: #000000; stroke-width: 1.5;"/><path d="M425,552.5158 C425,562.5158 569,562.5158 569,562.5158 C569,562.5158 713,562.5158 713,552.5158 " fill="none" style="stroke: #000000; stroke-width: 1.5;"/><text fill="#000000" font-family="sans-serif" font-size="14" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="153" x="492.5" y="579.4818">Persistent device data</text><!--MD5=[8b2faa79b5ce75f56ca47380ca6b1f00]
entity shared--><rect fill="#F8F8F8" height="58.1358" style="stroke: #000000; stroke-width: 1.5;" width="279" x="429.5" y="365.5158"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="169" x="439.5" y="390.4818">Shared boot components</text><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="259" x="439.5" y="409.5497">Separate update and recovery method</text><!--MD5=[f350ee6f6cc17b9109e91461bf56a5ea]
entity state--><path d="M399,469.0158 C399,459.0158 569,459.0158 569,459.0158 C569,459.0158 739,459.0158 739,469.0158 L739,516.1517 C739,526.1517 569,526.1517 569,526.1517 C569,526.1517 399,526.1517 399,516.1517 L399,469.0158 " fill="#F8F8F8" style="stroke: #000000; stroke-width: 1.5;"/><path d="M399,469.0158 C399,479.0158 569,479.0158 569,479.0158 C569,479.0158 739,479.0158 739,469.0158 " fill="none" style="stroke: #000000; stroke-width: 1.5;"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="67" x="409" y="497.9818">Boot state</text><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="320" x="409" y="517.0497">Normal slot, trial target, attempts, confirmation</text><!--MD5=[770389ab9df153645bc6ef28055eb2b5]
entity A--><rect fill="#F8F8F8" height="58.1358" style="stroke: #000000; stroke-width: 1.5;" width="269" x="434.5" y="272.5158"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="154" x="444.5" y="297.4818">Slot A: retained system</text><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="249" x="444.5" y="316.5497">Kernel + device tree + root filesystem</text><!--MD5=[b2d39259b6aeabc16b394deeb0238426]
entity B--><rect fill="#F8F8F8" height="58.1358" style="stroke: #000000; stroke-width: 1.5;" width="269" x="434.5" y="179.5158"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="139" x="444.5" y="204.4818">Slot B: update target</text><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="249" x="444.5" y="223.5497">Kernel + device tree + root filesystem</text><!--MD5=[64a9df9efdb85e10fd4da2b3e755ab03]
entity work--><rect fill="#F8F8F8" height="58.1358" style="stroke: #000000; stroke-width: 1.5;" width="210" x="464" y="86.5158"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="167" x="474" y="111.4818">Download and work area</text><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="190" x="474" y="130.5497">Disposable preparation files</text><!--MD5=[e7744e8fbc1b270a63d01eb8a46af6a2]
entity identity--><rect fill="#F8F8F8" height="58.1358" style="stroke: #000000; stroke-width: 1.5;" width="178" x="480" y="688.5158"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="158" x="490" y="713.4818">Identity and calibration</text><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="116" x="490" y="732.5497">Restricted access</text><!--MD5=[7518041a300050aac907e20a36cd28cf]
entity appdata--><rect fill="#F8F8F8" height="58.1358" style="stroke: #000000; stroke-width: 1.5;" width="256" x="441" y="781.5158"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="236" x="451" y="806.4818">Configuration and application data</text><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="231" x="451" y="825.5497">Must support the retained version</text><!--MD5=[63a986ea2eddc5539a0918540cb05aed]
entity progress--><rect fill="#F8F8F8" height="58.1358" style="stroke: #000000; stroke-width: 1.5;" width="210" x="464" y="595.5158"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="190" x="474" y="620.4818">OTA progress, failure blocks</text><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="140" x="474" y="639.5497">and pending reports</text><!--MD5=[cfa4e52b1a5e747220fbc0f640efedd4]
entity installer--><ellipse cx="80.5" cy="131.5158" fill="#F8F8F8" rx="8" ry="8" style="stroke: #383838; stroke-width: 1.5;"/><path d="M80.5,139.5158 L80.5,166.5158 M67.5,147.5158 L93.5,147.5158 M80.5,166.5158 L67.5,181.5158 M80.5,166.5158 L93.5,181.5158 " fill="none" style="stroke: #383838; stroke-width: 1.5;"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="56" x="52.5" y="198.9818">Installer</text><!--MD5=[cb76ffbfbf2ad469590be32074c51c9a]
entity boot--><ellipse cx="80.5" cy="326.5158" fill="#F8F8F8" rx="8" ry="8" style="stroke: #383838; stroke-width: 1.5;"/><path d="M80.5,334.5158 L80.5,361.5158 M67.5,342.5158 L93.5,342.5158 M80.5,361.5158 L67.5,376.5158 M80.5,361.5158 L93.5,376.5158 " fill="none" style="stroke: #383838; stroke-width: 1.5;"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="81" x="40" y="393.9818">Boot control</text><!--MD5=[2b2d5ad518bf6746de4ffeb5be0566d4]
entity manager--><ellipse cx="80.5" cy="563.0158" fill="#F8F8F8" rx="8" ry="8" style="stroke: #383838; stroke-width: 1.5;"/><path d="M80.5,571.0158 L80.5,598.0158 M67.5,579.0158 L93.5,579.0158 M80.5,598.0158 L67.5,613.0158 M80.5,598.0158 L93.5,613.0158 " fill="none" style="stroke: #383838; stroke-width: 1.5;"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="102" x="6" y="630.4818">OTA manager /</text><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="149" x="6" y="649.5497">confirmation program</text><!--MD5=[6857f13236cb144e56befd21da1781a5]
entity runtime--><ellipse cx="80.5" cy="715.0158" fill="#F8F8F8" rx="8" ry="8" style="stroke: #383838; stroke-width: 1.5;"/><path d="M80.5,723.0158 L80.5,750.0158 M67.5,731.0158 L93.5,731.0158 M80.5,750.0158 L67.5,765.0158 M80.5,750.0158 L93.5,765.0158 " fill="none" style="stroke: #383838; stroke-width: 1.5;"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="109" x="24.5" y="782.4818">Running system</text><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="112" x="24.5" y="801.5497">and applications</text><!--MD5=[185f47122682ca8ce8f24fc040241013]
link installer to B--><path d="M108.5,170.1058 C129.25,175.6158 158.71,182.7358 185,186.5158 C265.32,198.0458 355.93,203.5858 428.84,206.2258 " fill="none" id="installer-&gt;B" style="stroke: #383838; stroke-width: 1.0;"/><polygon fill="#383838" points="434.06,206.4058,425.2147,202.0745,429.0634,206.2203,424.9177,210.069,434.06,206.4058" style="stroke: #383838; stroke-width: 1.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="117" x="217.5" y="182.4129">replace inactive slot</text><!--MD5=[5e4f21d9383ed71105fa8830a37cd002]
link installer to work--><path d="M108.7,159.8858 C174.46,153.5358 345.01,137.0558 458.75,126.0658 " fill="none" id="installer-&gt;work" style="stroke: #383838; stroke-width: 1.0;"/><polygon fill="#383838" points="463.78,125.5858,454.4426,122.4533,458.8023,126.0579,455.1978,130.4176,463.78,125.5858" style="stroke: #383838; stroke-width: 1.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="114" x="219" y="132.4129">use temporary files</text><!--MD5=[45b867fa1f8d8aa4541f3cf2eef528d9]
link boot to shared--><path d="M121.29,371.2058 C140.33,377.0958 163.59,383.3458 185,386.5158 C263.54,398.1458 352.12,400.6758 424.3,400.0558 " fill="none" id="boot-&gt;shared" style="stroke: #383838; stroke-width: 1.0;"/><polygon fill="#383838" points="429.47,400.0058,420.436,396.0831,424.4702,400.0487,420.5046,404.0828,429.47,400.0058" style="stroke: #383838; stroke-width: 1.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="47" x="252.5" y="382.4129">execute</text><!--MD5=[e0595da2e168bbec6fe2445f1534f63e]
link boot to state--><path d="M121.01,390.0958 C139.42,403.6858 162.25,418.3958 185,427.5158 C250.58,453.8158 326.64,469.4758 393.6,478.7958 " fill="none" id="boot-&gt;state" style="stroke: #383838; stroke-width: 1.0;"/><polygon fill="#383838" points="398.82,479.5158,390.4403,474.3408,393.8655,478.8428,389.3635,482.268,398.82,479.5158" style="stroke: #383838; stroke-width: 1.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="180" x="186" y="423.4129">read / save before Linux starts</text><!--MD5=[b889d15dcac99864b6524b7c7532a9ac]
link boot to A--><path d="M121.31,352.9358 C187.76,345.2858 324.3,329.5658 429.03,317.5158 " fill="none" id="boot-&gt;A" style="stroke: #383838; stroke-width: 1.0;"/><polygon fill="#383838" points="434.3,316.9058,424.9021,313.9597,429.3327,317.4768,425.8156,321.9074,434.3,316.9058" style="stroke: #383838; stroke-width: 1.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="173" x="189.5" y="322.4129">select matching components</text><!--MD5=[d8162b56ad1fdfbf80f85e7eafe33a3d]
link boot to B--><path d="M121.09,332.4658 C139.89,321.4258 163.01,309.0558 185,300.5158 C263.44,270.0558 354.95,247.6158 428.86,232.5358 " fill="none" id="boot-&gt;B" style="stroke: #383838; stroke-width: 1.0;"/><polygon fill="#383838" points="434.15,231.4558,424.5319,229.3363,429.251,232.4556,426.1316,237.1747,434.15,231.4558" style="stroke: #383838; stroke-width: 1.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="173" x="189.5" y="244.4129">select matching components</text><!--MD5=[ddcc9cc09abe2ea6c86e27d5ca5369f5]
link manager to state--><path d="M155.12,586.7158 C224.08,570.9858 329.25,546.9858 416.18,527.1558 " fill="none" id="manager-&gt;state" style="stroke: #383838; stroke-width: 1.0;"/><polygon fill="#383838" points="421.09,526.0358,411.4259,524.1372,416.2152,527.1476,413.2048,531.9369,421.09,526.0358" style="stroke: #383838; stroke-width: 1.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="129" x="211.5" y="519.4129">request trial / confirm</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="160" x="196" y="537.1189">through platform interface</text><!--MD5=[e5613818b242e6cfc0b7814e671c619e]
link manager to progress--><path d="M155.12,606.6958 C235.81,610.1758 366.08,615.7958 458.7,619.7958 " fill="none" id="manager-&gt;progress" style="stroke: #383838; stroke-width: 1.0;"/><polygon fill="#383838" points="463.91,620.0258,455.0895,615.6442,458.9146,619.8118,454.747,623.6368,463.91,620.0258" style="stroke: #383838; stroke-width: 1.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="65" x="243.5" y="604.4129">read / save</text><!--MD5=[b7c32426f5b9e92879708d4d6251b8ea]
link runtime to appdata--><path d="M136.68,766.5758 C152.26,769.4458 169.26,772.3358 185,774.5158 C268.02,786.0158 361.67,794.8858 435.59,800.9558 " fill="none" id="runtime-&gt;appdata" style="stroke: #383838; stroke-width: 1.0;"/><polygon fill="#383838" points="440.88,801.3858,432.2287,796.6789,435.896,800.986,431.5889,804.6533,440.88,801.3858" style="stroke: #383838; stroke-width: 1.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="68" x="242" y="770.4129">read / write</text><!--MD5=[1e5b522c1f502a1b8cbd35bf97fc6c8c]
link runtime to identity--><path d="M136.83,751.1958 C219.12,744.7658 374.77,732.6058 474.83,724.7958 " fill="none" id="runtime-&gt;identity" style="stroke: #383838; stroke-width: 1.0;"/><polygon fill="#383838" points="479.85,724.4058,470.5589,721.1384,474.866,724.8057,471.1987,729.1128,479.85,724.4058" style="stroke: #383838; stroke-width: 1.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="135" x="208.5" y="730.4129">authorized access only</text><rect fill="#DDDDDD" height="105.3396" rx="5" ry="5" style="stroke: #000000; stroke-width: 1.0;" width="534" x="127" y="913.5158"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="487" x="133" y="933.4818">A is running while B is prepared. Preserve A, boot state and device data.</text><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="440" x="133" y="952.5497">Persistent device data survives replacement of either system slot.</text><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="303" x="133" y="971.6176">Shared data is not rolled back by selecting A.</text><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="477" x="133" y="990.6855">Both system versions must understand the recovery records they read.</text><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="522" x="133" y="1009.7534">Separate logical areas do not guarantee safe writes or whole-device recovery.</text><!--MD5=[fbf2d48276166d3e3c575df5d661f0a2]
@startuml
title A/B storage: logical areas and access responsibilities
left to right direction
skinparam shadowing false
skinparam monochrome true
actor "Installer" as installer
actor "Boot control" as boot
actor "OTA manager /\nconfirmation program" as manager
actor "Running system\nand applications" as runtime
rectangle "Device storage (logical areas, not a partition table)" {
rectangle "Shared boot components\nSeparate update and recovery method" as shared
database "Boot state\nNormal slot, trial target, attempts, confirmation" as state
rectangle "Slot A: retained system\nKernel + device tree + root filesystem" as A
rectangle "Slot B: update target\nKernel + device tree + root filesystem" as B
database "Persistent device data" as data {
rectangle "Identity and calibration\nRestricted access" as identity
rectangle "Configuration and application data\nMust support the retained version" as appdata
rectangle "OTA progress, failure blocks\nand pending reports" as progress
}
rectangle "Download and work area\nDisposable preparation files" as work
}
installer - -> B : replace inactive slot
installer - -> work : use temporary files
boot - -> shared : execute
boot - -> state : read / save before Linux starts
boot - -> A : select matching components
boot - -> B : select matching components
manager - -> state : request trial / confirm\nthrough platform interface
manager - -> progress : read / save
runtime - -> appdata : read / write
runtime - -> identity : authorized access only
legend bottom
A is running while B is prepared. Preserve A, boot state and device data.
Persistent device data survives replacement of either system slot.
Shared data is not rolled back by selecting A.
Both system versions must understand the recovery records they read.
Separate logical areas do not guarantee safe writes or whole-device recovery.
endlegend
@enduml
PlantUML version 1.2020.02(Sun Mar 01 05:22:07 EST 2020)
(GPL source distribution)
Java Runtime: OpenJDK Runtime Environment
JVM: OpenJDK 64-Bit Server VM
Java Version: 21.0.12.1+1-1-deb13u1-Debian
Operating System: Linux
Default Encoding: UTF-8
Language: en
Country: null
--></g></svg>

After

Width:  |  Height:  |  Size: 17 KiB