Skip to content
This repository has been archived by the owner on Oct 24, 2020. It is now read-only.

Commit

Permalink
builder: add env var to apply extra patches
Browse files Browse the repository at this point in the history
Example:
S1B_EXTRA_KERNEL_PATCH_URLS=https://github.com/kinvolk/linux/commit/5059f528a006dc635c9951b9f586ad6932860fad.patch S1B_KERNEL_VERSION=4.10.6 ./builder
  • Loading branch information
alban committed Mar 27, 2017
1 parent 03b75e2 commit e3d6ed2
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
9 changes: 8 additions & 1 deletion builder
Original file line number Diff line number Diff line change
Expand Up @@ -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
)

Expand Down
4 changes: 4 additions & 0 deletions builder-config
Original file line number Diff line number Diff line change
Expand Up @@ -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:-}"

0 comments on commit e3d6ed2

Please sign in to comment.