Skip to content

Add minimal Yocto eSDK devcontainer feature#10

Draft
Copilot wants to merge 5 commits into
mainfrom
copilot/add-minimal-devcontainer-feature
Draft

Add minimal Yocto eSDK devcontainer feature#10
Copilot wants to merge 5 commits into
mainfrom
copilot/add-minimal-devcontainer-feature

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 6, 2026

Implements automated Yocto Extensible SDK installation via devcontainer feature to eliminate manual setup boilerplate.

Implementation

Feature structure (src/yocto-esdk/)

  • Accepts SDK installer URL (Artifactory, HTTP server, etc.)
  • Silent installation via -y -d <path> flags
  • Auto-sources environment through /etc/profile.d
  • Minimal dependencies: wget, file, locales only

Configuration options

  • sdkUrl: Installer script location
  • installPath: SDK installation directory (default: /opt/yocto-esdk)
  • autoSourceEnvironment: Auto-source SDK env for all users (default: true)

Test coverage

  • No-URL scenario (graceful skip)
  • Multi-distribution (Ubuntu, Debian)
  • Integrated into CI matrix

Usage

{
    "features": {
        "ghcr.io/FabianSchurig/devcontainer-features/yocto-esdk:1": {
            "sdkUrl": "https://artifactory.example.com/yocto/esdk-installer.sh"
        }
    }
}

SDK environment automatically available in new shells. Manual sourcing: . /opt/yocto-esdk/environment-setup-*

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • centralus.data.mcr.microsoft.com
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node node /home/REDACTED/work/_temp/ghcca-node/node/bin/devcontainer features test --skip-scenarios -f yocto-esdk -i mcr.microsoft.com/devcontainers/base:ubuntu . (dns block)
  • containers.dev
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node node /home/REDACTED/work/_temp/ghcca-node/node/bin/devcontainer features test --skip-scenarios -f yocto-esdk -i mcr.microsoft.com/devcontainers/base:ubuntu . (dns block)
  • docker-images-prod.6aa30f8b08e16409b46e0173d6de2f56.r2.cloudflarestorage.com
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node node /home/REDACTED/work/_temp/ghcca-node/node/bin/devcontainer features test -f yocto-esdk -i ubuntu:latest . 770413281979 base:ubuntu iginal show�� 2a588b7b6c0692ae-e 2c37b8b5c68723e0LESSCLOSE=/usr/bin/lesspipe %s %s /usr/bin/bash 59e737e86c2d0ac4echo (dns block)
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node node /home/REDACTED/work/_temp/ghcca-node/node/bin/devcontainer features test -f yocto-esdk -i debian:latest . (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>Feature Request: Minimal Devcontainer Feature for Yocto eSDK & IDE-SDK Setup</issue_title>
<issue_description>
Context & Objective
We need to simplify the onboarding process for developers working with Yocto by creating a minimal Devcontainer Feature. This feature will automate the setup of the Yocto Extensible SDK (eSDK) and the associated IDE-SDK integration.
Currently, setting up an eSDK requires manual downloading, dependency management, and script execution. We want to encapsulate this into a reusable feature that:

  • Reduces boilerplate code in Dockerfile or postCreateCommand.
  • Accepts a repository URL (Artifactory, HTTP server, etc.) as input.
  • Is compatible with multiple distributions (multi-repo support).
  • Maintains a minimal footprint (installs only what is needed).
    Research: Yocto eSDK Architecture
  • Structure: The Yocto eSDK is distributed as a self-extracting shell script (Shar archive). It contains a bundled version of BitBake, the build engine, and a sysroot tailored to the specific image.
  • Installation: It typically runs interactively but supports silent installation using flags (./installer.sh -y -d ).
  • Dependencies: The eSDK requires specific host packages to function (e.g., python3, chrpath, diffstat, lz4, gawk, locales). A robust feature must ensure these are present on the base container image. You can depend on our initial yocto-build-tools devcontainer-feature which we just created.
  • Environment: To use the SDK, a setup script (environment-setup-) must be sourced. This exports variables like SDKTARGETSYSROOT, CC, CXX, and adds devtool/bitbake to the PATH.
  • IDE-SDK: Modern Yocto workflows (via bitbake ide-sdk or meta-ide-support) rely on this environment being active so that VS Code (or other IDEs) can resolve includes and cross-compilers.
    Proposed Solution
    We will create a specific Devcontainer Feature (following the Dev Container Spec) that handles the lifecycle of the SDK.
  1. Feature Configuration (devcontainer-feature.json)
    The feature will be generic and data-driven. It will accept the SDK location as a parameter to support any distribution or repository.
    Options:
  • sdkUrl (Required): The full HTTP/HTTPS URL to the eSDK installer script (e.g., from Artifactory).
  • installPath (Optional): Target directory (default: /opt/yocto-esdk).
  • sdkType (Optional): "esdk" (default) or "standard" (to support standard SDKs if needed).
    Example Usage in devcontainer.json:
    "features": {
    "./local-features/yocto-esdk": {
    "sdkUrl": "https://artifactory.example.com/yocto/builds/current/poky-esdk-x86_64.sh",
    "installPath": "/opt/esdk/my-distro"
    }
    }
  1. Implementation Details (install.sh)
    The installation script will perform the following steps to ensure maintainability and minimal boilerplate:
  • Dependency Check: Automatically install strictly required Yocto host tools (using apt-get or dnf based on the container OS) so the user doesn't have to list them in their Dockerfile.
  • Fetch: Download the installer using curl/wget from the provided sdkUrl.
  • Silent Install: execute the installer with -y (yes to all) and -d .
  • Cleanup: Remove the large installer script immediately to save container space.
  • Environment Setup:
    • Create a profile script in /etc/profile.d/yocto-esdk.sh.
    • This script will conditionally source the SDK environment setup script when the user logs in.
    • Goal: The user opens the terminal, and devtool is already in the PATH.
  1. Multi-Repo/Multi-Distro Support
    To support multiple eSDKs (e.g., one for the Linux distro, one for an RTOS or MCU), the feature logic should handle non-conflicting install paths. If the Devcontainer spec allows multiple instantiations of the same feature, we use that. If not, the sdkUrl option could accept a JSON map or array to loop through and install multiple SDKs into separate subdirectories.
    Requirements & Acceptance Criteria
  • Configuration: The feature must accept sdkUrl as a mandatory input.
  • Automation: The install must be fully non-interactive.
  • IDE Ready: Upon container startup, running devtool status or bitbake --version should work without manual sourcing.
  • Minimalism: The feature must strictly install only the eSDK and its direct OS dependencies.
  • Validation: Verify support for at least two different Yocto versions (e.g., Kirkstone and Scarthgap) to ensure the installer arguments are consistent.
    Implementation Plan
  • Scaffold Feature: Create the file structure (devcontainer-feature.json, install.sh).
  • Define Inputs: Add the sdkUrl and installPath properties to the JSON config.
  • Write Install Script:
    • Implement OS detection (Debian/Ubuntu focus initially).
    • Add apt-get install list for Yocto host tools (Reference: Yocto Docs).
    • Implement the download and execution logic.
  • Test: Create a test scenario using a public Yocto eSDK URL...

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 4 commits February 6, 2026 21:27
Co-authored-by: FabianSchurig <11216482+FabianSchurig@users.noreply.github.com>
Co-authored-by: FabianSchurig <11216482+FabianSchurig@users.noreply.github.com>
Co-authored-by: FabianSchurig <11216482+FabianSchurig@users.noreply.github.com>
Co-authored-by: FabianSchurig <11216482+FabianSchurig@users.noreply.github.com>
Copilot AI changed the title [WIP] Add minimal Devcontainer feature for Yocto eSDK setup Add minimal Yocto eSDK devcontainer feature Feb 6, 2026
Copilot AI requested a review from FabianSchurig February 6, 2026 21:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature Request: Minimal Devcontainer Feature for Yocto eSDK & IDE-SDK Setup

2 participants