diff options
Diffstat (limited to 'recipes-kernel')
18 files changed, 287 insertions, 266 deletions
diff --git a/recipes-kernel/bluez-firmware-rpidistro/bluez-firmware-rpidistro_git.bb b/recipes-kernel/bluez-firmware-rpidistro/bluez-firmware-rpidistro_git.bb index 310d2f8..bd5ed62 100644 --- a/recipes-kernel/bluez-firmware-rpidistro/bluez-firmware-rpidistro_git.bb +++ b/recipes-kernel/bluez-firmware-rpidistro/bluez-firmware-rpidistro_git.bb @@ -16,16 +16,18 @@ SECTION = "kernel" # [^1]: https://github.com/RPi-Distro/bluez-firmware/issues/1 LICENSE = "Firmware-cypress-rpidistro" LIC_FILES_CHKSUM = "\ - file://LICENCE.cypress-rpidistro;md5=852f9d10cbedba1f6c439729bd0617b4 \ + file://LICENCE.cypress-rpidistro;md5=be80828daf682762f392131141288a74 \ " # These are not common licenses, set NO_GENERIC_LICENSE for them # so that the license files will be copied from fetched source NO_GENERIC_LICENSE[Firmware-cypress-rpidistro] = "LICENCE.cypress-rpidistro" -SRC_URI = "git://github.com/RPi-Distro/bluez-firmware" -SRCREV = "96eefffcccc725425fd83be5e0704a5c32b79e54" -PV = "0.0+git${SRCPV}" +SRC_URI = " \ + git://github.com/RPi-Distro/bluez-firmware;branch=bookworm;protocol=https \ +" +SRCREV = "78d6a07730e2d20c035899521ab67726dc028e1c" +PV = "1.2-9+rpt3" S = "${WORKDIR}/git" @@ -39,7 +41,7 @@ do_extract_lic() { } # Must be before both do_install and do_populate_lic. Putting it before # their common ancestor works; other approaches do not. -addtask extract_lic after do_unpack before do_patch +addtask extract_lic after do_unpack before do_patch do_create_spdx do_compile() { : @@ -49,35 +51,59 @@ do_install() { install -d ${D}${nonarch_base_libdir}/firmware/brcm cp LICENCE.cypress-rpidistro ${D}${nonarch_base_libdir}/firmware - install -m 0644 broadcom/BCM434*.hcd ${D}${nonarch_base_libdir}/firmware/brcm/ + install -m 0644 debian/firmware/broadcom/BCM434*.hcd ${D}${nonarch_base_libdir}/firmware/brcm/ } PACKAGES = "\ ${PN}-cypress-license \ ${PN}-bcm43430a1-hcd \ + ${PN}-bcm43430b0-hcd \ + ${PN}-bcm4343a2-hcd \ ${PN}-bcm4345c0-hcd \ + ${PN}-bcm4345c5-hcd \ " -LICENSE_${PN}-bcm43430a1-hcd = "Firmware-cypress-rpidistro" -LICENSE_${PN}-bcm4345c0-hcd = "Firmware-cypress-rpidistro" -LICENSE_${PN}-cypress-license = "Firmware-cypress-rpidistro" +LICENSE:${PN}-bcm43430a1-hcd = "Firmware-cypress-rpidistro" +LICENSE:${PN}-bcm43430b0-hcd = "Firmware-cypress-rpidistro" +LICENSE:${PN}-bcm4343a2-hcd = "Firmware-cypress-rpidistro" +LICENSE:${PN}-bcm4345c0-hcd = "Firmware-cypress-rpidistro" +LICENSE:${PN}-bcm4345c5-hcd = "Firmware-cypress-rpidistro" +LICENSE:${PN}-cypress-license = "Firmware-cypress-rpidistro" -FILES_${PN}-cypress-license = "\ +FILES:${PN}-cypress-license = "\ ${nonarch_base_libdir}/firmware/LICENCE.cypress-rpidistro \ " -FILES_${PN}-bcm43430a1-hcd = "\ +FILES:${PN}-bcm43430a1-hcd = "\ ${nonarch_base_libdir}/firmware/brcm/BCM43430A1.hcd \ " -FILES_${PN}-bcm4345c0-hcd = "\ +FILES:${PN}-bcm43430b0-hcd = "\ + ${nonarch_base_libdir}/firmware/brcm/BCM43430B0.hcd \ +" +FILES:${PN}-bcm4343a2-hcd = "\ + ${nonarch_base_libdir}/firmware/brcm/BCM4343A2.hcd \ +" +FILES:${PN}-bcm4345c0-hcd = "\ ${nonarch_base_libdir}/firmware/brcm/BCM4345C0.hcd \ " +FILES:${PN}-bcm4345c5-hcd = "\ + ${nonarch_base_libdir}/firmware/brcm/BCM4345C5.hcd \ +" -RDEPENDS_${PN}-bcm43430a1-hcd += "${PN}-cypress-license" -RDEPENDS_${PN}-bcm4345c0-hcd += "${PN}-cypress-license" -RCONFLICTS_${PN}-bcm43430a1-hcd = "linux-firmware-bcm43430a1-hcd" -RREPLACES_${PN}-bcm43430a1-hcd = "linux-firmware-bcm43430a1-hcd" -RCONFLICTS_${PN}-bcm43435c0-hcd = "linux-firmware-bcm4345c0-hcd" -RREPLACES_${PN}-bcm43435c0-hcd = "linux-firmware-bcm4345c0-hcd" +RDEPENDS:${PN}-bcm43430a1-hcd += "${PN}-cypress-license" +RDEPENDS:${PN}-bcm43430b0-hcd += "${PN}-cypress-license" +RDEPENDS:${PN}-bcm4343a2-hcd += "${PN}-cypress-license" +RDEPENDS:${PN}-bcm4345c0-hcd += "${PN}-cypress-license" +RDEPENDS:${PN}-bcm4345c5-hcd += "${PN}-cypress-license" +RCONFLICTS:${PN}-bcm43430a1-hcd = "linux-firmware-bcm43430a1-hcd" +RREPLACES:${PN}-bcm43430a1-hcd = "linux-firmware-bcm43430a1-hcd" +RCONFLICTS:${PN}-bcm43430b0-hcd = "linux-firmware-bcm43430b0-hcd" +RREPLACES:${PN}-bcm43430b0-hcd = "linux-firmware-bcm43430b0-hcd" +RCONFLICTS:${PN}-bcm4343a2-hcd = "linux-firmware-bcm4343a2-hcd" +RREPLACES:${PN}-bcm4343a2-hcd = "linux-firmware-bcm4343a2-hcd" +RCONFLICTS:${PN}-bcm43435c0-hcd = "linux-firmware-bcm4345c0-hcd" +RREPLACES:${PN}-bcm43435c0-hcd = "linux-firmware-bcm4345c0-hcd" +RCONFLICTS:${PN}-bcm43435c5-hcd = "linux-firmware-bcm4345c5-hcd" +RREPLACES:${PN}-bcm43435c5-hcd = "linux-firmware-bcm4345c5-hcd" # Firmware files are generally not run on the CPU, so they can be # allarch despite being architecture specific diff --git a/recipes-kernel/linux-firmware-rpidistro/linux-firmware-rpidistro/0001-Default-43455-firmware-to-standard-variant.patch b/recipes-kernel/linux-firmware-rpidistro/linux-firmware-rpidistro/0001-Default-43455-firmware-to-standard-variant.patch new file mode 100644 index 0000000..f67d95b --- /dev/null +++ b/recipes-kernel/linux-firmware-rpidistro/linux-firmware-rpidistro/0001-Default-43455-firmware-to-standard-variant.patch @@ -0,0 +1,28 @@ +From b9db43e36ad0942d33cb4db5b394abd722862568 Mon Sep 17 00:00:00 2001 +From: Andrei Gherzan <andrei.gherzan@huawei.com> +Date: Fri, 9 Sep 2022 20:28:06 +0200 +Subject: [PATCH] Default 43455 firmware to standard variant + +The firmware for 43455 is loaded as a symlink: brcmfmac43455-sdio.bin. +This symlink is now broken as the debian package handles the right +target of this symlink through a postinstall. We don't have that logic +here so we default to the standard variant. + +Upstream-Status: Inappropriate [issue reported at https://github.com/RPi-Distro/firmware-nonfree/issues/26] +Signed-off-by: Andrei Gherzan <andrei.gherzan@huawei.com> +--- + debian/config/brcm80211/brcm/brcmfmac43455-sdio.bin | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/debian/config/brcm80211/brcm/brcmfmac43455-sdio.bin b/debian/config/brcm80211/brcm/brcmfmac43455-sdio.bin +index 9c39208..b914838 120000 +--- a/debian/config/brcm80211/brcm/brcmfmac43455-sdio.bin ++++ b/debian/config/brcm80211/brcm/brcmfmac43455-sdio.bin +@@ -1 +1 @@ +-../cypress/cyfmac43455-sdio.bin +\ No newline at end of file ++../cypress/cyfmac43455-sdio-standard.bin +\ No newline at end of file +-- +2.25.1 + diff --git a/recipes-kernel/linux-firmware-rpidistro/linux-firmware-rpidistro_git.bb b/recipes-kernel/linux-firmware-rpidistro/linux-firmware-rpidistro_git.bb index 99afde8..1b43058 100644 --- a/recipes-kernel/linux-firmware-rpidistro/linux-firmware-rpidistro_git.bb +++ b/recipes-kernel/linux-firmware-rpidistro/linux-firmware-rpidistro_git.bb @@ -5,97 +5,107 @@ to linux-firmware for general use." HOMEPAGE = "https://github.com/RPi-Distro/firmware-nonfree" SECTION = "kernel" -# In maintained upstream linux-firmware: -# * brcmfmac43430-sdio falls under LICENCE.cypress -# * brcmfmac43455-sdio falls under LICENCE.broadcom_bcm43xx -# -# It is likely[^1] that both of these should be under LICENCE.cypress. -# Further, at this time the text of LICENCE.broadcom_bcm43xx is the same -# in linux-firmware and RPi-Distro/firmware-nonfree, but this may -# change. -# -# Rather than make assumptions about what's supposed to be what, we'll -# use the license implied by the source of these files, named to avoid -# conflicts with linux-firmware. -# -# [^1]: https://github.com/RPi-Distro/bluez-firmware/issues/1 -LICENSE = "\ - Firmware-broadcom_bcm43xx-rpidistro \ - & WHENCE \ -" +LICENSE = "GPL-2.0-only & binary-redist-Cypress-rpidistro & Synaptics-rpidistro" LIC_FILES_CHKSUM = "\ - file://LICENCE.broadcom_bcm43xx;md5=3160c14df7228891b868060e1951dfbc \ - file://WHENCE;md5=7b12b2224438186e4c97c4c7f3a5cc28 \ + file://debian/copyright;md5=291ee5385b4cf74b10c5fb5a46a7bbc6 \ " +# Where these are no common licenses, set NO_GENERIC_LICENSE so that the +# license files will be copied from the fetched source. +NO_GENERIC_LICENSE[binary-redist-Cypress-rpidistro] = "debian/copyright" +NO_GENERIC_LICENSE[Synaptics-rpidistro] = "debian/copyright" +LICENSE_FLAGS = "synaptics-killswitch" -# These are not common licenses, set NO_GENERIC_LICENSE for them -# so that the license files will be copied from fetched source -NO_GENERIC_LICENSE[Firmware-broadcom_bcm43xx-rpidistro] = "LICENCE.broadcom_bcm43xx" -NO_GENERIC_LICENSE[WHENCE] = "WHENCE" - -SRC_URI = "git://github.com/RPi-Distro/firmware-nonfree" - -SRCREV = "98e815735e2c805d65994ccc608f399595b74438" -PV = "20190114-1+rpt8" - +SRC_URI = "git://github.com/RPi-Distro/firmware-nonfree;branch=bookworm;protocol=https \ + file://0001-Default-43455-firmware-to-standard-variant.patch \ +" +SRCREV = "223ccf3a3ddb11b3ea829749fbbba4d65b380897" +PV = "20230625-2+rpt2" S = "${WORKDIR}/git" inherit allarch -CLEANBROKEN = "1" - -do_compile() { - : -} +do_configure[noexec] = "1" +do_compile[noexec] = "1" do_install() { - install -d ${D}${nonarch_base_libdir}/firmware/brcm + install -d ${D}${nonarch_base_libdir}/firmware/brcm ${D}${nonarch_base_libdir}/firmware/cypress - cp ./LICENCE.broadcom_bcm43xx ${D}${nonarch_base_libdir}/firmware/LICENCE.broadcom_bcm43xx-rpidistro + cp debian/copyright ${D}${nonarch_base_libdir}/firmware/copyright.firmware-nonfree-rpidistro - # Replace outdated linux-firmware files with updated ones from - # raspbian firmware-nonfree. Raspbian adds blobs and nvram - # definitions that are also necessary so copy those too. - for fw in brcmfmac43430-sdio brcmfmac43455-sdio ; do - install -m 0644 brcm/${fw}.* ${D}${nonarch_base_libdir}/firmware/brcm/ + for fw in \ + brcmfmac43430-sdio \ + brcmfmac43430b0-sdio \ + brcmfmac43436-sdio \ + brcmfmac43436s-sdio \ + brcmfmac43455-sdio \ + brcmfmac43456-sdio; do + cp -R --no-dereference --preserve=mode,links -v debian/config/brcm80211/brcm/${fw}.* ${D}${nonarch_base_libdir}/firmware/brcm/ done - # add compat links. Fixes errors like - # brcmfmac mmc1:0001:1: Direct firmware load for brcm/brcmfmac43455-sdio.raspberrypi,4-model-b.txt failed with error -2 - ln -s brcmfmac43455-sdio.txt ${D}${nonarch_base_libdir}/firmware/brcm/brcmfmac43455-sdio.raspberrypi,4-model-b.txt - ln -s brcmfmac43455-sdio.txt ${D}${nonarch_base_libdir}/firmware/brcm/brcmfmac43455-sdio.raspberrypi,3-model-b-plus.txt - ln -s brcmfmac43430-sdio.txt ${D}${nonarch_base_libdir}/firmware/brcm/brcmfmac43430-sdio.raspberrypi,3-model-b.txt + + cp -R --no-dereference --preserve=mode,links -v debian/config/brcm80211/cypress/* ${D}${nonarch_base_libdir}/firmware/cypress/ + + rm ${D}${nonarch_base_libdir}/firmware/cypress/README.txt } PACKAGES = "\ - ${PN}-broadcom-license \ ${PN}-bcm43430 \ + ${PN}-bcm43436 \ + ${PN}-bcm43436s \ + ${PN}-bcm43439 \ ${PN}-bcm43455 \ + ${PN}-bcm43456 \ + ${PN}-license \ " -LICENSE_${PN}-bcm43430 = "Firmware-broadcom_bcm43xx-rpidistro" -LICENSE_${PN}-bcm43455 = "Firmware-broadcom_bcm43xx-rpidistro" -LICENSE_${PN}-broadcom-license = "Firmware-broadcom_bcm43xx-rpidistro" -FILES_${PN}-broadcom-license = "${nonarch_base_libdir}/firmware/LICENCE.broadcom_bcm43xx-rpidistro" -FILES_${PN}-bcm43430 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac43430*" -FILES_${PN}-bcm43455 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac43455*" -RDEPENDS_${PN}-bcm43430 += "${PN}-broadcom-license" -RDEPENDS_${PN}-bcm43455 += "${PN}-broadcom-license" -RCONFLICTS_${PN}-bcm43430 = "\ - linux-firmware-bcm43430 \ - linux-firmware-raspbian-bcm43430 \ +LICENSE:${PN}-bcm43430 = "binary-redist-Cypress-rpidistro" +LICENSE:${PN}-bcm43436 = "Synaptics-rpidistro" +LICENSE:${PN}-bcm43436s = "Synaptics-rpidistro" +LICENSE:${PN}-bcm43439 = "Synaptics-rpidistro" +LICENSE:${PN}-bcm43455 = "binary-redist-Cypress-rpidistro" +LICENSE:${PN}-bcm43456 = "Synaptics-rpidistro" +LICENSE:${PN}-license = "GPL-2.0-only" + +FILES:${PN}-bcm43430 = " \ + ${nonarch_base_libdir}/firmware/brcm/brcmfmac43430* \ + ${nonarch_base_libdir}/firmware/cypress/cyfmac43430-sdio.bin \ + ${nonarch_base_libdir}/firmware/cypress/cyfmac43430-sdio.clm_blob \ " -RREPLACES_${PN}-bcm43430 = "\ - linux-firmware-bcm43430 \ - linux-firmware-raspbian-bcm43430 \ +FILES:${PN}-bcm43436 = " \ + ${nonarch_base_libdir}/firmware/brcm/brcmfmac43436-* \ + ${nonarch_base_libdir}/firmware/brcm/brcmfmac43430b0-* \ " -RCONFLICTS_${PN}-bcm43455 = "\ - linux-firmware-bcm43455 \ - linux-firmware-raspbian-bcm43455 \ +FILES:${PN}-bcm43436s = "${nonarch_base_libdir}/firmware/brcm/brcmfmac43436s*" +FILES:${PN}-bcm43439 = " \ + ${nonarch_base_libdir}/firmware/cypress/43439A0-7.95.49.00.combined \ + ${nonarch_base_libdir}/firmware/cypress/cyfmac43439-sdio* \ " -RREPLACES_${PN}-bcm43455 = "\ - linux-firmware-bcm43455 \ - linux-firmware-raspbian-bcm43455 \ +FILES:${PN}-bcm43455 = " \ + ${nonarch_base_libdir}/firmware/brcm/brcmfmac43455* \ + ${nonarch_base_libdir}/firmware/cypress/cyfmac43455-sdio* \ " +FILES:${PN}-bcm43456 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac43456*" +FILES:${PN}-license = "${nonarch_base_libdir}/firmware/copyright.firmware-nonfree-rpidistro" + +RDEPENDS:${PN}-bcm43430 += "${PN}-license" +RDEPENDS:${PN}-bcm43436 += "${PN}-license" +RDEPENDS:${PN}-bcm43436s += "${PN}-license" +RDEPENDS:${PN}-bcm43439 += "${PN}-license" +RDEPENDS:${PN}-bcm43455 += "${PN}-license" +RDEPENDS:${PN}-bcm43456 += "${PN}-license" + +RCONFLICTS:${PN}-bcm43430 = "linux-firmware-raspbian-bcm43430" +RCONFLICTS:${PN}-bcm43436 = "linux-firmware-bcm43436" +RCONFLICTS:${PN}-bcm43436s = "linux-firmware-bcm43436s" +RCONFLICTS:${PN}-bcm43439 = "linux-firmware-bcm43439" +RCONFLICTS:${PN}-bcm43455 = "linux-firmware-bcm43455" +RCONFLICTS:${PN}-bcm43456 = "linux-firmware-bcm43456" + +RREPLACES:${PN}-bcm43430 = "linux-firmware-bcm43430" +RREPLACES:${PN}-bcm43436 = "linux-firmware-bcm43436" +RREPLACES:${PN}-bcm43436s = "linux-firmware-bcm43436s" +RREPLACES:${PN}-bcm43439 = "linux-firmware-bcm43439" +RREPLACES:${PN}-bcm43455 = "linux-firmware-bcm43455" +RREPLACES:${PN}-bcm43456 = "linux-firmware-bcm43456" # Firmware files are generally not run on the CPU, so they can be # allarch despite being architecture specific diff --git a/recipes-kernel/linux/files/0001-Revert-selftests-bpf-Skip-perf-hw-events-test-if-the.patch b/recipes-kernel/linux/files/0001-Revert-selftests-bpf-Skip-perf-hw-events-test-if-the.patch deleted file mode 100644 index 66efde1..0000000 --- a/recipes-kernel/linux/files/0001-Revert-selftests-bpf-Skip-perf-hw-events-test-if-the.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 754e3030788702c1f013a88a4fc8546742d84e27 Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Thu, 18 Jun 2020 13:45:04 -0700 -Subject: [PATCH] Revert "selftests/bpf: Skip perf hw events test if the setup - disabled it" - -This reverts commit da43712a7262891317883d4b3a909fb18dac4b1d. - -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- - .../selftests/bpf/prog_tests/stacktrace_build_id_nmi.c | 8 ++------ - 1 file changed, 2 insertions(+), 6 deletions(-) - -diff --git a/tools/testing/selftests/bpf/prog_tests/stacktrace_build_id_nmi.c b/tools/testing/selftests/bpf/prog_tests/stacktrace_build_id_nmi.c -index 437cb93e72ac..f62aa0eb959b 100644 ---- a/tools/testing/selftests/bpf/prog_tests/stacktrace_build_id_nmi.c -+++ b/tools/testing/selftests/bpf/prog_tests/stacktrace_build_id_nmi.c -@@ -49,12 +49,8 @@ void test_stacktrace_build_id_nmi(void) - pmu_fd = syscall(__NR_perf_event_open, &attr, -1 /* pid */, - 0 /* cpu 0 */, -1 /* group id */, - 0 /* flags */); -- if (pmu_fd < 0 && errno == ENOENT) { -- printf("%s:SKIP:no PERF_COUNT_HW_CPU_CYCLES\n", __func__); -- test__skip(); -- goto close_prog; -- } -- if (CHECK(pmu_fd < 0, "perf_event_open", "err %d errno %d\n", -+ if (CHECK(pmu_fd < 0, "perf_event_open", -+ "err %d errno %d. Does the test host support PERF_COUNT_HW_CPU_CYCLES?\n", - pmu_fd, errno)) - goto close_prog; - --- -2.27.0 - diff --git a/recipes-kernel/linux/files/0002-Revert-selftests-bpf-Fix-perf_buffer-test-on-systems.patch b/recipes-kernel/linux/files/0002-Revert-selftests-bpf-Fix-perf_buffer-test-on-systems.patch deleted file mode 100644 index d18b942..0000000 --- a/recipes-kernel/linux/files/0002-Revert-selftests-bpf-Fix-perf_buffer-test-on-systems.patch +++ /dev/null @@ -1,94 +0,0 @@ -From 366487b86a8c87954fb4ab7bd88ab49a929a32f6 Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Mon, 13 Apr 2020 11:25:58 -0700 -Subject: [PATCH 2/2] Revert "selftests/bpf: Fix perf_buffer test on systems w/ - offline CPUs" - -This reverts commit 77bb53cb094828a31cd3c5b402899810f63073c1. ---- - .../selftests/bpf/prog_tests/perf_buffer.c | 29 ++++--------------- - 1 file changed, 5 insertions(+), 24 deletions(-) - -diff --git a/tools/testing/selftests/bpf/prog_tests/perf_buffer.c b/tools/testing/selftests/bpf/prog_tests/perf_buffer.c -index cf6c87936c69..3003fddc0613 100644 ---- a/tools/testing/selftests/bpf/prog_tests/perf_buffer.c -+++ b/tools/testing/selftests/bpf/prog_tests/perf_buffer.c -@@ -4,7 +4,6 @@ - #include <sched.h> - #include <sys/socket.h> - #include <test_progs.h> --#include "libbpf_internal.h" - - static void on_sample(void *ctx, int cpu, void *data, __u32 size) - { -@@ -20,7 +19,7 @@ static void on_sample(void *ctx, int cpu, void *data, __u32 size) - - void test_perf_buffer(void) - { -- int err, prog_fd, on_len, nr_on_cpus = 0, nr_cpus, i, duration = 0; -+ int err, prog_fd, nr_cpus, i, duration = 0; - const char *prog_name = "kprobe/sys_nanosleep"; - const char *file = "./test_perf_buffer.o"; - struct perf_buffer_opts pb_opts = {}; -@@ -30,27 +29,15 @@ void test_perf_buffer(void) - struct bpf_object *obj; - struct perf_buffer *pb; - struct bpf_link *link; -- bool *online; - - nr_cpus = libbpf_num_possible_cpus(); - if (CHECK(nr_cpus < 0, "nr_cpus", "err %d\n", nr_cpus)) - return; - -- err = parse_cpu_mask_file("/sys/devices/system/cpu/online", -- &online, &on_len); -- if (CHECK(err, "nr_on_cpus", "err %d\n", err)) -- return; -- -- for (i = 0; i < on_len; i++) -- if (online[i]) -- nr_on_cpus++; -- - /* load program */ - err = bpf_prog_load(file, BPF_PROG_TYPE_KPROBE, &obj, &prog_fd); -- if (CHECK(err, "obj_load", "err %d errno %d\n", err, errno)) { -- obj = NULL; -- goto out_close; -- } -+ if (CHECK(err, "obj_load", "err %d errno %d\n", err, errno)) -+ return; - - prog = bpf_object__find_program_by_title(obj, prog_name); - if (CHECK(!prog, "find_probe", "prog '%s' not found\n", prog_name)) -@@ -77,11 +64,6 @@ void test_perf_buffer(void) - /* trigger kprobe on every CPU */ - CPU_ZERO(&cpu_seen); - for (i = 0; i < nr_cpus; i++) { -- if (i >= on_len || !online[i]) { -- printf("skipping offline CPU #%d\n", i); -- continue; -- } -- - CPU_ZERO(&cpu_set); - CPU_SET(i, &cpu_set); - -@@ -99,8 +81,8 @@ void test_perf_buffer(void) - if (CHECK(err < 0, "perf_buffer__poll", "err %d\n", err)) - goto out_free_pb; - -- if (CHECK(CPU_COUNT(&cpu_seen) != nr_on_cpus, "seen_cpu_cnt", -- "expect %d, seen %d\n", nr_on_cpus, CPU_COUNT(&cpu_seen))) -+ if (CHECK(CPU_COUNT(&cpu_seen) != nr_cpus, "seen_cpu_cnt", -+ "expect %d, seen %d\n", nr_cpus, CPU_COUNT(&cpu_seen))) - goto out_free_pb; - - out_free_pb: -@@ -109,5 +91,4 @@ void test_perf_buffer(void) - bpf_link__destroy(link); - out_close: - bpf_object__close(obj); -- free(online); - } --- -2.26.0 - diff --git a/recipes-kernel/linux/files/default-cpu-governor.cfg b/recipes-kernel/linux/files/default-cpu-governor.cfg new file mode 100644 index 0000000..e2e201d --- /dev/null +++ b/recipes-kernel/linux/files/default-cpu-governor.cfg @@ -0,0 +1,9 @@ +# The defconfigs from the RPi Kernel set "powersave" as the default CPU governor. +# That is a bad idea as it reduces performance, so we unset that default option here. +# The option to build the powersave governor (but not as the default) is also enabled. +# A fix for this was sent to upstream: https://github.com/raspberrypi/linux/pull/5666 +# However, we need to carry this option override until those defconfigs are fixed on +# *all* the kernel branches that we support. So that can be a long time depending +# on wheter the above PR gets accepted and/or backported to the stable branches. +CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE=n +CONFIG_CPU_FREQ_GOV_POWERSAVE=y diff --git a/recipes-kernel/linux/files/initramfs-image-bundle.cfg b/recipes-kernel/linux/files/initramfs-image-bundle.cfg index ea54003..8d3ad16 100644 --- a/recipes-kernel/linux/files/initramfs-image-bundle.cfg +++ b/recipes-kernel/linux/files/initramfs-image-bundle.cfg @@ -1,3 +1,5 @@ CONFIG_OVERLAY_FS=y CONFIG_SQUASHFS=y +CONFIG_MTD=y +CONFIG_MTD_UBI=y CONFIG_UBIFS_FS=y diff --git a/recipes-kernel/linux/files/raspberrypi4-64/rpi4-64-kernel-misc.cfg b/recipes-kernel/linux/files/raspberrypi4-64/rpi4-64-kernel-misc.cfg deleted file mode 100644 index fd97ed7..0000000 --- a/recipes-kernel/linux/files/raspberrypi4-64/rpi4-64-kernel-misc.cfg +++ /dev/null @@ -1,2 +0,0 @@ -# see emmc node -CONFIG_MMC_SDHCI_IPROC=y diff --git a/recipes-kernel/linux/files/raspberrypi4/rpi4-nvmem.cfg b/recipes-kernel/linux/files/raspberrypi4/rpi4-nvmem.cfg new file mode 100644 index 0000000..0248162 --- /dev/null +++ b/recipes-kernel/linux/files/raspberrypi4/rpi4-nvmem.cfg @@ -0,0 +1 @@ +CONFIG_NVMEM_RMEM=y diff --git a/recipes-kernel/linux/files/wm8960.cfg b/recipes-kernel/linux/files/wm8960.cfg new file mode 100644 index 0000000..9360800 --- /dev/null +++ b/recipes-kernel/linux/files/wm8960.cfg @@ -0,0 +1,2 @@ +CONFIG_I2C_BCM2835=y +CONFIG_SND_SOC_WM8960=y diff --git a/recipes-kernel/linux/linux-raspberrypi-dev.bb b/recipes-kernel/linux/linux-raspberrypi-dev.bb index 9b2b6f3..e0a4461 100644 --- a/recipes-kernel/linux/linux-raspberrypi-dev.bb +++ b/recipes-kernel/linux/linux-raspberrypi-dev.bb @@ -7,24 +7,28 @@ python __anonymous() { LINUX_VERSION ?= "5.10.y" LINUX_RPI_BRANCH ?= "rpi-5.10.y" +LINUX_RPI_KMETA_BRANCH ?= "yocto-5.10" -SRCREV_machine = "${AUTOREV}" -SRCREV_meta = "${AUTOREV}" +# Set default SRCREVs. Both the machine and meta SRCREVs are statically set +# to the as in 5.10 recipe, and hence prevent network access during parsing. If +# linux-yocto-dev is the preferred provider, they will be overridden to +# AUTOREV in following anonymous python routine and resolved when the +# variables are finalized. +SRCREV_machine ?= '${@oe.utils.conditional("PREFERRED_PROVIDER_virtual/kernel", "linux-raspberrypi-dev", "${AUTOREV}", "89399e6e7e33d6260a954603ca03857df594ffd3", d)}' +SRCREV_meta ?= '${@oe.utils.conditional("PREFERRED_PROVIDER_virtual/kernel", "linux-raspberrypi-dev", "${AUTOREV}", "a19886b00ea7d874fdd60d8e3435894bb16e6434", d)}' KMETA = "kernel-meta" SRC_URI = " \ - git://github.com/raspberrypi/linux.git;name=machine;protocol=git;branch=${LINUX_RPI_BRANCH} \ - git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=master;destsuffix=${KMETA} \ + git://github.com/raspberrypi/linux.git;name=machine;branch=${LINUX_RPI_BRANCH};protocol=https \ + git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=${LINUX_RPI_KMETA_BRANCH};destsuffix=${KMETA} \ file://powersave.cfg \ file://android-drivers.cfg \ " require linux-raspberrypi.inc -LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46" - -KERNEL_EXTRA_ARGS += "DTC_FLAGS='-@ -H epapr'" +KERNEL_DTC_FLAGS += "-@ -H epapr" # Disable version check so that we don't have to edit this recipe every time # upstream bumps the version diff --git a/recipes-kernel/linux/linux-raspberrypi-v7.inc b/recipes-kernel/linux/linux-raspberrypi-v7.inc new file mode 100644 index 0000000..77debc4 --- /dev/null +++ b/recipes-kernel/linux/linux-raspberrypi-v7.inc @@ -0,0 +1,13 @@ +# SPDX-FileCopyrightText: Andrei Gherzan <andrei.gherzan@huawei.com> +# +# SPDX-License-Identifier: MIT + +KBUILD_DEFCONFIG:raspberrypi-armv7 = "bcm2709_defconfig" +KERNEL_PACKAGE_NAME = "${RASPBERRYPI_v7_KERNEL_PACKAGE_NAME}" +PROVIDES:remove = "virtual/kernel" + +KERNEL_IMAGETYPE_DIRECT ?= "zImage" + +COMPATIBLE_MACHINE = "^raspberrypi-armv7$" + +KERNEL_DEVICETREE = "" diff --git a/recipes-kernel/linux/linux-raspberrypi-v7_6.1.bb b/recipes-kernel/linux/linux-raspberrypi-v7_6.1.bb new file mode 100644 index 0000000..ef77b0b --- /dev/null +++ b/recipes-kernel/linux/linux-raspberrypi-v7_6.1.bb @@ -0,0 +1,6 @@ +# SPDX-FileCopyrightText: Andrei Gherzan <andrei.gherzan@huawei.com> +# +# SPDX-License-Identifier: MIT + +require linux-raspberrypi-v7.inc +require linux-raspberrypi_6.1.bb diff --git a/recipes-kernel/linux/linux-raspberrypi-v7_6.6.bb b/recipes-kernel/linux/linux-raspberrypi-v7_6.6.bb new file mode 100644 index 0000000..a5695f6 --- /dev/null +++ b/recipes-kernel/linux/linux-raspberrypi-v7_6.6.bb @@ -0,0 +1,6 @@ +# SPDX-FileCopyrightText: Andrei Gherzan <andrei.gherzan@huawei.com> +# +# SPDX-License-Identifier: MIT + +require linux-raspberrypi-v7.inc +require linux-raspberrypi_6.6.bb diff --git a/recipes-kernel/linux/linux-raspberrypi.inc b/recipes-kernel/linux/linux-raspberrypi.inc index 746c0c5..e62ff3f 100644 --- a/recipes-kernel/linux/linux-raspberrypi.inc +++ b/recipes-kernel/linux/linux-raspberrypi.inc @@ -1,30 +1,39 @@ DESCRIPTION = "Linux Kernel for Raspberry Pi" SECTION = "kernel" -LICENSE = "GPLv2" -LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7" +LICENSE = "GPL-2.0-only" +LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46" -COMPATIBLE_MACHINE = "^rpi$" +COMPATIBLE_MACHINE ?= "^rpi$" PE = "1" PV = "${LINUX_VERSION}+git${SRCPV}" -inherit kernel siteinfo +inherit siteinfo require recipes-kernel/linux/linux-yocto.inc SRC_URI += " \ ${@bb.utils.contains("INITRAMFS_IMAGE_BUNDLE", "1", "file://initramfs-image-bundle.cfg", "", d)} \ ${@bb.utils.contains("MACHINE_FEATURES", "vc4graphics", "file://vc4graphics.cfg", "", d)} \ + ${@bb.utils.contains("MACHINE_FEATURES", "wm8960", "file://wm8960.cfg", "", d)} \ + file://default-cpu-governor.cfg \ " +SRC_URI:append:raspberrypi4 = " \ + file://rpi4-nvmem.cfg \ +" + KCONFIG_MODE = "--alldefconfig" -KBUILD_DEFCONFIG_raspberrypi0-wifi ?= "bcmrpi_defconfig" -KBUILD_DEFCONFIG_raspberrypi ?= "bcmrpi_defconfig" -KBUILD_DEFCONFIG_raspberrypi-cm3 ?= "bcm2709_defconfig" -KBUILD_DEFCONFIG_raspberrypi2 ?= "bcm2709_defconfig" -KBUILD_DEFCONFIG_raspberrypi3 ?= "bcm2709_defconfig" -KBUILD_DEFCONFIG_raspberrypi3-64 ?= "bcmrpi3_defconfig" -KBUILD_DEFCONFIG_raspberrypi4 ?= "bcm2711_defconfig" -KBUILD_DEFCONFIG_raspberrypi4-64 ?= "bcm2711_defconfig" +KBUILD_DEFCONFIG:raspberrypi0-wifi ?= "bcmrpi_defconfig" +KBUILD_DEFCONFIG:raspberrypi ?= "bcmrpi_defconfig" +KBUILD_DEFCONFIG:raspberrypi-cm3 ?= "bcm2709_defconfig" +KBUILD_DEFCONFIG:raspberrypi2 ?= "bcm2709_defconfig" +KBUILD_DEFCONFIG:raspberrypi3 ?= "bcm2709_defconfig" +KBUILD_DEFCONFIG:raspberrypi3-64 ?= "bcmrpi3_defconfig" +KBUILD_DEFCONFIG:raspberrypi4 ?= "bcm2711_defconfig" +KBUILD_DEFCONFIG:raspberrypi4-64 ?= "bcm2711_defconfig" +KBUILD_DEFCONFIG:raspberrypi-armv7 ?= "bcm2711_defconfig" +KBUILD_DEFCONFIG:raspberrypi-armv8 ?= "bcm2711_defconfig" +KBUILD_DEFCONFIG:raspberrypi5 ?= "bcm2712_defconfig" LINUX_VERSION_EXTENSION ?= "" @@ -33,11 +42,7 @@ KERNEL_MODULE_AUTOLOAD += "${@bb.utils.contains("MACHINE_FEATURES", "pitft28r", # A LOADADDR is needed when building a uImage format kernel. This value is not # set by default in rpi-4.8.y and later branches so we need to provide it # manually. This value unused if KERNEL_IMAGETYPE is not uImage. -KERNEL_EXTRA_ARGS += "LOADADDR=0x00008000" - -do_compile_append() { - if [ "${SITEINFO_BITS}" = "64" ]; then - cc_extra=$(get_cc_option) - oe_runmake dtbs CC="${KERNEL_CC} $cc_extra " LD="${KERNEL_LD}" ${KERNEL_EXTRA_ARGS} - fi -} +KERNEL_EXTRA_ARGS += "LOADADDR=${UBOOT_ENTRYPOINT}" + +UBOOT_ENTRYPOINT = "0x00008000" +UBOOT_LOADADDRESS = "0x00008000" diff --git a/recipes-kernel/linux/linux-raspberrypi_5.4.bb b/recipes-kernel/linux/linux-raspberrypi_5.4.bb deleted file mode 100644 index 1d04c2f..0000000 --- a/recipes-kernel/linux/linux-raspberrypi_5.4.bb +++ /dev/null @@ -1,22 +0,0 @@ -LINUX_VERSION ?= "5.4.79" -LINUX_RPI_BRANCH ?= "rpi-5.4.y" - -SRCREV_machine = "9797f1a4938c20139b00a25de93cc99efb5c291b" -SRCREV_meta = "5d52d9eea95fa09d404053360c2351b2b91b323b" - -KMETA = "kernel-meta" - -SRC_URI = " \ - git://github.com/raspberrypi/linux.git;name=machine;branch=${LINUX_RPI_BRANCH} \ - git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-5.4;destsuffix=${KMETA} \ - file://0001-Revert-selftests-bpf-Skip-perf-hw-events-test-if-the.patch \ - file://0002-Revert-selftests-bpf-Fix-perf_buffer-test-on-systems.patch \ - file://powersave.cfg \ - file://android-drivers.cfg \ - " - -require linux-raspberrypi.inc - -LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814" - -KERNEL_EXTRA_ARGS += "DTC_FLAGS='-@ -H epapr'" diff --git a/recipes-kernel/linux/linux-raspberrypi_6.1.bb b/recipes-kernel/linux/linux-raspberrypi_6.1.bb new file mode 100644 index 0000000..5731a81 --- /dev/null +++ b/recipes-kernel/linux/linux-raspberrypi_6.1.bb @@ -0,0 +1,31 @@ +LINUX_VERSION ?= "6.1.77" +LINUX_RPI_BRANCH ?= "rpi-6.1.y" +LINUX_RPI_KMETA_BRANCH ?= "yocto-6.1" + +SRCREV_machine = "77fc1fbcb5c013329af9583307dd1ff3cd4752aa" +SRCREV_meta = "43d1723dbe0ce7b341cf32feeb35ecbe6b0ce29a" + +KMETA = "kernel-meta" + +SRC_URI = " \ + git://github.com/raspberrypi/linux.git;name=machine;branch=${LINUX_RPI_BRANCH};protocol=https \ + git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=${LINUX_RPI_KMETA_BRANCH};destsuffix=${KMETA} \ + file://powersave.cfg \ + file://android-drivers.cfg \ + " + +require linux-raspberrypi.inc + +KERNEL_DTC_FLAGS += "-@ -H epapr" + +RDEPENDS:${KERNEL_PACKAGE_NAME}:raspberrypi-armv7:append = " ${RASPBERRYPI_v7_KERNEL_PACKAGE_NAME}" +RDEPENDS:${KERNEL_PACKAGE_NAME}-base:raspberrypi-armv7:append = " ${RASPBERRYPI_v7_KERNEL_PACKAGE_NAME}-base" +RDEPENDS:${KERNEL_PACKAGE_NAME}-image:raspberrypi-armv7:append = " ${RASPBERRYPI_v7_KERNEL_PACKAGE_NAME}-image" +RDEPENDS:${KERNEL_PACKAGE_NAME}-dev:raspberrypi-armv7:append = " ${RASPBERRYPI_v7_KERNEL_PACKAGE_NAME}-dev" +RDEPENDS:${KERNEL_PACKAGE_NAME}-vmlinux:raspberrypi-armv7:append = " ${RASPBERRYPI_v7_KERNEL_PACKAGE_NAME}-vmlinux" +RDEPENDS:${KERNEL_PACKAGE_NAME}-modules:raspberrypi-armv7:append = " ${RASPBERRYPI_v7_KERNEL_PACKAGE_NAME}-modules" +RDEPENDS:${KERNEL_PACKAGE_NAME}-dbg:raspberrypi-armv7:append = " ${RASPBERRYPI_v7_KERNEL_PACKAGE_NAME}-dbg" + +DEPLOYDEP = "" +DEPLOYDEP:raspberrypi-armv7 = "${RASPBERRYPI_v7_KERNEL}:do_deploy" +do_deploy[depends] += "${DEPLOYDEP}" diff --git a/recipes-kernel/linux/linux-raspberrypi_6.6.bb b/recipes-kernel/linux/linux-raspberrypi_6.6.bb new file mode 100644 index 0000000..b4d9953 --- /dev/null +++ b/recipes-kernel/linux/linux-raspberrypi_6.6.bb @@ -0,0 +1,31 @@ +LINUX_VERSION ?= "6.6.22" +LINUX_RPI_BRANCH ?= "rpi-6.6.y" +LINUX_RPI_KMETA_BRANCH ?= "yocto-6.6" + +SRCREV_machine = "c04af98514c26014a4f29ec87b3ece95626059bd" +SRCREV_meta = "6a24861d6504575a4a9f92366285332d47c7e111" + +KMETA = "kernel-meta" + +SRC_URI = " \ + git://github.com/raspberrypi/linux.git;name=machine;branch=${LINUX_RPI_BRANCH};protocol=https \ + git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=${LINUX_RPI_KMETA_BRANCH};destsuffix=${KMETA} \ + file://powersave.cfg \ + file://android-drivers.cfg \ + " + +require linux-raspberrypi.inc + +KERNEL_DTC_FLAGS += "-@ -H epapr" + +RDEPENDS:${KERNEL_PACKAGE_NAME}:raspberrypi-armv7:append = " ${RASPBERRYPI_v7_KERNEL_PACKAGE_NAME}" +RDEPENDS:${KERNEL_PACKAGE_NAME}-base:raspberrypi-armv7:append = " ${RASPBERRYPI_v7_KERNEL_PACKAGE_NAME}-base" +RDEPENDS:${KERNEL_PACKAGE_NAME}-image:raspberrypi-armv7:append = " ${RASPBERRYPI_v7_KERNEL_PACKAGE_NAME}-image" +RDEPENDS:${KERNEL_PACKAGE_NAME}-dev:raspberrypi-armv7:append = " ${RASPBERRYPI_v7_KERNEL_PACKAGE_NAME}-dev" +RDEPENDS:${KERNEL_PACKAGE_NAME}-vmlinux:raspberrypi-armv7:append = " ${RASPBERRYPI_v7_KERNEL_PACKAGE_NAME}-vmlinux" +RDEPENDS:${KERNEL_PACKAGE_NAME}-modules:raspberrypi-armv7:append = " ${RASPBERRYPI_v7_KERNEL_PACKAGE_NAME}-modules" +RDEPENDS:${KERNEL_PACKAGE_NAME}-dbg:raspberrypi-armv7:append = " ${RASPBERRYPI_v7_KERNEL_PACKAGE_NAME}-dbg" + +DEPLOYDEP = "" +DEPLOYDEP:raspberrypi-armv7 = "${RASPBERRYPI_v7_KERNEL}:do_deploy" +do_deploy[depends] += "${DEPLOYDEP}" |