"bitbake virtual/kernel -c devshell" fails with "copy_data() is not defined"

To answer my own question: Found an answer here
[Yocto BSP 6.0.0] Issue with toradex-sanity - Technical Support - Toradex Community
Just replaced the offending line as suggested.