sma is the Strata Module Archiver. It is built as part of the host tools
graph and installed by the folisdk-host package.
The CMake integration module is installed as UseSMA.cmake.
- The active archive version is
0. - The archiver is a compiled C++ host tool and does not require Python at archive creation time.
- Archive files use the
SMA\0magic value. - The archive currently stores a binary manifest entry plus optional kernel ELF, user ELF, and signature entries.
- Kernel and user image inputs must be ELF shared objects (
ET_DYN). - Each archive entry records offset, size, flags, and a SHA-256 digest of its payload.
- The manifest uses fixed binary records and a 4-byte-aligned string table for the module name.
- Provided interface records embed their
.sifartifact in the archive and store the interface UUID, root revision hash, SIF entry index, and an index into the manifest revision extent table. Revision extents use[revision_base, revision_base + revision_count)and can represent disjoint supported revision sets for one interface. - Required interface records are derived from
.sifartifacts and store only the dependency identity: interface UUID, root revision hash, required ABI revision, and required revision hash. They reference a single-revision extent.
Create an archive:
sma create \
--name TestModule \
--kernel TestModule.kernel.elf \
--user TestModule.user.elf \
--provide-sif gen/sidl/byte_stream.sif \
--require-sif gen/sidl/mcfg.sif \
-o TestModule.smaInspect an archive:
sma inspect TestModule.smainclude(UseSMA)
sma_add_module(TestModule
PROVIDES "${CMAKE_CURRENT_BINARY_DIR}/sidl/byte_stream.sif"
REQUIRES "${CMAKE_CURRENT_BINARY_DIR}/sidl/mcfg.sif"
)
target_sources(TestModule_KERNEL PRIVATE kmain.c)
target_sources(TestModule_USER PRIVATE umain.c ${SIDL_SRCS} ${SIDL_HDRS})
target_include_directories(TestModule_USER PRIVATE "${CMAKE_CURRENT_BINARY_DIR}/sidl")sma_add_module() creates <name>_KERNEL and <name>_USER object targets,
links .kernel.elf and .user.elf images from them, and archives those images
into <name>.sma. Use the normal target_sources(),
target_include_directories(), and target_compile_options() commands to
populate or specialize each image target. Use sma_add_archive() directly when
the ELF image build is owned by custom project logic.
PROVIDES and REQUIRES take .sif artifacts. PROVIDES embeds the SIF in
the archive; REQUIRES records only the SIF dependency identity.