diff options
author | Joel Stanley <joel@jms.id.au> | 2023-08-04 12:06:10 -0500 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-08-10 09:18:54 +0100 |
commit | b40619a5b3a2efd2d540b0101e47781a643a0b7a (patch) | |
tree | 112f8bfde258dcbbe5cc4bb944352b99ee25b88b /meta | |
parent | b06d0238c78a6f959a02d1dee192f5357547b8d5 (diff) | |
download | poky-b40619a5b3a2efd2d540b0101e47781a643a0b7a.tar.gz |
kernel: don't fail if Modules.symvers doesn't exist
Kernels that do not use modules do not have the Modules.symvers file,
which causes the previous one-liner to fail. Invert the logic so that
the absence of the Modules.symvers is a passing situation but we still
get failure checking on the install operation.
(From OE-Core rev: 856c916ffbf3438d8cf5d8bed344473bde03b56e)
Signed-off-by: Joel Stanley <joel@jms.id.au>
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/classes-recipe/kernel.bbclass | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/meta/classes-recipe/kernel.bbclass b/meta/classes-recipe/kernel.bbclass index 247ef4a48a..bb5995b495 100644 --- a/meta/classes-recipe/kernel.bbclass +++ b/meta/classes-recipe/kernel.bbclass | |||
@@ -486,7 +486,7 @@ kernel_do_install() { | |||
486 | install -m 0644 System.map ${D}/${KERNEL_IMAGEDEST}/System.map-${KERNEL_VERSION} | 486 | install -m 0644 System.map ${D}/${KERNEL_IMAGEDEST}/System.map-${KERNEL_VERSION} |
487 | install -m 0644 .config ${D}/${KERNEL_IMAGEDEST}/config-${KERNEL_VERSION} | 487 | install -m 0644 .config ${D}/${KERNEL_IMAGEDEST}/config-${KERNEL_VERSION} |
488 | install -m 0644 vmlinux ${D}/${KERNEL_IMAGEDEST}/vmlinux-${KERNEL_VERSION} | 488 | install -m 0644 vmlinux ${D}/${KERNEL_IMAGEDEST}/vmlinux-${KERNEL_VERSION} |
489 | [ -e Module.symvers ] && install -m 0644 Module.symvers ${D}/${KERNEL_IMAGEDEST}/Module.symvers-${KERNEL_VERSION} | 489 | ! [ -e Module.symvers ] || install -m 0644 Module.symvers ${D}/${KERNEL_IMAGEDEST}/Module.symvers-${KERNEL_VERSION} |
490 | } | 490 | } |
491 | 491 | ||
492 | # Must be ran no earlier than after do_kernel_checkout or else Makefile won't be in ${S}/Makefile | 492 | # Must be ran no earlier than after do_kernel_checkout or else Makefile won't be in ${S}/Makefile |
@@ -555,7 +555,7 @@ do_shared_workdir () { | |||
555 | 555 | ||
556 | # Copy files required for module builds | 556 | # Copy files required for module builds |
557 | cp System.map $kerneldir/System.map-${KERNEL_VERSION} | 557 | cp System.map $kerneldir/System.map-${KERNEL_VERSION} |
558 | [ -e Module.symvers ] && cp Module.symvers $kerneldir/ | 558 | ! [ -e Module.symvers ] || cp Module.symvers $kerneldir/ |
559 | cp .config $kerneldir/ | 559 | cp .config $kerneldir/ |
560 | mkdir -p $kerneldir/include/config | 560 | mkdir -p $kerneldir/include/config |
561 | cp include/config/kernel.release $kerneldir/include/config/kernel.release | 561 | cp include/config/kernel.release $kerneldir/include/config/kernel.release |