# DCENTos Buildroot defconfig — Antminer S17+ (Zynq am2 17-series, BM1397).
# D-Central Technologies, 2026.
#
# 2026-08-27 Antminer 17-Series Complete Unlock Armada (agent B2) — clone of
# dcentos_am2_s17pro_zynq_defconfig for the S17+ target: 3 chains x 65
# chips, hashboard BHB07602 / PIC16F1704 (G2b). Same Xilinx Zynq 7007S Cortex-A9 + Linaro 7.2.1
# toolchain as every am2 sibling; ONLY the per-product identity and the
# baked dcentrald.toml geometry differ (see board/zynq/am2-s17plus/post-build.sh,
# which patches serial_chip_count=65 / model="s17plus" into the
# am2-s17pro baked default). Per A2 §3 the ONE held Braiins am2-s17 donor
# + bitstream serves the whole 17 family — no per-SKU boot artifacts.
#
# ## EXPERIMENTAL — DESK-VALIDATED, NO LIVE PROOF ###########################
# No live S17+ unit exists on the D-Central fleet. The BM1397 runtime lane
# (--s17-hybrid, agent B1) is admitted desk-side; images export NONE of the
# DCENT_AM2_S17_* knobs and the energize gate is bench-only. Install surface:
# SD trial image, package-only sysupgrade tarball, fail-closed stock revert,
# VNish-model ramdisk-swap LAB route. Evidence: docs/dev/2026-08-27-antminer17-unlock-armada/findings/(R2,A2,A1)_*.md
#############################################################################
# =============================================================================
# Target Architecture — same as S9 / am2-s19jpro (Zynq Cortex-A9).
# =============================================================================
BR2_arm=y
BR2_PACKAGE_AM2_NAND_WINDOW=y
BR2_cortex_a9=y
BR2_ARM_ENABLE_NEON=y
BR2_ARM_ENABLE_VFP=y
BR2_ARM_FPU_VFPV3D16=y

# =============================================================================
# Toolchain — Linaro GCC 7.2.1-2017.11 (same as S9 / am2-s19jpro, matches
# BraiinsOS kernel).
# =============================================================================
BR2_TOOLCHAIN_EXTERNAL=y
BR2_TOOLCHAIN_EXTERNAL_CUSTOM=y
BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y
BR2_TOOLCHAIN_EXTERNAL_URL="https://releases.linaro.org/components/toolchain/binaries/7.2-2017.11/arm-linux-gnueabihf/gcc-linaro-7.2.1-2017.11-x86_64_arm-linux-gnueabihf.tar.xz"
BR2_TOOLCHAIN_EXTERNAL_CUSTOM_PREFIX="arm-linux-gnueabihf"
BR2_TOOLCHAIN_EXTERNAL_GCC_7=y
BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_10=y
BR2_TOOLCHAIN_EXTERNAL_CUSTOM_GLIBC=y
BR2_TOOLCHAIN_EXTERNAL_CXX=y
BR2_TOOLCHAIN_EXTERNAL_FORTRAN=y
BR2_TOOLCHAIN_EXTERNAL_OPENMP=y

# =============================================================================
# Filesystem — squashfs primary (sysupgrade), ext4 secondary (research).
# Identical to am2-s19jpro.
# =============================================================================
BR2_TARGET_ROOTFS_SQUASHFS=y
BR2_TARGET_ROOTFS_SQUASHFS4_XZ=y
BR2_TARGET_ROOTFS_EXT2=y
BR2_TARGET_ROOTFS_EXT2_4=y
BR2_TARGET_ROOTFS_EXT2_SIZE="128M"

# =============================================================================
# Per-product identity.
# =============================================================================
BR2_TARGET_GENERIC_HOSTNAME="dcentos-s17plus"
BR2_TARGET_GENERIC_ISSUE="DCENTos for S17+ (am2 17-series, BM1397) — EXPERIMENTAL, DESK-VALIDATED ONLY — D-Central Technologies"

# =============================================================================
# Overlay-on-overlay — shared zynq overlay first, per-board 17-series identity last.
# Buildroot applies overlays left-to-right so per-board files win.
# =============================================================================
BR2_ROOTFS_OVERLAY="$(BR2_EXTERNAL_DCENTOS_PATH)/board/common/rootfs-overlay $(BR2_EXTERNAL_DCENTOS_PATH)/board/zynq/rootfs-overlay $(BR2_EXTERNAL_DCENTOS_PATH)/board/zynq/am2-s17plus/rootfs-overlay"
BR2_ROOTFS_POST_BUILD_SCRIPT="$(BR2_EXTERNAL_DCENTOS_PATH)/board/zynq/am2-s17plus/post-build.sh $(BR2_EXTERNAL_DCENTOS_PATH)/board/common/prune-runtime-research-tools.sh"
BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_DCENTOS_PATH)/board/zynq/am2-s17plus/post-image.sh"

# =============================================================================
# Zynq-tuned BusyBox config (shared with S9 / am2-s19jpro — same FPGA
# register applets).
# =============================================================================
BR2_PACKAGE_BUSYBOX_CONFIG="$(BR2_EXTERNAL_DCENTOS_PATH)/board/zynq/busybox.config"
