ProKit

The ProteanOS Development Kit for building, packaging, and managing embedded software.

ProKit development workflow diagram

What is ProKit?

ProKit (ProteanOS Development Kit) is the integrated toolset for building, packaging, and managing software in the ProteanOS ecosystem. It provides a consistent development workflow across different target platforms and streamlines the process of creating conformant packages.

Rather than requiring developers to manually coordinate compilers, linkers, and packaging tools, ProKit wraps these operations in higher-level commands that handle cross-compilation details automatically.

Core Components

ProKit consists of several integrated components:

  • Build driver: Orchestrates the build process, invoking appropriate toolchain components with correct settings for the target platform
  • Package utilities: Tools for creating, inspecting, and manipulating packages according to the Source Package Format
  • Environment management: Scripts for setting up and switching between different target configurations
  • Dependency resolver: Analyzes package dependencies and determines build order
  • Quality checks: Validates packages against format requirements and coding standards

Basic Usage

ProKit commands follow a consistent pattern. Here are the most commonly used operations:

Building a Package

Building from a source directory
# Navigate to package source directory
cd ~/packages/example-package

# Build the package
prokit build

# Build with verbose output
prokit build --verbose

Creating a Package

Packaging build output
# Create package from built artifacts
prokit package

# Specify output directory
prokit package --output ~/packages/output/

Inspecting Packages

Package inspection commands
# Show package metadata
prokit info package-name.opk

# List package contents
prokit list package-name.opk

# Verify package integrity
prokit verify package-name.opk

Development Workflow

A typical development workflow using ProKit follows these steps:

  1. Initialize workspace: Set up your development environment and source the ProKit environment script
  2. Prepare source: Obtain or create source code, along with package metadata (control file, build rules)
  3. Configure build: Set target architecture and any build-time options
  4. Build: Run prokit build to compile the software for the target
  5. Test: Deploy built artifacts to target hardware or emulator for testing
  6. Package: Create the final package using prokit package
  7. Submit: Share your package or patches for review

Configuration

ProKit behavior can be customized through configuration files and environment variables:

  • ~/.config/prokit/config — User-level configuration
  • ./prokit.conf — Project-level configuration
  • Environment variables like PROKIT_TARGET and PROKIT_SYSROOT

Where to Start

If you're new to ProKit development, follow this learning path:

  1. Complete the installation guide to set up your development environment
  2. Build the example packages included in the SDK to verify your setup
  3. Study the Source Package Format documentation to understand package structure
  4. Try modifying an existing package to learn the build system
  5. Create a new package for software you want to add to ProteanOS

Contribution Workflow

Contributing packages or improvements to ProKit follows the standard project contribution process:

  • Ensure your work follows coding standards and documentation conventions
  • Test thoroughly on relevant target platforms
  • Submit patches to the development mailing list for review
  • Address reviewer feedback and iterate as needed

ProKit FAQ

What is the difference between ProKit and a regular compiler toolchain?

ProKit wraps the toolchain with additional functionality for packaging, dependency management, and cross-compilation configuration. It handles the complexity of targeting embedded platforms.

Can I use ProKit for native (non-cross) compilation?

Yes, ProKit can build packages for the host system as well as cross-compile for embedded targets. Specify the target appropriately in your configuration.

How do I add support for a new target architecture?

Adding a new architecture involves configuring toolchain settings and may require porting work. See the porting guide for details on adding platform support.

Where are build artifacts stored?

By default, build outputs are placed in a build/ subdirectory within the package source tree. This can be configured per-project or globally.

How do I debug build failures?

Use the --verbose flag to see detailed build output. Check the build log for specific error messages. Common issues include missing dependencies and incorrect environment setup.