diff --git a/builder b/builder index c9d275b..493853f 100755 --- a/builder +++ b/builder @@ -86,7 +86,14 @@ test -f "${kernel_bzimage}" || cd "${kernel_source_dir}" curl -LsS "${kernel_reboot_patch_url}" -O # TODO(schu) fails when patch was applied already - patch --silent -p1 < *.patch + patch --silent -p1 < $(basename "${kernel_reboot_patch_url}") + for patch_url in ${S1B_EXTRA_KERNEL_PATCH_URLS} ; do + curl -LsS "${patch_url}" -O + patch --silent -p1 < $(basename "${patch_url}") + done + for patch_file in ${S1B_EXTRA_KERNEL_PATCH_FILES} ; do + patch --silent -p1 < "${patch_file}" + done ${mk} bzImage ) diff --git a/builder-config b/builder-config index 1e21025..550af0d 100644 --- a/builder-config +++ b/builder-config @@ -24,3 +24,7 @@ S1B_BUILD_DIR="${S1B_BUILD_DIR:-${DIR}/build/${S1B_KERNEL_VERSION}}" # The directory to store the aci contents (manifest, rootfs) in S1B_ACI_DIR="${S1B_ACI_DIR:-${DIR}/aci/${S1B_KERNEL_VERSION}}" + +# Optional extra kernel patches to apply +S1B_EXTRA_KERNEL_PATCH_FILES="${S1B_EXTRA_KERNEL_PATCH_FILES:-}" +S1B_EXTRA_KERNEL_PATCH_URLS="${S1B_EXTRA_KERNEL_PATCH_URLS:-}"