Skip to content

Commit

Permalink
Build kernel for images based on Alpine for NanoPi NEO Plus2
Browse files Browse the repository at this point in the history
  • Loading branch information
eugulixes authored and denismosolov committed Aug 31, 2019
1 parent b8e5d80 commit 96ee245
Show file tree
Hide file tree
Showing 8 changed files with 17,062 additions and 10 deletions.
21 changes: 17 additions & 4 deletions bootstrap/13-kernel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,26 @@ for var in OS SOURCE_DIR; do
check_if_variable_is_set ${var}
done

kernel_package="`get_attr ${OS} kernel package`"

info "installing kernel package"
build_script="$(get_attr_or_nothing ${OS} kernel build_script)"
kernel_package="$(get_attr_or_nothing ${OS} kernel package)"

run_scripts ${SOURCE_DIR}/pre-kernel-installation

install_packages ${kernel_package}
if [[ ! -z "${build_script}" ]]; then
info "building and installing kernel from source code"

cp "${SOURCE_DIR}/${build_script}" "${R}"

chroot_exec sh "${build_script}"

rm "${R}/${build_script}"
elif [[ ! -z ${kernel_package} ]]; then
info "installing kernel package"

install_packages ${kernel_package}
else
info "skipping kernel installation because neither build_script nor package was specified in pieman.yml"
fi

run_scripts ${SOURCE_DIR}/post-kernel-installation

Expand Down
Loading

0 comments on commit 96ee245

Please sign in to comment.