From 992db48081ea066dc8f17464e6f1413e52e6962e Mon Sep 17 00:00:00 2001 From: John Klug Date: Wed, 8 Nov 2017 10:04:26 -0600 Subject: Fix rs9113 patch for binary blobs --- recipes-kernel/rs9113/rs9113-from-src_1.5.6.bb | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'recipes-kernel') diff --git a/recipes-kernel/rs9113/rs9113-from-src_1.5.6.bb b/recipes-kernel/rs9113/rs9113-from-src_1.5.6.bb index 0f05e82..a4867ec 100644 --- a/recipes-kernel/rs9113/rs9113-from-src_1.5.6.bb +++ b/recipes-kernel/rs9113/rs9113-from-src_1.5.6.bb @@ -56,13 +56,16 @@ do_patch () { cd ${WORKDIR}/git echo "patches" ${M}/patches/* for f in ${M}/patches/* ; do - # If no patches, * is not expanded. - # Do not try to use "*" as a patch file. - if ! [[ -r ${f} ]] ; then - continue - fi - echo "Patching with ${f}" - patch -p1 < ${f} + # Cannot use [[ $f =~ \.patch$ ]] here because the $ after patch breaks the recipe. + if echo ${f} | grep '\.patch$' >/dev/null 2>&1 ; then + echo found patch ${f} + patch -Np1 < ${f} + else + fname=$(basename ${f}) + oldf=$(find . -name ${fname}) + echo "copying $f to ${oldf}" + cp ${f} ${oldf} + fi done } -- cgit v1.2.3