diff options
19 files changed, 223 insertions, 54 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 @@ -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/machine/include/qcom-common.inc b/conf/machine/include/qcom-common.inc index 88da089..18b9ce7 100644 --- a/conf/machine/include/qcom-common.inc +++ b/conf/machine/include/qcom-common.inc @@ -34,3 +34,8 @@ 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/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/sa8155p-adp.conf b/conf/machine/sa8155p-adp.conf index d1f9288..19734d9 100644 --- a/conf/machine/sa8155p-adp.conf +++ b/conf/machine/sa8155p-adp.conf @@ -1,16 +1,13 @@ #@TYPE: Machine #@NAME: SA8155P-ADP -#@DESCRIPTION: Machine configuration for the SA8155P-ADP development board, with Qualcomm Snapdragon 855 SM8150. +#@DESCRIPTION: Machine configuration for the SA8155P-ADP (and IOT v2) development board, with Qualcomm Snapdragon SA8155p. require conf/machine/include/qcom-sa8155p.inc -# Set INITRAMFS_IMAGE for sa8155p machine -INITRAMFS_IMAGE = "initramfs-kerneltest-full-image" - MACHINE_FEATURES = "usbhost usbgadget ext2" KERNEL_IMAGETYPE ?= "Image.gz" -KERNEL_DEVICETREE ?= "qcom/sa8155p-adp.dtb" +KERNEL_DEVICETREE ?= "qcom/sa8155p-adp.dtb qcom/sa8155p-iot-v2-adp.dtb" SERIAL_CONSOLE ?= "115200 ttyMSM0" @@ -18,8 +15,10 @@ MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += " \ kernel-modules \ " -# /dev/sda6 is 'userdata' partition for adp board, so wipe it and use for our build -QCOM_BOOTIMG_ROOTFS ?= "/dev/sda6" +# /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/recipes-bsp/firmware/firmware-qcom-dragonboard845c_20190529180356-v4.bb b/recipes-bsp/firmware/firmware-qcom-dragonboard845c_20190529180356-v4.bb index 848b76a..9011f87 100644 --- a/recipes-bsp/firmware/firmware-qcom-dragonboard845c_20190529180356-v4.bb +++ b/recipes-bsp/firmware/firmware-qcom-dragonboard845c_20190529180356-v4.bb @@ -7,15 +7,6 @@ SRC_URI = "https://releases.linaro.org/96boards/dragonboard845c/qualcomm/firmwar SRC_URI[md5sum] = "ad69855a1275547b16d94a1b5405ac62" SRC_URI[sha256sum] = "4289d2f2a7124b104d0274879e702aae9b1e50c42eec3747f8584c6744ef65e3" -inherit allarch -DEPENDS += "qca-swiss-army-knife-native" -inherit python3native - -do_compile() { - # Build board-2.bin needed by WiFi - ath10k-generate-board-2_json.sh ./38-bdwlan_split board-2.json - python3 "${STAGING_BINDIR_NATIVE}/ath10k-bdencoder" -c board-2.json -o board-2.bin -} do_install() { install -d ${D}${nonarch_base_libdir}/firmware/ @@ -28,9 +19,6 @@ do_install() { 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 -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-${PN} } diff --git a/recipes-bsp/firmware/firmware-qcom-rb5_20210331-v4.bb b/recipes-bsp/firmware/firmware-qcom-rb5_20210331-v4.bb index 78d7eb9..8cafe7f 100644 --- a/recipes-bsp/firmware/firmware-qcom-rb5_20210331-v4.bb +++ b/recipes-bsp/firmware/firmware-qcom-rb5_20210331-v4.bb @@ -1,9 +1,3 @@ -# Provide base URI of NHLOS_Binaries.zip and adreno_1.0_qrb5165_rb5.tar.gz -# files. Use "file://" if those files are copied into -# recipes-bsp/firmware/files/ directory. -# NHLOS_URI ?= "file://" -# ADRENO_URI ?= "file://" - DESCRIPTION = "QCOM Firmware for Qualcomm Robotics RB5 platform" LICENSE = "Proprietary" 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-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/linux-linaro-qcom.inc b/recipes-kernel/linux/linux-linaro-qcom.inc index 823f40d..b193b63 100644 --- a/recipes-kernel/linux/linux-linaro-qcom.inc +++ b/recipes-kernel/linux/linux-linaro-qcom.inc @@ -15,7 +15,7 @@ SRCBRANCH = "release/qcomlt-${PV}" COMPATIBLE_MACHINE = "(qcom)" -LINUX_LINARO_QCOM_GIT ?= "git://git.linaro.org/landing-teams/working/qualcomm/kernel.git;protocol=https" +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" 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_5.14.bb b/recipes-kernel/linux/linux-linaro-qcomlt_5.14.bb deleted file mode 100644 index 0fc0f19..0000000 --- a/recipes-kernel/linux/linux-linaro-qcomlt_5.14.bb +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright (C) 2014-2020 Linaro -# Released under the MIT license (see COPYING.MIT for the terms) - -require recipes-kernel/linux/linux-linaro-qcom.inc - -SRCBRANCH = "release/sa8155p-adp/qcomlt-5.14" -SRCREV = "4091a5657797a2e936231eb791ad6053cbaaff16" - -COMPATIBLE_MACHINE = "(sa8155p)" 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-support/fastrpc/fastrpc_git.bb b/recipes-support/fastrpc/fastrpc_git.bb index 179d42b..18f477f 100644 --- a/recipes-support/fastrpc/fastrpc_git.bb +++ b/recipes-support/fastrpc/fastrpc_git.bb @@ -1,4 +1,4 @@ -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" @@ -7,7 +7,7 @@ LIC_FILES_CHKSUM = "file://src/fastrpc_apps_user.c;beginline=1;endline=29;md5=f9 SRCREV = "bc36c705c9b057ca880a423021d3c19f02edeadd" SRC_URI = "\ - git://git.linaro.org/landing-teams/working/qualcomm/fastrpc.git;branch=automake;protocol=https \ + 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 \ 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-test/images/initramfs-test-full-image.bb b/recipes-test/images/initramfs-test-full-image.bb index 371b1b9..c7580ca 100644 --- a/recipes-test/images/initramfs-test-full-image.bb +++ b/recipes-test/images/initramfs-test-full-image.bb @@ -15,7 +15,8 @@ PACKAGE_INSTALL += " \ ethtool \ gptfdisk \ iw \ - kexec-tools \ + hdparm \ + kexec \ lava-test-shell \ libdrm-tests \ lsof \ @@ -31,6 +32,7 @@ PACKAGE_INSTALL += " \ usbutils \ util-linux \ util-linux-chrt \ + util-linux-lsblk \ wpa-supplicant \ " @@ -45,10 +47,17 @@ PACKAGE_INSTALL_openembedded_layer += " \ crash \ cryptsetup \ devmem2 \ + dhrystone \ iozone3 \ libgpiod \ libgpiod-tools \ + lmbench \ makedumpfile \ + mbw \ + sysbench \ + tinymembench \ + tiobench \ + whetstone \ " PACKAGE_INSTALL_networking_layer += " \ diff --git a/recipes-test/images/initramfs-test-image.bb b/recipes-test/images/initramfs-test-image.bb index ccd4a19..591e649 100644 --- a/recipes-test/images/initramfs-test-image.bb +++ b/recipes-test/images/initramfs-test-image.bb @@ -6,6 +6,7 @@ PACKAGE_INSTALL += " \ bluez5 \ dhcp-client \ diag \ + dropbear \ e2fsprogs \ e2fsprogs-e2fsck \ e2fsprogs-mke2fs \ @@ -16,10 +17,12 @@ PACKAGE_INSTALL += " \ iw \ lava-test-shell \ libdrm-tests \ + lrzsz \ pciutils \ pd-mapper \ qrtr \ rmtfs \ + strace \ tqftpserv \ usbutils \ wpa-supplicant \ @@ -36,6 +39,7 @@ PACKAGE_INSTALL_openembedded_layer += " \ PACKAGE_INSTALL_networking_layer += " \ iperf2 \ iperf3 \ + phytool \ tcpdump \ " |