docs: translate docs/analysis to English
CI / Linux arm64 (push) Waiting to run
CI / Linux x86_64 (push) Waiting to run
CI / ASan + UBSan (push) Waiting to run

- API.md, workflow.md and usb-layout.md translated
- usb-layout.md: describe the formatting that OpenPU actually performs
  on Linux (UDisks2) and Haiku (one transaction per step)
- API.md: restore the = / & escaping example lost earlier

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WDASLCiN764v685boRVYar
This commit is contained in:
yann64andClaude Opus 5.5 committed 2026-11-28 23:50:13 +01:00
1 parent 962343f220
commit 9a24c2eb61
5 files changed
+166 -159

No files matched your search

+39 -32
View File
@@ -1,43 +1,50 @@
# Préparation de la clé USB
# Preparing the USB stick
## Formatage
- Système de fichiers : **FAT32**, table de partitions MBR (macOS : `diskutil eraseDisk FAT32 <LABEL> MBR`).
- Label : le label actuel de la clé, assaini avec `replace(/[^a-zA-Z0-9_]+/g,'')`, tronqué à 11 caractères
et mis en majuscules. Valeur par défaut : `NEW`.
- Windows :
- ≤ 32 GiB : `format X: /q /fs:FAT32 /v:LABEL` ;
- au-delà, ou en cas d'échec : `chkdsk X: & timeout 20 & echo y | fat32format X: & label X: LABEL`,
avec élévation de privilèges.
- Linux (code présent dans l'app mais jamais livré) : `umount <mnt> && mkfs.vfat -n LABEL /dev/disk/by-uuid/<uuid>`.
Seul le volume est reformaté, pas la table de partitions.
## Formatting
- File system: **FAT32**, MBR partition table (macOS: `diskutil eraseDisk FAT32 <LABEL> MBR`).
- Label: the stick's current label, sanitised with `replace(/[^a-zA-Z0-9_]+/g,'')`, truncated to 11
characters and upper-cased. Default: `NEW`.
- Windows:
- up to 32 GiB: `format X: /q /fs:FAT32 /v:LABEL`;
- above, or on failure: `chkdsk X: & timeout 20 & echo y | fat32format X: & label X: LABEL`, with
elevated privileges.
- Linux (code present in the app but never shipped): `umount <mnt> && mkfs.vfat -n LABEL
/dev/disk/by-uuid/<uuid>`. Only the volume is reformatted, not the partition table.
Équivalents OpenPU :
- Linux : UDisks2 `org.freedesktop.UDisks2.Block.Format("vfat", {label, erase?})` sur le
périphérique bloc entier (création d'une table MBR et d'une partition FAT32), via polkit, sans root.
- Haiku : `BDiskDevice` → `BPartition::Initialize("fat", label, "fat 32")` (add-on DriveSetup FAT).
OpenPU equivalents:
- Linux: UDisks2 `org.freedesktop.UDisks2.Block.Format("dos")` on the whole block device, then
`PartitionTable.CreatePartitionAndFormat` (type `0x0c` at 1 MiB, `vfat` with the label), through
polkit, without root.
- Haiku: Storage Kit disk device API (`BDiskDevice` / `BPartition`, as DriveSetup), MBR ("intel")
with one "FAT 32-bit, LBA-mapped" partition at 1 MiB, formatted with the "fat" disk system.
On Haiku R1/beta6 each step must be its own transaction (erase foreign content, delete old
partitions, create the partition, format): combined transactions fail or hang, and
`Uninitialize()` on an existing MBR hangs the disk device manager.
## Taille minimale
## Minimum size
```
besoin = (taille fw + taille licence + taille carto) × 1.1
usbMin = 2 Go ; tant que usbMin × 10^9 < besoin : usbMin ×= 2
liste = disques USB montés dont la taille > besoin
needed = (firmware size + license size + map size) × 1.1
usbMin = 2 GB; while usbMin × 10^9 < needed: usbMin ×= 2
choices = mounted USB drives larger than needed
```
## Arborescence produite
## Resulting tree
```
<USB>/
├── license/
│ └── <nom licence> # license_<UIN>.key ou licenses_<id>_<ts>.tar, copié tel quel
├── rcc_update/… # contenu du tar firmware RCC (le nom dépend du calculateur)
└── … # contenu du tar cartographie, extrait à la racine
│ └── <license name> # license_<UIN>.key or licenses_<id>_<ts>.tar, copied as is
├── rcc_update/… # content of the RCC firmware tar (the name depends on the head unit)
└── … # content of the map tar, extracted at the root
```
### Archive firmware RCC réelle (6_0432_23-2I44-1, 8 391 587 840 octets)
- Format **ustar** standard (magic `ustar\000`), 16 entrées, uniquement des fichiers réguliers et des dossiers.
- Premier membre : `UpdateInfo.xml` (racine), puis `rcc_update/…`.
- Plus gros fichiers : `rcc_update/stc.A2.bsh.tar.bin` (2,70 Go), `stc.A1…` (2,68 Go) et `rfs.A2.wml.fp.tar.bin` (1,0 Go).
Tout tient sous la limite FAT32 de 4 Gio par fichier. Pour les cartes NAC (10,5 Go), c'est à vérifier.
- Tout fichier dont le *basename* est `UpdateInfo.xml` est ignoré lors de l'extraction.
- Le tar peut être sans « magic number » (`allowUnknownFormat`), donc il faut un lecteur tar tolérant
(libarchive : `archive_read_support_format_tar` + `archive_read_support_format_raw` désactivé).
- Une extraction « à blanc » (dry-run) préalable vérifie l'intégrité du tar.
### Real RCC firmware archive (6_0432_23-2I44-1, 8,391,587,840 bytes)
- Standard **ustar** format (magic `ustar\000`), 16 entries, only regular files and directories.
- First member: `UpdateInfo.xml` (root), then `rcc_update/…`.
- Largest files: `rcc_update/stc.A2.bsh.tar.bin` (2.70 GB), `stc.A1…` (2.68 GB) and
`rfs.A2.wml.fp.tar.bin` (1.0 GB). Everything fits under the 4 GiB FAT32 per-file limit. To be
checked for NAC maps (10.5 GB).
- Any file whose *basename* is `UpdateInfo.xml` is skipped during extraction.
- The tar may lack the "magic number" (`allowUnknownFormat` in the original app), so a tolerant tar
reader is needed (libarchive's tar reader accepts V7 archives without magic).
- A preliminary "dry-run" extraction checks the integrity of the tar.