环境
OpenBMC 2.6
linux-aspeed 4.19.29
步骤
修改meta-aspeed/recipes-kernel/linux/linux-aspeed.inc文件,原内容如下
DESCRIPTION = "Linux kernel for Aspeed"
SECTION = "kernel"
LICENSE = "GPLv2"
PROVIDES += "virtual/kernel"
KCONFIG_MODE="--alldefconfig"
KSRC ?= "git://github.com/openbmc/linux;protocol=git;branch=${KBRANCH}"
SRC_URI = "${KSRC}"
SRC_URI += " file://defconfig"
FILESEXTRAPATHS_prepend_ast2400 := "${THISDIR}/ast2400:"
FILESEXTRAPATHS_prepend_ast2500 := "${THISDIR}/ast2500:"
LINUX_VERSION_EXTENSION ?= "-${SRCREV}"
PV = "${LINUX_VERSION}+git${SRCPV}"
inherit kernel
require recipes-kernel/linux/linux-yocto.inc
# From 4.16+ the COPYING file changed
LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814"
根据实际情况修改为
DESCRIPTION = "Linux kernel for Aspeed"
SECTION = "kernel"
LICENSE = "GPLv2"
PROVIDES += "virtual/kernel"
KCONFIG_MODE="--alldefconfig"
KSRC ?= "git:///home/openbmc/linux-aspeed;protocol=file;branch=${KBRANCH}"
SRC_URI = "${KSRC}"
SRC_URI += " file://defconfig"
FILESEXTRAPATHS_prepend_ast2400 := "${THISDIR}/ast2400:"
FILESEXTRAPATHS_prepend_ast2500 := "${THISDIR}/ast2500:"
LINUX_VERSION_EXTENSION ?= "-${SRCREV}"
PV = "${LINUX_VERSION}+git${SRCPV}"
inherit kernel
require recipes-kernel/linux/linux-yocto.inc
# From 4.16+ the COPYING file changed
LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814"
主要修改了变量KSRC
然后修改meta-aspeed/recipes-kernel/linux/linux-aspeed_git.bb文件,原文件内容如下,
KBRANCH ?= "dev-4.19"
LINUX_VERSION ?= "4.19.16"
SRCREV="bbc22aa2953e0330ec9b43f1b866a59ec53fa884"
require linux-aspeed.inc
根据实际情况修改为
KBRANCH ?= "dev-4.19"
LINUX_VERSION ?= "4.19.29"
SRCREV="3c1570964744df5fa843e33c0f78b8f04cba96c3"
# SRCREV="${AUTOREV}" 自动获取commit id
require linux-aspeed.inc
这里主要修改了变量LINUX_VERSION和SRCREV,LINUX_VERSION为Linux内核版本号,SRCREV为Git仓库的commmit ID。