mirror of
https://git.yoctoproject.org/meta-raspberrypi
synced 2026-05-08 05:09:17 +00:00
linux-raspberrypi: Change to Linux Yocto style kernel recipes
Yocto style recipes provide support for application of kernel configuration fragments which is achieved with this change. For further details see the Yocto Linux Kernel Development Manual ref: http://www.yoctoproject.org/docs/1.6/kernel-dev/kernel-dev.html In addition .bb files are simplified to take a SRCBRANCH which is used by the SRC_URI set in linux-raspberrypi.inc and together with the existing SRCREV define a checkout from the linux-raspberrypi git repository. A default configuration, defconfig, is provided as a baseline. This is generated from bcmrpi_defconfig, as used in the existing recipes, and so configuration options should be the same. To change the kernel configuration a new configuration fragment may be generated, as explained in the kernel development documentation above, and this file then added to the SRC_URI via a .bbappend. Added some minor refactoring and removed some useless code. Change-Id: Ic72e14ec14ec3f042aeda0c6820f896be9c02e69 Signed-off-by: Alex J Lennon <ajlennon@dynamicdevices.co.uk> Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
This commit is contained in:
committed by
Andrei Gherzan
parent
b6d899e4d2
commit
67a1c4eaaf
@@ -1,36 +1,27 @@
|
||||
require linux.inc
|
||||
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
|
||||
|
||||
inherit kernel
|
||||
require recipes-kernel/linux/linux-yocto.inc
|
||||
|
||||
DESCRIPTION = "Linux Kernel for Raspberry Pi"
|
||||
SECTION = "kernel"
|
||||
LICENSE = "GPLv2"
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7"
|
||||
|
||||
SRC_URI += " \
|
||||
file://defconfig \
|
||||
"
|
||||
|
||||
COMPATIBLE_MACHINE = "raspberrypi"
|
||||
|
||||
PV_append = "+git${SRCREV}"
|
||||
|
||||
# NOTE: For now we pull in the default config from the RPi kernel GIT tree.
|
||||
KERNEL_DEFCONFIG = "bcmrpi_defconfig"
|
||||
SRC_URI = " \
|
||||
git://github.com/raspberrypi/linux.git;protocol=git;branch=${KBRANCH} \
|
||||
file://sl030raspberrypii2ckernel.patch \
|
||||
file://defconfig \
|
||||
"
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
# CMDLINE for raspberrypi
|
||||
CMDLINE_raspberrypi = "dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 root=/dev/mmcblk0p2 rootfstype=ext4 rootwait"
|
||||
|
||||
UDEV_GE_141 ?= "1"
|
||||
|
||||
do_kernel_configme_prepend() {
|
||||
install -m 0644 ${S}/arch/${ARCH}/configs/${KERNEL_DEFCONFIG} ${WORKDIR}/defconfig || die "No default configuration for ${MACHINE} / ${KERNEL_DEFCONFIG} available."
|
||||
}
|
||||
|
||||
do_install_prepend() {
|
||||
install -d ${D}/lib/firmware
|
||||
}
|
||||
CMDLINE ?= " \
|
||||
dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 \
|
||||
root=/dev/mmcblk0p2 rootfstype=ext4 rootwait"
|
||||
|
||||
do_deploy_append() {
|
||||
# Deploy cmdline.txt
|
||||
install -d ${DEPLOYDIR}/bcm2835-bootfiles
|
||||
echo "${CMDLINE}" > ${DEPLOYDIR}/bcm2835-bootfiles/cmdline.txt
|
||||
}
|
||||
|
||||
COMPATIBLE_MACHINE = "raspberrypi"
|
||||
|
||||
Reference in New Issue
Block a user