Starting with 5.17, the 'auto.conf' file syntax differs from '.config'.
Stop overwriting it, only copy '.config' for older kernels where
'auto.conf' is missing.
Change-Id: I917104c0f43fadfc61f292b0b43d3b4cdc6650b7
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
touch -r "${LINUX_HDROBJ_DIR}/.config" "${LINUX_HDROBJ_DIR}/include/generated/autoconf.h"
# Copy .config to include/config/auto.conf so "make prepare" is unnecessary.
- cp "${LINUX_HDROBJ_DIR}/.config" "${LINUX_HDROBJ_DIR}/include/config/auto.conf"
+ if [ ! -f "${LINUX_HDROBJ_DIR}/include/config/auto.conf" ]; then
+ cp "${LINUX_HDROBJ_DIR}/.config" "${LINUX_HDROBJ_DIR}/include/config/auto.conf"
+ fi
# Finally clean the object files from the full source tree
make clean