# Architecture Reference Den has two layers: an early boot layer and a conda system layer. ## Early Boot Layer Owner: Buildroot. Responsibilities: - target Linux kernel, - static musl BusyBox, - minimal initramfs, - early device discovery, - Den rootfs mount, - `switch_root` handoff, - emergency shell. The early boot layer must stay small and replaceable. It is not a general userspace package layer. ## Conda System Layer Owner: conda workspace lockfile plus Den-owned conda packages. Responsibilities: - `/opt/den` runtime prefix, - `/den/generations//sw` system generation prefixes, - `/den/current-system` active-generation pointer, - `/run/current-system` boot-time pointer, - systemd PID 1, - stage1, - rootfs layout manifests, - base filesystem policy, - release metadata, - generation record, validation, activation, and rollback. ## Build Flow ```text den-forge recipes + indexed hosted or local channel | v target-specific Den image workspace | v complete conda-workspaces lock for linux-aarch64 or linux-64 | v conda workspace archive | v build/rootfs with /opt/den and /den/generations/1/sw | v build/artifacts/den-rootfs.ext4 | v QEMU bundle with Buildroot Image and initramfs ``` ## Boot Flow ```text QEMU -> Linux kernel from Buildroot -> Buildroot initramfs -> mount Den rootfs -> switch_root /init -> Den stage1 from active conda generation -> /run/current-system/sw/lib/systemd/systemd -> systemd target and Den services ``` ## Current Targets ```text qemu-aarch64 qemu-x86_64 ``` Each image workspace is locked for exactly one matching conda platform: ```text linux-aarch64 linux-64 ``` The repository lock is separate and covers only the contributor development environment.