Files
poky/meta/recipes-kernel/linux/linux-yocto-rt_5.15.bb
Bruce Ashfield 8c81ddc78f linux-yocto/5.15: fix partion scanning
Integrating the following commit(s) to linux-yocto/5.15:

1/1 [
    Author: Christoph Hellwig
    Email: hch@lst.de
    Subject: block, loop: support partitions without scanning
    Date: Fri, 27 May 2022 07:58:06 +0200

    Historically we did distinguish between a flag that surpressed partition
    scanning, and a combinations of the minors variable and another flag if
    any partitions were supported.  This was generally confusing and doesn't
    make much sense, but some corner case uses of the loop driver actually
    do want to support manually added partitions on a device that does not
    actively scan for partitions.  To make things worsee the loop driver
    also wants to dynamically toggle the scanning for partitions on a live
    gendisk, which makes the disk->flags updates non-atomic.

    Introduce a new GD_SUPPRESS_PART_SCAN bit in disk->state that disables
    just scanning for partitions, and toggle that instead of GENHD_FL_NO_PART
    in the loop driver.

    [bva: Notes for this backport:
       - drop return code in disk_scan_partitions for GD_SUPPRESS_PART_SCAN.
         The check doesn't strictly need ot be in this routine in 5.15, but
         this faciliates future changes in this area, since there are
         other checks in the same function.
       - GD_SUPPRESS_PART_SCAN could go to genh.c, but genhd.c includes
         blkdev.h, so we leave the new GD_SUPPRESS_PART_SCAN definition
         in the same places as where it was introduced upstream to keep
         the changes to a minimum
       - upstream commit e16e506ccd673 merges blkdev_reread_part into
         disk_scan_partitions. Backporting that change is more churn
         than we need, so we also add the check for GD_SUPPRESS_PART_SCAN
         into that routine to have the check hit in a 5.15 context.
    ]

    Upstream-Status: Backport [commit b9684a71fca79]

    Fixes: 1ebe2e5f9d68 ("block: remove GENHD_FL_EXT_DEVT")
    Reported-by: Ming Lei <ming.lei@redhat.com>
    Signed-off-by: Christoph Hellwig <hch@lst.de>
    Reviewed-by: Ming Lei <ming.lei@redhat.com>
    Link: https://lore.kernel.org/r/20220527055806.1972352-1-hch@lst.de
    Signed-off-by: Jens Axboe <axboe@kernel.dk>
    Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
]

(From OE-Core rev: 768ac24afff43d58c32617025391049d5d0d166b)

Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2024-03-13 07:36:51 -10:00

46 lines
2.0 KiB
BlitzBasic

KBRANCH ?= "v5.15/standard/preempt-rt/base"
require recipes-kernel/linux/linux-yocto.inc
# Skip processing of this recipe if it is not explicitly specified as the
# PREFERRED_PROVIDER for virtual/kernel. This avoids errors when trying
# to build multiple virtual/kernel providers, e.g. as dependency of
# core-image-rt-sdk, core-image-rt.
python () {
if d.getVar("KERNEL_PACKAGE_NAME") == "kernel" and d.getVar("PREFERRED_PROVIDER_virtual/kernel") != "linux-yocto-rt":
raise bb.parse.SkipRecipe("Set PREFERRED_PROVIDER_virtual/kernel to linux-yocto-rt to enable it")
}
SRCREV_machine ?= "da32201bc41d994b0300c6b4738505f4875dc190"
SRCREV_meta ?= "bef59dc5a78b4d101d1be23d4b36a73fd849241a"
SRC_URI = "git://git.yoctoproject.org/linux-yocto.git;branch=${KBRANCH};name=machine \
git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-5.15;destsuffix=${KMETA}"
LINUX_VERSION ?= "5.15.150"
LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46"
DEPENDS += "${@bb.utils.contains('ARCH', 'x86', 'elfutils-native', '', d)}"
DEPENDS += "openssl-native util-linux-native"
PV = "${LINUX_VERSION}+git${SRCPV}"
KMETA = "kernel-meta"
KCONF_BSP_AUDIT_LEVEL = "1"
LINUX_KERNEL_TYPE = "preempt-rt"
COMPATIBLE_MACHINE = "^(qemux86|qemux86-64|qemuarm|qemuarmv5|qemuarm64|qemuppc|qemumips)$"
KERNEL_DEVICETREE:qemuarmv5 = "versatile-pb.dtb"
# Functionality flags
KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc features/taskstats/taskstats.scc"
KERNEL_FEATURES:append = " ${KERNEL_EXTRA_FEATURES}"
KERNEL_FEATURES:append:qemuall=" cfg/virtio.scc features/drm-bochs/drm-bochs.scc"
KERNEL_FEATURES:append:qemux86=" cfg/sound.scc cfg/paravirt_kvm.scc"
KERNEL_FEATURES:append:qemux86-64=" cfg/sound.scc cfg/paravirt_kvm.scc"
KERNEL_FEATURES:append = "${@bb.utils.contains("DISTRO_FEATURES", "ptest", " features/scsi/scsi-debug.scc", "", d)}"
KERNEL_FEATURES:append = "${@bb.utils.contains("DISTRO_FEATURES", "ptest", " features/gpio/mockup.scc", "", d)}"