为特定内核(不是正在运行的内核)编译 Linux V4L-DVB media_build

为特定内核(不是正在运行的内核)编译 Linux V4L-DVB media_build

是否可以编译LinuxTV.org V4L-DVB media_build对于包含在特定路径中的内核源代码,而不是正在运行的内核源代码(即不同的版本)?

我有内核源代码以及/root/mytest/linux-3.12.6(vanilla)和内核配置/root/mytest/linux-3.12.6/.config但我无法找到办法告诉。/建造脚本就在那里。

例如:

# make tar DIR=/root/mytest/linux-3.12.6

失败,因为找不到某些文件:

tar: mm/frame_vector.c: Cannot stat: No such file or directory
tar: include/linux/fence.h: Cannot stat: No such file or directory
tar: include/linux/of_graph.h: Cannot stat: No such file or directory
tar: include/linux/dma/xilinx_dma.h: Cannot stat: No such file or directory
tar: include/trace/events/v4l2.h: Cannot stat: No such file or directory
tar: include/trace/events/vb2.h: Cannot stat: No such file or directory
tar: include/uapi/linux/lirc.h: Cannot stat: No such file or directory
tar: include/uapi/linux/media-bus-format.h: Cannot stat: No such file or directory
tar: include/uapi/linux/vsp1.h: Cannot stat: No such file or directory
tar: include/uapi/linux/xilinx-v4l2-controls.h: Cannot stat: No such file or directory
tar: include/uapi/linux/smiapp.h: Cannot stat: No such file or directory
tar: Error exit delayed from previous errors
make: *** [tar] Error 2

答案1

解决方案很简单,但并没有得到很好的“公开”;我在一个可用的讨论中找到了它这里基本上,首先你必须在自己的路径中构建内核(使用make allmodconfigmake init),然后在媒体构建, 你跑:

# make release DIR=/root/mytest/linux-3.12.6

make -C /root/mytest/media_build/v4l release
make[1]: Entering directory `/root/mtest/media_build/v4l'
Searching in /root/mytest/linux-3.12.6/Makefile for kernel version.
Forcing compiling to version 3.12.6
make[1]: Leaving directory `/root/mytest/media_build/v4l'

# ./build

正如你所见,它从你指定的路径中获取正确的内核版本目录转变。

相关内容