From 6a26feb9e95552db52981bbcf5193223570f332e Mon Sep 17 00:00:00 2001 From: Jared Vititoe Date: Mon, 20 Jul 2026 02:39:50 -0400 Subject: [PATCH] driveAtlas: add ZimaBoard 832 layout for micro1 / monitor-02 Both micro hosts are ZimaBoard 832 (Celeron N3450, 8G LPDDR4, 32G eMMC). Add a dedicated "zimaboard" chassis type + generate_zimaboard_layout() and route micro1/monitor-02 to it, replacing the generic 2-bay "micro" render. Physical layout confirmed against the actual unit (not just vendor specs): FRONT face is two-tier - the 2x GbE sit directly ABOVE the 2x USB 3.0, with the Mini-DisplayPort left of that block and the DC 12V barrel right. The open-ended PCIe 2.0 x4 card edge exits the LEFT side. The REAR edge carries the 2x SATA data connectors with the single mini-4-pin SATA power header in the CENTRE between them, so two drives need a Y power cable. No drive bay (drives cable out and lie beside the board) and no M.2/mSATA. Map the two rear SATA ports via AHCI 00:12.0 (ata1/ata2) as sata-1/sata-2; the soldered eMMC has no by-path entry so it is probed directly at /dev/mmcblk0 and shown as the OS/boot slot. The render is a fanless finned-heatsink hero: an oblique brick whose lid is a corrugated block-element fin ramp lit from upper-left, with the front-left notch and the badge inset in the bevel, over three drive slots (solid+green when occupied, dashed ghost when empty). Drawn onto a fixed 66-column glyph/colour-key canvas and emitted with run-length colour, so every line is exactly the same display width in monochrome and colour; SAFE width-1 glyphs only (no ambiguous-width chars that smear under CJK locales). Co-Authored-By: Claude Opus 4.8 --- driveAtlas.sh | 241 +++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 228 insertions(+), 13 deletions(-) diff --git a/driveAtlas.sh b/driveAtlas.sh index 394bc9d..221d7bd 100644 --- a/driveAtlas.sh +++ b/driveAtlas.sh @@ -904,20 +904,22 @@ declare -A SERVER_MAPPINGS=( pci-0000:26:00.0-nvme-1 m2-2 " - # micro1 - # ZimaBoard 832 - Single board computer - # 2 SATA ports on rear (currently unused) - # Boot from onboard eMMC (mmcblk0) - # SATA controller at 00:12.0 + # micro1 / monitor-02 - ZimaBoard 832 (Apollo Lake N3450), physical layout + # confirmed on-unit 2026-07-20: + # FRONT face : video-out (mDP) left, then 2x USB 3.0 (blue), then DC barrel; + # the 2x GbE sit on an UPPER tier directly ABOVE the two USB ports. + # LEFT side : open-ended PCIe 2.0 x4 slot (expansion path; no M.2/mSATA). + # REAR edge : 2x SATA-III (ata1/ata2 via AHCI 00:12.0) with the single + # mini-4-pin SATA power header in the CENTER between them + # (2 drives need a Y power cable). + # Onboard : 32G eMMC (mmcblk0) = OS/boot, soldered (no by-path). ["micro1"]=" + pci-0000:00:12.0-ata-1 sata-1 + pci-0000:00:12.0-ata-2 sata-2 " - - # monitor-02 - # ZimaBoard 832 - Single board computer - # 2 SATA ports on rear (currently unused) - # Boot from onboard eMMC (mmcblk0) - # SATA controller would be at a specific PCI address when drives connected ["monitor-02"]=" + pci-0000:00:12.0-ata-1 sata-1 + pci-0000:00:12.0-ata-2 sata-2 " # pbs @@ -953,8 +955,8 @@ declare -A CHASSIS_TYPES=( ["compute-storage-gpu-01"]="10bay" ["storage-01"]="10bay" ["large1"]="large1" - ["micro1"]="micro" # ZimaBoard 832 - ["monitor-02"]="micro" # ZimaBoard 832 + ["micro1"]="zimaboard" # ZimaBoard 832 + ["monitor-02"]="zimaboard" # ZimaBoard 832 ["pbs"]="nuc" # Intel NUC5i5RYB (1 internal SATA + 2 rear USB-NVMe) ) @@ -1293,6 +1295,216 @@ if [[ "$RUN_DIAGNOSE" == true ]]; then run_diagnose fi +#------------------------------------------------------------------------------ +# generate_zimaboard_layout +# +# ASCII art for a ZimaBoard 832 (micro1 / monitor-02): fanless x86 SBC (Celeron +# N3450) whose entire lid is a finned aluminium heatsink. Physical layout +# confirmed against the actual unit: +# TOP : corrugated heatsink fins, rectangular notch at the FRONT-LEFT, +# logo badge inset into the front bevel. +# FRONT face : two tiers - 2x GbE sit directly ABOVE the 2x USB 3.0; the +# Mini-DisplayPort is LEFT of that block, DC 12V barrel is RIGHT. +# LEFT side : open-ended PCIe 2.0 x4 card edge protruding out the side. +# REAR edge : 2x SATA data with the single SATA power header in the CENTRE +# (SATA | PWR | SATA); no drive bay - drives cable out and lie +# beside the board, and two drives need a Y power cable. +# Onboard : 32G eMMC (mmcblk0) = OS/boot, soldered (never in DRIVE_MAP). +# Bays: sata-1, sata-2 (+ a direct /dev/mmcblk0 probe for the eMMC). +# +# Renders onto a fixed 66-column glyph/colour-key canvas and emits with +# run-length colour, so every line is exactly the same display width in both +# monochrome and colour. Only SAFE width-1 glyphs (box-drawing + block elements). +# +# Args: +# $1 - Hostname to display in the layout header +# +# Side effects: Calls build_drive_map() to populate DRIVE_MAP +#------------------------------------------------------------------------------ +# shellcheck disable=SC2059 +generate_zimaboard_layout() { + local host="${1:-$(hostname 2>/dev/null || echo host)}" + + # Contract order: build the drive map first, then init colours. + build_drive_map 2>/dev/null || true + da_color_init + + # --- storage discovery ------------------------------------------------- + # eMMC (OS/boot) is soldered and never in DRIVE_MAP -> probe it directly. + local emmc_dev='' emmc_size='' emmc_on=0 + if [ -b /dev/mmcblk0 ]; then + emmc_on=1; emmc_dev='mmcblk0' + emmc_size="$(lsblk -dno SIZE /dev/mmcblk0 2>/dev/null | tr -d ' ')" + [ -n "$emmc_size" ] || emmc_size='?' + fi + # Rear SATA ports come from DRIVE_MAP (guard set -u / never-built map). + local sata1='EMPTY' sata2='EMPTY' + if declare -p DRIVE_MAP >/dev/null 2>&1; then + sata1="${DRIVE_MAP[sata-1]:-EMPTY}" + sata2="${DRIVE_MAP[sata-2]:-EMPTY}" + fi + + # --- canvas + geometry ------------------------------------------------- + local WIDTH=66 + local S=5 Wi=44 FL=16 # oblique depth, front interior width, front-left col + local BL=$((FL-S)) FR=$((FL+Wi+1)) + local BR=$((FR-S)) # NB: separate statement; FR is not visible in its own `local` + local R0=2 HC=3 FE FB LEG HEIGHT + FE=$((R0+S)); FB=$((FE+HC+1)); LEG=$((FB+3)); HEIGHT=$((LEG+6)) + + # dual grid: Gc = glyphs, Gk = per-cell colour key ('.' = default) + local -a Gc Gk + local r c t blank kblank + printf -v blank '%*s' "$WIDTH" '' + printf -v kblank '%*s' "$WIDTH" ''; kblank=${kblank// /.} + for ((r=0;r/dev/null 2>&1; then da_repeat "$1" "$2" + else local g=$1 n=$2 o=''; while ((n-->0)); do o+="$g"; done; printf '%s' "$o"; fi + } + # heatsink fin ramp: period-4 ridge, lit from upper-left + _zfin() { + case $(( (($1%4)+4)%4 )) in + 0) _zp "$2" "$3" '█' H ;; + 1) _zp "$2" "$3" '▓' H ;; + 2) _zp "$2" "$3" '▒' S ;; + 3) _zp "$2" "$3" '░' S ;; + esac + } + + local dashW; dashW="$(_zrep '─' "$Wi")" + + # --- header ------------------------------------------------------------ + _zp 0 0 'driveAtlas' H + _zp 0 11 ":: ${host}" S + _zp 0 $((WIDTH-13)) 'ZimaBoard 832' D + + # --- left side face (shadow) + corrugated finned top ------------------- + for ((r=1;r/dev/null || true +} + HOSTNAME=$(hostname | tr -cd '[:alnum:]-_.') CHASSIS_TYPE=${CHASSIS_TYPES[$HOSTNAME]:-"unknown"} @@ -1307,6 +1519,9 @@ case "$CHASSIS_TYPE" in "micro") generate_micro_layout "$HOSTNAME" ;; + "zimaboard") + generate_zimaboard_layout "$HOSTNAME" + ;; "nuc") generate_nuc_layout "$HOSTNAME" ;;