Bug 13614

Summary: devtool modify virtual/kernel fails with qemuarm
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Paul Eggleton <bluelightning>
Component: Scripts and ToolsAssignee: Paul Eggleton <bluelightning>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Undecided CC: richard.purdie, ross.burton
Version: unspecified   
Target Milestone: ---   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description Paul Eggleton 2019-10-30 21:43:58 UTC
If you have MACHINE set to qemuarm and then run devtool modify virtual/kernel  you get the following error:

----------- snip -----------
INFO: Copying kernel config to workspace
Traceback (most recent call last):
  File "/data/poky/scripts/devtool", line 334, in <module>
    ret = main()
  File "/data/poky/scripts/devtool", line 321, in main
    ret = args.func(args, config, basepath, workspace)
  File "/data/poky/scripts/lib/devtool/standard.py", line 844, in modify
    shutil.copy2(os.path.join(kconfpath, '.config'),srctree)
  File "/usr/lib/python3.6/shutil.py", line 257, in copy2
    copyfile(src, dst, follow_symlinks=follow_symlinks)
  File "/usr/lib/python3.6/shutil.py", line 120, in copyfile
    with open(src, 'rb') as fsrc:
FileNotFoundError: [Errno 2] No such file or directory: '/data/poky/build/tmp/work/qemuarm-poky-linux-gnueabi/linux-yocto/5.2.17+gitAUTOINC+b867b78b50_255a750d28-r0/linux-qemuarm-standard-build/.config'
----------- snip -----------

The actual workdir is at /data/poky/build/tmp/work/qemuarm-poky-linux-gnueabi/linux-yocto/5.2.17+gitAUTOINC+b867b78b50_47b80ef7bd-r0/ so it's using the wrong SRCREV. The same thing works fine with MACHINE = "qemux86", so I suspect that it's using the generic SRCREV rather than the one for the machine, given that qemuarm has its own custom value (see meta/recipes-kernel/linux/linux-yocto_5.2.bb) whereas qemux86 uses the same hash as the generic SRCREV.