Skip to content

Commit

Permalink
build: Load modules into dist
Browse files Browse the repository at this point in the history
Signed-off-by: Saalim Quadri <[email protected]>
  • Loading branch information
danascape committed Oct 25, 2023
1 parent 08d7b34 commit aa7a98b
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,16 @@ kernel_build()
dist_path="out/dist"
log_info "sworkflow: Copying the contents into dist"
kernel_image_path="out/arch/$device_arch/boot/$kernel_image_name"
cp "$kernel_image_path" $dist_path
cp "$kernel_image_path" $
if [[ -n "$do_modules" ]]; then
log_info "sworkflow: Copying modules"
mkdir out/dist/modules
cp $(find out/modules/lib/modules/* -name '*.ko') $dist_path/modules/
cp out/modules/lib/modules/*/modules.{alias,dep,softdep} $dist_path/modules
cp out/modules/lib/modules/*/modules.order $dist_path/modules/modules.load
sed -i 's/\(kernel\/[^: ]*\/\)\([^: ]*\.ko\)/\/vendor\/lib\/modules\/\2/g' $dist_path/modules/modules.dep
sed -i 's/.*\///g' $dist_path/modules/modules.load
fi
fi
else
log_error "error: Define $kernel_image_name to create dist"
Expand Down

0 comments on commit aa7a98b

Please sign in to comment.