From fbbe093a4d07ee6b6370101f5161c0eef2865e50 Mon Sep 17 00:00:00 2001 From: Saya Andy Date: Mon, 7 Sep 2026 04:46:01 +0700 Subject: feat: add local patches for fixing libcamera color pattern issue + iris decoder sign misfit --- make-sources.sh | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) (limited to 'make-sources.sh') diff --git a/make-sources.sh b/make-sources.sh index b4abb4b..7271bf8 100755 --- a/make-sources.sh +++ b/make-sources.sh @@ -3,8 +3,9 @@ # Assemble the rpmbuild sources for kernel-surface.spec: # # * kernel-surface-patches--.tar.gz, built from the -# overlay submodule's sys-kernel/vanilla-kernel/files directories listed in -# patch-order.txt +# directories listed in patch-order.txt: bare names come from the overlay +# submodule's sys-kernel/vanilla-kernel/files, "local:" ones from this +# repository's patches/ # * the upstream kernel tarball # * the base kernel config and the fragments from config/ # @@ -32,6 +33,7 @@ spec="${script_dir}/kernel-surface.spec" order_file="${script_dir}/patch-order.txt" overlay_dir=${OVERLAY_DIR:-${script_dir}/overlay} patch_root="${overlay_dir}/sys-kernel/vanilla-kernel/files" +local_patch_root="${script_dir}/patches" output_dir="" skip_download=false @@ -95,7 +97,19 @@ while read -r dir; do dir=${dir//[[:space:]]/} [[ -n ${dir} ]] || continue - src="${patch_root}/${dir}" + # "local:foo" is patches/foo in this repository, "foo" is the overlay's + # files/foo. The staging name keeps the prefix so the tarball, and the + # spec's "Applying ..." log, say where each patch came from. + if [[ ${dir} == local:* ]]; then + name=${dir#local:} + src="${local_patch_root}/${name}" + label="local-${name}" + else + name=${dir} + src="${patch_root}/${name}" + label=${name} + fi + if [[ ! -d ${src} ]]; then echo "ERROR: ${src} does not exist (listed in patch-order.txt)" >&2 exit 1 @@ -107,11 +121,11 @@ while read -r dir; do exit 1 fi - dest=$(printf '%s/patches/%02d-%s' "${staging}" "${index}" "${dir}") + dest=$(printf '%s/patches/%02d-%s' "${staging}" "${index}" "${label}") mkdir -p "${dest}" cp "${src}"/*.patch "${dest}/" - printf ' %02d %-12s %2d patches\n' "${index}" "${dir}" "${count}" + printf ' %02d %-18s %2d patches\n' "${index}" "${label}" "${count}" index=$((index + 1)) total=$((total + count)) done < "${order_file}" -- cgit v1.3.1+17