feat: Add firmware installation and module dependency resolution

- Add Alpine firmware package installation support
- Implement recursive module dependency resolution using modinfo
- Add config/firmware.conf for NIC firmware selection
- Enhanced initramfs_setup_modules with dependency tracking
- Firmware installation integrated into main build process

Features:
- Automatic dependency resolution for kernel modules
- Alpine's separate firmware APK packages for optimal size
- Stage1/Stage2 module loading with complete dependencies
- No duplicate modules between stages
This commit is contained in:
2025-08-31 12:43:10 +02:00
parent 860b9aa161
commit 041ad29a70
4 changed files with 283 additions and 15 deletions

View File

@@ -35,6 +35,7 @@ PACKAGES_LIST="${CONFIG_DIR}/packages.list"
SOURCES_CONF="${CONFIG_DIR}/sources.conf"
MODULES_CONF="${CONFIG_DIR}/modules.conf"
KERNEL_CONFIG="${CONFIG_DIR}/kernel.config"
FIRMWARE_CONF="${CONFIG_DIR}/firmware.conf"
ZINIT_CONFIG_DIR="${CONFIG_DIR}/zinit"
# Build options
@@ -147,6 +148,7 @@ function verify_configuration_files() {
"$SOURCES_CONF"
"$MODULES_CONF"
"$KERNEL_CONFIG"
"$FIRMWARE_CONF"
)
local missing_configs=()
@@ -193,6 +195,9 @@ function main_build_process() {
# Phase 3: Install Alpine packages (NO OpenRC)
alpine_install_packages "$INSTALL_DIR" "$PACKAGES_LIST"
# Phase 3.5: Install firmware packages for hardware support
alpine_install_firmware "$INSTALL_DIR" "$FIRMWARE_CONF"
# Phase 4: Build and install ThreeFold components
components_parse_sources_conf "$SOURCES_CONF" "$COMPONENTS_DIR"