[meta-xilinx] Issue on Morty Branch - 'Devtool modify virtual/kernel' fails to find files while creating workspace.
Nathan Rossi
nathan at nathanrossi.com
Mon Mar 13 06:59:07 PDT 2017
On 8 March 2017 at 06:11, James Masco <masco.james at gmail.com> wrote:
> Running 'devtool modify virtual/kernel' should provide a workspace in which
> modifications can be made to the kernel source and generate patches from
> those changes, however the linux-xlnx kernel recipe fails to create a valid
> workspace:
>
> $ devtool modify virtual/kernel
> Parsing recipes..done.
> NOTE: Mapping virtual/kernel to linux-xlnx
> Parsing recipes..done.
> NOTE: Fetching linux-xlnx...
> NOTE: Unpacking...
> NOTE: Doing kernel checkout...
> NOTE: Patching...
> NOTE: Executing do_validate_branches...
> NOTE: Executing do_kernel_metadata...
> ERROR. input file "bsp/xilinx/soc/linux-xlnx/drivers/xilinx.scc" does not
> exist
> ERROR: could not process input files:
> bsp/xilinx/soc/linux-xlnx/drivers/xilinx.scc
> bsp/xilinx/soc/linux-xlnx/drivers/zynq7.scc
> See /tmp/tmp.EytDZHqgX4 for details
> ERROR: Could not generate configuration queue for zynq.
> ERROR: Function failed: do_kernel_metadata
>
> Seems the "linux-xlnx.inc" isn't including the full path to the
> configuration files located in recipes-kernel/linux/config
Unfortunately this is a bug with devtool (and or kernel-yocto.bbclass)
and not with the meta-xilinx metadata.
The issue is that meta-xilinx provides kmeta files locally from the
meta-xilinx layer. Devtool makes some assumptions about files provided
by the layer not being needed during source extraction process,
however for the kernel it also assumes it can just run the configure
task whilst not allowing the workdir to have these files. I am not
very familiar with devtool so I am not sure how to fix this properly,
however a change like below (which is for master not morty) solves the
problem.
Regards,
Nathan
diff --git a/scripts/lib/devtool/standard.py b/scripts/lib/devtool/standard.py
index 5bd498c933..9e3b4013fc 100644
--- a/scripts/lib/devtool/standard.py
+++ b/scripts/lib/devtool/standard.py
@@ -609,6 +609,15 @@ def _extract_source(srctree, keep_temp,
devbranch, sync, d, tinfoil):
(stdout, _) = bb.process.run('git rev-parse HEAD', cwd=srcsubdir)
initial_rev = stdout.rstrip()
+ if bb.data.inherits_class('kernel-yocto', d):
+ # symlink the local files back into the temp workdir. This is
+ # needed for kernel-yocto feature dirs, which are local files used
+ # from WORKDIR during patch and configure tasks.
+ if local_files:
+ for fname in local_files:
+ os.symlink(os.path.join(tempdir, 'oe-local-files', fname),
+ os.path.join(workdir, fname))
+
logger.info('Patching...')
runtask(fn, 'patch')
More information about the meta-xilinx
mailing list