aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/premerge.yml16
-rw-r--r--.github/workflows/push.yml21
-rw-r--r--README.md17
-rw-r--r--conf/layer.conf2
-rw-r--r--conf/machine/dragonboard-410c.conf4
-rw-r--r--conf/machine/dragonboard-600c.conf2
-rw-r--r--conf/machine/dragonboard-820c.conf3
-rw-r--r--conf/machine/dragonboard-845c.conf4
-rw-r--r--conf/machine/evb4k-qcs404.conf2
-rw-r--r--conf/machine/ifc6410.conf2
-rw-r--r--conf/machine/include/qcom-apq8016.inc31
-rw-r--r--conf/machine/include/qcom-apq8064.inc29
-rw-r--r--conf/machine/include/qcom-apq8096.inc30
-rw-r--r--conf/machine/include/qcom-common.inc41
-rw-r--r--conf/machine/include/qcom-qcs404.inc11
-rw-r--r--conf/machine/include/qcom-sa8155p.inc14
-rw-r--r--conf/machine/include/qcom-sdm845.inc29
-rw-r--r--conf/machine/include/qcom-sm8250.inc29
-rw-r--r--conf/machine/qcom-armv7a.conf38
-rw-r--r--conf/machine/qcom-armv8a.conf50
-rw-r--r--conf/machine/qrb5165-rb5.conf15
-rw-r--r--conf/machine/sa8155p-adp.conf24
-rw-r--r--conf/machine/sd-600eval.conf2
-rw-r--r--conf/machine/sm8250-mtp.conf2
-rw-r--r--dynamic-layers/backports-layer/recipes-devtools/android-tools/android-tools-conf-configfs/qcom/android-gadget-setup.machine4
-rw-r--r--dynamic-layers/backports-layer/recipes-devtools/android-tools/android-tools-conf-configfs_%.bbappend5
-rw-r--r--dynamic-layers/backports-layer/recipes-multimedia/alsa/alsa-ucm-conf/0001-ucm2-Separate-the-configuration-lookups-hw-based-fro.patch86
-rw-r--r--dynamic-layers/backports-layer/recipes-multimedia/alsa/alsa-ucm-conf/0001-ucm2-codecs-lpass-add-codec-sequences-for-wsa-and-va.patch75
-rw-r--r--dynamic-layers/backports-layer/recipes-multimedia/alsa/alsa-ucm-conf/0001-ucm2-conf.d-add-symlinks-for-Qualcomm-cards.patch44
-rw-r--r--dynamic-layers/backports-layer/recipes-multimedia/alsa/alsa-ucm-conf/0002-ucm2-add-support-to-for-Qualcomm-RB5-Platform.patch130
-rw-r--r--dynamic-layers/backports-layer/recipes-multimedia/alsa/alsa-ucm-conf_1.2.4.bbappend8
-rw-r--r--dynamic-layers/networking-layer/recipes-test/images/initramfs-test-image.bbappend5
-rw-r--r--dynamic-layers/openembedded-layer/recipes-test/images/initramfs-test-image.bbappend3
-rw-r--r--recipes-bsp/firmware/.gitignore2
-rw-r--r--recipes-bsp/firmware/firmware-qcom-dragonboard410c-bootloader-sdcard_17.09.bb1
-rw-r--r--recipes-bsp/firmware/firmware-qcom-dragonboard410c.inc36
-rw-r--r--recipes-bsp/firmware/firmware-qcom-dragonboard410c_1034.2.1.bb42
-rw-r--r--recipes-bsp/firmware/firmware-qcom-dragonboard410c_1036.1.bb15
-rw-r--r--recipes-bsp/firmware/firmware-qcom-dragonboard820c_01700.1.bb11
-rw-r--r--recipes-bsp/firmware/firmware-qcom-dragonboard845c_20190529180356-v4.bb38
-rw-r--r--recipes-bsp/firmware/firmware-qcom-rb5_20210331-v4.bb52
-rw-r--r--recipes-bsp/firmware/firmware-qcom-sd-600eval_1.0.bb3
-rw-r--r--recipes-devtools/qca-swiss-army-knife/qca-swiss-army-knife/0001-ath10k-bdencoder-Switch-to-python3.patch146
-rw-r--r--recipes-devtools/qca-swiss-army-knife/qca-swiss-army-knife/0001-read-powers-port-to-python3.patch212
-rw-r--r--recipes-devtools/qca-swiss-army-knife/qca-swiss-army-knife/0002-ath10k-bdencoder-Add-option-to-switch-to-ath11k-mode.patch116
-rw-r--r--recipes-devtools/qca-swiss-army-knife/qca-swiss-army-knife/0002-ath10k-fwencoder-port-to-python3.patch272
-rw-r--r--recipes-devtools/qca-swiss-army-knife/qca-swiss-army-knife/0003-scripts-port-to-python3.patch34
-rw-r--r--recipes-devtools/qca-swiss-army-knife/qca-swiss-army-knife/ath10k-generate-board-2_json.sh (renamed from recipes-bsp/firmware/firmware-qcom-dragonboard845c/generate_board-2_json.sh)19
-rw-r--r--recipes-devtools/qca-swiss-army-knife/qca-swiss-army-knife/ath11k-generate-board-2_json.sh23
-rw-r--r--recipes-devtools/qca-swiss-army-knife/qca-swiss-army-knife_git.bb32
-rw-r--r--recipes-devtools/skales/skales_git.bb4
-rw-r--r--recipes-graphics/mesa/mesa-20.3.0-rc2/0001-anv-fix-a-build-race-between-generating-a-header-and.patch31
-rw-r--r--recipes-graphics/mesa/mesa-20.3.0-rc2/0001-futex.h-Define-__NR_futex-if-it-does-not-exist.patch31
-rw-r--r--recipes-graphics/mesa/mesa-20.3.0-rc2/0002-meson.build-make-TLS-ELF-optional.patch46
-rw-r--r--recipes-graphics/mesa/mesa-20.3.0-rc2/0004-Revert-mesa-Enable-asm-unconditionally-now-that-gen_.patch147
-rw-r--r--recipes-graphics/mesa/mesa_%.bbappend24
-rw-r--r--recipes-graphics/mesa/mesa_20.3.0-rc2.bb35
-rw-r--r--recipes-graphics/xorg-xserver/xserver-xorg_%.bbappend5
-rw-r--r--recipes-kernel/images/initramfs-rootfs-image.bb26
-rw-r--r--recipes-kernel/linux-firmware/linux-firmware_%.bbappend9
-rw-r--r--recipes-kernel/linux/linux-linaro-qcom.inc46
-rw-r--r--recipes-kernel/linux/linux-linaro-qcomlt-dev.bb22
-rw-r--r--recipes-kernel/linux/linux-linaro-qcomlt/0001-Revert-kbuild-Enable-DT-schema-checks-for-.dtb-targe.patch46
-rw-r--r--recipes-kernel/linux/linux-linaro-qcomlt_4.14.bb17
-rw-r--r--recipes-kernel/linux/linux-linaro-qcomlt_5.10.bb6
-rw-r--r--recipes-kernel/linux/linux-linaro-qcomlt_5.12.bb9
-rw-r--r--recipes-kernel/linux/linux-linaro-qcomlt_5.13.bb6
-rw-r--r--recipes-kernel/linux/linux-linaro-qcomlt_5.15.bb11
-rw-r--r--recipes-kernel/linux/linux-linaro-qcomlt_5.2.bb17
-rw-r--r--recipes-kernel/linux/linux-linaro-qcomlt_5.4.bb17
-rw-r--r--recipes-kernel/linux/linux-linaro-qcomlt_5.7.bb15
-rw-r--r--recipes-kernel/linux/linux-linaro-qcomlt_5.9.bb9
-rw-r--r--recipes-kernel/linux/linux-qcom-bootimg.inc178
-rw-r--r--recipes-multimedia/alsa/alsa-ucm-conf/0001-ucm2-codecs-lpass-add-codec-sequences-for-wsa-and-va.patch70
-rw-r--r--recipes-multimedia/alsa/alsa-ucm-conf/0002-ucm2-add-support-to-for-Qualcomm-RB5-Platform.patch114
-rw-r--r--recipes-multimedia/alsa/alsa-ucm-conf_1.2.1.%.bbappend (renamed from recipes-multimedia/alsa/alsa-ucm-conf_1.2.%.bbappend)12
-rw-r--r--recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_%.bbappend3
-rw-r--r--recipes-rt/rt-tests/rt-tests_%.bbappend17
-rw-r--r--recipes-support/fastrpc/fastrpc/0001-apps_std_fopen_with_env-account-for-domain-kinds-whe.patch128
-rw-r--r--recipes-support/fastrpc/fastrpc/adsprpcd.service9
-rw-r--r--recipes-support/fastrpc/fastrpc/cdsprpcd.service9
-rw-r--r--recipes-support/fastrpc/fastrpc/mount-dsp.sh26
-rw-r--r--recipes-support/fastrpc/fastrpc/usr-lib-rfsa.service16
-rw-r--r--recipes-support/fastrpc/fastrpc_git.bb50
-rw-r--r--recipes-support/initrdscripts/files/copy-modules.sh17
-rw-r--r--recipes-support/initrdscripts/initramfs-module-copy-modules_1.0.bb15
-rw-r--r--recipes-support/pd-mapper/pd-mapper/0001-pd-mapper-Include-limits.h-for-PATH_MAX.patch29
-rw-r--r--recipes-support/pd-mapper/pd-mapper_git.bb3
-rw-r--r--recipes-support/qrtr/qrtr_git.bb4
-rw-r--r--recipes-support/rmtfs/rmtfs_git.bb4
-rw-r--r--recipes-test/images/initramfs-kerneltest-full-image.bb3
-rw-r--r--recipes-test/images/initramfs-kerneltest-image.bb3
-rw-r--r--recipes-test/images/initramfs-test-full-image.bb70
-rw-r--r--recipes-test/images/initramfs-test-image.bb54
-rw-r--r--recipes-test/images/initramfs-tiny-image.bb35
95 files changed, 2755 insertions, 525 deletions
diff --git a/.github/workflows/premerge.yml b/.github/workflows/premerge.yml
new file mode 100644
index 0000000..471bc9a
--- /dev/null
+++ b/.github/workflows/premerge.yml
@@ -0,0 +1,16 @@
+name: PR build
+
+on:
+ pull_request_target:
+
+jobs:
+ build:
+ uses: ndechesne/meta-qcom/.github/workflows/build-template.yml@master
+ with:
+ host: ubuntu-20.04
+ images: core-image-base core-image-weston core-image-x11 initramfs-test-image initramfs-test-full-image cryptodev-module
+ machines: dragonboard-410c dragonboard-845c qrb5165-rb5 qcom-armv8a sa8155p-adp
+ ref: refs/pull/${{github.event.pull_request.number}}/merge
+ branch: ${{github.base_ref}}
+ url: ${{github.server_url}}/${{github.repository}}
+ secrets: inherit
diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml
new file mode 100644
index 0000000..8c69c5d
--- /dev/null
+++ b/.github/workflows/push.yml
@@ -0,0 +1,21 @@
+name: Push build
+
+on:
+ push:
+ branches:
+ - master
+ - honister
+ - dunfell
+
+jobs:
+ build:
+ uses: ndechesne/meta-qcom/.github/workflows/build-template.yml@master
+ with:
+ host: ubuntu-20.04
+ images: core-image-base core-image-weston core-image-x11 initramfs-test-image initramfs-test-full-image cryptodev-module
+ machines: dragonboard-410c dragonboard-845c qrb5165-rb5 qcom-armv8a sa8155p-adp
+ ref: ${{github.sha}}
+ ref_type: sha
+ branch: ${{github.ref_name}}
+ url: ${{github.server_url}}/${{github.repository}}
+ secrets: inherit
diff --git a/README.md b/README.md
index 5702186..8bf3173 100644
--- a/README.md
+++ b/README.md
@@ -30,25 +30,14 @@ for the implementation details.
## Contributing
If you want to contribute changes, you can send Github pull requests at
-https://github.com/ndechesne/meta-qcom/pulls.
-
-Alternatively you can send patches to openembedded@lists.linaro.org, in which
-case, please:
-
-* When creating patches, please use something like:
-
-`git format-patch -s --subject-prefix='meta-qcom][PATCH' origin`
-
-* When sending patches, please use something like:
-
-`git send-email --to openembedded@lists.linaro.org <generated patch>`
+https://github.com/Linaro/meta-qcom/pulls.
You can discuss about this layer, on `#linaro` on FreeNode IRC network.
## Reporting issues
-Please report any issue on https://github.com/ndechesne/meta-qcom/issues
+Please report any issue on https://github.com/Linaro/meta-qcom/issues
## Maintainer(s)
-Nicolas Dechesne <nicolas.dechesne@linaro.org>
+Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
diff --git a/conf/layer.conf b/conf/layer.conf
index 5f3db02..821a90a 100644
--- a/conf/layer.conf
+++ b/conf/layer.conf
@@ -15,4 +15,6 @@ BBFILES_DYNAMIC += " \
openembedded-layer:${LAYERDIR}/dynamic-layers/openembedded-layer/*/*/*.bbappend \
networking-layer:${LAYERDIR}/dynamic-layers/networking-layer/*/*/*.bb \
networking-layer:${LAYERDIR}/dynamic-layers/networking-layer/*/*/*.bbappend \
+ backports:${LAYERDIR}/dynamic-layers/backports-layer/*/*/*.bb \
+ backports:${LAYERDIR}/dynamic-layers/backports-layer/*/*/*.bbappend \
"
diff --git a/conf/machine/dragonboard-410c.conf b/conf/machine/dragonboard-410c.conf
index 6ecfc60..08ff30d 100644
--- a/conf/machine/dragonboard-410c.conf
+++ b/conf/machine/dragonboard-410c.conf
@@ -20,10 +20,10 @@ MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += " \
linux-firmware-qcom-venus-1.8 \
"
-QCOM_BOOTIMG_ROOTFS ?= "mmcblk0p14"
+QCOM_BOOTIMG_ROOTFS ?= "/dev/mmcblk0p14"
# Define rootfs partiton (kernel argument)
-SD_QCOM_BOOTIMG_ROOTFS ?= "mmcblk1p7"
+SD_QCOM_BOOTIMG_ROOTFS ?= "/dev/mmcblk1p7"
UBOOT_MACHINE ?= "dragonboard410c_defconfig"
diff --git a/conf/machine/dragonboard-600c.conf b/conf/machine/dragonboard-600c.conf
index 595207b..8c815f8 100644
--- a/conf/machine/dragonboard-600c.conf
+++ b/conf/machine/dragonboard-600c.conf
@@ -18,4 +18,4 @@ KERNEL_DEVICETREE ?= "qcom-apq8064-db600c.dtb"
SERIAL_CONSOLE ?= "115200 ttyMSM0"
-QCOM_BOOTIMG_ROOTFS ?= "mmcblk0p12"
+QCOM_BOOTIMG_ROOTFS ?= "/dev/mmcblk0p12"
diff --git a/conf/machine/dragonboard-820c.conf b/conf/machine/dragonboard-820c.conf
index 347d2e1..b36d148 100644
--- a/conf/machine/dragonboard-820c.conf
+++ b/conf/machine/dragonboard-820c.conf
@@ -16,10 +16,11 @@ MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += " \
kernel-modules \
${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'linux-firmware-qcom-adreno-a530 mesa-driver-msm', '', d)} \
${@bb.utils.contains('DISTRO_FEATURES', 'wifi', 'linux-firmware-ath10k', '', d)} \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'linux-firmware-qca', '', d)} \
linux-firmware-qcom-venus-4.2 \
"
-QCOM_BOOTIMG_ROOTFS ?= "sda1"
+QCOM_BOOTIMG_ROOTFS ?= "/dev/sda1"
UBOOT_MACHINE ?= "dragonboard820c_defconfig"
diff --git a/conf/machine/dragonboard-845c.conf b/conf/machine/dragonboard-845c.conf
index b9dde33..e5f0755 100644
--- a/conf/machine/dragonboard-845c.conf
+++ b/conf/machine/dragonboard-845c.conf
@@ -8,6 +8,7 @@ MACHINE_FEATURES = "usbhost usbgadget alsa screen wifi bluetooth ext2"
KERNEL_IMAGETYPE ?= "Image.gz"
KERNEL_DEVICETREE ?= "qcom/sdm845-db845c.dtb"
+KERNEL_CMDLINE_EXTRA ?= "clk_ignore_unused pd_ignore_unused"
SERIAL_CONSOLE ?= "115200 ttyMSM0"
@@ -19,10 +20,11 @@ MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += " \
linux-firmware-qcom-sdm845-audio \
linux-firmware-qcom-sdm845-compute \
${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'linux-firmware-qcom-adreno-a630 mesa-driver-msm', '', d)} \
+ linux-firmware-qcom-venus-5.2 \
"
# /dev/sda1 is 'rootfs' partition after installing the latest bootloader package from linaro
-QCOM_BOOTIMG_ROOTFS ?= "sda1"
+QCOM_BOOTIMG_ROOTFS ?= "/dev/sda1"
# UFS partitions setup with 4096 logical sector size
EXTRA_IMAGECMD_ext4 += " -b 4096 "
diff --git a/conf/machine/evb4k-qcs404.conf b/conf/machine/evb4k-qcs404.conf
index 9664bed..4021746 100644
--- a/conf/machine/evb4k-qcs404.conf
+++ b/conf/machine/evb4k-qcs404.conf
@@ -16,4 +16,4 @@ MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += " \
kernel-modules \
"
-QCOM_BOOTIMG_ROOTFS ?= "mmcblk0p27"
+QCOM_BOOTIMG_ROOTFS ?= "/dev/mmcblk0p27"
diff --git a/conf/machine/ifc6410.conf b/conf/machine/ifc6410.conf
index 40d89b7..e0cffcf 100644
--- a/conf/machine/ifc6410.conf
+++ b/conf/machine/ifc6410.conf
@@ -17,6 +17,6 @@ KERNEL_DEVICETREE ?= "qcom-apq8064-ifc6410.dtb"
SERIAL_CONSOLE ?= "115200 ttyMSM0"
-QCOM_BOOTIMG_ROOTFS ?= "mmcblk0p12"
+QCOM_BOOTIMG_ROOTFS ?= "/dev/mmcblk0p12"
INHERIT += "qcom-firmware-mount"
diff --git a/conf/machine/include/qcom-apq8016.inc b/conf/machine/include/qcom-apq8016.inc
index 2688b20..a073ae7 100644
--- a/conf/machine/include/qcom-apq8016.inc
+++ b/conf/machine/include/qcom-apq8016.inc
@@ -1,26 +1,5 @@
SOC_FAMILY = "apq8016"
-require conf/machine/include/soc-family.inc
-
-XSERVER_OPENGL ?= " \
- xf86-video-modesetting \
- xserver-xorg-extension-glx \
-"
-
-XSERVER ?= " \
- xserver-xorg \
- xserver-xorg-module-libint10 \
- ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', '${XSERVER_OPENGL}', 'xf86-video-fbdev', d)} \
- xf86-input-evdev \
- xf86-input-mouse \
- xf86-input-keyboard \
-"
-
-PREFERRED_PROVIDER_virtual/egl ?= "mesa"
-PREFERRED_PROVIDER_virtual/libgl ?= "mesa"
-PREFERRED_PROVIDER_virtual/libgles1 ?= "mesa"
-PREFERRED_PROVIDER_virtual/libgles2 ?= "mesa"
-PREFERRED_PROVIDER_virtual/xserver ?= "xserver-xorg"
-PREFERRED_PROVIDER_virtual/kernel ?= "linux-linaro-qcomlt"
+require conf/machine/include/qcom-common.inc
MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += " \
qrtr \
@@ -31,9 +10,5 @@ MACHINE_EXTRA_RRECOMMENDS += " \
fastrpc \
"
-# Fastboot expects an ext4 image, which needs to be 4096 aligned
-IMAGE_FSTYPES ?= "ext4.gz"
-IMAGE_ROOTFS_ALIGNMENT = "4096"
-
-QCOM_BOOTIMG_KERNEL_BASE ?= "0x80000000"
-QCOM_BOOTIMG_PAGE_SIZE ?= "2048"
+# Android boot image settings
+QCOM_BOOTIMG_PAGE_SIZE = "2048"
diff --git a/conf/machine/include/qcom-apq8064.inc b/conf/machine/include/qcom-apq8064.inc
index b0da78e..af8e87a 100644
--- a/conf/machine/include/qcom-apq8064.inc
+++ b/conf/machine/include/qcom-apq8064.inc
@@ -1,29 +1,6 @@
SOC_FAMILY = "apq8064"
-require conf/machine/include/soc-family.inc
+require conf/machine/include/qcom-common.inc
require conf/machine/include/tune-cortexa8.inc
-XSERVER_OPENGL ?= "xf86-video-modesetting \
- xserver-xorg-extension-glx \
- "
-
-XSERVER = " \
- xserver-xorg \
- ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', '${XSERVER_OPENGL}', 'xf86-video-fbdev', d)} \
- xf86-input-mouse \
- xf86-input-keyboard \
- xf86-input-evdev \
-"
-
-PREFERRED_PROVIDER_virtual/egl ?= "mesa"
-PREFERRED_PROVIDER_virtual/libgl ?= "mesa"
-PREFERRED_PROVIDER_virtual/libgles1 ?= "mesa"
-PREFERRED_PROVIDER_virtual/libgles2 ?= "mesa"
-PREFERRED_PROVIDER_virtual/xserver = "xserver-xorg"
-PREFERRED_PROVIDER_virtual/kernel = "linux-linaro-qcomlt"
-
-# Fastboot expects an ext4 image, which needs to be 4096 aligned
-IMAGE_FSTYPES ?= "ext4.gz"
-IMAGE_ROOTFS_ALIGNMENT = "4096"
-
-QCOM_BOOTIMG_KERNEL_BASE ?= "0x80200000"
-QCOM_BOOTIMG_PAGE_SIZE ?= "2048"
+# Android boot image settings
+QCOM_BOOTIMG_PAGE_SIZE = "2048"
diff --git a/conf/machine/include/qcom-apq8096.inc b/conf/machine/include/qcom-apq8096.inc
index 3a6a08b..8038091 100644
--- a/conf/machine/include/qcom-apq8096.inc
+++ b/conf/machine/include/qcom-apq8096.inc
@@ -1,28 +1,7 @@
SOC_FAMILY = "apq8096"
-require conf/machine/include/soc-family.inc
+require conf/machine/include/qcom-common.inc
require conf/machine/include/arm/arch-armv8a.inc
-XSERVER_OPENGL ?= " \
- xf86-video-modesetting \
- xserver-xorg-extension-glx \
-"
-
-XSERVER ?= " \
- xserver-xorg \
- xserver-xorg-module-libint10 \
- ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', '${XSERVER_OPENGL}', 'xf86-video-fbdev', d)} \
- xf86-input-evdev \
- xf86-input-mouse \
- xf86-input-keyboard \
-"
-
-PREFERRED_PROVIDER_virtual/egl ?= "mesa"
-PREFERRED_PROVIDER_virtual/libgl ?= "mesa"
-PREFERRED_PROVIDER_virtual/libgles1 ?= "mesa"
-PREFERRED_PROVIDER_virtual/libgles2 ?= "mesa"
-PREFERRED_PROVIDER_virtual/xserver ?= "xserver-xorg"
-PREFERRED_PROVIDER_virtual/kernel ?= "linux-linaro-qcomlt"
-
MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += " \
qrtr \
rmtfs \
@@ -31,10 +10,3 @@ MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += " \
MACHINE_EXTRA_RRECOMMENDS += " \
fastrpc \
"
-
-# Fastboot expects an ext4 image, which needs to be 4096 aligned
-IMAGE_FSTYPES ?= "ext4.gz"
-IMAGE_ROOTFS_ALIGNMENT = "4096"
-
-QCOM_BOOTIMG_KERNEL_BASE ?= "0x80000000"
-QCOM_BOOTIMG_PAGE_SIZE ?= "4096"
diff --git a/conf/machine/include/qcom-common.inc b/conf/machine/include/qcom-common.inc
new file mode 100644
index 0000000..18b9ce7
--- /dev/null
+++ b/conf/machine/include/qcom-common.inc
@@ -0,0 +1,41 @@
+SOC_FAMILY_prepend = "qcom:"
+require conf/machine/include/soc-family.inc
+
+XSERVER_OPENGL ?= " \
+ xf86-video-modesetting \
+ xserver-xorg-extension-glx \
+"
+
+XSERVER ?= " \
+ xserver-xorg \
+ xserver-xorg-module-libint10 \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', '${XSERVER_OPENGL}', 'xf86-video-fbdev', d)} \
+ xf86-input-evdev \
+ xf86-input-mouse \
+ xf86-input-keyboard \
+"
+
+PREFERRED_PROVIDER_virtual/egl ?= "mesa"
+PREFERRED_PROVIDER_virtual/libgl ?= "mesa"
+PREFERRED_PROVIDER_virtual/libgles1 ?= "mesa"
+PREFERRED_PROVIDER_virtual/libgles2 ?= "mesa"
+PREFERRED_PROVIDER_virtual/xserver ?= "xserver-xorg"
+PREFERRED_PROVIDER_virtual/kernel ?= "linux-linaro-qcomlt"
+
+PREFERRED_PROVIDER_android-tools-conf = "android-tools-conf-configfs"
+
+# Fastboot expects an ext4 image, which needs to be 4096 aligned
+IMAGE_FSTYPES ?= "ext4.gz"
+IMAGE_ROOTFS_ALIGNMENT ?= "4096"
+
+# Android boot image settings
+QCOM_BOOTIMG_KERNEL_BASE ?= "0x80000000"
+QCOM_BOOTIMG_PAGE_SIZE ?= "4096"
+
+# Default serial console for QCOM devices
+SERIAL_CONSOLES ?= "115200;ttyMSM0"
+
+# Increase INITRAMFS_MAXSIZE to 384 MiB to cover initramfs-kerneltest-full
+# image. All our boards (except db410c) have 2GiB and db410c has 1GiB of RAM,
+# so this image would fit.
+INITRAMFS_MAXSIZE = "393216"
diff --git a/conf/machine/include/qcom-qcs404.inc b/conf/machine/include/qcom-qcs404.inc
index 9c556d3..90f9acb 100644
--- a/conf/machine/include/qcom-qcs404.inc
+++ b/conf/machine/include/qcom-qcs404.inc
@@ -1,16 +1,7 @@
SOC_FAMILY = "qcs404"
-require conf/machine/include/soc-family.inc
+require conf/machine/include/qcom-common.inc
require conf/machine/include/arm/arch-armv8a.inc
-PREFERRED_PROVIDER_virtual/kernel ?= "linux-linaro-qcomlt"
-
MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += " \
qrtr \
"
-
-# Fastboot expects an ext4 image, which needs to be 4096 aligned
-IMAGE_FSTYPES ?= "ext4.gz"
-IMAGE_ROOTFS_ALIGNMENT = "4096"
-
-QCOM_BOOTIMG_KERNEL_BASE ?= "0x80000000"
-QCOM_BOOTIMG_PAGE_SIZE ?= "4096"
diff --git a/conf/machine/include/qcom-sa8155p.inc b/conf/machine/include/qcom-sa8155p.inc
new file mode 100644
index 0000000..b3b521e
--- /dev/null
+++ b/conf/machine/include/qcom-sa8155p.inc
@@ -0,0 +1,14 @@
+SOC_FAMILY = "sa8155p"
+require conf/machine/include/qcom-common.inc
+require conf/machine/include/arm/arch-armv8a.inc
+
+MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += " \
+ pd-mapper \
+ qrtr \
+ rmtfs \
+ tqftpserv \
+"
+
+MACHINE_EXTRA_RRECOMMENDS += " \
+ fastrpc \
+"
diff --git a/conf/machine/include/qcom-sdm845.inc b/conf/machine/include/qcom-sdm845.inc
index e3839b1..43dded1 100644
--- a/conf/machine/include/qcom-sdm845.inc
+++ b/conf/machine/include/qcom-sdm845.inc
@@ -1,28 +1,7 @@
SOC_FAMILY = "sdm845"
-require conf/machine/include/soc-family.inc
+require conf/machine/include/qcom-common.inc
require conf/machine/include/arm/arch-armv8a.inc
-XSERVER_OPENGL ?= " \
- xf86-video-modesetting \
- xserver-xorg-extension-glx \
-"
-
-XSERVER ?= " \
- xserver-xorg \
- xserver-xorg-module-libint10 \
- ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', '${XSERVER_OPENGL}', 'xf86-video-fbdev', d)} \
- xf86-input-evdev \
- xf86-input-mouse \
- xf86-input-keyboard \
-"
-
-PREFERRED_PROVIDER_virtual/egl ?= "mesa"
-PREFERRED_PROVIDER_virtual/libgl ?= "mesa"
-PREFERRED_PROVIDER_virtual/libgles1 ?= "mesa"
-PREFERRED_PROVIDER_virtual/libgles2 ?= "mesa"
-PREFERRED_PROVIDER_virtual/xserver ?= "xserver-xorg"
-PREFERRED_PROVIDER_virtual/kernel ?= "linux-linaro-qcomlt"
-
MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += " \
pd-mapper \
qrtr \
@@ -33,9 +12,3 @@ MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += " \
MACHINE_EXTRA_RRECOMMENDS += " \
fastrpc \
"
-
-IMAGE_FSTYPES ?= "ext4.gz"
-IMAGE_ROOTFS_ALIGNMENT = "4096"
-
-QCOM_BOOTIMG_KERNEL_BASE ?= "0x80000000"
-QCOM_BOOTIMG_PAGE_SIZE ?= "4096"
diff --git a/conf/machine/include/qcom-sm8250.inc b/conf/machine/include/qcom-sm8250.inc
index 5039ba0..13bcf5b 100644
--- a/conf/machine/include/qcom-sm8250.inc
+++ b/conf/machine/include/qcom-sm8250.inc
@@ -1,28 +1,7 @@
SOC_FAMILY = "sm8250"
-require conf/machine/include/soc-family.inc
+require conf/machine/include/qcom-common.inc
require conf/machine/include/arm/arch-armv8a.inc
-XSERVER_OPENGL ?= " \
- xf86-video-modesetting \
- xserver-xorg-extension-glx \
-"
-
-XSERVER ?= " \
- xserver-xorg \
- xserver-xorg-module-libint10 \
- ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', '${XSERVER_OPENGL}', 'xf86-video-fbdev', d)} \
- xf86-input-evdev \
- xf86-input-mouse \
- xf86-input-keyboard \
-"
-
-PREFERRED_PROVIDER_virtual/egl ?= "mesa"
-PREFERRED_PROVIDER_virtual/libgl ?= "mesa"
-PREFERRED_PROVIDER_virtual/libgles1 ?= "mesa"
-PREFERRED_PROVIDER_virtual/libgles2 ?= "mesa"
-PREFERRED_PROVIDER_virtual/xserver ?= "xserver-xorg"
-PREFERRED_PROVIDER_virtual/kernel ?= "linux-linaro-qcomlt"
-
MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += " \
pd-mapper \
qrtr \
@@ -33,9 +12,3 @@ MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += " \
MACHINE_EXTRA_RRECOMMENDS += " \
fastrpc \
"
-
-IMAGE_FSTYPES ?= "ext4.gz"
-IMAGE_ROOTFS_ALIGNMENT = "4096"
-
-QCOM_BOOTIMG_KERNEL_BASE ?= "0x80000000"
-QCOM_BOOTIMG_PAGE_SIZE ?= "4096"
diff --git a/conf/machine/qcom-armv7a.conf b/conf/machine/qcom-armv7a.conf
new file mode 100644
index 0000000..d71e366
--- /dev/null
+++ b/conf/machine/qcom-armv7a.conf
@@ -0,0 +1,38 @@
+#@TYPE: Machine
+#@NAME: Qualcomm Snapdragon ARMv7-a (with Krait cores)
+#@DESCRIPTION: Unified 32-bit machine configuration for the devices with Qualcomm Snapdragon ARMv7-a based CPUs (S4 and later)
+#
+# Note: This machine targets Snapdragon S4 Plus/Pro/Prime and early (32-bit
+# ARM) models of Snapdragon 400/600/800 series SoCs. It will most probably
+# work on Snapdragon S4 (MSM8x25, Cortex-A5 with VFPv4) or on 32-bit IPQ SoCs
+#
+# Do not use this machine for SDXnn modems or for Snapdragon S1/S2/S3.
+
+require conf/machine/include/qcom-common.inc
+
+# Krait is not Cortex-A15, but its features are close enough
+DEFAULTTUNE = "cortexa15thf-neon-vfpv4"
+require conf/machine/include/tune-cortexa15.inc
+
+# Android boot image settings
+QCOM_BOOTIMG_PAGE_SIZE = "2048"
+
+MACHINE_FEATURES = "alsa screen alsa bluetooth ext2 ext3 opengl usb usbhost usbgadget"
+
+KERNEL_IMAGETYPE ?= "zImage"
+KERNEL_DEVICETREE ?= " \
+ qcom-apq8064-asus-nexus7-flo.dtb \
+ qcom-apq8064-ifc6410.dtb \
+ qcom-apq8084-ifc6540.dtb \
+ qcom-msm8974-lge-nexus5-hammerhead.dtb \
+ qcom-msm8974-sony-xperia-castor.dtb \
+"
+
+MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += " \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'mesa-driver-msm', '', d)} \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'wifi', 'wireless-regdb-static', '', d)} \
+"
+
+SERIAL_CONSOLE ?= "115200 ttyMSM0"
+
+QCOM_BOOTIMG_ROOTFS ?= "PARTLABEL=userdata"
diff --git a/conf/machine/qcom-armv8a.conf b/conf/machine/qcom-armv8a.conf
new file mode 100644
index 0000000..54ab0cd
--- /dev/null
+++ b/conf/machine/qcom-armv8a.conf
@@ -0,0 +1,50 @@
+require conf/machine/include/qcom-common.inc
+require conf/machine/include/arm/arch-armv8a.inc
+
+MACHINE_FEATURES = "usbhost usbgadget alsa screen wifi bluetooth ext2"
+
+# UFS partitions in 820/845/RB5 setup with 4096 logical sector size
+EXTRA_IMAGECMD_ext4 += " -b 4096 "
+
+# Support for dragonboard{410, 820, 845}c, rb5
+KERNEL_IMAGETYPE ?= "Image.gz"
+SERIAL_CONSOLE ?= "115200 ttyMSM0"
+KERNEL_DEVICETREE ?= "qcom/apq8016-sbc.dtb qcom/apq8096-db820c.dtb qcom/sdm845-db845c.dtb qcom/qrb5165-rb5.dtb qcom/sm8250-rb5-dvt.dtb"
+
+QCOM_BOOTIMG_PAGE_SIZE[apq8016-sbc] = "2048"
+QCOM_BOOTIMG_ROOTFS = "/dev/sda1"
+QCOM_BOOTIMG_ROOTFS[apq8016-sbc] = "/dev/mmcblk0p14"
+SD_QCOM_BOOTIMG_ROOTFS[apq8016-sbc] = "/dev/mmcblk1p7"
+KERNEL_CMDLINE_EXTRA[sdm845-db845c] = "clk_ignore_unused pd_ignore_unused"
+
+# Userspace tools
+MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += " \
+ pd-mapper \
+ qrtr \
+ rmtfs \
+ tqftpserv \
+"
+
+MACHINE_EXTRA_RRECOMMENDS += " \
+ fastrpc \
+"
+
+# Modules and firmware for all supported machines
+MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += " \
+ kernel-modules \
+ firmware-qcom-dragonboard410c \
+ firmware-qcom-dragonboard820c \
+ firmware-qcom-dragonboard845c \
+ firmware-qcom-rb5 \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'wifi', 'linux-firmware-ath10k linux-firmware-ath11k linux-firmware-qcom-sdm845-modem wireless-regdb-static', '', d)} \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'linux-firmware-qca linux-firmware-qcom-sdm845-modem', '', d)} \
+ linux-firmware-qcom-sdm845-audio \
+ linux-firmware-qcom-sdm845-compute \
+ linux-firmware-qcom-sm8250-audio \
+ linux-firmware-qcom-sm8250-compute \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'linux-firmware-qcom-adreno-a3xx linux-firmware-qcom-adreno-a530 linux-firmware-qcom-adreno-a630 linux-firmware-qcom-adreno-a650', '', d)} \
+ linux-firmware-qcom-venus-1.8 \
+ linux-firmware-qcom-venus-4.2 \
+ linux-firmware-qcom-venus-5.2 \
+ linux-firmware-qcom-vpu-1.0 \
+"
diff --git a/conf/machine/qrb5165-rb5.conf b/conf/machine/qrb5165-rb5.conf
index 447c889..b27de12 100644
--- a/conf/machine/qrb5165-rb5.conf
+++ b/conf/machine/qrb5165-rb5.conf
@@ -7,19 +7,24 @@ require conf/machine/include/qcom-sm8250.inc
MACHINE_FEATURES = "usbhost usbgadget alsa screen wifi bluetooth ext2"
KERNEL_IMAGETYPE ?= "Image.gz"
-KERNEL_DEVICETREE ?= "qcom/qrb5165-rb5.dtb"
+KERNEL_DEVICETREE ?= "qcom/qrb5165-rb5.dtb qcom/sm8250-rb5-dvt.dtb"
+KERNEL_CMDLINE_EXTRA ?= "pcie_pme=nomsi"
SERIAL_CONSOLE ?= "115200 ttyMSM0"
MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += " \
kernel-modules \
+ firmware-qcom-rb5 linux-firmware-lt9611uxc \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'wifi', 'linux-firmware-ath11k wireless-regdb-static', '', d)} \
${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'linux-firmware-qca', '', d)} \
- ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'mesa-driver-msm', '', d)} \
+ linux-firmware-qcom-sm8250-audio \
+ linux-firmware-qcom-sm8250-compute \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'linux-firmware-qcom-adreno-a650 mesa-driver-msm', '', d)} \
+ linux-firmware-qcom-vpu-1.0 \
"
-# linux-firmware-qcom-adreno-a650
-# /dev/sda15 is 'userdata' partition, so wipe it and use for our build
-QCOM_BOOTIMG_ROOTFS ?= "sda15"
+# /dev/sda1 is 'rootfs' partition after installing the latest bootloader package from linaro
+QCOM_BOOTIMG_ROOTFS ?= "/dev/sda1"
# UFS partitions setup with 4096 logical sector size
EXTRA_IMAGECMD_ext4 += " -b 4096 "
diff --git a/conf/machine/sa8155p-adp.conf b/conf/machine/sa8155p-adp.conf
new file mode 100644
index 0000000..19734d9
--- /dev/null
+++ b/conf/machine/sa8155p-adp.conf
@@ -0,0 +1,24 @@
+#@TYPE: Machine
+#@NAME: SA8155P-ADP
+#@DESCRIPTION: Machine configuration for the SA8155P-ADP (and IOT v2) development board, with Qualcomm Snapdragon SA8155p.
+
+require conf/machine/include/qcom-sa8155p.inc
+
+MACHINE_FEATURES = "usbhost usbgadget ext2"
+
+KERNEL_IMAGETYPE ?= "Image.gz"
+KERNEL_DEVICETREE ?= "qcom/sa8155p-adp.dtb qcom/sa8155p-iot-v2-adp.dtb"
+
+SERIAL_CONSOLE ?= "115200 ttyMSM0"
+
+MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += " \
+ kernel-modules \
+"
+
+# /dev/sda6 is 'system' partition for adp board, but its very small, so we
+# use 'userdata' partition here.
+# /dev/sda9 is 'userdata' partition for adp board, so wipe it and use for our build
+QCOM_BOOTIMG_ROOTFS ?= "/dev/sda9"
+
+# UFS partitions setup with 4096 logical sector size
+EXTRA_IMAGECMD:ext4 += " -b 4096 "
diff --git a/conf/machine/sd-600eval.conf b/conf/machine/sd-600eval.conf
index f4ed1cb..f8c061a 100644
--- a/conf/machine/sd-600eval.conf
+++ b/conf/machine/sd-600eval.conf
@@ -18,4 +18,4 @@ KERNEL_DEVICETREE ?= "qcom-apq8064-arrow-sd-600eval.dtb"
SERIAL_CONSOLE ?= "115200 ttyMSM0"
-QCOM_BOOTIMG_ROOTFS ?= "mmcblk0p12"
+QCOM_BOOTIMG_ROOTFS ?= "/dev/mmcblk0p12"
diff --git a/conf/machine/sm8250-mtp.conf b/conf/machine/sm8250-mtp.conf
index d5f7eee..17a8887 100644
--- a/conf/machine/sm8250-mtp.conf
+++ b/conf/machine/sm8250-mtp.conf
@@ -19,7 +19,7 @@ MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += " \
# linux-firmware-qcom-adreno-a650
# /dev/sda15 is 'userdata' partition, so wipe it and use for our build
-QCOM_BOOTIMG_ROOTFS ?= "sda15"
+QCOM_BOOTIMG_ROOTFS ?= "/dev/sda15"
# UFS partitions setup with 4096 logical sector size
EXTRA_IMAGECMD_ext4 += " -b 4096 "
diff --git a/dynamic-layers/backports-layer/recipes-devtools/android-tools/android-tools-conf-configfs/qcom/android-gadget-setup.machine b/dynamic-layers/backports-layer/recipes-devtools/android-tools/android-tools-conf-configfs/qcom/android-gadget-setup.machine
new file mode 100644
index 0000000..37f26bb
--- /dev/null
+++ b/dynamic-layers/backports-layer/recipes-devtools/android-tools/android-tools-conf-configfs/qcom/android-gadget-setup.machine
@@ -0,0 +1,4 @@
+manufacturer=Qualcomm
+model=`hostname`
+androidserial="$(sed -n -e '/androidboot.serialno/ s/.*androidboot.serialno=\([^ ]*\).*/\1/gp ' /proc/cmdline)"
+[ -n "$androidserial" ] && serial="$androidserial"
diff --git a/dynamic-layers/backports-layer/recipes-devtools/android-tools/android-tools-conf-configfs_%.bbappend b/dynamic-layers/backports-layer/recipes-devtools/android-tools/android-tools-conf-configfs_%.bbappend
new file mode 100644
index 0000000..1e314d8
--- /dev/null
+++ b/dynamic-layers/backports-layer/recipes-devtools/android-tools/android-tools-conf-configfs_%.bbappend
@@ -0,0 +1,5 @@
+FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}:"
+
+SRC_URI_append_qcom = " \
+ file://android-gadget-setup.machine \
+"
diff --git a/dynamic-layers/backports-layer/recipes-multimedia/alsa/alsa-ucm-conf/0001-ucm2-Separate-the-configuration-lookups-hw-based-fro.patch b/dynamic-layers/backports-layer/recipes-multimedia/alsa/alsa-ucm-conf/0001-ucm2-Separate-the-configuration-lookups-hw-based-fro.patch
new file mode 100644
index 0000000..b16a241
--- /dev/null
+++ b/dynamic-layers/backports-layer/recipes-multimedia/alsa/alsa-ucm-conf/0001-ucm2-Separate-the-configuration-lookups-hw-based-fro.patch
@@ -0,0 +1,86 @@
+From 4cfceb1e257a91cf5c1d29f28d1305607bbf58eb Mon Sep 17 00:00:00 2001
+From: Jaroslav Kysela <perex@perex.cz>
+Date: Wed, 3 Feb 2021 17:13:01 +0100
+Subject: [PATCH] ucm2: Separate the configuration lookups (hw based) from the
+ configuration tree
+
+Introduce ucm2/conf.d/ tree with symlinks to the real hardware configurations.
+In this way, we do not rely to create the configuration paths based on
+simple driver / device identification, but we can store the configurations
+more logically to make the maintenance (code reuse, multiple changes)
+more easy.
+
+This commit keeps the older lookup paths active, but they will be
+turned off in the next release.
+
+BugLink: https://github.com/alsa-project/alsa-ucm-conf/pull/70
+BugLink: https://github.com/alsa-project/alsa-ucm-conf/pull/76
+BugLink: https://github.com/alsa-project/alsa-ucm-conf/pull/78
+Signed-off-by: Jaroslav Kysela <perex@perex.cz>
+---
+ ucm2/ucm.conf | 40 +++++++++++++++++++++++++++++++++++-----
+ 1 file changed, 35 insertions(+), 5 deletions(-)
+
+diff --git a/ucm2/ucm.conf b/ucm2/ucm.conf
+index 9e78df118f83..8577c300e46b 100644
+--- a/ucm2/ucm.conf
++++ b/ucm2/ucm.conf
+@@ -14,8 +14,9 @@
+ Syntax 3
+
+ Define.V1 "" # non-empty string to enable ucm v1 paths
+-Define.V2Module yes # empty string to disable
+-Define.V2Name yes # empty string to disable
++Define.V2ConfD yes # empty string to disable
++Define.V2Module yes # non-empty string to enable module name lookups (obsolete)
++Define.V2Name yes # non-empty string to enable driver & card name lookups (obsolete)
+
+ If.driver {
+ Condition {
+@@ -40,11 +41,40 @@ If.driver {
+ #
+ # The probed path when hw-card is found:
+ #
+- # ucm2/${KernelModule}/${KernelModule}.conf
+- # ucm2/${CardDriver}/${CardLongName}.conf
+- # ucm2/${CardDriver}/${CardDriver}.conf
++ # ucm2/conf.d/[${CardDriver}|${KernelDriver}]/${CardLongName}.conf
++ # ucm2/conf.d/[${CardDriver}|${KernelDriver}]/[${CardDriver}|${KernelDriver}].conf
++ # ucm2/${KernelModule}/${KernelModule}.conf (obsolete)
++ # ucm2/${CardDriver}/${CardLongName}.conf (obsolete)
++ # ucm2/${CardDriver}/${CardDriver}.conf (obsolete)
+ #
+
++ If.V2ConfD {
++ Condition {
++ Type String
++ Empty "${var:V2ConfD}"
++ }
++ False {
++ Define.Driver "${CardDriver}"
++ If.nodrv {
++ Condition {
++ Type String
++ Empty "${var:Driver}"
++ }
++ True.Define {
++ KernelDriverPath "class/sound/card${CardNumber}/device/driver"
++ Driver "${sys:$KernelDriverPath}"
++ }
++ }
++ UseCasePath.confd1 {
++ Directory "conf.d/${var:Driver}"
++ File "${CardLongName}.conf"
++ }
++ UseCasePath.confd2 {
++ Directory "conf.d/${var:Driver}"
++ File "${var:Driver}.conf"
++ }
++ }
++ }
+ If.V2Module {
+ Condition {
+ Type String
+--
+2.30.0
+
diff --git a/dynamic-layers/backports-layer/recipes-multimedia/alsa/alsa-ucm-conf/0001-ucm2-codecs-lpass-add-codec-sequences-for-wsa-and-va.patch b/dynamic-layers/backports-layer/recipes-multimedia/alsa/alsa-ucm-conf/0001-ucm2-codecs-lpass-add-codec-sequences-for-wsa-and-va.patch
new file mode 100644
index 0000000..7f664b1
--- /dev/null
+++ b/dynamic-layers/backports-layer/recipes-multimedia/alsa/alsa-ucm-conf/0001-ucm2-codecs-lpass-add-codec-sequences-for-wsa-and-va.patch
@@ -0,0 +1,75 @@
+From 5384a0ec52d2d8fd0bbcdab222b47d0887a058e4 Mon Sep 17 00:00:00 2001
+From: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
+Date: Fri, 20 Nov 2020 12:12:48 +0000
+Subject: [PATCH 1/2] ucm2: codecs: lpass: add codec sequences for wsa and va
+ macro
+
+Add enable/disable codec sequence for Qualcomm Low Power Audio
+Subsystem (LPASS) Codec WSA and VA Macros.
+
+Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
+---
+ ucm2/codecs/lpass/va-macro/DMIC0DisableSeq.conf | 3 +++
+ ucm2/codecs/lpass/va-macro/DMIC0EnableSeq.conf | 3 +++
+ ucm2/codecs/lpass/wsa-macro/SpeakerDisableSeq.conf | 8 ++++++++
+ ucm2/codecs/lpass/wsa-macro/SpeakerEnableSeq.conf | 8 ++++++++
+ 4 files changed, 22 insertions(+)
+ create mode 100644 ucm2/codecs/lpass/va-macro/DMIC0DisableSeq.conf
+ create mode 100644 ucm2/codecs/lpass/va-macro/DMIC0EnableSeq.conf
+ create mode 100644 ucm2/codecs/lpass/wsa-macro/SpeakerDisableSeq.conf
+ create mode 100644 ucm2/codecs/lpass/wsa-macro/SpeakerEnableSeq.conf
+
+diff --git a/ucm2/codecs/lpass/va-macro/DMIC0DisableSeq.conf b/ucm2/codecs/lpass/va-macro/DMIC0DisableSeq.conf
+new file mode 100644
+index 0000000..ec3f45a
+--- /dev/null
++++ b/ucm2/codecs/lpass/va-macro/DMIC0DisableSeq.conf
+@@ -0,0 +1,5 @@
++DisableSequence [
++ cset "name='VA DMIC MUX0' ZERO"
++ cset "name='VA_DEC0 Volume' 0"
++ cset "name='VA_AIF1_CAP Mixer DEC0' 0"
++]
+diff --git a/ucm2/codecs/lpass/va-macro/DMIC0EnableSeq.conf b/ucm2/codecs/lpass/va-macro/DMIC0EnableSeq.conf
+new file mode 100644
+index 0000000..bd6e8f5
+--- /dev/null
++++ b/ucm2/codecs/lpass/va-macro/DMIC0EnableSeq.conf
+@@ -0,0 +1,5 @@
++EnableSequence [
++ cset "name='VA DMIC MUX0' DMIC0"
++ cset "name='VA_AIF1_CAP Mixer DEC0' 1"
++ cset "name='VA_DEC0 Volume' 100"
++]
+diff --git a/ucm2/codecs/lpass/wsa-macro/SpeakerDisableSeq.conf b/ucm2/codecs/lpass/wsa-macro/SpeakerDisableSeq.conf
+new file mode 100644
+index 0000000..1f27d4c
+--- /dev/null
++++ b/ucm2/codecs/lpass/wsa-macro/SpeakerDisableSeq.conf
+@@ -0,0 +1,10 @@
++DisableSequence [
++ cset "name='WSA_RX0 Digital Volume' 0"
++ cset "name='WSA_RX1 Digital Volume' 0"
++ cset "name='WSA_COMP1 Switch' 0"
++ cset "name='WSA_COMP2 Switch' 0"
++ cset "name='WSA_RX0 INP0' ZERO"
++ cset "name='WSA_RX1 INP0' ZERO"
++ cset "name='WSA RX0 MUX' ZERO"
++ cset "name='WSA RX1 MUX' ZERO"
++]
+diff --git a/ucm2/codecs/lpass/wsa-macro/SpeakerEnableSeq.conf b/ucm2/codecs/lpass/wsa-macro/SpeakerEnableSeq.conf
+new file mode 100644
+index 0000000..618bab4
+--- /dev/null
++++ b/ucm2/codecs/lpass/wsa-macro/SpeakerEnableSeq.conf
+@@ -0,0 +1,10 @@
++EnableSequence [
++ cset "name='WSA RX0 MUX' AIF1_PB"
++ cset "name='WSA RX1 MUX' AIF1_PB"
++ cset "name='WSA_RX0 INP0' RX0"
++ cset "name='WSA_RX1 INP0' RX1"
++ cset "name='WSA_COMP1 Switch' 1"
++ cset "name='WSA_COMP2 Switch' 1"
++ cset "name='WSA_RX0 Digital Volume' 68"
++ cset "name='WSA_RX1 Digital Volume' 68"
++]
diff --git a/dynamic-layers/backports-layer/recipes-multimedia/alsa/alsa-ucm-conf/0001-ucm2-conf.d-add-symlinks-for-Qualcomm-cards.patch b/dynamic-layers/backports-layer/recipes-multimedia/alsa/alsa-ucm-conf/0001-ucm2-conf.d-add-symlinks-for-Qualcomm-cards.patch
new file mode 100644
index 0000000..d2083b0
--- /dev/null
+++ b/dynamic-layers/backports-layer/recipes-multimedia/alsa/alsa-ucm-conf/0001-ucm2-conf.d-add-symlinks-for-Qualcomm-cards.patch
@@ -0,0 +1,44 @@
+From 2957017f9ca01b0e1e127c04ba47e0147bff7e47 Mon Sep 17 00:00:00 2001
+From: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
+Date: Fri, 5 Feb 2021 20:45:40 +0300
+Subject: [PATCH] ucm2/conf.d: add symlinks for Qualcomm cards
+
+Add ucm2/conf.d symlinks for all defined Qualcomm sound cards.
+
+Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
+---
+ ucm2/conf.d/DB820c/DB820c.conf | 1 +
+ ucm2/conf.d/DB410c/DB410c.conf | 1 +
+ ucm2/conf.d/sdm845/DB845c.conf | 1 +
+ 3 files changed, 3 insertions(+)
+ create mode 120000 ucm2/conf.d/DB820c/DB820c.conf
+ create mode 120000 ucm2/conf.d/DB410c/DB410c.conf
+ create mode 120000 ucm2/conf.d/sdm845/DB845c.conf
+
+diff --git a/ucm2/conf.d/DB820c/DB820c.conf b/ucm2/conf.d/DB820c/DB820c.conf
+new file mode 120000
+index 000000000000..b8ceeabaa70d
+--- /dev/null
++++ b/ucm2/conf.d/DB820c/DB820c.conf
+@@ -0,0 +1 @@
++../../Qualcomm/apq8096/apq8096.conf
+\ No newline at end of file
+diff --git a/ucm2/conf.d/DB410c/DB410c.conf b/ucm2/conf.d/DB410c/DB410c.conf
+new file mode 120000
+index 000000000000..551122e14c16
+--- /dev/null
++++ b/ucm2/conf.d/DB410c/DB410c.conf
+@@ -0,0 +1 @@
++../../Qualcomm/apq8016-sbc/apq8016-sbc.conf
+\ No newline at end of file
+diff --git a/ucm2/conf.d/sdm845/DB845c.conf b/ucm2/conf.d/sdm845/DB845c.conf
+new file mode 120000
+index 000000000000..fad79da8dd8e
+--- /dev/null
++++ b/ucm2/conf.d/sdm845/DB845c.conf
+@@ -0,0 +1 @@
++../../Qualcomm/sdm845/sdm845.conf
+\ No newline at end of file
+--
+2.30.0
+
diff --git a/dynamic-layers/backports-layer/recipes-multimedia/alsa/alsa-ucm-conf/0002-ucm2-add-support-to-for-Qualcomm-RB5-Platform.patch b/dynamic-layers/backports-layer/recipes-multimedia/alsa/alsa-ucm-conf/0002-ucm2-add-support-to-for-Qualcomm-RB5-Platform.patch
new file mode 100644
index 0000000..b972cf5
--- /dev/null
+++ b/dynamic-layers/backports-layer/recipes-multimedia/alsa/alsa-ucm-conf/0002-ucm2-add-support-to-for-Qualcomm-RB5-Platform.patch
@@ -0,0 +1,130 @@
+From 382366c1f615613e088982a6c30fc90b3226ae8b Mon Sep 17 00:00:00 2001
+From: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
+Date: Fri, 20 Nov 2020 12:14:31 +0000
+Subject: [PATCH 2/2] ucm2: add support to for Qualcomm RB5 Platform
+
+The Qualcomm RB5 Robotics Platform contains HDMI,
+2x WSA Smart-Speakers audio outputs along with One
+Onboard DMIC audio input.
+
+Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
+---
+ ucm2/Qualcomm/sm8250/HDMI.conf | 26 ++++++++++++
+ ucm2/Qualcomm/sm8250/HiFi.conf | 46 ++++++++++++++++++++++
+ .../Qualcomm-RB5-WSA8815-Speakers-DMIC0.conf | 11 ++++++
+ ucm2/conf.d/sm8250/Qualcomm-RB5-WSA8815-Speakers-DMIC0.conf | 1 +
+ 4 files changed, 84 insertions(+)
+ create mode 100644 ucm2/Qualcomm/sm8250/HDMI.conf
+ create mode 100644 ucm2/Qualcomm/sm8250/HiFi.conf
+ create mode 100644 ucm2/Qualcomm/sm8250/Qualcomm-RB5-WSA8815-Speakers-DMIC0.conf
+ create mode 120000 ucm2/conf.d/sm8250/Qualcomm-RB5-WSA8815-Speakers-DMIC0.conf
+
+diff --git a/ucm2/Qualcomm/sm8250/HDMI.conf b/ucm2/Qualcomm/sm8250/HDMI.conf
+new file mode 100644
+index 0000000..a9594fd
+--- /dev/null
++++ b/ucm2/Qualcomm/sm8250/HDMI.conf
+@@ -0,0 +1,26 @@
++# Use case configuration for RB5 board.
++# Author: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
++
++SectionVerb {
++ EnableSequence [
++ cset "name='TERT_MI2S_RX Audio Mixer MultiMedia1' 1"
++ ]
++
++ DisableSequence [
++ cset "name='TERT_MI2S_RX Audio Mixer MultiMedia1' 0"
++ ]
++
++ Value {
++ TQ "HiFi"
++ }
++}
++
++SectionDevice."HDMI" {
++ #Name "HDMI"
++ Comment "HDMI Digital Stereo Output"
++
++ Value {
++ PlaybackPCM "hw:${CardId}"
++ PlaybackPriority 200
++ }
++}
+diff --git a/ucm2/Qualcomm/sm8250/HiFi.conf b/ucm2/Qualcomm/sm8250/HiFi.conf
+new file mode 100644
+index 0000000..a310402
+--- /dev/null
++++ b/ucm2/Qualcomm/sm8250/HiFi.conf
+@@ -0,0 +1,46 @@
++# Use case configuration for Qualcomm RB5.
++# Author: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
++
++SectionVerb {
++
++ EnableSequence [
++ cset "name='WSA_CODEC_DMA_RX_0 Audio Mixer MultiMedia2' 1"
++ cset "name='MultiMedia3 Mixer VA_CODEC_DMA_TX_0' 1"
++ ]
++
++ Include.wsae.File "/codecs/wsa881x/DefaultEnableSeq.conf"
++
++ DisableSequence [
++ cset "name='WSA_CODEC_DMA_RX_0 Audio Mixer MultiMedia2' 0"
++ cset "name='MultiMedia3 Mixer VA_CODEC_DMA_TX_0' 0"
++ ]
++
++ Value {
++ TQ "HiFi"
++ }
++}
++
++SectionDevice."Speaker" {
++ Comment "Speaker playback"
++
++ Include.lpasswsae.File "/codecs/lpass/wsa-macro/SpeakerEnableSeq.conf"
++ Include.wsae.File "/codecs/wsa881x/SpeakerEnableSeq.conf"
++ Include.wsad.File "/codecs/wsa881x/SpeakerDisableSeq.conf"
++ Include.lpasswsad.File "/codecs/lpass/wsa-macro/SpeakerDisableSeq.conf"
++
++ Value {
++ PlaybackPriority 100
++ PlaybackPCM "hw:${CardId},1"
++ }
++}
++
++SectionDevice."Mic" {
++ Comment "Mic"
++ Include.lpassvad.File "/codecs/lpass/va-macro/DMIC0EnableSeq.conf"
++ Include.lpassvad.File "/codecs/lpass/va-macro/DMIC0DisableSeq.conf"
++
++ Value {
++ CapturePriority 100
++ CapturePCM "hw:${CardId},2"
++ }
++}
+diff --git a/ucm2/Qualcomm/sm8250/Qualcomm-RB5-WSA8815-Speakers-DMIC0.conf b/ucm2/Qualcomm/sm8250/Qualcomm-RB5-WSA8815-Speakers-DMIC0.conf
+new file mode 100644
+index 0000000..2fbca31
+--- /dev/null
++++ b/ucm2/Qualcomm/sm8250/Qualcomm-RB5-WSA8815-Speakers-DMIC0.conf
+@@ -0,0 +1,11 @@
++Syntax 3
++
++SectionUseCase."HiFi" {
++ File "/Qualcomm/sm8250/HiFi.conf"
++ Comment "HiFi quality Music."
++}
++
++SectionUseCase."HDMI" {
++ File "/Qualcomm/sm8250/HDMI.conf"
++ Comment "HDMI output."
++}
+diff --git a/ucm2/conf.d/sm8250/Qualcomm-RB5-WSA8815-Speakers-DMIC0.conf b/ucm2/conf.d/sm8250/Qualcomm-RB5-WSA8815-Speakers-DMIC0.conf
+new file mode 120000
+index 000000000000..9f551b74ebf2
+--- /dev/null
++++ b/ucm2/conf.d/sm8250/Qualcomm-RB5-WSA8815-Speakers-DMIC0.conf
+@@ -0,0 +1 @@
++../../Qualcomm/sm8250/Qualcomm-RB5-WSA8815-Speakers-DMIC0.conf
+\ No newline at end of file
diff --git a/dynamic-layers/backports-layer/recipes-multimedia/alsa/alsa-ucm-conf_1.2.4.bbappend b/dynamic-layers/backports-layer/recipes-multimedia/alsa/alsa-ucm-conf_1.2.4.bbappend
new file mode 100644
index 0000000..f2268c5
--- /dev/null
+++ b/dynamic-layers/backports-layer/recipes-multimedia/alsa/alsa-ucm-conf_1.2.4.bbappend
@@ -0,0 +1,8 @@
+FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}:"
+
+SRC_URI_append_qcom = "\
+ file://0001-ucm2-Separate-the-configuration-lookups-hw-based-fro.patch \
+ file://0001-ucm2-conf.d-add-symlinks-for-Qualcomm-cards.patch \
+ file://0001-ucm2-codecs-lpass-add-codec-sequences-for-wsa-and-va.patch \
+ file://0002-ucm2-add-support-to-for-Qualcomm-RB5-Platform.patch \
+"
diff --git a/dynamic-layers/networking-layer/recipes-test/images/initramfs-test-image.bbappend b/dynamic-layers/networking-layer/recipes-test/images/initramfs-test-image.bbappend
deleted file mode 100644
index bd946f8..0000000
--- a/dynamic-layers/networking-layer/recipes-test/images/initramfs-test-image.bbappend
+++ /dev/null
@@ -1,5 +0,0 @@
-PACKAGE_INSTALL += " \
- iperf2 \
- iperf3 \
- tcpdump \
-"
diff --git a/dynamic-layers/openembedded-layer/recipes-test/images/initramfs-test-image.bbappend b/dynamic-layers/openembedded-layer/recipes-test/images/initramfs-test-image.bbappend
deleted file mode 100644
index 16f4e3c..0000000
--- a/dynamic-layers/openembedded-layer/recipes-test/images/initramfs-test-image.bbappend
+++ /dev/null
@@ -1,3 +0,0 @@
-PACKAGE_INSTALL += " \
- devmem2 \
-"
diff --git a/recipes-bsp/firmware/.gitignore b/recipes-bsp/firmware/.gitignore
new file mode 100644
index 0000000..c552b48
--- /dev/null
+++ b/recipes-bsp/firmware/.gitignore
@@ -0,0 +1,2 @@
+files/NHLOS_Binaries.zip
+files/adreno_1.0_qrb5165_rb5.tar.gz
diff --git a/recipes-bsp/firmware/firmware-qcom-dragonboard410c-bootloader-sdcard_17.09.bb b/recipes-bsp/firmware/firmware-qcom-dragonboard410c-bootloader-sdcard_17.09.bb
index 61ef441..3adaa37 100644
--- a/recipes-bsp/firmware/firmware-qcom-dragonboard410c-bootloader-sdcard_17.09.bb
+++ b/recipes-bsp/firmware/firmware-qcom-dragonboard410c-bootloader-sdcard_17.09.bb
@@ -9,7 +9,6 @@ SRC_URI = "https://releases.linaro.org/96boards/dragonboard410c/linaro/rescue/17
SRC_URI[md5sum] = "e15da2a623442d66587aea506599fb69"
SRC_URI[sha256sum] = "9885f915ebd4986432340cf1d03b8fd2bfdd97ad6a4a7466200fddbe41cdcf5c"
-COMPATIBLE_MACHINE = "(dragonboard-410c)"
PACKAGE_ARCH = "${MACHINE_ARCH}"
S = "${WORKDIR}"
diff --git a/recipes-bsp/firmware/firmware-qcom-dragonboard410c.inc b/recipes-bsp/firmware/firmware-qcom-dragonboard410c.inc
new file mode 100644
index 0000000..d8361f3
--- /dev/null
+++ b/recipes-bsp/firmware/firmware-qcom-dragonboard410c.inc
@@ -0,0 +1,36 @@
+DESCRIPTION = "QCOM Firmware for DragonBoard 410c"
+
+LICENSE = "Proprietary"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=4d087ee0965cb059f1b2f9429e166f64"
+
+DEPENDS += "mtools-native"
+
+inherit allarch
+
+S = "${WORKDIR}/linux-board-support-package-r${PV}"
+
+do_compile() {
+ :
+}
+
+do_install() {
+ install -d ${D}${nonarch_base_libdir}/firmware/
+
+ install -d ${D}/boot
+ cp ./efs-seed/fs_image_linux.tar.gz.mbn.img ${D}/boot/modem_fsg
+
+ cp -r ./proprietary-linux/wlan ${D}${nonarch_base_libdir}/firmware/
+
+ install -d ${D}${nonarch_base_libdir}/firmware/qcom/msm8916
+ MTOOLS_SKIP_CHECK=1 mcopy -i ./bootloaders-linux/NON-HLOS.bin \
+ ::image/modem.* ::image/mba.mbn ::image/wcnss.* ${D}${nonarch_base_libdir}/firmware/qcom/msm8916
+
+ install -d ${D}${sysconfdir}/
+ install -m 0644 LICENSE ${D}${sysconfdir}/QCOM-LINUX-BOARD-SUPPORT-LICENSE-${PN}
+}
+
+FILES_${PN} += "/boot/modem_fsg"
+FILES_${PN} += "${nonarch_base_libdir}/firmware/wlan/*"
+FILES_${PN} += "${nonarch_base_libdir}/firmware/qcom/msm8916/*"
+
+INSANE_SKIP_${PN} += "arch"
diff --git a/recipes-bsp/firmware/firmware-qcom-dragonboard410c_1034.2.1.bb b/recipes-bsp/firmware/firmware-qcom-dragonboard410c_1034.2.1.bb
index ecdbed9..6f188bc 100644
--- a/recipes-bsp/firmware/firmware-qcom-dragonboard410c_1034.2.1.bb
+++ b/recipes-bsp/firmware/firmware-qcom-dragonboard410c_1034.2.1.bb
@@ -1,45 +1,5 @@
-DESCRIPTION = "QCOM Firmware for DragonBoard 410c"
-
-LICENSE = "Proprietary"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=4d087ee0965cb059f1b2f9429e166f64"
+require recipes-bsp/firmware/firmware-qcom-dragonboard410c.inc
SRC_URI = "http://releases.linaro.org/96boards/dragonboard410c/qualcomm/firmware/linux-board-support-package-r${PV}.zip"
SRC_URI[md5sum] = "25c241bfd5fb2e55e8185752d5fe92ce"
SRC_URI[sha256sum] = "46953b974c5c58c7ca66db414437c0268b033ac9d28127e98d9c4e1a49359da5"
-
-DEPENDS += "mtools-native"
-
-COMPATIBLE_MACHINE = "(dragonboard-410c)"
-PACKAGE_ARCH = "${MACHINE_ARCH}"
-
-S = "${WORKDIR}/linux-board-support-package-r${PV}"
-
-do_compile() {
- :
-}
-
-do_install() {
- install -d ${D}${nonarch_base_libdir}/firmware/
-
- install -d ${D}/boot
- cp ./efs-seed/fs_image_linux.tar.gz.mbn.img ${D}/boot/modem_fsg
-
- cp -r ./proprietary-linux/wlan ${D}${nonarch_base_libdir}/firmware/
-
- install -d ${D}${nonarch_base_libdir}/firmware/qcom/msm8916
- MTOOLS_SKIP_CHECK=1 mcopy -i ./bootloaders-linux/NON-HLOS.bin \
- ::image/modem.* ::image/mba.mbn ::image/wcnss.* ${D}${nonarch_base_libdir}/firmware/qcom/msm8916
-
- install -d ${D}${sysconfdir}/
- install -m 0644 LICENSE ${D}${sysconfdir}/QCOM-LINUX-BOARD-SUPPORT-LICENSE
-}
-
-FILES_${PN} += "/boot/modem_fsg"
-FILES_${PN} += "${nonarch_base_libdir}/firmware/wlan/*"
-FILES_${PN} += "${nonarch_base_libdir}/firmware/qcom/msm8916/*"
-
-INSANE_SKIP_${PN} += "arch"
-
-RPROVIDES_${PN} += "linux-firmware-qcom-license"
-RREPLACES_${PN} += "linux-firmware-qcom-license"
-RCONFLICTS_${PN} += "linux-firmware-qcom-license"
diff --git a/recipes-bsp/firmware/firmware-qcom-dragonboard410c_1036.1.bb b/recipes-bsp/firmware/firmware-qcom-dragonboard410c_1036.1.bb
new file mode 100644
index 0000000..194c3e5
--- /dev/null
+++ b/recipes-bsp/firmware/firmware-qcom-dragonboard410c_1036.1.bb
@@ -0,0 +1,15 @@
+# This firmware is not released for redistribution, however it can be
+# downloaded from https://developer.qualcomm.com/hardware/dragonboard-410c
+#
+# Add the following line to local.conf to use it:
+# PREFERRED_VERSION_firmware-qcom-dragonboard410c = "1036.1"
+# You have to manually put the downloaded file into ${DL_DIR}
+
+require recipes-bsp/firmware/firmware-qcom-dragonboard410c.inc
+
+SRC_URI = '${@oe.utils.conditional("PREFERRED_VERSION_firmware-qcom-dragonboard410c", "1036.1", "file://dragonboard_410c.zip.1.0-r1036.1.zip", "", d)}'
+SRC_URI[md5sum] = "3092fccf7a97fa319d7732a98425f9d4"
+SRC_URI[sha256sum] = "93070f58fa3aa6467baa881935c37c4da2df2a8af3248746931ce3d11a3a1200"
+
+# This should not be selected by default as the firmware archive is behind the accept&click wall.
+DEFAULT_PREFERENCE = "-1"
diff --git a/recipes-bsp/firmware/firmware-qcom-dragonboard820c_01700.1.bb b/recipes-bsp/firmware/firmware-qcom-dragonboard820c_01700.1.bb
index 952f574..bb0d9b6 100644
--- a/recipes-bsp/firmware/firmware-qcom-dragonboard820c_01700.1.bb
+++ b/recipes-bsp/firmware/firmware-qcom-dragonboard820c_01700.1.bb
@@ -7,8 +7,7 @@ SRC_URI = "https://releases.linaro.org/96boards/dragonboard820c/qualcomm/firmwar
SRC_URI[md5sum] = "587138c5e677342db9a88d5c8747ec6c"
SRC_URI[sha256sum] = "6ee9c461b2b5dd2d3bd705bb5ea3f44b319ecb909b2772f305ce12439e089cd9"
-COMPATIBLE_MACHINE = "(dragonboard-820c)"
-PACKAGE_ARCH = "${MACHINE_ARCH}"
+inherit allarch
S = "${WORKDIR}/linux-board-support-package-r${PV}"
@@ -22,13 +21,11 @@ do_install() {
install -m 0444 ./proprietary-linux/adsp*.* ${D}${nonarch_base_libdir}/firmware/qcom/msm8996/
+ install -m 0444 ./bootloaders-linux/adspso.bin ${D}${nonarch_base_libdir}/firmware/qcom/msm8996/
+
install -d ${D}${sysconfdir}/
- install -m 0644 LICENSE ${D}${sysconfdir}/QCOM-LINUX-BOARD-SUPPORT-LICENSE
+ install -m 0644 LICENSE ${D}${sysconfdir}/QCOM-LINUX-BOARD-SUPPORT-LICENSE-${PN}
}
FILES_${PN} += "${nonarch_base_libdir}/firmware/*"
INSANE_SKIP_${PN} += "arch"
-
-RPROVIDES_${PN} += "linux-firmware-qcom-license"
-RREPLACES_${PN} += "linux-firmware-qcom-license"
-RCONFLICTS_${PN} += "linux-firmware-qcom-license"
diff --git a/recipes-bsp/firmware/firmware-qcom-dragonboard845c_20190529180356-v4.bb b/recipes-bsp/firmware/firmware-qcom-dragonboard845c_20190529180356-v4.bb
index 88a1a6c..9011f87 100644
--- a/recipes-bsp/firmware/firmware-qcom-dragonboard845c_20190529180356-v4.bb
+++ b/recipes-bsp/firmware/firmware-qcom-dragonboard845c_20190529180356-v4.bb
@@ -3,53 +3,25 @@ DESCRIPTION = "QCOM Firmware for DragonBoard 845c"
LICENSE = "Proprietary"
LIC_FILES_CHKSUM = "file://LICENSE.qcom.txt;md5=cbbe399f2c983ad51768f4561587f000"
-SRC_URI = "https://releases.linaro.org/96boards/dragonboard845c/qualcomm/firmware/RB3_firmware_${PV}.zip \
- git://github.com/alimon/qca-swiss-army-knife \
- file://generate_board-2_json.sh"
+SRC_URI = "https://releases.linaro.org/96boards/dragonboard845c/qualcomm/firmware/RB3_firmware_${PV}.zip;subdir=${BP}"
SRC_URI[md5sum] = "ad69855a1275547b16d94a1b5405ac62"
SRC_URI[sha256sum] = "4289d2f2a7124b104d0274879e702aae9b1e50c42eec3747f8584c6744ef65e3"
-SRCREV = "0c01a2abc3e9855b71f0fbea2c335011104d9ec0"
-COMPATIBLE_MACHINE = "(dragonboard-845c)"
-PACKAGE_ARCH = "${MACHINE_ARCH}"
-DEPENDS += "bash-native"
-inherit python3native
-
-S = "${WORKDIR}"
-
-do_compile() {
- # Build board-2.bin needed by WiFi
- mkdir -p bdf
- cp ./38-bdwlan_split/bdwlan*.* bdf
- bash generate_board-2_json.sh bdf board-2.json
- python3 git/tools/scripts/ath10k/ath10k-bdencoder -c board-2.json -o board-2.bin
-}
do_install() {
install -d ${D}${nonarch_base_libdir}/firmware/
- install -d ${D}${nonarch_base_libdir}/firmware/qcom/venus-5.2/
install -d ${D}${nonarch_base_libdir}/firmware/qcom/sdm845
- install -m 0444 ./17-USB3-201-202-FW/K2026090.mem ${D}${nonarch_base_libdir}/firmware/
+ install -m 0444 ./08-dspso/dspso.bin ${D}${nonarch_base_libdir}/firmware/qcom/sdm845
+
+ install -m 0444 ./17-USB3-201-202-FW/K2026090.mem ${D}${nonarch_base_libdir}/firmware/renesas_usb_fw.mem
install -m 0444 ./18-adreno-fw/a630_zap*.* ${D}${nonarch_base_libdir}/firmware/qcom/
install -m 0444 ./20-adsp_split/firmware/adsp*.* ${D}${nonarch_base_libdir}/firmware/qcom/sdm845
install -m 0444 ./21-cdsp_split/firmware/cdsp*.* ${D}${nonarch_base_libdir}/firmware/qcom/sdm845
- install -m 0444 ./33-venus_split/venus.* ${D}${nonarch_base_libdir}/firmware/qcom/venus-5.2/
-
- install -d ${D}${nonarch_base_libdir}/firmware/ath10k/WCN3990/hw1.0/
- install -m 0444 ./board-2.bin ${D}${nonarch_base_libdir}/firmware/ath10k/WCN3990/hw1.0/
install -d ${D}${sysconfdir}/
- install -m 0644 LICENSE.qcom.txt ${D}${sysconfdir}/QCOM-LINUX-BOARD-SUPPORT-LICENSE
+ install -m 0644 LICENSE.qcom.txt ${D}${sysconfdir}/QCOM-LINUX-BOARD-SUPPORT-LICENSE-${PN}
}
FILES_${PN} += "${nonarch_base_libdir}/firmware/*"
INSANE_SKIP_${PN} += "arch"
-
-RPROVIDES_${PN} += "linux-firmware-qcom-venus-5.2"
-RREPLACES_${PN} += "linux-firmware-qcom-venus-5.2"
-RCONFLICTS_${PN} += "linux-firmware-qcom-venus-5.2"
-
-RPROVIDES_${PN} += "linux-firmware-qcom-license"
-RREPLACES_${PN} += "linux-firmware-qcom-license"
-RCONFLICTS_${PN} += "linux-firmware-qcom-license"
diff --git a/recipes-bsp/firmware/firmware-qcom-rb5_20210331-v4.bb b/recipes-bsp/firmware/firmware-qcom-rb5_20210331-v4.bb
new file mode 100644
index 0000000..8cafe7f
--- /dev/null
+++ b/recipes-bsp/firmware/firmware-qcom-rb5_20210331-v4.bb
@@ -0,0 +1,52 @@
+DESCRIPTION = "QCOM Firmware for Qualcomm Robotics RB5 platform"
+
+LICENSE = "Proprietary"
+LIC_FILES_CHKSUM = "file://LICENSE.qcom.txt;md5=cbbe399f2c983ad51768f4561587f000"
+
+SRC_URI = " \
+ http://releases.linaro.org/96boards/rb5/qualcomm/firmware/RB5_firmware_${PV}.zip;subdir=${BP} \
+"
+SRC_URI[md5sum] = "d65ec09ba18dcafe291c870e0516c290"
+SRC_URI[sha256sum] = "30e2c02be32de9f809b590f4fe76d9eb66d35f8c7d13b1f2850beb3d793192cc"
+
+# From v2 to v4 the versioning has changed, so add epoch
+# 20210118133815-v2
+# 20210331-v4
+PE = "1"
+
+DEPENDS += "qca-swiss-army-knife-native"
+
+inherit allarch
+
+do_compile() {
+ # Build board-2.bin needed by WiFi
+ ath11k-generate-board-2_json.sh ./38-bdwlan_split board-2.json
+ python3 "${STAGING_BINDIR_NATIVE}/ath10k-bdencoder" -m ath11k -c board-2.json -o board-2.bin
+}
+
+do_install() {
+ install -d ${D}${nonarch_base_libdir}/firmware/qcom/sm8250
+
+ install -m 0444 ./08-dspso/dspso.bin ${D}${nonarch_base_libdir}/firmware/qcom/sm8250
+
+ install -m 0444 ./30-slpi_split/slpi.mbn ${D}${nonarch_base_libdir}/firmware/qcom/sm8250/
+ install -m 0444 ./39-jsn/slpi*.jsn ${D}${nonarch_base_libdir}/firmware/qcom/sm8250/
+
+ install -d ${D}${nonarch_base_libdir}/firmware/ath11k/QCA6390/hw2.0/
+ install -m 0444 ${S}/board-2.bin ${D}${nonarch_base_libdir}/firmware/ath11k/QCA6390/hw2.0/board-2.bin
+
+ install -d ${D}${sysconfdir}/
+ install -m 0644 LICENSE.qcom.txt ${D}${sysconfdir}/QCOM-LINUX-BOARD-SUPPORT-LICENSE-${PN}
+}
+
+FILES_${PN} += "${nonarch_base_libdir}/firmware/"
+INSANE_SKIP_${PN} += "arch"
+INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
+INHIBIT_PACKAGE_STRIP = "1"
+INHIBIT_DEFAULT_DEPS = "1"
+
+inherit update-alternatives
+
+ALTERNATIVE_${PN} = "qca6390-board2"
+ALTERNATIVE_LINK_NAME[qca6390-board2] = "/lib/firmware/ath11k/QCA6390/hw2.0/board-2.bin"
+ALTERNATIVE_PRIORITY = "100"
diff --git a/recipes-bsp/firmware/firmware-qcom-sd-600eval_1.0.bb b/recipes-bsp/firmware/firmware-qcom-sd-600eval_1.0.bb
index 0a16d46..a3af887 100644
--- a/recipes-bsp/firmware/firmware-qcom-sd-600eval_1.0.bb
+++ b/recipes-bsp/firmware/firmware-qcom-sd-600eval_1.0.bb
@@ -7,8 +7,7 @@ SRC_URI = "https://eragon.einfochips.com/pub/media/datasheet/SD_600eval-linux_pr
SRC_URI[md5sum] = "0903e9f656d3cea005ecc8e26f1243b2"
SRC_URI[sha256sum] = "fdffcb2cedc0d0215ee3dec95ce3683a780d9280960d27200379fbe1b21af979"
-COMPATIBLE_MACHINE = "(sd-600eval|dragonboard-600c)"
-PACKAGE_ARCH = "${MACHINE_ARCH}"
+inherit allarch
S = "${WORKDIR}/SD_600eval-linux_proprietary_firmware-v${PV}"
diff --git a/recipes-devtools/qca-swiss-army-knife/qca-swiss-army-knife/0001-ath10k-bdencoder-Switch-to-python3.patch b/recipes-devtools/qca-swiss-army-knife/qca-swiss-army-knife/0001-ath10k-bdencoder-Switch-to-python3.patch
new file mode 100644
index 0000000..3be757b
--- /dev/null
+++ b/recipes-devtools/qca-swiss-army-knife/qca-swiss-army-knife/0001-ath10k-bdencoder-Switch-to-python3.patch
@@ -0,0 +1,146 @@
+From 71d960adea6e5287ac80e976e58865f59328f6c4 Mon Sep 17 00:00:00 2001
+From: Sven Eckelmann <sven@narfation.org>
+Date: Wed, 14 Oct 2020 15:52:02 +0200
+Subject: [PATCH 1/2] ath10k-bdencoder: Switch to python3
+
+Python 2.x is EOL since January 2020. The first distributions already
+started to drop the interpreters from their next distribution release. Just
+add some minor changes to make it python3 compatible.
+
+Signed-off-by: Sven Eckelmann <sven@narfation.org>
+---
+ tools/scripts/ath10k/ath10k-bdencoder | 35 ++++++++++++++-------------
+ 1 file changed, 18 insertions(+), 17 deletions(-)
+
+diff --git a/tools/scripts/ath10k/ath10k-bdencoder b/tools/scripts/ath10k/ath10k-bdencoder
+index 5f41a6be9446..1635e87b6f5f 100755
+--- a/tools/scripts/ath10k/ath10k-bdencoder
++++ b/tools/scripts/ath10k/ath10k-bdencoder
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python
++#!/usr/bin/python3
+ #
+ # Copyright (c) 2015 Qualcomm Atheros, Inc.
+ # Copyright (c) 2018, The Linux Foundation. All rights reserved.
+@@ -33,7 +33,7 @@ import mailbox
+ MAX_BUF_LEN = 2000000
+
+ # the signature length also includes null byte and padding
+-ATH10K_BOARD_SIGNATURE = "QCA-ATH10K-BOARD"
++ATH10K_BOARD_SIGNATURE = b"QCA-ATH10K-BOARD"
+ ATH10K_BOARD_SIGNATURE_LEN = 20
+
+ PADDING_MAGIC = 0x6d
+@@ -83,7 +83,7 @@ def add_ie(buf, offset, id, value):
+ def xclip(msg):
+ p = subprocess.Popen(['xclip', '-selection', 'clipboard'],
+ stdin=subprocess.PIPE)
+- p.communicate(msg)
++ p.communicate(msg.encode())
+
+
+ # to workaround annoying python feature of returning negative hex values
+@@ -105,7 +105,8 @@ class BoardName():
+ def parse_ie(buf, offset, length):
+ self = BoardName()
+ fmt = '<%ds' % length
+- (self.name, ) = struct.unpack_from(fmt, buf, offset)
++ (name, ) = struct.unpack_from(fmt, buf, offset)
++ self.name = name.decode()
+
+ logging.debug('BoardName.parse_ie(): offset %d length %d self %s' %
+ (offset, length, self))
+@@ -310,7 +311,7 @@ class BoardContainer:
+ allnames.append(name)
+
+ def _add_signature(self, buf, offset):
+- signature = ATH10K_BOARD_SIGNATURE + '\0'
++ signature = ATH10K_BOARD_SIGNATURE + b'\0'
+ length = len(signature)
+ pad_len = padding_needed(length)
+ length = length + pad_len
+@@ -321,7 +322,7 @@ class BoardContainer:
+ struct.pack_into('<B', padding, i, PADDING_MAGIC)
+
+ fmt = '<%ds%ds' % (len(signature), pad_len)
+- struct.pack_into(fmt, buf, offset, signature.encode(), padding.raw)
++ struct.pack_into(fmt, buf, offset, signature, padding.raw)
+ offset += length
+
+ # make sure ATH10K_BOARD_SIGNATURE_LEN is correct
+@@ -445,7 +446,7 @@ def cmd_extract(args):
+ b['data'] = filename
+ mapping.append(b)
+
+- f = open(filename, 'w')
++ f = open(filename, 'wb')
+ f.write(board.data.data)
+ f.close()
+
+@@ -483,11 +484,11 @@ def diff_boardfiles(filename1, filename2, diff):
+
+ container1 = BoardContainer().open(filename1)
+ (temp1_fd, temp1_pathname) = tempfile.mkstemp()
+- os.write(temp1_fd, container1.get_summary(sort=True))
++ os.write(temp1_fd, container1.get_summary(sort=True).encode())
+
+ container2 = BoardContainer().open(filename2)
+ (temp2_fd, temp2_pathname) = tempfile.mkstemp()
+- os.write(temp2_fd, container2.get_summary(sort=True))
++ os.write(temp2_fd, container2.get_summary(sort=True).encode())
+
+ # this function is used both with --diff and --diffstat
+ if diff:
+@@ -509,7 +510,7 @@ def diff_boardfiles(filename1, filename2, diff):
+ print('Failed to run wdiff: %s' % (e))
+ return 1
+
+- result += '%s\n' % (output)
++ result += '%s\n' % (output.decode())
+
+ # create simple statistics about changes in board images
+
+@@ -577,7 +578,7 @@ def cmd_add_board(args):
+ new_filename = args.add_board[1]
+ new_names = args.add_board[2:]
+
+- f = open(new_filename, 'r')
++ f = open(new_filename, 'rb')
+ new_data = f.read()
+ f.close()
+
+@@ -620,15 +621,15 @@ def cmd_add_mbox(args):
+ name = filename.rstrip(BIN_SUFFIX)
+ board_files[name] = part.get_payload(decode=True)
+
+- print 'Found mail "%s" with %d board files' % (msg['Subject'],
+- len(board_files))
++ print('Found mail "%s" with %d board files' % (msg['Subject'],
++ len(board_files)))
+
+ # copy the original file for diff
+ (temp_fd, temp_pathname) = tempfile.mkstemp()
+ shutil.copyfile(board_filename, temp_pathname)
+
+ container = BoardContainer.open(board_filename)
+- for name, data in board_files.iteritems():
++ for name, data in board_files.items():
+ names = [name]
+ container.add_board(data, names)
+
+@@ -650,9 +651,9 @@ def cmd_add_mbox(args):
+
+ os.remove(temp_pathname)
+
+- print '----------------------------------------------'
+- print applied_msg
+- print '----------------------------------------------'
++ print('----------------------------------------------')
++ print(applied_msg)
++ print('----------------------------------------------')
+
+ xclip(applied_msg)
+
+--
+2.29.2
+
diff --git a/recipes-devtools/qca-swiss-army-knife/qca-swiss-army-knife/0001-read-powers-port-to-python3.patch b/recipes-devtools/qca-swiss-army-knife/qca-swiss-army-knife/0001-read-powers-port-to-python3.patch
new file mode 100644
index 0000000..5c69e81
--- /dev/null
+++ b/recipes-devtools/qca-swiss-army-knife/qca-swiss-army-knife/0001-read-powers-port-to-python3.patch
@@ -0,0 +1,212 @@
+From 4ffa07ff681c628750ba7c66e8a97f5f57b35fa0 Mon Sep 17 00:00:00 2001
+From: Dmitry Baryshkov <dbaryshkov@gmail.com>
+Date: Thu, 17 Dec 2020 00:37:39 +0300
+Subject: [PATCH 1/3] read-powers: port to python3
+
+Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
+---
+ tools/scripts/ath9k/read-powers | 74 ++++++++++++++++-----------------
+ 1 file changed, 37 insertions(+), 37 deletions(-)
+
+diff --git a/tools/scripts/ath9k/read-powers b/tools/scripts/ath9k/read-powers
+index 1d430e78b695..535747db8f0b 100755
+--- a/tools/scripts/ath9k/read-powers
++++ b/tools/scripts/ath9k/read-powers
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python
++#!/usr/bin/env python3
+ #
+ # Copyright (c) 2010 Atheros Communications Inc.
+ #
+@@ -117,7 +117,7 @@ def powertx_rate1 (val):
+ ofdm_rates["12"] = (val >> 16) & 0xff
+ ofdm_rates["18"] = (val >> 24) & 0xff
+
+- print "%010s: 0x%08x" % ("Rate 1", val)
++ print("%010s: 0x%08x" % ("Rate 1", val))
+
+ def powertx_rate2 (val):
+ ofdm_rates["24"] = (val >> 0) & 0xff;
+@@ -125,7 +125,7 @@ def powertx_rate2 (val):
+ ofdm_rates["48"] = (val >> 16) & 0xff
+ ofdm_rates["54"] = (val >> 24) & 0xff
+
+- print "%010s: 0x%08x" % ("Rate 2", val)
++ print("%010s: 0x%08x" % ("Rate 2", val))
+
+ def powertx_rate3 (val):
+ cck_rates["1L"] = (val >> 0) & 0xff;
+@@ -134,7 +134,7 @@ def powertx_rate3 (val):
+ cck_rates["2L"] = (val >> 16) & 0xff;
+ cck_rates["2S"] = (val >> 24) & 0xff;
+
+- print "%010s: 0x%08x" % ("Rate 3", val)
++ print("%010s: 0x%08x" % ("Rate 3", val))
+
+ def powertx_rate4 (val):
+ cck_rates["5.5L"] = (val >> 0) & 0xff;
+@@ -142,7 +142,7 @@ def powertx_rate4 (val):
+ cck_rates["11L"] = (val >> 16) & 0xff
+ cck_rates["11S"] = (val >> 24) & 0xff
+
+- print "%010s: 0x%08x" % ("Rate 4", val)
++ print("%010s: 0x%08x" % ("Rate 4", val))
+
+ def powertx_rate5 (val):
+ mcs_rates_ht20["0"] = (val >> 0) & 0xff;
+@@ -165,7 +165,7 @@ def powertx_rate5 (val):
+
+ mcs_rates_ht20["5"] = (val >> 24) & 0xff
+
+- print "%010s: 0x%08x" % ("Rate 5", val)
++ print("%010s: 0x%08x" % ("Rate 5", val))
+
+ def powertx_rate6 (val):
+ mcs_rates_ht20["6"] = (val >> 0) & 0xff;
+@@ -173,7 +173,7 @@ def powertx_rate6 (val):
+ mcs_rates_ht20["12"] = (val >> 16) & 0xff
+ mcs_rates_ht20["13"] = (val >> 24) & 0xff
+
+- print "%010s: 0x%08x" % ("Rate 6", val)
++ print("%010s: 0x%08x" % ("Rate 6", val))
+
+ def powertx_rate7 (val):
+ mcs_rates_ht40["0"] = (val >> 0) & 0xff;
+@@ -196,7 +196,7 @@ def powertx_rate7 (val):
+
+ mcs_rates_ht40["5"] = (val >> 24) & 0xff
+
+- print "%010s: 0x%08x" % ("Rate 7", val)
++ print("%010s: 0x%08x" % ("Rate 7", val))
+
+ def powertx_rate8 (val):
+ mcs_rates_ht40["6"] = (val >> 0) & 0xff;
+@@ -204,7 +204,7 @@ def powertx_rate8 (val):
+ mcs_rates_ht40["12"] = (val >> 16) & 0xff
+ mcs_rates_ht40["13"] = (val >> 24) & 0xff
+
+- print "%010s: 0x%08x" % ("Rate 8", val)
++ print("%010s: 0x%08x" % ("Rate 8", val))
+
+ # What is 40 dup CCK, 40 dup OFDM, 20 ext cck, 20 ext ODFM ?
+ def powertx_rate9 (val):
+@@ -213,7 +213,7 @@ def powertx_rate9 (val):
+ ext_dup_rates["20 ext CCK"] = (val >> 16) & 0xff
+ ext_dup_rates["20 ext OFDM"] = (val >> 24) & 0xff
+
+- print "%010s: 0x%08x" % ("Rate 9", val)
++ print("%010s: 0x%08x" % ("Rate 9", val))
+
+ def powertx_rate10 (val):
+ mcs_rates_ht20["14"] = (val >> 0) & 0xff;
+@@ -221,7 +221,7 @@ def powertx_rate10 (val):
+ mcs_rates_ht20["20"] = (val >> 16) & 0xff
+ mcs_rates_ht20["21"] = (val >> 24) & 0xff
+
+- print "%010s: 0x%08x" % ("Rate 10", val)
++ print("%010s: 0x%08x" % ("Rate 10", val))
+
+ def powertx_rate11 (val):
+ mcs_rates_ht20["22"] = (val >> 0) & 0xff;
+@@ -230,7 +230,7 @@ def powertx_rate11 (val):
+ mcs_rates_ht40["22"] = (val >> 16) & 0xff
+ mcs_rates_ht40["23"] = (val >> 24) & 0xff
+
+- print "%010s: 0x%08x" % ("Rate 11", val)
++ print("%010s: 0x%08x" % ("Rate 11", val))
+
+ def powertx_rate12 (val):
+ mcs_rates_ht40["14"] = (val >> 0) & 0xff;
+@@ -238,7 +238,7 @@ def powertx_rate12 (val):
+ mcs_rates_ht40["20"] = (val >> 16) & 0xff
+ mcs_rates_ht40["21"] = (val >> 24) & 0xff
+
+- print "%010s: 0x%08x" % ("Rate 12", val)
++ print("%010s: 0x%08x" % ("Rate 12", val))
+
+ registers = {
+ "0x00a3c0" : powertx_rate1,
+@@ -256,43 +256,43 @@ registers = {
+ }
+
+ def process_cck_rates():
+- print "CCK Rates"
+- print "======================"
+- for rate, double_dbm in cck_rates.iteritems():
++ print("CCK Rates")
++ print("======================")
++ for rate, double_dbm in cck_rates.items():
+ dbm = "%.2f dBm" % (double_dbm / 2)
+- print "%010s %010s" % (rate + " Mbps", dbm)
++ print("%010s %010s" % (rate + " Mbps", dbm))
+
+ def process_ofdm_rates():
+- print "OFDM Rates"
+- print "======================"
+- for rate, double_dbm in sorted(map(lambda (k,v): (int(k,0), v), ofdm_rates.iteritems())):
++ print("OFDM Rates")
++ print("======================")
++ for rate, double_dbm in sorted(ofdm_rates.items(), key=lambda i: int(i[0], 0)):
+ rate_s = "%s" % rate
+ dbm = "%.02f dBm" % (double_dbm / 2)
+- print "%010s %010s" % (rate_s + " Mbps", dbm)
++ print("%010s %010s" % (rate_s + " Mbps", dbm))
+
+ def process_mcs_ht20_rates():
+- print "MCS20 Rates"
+- print "======================"
+- for rate, double_dbm in sorted(map(lambda (k,v): (int(k,0), v), mcs_rates_ht20.iteritems())):
++ print("MCS20 Rates")
++ print("======================")
++ for rate, double_dbm in sorted(mcs_rates_ht20.items(), key=lambda i: int(i[0], 0)):
+ rate_s = "%s" % rate
+ dbm = "%.02f dBm" % (double_dbm / 2)
+- print "%010s %010s" % ("MCS" + rate_s, dbm)
++ print("%010s %010s" % ("MCS" + rate_s, dbm))
+
+
+ def process_mcs_ht40_rates():
+- print "MCS40 Rates"
+- print "======================"
+- for rate, double_dbm in sorted(map(lambda (k,v): (int(k,0), v), mcs_rates_ht40.iteritems())):
++ print("MCS40 Rates")
++ print("======================")
++ for rate, double_dbm in sorted(mcs_rates_ht40.items(), key=lambda i: int(i[0], 0)):
+ rate_s = "%s" % rate
+ dbm = "%.2f dBm" % (double_dbm / 2)
+- print "%010s %010s" % ("MCS" + rate_s, dbm)
++ print("%010s %010s" % ("MCS" + rate_s, dbm))
+
+ def process_ext_dup_rates():
+- print "EXT-DUP Rates"
+- print "=========================="
+- for rate, double_dbm in ext_dup_rates.iteritems():
++ print("EXT-DUP Rates")
++ print("==========================")
++ for rate, double_dbm in ext_dup_rates.items():
+ dbm = "%.2f dBm" % (double_dbm / 2)
+- print "%015s %010s" % (rate, dbm)
++ print("%015s %010s" % (rate, dbm))
+
+ def print_power_reg (reg, val):
+ if not reg in map(lambda x: int(x, 0), registers.keys()):
+@@ -300,12 +300,12 @@ def print_power_reg (reg, val):
+ registers.get("0x%06x" % reg)(val)
+
+ try:
+- print "Power register"
+- print "======================"
++ print("Power register")
++ print("======================")
+ for line in sys.stdin.readlines():
+- reg, val = map(lambda x: int(x, 0), string.split(line))
++ reg, val = map(lambda x: int(x, 0), line.split())
+ print_power_reg(reg, val)
+- print "-------------------------------------"
++ print("-------------------------------------")
+
+ process_cck_rates()
+ process_ofdm_rates()
+--
+2.29.2
+
diff --git a/recipes-devtools/qca-swiss-army-knife/qca-swiss-army-knife/0002-ath10k-bdencoder-Add-option-to-switch-to-ath11k-mode.patch b/recipes-devtools/qca-swiss-army-knife/qca-swiss-army-knife/0002-ath10k-bdencoder-Add-option-to-switch-to-ath11k-mode.patch
new file mode 100644
index 0000000..b5aa1c8
--- /dev/null
+++ b/recipes-devtools/qca-swiss-army-knife/qca-swiss-army-knife/0002-ath10k-bdencoder-Add-option-to-switch-to-ath11k-mode.patch
@@ -0,0 +1,116 @@
+From 68fd447a4d1e137307927fb9c0d9e05c6559bc96 Mon Sep 17 00:00:00 2001
+From: Sven Eckelmann <sven@narfation.org>
+Date: Wed, 14 Oct 2020 17:26:19 +0200
+Subject: [PATCH 2/2] ath10k-bdencoder: Add option to switch to ath11k mode
+
+The board-2.bin also exists on ath11k but there is no encoder available at
+the moment. Just use an option to change the two positions where the ath11k
+differs from the ath10k board-2.bin
+
+Signed-off-by: Sven Eckelmann <sven@narfation.org>
+[DB: fixed firmware url]
+Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
+---
+ tools/scripts/ath10k/ath10k-bdencoder | 35 ++++++++++++++++++++++++---
+ 1 file changed, 31 insertions(+), 4 deletions(-)
+
+diff --git a/tools/scripts/ath10k/ath10k-bdencoder b/tools/scripts/ath10k/ath10k-bdencoder
+index 1635e87b6f5f..d613f6340bf9 100755
+--- a/tools/scripts/ath10k/ath10k-bdencoder
++++ b/tools/scripts/ath10k/ath10k-bdencoder
+@@ -34,6 +34,8 @@ MAX_BUF_LEN = 2000000
+
+ # the signature length also includes null byte and padding
+ ATH10K_BOARD_SIGNATURE = b"QCA-ATH10K-BOARD"
++ATH11K_BOARD_SIGNATURE = b"QCA-ATH11K-BOARD"
++BOARD_SIGNATURE = b''
+ ATH10K_BOARD_SIGNATURE_LEN = 20
+
+ PADDING_MAGIC = 0x6d
+@@ -44,6 +46,7 @@ TYPE_LENGTH_SIZE = 8
+ BIN_SUFFIX = '.bin'
+
+ ATH10K_FIRMWARE_URL = 'https://github.com/kvalo/ath10k-firmware/commit'
++ATH11K_FIRMWARE_URL = 'https://github.com/kvalo/ath11k-firmware/commit'
+
+ ATH10K_BD_IE_BOARD = 0
+ ATH10K_BD_IE_BOARD_EXT = 1
+@@ -311,7 +314,7 @@ class BoardContainer:
+ allnames.append(name)
+
+ def _add_signature(self, buf, offset):
+- signature = ATH10K_BOARD_SIGNATURE + b'\0'
++ signature = BOARD_SIGNATURE + b'\0'
+ length = len(signature)
+ pad_len = padding_needed(length)
+ length = length + pad_len
+@@ -343,10 +346,10 @@ class BoardContainer:
+
+ offset = 0
+
+- fmt = '<%dsb' % (len(ATH10K_BOARD_SIGNATURE))
++ fmt = '<%dsb' % (len(BOARD_SIGNATURE))
+ (signature, null) = struct.unpack_from(fmt, buf, offset)
+
+- if signature != ATH10K_BOARD_SIGNATURE or null != 0:
++ if signature != BOARD_SIGNATURE or null != 0:
+ print("invalid signature found in %s" % name)
+ return 1
+
+@@ -600,6 +603,11 @@ def git_get_head_id():
+
+
+ def cmd_add_mbox(args):
++ if args.mode == 10:
++ firmware_url = ATH10K_FIRMWARE_URL
++ elif args.mode == 11:
++ firmware_url = ATH11K_FIRMWARE_URL
++
+ board_filename = args.add_mbox[0]
+ mbox_filename = args.add_mbox[1]
+
+@@ -658,8 +666,19 @@ def cmd_add_mbox(args):
+ xclip(applied_msg)
+
+
++def mode_parse(v):
++ if v == 'ath10k':
++ return 10
++ elif v == 'ath11k':
++ return 11
++ else:
++ raise argparse.ArgumentTypeError('ath10k or ath11k expected.')
++
++
+ def main():
+- description = '''ath10k board-N.bin files manegement tool
++ global BOARD_SIGNATURE
++
++ description = '''ath10k/ath11k board-N.bin files management tool
+
+ ath10k-bdencoder is for creating (--create), listing (--info) and
+ comparing (--diff, --diffstat) ath10k board-N.bin files. The
+@@ -709,12 +728,20 @@ can use --extract switch to see examples from real board-N.bin files.
+ parser.add_argument("-o", "--output", metavar="BOARD_FILE",
+ help='name of the output file, otherwise the default is: %s' %
+ (DEFAULT_BOARD_FILE))
++ parser.add_argument("-m", "--mode", metavar='MODE',
++ help='select between ath10k and ath11k mode (default: ath10k)',
++ default=10, type=mode_parse)
+
+ args = parser.parse_args()
+
+ if args.verbose:
+ logging.basicConfig(level=logging.DEBUG)
+
++ if args.mode == 10:
++ BOARD_SIGNATURE = ATH10K_BOARD_SIGNATURE
++ elif args.mode == 11:
++ BOARD_SIGNATURE = ATH11K_BOARD_SIGNATURE
++
+ if args.create:
+ return cmd_create(args)
+ elif args.extract:
+--
+2.29.2
+
diff --git a/recipes-devtools/qca-swiss-army-knife/qca-swiss-army-knife/0002-ath10k-fwencoder-port-to-python3.patch b/recipes-devtools/qca-swiss-army-knife/qca-swiss-army-knife/0002-ath10k-fwencoder-port-to-python3.patch
new file mode 100644
index 0000000..1c3c648
--- /dev/null
+++ b/recipes-devtools/qca-swiss-army-knife/qca-swiss-army-knife/0002-ath10k-fwencoder-port-to-python3.patch
@@ -0,0 +1,272 @@
+From 3d23932fd812e1ec7a989ca7e594fcf04d42c8a6 Mon Sep 17 00:00:00 2001
+From: Dmitry Baryshkov <dbaryshkov@gmail.com>
+Date: Thu, 17 Dec 2020 01:32:47 +0300
+Subject: [PATCH 2/3] ath10k-fwencoder: port to python3
+
+Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
+---
+ tools/scripts/ath10k/ath10k-fwencoder | 70 +++++++++++++--------------
+ 1 file changed, 35 insertions(+), 35 deletions(-)
+
+diff --git a/tools/scripts/ath10k/ath10k-fwencoder b/tools/scripts/ath10k/ath10k-fwencoder
+index 6934a694e832..bbbe0344f014 100755
+--- a/tools/scripts/ath10k/ath10k-fwencoder
++++ b/tools/scripts/ath10k/ath10k-fwencoder
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python
++#!/usr/bin/env python3
+ #
+ # Copyright (c) 2012-2015 Qualcomm Atheros, Inc.
+ #
+@@ -30,7 +30,7 @@ import hashlib
+
+ DEFAULT_FW_API_VERSION = 4
+
+-ATH10K_SIGNATURE = "QCA-ATH10K"
++ATH10K_SIGNATURE = b"QCA-ATH10K"
+ MAX_LEN = 2000000
+
+ ATH10K_FW_IE_FW_VERSION = 0
+@@ -327,7 +327,7 @@ class Ath10kFirmwareContainer(object):
+ elif is_int(s):
+ version = s
+ else:
+- print 'Error: Invalid HTT OP version: %s' % s
++ print('Error: Invalid HTT OP version: %s' % s)
+ return 1
+
+ self.htt_op_version = version
+@@ -337,7 +337,7 @@ class Ath10kFirmwareContainer(object):
+
+ # find value from the dict
+ try:
+- name = [key for key, value in htt_op_version_map.iteritems()
++ name = [key for key, value in htt_op_version_map.items()
+ if value == version][0]
+ except IndexError:
+ name = str(version)
+@@ -353,7 +353,7 @@ class Ath10kFirmwareContainer(object):
+ elif is_int(s):
+ version = s
+ else:
+- print 'Error: Invalid WMI OP version: %s' % s
++ print('Error: Invalid WMI OP version: %s' % s)
+ return 1
+
+ self.wmi_op_version = version
+@@ -363,7 +363,7 @@ class Ath10kFirmwareContainer(object):
+
+ # find value from the dict
+ try:
+- name = [key for key, value in wmi_op_version_map.iteritems()
++ name = [key for key, value in wmi_op_version_map.items()
+ if value == version][0]
+ except IndexError:
+ name = str(version)
+@@ -376,7 +376,7 @@ class Ath10kFirmwareContainer(object):
+ enabled = []
+ for capa in self.features:
+ if capa not in feature_map:
+- print "Error: '%s' not found from the feature map" % capa
++ print("Error: '%s' not found from the feature map" % capa)
+ return 1
+
+ enabled.append(feature_map[capa])
+@@ -434,7 +434,7 @@ class Ath10kFirmwareContainer(object):
+ self.fw_version = fw_version
+ # reserve one byte for null
+ if len(self.fw_version) > ETHTOOL_FWVERS_LEN - 1:
+- print 'Firmware version string too long: %d' % (len(self.fw_version))
++ print('Firmware version string too long: %d' % (len(self.fw_version)))
+ return 1
+
+ def get_fw_version(self):
+@@ -500,7 +500,7 @@ class Ath10kFirmwareContainer(object):
+ elif e == ATH10K_FW_IE_FW_CODE_SWAP_IMAGE:
+ self.fw_code_swap_image = c.elements[e]
+ else:
+- print "Unknown IE: ", e
++ print("Unknown IE: ", e)
+
+ def save(self, filename):
+ self.container = FirmwareContainer(ATH10K_SIGNATURE)
+@@ -585,7 +585,7 @@ def write_file(filename, buf):
+ def info(options, args):
+
+ if len(args) != 1:
+- print 'Filename missing'
++ print('Filename missing')
+ return 1
+
+ filename = args[0]
+@@ -593,13 +593,13 @@ def info(options, args):
+ c = Ath10kFirmwareContainer()
+ c.load(filename)
+
+- print c.get_summary()
++ print(c.get_summary())
+
+
+ def dump(options, args):
+
+ if len(args) != 1:
+- print 'Filename missing'
++ print('Filename missing')
+ return 1
+
+ filename = args[0]
+@@ -607,34 +607,34 @@ def dump(options, args):
+ c = Ath10kFirmwareContainer()
+ c.load(filename)
+
+- print "ath10k-fwencoder --create \\"
++ print("ath10k-fwencoder --create \\")
+
+ if c.get_fw_version():
+- print "--firmware-version=%s \\" % c.get_fw_version()
++ print("--firmware-version=%s \\" % c.get_fw_version())
+
+ if c.get_timestamp() and options.show_timestamp:
+- print "--timestamp=%u \\" % c.get_timestamp()
++ print("--timestamp=%u \\" % c.get_timestamp())
+
+ if c.get_features():
+- print "--features=%s \\" % c.get_features()
++ print("--features=%s \\" % c.get_features())
+
+ if c.get_fw_image():
+ name = "athwlan.bin"
+- print "--firmware=%s \\" % name
++ print("--firmware=%s \\" % name)
+
+ if c.get_otp_image():
+ name = "otp.bin"
+- print "--otp=%s \\" % name
++ print("--otp=%s \\" % name)
+
+ if c.get_wmi_op_version():
+- print '--set-wmi-op-version=%s \\' % c.get_wmi_op_version()
++ print('--set-wmi-op-version=%s \\' % c.get_wmi_op_version())
+
+ if c.get_htt_op_version():
+- print '--set-htt-op-version=%s \\' % (c.get_htt_op_version())
++ print('--set-htt-op-version=%s \\' % (c.get_htt_op_version()))
+
+ if c.get_fw_code_swap_image():
+ name = "athwlan.codeswap.bin"
+- print "--firmware-codeswap=%s \\" % name
++ print("--firmware-codeswap=%s \\" % name)
+
+ print
+
+@@ -642,7 +642,7 @@ def dump(options, args):
+ def extract(options, args):
+
+ if len(args) != 1:
+- print 'Filename missing'
++ print('Filename missing')
+ return 1
+
+ filename = args[0]
+@@ -653,24 +653,24 @@ def extract(options, args):
+ if c.get_fw_image():
+ name = "athwlan.bin"
+ write_file(name, c.get_fw_image())
+- print '%s extracted: %d B' % (name, len(c.get_fw_image()))
++ print('%s extracted: %d B' % (name, len(c.get_fw_image())))
+
+ if c.get_otp_image():
+ name = "otp.bin"
+ write_file(name, c.get_otp_image())
+- print '%s extracted: %d B' % (name, len(c.get_otp_image()))
++ print('%s extracted: %d B' % (name, len(c.get_otp_image())))
+
+ if c.get_fw_code_swap_image():
+ name = "athwlan.codeswap.bin"
+ write_file(name, c.get_fw_code_swap_image())
+- print '%s extracted: %d B' % (name, len(c.get_fw_code_swap_image()))
++ print('%s extracted: %d B' % (name, len(c.get_fw_code_swap_image())))
+
+ print
+
+
+ def modify(options, args):
+ if len(args) != 1:
+- print 'Filename missing'
++ print('Filename missing')
+ return 1
+
+ filename = args[0]
+@@ -710,7 +710,7 @@ def modify(options, args):
+
+ file_len = c.save(filename)
+
+- print '%s modified: %d B' % (filename, file_len)
++ print('%s modified: %d B' % (filename, file_len))
+
+
+ def create(options):
+@@ -752,25 +752,25 @@ def create(options):
+
+ file_len = c.save(output)
+
+- print '%s created: %d B' % (output, file_len)
++ print('%s created: %d B' % (output, file_len))
+
+
+ def cmd_crc32(options, args):
+ if len(args) != 1:
+- print 'Filename missing'
++ print('Filename missing')
+ return 1
+
+ filename = args[0]
+
+ f = open(filename, 'r')
+ buf = f.read()
+- print '%08x' % (_crc32(buf))
++ print('%08x' % (_crc32(buf)))
+ f.close()
+
+
+ def cmd_diff(options, args):
+ if len(args) != 2:
+- print 'Usage: ath10k-fwencoder --diff FILE FILE'
++ print('Usage: ath10k-fwencoder --diff FILE FILE')
+ return 1
+
+ filename1 = args[0]
+@@ -804,7 +804,7 @@ def cmd_diff(options, args):
+ logger.error('Failed to run wdiff: %s' % (e))
+ return 1
+
+- print output
++ print(output)
+
+ os.close(temp1_fd)
+ os.close(temp2_fd)
+@@ -896,10 +896,10 @@ def main():
+ try:
+ return create(options)
+ except FWEncoderError as e:
+- print 'Create failed: %s' % e
++ print('Create failed: %s' % e)
+ sys.exit(2)
+ except Exception as e:
+- print 'Create failed: %s' % e
++ print('Create failed: %s' % e)
+ traceback.print_exc()
+ sys.exit(3)
+ elif options.dump:
+@@ -915,7 +915,7 @@ def main():
+ elif options.diff:
+ return cmd_diff(options, args)
+ else:
+- print 'Action command missing'
++ print('Action command missing')
+ return 1
+
+ if __name__ == "__main__":
+--
+2.29.2
+
diff --git a/recipes-devtools/qca-swiss-army-knife/qca-swiss-army-knife/0003-scripts-port-to-python3.patch b/recipes-devtools/qca-swiss-army-knife/qca-swiss-army-knife/0003-scripts-port-to-python3.patch
new file mode 100644
index 0000000..bfdad9f
--- /dev/null
+++ b/recipes-devtools/qca-swiss-army-knife/qca-swiss-army-knife/0003-scripts-port-to-python3.patch
@@ -0,0 +1,34 @@
+From 26ca6eff75f78fec9efff4a69fca7103b97f1ab1 Mon Sep 17 00:00:00 2001
+From: Dmitry Baryshkov <dbaryshkov@gmail.com>
+Date: Thu, 17 Dec 2020 01:33:01 +0300
+Subject: [PATCH 3/3] scripts: port to python3
+
+Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
+---
+ tools/scripts/ath10k/ath10k-fw-repo | 2 +-
+ tools/scripts/ath11k/ath11k-fw-repo | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/tools/scripts/ath10k/ath10k-fw-repo b/tools/scripts/ath10k/ath10k-fw-repo
+index 00b6d859209a..4cf044c04c5a 100755
+--- a/tools/scripts/ath10k/ath10k-fw-repo
++++ b/tools/scripts/ath10k/ath10k-fw-repo
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python
++#!/usr/bin/env python3
+ #
+ # Copyright (c) 2016 Qualcomm Atheros, Inc.
+ # Copyright (c) 2018, The Linux Foundation. All rights reserved.
+diff --git a/tools/scripts/ath11k/ath11k-fw-repo b/tools/scripts/ath11k/ath11k-fw-repo
+index 1ac6023aaf12..51ca33c5dd7b 100755
+--- a/tools/scripts/ath11k/ath11k-fw-repo
++++ b/tools/scripts/ath11k/ath11k-fw-repo
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python
++#!/usr/bin/env python3
+ #
+ # Copyright (c) 2016 Qualcomm Atheros, Inc.
+ # Copyright (c) 2018,2020 The Linux Foundation. All rights reserved.
+--
+2.29.2
+
diff --git a/recipes-bsp/firmware/firmware-qcom-dragonboard845c/generate_board-2_json.sh b/recipes-devtools/qca-swiss-army-knife/qca-swiss-army-knife/ath10k-generate-board-2_json.sh
index 3a1d532..373689f 100644
--- a/recipes-bsp/firmware/firmware-qcom-dragonboard845c/generate_board-2_json.sh
+++ b/recipes-devtools/qca-swiss-army-knife/qca-swiss-army-knife/ath10k-generate-board-2_json.sh
@@ -1,20 +1,27 @@
+#!/bin/sh
+
JSON="$2"
iter=0
echo "[" > "${JSON}"
for file in $1/bdwlan.*; do
- [[ $file == *.txt ]] && continue
+ case `basename "${file}"` in
+ *.txt)
+ continue
+ ;;
+ bdwlan.bin)
+ file_ext="ff"
+ ;;
+ bdwlan.*)
+ file_ext="$(basename "${file}" | sed -E 's:^.*\.b?0*([0-9a-f]+)$:\1:')"
+ ;;
+ esac
iter=$((iter+1))
[ $iter -ne 1 ] && echo " }," >> "${JSON}"
echo " {" >> "${JSON}"
echo " \"data\": \"$file\"," >> "${JSON}"
- if [[ $file == */bdwlan.bin ]]; then
- file_ext="ff"
- else
- file_ext="$(printf '%x\n' "$(basename "${file}" | sed -E 's:^.*\.b?([0-9a-f]*)$:0x\1:')")"
- fi
echo " \"names\": [\"bus=snoc,qmi-board-id=${file_ext}\"]" >> "${JSON}"
done
diff --git a/recipes-devtools/qca-swiss-army-knife/qca-swiss-army-knife/ath11k-generate-board-2_json.sh b/recipes-devtools/qca-swiss-army-knife/qca-swiss-army-knife/ath11k-generate-board-2_json.sh
new file mode 100644
index 0000000..0e3cc10
--- /dev/null
+++ b/recipes-devtools/qca-swiss-army-knife/qca-swiss-army-knife/ath11k-generate-board-2_json.sh
@@ -0,0 +1,23 @@
+#!/bin/sh
+
+JSON="$2"
+
+iter=0
+echo "[" > "${JSON}"
+for file in $1/bdwlan.elf $1/bdwlan.e* ; do
+ iter=$((iter+1))
+ [ $iter -ne 1 ] && echo " }," >> "${JSON}"
+
+ echo " {" >> "${JSON}"
+ echo " \"data\": \"$file\"," >> "${JSON}"
+ if [ `basename $file` = "bdwlan.elf" ]; then
+ file_ext="255"
+ else
+ file_ext="$(( $(basename "${file}" | sed -E 's:^.*\.e?([0-9a-f]*)$:0x\1:') ))"
+ fi
+ echo " \"names\": [\"bus=pci,qmi-chip-id=0,qmi-board-id=${file_ext}\"]" >> "${JSON}"
+done
+
+echo " }" >> "${JSON}"
+echo "]" >> "${JSON}"
+
diff --git a/recipes-devtools/qca-swiss-army-knife/qca-swiss-army-knife_git.bb b/recipes-devtools/qca-swiss-army-knife/qca-swiss-army-knife_git.bb
new file mode 100644
index 0000000..6a31f7a
--- /dev/null
+++ b/recipes-devtools/qca-swiss-army-knife/qca-swiss-army-knife_git.bb
@@ -0,0 +1,32 @@
+SUMMARY = "A set of utilities to help QCA driver development."
+HOMEPAGE = "https://github.com/qca/qca-swiss-army-knife"
+SECTION = "devel"
+
+LICENSE = "ISC"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=884c3f3a874b2a0cfa283c7db0e5d604"
+
+SRCREV = "5ede3cc07e9a52f115101c28f833242b772eeaab"
+SRC_URI = " \
+ git://github.com/qca/${BPN}.git;branch=master;protocol=https \
+ file://0001-ath10k-bdencoder-Switch-to-python3.patch \
+ file://0002-ath10k-bdencoder-Add-option-to-switch-to-ath11k-mode.patch \
+ file://0001-read-powers-port-to-python3.patch \
+ file://0002-ath10k-fwencoder-port-to-python3.patch \
+ file://0003-scripts-port-to-python3.patch \
+ file://ath10k-generate-board-2_json.sh \
+ file://ath11k-generate-board-2_json.sh \
+"
+
+PV = "0.0+${SRCPV}"
+S = "${WORKDIR}/git"
+
+do_install () {
+ install -d ${D}/${bindir}
+ install -m 0755 tools/scripts/*/* ${D}/${bindir}
+ install -m 0755 ${WORKDIR}/ath10k-generate-board-2_json.sh ${D}/${bindir}
+ install -m 0755 ${WORKDIR}/ath11k-generate-board-2_json.sh ${D}/${bindir}
+}
+
+BBCLASSEXTEND = "native nativesdk"
+
+RDEPENDS_${PN} += "perl python3-core"
diff --git a/recipes-devtools/skales/skales_git.bb b/recipes-devtools/skales/skales_git.bb
index 782d20c..134cc1e 100644
--- a/recipes-devtools/skales/skales_git.bb
+++ b/recipes-devtools/skales/skales_git.bb
@@ -1,6 +1,6 @@
SUMMARY = "Tools to create boot images for QCOM SoC"
-HOMEPAGE = "https://www.codeaurora.org/cgit/quic/kernel/skales/"
+HOMEPAGE = "https://git.codelinaro.org/clo/qsdk/oss/tools/skales"
SECTION = "devel"
LICENSE = "BSD-3-Clause"
@@ -9,7 +9,7 @@ LIC_FILES_CHKSUM = "file://mkbootimg;beginline=3;endline=29;md5=114b84083e657f38
SRCREV = "6eac9e943de53c4aaaede3697e9226a47686fe25"
PV = "1.5.0+git${SRCPV}"
-SRC_URI = "git://source.codeaurora.org/quic/kernel/skales;protocol=http \
+SRC_URI = "git://git.codelinaro.org/clo/qsdk/oss/tools/skales.git;protocol=https;branch=caf_migration/skales/master \
file://0002-mkbootimg-use-python3.patch \
"
diff --git a/recipes-graphics/mesa/mesa-20.3.0-rc2/0001-anv-fix-a-build-race-between-generating-a-header-and.patch b/recipes-graphics/mesa/mesa-20.3.0-rc2/0001-anv-fix-a-build-race-between-generating-a-header-and.patch
new file mode 100644
index 0000000..a61e7b2
--- /dev/null
+++ b/recipes-graphics/mesa/mesa-20.3.0-rc2/0001-anv-fix-a-build-race-between-generating-a-header-and.patch
@@ -0,0 +1,31 @@
+From f148d4f1b5b13288b254ead07f1d008d997e2342 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Mon, 2 Nov 2020 23:23:53 +0100
+Subject: [PATCH] anv: fix a build race between generating a header and using
+ it
+
+anv_batch_chain.c includes genX_bits.h but doesn't ensure it gets
+generated first. This causes build failures, as observed here:
+https://autobuilder.yoctoproject.org/typhoon/#/builders/86/builds/1501/steps/8/logs/step2d
+
+Upstream-Status: Submitted [https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7412]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ src/intel/vulkan/meson.build | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/intel/vulkan/meson.build b/src/intel/vulkan/meson.build
+index 36e1689314e..b713d8eade3 100644
+--- a/src/intel/vulkan/meson.build
++++ b/src/intel/vulkan/meson.build
+@@ -131,6 +131,7 @@ libanv_files = files(
+ anv_deps = [
+ dep_libdrm,
+ dep_valgrind,
++ idep_genxml,
+ idep_nir_headers,
+ idep_vulkan_util_headers,
+ ]
+--
+2.29.0
+
diff --git a/recipes-graphics/mesa/mesa-20.3.0-rc2/0001-futex.h-Define-__NR_futex-if-it-does-not-exist.patch b/recipes-graphics/mesa/mesa-20.3.0-rc2/0001-futex.h-Define-__NR_futex-if-it-does-not-exist.patch
new file mode 100644
index 0000000..8bedbac
--- /dev/null
+++ b/recipes-graphics/mesa/mesa-20.3.0-rc2/0001-futex.h-Define-__NR_futex-if-it-does-not-exist.patch
@@ -0,0 +1,31 @@
+From 8973e297f2f9b17498b9dc0e37a19481d4bb7df9 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 16 Oct 2020 11:03:47 -0700
+Subject: [PATCH] futex.h: Define __NR_futex if it does not exist
+
+__NR_futex is not defines by newer architectures e.g. arc, riscv32 as
+they only have 64bit variant of time_t. Glibc defines SYS_futex interface based on
+__NR_futex, since this is used in applications, such applications start
+to fail to build for these newer architectures. This patch defines a
+fallback to alias __NR_futex to __NR_futex_tim64 so SYS_futex keeps
+working
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/util/futex.h | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+--- a/src/util/futex.h
++++ b/src/util/futex.h
+@@ -34,6 +34,10 @@
+ #include <sys/syscall.h>
+ #include <sys/time.h>
+
++#if !defined(SYS_futex) && defined(SYS_futex_time64)
++# define SYS_futex SYS_futex_time64
++#endif
++
+ static inline long sys_futex(void *addr1, int op, int val1, const struct timespec *timeout, void *addr2, int val3)
+ {
+ return syscall(SYS_futex, addr1, op, val1, timeout, addr2, val3);
diff --git a/recipes-graphics/mesa/mesa-20.3.0-rc2/0002-meson.build-make-TLS-ELF-optional.patch b/recipes-graphics/mesa/mesa-20.3.0-rc2/0002-meson.build-make-TLS-ELF-optional.patch
new file mode 100644
index 0000000..74f7fe5
--- /dev/null
+++ b/recipes-graphics/mesa/mesa-20.3.0-rc2/0002-meson.build-make-TLS-ELF-optional.patch
@@ -0,0 +1,46 @@
+From ce57ce220d9c377beabf4914f33c43118f672ffe Mon Sep 17 00:00:00 2001
+From: Alistair Francis <alistair@alistair23.me>
+Date: Thu, 14 Nov 2019 13:08:31 -0800
+Subject: [PATCH] meson.build: make TLS ELF optional
+
+USE_ELF_TLS has replaced GLX_USE_TLS so this patch is the original "make
+TLS GLX optional again" patch updated to the latest mesa.
+
+Upstream-Status: Inappropriate [configuration]
+Signed-off-by: Alistair Francis <alistair@alistair23.me>
+
+---
+ meson.build | 2 +-
+ meson_options.txt | 6 ++++++
+ 2 files changed, 7 insertions(+), 1 deletion(-)
+
+diff --git a/meson.build b/meson.build
+index c5136ea..185270d 100644
+--- a/meson.build
++++ b/meson.build
+@@ -424,7 +424,7 @@ endif
+
+ # Android uses emutls for versions <= P/28. For USE_ELF_TLS we need ELF TLS.
+ use_elf_tls = false
+-if not ['windows', 'freebsd', 'openbsd'].contains(host_machine.system()) and (not with_platform_android or get_option('platform-sdk-version') >= 29)
++if not ['windows', 'freebsd', 'openbsd'].contains(host_machine.system()) and (not with_platform_android or get_option('platform-sdk-version') >= 29) and get_option('elf-tls')
+ pre_args += '-DUSE_ELF_TLS'
+ use_elf_tls = true
+ endif
+diff --git a/meson_options.txt b/meson_options.txt
+index 2d39d13..72006eb 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -368,6 +368,12 @@ option(
+ value : true,
+ description : 'Enable direct rendering in GLX and EGL for DRI',
+ )
++option(
++ 'elf-tls',
++ type : 'boolean',
++ value : true,
++ description : 'Enable TLS support in ELF',
++)
+ option(
+ 'prefer-iris',
+ type : 'boolean',
diff --git a/recipes-graphics/mesa/mesa-20.3.0-rc2/0004-Revert-mesa-Enable-asm-unconditionally-now-that-gen_.patch b/recipes-graphics/mesa/mesa-20.3.0-rc2/0004-Revert-mesa-Enable-asm-unconditionally-now-that-gen_.patch
new file mode 100644
index 0000000..8337423
--- /dev/null
+++ b/recipes-graphics/mesa/mesa-20.3.0-rc2/0004-Revert-mesa-Enable-asm-unconditionally-now-that-gen_.patch
@@ -0,0 +1,147 @@
+From 43d9e40db7357f27e91002b2bb7688b6775ebb43 Mon Sep 17 00:00:00 2001
+From: Alistair Francis <alistair@alistair23.me>
+Date: Thu, 14 Nov 2019 09:06:02 -0800
+Subject: [PATCH] Revert "mesa: Enable asm unconditionally, now that
+ gen_matypes is gone."
+
+This reverts commit 20294dceebc23236e33b22578245f7e6f41b6997.
+
+Upstream-Status: Inappropriate [configuration]
+Signed-off-by: Alistair Francis <alistair@alistair23.me>
+
+---
+ meson.build | 94 ++++++++++++++++++++++++++++++-----------------
+ meson_options.txt | 6 +++
+ 2 files changed, 67 insertions(+), 33 deletions(-)
+
+diff --git a/meson.build b/meson.build
+index e7dc599..e2fc934 100644
+--- a/meson.build
++++ b/meson.build
+@@ -52,6 +52,7 @@ pre_args = [
+ with_vulkan_icd_dir = get_option('vulkan-icd-dir')
+ with_tests = get_option('build-tests')
+ with_aco_tests = get_option('build-aco-tests')
++with_asm = get_option('asm')
+ with_glx_read_only_text = get_option('glx-read-only-text')
+ with_glx_direct = get_option('glx-direct')
+ with_osmesa = get_option('osmesa')
+@@ -1154,41 +1155,68 @@ dep_ws2_32 = cc.find_library('ws2_32', required : with_platform_windows)
+
+ # TODO: shared/static? Is this even worth doing?
+
++# When cross compiling we generally need to turn off the use of assembly,
++# because mesa's assembly relies on building an executable for the host system,
++# and running it to get information about struct sizes. There is at least one
++# case of cross compiling where we can use asm, and that's x86_64 -> x86 when
++# host OS == build OS, since in that case the build machine can run the host's
++# binaries.
++if with_asm and meson.is_cross_build()
++ if build_machine.system() != host_machine.system()
++ # TODO: It may be possible to do this with an exe_wrapper (like wine).
++ message('Cross compiling from one OS to another, disabling assembly.')
++ with_asm = false
++ elif not (build_machine.cpu_family().startswith('x86') and host_machine.cpu_family() == 'x86')
++ # FIXME: Gentoo always sets -m32 for x86_64 -> x86 builds, resulting in an
++ # x86 -> x86 cross compile. We use startswith rather than == to handle this
++ # case.
++ # TODO: There may be other cases where the 64 bit version of the
++ # architecture can run 32 bit binaries (aarch64 and armv7 for example)
++ message('''
++ Cross compiling to different architectures, and the host cannot run
++ the build machine's binaries. Disabling assembly.
++ ''')
++ with_asm = false
++ endif
++endif
++
+ with_asm_arch = ''
+-if host_machine.cpu_family() == 'x86'
+- if system_has_kms_drm or host_machine.system() == 'gnu'
+- with_asm_arch = 'x86'
+- pre_args += ['-DUSE_X86_ASM', '-DUSE_MMX_ASM', '-DUSE_3DNOW_ASM',
+- '-DUSE_SSE_ASM']
+-
+- if with_glx_read_only_text
+- pre_args += ['-DGLX_X86_READONLY_TEXT']
++if with_asm
++ if host_machine.cpu_family() == 'x86'
++ if system_has_kms_drm or host_machine.system() == 'gnu'
++ with_asm_arch = 'x86'
++ pre_args += ['-DUSE_X86_ASM', '-DUSE_MMX_ASM', '-DUSE_3DNOW_ASM',
++ '-DUSE_SSE_ASM']
++
++ if with_glx_read_only_text
++ pre_args += ['-DGLX_X86_READONLY_TEXT']
++ endif
++ endif
++ elif host_machine.cpu_family() == 'x86_64'
++ if system_has_kms_drm
++ with_asm_arch = 'x86_64'
++ pre_args += ['-DUSE_X86_64_ASM']
++ endif
++ elif host_machine.cpu_family() == 'arm'
++ if system_has_kms_drm
++ with_asm_arch = 'arm'
++ pre_args += ['-DUSE_ARM_ASM']
++ endif
++ elif host_machine.cpu_family() == 'aarch64'
++ if system_has_kms_drm
++ with_asm_arch = 'aarch64'
++ pre_args += ['-DUSE_AARCH64_ASM']
++ endif
++ elif host_machine.cpu_family() == 'sparc64'
++ if system_has_kms_drm
++ with_asm_arch = 'sparc'
++ pre_args += ['-DUSE_SPARC_ASM']
++ endif
++ elif host_machine.cpu_family().startswith('ppc64') and host_machine.endian() == 'little'
++ if system_has_kms_drm
++ with_asm_arch = 'ppc64le'
++ pre_args += ['-DUSE_PPC64LE_ASM']
+ endif
+- endif
+-elif host_machine.cpu_family() == 'x86_64'
+- if system_has_kms_drm
+- with_asm_arch = 'x86_64'
+- pre_args += ['-DUSE_X86_64_ASM']
+- endif
+-elif host_machine.cpu_family() == 'arm'
+- if system_has_kms_drm
+- with_asm_arch = 'arm'
+- pre_args += ['-DUSE_ARM_ASM']
+- endif
+-elif host_machine.cpu_family() == 'aarch64'
+- if system_has_kms_drm
+- with_asm_arch = 'aarch64'
+- pre_args += ['-DUSE_AARCH64_ASM']
+- endif
+-elif host_machine.cpu_family() == 'sparc64'
+- if system_has_kms_drm
+- with_asm_arch = 'sparc'
+- pre_args += ['-DUSE_SPARC_ASM']
+- endif
+-elif host_machine.cpu_family().startswith('ppc64') and host_machine.endian() == 'little'
+- if system_has_kms_drm
+- with_asm_arch = 'ppc64le'
+- pre_args += ['-DUSE_PPC64LE_ASM']
+ endif
+ endif
+
+diff --git a/meson_options.txt b/meson_options.txt
+index 147cccb..562b059 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -254,6 +254,12 @@ option(
+ value : false,
+ description : 'Enable GLVND support.'
+ )
++option(
++ 'asm',
++ type : 'boolean',
++ value : true,
++ description : 'Build assembly code if possible'
++)
+ option(
+ 'glx-read-only-text',
+ type : 'boolean',
diff --git a/recipes-graphics/mesa/mesa_%.bbappend b/recipes-graphics/mesa/mesa_%.bbappend
index fd40c39..65150a5 100644
--- a/recipes-graphics/mesa/mesa_%.bbappend
+++ b/recipes-graphics/mesa/mesa_%.bbappend
@@ -4,27 +4,9 @@ SRC_URI_append = " \
"
# Enable freedreno driver
-GALLIUMDRIVERS_append_apq8064 = ",freedreno"
-GALLIUMDRIVERS_append_apq8016 = ",freedreno"
-GALLIUMDRIVERS_append_apq8096 = ",freedreno"
-GALLIUMDRIVERS_append_sdm845 = ",freedreno"
-
-PACKAGECONFIG_append_apq8064 = " \
- gallium \
+PACKAGECONFIG_FREEDRENO = "\
+ freedreno \
${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xa', '', d)} \
"
-PACKAGECONFIG_append_apq8016 = " \
- gallium \
- ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xa', '', d)} \
-"
-
-PACKAGECONFIG_append_apq8096 = " \
- gallium \
- ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xa', '', d)} \
-"
-
-PACKAGECONFIG_append_sdm845 = " \
- gallium \
- ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xa', '', d)} \
-"
+PACKAGECONFIG_append_qcom = "${PACKAGECONFIG_FREEDRENO}"
diff --git a/recipes-graphics/mesa/mesa_20.3.0-rc2.bb b/recipes-graphics/mesa/mesa_20.3.0-rc2.bb
new file mode 100644
index 0000000..52c0515
--- /dev/null
+++ b/recipes-graphics/mesa/mesa_20.3.0-rc2.bb
@@ -0,0 +1,35 @@
+require recipes-graphics/mesa/mesa.inc
+
+FILESPATH_append := ":${COREBASE}/meta/recipes-graphics/mesa/files"
+
+SRC_URI = "https://mesa.freedesktop.org/archive/mesa-${PV}.tar.xz \
+ file://0001-meson.build-check-for-all-linux-host_os-combinations.patch \
+ file://0002-meson.build-make-TLS-ELF-optional.patch \
+ file://0004-Revert-mesa-Enable-asm-unconditionally-now-that-gen_.patch \
+ file://0001-meson-misdetects-64bit-atomics-on-mips-clang.patch \
+ file://0001-futex.h-Define-__NR_futex-if-it-does-not-exist.patch \
+ file://0001-anv-fix-a-build-race-between-generating-a-header-and.patch \
+ "
+
+SRC_URI[sha256sum] = "671bfc98724ca04ccda3255d9aa7fe3c730b10477446983a708305d00e9f5b5b"
+
+#because we cannot rely on the fact that all apps will use pkgconfig,
+#make eglplatform.h independent of MESA_EGL_NO_X11_HEADER
+do_install_append() {
+ if ${@bb.utils.contains('PACKAGECONFIG', 'egl', 'true', 'false', d)}; then
+ sed -i -e 's/^#elif defined(__unix__) && defined(EGL_NO_X11)$/#elif defined(__unix__) \&\& defined(EGL_NO_X11) || ${@bb.utils.contains('PACKAGECONFIG', 'x11', '0', '1', d)}/' ${D}${includedir}/EGL/eglplatform.h
+ fi
+}
+
+# Remove extra file added in meta-qcom's bbappend
+SRC_URI_remove = " \
+ file://0001-freedreno-clear-last_fence-after-resource-tracking.patch \
+"
+
+LIC_FILES_CHKSUM = "file://docs/license.rst;md5=9aa1bc48c9826ad9fdb16661f6930496"
+
+PACKAGECONFIG[dri] = "-Ddri-drivers=${DRIDRIVERS}, -Ddri-drivers='', xorgproto libdrm"
+
+# Do not select this version by default
+DEFAULT_PREFERENCE = "-1"
+DEFAULT_PREFERENCE_sm8250 = ""
diff --git a/recipes-graphics/xorg-xserver/xserver-xorg_%.bbappend b/recipes-graphics/xorg-xserver/xserver-xorg_%.bbappend
index 04856c9..7221b69 100644
--- a/recipes-graphics/xorg-xserver/xserver-xorg_%.bbappend
+++ b/recipes-graphics/xorg-xserver/xserver-xorg_%.bbappend
@@ -1,6 +1,3 @@
# We want to use modesetting + glamor with mesa freedreno driver
# http://bloggingthemonkey.blogspot.fr/2016/11/a-quick-note-for-usersdistros.html
-PACKAGECONFIG_append_apq8064 = "${@bb.utils.contains('DISTRO_FEATURES', 'opengl', ' dri3 xshmfence glamor', '', d)}"
-PACKAGECONFIG_append_apq8016 = "${@bb.utils.contains('DISTRO_FEATURES', 'opengl', ' dri3 xshmfence glamor', '', d)}"
-PACKAGECONFIG_append_apq8096 = "${@bb.utils.contains('DISTRO_FEATURES', 'opengl', ' dri3 xshmfence glamor', '', d)}"
-PACKAGECONFIG_append_sdm845 = "${@bb.utils.contains('DISTRO_FEATURES', 'opengl', ' dri3 xshmfence glamor', '', d)}"
+PACKAGECONFIG_append_qcom = "${@bb.utils.contains('DISTRO_FEATURES', 'opengl', ' dri3 xshmfence glamor', '', d)}"
diff --git a/recipes-kernel/images/initramfs-rootfs-image.bb b/recipes-kernel/images/initramfs-rootfs-image.bb
new file mode 100644
index 0000000..9bc9dc5
--- /dev/null
+++ b/recipes-kernel/images/initramfs-rootfs-image.bb
@@ -0,0 +1,26 @@
+DESCRIPTION = "Ramdisk image for pivoting into rootfs"
+
+PACKAGE_INSTALL = " \
+ base-passwd \
+ initramfs-module-copy-modules \
+ initramfs-module-rootfs \
+ initramfs-module-udev \
+ ${VIRTUAL-RUNTIME_base-utils} \
+ ${MACHINE_ESSENTIAL_EXTRA_RDEPENDS} \
+ ${ROOTFS_BOOTSTRAP_INSTALL} \
+"
+
+# Do not pollute the initrd image with rootfs features
+IMAGE_FEATURES = "debug-tweaks"
+IMAGE_LINGUAS = ""
+
+LICENSE = "MIT"
+
+IMAGE_FSTYPES = "${INITRAMFS_FSTYPES}"
+inherit core-image
+
+IMAGE_ROOTFS_SIZE = "8192"
+IMAGE_ROOTFS_EXTRA_SPACE = "0"
+
+# Exclude all kernel images from the rootfs
+PACKAGE_EXCLUDE = "kernel-image-*"
diff --git a/recipes-kernel/linux-firmware/linux-firmware_%.bbappend b/recipes-kernel/linux-firmware/linux-firmware_%.bbappend
index 9a1115c..3679a64 100644
--- a/recipes-kernel/linux-firmware/linux-firmware_%.bbappend
+++ b/recipes-kernel/linux-firmware/linux-firmware_%.bbappend
@@ -1,7 +1,4 @@
+inherit update-alternatives
-do_install_append() {
- rm -rf ${D}${nonarch_base_libdir}/firmware/qcom/venus-5.2
- rm -rf ${D}${nonarch_base_libdir}/firmware/qcom/venus-5.4
-}
-
-
+ALTERNATIVE_${PN}-ath11k = "qca6390-board2"
+ALTERNATIVE_LINK_NAME[qca6390-board2] = "/lib/firmware/ath11k/QCA6390/hw2.0/board-2.bin"
diff --git a/recipes-kernel/linux/linux-linaro-qcom.inc b/recipes-kernel/linux/linux-linaro-qcom.inc
index 21f0ae6..b193b63 100644
--- a/recipes-kernel/linux/linux-linaro-qcom.inc
+++ b/recipes-kernel/linux/linux-linaro-qcom.inc
@@ -1,27 +1,33 @@
-# Copyright (C) 2014 Linaro
+# Copyright (C) 2014-2021 Linaro
# Copyright (C) 2012, 2013 O.S. Systems Software LTDA.
# Released under the MIT license (see COPYING.MIT for the terms)
-DESCRIPTION = "Linux kernel for MSM platforms"
+DESCRIPTION ??= "Linaro Qualcomm Landing team ${PV} Kernel"
LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46"
inherit kernel
-# Put a local version until we have a true SRCREV to point to
-LOCALVERSION ?= "+linaro"
+LOCALVERSION ?= "-linaro-lt-qcom"
SCMVERSION ?= "y"
-LINUX_LINARO_QCOM_GIT ?= "git://git.linaro.org/landing-teams/working/qualcomm/kernel.git;protocol=https"
+SRCBRANCH = "release/qcomlt-${PV}"
+
+COMPATIBLE_MACHINE = "(qcom)"
+
+LINUX_LINARO_QCOM_GIT ?= "git://git.codelinaro.org/linaro/qcomlt/kernel.git;protocol=https"
SRC_URI = "${LINUX_LINARO_QCOM_GIT};branch=${SRCBRANCH}"
S = "${WORKDIR}/git"
KERNEL_DEFCONFIG_aarch64 ?= "${S}/arch/arm64/configs/defconfig"
-KERNEL_DEFCONFIG_apq8064 ?= "${S}/arch/arm/configs/qcom_defconfig"
+KERNEL_DEFCONFIG_arm ?= "${S}/arch/arm/configs/qcom_defconfig"
KERNEL_CONFIG_FRAGMENTS += "${S}/kernel/configs/distro.config"
+require recipes-kernel/linux/linux-qcom-bootimg.inc
+
kernel_conf_variable() {
- CONF_SED_SCRIPT="$CONF_SED_SCRIPT /CONFIG_$1[ =]/d;"
+ sed -e "/CONFIG_$1[ =]/d;" -i ${B}/.config
if test "$2" = "n"
then
echo "# CONFIG_$1 is not set" >> ${B}/.config
@@ -31,18 +37,15 @@ kernel_conf_variable() {
}
do_configure_prepend() {
- echo "" > ${B}/.config
- CONF_SED_SCRIPT=""
-
- kernel_conf_variable LOCALVERSION "\"${LOCALVERSION}\""
- kernel_conf_variable LOCALVERSION_AUTO y
-
if [ -f '${WORKDIR}/defconfig' ]; then
- sed -e "${CONF_SED_SCRIPT}" < '${WORKDIR}/defconfig' >> '${B}/.config'
+ cp '${WORKDIR}/defconfig' '${B}/.config'
else
- sed -e "${CONF_SED_SCRIPT}" < '${KERNEL_DEFCONFIG}' >> '${B}/.config'
+ cp '${KERNEL_DEFCONFIG}' '${B}/.config'
fi
+ kernel_conf_variable LOCALVERSION "\"${LOCALVERSION}\""
+ kernel_conf_variable LOCALVERSION_AUTO y
+
if [ "${SCMVERSION}" = "y" ]; then
# Add GIT revision to the local version
head=`git --git-dir=${S}/.git rev-parse --verify --short HEAD 2> /dev/null`
@@ -76,17 +79,8 @@ do_configure_prepend() {
# Now that all the fragments are located merge them.
( cd ${WORKDIR} && ${S}/scripts/kconfig/merge_config.sh -m -r -O ${B} ${B}/.config ${KERNEL_CONFIG_FRAGMENTS} 1>&2 )
fi
-
- yes '' | oe_runmake -C ${S} O=${B} oldconfig
- oe_runmake -C ${S} O=${B} savedefconfig && cp ${B}/defconfig ${WORKDIR}/defconfig.saved
}
-# append DTB
-do_compile_append() {
- if ! [ -e ${B}/arch/${ARCH}/boot/dts/${KERNEL_DEVICETREE} ] ; then
- oe_runmake ${KERNEL_DEVICETREE}
- fi
- cp arch/${ARCH}/boot/${KERNEL_IMAGETYPE} arch/${ARCH}/boot/${KERNEL_IMAGETYPE}.backup
- cat arch/${ARCH}/boot/${KERNEL_IMAGETYPE}.backup arch/${ARCH}/boot/dts/${KERNEL_DEVICETREE} > arch/${ARCH}/boot/${KERNEL_IMAGETYPE}
- rm -f arch/${ARCH}/boot/${KERNEL_IMAGETYPE}.backup
+do_configure_append() {
+ oe_runmake -C ${S} O=${B} savedefconfig && cp ${B}/defconfig ${WORKDIR}/defconfig.saved
}
diff --git a/recipes-kernel/linux/linux-linaro-qcomlt-dev.bb b/recipes-kernel/linux/linux-linaro-qcomlt-dev.bb
index 82cf263..9aae535 100644
--- a/recipes-kernel/linux/linux-linaro-qcomlt-dev.bb
+++ b/recipes-kernel/linux/linux-linaro-qcomlt-dev.bb
@@ -5,20 +5,16 @@
# To enable it add the following line to conf/local.conf:
# PREFERRED_PROVIDER_virtual/kernel = "linux-linaro-qcomlt-dev"
-DESCRIPTION = "Linaro Qualcomm Landing team Integration Kernel ${PV}"
-LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46"
-
require recipes-kernel/linux/linux-linaro-qcom.inc
-require recipes-kernel/linux/linux-qcom-bootimg.inc
-
-SRCBRANCH ?= "integration-linux-qcomlt"
-SRCREV ?= "${AUTOREV}"
-LINUX_VERSION = "5.8-rc+"
-PV = "${LINUX_VERSION}+git${SRCPV}"
+DESCRIPTION = "Linaro Qualcomm Landing team Integration Kernel ${PV}"
+SRCBRANCH = "integration-linux-qcomlt"
-# Wifi firmware has a recognizable arch :(
-ERROR_QA_remove = "arch"
+# Set default SRCREV. it is statically set to the korg v3.7 tag, and
+# hence prevent network access during parsing. If linux-linaro-qcomlt-dev
+# is the preferred provider, they will be overridden to AUTOREV in following
+# anonymous python routine and resolved when the variables are finalized.
+SRCREV ?= '${@oe.utils.conditional("PREFERRED_PROVIDER_virtual/kernel", "linux-linaro-qcomlt-dev", "${AUTOREV}", "29594404d7fe73cd80eaa4ee8c43dcc53970c60e", d)}'
-# Disable by default
-DEFAULT_PREFERENCE = "-1"
+LINUX_VERSION = "5.11+"
+PV = "${LINUX_VERSION}+git${SRCPV}"
diff --git a/recipes-kernel/linux/linux-linaro-qcomlt/0001-Revert-kbuild-Enable-DT-schema-checks-for-.dtb-targe.patch b/recipes-kernel/linux/linux-linaro-qcomlt/0001-Revert-kbuild-Enable-DT-schema-checks-for-.dtb-targe.patch
new file mode 100644
index 0000000..e792fe9
--- /dev/null
+++ b/recipes-kernel/linux/linux-linaro-qcomlt/0001-Revert-kbuild-Enable-DT-schema-checks-for-.dtb-targe.patch
@@ -0,0 +1,46 @@
+From 75e895343d5a2fcbdf4cb3d31ab7492bd65925f0 Mon Sep 17 00:00:00 2001
+From: Rob Herring <robh@kernel.org>
+Date: Wed, 8 Dec 2021 15:39:16 -0600
+Subject: [PATCH] Revert "kbuild: Enable DT schema checks for %.dtb targets"
+
+This reverts commit 53182e81f47d4ea0c727c49ad23cb782173ab849.
+
+This added tool dependencies on various build systems using %.dtb
+targets. Validation will need to be controlled by a kconfig or make
+variable instead, but for now let's just revert it.
+
+Signed-off-by: Rob Herring <robh@kernel.org>
+---
+ Makefile | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 9e12c14ea0fb..fa5070e53979 100644
+--- a/Makefile
++++ b/Makefile
+@@ -1374,17 +1374,17 @@ endif
+
+ ifneq ($(dtstree),)
+
+-%.dtb: dt_binding_check include/config/kernel.release scripts_dtc
+- $(Q)$(MAKE) $(build)=$(dtstree) $(dtstree)/$@ $(dtstree)/$*.dt.yaml
++%.dtb: include/config/kernel.release scripts_dtc
++ $(Q)$(MAKE) $(build)=$(dtstree) $(dtstree)/$@
+
+-%.dtbo: dt_binding_check include/config/kernel.release scripts_dtc
+- $(Q)$(MAKE) $(build)=$(dtstree) $(dtstree)/$@ $(dtstree)/$*.dt.yaml
++%.dtbo: include/config/kernel.release scripts_dtc
++ $(Q)$(MAKE) $(build)=$(dtstree) $(dtstree)/$@
+
+ PHONY += dtbs dtbs_install dtbs_check
+ dtbs: include/config/kernel.release scripts_dtc
+ $(Q)$(MAKE) $(build)=$(dtstree)
+
+-ifneq ($(filter dtbs_check %.dtb %.dtbo, $(MAKECMDGOALS)),)
++ifneq ($(filter dtbs_check, $(MAKECMDGOALS)),)
+ export CHECK_DTBS=y
+ dtbs: dt_binding_check
+ endif
+--
+2.33.1
+
diff --git a/recipes-kernel/linux/linux-linaro-qcomlt_4.14.bb b/recipes-kernel/linux/linux-linaro-qcomlt_4.14.bb
deleted file mode 100644
index 1cc27c7..0000000
--- a/recipes-kernel/linux/linux-linaro-qcomlt_4.14.bb
+++ /dev/null
@@ -1,17 +0,0 @@
-# Copyright (C) 2014-2018 Linaro
-# Released under the MIT license (see COPYING.MIT for the terms)
-
-DESCRIPTION = "Linaro Qualcomm Landing team 4.14 Kernel"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7"
-
-require recipes-kernel/linux/linux-linaro-qcom.inc
-require recipes-kernel/linux/linux-qcom-bootimg.inc
-
-LOCALVERSION ?= "-linaro-lt-qcom"
-SRCBRANCH ?= "release/qcomlt-4.14"
-SRCREV ?= "8bdd343f96dc838eefba94a051e84c6db4d1c55d"
-
-COMPATIBLE_MACHINE = "(apq8064|apq8016|apq8096)"
-
-# Wifi firmware has a recognizable arch :(
-ERROR_QA_remove = "arch"
diff --git a/recipes-kernel/linux/linux-linaro-qcomlt_5.10.bb b/recipes-kernel/linux/linux-linaro-qcomlt_5.10.bb
new file mode 100644
index 0000000..f1652f0
--- /dev/null
+++ b/recipes-kernel/linux/linux-linaro-qcomlt_5.10.bb
@@ -0,0 +1,6 @@
+# Copyright (C) 2014-2020 Linaro
+# Released under the MIT license (see COPYING.MIT for the terms)
+
+require recipes-kernel/linux/linux-linaro-qcom.inc
+
+SRCREV = "9ab492e76768cd1bd9f2da52004ed537c8b329f3"
diff --git a/recipes-kernel/linux/linux-linaro-qcomlt_5.12.bb b/recipes-kernel/linux/linux-linaro-qcomlt_5.12.bb
new file mode 100644
index 0000000..2587152
--- /dev/null
+++ b/recipes-kernel/linux/linux-linaro-qcomlt_5.12.bb
@@ -0,0 +1,9 @@
+# Copyright (C) 2014-2021 Linaro
+# Released under the MIT license (see COPYING.MIT for the terms)
+
+require recipes-kernel/linux/linux-linaro-qcom.inc
+
+SRCBRANCH = "release/rb5/qcomlt-5.12"
+SRCREV = "deeb40c41728645cd6971b1d7bd08281238caba0"
+
+COMPATIBLE_MACHINE = "(sm8250)"
diff --git a/recipes-kernel/linux/linux-linaro-qcomlt_5.13.bb b/recipes-kernel/linux/linux-linaro-qcomlt_5.13.bb
new file mode 100644
index 0000000..3636b5e
--- /dev/null
+++ b/recipes-kernel/linux/linux-linaro-qcomlt_5.13.bb
@@ -0,0 +1,6 @@
+# Copyright (C) 2014-2020 Linaro
+# Released under the MIT license (see COPYING.MIT for the terms)
+
+require recipes-kernel/linux/linux-linaro-qcom.inc
+
+SRCREV = "1429722a220973e881d8cb5b5b486693457b4f11"
diff --git a/recipes-kernel/linux/linux-linaro-qcomlt_5.15.bb b/recipes-kernel/linux/linux-linaro-qcomlt_5.15.bb
new file mode 100644
index 0000000..6e4171c
--- /dev/null
+++ b/recipes-kernel/linux/linux-linaro-qcomlt_5.15.bb
@@ -0,0 +1,11 @@
+# Copyright (C) 2021 Linaro
+# Released under the MIT license (see COPYING.MIT for the terms)
+
+require recipes-kernel/linux/linux-linaro-qcom.inc
+
+# SRCBRANCH set to "release/qcomlt-5.15" in linux-linaro-qcom.inc
+SRCREV = "9bc25b368335b6d3d59be44db0c4818bdfbfa546"
+
+# SRCBRANCH set to adp stable release branch
+SRCBRANCH:sa8155p = "release/sa8155p-adp/v5.15.y"
+SRCREV:sa8155p = "38b7066ac1084c74759f1314c54b5735a1e5031d"
diff --git a/recipes-kernel/linux/linux-linaro-qcomlt_5.2.bb b/recipes-kernel/linux/linux-linaro-qcomlt_5.2.bb
deleted file mode 100644
index 77dfbcd..0000000
--- a/recipes-kernel/linux/linux-linaro-qcomlt_5.2.bb
+++ /dev/null
@@ -1,17 +0,0 @@
-# Copyright (C) 2014-2019 Linaro
-# Released under the MIT license (see COPYING.MIT for the terms)
-
-DESCRIPTION = "Linaro Qualcomm Landing team 5.2 Kernel"
-LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814"
-
-require recipes-kernel/linux/linux-linaro-qcom.inc
-require recipes-kernel/linux/linux-qcom-bootimg.inc
-
-LOCALVERSION ?= "-linaro-lt-qcom"
-SRCBRANCH ?= "release/db845c/qcomlt-5.2"
-SRCREV ?= "13e8268d9b5cf3980b6e2766bf00439001c363fd"
-
-COMPATIBLE_MACHINE = "(sdm845|qcs404)"
-
-# Wifi firmware has a recognizable arch :(
-ERROR_QA_remove = "arch"
diff --git a/recipes-kernel/linux/linux-linaro-qcomlt_5.4.bb b/recipes-kernel/linux/linux-linaro-qcomlt_5.4.bb
deleted file mode 100644
index 83074c1..0000000
--- a/recipes-kernel/linux/linux-linaro-qcomlt_5.4.bb
+++ /dev/null
@@ -1,17 +0,0 @@
-# Copyright (C) 2014-2019 Linaro
-# Released under the MIT license (see COPYING.MIT for the terms)
-
-DESCRIPTION = "Linaro Qualcomm Landing team 5.4 Kernel"
-LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814"
-
-require recipes-kernel/linux/linux-linaro-qcom.inc
-require recipes-kernel/linux/linux-qcom-bootimg.inc
-
-LOCALVERSION ?= "-linaro-lt-qcom"
-SRCBRANCH ?= "release/qcomlt-5.4"
-SRCREV ?= "e2db8e82634bd73bce5ce1e447720756777ca432"
-
-COMPATIBLE_MACHINE = "(apq8016|apq8096|sdm845)"
-
-# Wifi firmware has a recognizable arch :(
-ERROR_QA_remove = "arch"
diff --git a/recipes-kernel/linux/linux-linaro-qcomlt_5.7.bb b/recipes-kernel/linux/linux-linaro-qcomlt_5.7.bb
index b6b33ec..dcf8220 100644
--- a/recipes-kernel/linux/linux-linaro-qcomlt_5.7.bb
+++ b/recipes-kernel/linux/linux-linaro-qcomlt_5.7.bb
@@ -1,14 +1,10 @@
# Copyright (C) 2014-2019 Linaro
# Released under the MIT license (see COPYING.MIT for the terms)
-DESCRIPTION = "Linaro Qualcomm Landing team 5.7 Kernel"
-LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46"
+require recipes-kernel/linux/linux-linaro-qcom.inc
inherit python3native
-require recipes-kernel/linux/linux-linaro-qcom.inc
-require recipes-kernel/linux/linux-qcom-bootimg.inc
-
SRC_URI_append_qrb5165-rb5 = " \
file://qrb5165-rb5.dts;subdir=git/arch/arm64/boot/dts/qcom \
file://qrb5165-rb5-enable.patch \
@@ -19,11 +15,4 @@ SRC_URI_append_qrb5165-rb5 = " \
file://0001-arm64-dts-qcom-sm8250-Add-support-for-SDC2.patch \
"
-LOCALVERSION ?= "-linaro-lt-qcom"
-SRCBRANCH ?= "release/qcomlt-5.7"
-SRCREV ?= "37b31489130dbeb8fa89dc99e8ff99c80fa264e0"
-
-COMPATIBLE_MACHINE = "(apq8016|apq8096|sdm845|sm8250)"
-
-# Wifi firmware has a recognizable arch :(
-ERROR_QA_remove = "arch"
+SRCREV ?= "4af49ea41ecf17e5e6243f3ac81dfc2f84d8a3a1"
diff --git a/recipes-kernel/linux/linux-linaro-qcomlt_5.9.bb b/recipes-kernel/linux/linux-linaro-qcomlt_5.9.bb
new file mode 100644
index 0000000..baf2a08
--- /dev/null
+++ b/recipes-kernel/linux/linux-linaro-qcomlt_5.9.bb
@@ -0,0 +1,9 @@
+# Copyright (C) 2014-2019 Linaro
+# Released under the MIT license (see COPYING.MIT for the terms)
+
+require recipes-kernel/linux/linux-linaro-qcom.inc
+
+SRCREV ?= "b5ff44498a19a685aa10a07ec67e3d12bc95a33a"
+
+SRCBRANCH_sm8250 = "release/rb5/qcomlt-5.9"
+SRCREV_sm8250 = "6d5a9a5da79684f69e4c66a7cf9108ab4e77025f"
diff --git a/recipes-kernel/linux/linux-qcom-bootimg.inc b/recipes-kernel/linux/linux-qcom-bootimg.inc
index 5177feb..9e3fef9 100644
--- a/recipes-kernel/linux/linux-qcom-bootimg.inc
+++ b/recipes-kernel/linux/linux-qcom-bootimg.inc
@@ -1,48 +1,146 @@
-DEPENDS += "skales-native"
-
-QCOM_BOOTIMG_ROOTFS ?= "undefined"
-SD_QCOM_BOOTIMG_ROOTFS ?= "undefined"
-
-# set output file names
-BOOT_IMAGE_BASE_NAME = "boot-${KERNEL_IMAGE_NAME}"
-BOOT_IMAGE_SYMLINK_NAME = "boot-${KERNEL_IMAGE_LINK_NAME}"
-SD_BOOT_IMAGE_BASE_NAME = "boot-sd${KERNEL_IMAGE_NAME}"
-SD_BOOT_IMAGE_SYMLINK_NAME = "boot-sd-${KERNEL_IMAGE_LINK_NAME}"
-KERNEL_CMDLINE = "root=/dev/${1} rw rootwait console=${ttydev},${baudrate}n8"
-KERNEL_CMDLINE_append_dragonboard-845c = " clk_ignore_unused pd_ignore_unused"
-
-# param ${1} partition where rootfs is located
-# param ${2} output boot image file name
-priv_make_image() {
- ${STAGING_BINDIR_NATIVE}/skales/mkbootimg --kernel ${B}/arch/${ARCH}/boot/${KERNEL_IMAGETYPE} \
- --ramdisk ${B}/initrd.img \
- --output ${DEPLOYDIR}/${2}.img \
- --pagesize ${QCOM_BOOTIMG_PAGE_SIZE} \
- --base ${QCOM_BOOTIMG_KERNEL_BASE} \
- --cmdline "${KERNEL_CMDLINE}"
+QIMG_DEPLOYDIR = "${WORKDIR}/qcom_deploy-${PN}"
+
+# Define INITRAMFS_IMAGE to create kernel+initramfs Android boot images in
+# addition to default boot images. For example add the following line to your
+# conf/local.conf:
+#
+# INITRAMFS_IMAGE = "initramfs-kerneltest-image"
+#
+
+python __anonymous () {
+ if d.getVar('INITRAMFS_IMAGE') != '':
+ d.appendVarFlag('do_qcom_img_deploy', 'depends', ' ${INITRAMFS_IMAGE}:do_image_complete')
}
-do_deploy_append() {
+python do_qcom_img_deploy() {
+ import shutil
+ import subprocess
+
+ subdir = d.getVar("KERNEL_DEPLOYSUBDIR")
+ if subdir is not None:
+ qcom_deploy_dir = os.path.join(d.getVar("QIMG_DEPLOYDIR"), subdir)
+ image_dir = os.path.join(d.getVar("DEPLOY_DIR_IMAGE"), subdir)
+ else:
+ qcom_deploy_dir = d.getVar("QIMG_DEPLOYDIR")
+ image_dir = d.getVar("DEPLOY_DIR_IMAGE")
+
+ initrd = None
+ if d.getVar('INITRAMFS_IMAGE') != '':
+ initrd_image_name = d.getVar("INITRAMFS_IMAGE_NAME")
+ baseinitrd = os.path.join(d.getVar("DEPLOY_DIR_IMAGE"), initrd_image_name)
+ for img in (".cpio.gz", ".cpio.lz4", ".cpio.lzo", ".cpio.lzma", ".cpio.xz", ".cpio"):
+ if os.path.exists(baseinitrd + img):
+ initrd = baseinitrd + img
+ break
+ if not initrd:
+ bb.fatal("Could not find initramfs image %s for bundling" % d.getVar("INITRAMFS_IMAGE"))
+
+ B = d.getVar("B")
+ D = d.getVar("D")
+ kernel_output_dir = d.getVar("KERNEL_OUTPUT_DIR")
+ kernel_imagedest = d.getVar("KERNEL_IMAGEDEST")
+ kernel = os.path.join(B, "kernel-dtb")
+ definitrd = os.path.join(B, "initrd.img")
+ mkbootimg = os.path.join(d.getVar("STAGING_BINDIR_NATIVE"), "skales", "mkbootimg")
+ kernel_image_name = d.getVar("KERNEL_IMAGE_NAME")
+ kernel_link_name = d.getVar("KERNEL_IMAGE_LINK_NAME")
+ output_img = os.path.join(qcom_deploy_dir, "boot-%s.img" % (kernel_link_name))
+ output_sd_img = os.path.join(qcom_deploy_dir, "boot-sd-%s.img" % (kernel_link_name))
+
+ arch = d.getVar("ARCH")
+ if arch is "arm":
+ kernel_name = "zImage"
+ elif arch is "arm64":
+ kernel_name = "Image.gz"
+ else:
+ bb.fatal("Unuspported ARCH %s" % arch)
+
+ if os.path.exists(output_img):
+ os.unlink(output_img)
+ if os.path.exists(output_sd_img):
+ os.unlink(output_sd_img)
+
+ with open(definitrd, "w") as f:
+ f.write("This is not an initrd\n")
+
+ for dtbf in d.getVar("KERNEL_DEVICETREE").split():
+ dtb = os.path.basename(dtbf)
+ dtb_name = dtb.rsplit('.', 1)[0]
+
+ def getVarDTB(name):
+ return d.getVarFlag(name, dtb_name) or d.getVar(name)
- tmp="${SERIAL_CONSOLES}"
- baudrate=`echo $tmp | sed 's/\;.*//'`
- ttydev=`echo $tmp | sed -e 's/^[0-9]*\;//' -e 's/\s.*//' -e 's/\;.*//'`
+ def make_image_internal(output, output_link, rootfs, initrd = definitrd):
+ subprocess.check_call([mkbootimg,
+ "--kernel", kernel,
+ "--ramdisk", initrd,
+ "--output", output,
+ "--pagesize", getVarDTB("QCOM_BOOTIMG_PAGE_SIZE"),
+ "--base", getVarDTB("QCOM_BOOTIMG_KERNEL_BASE"),
+ "--cmdline", "root=%s rw rootwait %s %s" % (rootfs, consoles, getVarDTB("KERNEL_CMDLINE_EXTRA") or "")])
+ if os.path.exists(output_link):
+ os.unlink(output_link)
+ os.symlink(os.path.basename(output), output_link)
+
+ def make_image(template, rootfs):
+ output = os.path.join(qcom_deploy_dir, template % (dtb_name, kernel_image_name))
+ output_link = os.path.join(qcom_deploy_dir, template % (dtb_name, kernel_link_name))
+ make_image_internal(output, output_link, rootfs)
+ return output
+
+ def make_initramfs_image(template, rootfs, initrd, initrd_image_name):
+ output = os.path.join(qcom_deploy_dir, template % (initrd_image_name, dtb_name, kernel_image_name))
+ output_link = os.path.join(qcom_deploy_dir, template % (initrd_image_name, dtb_name, kernel_link_name))
+ make_image_internal(output, output_link, rootfs, initrd)
+ output_link = os.path.join(qcom_deploy_dir, template % ("initramfs", dtb_name, kernel_link_name))
+ if os.path.exists(output_link):
+ os.unlink(output_link)
+ os.symlink(os.path.basename(output), output_link)
+ return output
+
+ consoles = ' '.join(map(lambda c: "console=%(tty)s,%(rate)sn8" % dict(zip(("rate", "tty"), c.split(';'))), getVarDTB("SERIAL_CONSOLES").split()))
+
+ # prepare kernel image with appended dtb
+ with open(kernel, 'wb') as wfd:
+ with open(os.path.join(kernel_output_dir, kernel_name), 'rb') as rfd:
+ shutil.copyfileobj(rfd, wfd)
+ with open(os.path.join(D, kernel_imagedest, dtb), 'rb') as rfd:
+ shutil.copyfileobj(rfd, wfd)
+
+ rootfs = getVarDTB("QCOM_BOOTIMG_ROOTFS")
+ if not rootfs or rootfs is "":
+ bb.fatal("QCOM_BOOTIMG_ROOTFS is undefined")
+
+ output = make_image("boot-%s-%s.img", rootfs)
+ if not os.path.exists(output_img):
+ os.symlink(os.path.basename(output), output_img)
+
+ if initrd:
+ make_initramfs_image("boot-%s-%s-%s.img", rootfs, initrd, d.getVar("INITRAMFS_IMAGE"))
+
+ sd_rootfs = getVarDTB("SD_QCOM_BOOTIMG_ROOTFS")
+ if sd_rootfs:
+ output = make_image("boot-sd-%s-%s.img", sd_rootfs)
+ if not os.path.exists(output_sd_img):
+ os.symlink(os.path.basename(output), output_sd_img)
+
+ if initrd:
+ make_initramfs_image("boot-sd-%s-%s-%s.img", rootfs, initrd, d.getVar("INITRAMFS_IMAGE"))
+}
- # mkbootimg requires an initrd file, make fake one that will be ignored
- # during boot
- echo "This is not an initrd" > ${B}/initrd.img
+do_qcom_img_deploy[depends] += "skales-native:do_populate_sysroot"
- # don't build bootimg if rootfs partition is not defined
- if [ "${QCOM_BOOTIMG_ROOTFS}" == "undefined"]; then
- bbfatal "Rootfs partition must be defined"
- fi
+addtask qcom_img_deploy after do_populate_sysroot do_packagedata bundle_initramfs before do_deploy
- priv_make_image ${QCOM_BOOTIMG_ROOTFS} ${BOOT_IMAGE_BASE_NAME}
- ln -sf ${BOOT_IMAGE_BASE_NAME}.img ${DEPLOYDIR}/${BOOT_IMAGE_SYMLINK_NAME}.img
+# Setup sstate, see deploy.bbclass
+SSTATETASKS += "do_qcom_img_deploy"
+do_qcom_img_deploy[sstate-inputdirs] = "${QIMG_DEPLOYDIR}"
+do_qcom_img_deploy[sstate-outputdirs] = "${DEPLOY_DIR_IMAGE}"
- # build sd boot image only for machines supporting it.
- if [ "${SD_QCOM_BOOTIMG_ROOTFS}" != "undefined" ]; then
- priv_make_image ${SD_QCOM_BOOTIMG_ROOTFS} ${SD_BOOT_IMAGE_BASE_NAME}
- ln -sf ${SD_BOOT_IMAGE_BASE_NAME}.img ${DEPLOYDIR}/${SD_BOOT_IMAGE_SYMLINK_NAME}.img
- fi
+python do_qcom_img_deploy_setscene () {
+ sstate_setscene(d)
}
+addtask do_qcom_img_deploy_setscene
+do_qcom_img_deploy[dirs] = "${QIMG_DEPLOYDIR} ${B}"
+do_qcom_img_deploy[cleandirs] = "${QIMG_DEPLOYDIR}"
+do_qcom_img_deploy[stamp-extra-info] = "${MACHINE_ARCH}"
diff --git a/recipes-multimedia/alsa/alsa-ucm-conf/0001-ucm2-codecs-lpass-add-codec-sequences-for-wsa-and-va.patch b/recipes-multimedia/alsa/alsa-ucm-conf/0001-ucm2-codecs-lpass-add-codec-sequences-for-wsa-and-va.patch
new file mode 100644
index 0000000..8e109d0
--- /dev/null
+++ b/recipes-multimedia/alsa/alsa-ucm-conf/0001-ucm2-codecs-lpass-add-codec-sequences-for-wsa-and-va.patch
@@ -0,0 +1,70 @@
+From 5384a0ec52d2d8fd0bbcdab222b47d0887a058e4 Mon Sep 17 00:00:00 2001
+From: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
+Date: Fri, 20 Nov 2020 12:12:48 +0000
+Subject: [PATCH 1/2] ucm2: codecs: lpass: add codec sequences for wsa and va
+ macro
+
+Add enable/disable codec sequence for Qualcomm Low Power Audio
+Subsystem (LPASS) Codec WSA and VA Macros.
+
+Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
+---
+ ucm2/codecs/lpass/va-macro/DMIC0DisableSeq.conf | 3 +++
+ ucm2/codecs/lpass/va-macro/DMIC0EnableSeq.conf | 3 +++
+ ucm2/codecs/lpass/wsa-macro/SpeakerDisableSeq.conf | 8 ++++++++
+ ucm2/codecs/lpass/wsa-macro/SpeakerEnableSeq.conf | 8 ++++++++
+ 4 files changed, 22 insertions(+)
+ create mode 100644 ucm2/codecs/lpass/va-macro/DMIC0DisableSeq.conf
+ create mode 100644 ucm2/codecs/lpass/va-macro/DMIC0EnableSeq.conf
+ create mode 100644 ucm2/codecs/lpass/wsa-macro/SpeakerDisableSeq.conf
+ create mode 100644 ucm2/codecs/lpass/wsa-macro/SpeakerEnableSeq.conf
+
+diff --git a/ucm2/codecs/lpass/va-macro/DMIC0DisableSeq.conf b/ucm2/codecs/lpass/va-macro/DMIC0DisableSeq.conf
+new file mode 100644
+index 000000000000..457344e71e1b
+--- /dev/null
++++ b/ucm2/codecs/lpass/va-macro/DMIC0DisableSeq.conf
+@@ -0,0 +1,3 @@
++cset "name='VA DMIC MUX0' ZERO"
++cset "name='VA_DEC0 Volume' 0"
++cset "name='VA_AIF1_CAP Mixer DEC0' 0"
+diff --git a/ucm2/codecs/lpass/va-macro/DMIC0EnableSeq.conf b/ucm2/codecs/lpass/va-macro/DMIC0EnableSeq.conf
+new file mode 100644
+index 000000000000..11b428f868ac
+--- /dev/null
++++ b/ucm2/codecs/lpass/va-macro/DMIC0EnableSeq.conf
+@@ -0,0 +1,3 @@
++cset "name='VA DMIC MUX0' DMIC0"
++cset "name='VA_AIF1_CAP Mixer DEC0' 1"
++cset "name='VA_DEC0 Volume' 100"
+diff --git a/ucm2/codecs/lpass/wsa-macro/SpeakerDisableSeq.conf b/ucm2/codecs/lpass/wsa-macro/SpeakerDisableSeq.conf
+new file mode 100644
+index 000000000000..d84463e751fa
+--- /dev/null
++++ b/ucm2/codecs/lpass/wsa-macro/SpeakerDisableSeq.conf
+@@ -0,0 +1,8 @@
++cset "name='WSA_RX0 Digital Volume' 0"
++cset "name='WSA_RX1 Digital Volume' 0"
++cset "name='WSA_COMP1 Switch' 0"
++cset "name='WSA_COMP2 Switch' 0"
++cset "name='WSA_RX0 INP0' ZERO"
++cset "name='WSA_RX1 INP0' ZERO"
++cset "name='WSA RX0 MUX' ZERO"
++cset "name='WSA RX1 MUX' ZERO"
+diff --git a/ucm2/codecs/lpass/wsa-macro/SpeakerEnableSeq.conf b/ucm2/codecs/lpass/wsa-macro/SpeakerEnableSeq.conf
+new file mode 100644
+index 000000000000..4e9faceab70b
+--- /dev/null
++++ b/ucm2/codecs/lpass/wsa-macro/SpeakerEnableSeq.conf
+@@ -0,0 +1,8 @@
++cset "name='WSA RX0 MUX' AIF1_PB"
++cset "name='WSA RX1 MUX' AIF1_PB"
++cset "name='WSA_RX0 INP0' RX0"
++cset "name='WSA_RX1 INP0' RX1"
++cset "name='WSA_COMP1 Switch' 1"
++cset "name='WSA_COMP2 Switch' 1"
++cset "name='WSA_RX0 Digital Volume' 68"
++cset "name='WSA_RX1 Digital Volume' 68"
+--
+2.29.2
+
diff --git a/recipes-multimedia/alsa/alsa-ucm-conf/0002-ucm2-add-support-to-for-Qualcomm-RB5-Platform.patch b/recipes-multimedia/alsa/alsa-ucm-conf/0002-ucm2-add-support-to-for-Qualcomm-RB5-Platform.patch
new file mode 100644
index 0000000..58a508d
--- /dev/null
+++ b/recipes-multimedia/alsa/alsa-ucm-conf/0002-ucm2-add-support-to-for-Qualcomm-RB5-Platform.patch
@@ -0,0 +1,114 @@
+From 382366c1f615613e088982a6c30fc90b3226ae8b Mon Sep 17 00:00:00 2001
+From: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
+Date: Fri, 20 Nov 2020 12:14:31 +0000
+Subject: [PATCH 2/2] ucm2: add support to for Qualcomm RB5 Platform
+
+The Qualcomm RB5 Robotics Platform contains HDMI,
+2x WSA Smart-Speakers audio outputs along with One
+Onboard DMIC audio input.
+
+Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
+---
+ ucm2/sm8250/HDMI.conf | 26 +++++++++++++
+ ucm2/sm8250/HiFi.conf | 37 +++++++++++++++++++
+ .../Qualcomm-RB5-WSA8815-Speakers-DMIC0.conf | 11 ++++++
+ 3 files changed, 74 insertions(+)
+ create mode 100644 ucm2/sm8250/HDMI.conf
+ create mode 100644 ucm2/sm8250/HiFi.conf
+ create mode 100644 ucm2/sm8250/Qualcomm-RB5-WSA8815-Speakers-DMIC0.conf
+
+diff --git a/ucm2/sm8250/HDMI.conf b/ucm2/sm8250/HDMI.conf
+new file mode 100644
+index 000000000000..a9594fd94af2
+--- /dev/null
++++ b/ucm2/sm8250/HDMI.conf
+@@ -0,0 +1,26 @@
++# Use case configuration for RB5 board.
++# Author: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
++
++SectionVerb {
++ EnableSequence [
++ cset "name='TERT_MI2S_RX Audio Mixer MultiMedia1' 1"
++ ]
++
++ DisableSequence [
++ cset "name='TERT_MI2S_RX Audio Mixer MultiMedia1' 0"
++ ]
++
++ Value {
++ TQ "HiFi"
++ }
++}
++
++SectionDevice."HDMI" {
++ #Name "HDMI"
++ Comment "HDMI Digital Stereo Output"
++
++ Value {
++ PlaybackPCM "hw:${CardId}"
++ PlaybackPriority 200
++ }
++}
+diff --git a/ucm2/sm8250/HiFi.conf b/ucm2/sm8250/HiFi.conf
+new file mode 100644
+index 000000000000..484bb49057e7
+--- /dev/null
++++ b/ucm2/sm8250/HiFi.conf
+@@ -0,0 +1,37 @@
++# Use case configuration for Qualcomm RB5.
++# Author: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
++
++SectionVerb {
++
++ EnableSequence [
++ cset "name='WSA_CODEC_DMA_RX_0 Audio Mixer MultiMedia2' 1"
++ <codecs/wsa881x/DefaultEnableSeq.conf>
++ ]
++
++ DisableSequence [
++ cset "name='WSA_CODEC_DMA_RX_0 Audio Mixer MultiMedia2' 0"
++ ]
++
++ Value {
++ TQ "HiFi"
++ }
++}
++
++SectionDevice."Speaker" {
++ Comment "Speaker playback"
++
++ EnableSequence [
++ <codecs/lpass/wsa-macro/SpeakerEnableSeq.conf>
++ <codecs/wsa881x/SpeakerEnableSeq.conf>
++ ]
++
++ DisableSequence [
++ <codecs/wsa881x/SpeakerDisableSeq.conf>
++ <codecs/lpass/wsa-macro/SpeakerDisableSeq.conf>
++ ]
++
++ Value {
++ PlaybackPriority 100
++ PlaybackPCM "hw:${CardId},1"
++ }
++}
+diff --git a/ucm2/sm8250/Qualcomm-RB5-WSA8815-Speakers-DMIC0.conf b/ucm2/sm8250/Qualcomm-RB5-WSA8815-Speakers-DMIC0.conf
+new file mode 100644
+index 000000000000..be2aea7aab22
+--- /dev/null
++++ b/ucm2/sm8250/Qualcomm-RB5-WSA8815-Speakers-DMIC0.conf
+@@ -0,0 +1,11 @@
++Syntax 3
++
++SectionUseCase."HiFi" {
++ File "/sm8250/HiFi.conf"
++ Comment "HiFi quality Music."
++}
++
++SectionUseCase."HDMI" {
++ File "/sm8250/HDMI.conf"
++ Comment "HDMI output."
++}
+--
+2.29.2
+
diff --git a/recipes-multimedia/alsa/alsa-ucm-conf_1.2.%.bbappend b/recipes-multimedia/alsa/alsa-ucm-conf_1.2.1.%.bbappend
index 0c346e4..08b7a18 100644
--- a/recipes-multimedia/alsa/alsa-ucm-conf_1.2.%.bbappend
+++ b/recipes-multimedia/alsa/alsa-ucm-conf_1.2.1.%.bbappend
@@ -1,6 +1,6 @@
FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}:"
-SRC_URI_append_sdm845 = " \
+SDM845_PATCHES = " \
file://0001-ucm2-codecs-wcd934x-Add-Codec-sequences.patch \
file://0002-ucm2-codecs-wsa881x-add-codec-sequences.patch \
file://0003-ucm2-DB845c-Add-ucm-for-DB845c-board.patch \
@@ -9,3 +9,13 @@ SRC_URI_append_sdm845 = " \
file://0006-ucm2-DB845c-remove-cdev-which-is-already-present-in-.patch \
file://0007-ucm2-DB845c-HDMI-update-cdev-to-correct-value.patch \
"
+
+SRC_URI_append_sdm845 = " \
+ ${SDM845_PATCHES} \
+"
+
+SRC_URI_append_sm8250 = " \
+ ${SDM845_PATCHES} \
+ file://0001-ucm2-codecs-lpass-add-codec-sequences-for-wsa-and-va.patch \
+ file://0002-ucm2-add-support-to-for-Qualcomm-RB5-Platform.patch \
+"
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_%.bbappend b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_%.bbappend
deleted file mode 100644
index 20ca03c..0000000
--- a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_%.bbappend
+++ /dev/null
@@ -1,3 +0,0 @@
-PACKAGECONFIG_GL_apq8064 = "${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'gles2 egl', '', d)}"
-PACKAGECONFIG_GL_apq8016 = "${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'gles2 egl', '', d)}"
-PACKAGECONFIG_GL_apq8096 = "${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'gles2 egl', '', d)}"
diff --git a/recipes-rt/rt-tests/rt-tests_%.bbappend b/recipes-rt/rt-tests/rt-tests_%.bbappend
new file mode 100644
index 0000000..2ae7c6d
--- /dev/null
+++ b/recipes-rt/rt-tests/rt-tests_%.bbappend
@@ -0,0 +1,17 @@
+# Upstream repo no longer has 'master' branch, and switched to
+# 'main'. To avoid issue such as:
+#
+# ERROR: rt-tests-1_1.1-r0 do_fetch: Fetcher failure: Unable to find
+# revision dff174f994f547a5785d32454865f140daacb0f5 in branch master
+# even from upstream
+#
+# we need to set the default branch name to 'main' in the recipe.
+#
+# Upstream patch is in progress
+
+SRC_URI = "git://git.kernel.org/pub/scm/utils/rt-tests/rt-tests.git;branch=main \
+ file://run-ptest \
+ file://rt_bmark.py \
+ file://0001-gzip-with-n-for-build-reproducibilty.patch \
+"
+
diff --git a/recipes-support/fastrpc/fastrpc/0001-apps_std_fopen_with_env-account-for-domain-kinds-whe.patch b/recipes-support/fastrpc/fastrpc/0001-apps_std_fopen_with_env-account-for-domain-kinds-whe.patch
new file mode 100644
index 0000000..1206c6e
--- /dev/null
+++ b/recipes-support/fastrpc/fastrpc/0001-apps_std_fopen_with_env-account-for-domain-kinds-whe.patch
@@ -0,0 +1,128 @@
+From 771c3bc695a18b3bdedea6fac44b3e71708cc540 Mon Sep 17 00:00:00 2001
+From: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
+Date: Sat, 6 Mar 2021 04:25:01 +0300
+Subject: [PATCH] apps_std_fopen_with_env: account for domain kinds when
+ looking for data
+
+Currenty apps_std_fopen_with_env() will care about domain only in the
+fallback path when looking into /dsp/ dir (/dsp/adsp, /dsp/cdsp, etc).
+Account for different domains when looking for the file in the path (so
+that e.g. cDSP files will be looked up in the /usr/lib/rfsa/cdsp
+directory rather than the default /usr/lib/rfsa/adsp).
+
+Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
+Change-Id: I1dac61d36edc9e8ff1fdc2d56f968d2578f10399
+---
+ src/apps_std_imp.c | 60 ++++++++++++++++++++++------------------------
+ 1 file changed, 28 insertions(+), 32 deletions(-)
+
+diff --git a/src/apps_std_imp.c b/src/apps_std_imp.c
+index d2559c60d2d6..701d799f5608 100644
+--- a/src/apps_std_imp.c
++++ b/src/apps_std_imp.c
+@@ -662,6 +662,7 @@ __QAIC_IMPL_EXPORT int __QAIC_IMPL(apps_std_fopen_with_env)(const char* envvarna
+ char *absName = NULL;
+ uint16 absNameLen = 0;
+ int domain;
++ const char *dspName = NULL;
+
+ VERIFYC(NULL != mode, AEE_EINVALIDMODE);
+ VERIFYC(NULL != delim, AEE_EINVALIDFORMAT);
+@@ -670,8 +671,23 @@ __QAIC_IMPL_EXPORT int __QAIC_IMPL(apps_std_fopen_with_env)(const char* envvarna
+ VERIFY(0 == (nErr = get_dirlist_from_env(envvarname, &dirListBuf )));
+ VERIFYC(NULL != (dirList = dirListBuf), AEE_EMEMPTR);
+
++ domain = get_domain_id() & DOMAIN_ID_MASK;
++
++ if (domain == ADSP_DOMAIN_ID){
++ dspName = "adsp";
++ } else if (domain == MDSP_DOMAIN_ID){
++ dspName = "mdsp";
++ } else if (domain == SDSP_DOMAIN_ID){
++ dspName = "sdsp";
++ } else if (domain == CDSP_DOMAIN_ID) {
++ dspName = "cdsp";
++ } else {
++ dspName = "adsp";
++ }
++
+ while(dirList)
+ {
++ int dirNameLen;
+ pos = strstr(dirList, delim);
+ dirName = dirList;
+ if (pos) {
+@@ -682,10 +698,13 @@ __QAIC_IMPL_EXPORT int __QAIC_IMPL(apps_std_fopen_with_env)(const char* envvarna
+ }
+
+ // Account for slash char
+- absNameLen = std_strlen(dirName) + std_strlen(name) + 2;
++ dirNameLen = std_strlen(dirName);
++ absNameLen = dirNameLen + std_strlen(name) + 2;
+ VERIFYC(NULL != (absName = (char*)malloc(sizeof(char) * absNameLen)), AEE_ENOMEMORY);
+ if ('\0' != *dirName) {
+ std_strlcpy(absName, dirName, absNameLen);
++ if (!std_strcmp(absName + dirNameLen - 4, "adsp"))
++ std_memscpy(absName + dirNameLen - 4, 4, dspName, 4);
+ std_strlcat(absName, "/", absNameLen);
+ std_strlcat(absName, name, absNameLen);
+ } else {
+@@ -699,47 +718,24 @@ __QAIC_IMPL_EXPORT int __QAIC_IMPL(apps_std_fopen_with_env)(const char* envvarna
+ goto bail;
+ }
+ }
+- domain = get_domain_id() & DOMAIN_ID_MASK;
+
+ #ifdef ANDROID_P
+ absNameLen = std_strlen("/vendor/dsp/adsp/") + std_strlen(name) + 1;
+ VERIFYC(NULL != (absName = (char*)malloc(sizeof(char) * absNameLen)), AEE_ENOMEMORY);
+
+- if (domain == ADSP_DOMAIN_ID){
+- std_strlcpy(absName, "/vendor/dsp/adsp/", absNameLen);
+- std_strlcat(absName, name,absNameLen);
+- } else if (domain == MDSP_DOMAIN_ID){
+- std_strlcpy(absName, "/vendor/dsp/mdsp/", absNameLen);
+- std_strlcat(absName, name,absNameLen);
+- } else if (domain == SDSP_DOMAIN_ID){
+- std_strlcpy(absName, "/vendor/dsp/sdsp/", absNameLen);
+- std_strlcat(absName, name,absNameLen);
+- } else if (domain == CDSP_DOMAIN_ID) {
+- std_strlcpy(absName, "/vendor/dsp/cdsp/", absNameLen);
+- std_strlcat(absName, name,absNameLen);
+- } else {
+- absName[0] = '\0';
+- }
++ std_strlcpy(absName, "/vendor/dsp/", absNameLen);
++ std_strlcat(absName, dspName, absNameLen);
++ std_strlcat(absName, "/", absNameLen);
++ std_strlcat(absName, name,absNameLen);
+ nErr = apps_std_fopen(absName, mode, psout);
+ #else
+ absNameLen = std_strlen("/dsp/adsp/") + std_strlen(name) + 1;
+ VERIFYC(NULL != (absName = (char*)malloc(sizeof(char) * absNameLen)), AEE_ENOMEMORY);
+
+- if (domain == ADSP_DOMAIN_ID){
+- std_strlcpy(absName, "/dsp/adsp/", absNameLen);
+- std_strlcat(absName, name,absNameLen);
+- } else if (domain == MDSP_DOMAIN_ID){
+- std_strlcpy(absName, "/dsp/mdsp/", absNameLen);
+- std_strlcat(absName, name,absNameLen);
+- } else if (domain == SDSP_DOMAIN_ID){
+- std_strlcpy(absName, "/dsp/sdsp/", absNameLen);
+- std_strlcat(absName, name,absNameLen);
+- } else if (domain == CDSP_DOMAIN_ID) {
+- std_strlcpy(absName, "/dsp/cdsp/", absNameLen);
+- std_strlcat(absName, name,absNameLen);
+- } else {
+- absName[0] = '\0';
+- }
++ std_strlcpy(absName, "/dsp/", absNameLen);
++ std_strlcat(absName, dspName, absNameLen);
++ std_strlcat(absName, "/", absNameLen);
++ std_strlcat(absName, name,absNameLen);
+ nErr = apps_std_fopen(absName, mode, psout);
+ #endif
+ bail:
+--
+2.30.0
+
diff --git a/recipes-support/fastrpc/fastrpc/adsprpcd.service b/recipes-support/fastrpc/fastrpc/adsprpcd.service
new file mode 100644
index 0000000..c2b09bf
--- /dev/null
+++ b/recipes-support/fastrpc/fastrpc/adsprpcd.service
@@ -0,0 +1,9 @@
+[Unit]
+Description=aDSP RPC daemon
+
+[Service]
+Type=exec
+ExecStart=/usr/bin/adsprpcd
+
+[Install]
+WantedBy=multi-user.target
diff --git a/recipes-support/fastrpc/fastrpc/cdsprpcd.service b/recipes-support/fastrpc/fastrpc/cdsprpcd.service
new file mode 100644
index 0000000..39b7300
--- /dev/null
+++ b/recipes-support/fastrpc/fastrpc/cdsprpcd.service
@@ -0,0 +1,9 @@
+[Unit]
+Description=cDSP RPC daemon
+
+[Service]
+Type=exec
+ExecStart=/usr/bin/cdsprpcd
+
+[Install]
+WantedBy=multi-user.target
diff --git a/recipes-support/fastrpc/fastrpc/mount-dsp.sh b/recipes-support/fastrpc/fastrpc/mount-dsp.sh
new file mode 100644
index 0000000..1bacfb8
--- /dev/null
+++ b/recipes-support/fastrpc/fastrpc/mount-dsp.sh
@@ -0,0 +1,26 @@
+#!/bin/sh
+
+set -e
+
+if [ -r /sys/devices/soc0/machine ] ; then
+ MACHINE=`cat /sys/devices/soc0/machine`
+ case $MACHINE in
+ SM8250|QRB5160)
+ WHAT=/lib/firmware/qcom/sm8250/dspso.bin
+ ;;
+ esac
+fi
+
+if [ -z "$WHAT" -o ! -r "$WHAT"] ; then
+ if [ -h /dev/disk/by-partlabel/dsp_a ] ; then
+ WHAT=/dev/disk/by-partlabel/dsp_a
+ else
+ WHAT=/dev/disk/by-partlabel/dsp
+ fi
+fi
+
+if [ -e "$WHAT" ] ; then
+ mount $WHAT /usr/lib/rfsa -o ro
+else
+ echo "Not mounting /usr/lib/rfsa, partition/image not found" 1>&2
+fi
diff --git a/recipes-support/fastrpc/fastrpc/usr-lib-rfsa.service b/recipes-support/fastrpc/fastrpc/usr-lib-rfsa.service
new file mode 100644
index 0000000..f5fc76a
--- /dev/null
+++ b/recipes-support/fastrpc/fastrpc/usr-lib-rfsa.service
@@ -0,0 +1,16 @@
+[Unit]
+Description=Mount DSP partition to /usr/lib/rfsa
+DefaultDependencies=false
+Before=umount.target local-fs.target
+After=local-pre-fs.target
+Conflicts=umount.target
+
+[Service]
+Type=oneshot
+RemainAfterExit=Yes
+TimeoutSec=0
+ExecStart=/usr/sbin/mount-dsp.sh
+ExecStop=/bin/umount /usr/lib/rfsa
+
+[Install]
+WantedBy=local-fs.target
diff --git a/recipes-support/fastrpc/fastrpc_git.bb b/recipes-support/fastrpc/fastrpc_git.bb
index 3aa67a7..18f477f 100644
--- a/recipes-support/fastrpc/fastrpc_git.bb
+++ b/recipes-support/fastrpc/fastrpc_git.bb
@@ -1,15 +1,57 @@
-HOMEPAGE = "https://git.linaro.org/landing-teams/working/qualcomm/fastrpc.git"
+HOMEPAGE = "https://git.codelinaro.org/linaro/qcomlt/fastrpc.git"
SUMMARY = "Qualcomm FastRPC applications and library"
SECTION = "devel"
LICENSE = "BSD-3-Clause"
LIC_FILES_CHKSUM = "file://src/fastrpc_apps_user.c;beginline=1;endline=29;md5=f94f3a7beba14ae2f59f817e9634f891"
-SRCREV = "388d868b3146fa7ccbeb6aa8c71485ebbbf5e1b9"
-SRC_URI = "git://git.linaro.org/landing-teams/working/qualcomm/fastrpc.git;branch=automake;protocol=https"
+SRCREV = "bc36c705c9b057ca880a423021d3c19f02edeadd"
+SRC_URI = "\
+ git://git.codelinaro.org/linaro/qcomlt/fastrpc.git;branch=automake;protocol=https \
+ file://0001-apps_std_fopen_with_env-account-for-domain-kinds-whe.patch \
+ file://adsprpcd.service \
+ file://cdsprpcd.service \
+ file://usr-lib-rfsa.service \
+ file://mount-dsp.sh \
+"
PV = "0.0+${SRCPV}"
S = "${WORKDIR}/git"
-inherit autotools
+inherit autotools systemd
+
+PACKAGES += "${PN}-systemd"
+RRECOMMENDS_${PN} += "${PN}-systemd"
+
+SYSTEMD_PACKAGES = "${PN} ${PN}-systemd"
+
+SYSTEMD_SERVICE_${PN} = "usr-lib-rfsa.service"
+
+SYSTEMD_SERVICE_${PN}-systemd = "adsprpcd.service cdsprpcd.service"
+SYSTEMD_AUTO_ENABLE_${PN}-systemd = "disable"
+
+do_install_append() {
+ install -d ${D}${libdir}/rfsa
+
+ install -d ${D}${systemd_unitdir}/system
+ install -m 0644 ${WORKDIR}/usr-lib-rfsa.service ${D}${systemd_unitdir}/system
+ install -m 0644 ${WORKDIR}/adsprpcd.service ${D}${systemd_unitdir}/system
+ install -m 0644 ${WORKDIR}/cdsprpcd.service ${D}${systemd_unitdir}/system
+
+ install -d ${D}${sbindir}
+ install -m 0755 ${WORKDIR}/mount-dsp.sh ${D}${sbindir}
+}
+
+FILES_${PN} += " \
+ ${libdir}/rfsa \
+ ${libdir}/libadsp_default_listener.so \
+ ${libdir}/libcdsp_default_listener.so \
+ ${libdir}/libadsprpc.so \
+ ${libdir}/libcdsprpc.so \
+"
+
+FILES_${PN}-dev_remove = "${FILES_SOLIBSDEV}"
+
+# We need to include lib*dsprpc.so into fastrpc for compatibility with Hexagon SDK
+ERROR_QA_remove = "dev-so"
diff --git a/recipes-support/initrdscripts/files/copy-modules.sh b/recipes-support/initrdscripts/files/copy-modules.sh
new file mode 100644
index 0000000..12dc052
--- /dev/null
+++ b/recipes-support/initrdscripts/files/copy-modules.sh
@@ -0,0 +1,17 @@
+#!/bin/sh
+# Copyright (C) 2022 Linaro Ltd.
+# Licensed on MIT
+
+copy_modules_enabled() {
+ [ -n "${bootparam_copy_modules}" -a -d /lib/modules/`uname -r` ]
+}
+
+copy_modules_run() {
+ if [ -n "$ROOTFS_DIR" ]; then
+ rm -rf $ROOTFS_DIR/lib/modules/`uname -r`
+ mkdir -p $ROOTFS_DIR/lib/modules
+ cp -a /lib/modules/`uname -r` $ROOTFS_DIR/lib/modules
+ else
+ debug "No rootfs has been set"
+ fi
+}
diff --git a/recipes-support/initrdscripts/initramfs-module-copy-modules_1.0.bb b/recipes-support/initrdscripts/initramfs-module-copy-modules_1.0.bb
new file mode 100644
index 0000000..effc7df
--- /dev/null
+++ b/recipes-support/initrdscripts/initramfs-module-copy-modules_1.0.bb
@@ -0,0 +1,15 @@
+SUMMARY = "initramfs-framework module for copying kernel modules from initramfs to rootfs"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
+RDEPENDS:${PN} = "initramfs-framework-base ${VIRTUAL-RUNTIME_base-utils}"
+
+SRC_URI = "file://copy-modules.sh"
+
+S = "${WORKDIR}"
+
+do_install() {
+ install -d ${D}/init.d
+ install -m 0755 ${WORKDIR}/copy-modules.sh ${D}/init.d/95-copy_modules
+}
+
+FILES:${PN} = "/init.d/"
diff --git a/recipes-support/pd-mapper/pd-mapper/0001-pd-mapper-Include-limits.h-for-PATH_MAX.patch b/recipes-support/pd-mapper/pd-mapper/0001-pd-mapper-Include-limits.h-for-PATH_MAX.patch
deleted file mode 100644
index de3fea8..0000000
--- a/recipes-support/pd-mapper/pd-mapper/0001-pd-mapper-Include-limits.h-for-PATH_MAX.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From 874dadf1168f8a1b2b1bd4ab5bb4a20097147ab0 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Thu, 28 May 2020 08:01:37 -0700
-Subject: [PATCH] pd-mapper: Include limits.h for PATH_MAX
-
-Fixes
-pd-mapper.c:199:22: error: 'PATH_MAX' undeclared (first use in this function); did you mean 'AF_MAX'?
-
-Upstream-Status: Submitted [https://github.com/andersson/pd-mapper/pull/4]
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- pd-mapper.c | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/pd-mapper.c b/pd-mapper.c
-index 45177ae..f5d45ee 100644
---- a/pd-mapper.c
-+++ b/pd-mapper.c
-@@ -36,6 +36,7 @@
- #include <fcntl.h>
- #include <libgen.h>
- #include <libqrtr.h>
-+#include <limits.h>
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
---
-2.26.2
-
diff --git a/recipes-support/pd-mapper/pd-mapper_git.bb b/recipes-support/pd-mapper/pd-mapper_git.bb
index 9e5ca11..04f75c2 100644
--- a/recipes-support/pd-mapper/pd-mapper_git.bb
+++ b/recipes-support/pd-mapper/pd-mapper_git.bb
@@ -9,9 +9,8 @@ DEPENDS = "qrtr"
inherit systemd
-SRCREV = "ab5074fdd5e4130578aa4c99b00d44527a79636f"
+SRCREV = "d7fe25fa6eff2e62cf264544adee9e8ca830dc78"
SRC_URI = "git://github.com/andersson/${BPN}.git;branch=master;protocol=https \
- file://0001-pd-mapper-Include-limits.h-for-PATH_MAX.patch \
"
PV = "0.0+${SRCPV}"
diff --git a/recipes-support/qrtr/qrtr_git.bb b/recipes-support/qrtr/qrtr_git.bb
index 51c342b..def23be 100644
--- a/recipes-support/qrtr/qrtr_git.bb
+++ b/recipes-support/qrtr/qrtr_git.bb
@@ -7,10 +7,10 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=15329706fbfcb5fc5edcc1bc7c139da5"
inherit systemd
-SRCREV = "7bd5cf302437755b0d741c9dc1805395a9654597"
+SRCREV = "9dc7a88548c27983e06465d3fbba2ba27d4bc050"
SRC_URI = "git://github.com/andersson/${BPN}.git;branch=master;protocol=https"
-PV = "0.0+${SRCPV}"
+PV = "0.3+${SRCPV}"
S = "${WORKDIR}/git"
diff --git a/recipes-support/rmtfs/rmtfs_git.bb b/recipes-support/rmtfs/rmtfs_git.bb
index 8655346..e935bdd 100644
--- a/recipes-support/rmtfs/rmtfs_git.bb
+++ b/recipes-support/rmtfs/rmtfs_git.bb
@@ -7,11 +7,11 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=ca25dbf5ebfc1a058bfc657c895aac2f"
inherit systemd
-SRCREV = "dfb8f3ed1c8fbde621cd08aaf9e7724a4c55cbd1"
+SRCREV = "293ab8babb27ac0f24247bb101fed9420c629c29"
SRC_URI = "git://github.com/andersson/${BPN}.git;branch=master;protocol=https"
DEPENDS = "qmic-native qrtr udev"
-PV = "0.0+${SRCPV}"
+PV = "0.2+${SRCPV}"
S = "${WORKDIR}/git"
diff --git a/recipes-test/images/initramfs-kerneltest-full-image.bb b/recipes-test/images/initramfs-kerneltest-full-image.bb
new file mode 100644
index 0000000..ea60bfe
--- /dev/null
+++ b/recipes-test/images/initramfs-kerneltest-full-image.bb
@@ -0,0 +1,3 @@
+require initramfs-test-full-image.bb
+
+PACKAGE_INSTALL += "${MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS}"
diff --git a/recipes-test/images/initramfs-kerneltest-image.bb b/recipes-test/images/initramfs-kerneltest-image.bb
new file mode 100644
index 0000000..9dea43c
--- /dev/null
+++ b/recipes-test/images/initramfs-kerneltest-image.bb
@@ -0,0 +1,3 @@
+require initramfs-test-image.bb
+
+PACKAGE_INSTALL += "${MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS}"
diff --git a/recipes-test/images/initramfs-test-full-image.bb b/recipes-test/images/initramfs-test-full-image.bb
new file mode 100644
index 0000000..c7580ca
--- /dev/null
+++ b/recipes-test/images/initramfs-test-full-image.bb
@@ -0,0 +1,70 @@
+require recipes-test/images/initramfs-tiny-image.bb
+
+DESCRIPTION = "Relatively larger ramdisk image for running tests (bootrr, etc)"
+
+PACKAGE_INSTALL += " \
+ bluez5 \
+ coreutils \
+ dhcp-client \
+ diag \
+ e2fsprogs \
+ e2fsprogs-e2fsck \
+ e2fsprogs-mke2fs \
+ e2fsprogs-resize2fs \
+ e2fsprogs-tune2fs \
+ ethtool \
+ gptfdisk \
+ iw \
+ hdparm \
+ kexec \
+ lava-test-shell \
+ libdrm-tests \
+ lsof \
+ ncurses \
+ ncurses-terminfo \
+ ncurses-terminfo-base \
+ pciutils \
+ pd-mapper \
+ qrtr \
+ rmtfs \
+ stress-ng \
+ tqftpserv \
+ usbutils \
+ util-linux \
+ util-linux-chrt \
+ util-linux-lsblk \
+ wpa-supplicant \
+"
+
+PACKAGE_INSTALL:append:libc-glibc += " \
+ rt-tests \
+"
+
+# We'd like to include extra packages provided by layers which we do not depend
+# on. This can be handled by .bbappends, but then image recipes including this
+# one would not get all these tools. So simulate dynamic bbappend here.
+PACKAGE_INSTALL_openembedded_layer += " \
+ crash \
+ cryptsetup \
+ devmem2 \
+ dhrystone \
+ iozone3 \
+ libgpiod \
+ libgpiod-tools \
+ lmbench \
+ makedumpfile \
+ mbw \
+ sysbench \
+ tinymembench \
+ tiobench \
+ whetstone \
+"
+
+PACKAGE_INSTALL_networking_layer += " \
+ iperf2 \
+ iperf3 \
+ tcpdump \
+"
+
+PACKAGE_INSTALL += "${@bb.utils.contains("BBFILE_COLLECTIONS", "openembedded-layer", "${PACKAGE_INSTALL_openembedded_layer}", "", d)}"
+PACKAGE_INSTALL += "${@bb.utils.contains("BBFILE_COLLECTIONS", "networking-layer", "${PACKAGE_INSTALL_networking_layer}", "", d)}"
diff --git a/recipes-test/images/initramfs-test-image.bb b/recipes-test/images/initramfs-test-image.bb
index 8497ec5..591e649 100644
--- a/recipes-test/images/initramfs-test-image.bb
+++ b/recipes-test/images/initramfs-test-image.bb
@@ -1,12 +1,12 @@
+require recipes-test/images/initramfs-tiny-image.bb
+
DESCRIPTION = "Small ramdisk image for running tests (bootrr, etc)"
-PACKAGE_INSTALL = " \
- ${ROOTFS_BOOTSTRAP_INSTALL} \
+PACKAGE_INSTALL += " \
bluez5 \
- busybox \
- base-passwd \
dhcp-client \
diag \
+ dropbear \
e2fsprogs \
e2fsprogs-e2fsck \
e2fsprogs-mke2fs \
@@ -14,42 +14,34 @@ PACKAGE_INSTALL = " \
e2fsprogs-tune2fs \
ethtool \
gptfdisk \
+ iw \
lava-test-shell \
- packagegroup-core-boot \
+ libdrm-tests \
+ lrzsz \
pciutils \
pd-mapper \
qrtr \
rmtfs \
+ strace \
tqftpserv \
- udev \
usbutils \
wpa-supplicant \
"
-# Do not pollute the initrd image with rootfs features
-IMAGE_FEATURES = "debug-tweaks"
-
-export IMAGE_BASENAME = "initramfs-test-image"
-IMAGE_LINGUAS = ""
-
-LICENSE = "MIT"
-
-IMAGE_FSTYPES = "${INITRAMFS_FSTYPES}"
-inherit core-image
-
-IMAGE_ROOTFS_SIZE = "8192"
-IMAGE_ROOTFS_EXTRA_SPACE = "0"
-
-# Disable installation of kernel and modules via packagegroup-core-boot
-NO_RECOMMENDATIONS = "1"
+# We'd like to include extra packages provided by layers which we do not depend
+# on. This can be handled by .bbappends, but then image recipes including this
+# one would not get all these tools. So simulate dynamic bbappend here.
+PACKAGE_INSTALL_openembedded_layer += " \
+ cryptsetup \
+ devmem2 \
+"
-# Enable local auto-login (on systemd) of the root user (local = serial port and
-# virtual console by default, can be configured).
-LOCAL_GETTY ?= " \
- ${IMAGE_ROOTFS}${systemd_system_unitdir}/serial-getty@.service \
- ${IMAGE_ROOTFS}${systemd_system_unitdir}/getty@.service \
+PACKAGE_INSTALL_networking_layer += " \
+ iperf2 \
+ iperf3 \
+ phytool \
+ tcpdump \
"
-local_autologin () {
- sed -i -e 's/^\(ExecStart *=.*getty \)/\1--autologin root /' ${LOCAL_GETTY}
-}
-ROOTFS_POSTPROCESS_COMMAND += "${@oe.utils.conditional('VIRTUAL-RUNTIME_init_manager', 'systemd', 'local_autologin;', '', d)}"
+
+PACKAGE_INSTALL += "${@bb.utils.contains("BBFILE_COLLECTIONS", "openembedded-layer", "${PACKAGE_INSTALL_openembedded_layer}", "", d)}"
+PACKAGE_INSTALL += "${@bb.utils.contains("BBFILE_COLLECTIONS", "networking-layer", "${PACKAGE_INSTALL_networking_layer}", "", d)}"
diff --git a/recipes-test/images/initramfs-tiny-image.bb b/recipes-test/images/initramfs-tiny-image.bb
new file mode 100644
index 0000000..c70ccee
--- /dev/null
+++ b/recipes-test/images/initramfs-tiny-image.bb
@@ -0,0 +1,35 @@
+DESCRIPTION = "Tiny ramdisk image for board bringup"
+
+PACKAGE_INSTALL = " \
+ ${ROOTFS_BOOTSTRAP_INSTALL} \
+ busybox \
+ base-passwd \
+ packagegroup-core-boot \
+ udev \
+"
+
+# Do not pollute the initrd image with rootfs features
+IMAGE_FEATURES = "debug-tweaks"
+IMAGE_LINGUAS = ""
+
+LICENSE = "MIT"
+
+IMAGE_FSTYPES = "${INITRAMFS_FSTYPES}"
+inherit core-image
+
+IMAGE_ROOTFS_SIZE = "8192"
+IMAGE_ROOTFS_EXTRA_SPACE = "0"
+
+# Disable installation of kernel and modules via packagegroup-core-boot
+NO_RECOMMENDATIONS ?= "1"
+
+# Enable local auto-login (on systemd) of the root user (local = serial port and
+# virtual console by default, can be configured).
+LOCAL_GETTY ?= " \
+ ${IMAGE_ROOTFS}${systemd_system_unitdir}/serial-getty@.service \
+ ${IMAGE_ROOTFS}${systemd_system_unitdir}/getty@.service \
+"
+local_autologin () {
+ sed -i -e 's/^\(ExecStart *=.*getty \)/\1--autologin root /' ${LOCAL_GETTY}
+}
+ROOTFS_POSTPROCESS_COMMAND += "${@oe.utils.conditional('VIRTUAL-RUNTIME_init_manager', 'systemd', 'local_autologin;', '', d)}"