fix: major build system improvements and container output issues

- Fix container output visibility with proper TTY handling and debug mode
- Fix build order: kernel modules built before initramfs creation
- Implement two-stage kernel build to resolve chicken-and-egg dependency
- Fix sed command issues in kernel configuration with direct execution
- Add diffutils package to container for proper kernel build support
- Enhance NIC module/firmware correlation with intelligent selection
- Fix module staging logic: all NICs loaded in stage1 before network up
- Add smart firmware installation based on module requirements
- Create comprehensive function documentation (scripts/functionlist.md)
- Add debug container script for troubleshooting

Major fixes:
* Container builds now show real-time output
* Kernel builds work with proper GNU diff support
* Module/firmware selection optimized for common hardware
* Build process handles dependencies correctly
* Documentation provides complete function reference
This commit is contained in:
2025-09-03 14:06:44 +02:00
parent 6d44575860
commit b9f94105cf
23 changed files with 1072 additions and 4310 deletions

View File

@@ -165,9 +165,27 @@ function docker_run_build() {
log_info "Executing build command in container: ${build_command}"
# Pass through environment variables for proper logging
local env_args=""
local env_vars=(
"DEBUG"
"ALPINE_VERSION"
"KERNEL_VERSION"
"RUST_TARGET"
"OPTIMIZATION_LEVEL"
)
for var in "${env_vars[@]}"; do
if [[ -n "${!var:-}" ]]; then
env_args="${env_args} -e ${var}=${!var}"
fi
done
# Run with privileged access for chroot mounts and system operations
log_info "Container environment: ${env_args}"
safe_execute ${CONTAINER_RUNTIME} run --rm \
--privileged \
${env_args} \
-v "${PROJECT_ROOT}:/workspace" \
-w /workspace \
"${image}" \