OpenBMC配置编译本地内核文件

环境

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。

评论 9
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值