【发布时间】:2016-10-12 08:41:35
【问题描述】:
我目前正在尝试使用 yocto (jethro) 编译内核。内核一可以从这里获取(commit 4561d2504e8ea562674070350d27c19357f0d7f0)
git clone --depth 1 --branch pine64-hacks-1.2 --single-branch https://github.com/longsleep/linux-pine64.git linux-pine64
我尝试编译它,它是成功的,但是将它集成到yocto系统中会产生编译错误。查看日志,可能会认为某些模块不起作用,但如果未集成到 Yocto 中,它们可以编译。当然,尚未设置参数,我只是不知道如何在 yocto 中继续进行类似的行为。 日志的某些部分可以帮助理解。
+ oe_runmake Image CC=aarch64-poky-linux-gcc -fuse-ld=bfd --sysroot=/home/dbensoussan/new_poky/poky/build/tmp/sysroots/pine64 LD=aarch64-poky-linux-ld.bfd --sysroot=/home/dbensoussan/new_poky/poky/build/tmp/sysroots/pine64
+ bbnote make -j 8 Image CC=aarch64-poky-linux-gcc -fuse-ld=bfd --sysroot=/home/dbensoussan/new_poky/poky/build/tmp/sysroots/pine64 LD=aarch64-poky-linux-ld.bfd --sysroot=/home/dbensoussan/new_poky/poky/build/tmp/sysroots/pine64
+ printf %b\0 bbnote make -j 8 Image CC=aarch64-poky-linux-gcc -fuse-ld=bfd --sysroot=/home/dbensoussan/new_poky/poky/build/tmp/sysroots/pine64 LD=aarch64-poky-linux-ld.bfd --sysroot=/home/dbensoussan/new_poky/poky/build/tmp/sysroots/pine64
+ make -j 8 Image CC=aarch64-poky-linux-gcc -fuse-ld=bfd --sysroot=/home/dbensoussan/new_poky/poky/build/tmp/sysroots/pine64 LD=aarch64-poky-linux-ld.bfd --sysroot=/home/dbensoussan/new_poky/poky/build/tmp/sysroots/pine64
GEN /home/dbensoussan/new_poky/poky/build/tmp/work/pine64-poky-linux/linux-pine64/3.10-r0/linux-pine64-standard-build/Makefile
scripts/kconfig/conf --silentoldconfig Kconfig
以下是警告:
drivers/net/wireless/bcmdhd/Kconfig:50:warning: defaults for choice values not supported
warning: (COMPAT) selects COMPAT_BINFMT_ELF which has unmet direct dependencies (COMPAT && BINFMT_ELF)
GEN /home/dbensoussan/new_poky/poky/build/tmp/work/pine64-poky-linux/linux-pine64/3.10-r0/linux-pine64-standard-build/Makefile
/home/dbensoussan/new_poky/poky/build/tmp/work-shared/pine64/kernel-source/scripts/dtc/updatetree.c: In function 'sunxi_dt_init_pinconf_prop':
/home/dbensoussan/new_poky/poky/build/tmp/work-shared/pine64/kernel-source/scripts/dtc/updatetree.c: In function 'sunxi_dt_init_pinconf_prop':
/home/dbensoussan/new_poky/poky/build/tmp/work-shared/pine64/kernel-source/scripts/dtc/updatetree.c:149:8: warning: variable 'propend' set but not used [-Wunused-but-set-variable]
void *propend;
/home/dbensoussan/new_poky/poky/build/tmp/work-shared/pine64/kernel-source/scripts/dtc/updatetree.c:306:9: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
int i, ret, len, gpio_value[4], phandle, phandle_count;
GEN usr/initramfs_data.cpio
In file included from /home/dbensoussan/new_poky/poky/build/tmp/work-shared/pine64/kernel-source/include/linux/memcontrol.h:22:0,
from /home/dbensoussan/new_poky/poky/build/tmp/work-shared/pine64/kernel-source/include/linux/swap.h:8,
from /home/dbensoussan/new_poky/poky/build/tmp/work-shared/pine64/kernel-source/include/linux/suspend.h:4,
from /home/dbensoussan/new_poky/poky/build/tmp/work-shared/pine64/kernel-source/init/do_mounts.c:16:
/home/dbensoussan/new_poky/poky/build/tmp/work-shared/pine64/kernel-source/include/linux/cgroup.h:907:18: warning: 'struct cgroup_taskset' declared inside parameter list
struct cgroup_taskset *tset)
很多cgroup警告紧随其后并以错误结束并结束编译:
/home/dbensoussan/new_poky/poky/build/tmp/work-shared/pine64/kernel-source/security/apparmor/lsm.c:1293:29: error: 'CONFIG_SECURITY_APPARMOR_UNCONFINED_INIT' undeclared here (not in a function)
bool aa_g_unconfined_init = CONFIG_SECURITY_APPARMOR_UNCONFINED_INIT;
我的内核配方是:
require recipes-kernel/linux/linux-yocto.inc
DESCRIPTION = "Linux kernel for Allwinner a64 processors"
COMPATIBLE_MACHINE = "pine64"
LINUX_VERSION ?= "3.10"
PV = "${LINUX_VERSION}"
SRCREV_pn-${PN} = "6c0b852b9ab4688534c8e978d2d55cf8a26cbd05"
KERNEL_DEVICETREE ?= " \
allwinner/sun50i-a64-pine64.dtb \
allwinner/sun50i-a64-pine64-plus.dtb \
"
KERNEL_IMAGETYPE="Image"
KERNEL_DEFCONFIG_pine64 ?= "defconfig"
DEPENDS_aarch64 += "libgcc"
SRC_URI += "git://github.com/apritzel/linux.git;protocol=git;branch=a64-v4 \
file://defconfig \
"
S = "${WORKDIR}/git"
do_kernel_configme_prepend() {
echo "new custom config install"
install -m 0644 ${S}/arch/${ARCH}/configs/${KERNEL_DEFCONFIG} ${WORKDIR}/defconfig || die "No default configuration for ${MACHINE} / ${KERNEL_DEFCONFIG} available."
}
【问题讨论】:
标签: linux-kernel yocto bitbake