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

@@ -55,8 +55,8 @@ function safe_execute() {
local cmd="$*"
log_info "Executing: ${cmd}"
if [[ "${DEBUG:-0}" == "1" ]]; then
# In debug mode, show all output
if [[ "${DEBUG:-0}" == "1" ]] || in_container; then
# In debug mode or container, show all output for visibility
if ! ${cmd}; then
log_error "Command failed: ${cmd}"
exit 1
@@ -68,6 +68,9 @@ function safe_execute() {
log_error "Command failed: ${cmd}"
log_error "Output: ${output}"
exit 1
else
# Show minimal progress indicator for non-debug mode
log_debug "Command completed successfully: ${cmd}"
fi
fi
}