Components ========== .. include:: /reuse/components-intro.rst Like snaps, components are packaged a squashfs file. When installed, the component is mounted at the path ``$SNAP/../components/$SNAP_REVISION/`` so the host snap can access it. Types ----- A component must declare a ``type`` in the project's ``snapcraft.yaml`` file. For some types, Snapcraft may place requirements on the files of a component and snapd may have special handling for the component. Standard ~~~~~~~~ The ``standard`` type is the general use type for components. It should be used when no specific type applies. Snapcraft has no requirements or special handling for this type. Kernel-modules ~~~~~~~~~~~~~~ The ``kernel-modules`` type should only be used for :ref:`kernel snaps`. These components are for kernel modules and firmware that are made available to the system after installation. This type allows the kernel to find firmware and for users to load kernel modules with ``modprobe``. Static modules should be organized under ``modules//`` in the component, where ```` is the version reported by ``uname -r``. Firmware should be organized under ``firmware/`` in the component. Modules and firmware may be dynamically generated by the component's ``install`` or ``refresh`` `hooks `_: - Modules generated by a hook should be placed in ``$SNAP_DATA/modules//``. - Firmware generated by a hook should be placed in ``$SNAP_DATA/firmware/``. To allow loading of dynamically generated modules and firmware, the snap's ``meta/kernel.yaml`` file must declare ``dynamic-modules: $SNAP_DATA``. .. include:: /common/craft-parts/reference/partition_specific_output_directory_variables.rst