From rkit
프로젝트 워크스페이스 구성 스킬. git submodule + Kconfig + Makefile 빌드 시스템 생성. Triggers: 워크스페이스 구성, 빌드 환경, workspace setup, platform add
npx claudepluginhub solitasroh/rkit --plugin rkitThis skill is limited to using the following tools:
프로젝트의 소스 구조(git submodule)와 빌드 시스템(Kconfig + Makefile)을 한번에 구성한다.
Creates isolated Git worktrees for feature branches with prioritized directory selection, gitignore safety checks, auto project setup for Node/Python/Rust/Go, and baseline verification.
Executes implementation plans in current session by dispatching fresh subagents per independent task, with two-stage reviews: spec compliance then code quality.
Dispatches parallel agents to independently tackle 2+ tasks like separate test failures or subsystems without shared state or dependencies.
프로젝트의 소스 구조(git submodule)와 빌드 시스템(Kconfig + Makefile)을 한번에 구성한다.
╔══════════════════════════════════════════════════════════════════╗
║ ║
║ 이 스킬을 실행하기 전에 아래 항목을 반드시 정해두세요: ║
║ ║
║ 1. 각 컴포넌트의 Git Repository URL ║
║ - kernel: http://gitlab/group/linux-stm32mp.git ║
║ - uboot: http://gitlab/group/u-boot-stm32mp.git ║
║ - application: http://gitlab/group/my-app.git ║
║ - (필요한 만큼 추가) ║
║ ║
║ 2. 각 컴포넌트의 Branch (또는 Tag) ║
║ - kernel: scarthgap-mycompany ║
║ - uboot: scarthgap-mycompany ║
║ - application: main ║
║ ║
║ 3. SDK/Toolchain 설치 경로 ║
║ - /opt/yocto-sdk/stm32mp2 ║
║ ║
║ 4. 타겟 보드 IP (배포용) ║
║ - 192.168.1.100 ║
║ ║
║ repo URL과 branch가 정해지지 않으면 구성할 수 없습니다. ║
║ ║
╚══════════════════════════════════════════════════════════════════╝
kconfiglib: pip install kconfiglibproject.git/ ← 메인 repo
make/ ← 빌드 시스템
Makefile ← 통합 빌드 오케스트레이터
Kconfig ← 프로젝트 설정 (menuconfig)
.config ← 현재 활성 설정
include.mk ← .config 변환 (자동 생성)
platform/
native.mk ← x86 native
stm32mp2.mk ← cross 플랫폼
cmake/
toolchain-stm32mp2.cmake
configs/ ← 저장된 defconfig
stm32mp2_full_defconfig
build/ ← cmake 빌드 디렉토리 (자동 생성)
output/ ← 산출물 수집 (make collect)
kernel/ ← git submodule
uboot/ ← git submodule
application/ ← git submodule
firmware/ ← git submodule (선택)
.gitmodules ← submodule 정의
.gitignore
python overlay/skills/project-workspace/scripts/detect_toolchain.py \
--sdk-path /opt/yocto-sdk/stm32mp2
python overlay/skills/project-workspace/scripts/generate_platform.py \
--name stm32mp2 \
--sdk-path /opt/yocto-sdk/stm32mp2 \
--cross-compile /opt/.../aarch64-poky-linux- \
--arch arm64 \
--sysroot /opt/.../cortexa35-poky-linux \
--output-dir make/
python overlay/skills/project-workspace/scripts/generate_kconfig.py \
--output make/ \
--components kernel uboot application \
--platforms stm32mp2
python overlay/skills/project-workspace/scripts/generate_makefile.py --output make/
실행 시 메뉴를 표시한다:
Project Workspace:
1. 전체 구성 — submodule + make/ 빌드 시스템 생성 (최초 1회)
2. 플랫폼 추가 — SDK 경로로 새 플랫폼 등록
3. 컴포넌트 추가 — git submodule 추가
4. 빌드 안내 — 사용법 안내
detect_toolchain.pygenerate_platform.py로 설정 생성cd project/make
# 설정
make menuconfig # 대화형 프로젝트 설정
make xxx_defconfig # 저장된 설정 로드
make savedefconfig NAME=xxx # 현재 설정 저장
# 커널
make kernel # 커널 빌드
make kernel-menuconfig # 커널 menuconfig
make kernel-modules-dir M=path # 특정 모듈만 (수 초)
# U-Boot
make uboot
make uboot-menuconfig
# 앱
make application # cmake/make 자동 감지
# 전체
make all # 활성화된 컴포넌트 전체
# 산출물 수집
make collect # output/{platform}/에 결과 모음
# 배포
make deploy # 타겟에 전체 배포
make deploy-module M=path # 모듈 하나 배포 + insmod
# 플랫폼 전환 (같은 터미널)
make PLATFORM=stm32mp2 kernel
make PLATFORM=imx kernel
make PLATFORM=native application
# 1. clone (submodule 포함)
git clone --recurse-submodules {project URL}
# 2. SDK 설치 (별도)
# 3. 플랫폼 등록
# AI: "플랫폼 추가 해줘" → project-workspace 메뉴 2
# 4. defconfig 로드 + 빌드
cd make
make stm32mp2_default_defconfig
make all
# 컴포넌트 안에서 개발
cd kernel
git checkout -b dev/my-driver
# ... 수정, 커밋, push ...
# 메인 repo에서 submodule 커밋 업데이트
cd ..
git add kernel
git commit -m "kernel: update to dev/my-driver HEAD"
# 다른 개발자가 최신 받기
git pull && git submodule update --init --recursive
Kconfig에서 활성화 (기본 ON). 재빌드 시간 대폭 단축.
sudo apt install ccache
make info # ccache ON/OFF 확인
make collect
make/output/{platform}/
boot/Image, *.dtb, u-boot.bin
modules/lib/modules/...
app/...
version.txt # 플랫폼, 날짜, git describe
| 스킬 | 역할 | 호출 |
|---|---|---|
project-bootstrap | AI 에이전트 규칙/프로세스 | "프로젝트 부트스트랩 해줘" |
project-workspace | 소스 구조 + 빌드 시스템 | "워크스페이스 구성 해줘" |
프로젝트 시작 시 순서:
project-bootstrap → AI rules, docs 구조project-workspace → submodule + make/ + SDKsource environment-setup-*.sh는 사용하지 않는다.make/ 디렉토리에서 실행한다.git add {submodule} 커밋 필요.kconfiglib 필요: pip install kconfiglibmake/.config, make/include.mk, make/build/, make/output/은 .gitignore 대상.