简体   繁体   中英

How to specify kernel configuration in my custom linux kernel recipe

I tried to write a custom Linux Kernel recipe for the latest stable kernel

DESCRIPTION = "Latest Stable Linux Kernel"
SECTION = "kernel"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6"

inherit kernel

S = "${WORKDIR}/linux-5.6.15"

SRC_URI =  "https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.6.15.tar.xz;name=kernel" 

SRC_URI[kernel.md5sum] = "41f02b34dbb66ffa6b71bb3e2361e94d"
SRC_URI[kernel.sha256sum] = "65ab799393d490463c610270634874dfcb66440a312837d04b51bbb69323034e"

When i try to build this recipe, i thought it will fail at configuration stage, as there is no.config file provided.

Did i make any mistake? How to specify our configuration file.

kernel.bbclass contains following information in its do_configure task:

# Copy defconfig to .config if .config does not exist. This allows
# recipes to manage the .config themselves in do_configure_prepend().
if [ -f "${WORKDIR}/defconfig" ] && [ ! -f "${B}/.config" ]; then
    cp "${WORKDIR}/defconfig" "${B}/.config"
fi

You need to include your own defconfig in SRC_URI .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM