]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commit
u-boot.inc: don't replace the binary with symlink jansa/artifacts
authorMartin Jansa <martin.jansa@gmail.com>
Tue, 21 Nov 2023 20:30:27 +0000 (21:30 +0100)
committerMartin Jansa <martin.jansa@gmail.com>
Fri, 12 Jul 2024 07:36:57 +0000 (09:36 +0200)
commitd1221b899ceb75d045a95aa57ad82314c6a039e2
tree8abe2a60577f3e600a8a6f9600c8bddf3ca6e833
parent4240e7b5cdbc876ab024e06fe8c6972a4d453d72
u-boot.inc: don't replace the binary with symlink

* when UBOOT_ARTIFACT_NAME and UBOOT_ARTIFACT_LINK_NAME are empty
  the UBOOT_BINARYNAME and UBOOT_IMAGE might be indentical and the
  binary gets overwritten by the symlink to itself (similarly for SPL_*)

$ ls -lah /OE/build/poky/build/tmp/work/qemuarm-poky-linux-gnueabi/u-boot/2023.10/package/boot
total 8.0K
drwxr-xr-x 2 martin martin 4.0K Nov 21 21:23 .
drwxr-xr-x 4 martin martin 4.0K Nov 21 21:23 ..
lrwxrwxrwx 1 martin martin    3 Nov 21 21:23 MLO -> MLO
lrwxrwxrwx 1 martin martin   10 Nov 21 21:23 u-boot.bin -> u-boot.bin

* which causes:
ERROR: u-boot-1_2023.10-r0 do_package: Error executing a python function in exec_func_python() autogenerated:

The stack trace of python calls that resulted in this exception/failure was:
File: 'exec_func_python() autogenerated', lineno: 2, function: <module>
     0001:
 *** 0002:do_package(d)
     0003:
File: '/OE/build/poky/meta/classes-global/package.bbclass', lineno: 536, function: do_package
     0532:    bb.build.exec_func("package_prepare_pkgdata", d)
     0533:    bb.build.exec_func("perform_packagecopy", d)
     0534:    for f in (d.getVar('PACKAGE_PREPROCESS_FUNCS') or '').split():
     0535:        bb.build.exec_func(f, d)
 *** 0536:    oe.package.process_split_and_strip_files(d)
     0537:    oe.package.fixup_perms(d)
     0538:
     0539:    ###########################################################################
     0540:    # Split up PKGD into PKGDEST
File: '/OE/build/poky/meta/lib/oe/package.py', lineno: 1073, function: process_split_and_strip_files
     1069:                    staticlibs.append(file)
     1070:                    continue
     1071:
     1072:                try:
 *** 1073:                    ltarget = cpath.realpath(file, dvar, False)
     1074:                    s = cpath.lstat(ltarget)
     1075:                except OSError as e:
     1076:                    (err, strerror) = e.args
     1077:                    if err != errno.ENOENT:
File: '/OE/build/poky/meta/lib/oe/cachedpath.py', lineno: 231, function: realpath
     0227:            if e.errno == errno.ELOOP:
     0228:                # make ELOOP more readable; without catching it, there will
     0229:                # be printed a backtrace with 100s of OSError exceptions
     0230:                # else
 *** 0231:                raise OSError(errno.ELOOP,
     0232:                              "too much recursions while resolving '%s'; loop in '%s'" %
     0233:                              (file, e.strerror))
     0234:
     0235:            raise
Exception: OSError: [Errno 40] too much recursions while resolving '/OE/build/poky/build/tmp/work/qemuarm-poky-linux-gnueabi/u-boot/2023.10/package/boot/MLO'; loop in '/OE/build/poky/build/tmp/work/qemuarm-poky-linux-gnueabi/u-boot/2023.10/package/boot/MLO'

ERROR: Logfile of failure stored in: /OE/build/poky/build/tmp/work/qemuarm-poky-linux-gnueabi/u-boot/2023.10/temp/log.do_package.3990391

[YOCTO #12937]

Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
meta/classes-recipe/uboot-sign.bbclass
meta/recipes-bsp/u-boot/u-boot.inc