]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
kernel-yocto: move the cp of ${KBUILD_DEFCONFIG} file outside if body
authorSlawomir Stepien <sst@poczta.fm>
Sun, 26 Jan 2025 13:34:19 +0000 (14:34 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 27 Jan 2025 15:47:06 +0000 (15:47 +0000)
In both true/false cases, we will cp the file, so move the invocation
after the if body.

In addition, misleading comment has been removed.

Signed-off-by: Slawomir Stepien <sst@poczta.fm>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes-recipe/kernel-yocto.bbclass

index c45abf6ddc3dff44ab8e069872301052f839302a..cef6b9ec3fac12a3de08646f5ed6b0b1ac05c8b4 100644 (file)
@@ -150,10 +150,6 @@ do_kernel_metadata() {
        # from the source tree, into a common location and normalized "defconfig" name,
        # where the rest of the process will include and incoroporate it into the build
        #
-       # If the fetcher has already placed a defconfig in UNPACKDIR (from the SRC_URI),
-       # we don't overwrite it, but instead warn the user that SRC_URI defconfigs take
-       # precendence.
-       #
        if [ -n "${KBUILD_DEFCONFIG}" ]; then
                if [ -f "${S}/arch/${ARCH}/configs/${KBUILD_DEFCONFIG}" ]; then
                        if [ -f "${UNPACKDIR}/defconfig" ]; then
@@ -163,10 +159,8 @@ do_kernel_metadata() {
                                if [ $? -ne 0 ]; then
                                        bbdebug 1 "detected SRC_URI or patched defconfig in UNPACKDIR. ${KBUILD_DEFCONFIG} copied over it"
                                fi
-                               cp -f ${S}/arch/${ARCH}/configs/${KBUILD_DEFCONFIG} ${UNPACKDIR}/defconfig
-                       else
-                               cp -f ${S}/arch/${ARCH}/configs/${KBUILD_DEFCONFIG} ${UNPACKDIR}/defconfig
                        fi
+                       cp -f ${S}/arch/${ARCH}/configs/${KBUILD_DEFCONFIG} ${UNPACKDIR}/defconfig
                        in_tree_defconfig="${UNPACKDIR}/defconfig"
                else
                        bbfatal "A KBUILD_DEFCONFIG '${KBUILD_DEFCONFIG}' was specified, but not present in the source tree (${S}/arch/${ARCH}/configs/)"