@@ -214,26 +214,44 @@ jobs:
214214 XZ_OPT="-T0" tar -xf "linux-${FULL_VERSION}.tar.xz" \
215215 -C kernel --strip-components=1
216216
217+ # โโ Patches โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
218+ # MUST run before Configure: the rtl8192eu patch adds new Kconfig
219+ # entries that olddefconfig must see to resolve CONFIG_RTL8192EU.
220+ #
221+ # Cache-aware: a sentinel file (.patches-applied) records the hash of
222+ # the patch set that was applied to this tree. If the restored build
223+ # tree already carries the correct patches (exact or partial cache hit
224+ # with identical PATCHES_HASH) we skip re-application entirely โ
225+ # avoiding "file already exists" / reverse-patch failures.
226+ # When PATCHES_HASH changes the cache key changes too, so a fresh tree
227+ # is extracted and the sentinel will not be present.
228+ - name : Apply patches
229+ working-directory : kernel
230+ run : |
231+ shopt -s nullglob
232+ SENTINEL=".patches-applied"
233+ if [ -f "$SENTINEL" ] && [ "$(cat $SENTINEL)" = "${PATCHES_HASH}" ]; then
234+ echo " โ patches already applied (hash ${PATCHES_HASH}), skipping"
235+ else
236+ for patch in ../patches/*.patch; do
237+ echo " โ applying $(basename "$patch")"
238+ patch -p1 --fuzz=5 < "$patch"
239+ done
240+ echo "${PATCHES_HASH}" > "$SENTINEL"
241+ fi
242+
217243 # โโ Configure โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
218- # LOCALVERSION passed to olddefconfig so it's baked into autoconf.h,
219- # keeping the value consistent across configure + build (ccache needs
220- # the same preprocessed output both times).
244+ # Runs after patches so new Kconfig symbols (e.g. CONFIG_RTL8192EU)
245+ # are visible to olddefconfig and get resolved to their defaults.
246+ # LOCALVERSION passed here so it's baked into autoconf.h, keeping the
247+ # value consistent across configure + build (ccache needs the same
248+ # preprocessed output both times).
221249 - name : Configure kernel
222250 working-directory : kernel
223251 run : |
224252 cp ../hyperion.config .config
225253 make olddefconfig LOCALVERSION="-Hyperion-${HYPERION_VER}"
226254
227- # โโ Patches โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
228- - name : Apply patches
229- working-directory : kernel
230- run : |
231- shopt -s nullglob
232- for patch in ../patches/*.patch; do
233- echo " โ applying $(basename "$patch")"
234- patch -p1 --fuzz=5 < "$patch"
235- done
236-
237255 # โโ Build โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
238256 # -pipe: use pipes instead of temp files between compiler passes
239257 # LOCALVERSION: must match what was passed to olddefconfig above
0 commit comments