Complete module dependency fixes and build improvements
- Implement proper recursive dependency resolution using depmod -av + modinfo -k - Copy configs/init as /sbin/init instead of creating symlink to zinit - Fix validation to check /sbin/init as executable file (not symlink) - Remove automatic cleanup - always preserve build artifacts for incremental builds - Module resolution now finds missing core modules: virtio.ko, virtio_ring.ko, nvme-core - Recursive resolution verified: nvme→nvme-core, virtio_scsi→5 dependencies - Final chroot depmod creates proper module database for boot-time loading
This commit is contained in:
@@ -358,11 +358,6 @@ function main_build_process() {
|
||||
fi
|
||||
}
|
||||
|
||||
# Keep all build artifacts by default for incremental builds and debugging
|
||||
function cleanup_build_artifacts() {
|
||||
log_info "Build artifacts preserved for incremental builds"
|
||||
log_info "Use ./scripts/clean.sh to manually clean artifacts when needed"
|
||||
}
|
||||
|
||||
# Main function
|
||||
function main() {
|
||||
@@ -416,8 +411,6 @@ function main() {
|
||||
return 1
|
||||
fi
|
||||
|
||||
# Always preserve artifacts for incremental builds
|
||||
cleanup_build_artifacts
|
||||
|
||||
section_header "Zero OS Build Complete"
|
||||
log_info "Ready to deploy Zero OS with Alpine Linux and zinit"
|
||||
|
||||
@@ -558,17 +558,17 @@ function initramfs_validate() {
|
||||
((errors++))
|
||||
fi
|
||||
|
||||
# Check that /sbin/init is properly linked to zinit
|
||||
if [[ -L "${initramfs_dir}/sbin/init" ]]; then
|
||||
local link_target=$(readlink "${initramfs_dir}/sbin/init")
|
||||
if [[ "$link_target" == "zinit" ]]; then
|
||||
log_info "✓ /sbin/init correctly linked to zinit"
|
||||
# Check that /sbin/init is configs/init script (not symlink)
|
||||
if [[ -f "${initramfs_dir}/sbin/init" && -x "${initramfs_dir}/sbin/init" ]]; then
|
||||
# Verify it's the configs/init script by checking content
|
||||
if grep -q "ZERO-OS ALPINE INITRAMFS" "${initramfs_dir}/sbin/init" 2>/dev/null; then
|
||||
log_info "✓ /sbin/init is configs/init script"
|
||||
else
|
||||
log_error "✗ /sbin/init linked to wrong target: ${link_target}"
|
||||
log_error "✗ /sbin/init is not configs/init script"
|
||||
((errors++))
|
||||
fi
|
||||
else
|
||||
log_error "✗ /sbin/init is not a symbolic link"
|
||||
log_error "✗ /sbin/init is missing or not executable"
|
||||
((errors++))
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user