A containerized build system for Clear Linux kernel with automated patch management and compatibility testing.
This project builds Clear3. Test compatibility: ./scripts/patch-tester.sh test
4. Build and verify: ./scripts/build-example.sh <base-image>inux kernel packages in containers with selective patch application based on kernel version compatibility. The system includes tools for testing patch compatibility and automatically enabling/disabling patches for different kernel versions.
- Containerized Builds: Build kernels in clean container environments
- Multi-Base Support: Compatible with yellowfin-dx and bluefin-dx container images
- Automated Patch Testing: Test patch compatibility against target kernel versions
- Selective Patch Management: Enable/disable patches based on compatibility
- CI/CD Integration: GitHub Actions workflow for automated builds
- OSTree Compatibility: Proper handling of OSTree filesystem structures
- Podman or Docker
- Just command runner (optional but recommended)
# Build with yellowfin-dx base
just build-yellowfin
# Build with bluefin-dx base
just build-bluefin
# Test patch compatibility
just test-patches
# Enable compatible patches
just enable-clean-patches
# Check current patch status
just patch-statusThe build system uses a multi-stage Containerfile that:
- Stage 1: Sets up build environment with all dependencies
- Stage 2: Downloads and builds kernel with RPM
- Stage 3: Installs kernel into bootc-compatible image
ghcr.io/tuna-os/yellowfin-dx:latest- Fedora-based development environmentghcr.io/ublue-os/bluefin-dx:lts- Ubuntu-based LTS environment
# Build with specific base image
./scripts/build-example.sh ghcr.io/tuna-os/yellowfin-dx:latest
# Tag and push (optional)
podman tag clear-linux-kernel:latest your-registry/clear-linux-kernel:latest
podman push your-registry/clear-linux-kernel:latest- 44 patches enabled - Tested and compatible
- 10 patches disabled - Incompatible or requiring updates
- 15 patches recently re-enabled through compatibility testing
Performance Patches:
- CPU idle state optimizations (intel_idle tweaks)
- Memory allocation scaling
- Network performance improvements
- Scheduler optimizations
Hardware Support:
- Intel ADL/RDT improvements
- ACPI buffer alignment
- Power management enhancements
System Features:
- Stateless firmware loading
- Boot optimization patches
- Debug and monitoring improvements
- Download kernel source:
./scripts/patch-tester.sh download - Test all disabled patches:
./scripts/patch-tester.sh test - Review results:
./scripts/patch-tester.sh results - Enable clean patches:
./scripts/patch-tester.sh enable-clean - Test build:
./scripts/build-example.sh <base-image>
| Result | Description | Action |
|---|---|---|
| π’ CLEAN | Applies perfectly | Safe to enable |
| π‘ FUZZY | Applies with fuzz | Needs testing |
| π΄ FAILED | Cannot apply | Needs manual update |
| βͺ MISSING | File not found | Check file existence |
Comprehensive patch compatibility testing tool:
./scripts/patch-tester.sh download # Download kernel source
./scripts/patch-tester.sh test # Test all disabled patches
./scripts/patch-tester.sh results # Show formatted results
./scripts/patch-tester.sh enable-clean # Auto-enable safe patches
./scripts/patch-tester.sh enable-fuzzy # Enable risky patchesQuick patch status overview:
./scripts/simple-patch-status.sh # Show current patch statusContainer build script:
./scripts/build-example.sh <base-image> # Build with specific baseThe RPM spec file defines:
- Kernel version (currently 6.15.9)
- Build dependencies
- Patch declarations and applications
- Build configuration
Multi-stage container definition:
- Build environment setup
- Dependency installation
- Kernel compilation
- Image packaging
Automated workflow (.github/workflows/build-and-push.yml):
- Triggers on push to main branch
- Builds with both base images
- Pushes to GitHub Container Registry
- Matrix build for multiple configurations
- Checkout code
- Setup build environment
- Build container images
- Test patch compatibility
- Push successful builds
- Add patch file to repository
- Declare in
linux.spec:Patch####: filename.patch - Apply in
linux.spec:%patch#### -p1 - Test compatibility:
./patch-tester.sh test - Build and verify:
./build-example.sh <base-image>
- Update
Version:inlinux.spec - Test all patches:
./scripts/patch-tester.sh download && ./scripts/patch-tester.sh test - Review compatibility:
./scripts/patch-tester.sh results - Enable compatible patches:
./scripts/patch-tester.sh enable-clean - Test build with new configuration
- Check patch compatibility:
./scripts/patch-tester.sh test - Review build logs from container build
- Verify OSTree compatibility for target environment
- Test individual patches if needed
βββ Containerfile # Multi-stage build definition
βββ linux.spec # RPM spec file
βββ *.patch # Kernel patches
βββ scripts/ # Build and management scripts
β βββ build-example.sh # Container build script
β βββ patch-tester.sh # Patch testing tool
β βββ simple-patch-status.sh # Status overview
βββ justfile # Command runner recipes
βββ .github/workflows/ # CI/CD automation
- Environment Setup: Install build dependencies
- Source Preparation: Download kernel source
- Patch Application: Apply enabled patches
- Compilation: Build kernel with optimizations
- Packaging: Create RPM packages
- Installation: Install into bootc image
- Cleanup: Remove build artifacts
- CPU Management: Intel idle state tweaks, scheduler improvements
- Memory: Allocation scaling, ACPI buffer alignment
- Network: Socket buffer optimization, allocation scaling
- Storage: ATA initialization ordering, filesystem optimizations
- Boot: Initcall optimization, partition scanning improvements
The enabled patches provide improvements in:
- Boot time reduction
- CPU idle power efficiency
- Memory allocation performance
- Network throughput
- I/O responsiveness
Build Failures:
- Check patch compatibility with
./scripts/patch-tester.sh test - Verify all dependencies are installed
- Review OSTree/bootc compatibility
Patch Application Errors:
- Use
./scripts/patch-tester.sh resultsto identify issues - Manually review failed patches
- Update patch files for kernel version compatibility
Container Issues:
- Ensure base image is available
- Check container runtime (podman/docker)
- Verify network connectivity for downloads
This is a community-maintained fork focusing on containerized Clear Linux kernel builds with automated patch management.
Kernel patches maintain their original licenses. Build system and tools are provided under appropriate open source licenses.
Note: This is a community fork of the discontinued Intel Clear Linux kernel project, adapted for modern containerized build environments.