Skip to content

Commit

Permalink
Merge pull request #536 from lumag/linux-yocto
Browse files Browse the repository at this point in the history
Technology preview of the linux-yocto support
  • Loading branch information
lumag committed Nov 8, 2023
2 parents 1036569 + 28d9eef commit e6b49c1
Show file tree
Hide file tree
Showing 27 changed files with 575 additions and 6 deletions.
19 changes: 15 additions & 4 deletions .github/workflows/build-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ env:
POKY_URL: https://git.yoctoproject.org/poky
DISTRO: poky
TCLIBC: glibc musl
KERNELS: linaro-qcomlt yocto

jobs:
build:
Expand Down Expand Up @@ -67,31 +68,41 @@ jobs:
EOF
for tclibc in ${TCLIBC}; do
for kernel in ${KERNELS}; do
cat << EOF >> plan.yaml
${tclibc}: &${tclibc}
${tclibc}-${kernel}: &${tclibc}-${kernel}
local_conf:
- INHERIT += 'buildstats buildstats-summary'
- INHERIT:remove = 'rm_work'
- TCLIBC := '${tclibc}'
- PREFERRED_PROVIDER_virtual/kernel := 'linux-${kernel}'
EOF
done
done
cat << EOF >> plan.yaml
jobs:
EOF
# FIXME: loop over kernels instead of hardcoding them, need to support armv7a and modem first
for tclibc in ${TCLIBC}; do
cat << EOF >> plan.yaml
- name: ${tclibc}
bakes:
- name: ${tclibc}
bakes:
EOF
for machine in ${{inputs.machines}}; do
cat << EOF >> plan.yaml
- { <<: [*commondata, *${tclibc}], machine: ${machine}, name: ${machine}-${tclibc} }
- { <<: [*commondata, *${tclibc}-linaro-qcomlt], machine: ${machine}, name: ${machine}-${tclibc} }
EOF
if [ "${machine}" = "qcom-armv8a" -a "${{inputs.branch}}" = "master" ] ; then
cat << EOF >> plan.yaml
- { <<: [*commondata, *${tclibc}-yocto], machine: qcom-armv8a, name: qcom-armv8a-${tclibc}-yocto }
EOF
fi
done
done
echo "Ready to submit this Tux Plan:"
cat plan.yaml
- name: Run build
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ python do_qcom_img_deploy() {
}

do_qcom_img_deploy[depends] += "skales-native:do_populate_sysroot"
do_qcom_img_deploy[vardeps] = "QCOM_BOOTIMG_PAGE_SIZE QCOM_BOOTIMG_KERNEL_BASE KERNEL_CMDLINE_EXTRA QCOM_BOOTIMG_ROOTFS"

addtask qcom_img_deploy after do_populate_sysroot do_packagedata bundle_initramfs before do_deploy

Expand Down
1 change: 0 additions & 1 deletion conf/machine/qcom-armv8a.conf
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ QCOM_BOOTIMG_ROOTFS[qrb2210-rb1] ?= "PARTLABEL=userdata"
QCOM_BOOTIMG_ROOTFS[qrb4210-rb2] ?= "PARTLABEL=userdata"
SD_QCOM_BOOTIMG_ROOTFS[apq8016-sbc] ?= "/dev/mmcblk1p7"
KERNEL_CMDLINE_EXTRA[sdm845-db845c] ?= "clk_ignore_unused pd_ignore_unused"
KERNEL_CMDLINE_EXTRA[apq8096-db820c] ?= "maxcpus=2"

# Userspace tools
MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += " \
Expand Down
2 changes: 1 addition & 1 deletion recipes-kernel/linux/linux-linaro-qcom.inc
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ KERNEL_DEFCONFIG:aarch64 ?= "${S}/arch/arm64/configs/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
inherit linux-qcom-bootimg

kernel_conf_variable() {
sed -e "/CONFIG_$1[ =]/d;" -i ${B}/.config
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
From bf26272a429b9e33ba5e8bc9ada9ec794b5e8610 Mon Sep 17 00:00:00 2001
From: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Date: Wed, 19 Jul 2023 21:04:47 +0300
Subject: [PATCH] arm64: dts: qcom: qcm2290: temporarily disable cluster idle
state

For some reason cluster idle state causes the board to hang after boot.
Disable it to make it work properly.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Upstream-Status: Inappropriate [need to find the issue first]
---
arch/arm64/boot/dts/qcom/qcm2290.dtsi | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/qcm2290.dtsi b/arch/arm64/boot/dts/qcom/qcm2290.dtsi
index 1d1de156f8f0..d1f0aa828234 100644
--- a/arch/arm64/boot/dts/qcom/qcm2290.dtsi
+++ b/arch/arm64/boot/dts/qcom/qcm2290.dtsi
@@ -170,32 +170,34 @@ psci {

CPU_PD0: power-domain-cpu0 {
#power-domain-cells = <0>;
- power-domains = <&CLUSTER_PD>;
+ //power-domains = <&CLUSTER_PD>;
domain-idle-states = <&CPU_SLEEP>;
};

CPU_PD1: power-domain-cpu1 {
#power-domain-cells = <0>;
- power-domains = <&CLUSTER_PD>;
+ //power-domains = <&CLUSTER_PD>;
domain-idle-states = <&CPU_SLEEP>;
};

CPU_PD2: power-domain-cpu2 {
#power-domain-cells = <0>;
- power-domains = <&CLUSTER_PD>;
+ //power-domains = <&CLUSTER_PD>;
domain-idle-states = <&CPU_SLEEP>;
};

CPU_PD3: power-domain-cpu3 {
#power-domain-cells = <0>;
- power-domains = <&CLUSTER_PD>;
+ //power-domains = <&CLUSTER_PD>;
domain-idle-states = <&CPU_SLEEP>;
};

+#if 0
CLUSTER_PD: power-domain-cpu-cluster {
#power-domain-cells = <0>;
domain-idle-states = <&CLUSTER_SLEEP>;
};
+#endif
};

reserved_memory: reserved-memory {
--
2.42.0

Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
From 973c015facabcbd320063648010942c51992c1a1 Mon Sep 17 00:00:00 2001
From: Konrad Dybcio <konrad.dybcio@linaro.org>
Date: Wed, 6 Sep 2023 11:24:55 +0200
Subject: [PATCH] arm64: dts: qcom: qrb2210-rb1: Swap UART index

Newer RB1 board revisions have a debug UART on QUP0. Sadly, it looks
like even when ordering one in retail, customers receive prototype
boards with "Enginering Sample" written on them.

Use QUP4 for UART to make all known RB1 boards boot.

Fixes: e18771961336 ("arm64: dts: qcom: Add initial QTI RB1 device tree")
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reported-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://lore.kernel.org/r/20230906-topic-rb1_features_sans_icc-v1-1-e92ce6fbde16@linaro.org
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Upstream-Status: Backport 6.7-rc1
---
arch/arm64/boot/dts/qcom/qrb2210-rb1.dts | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/qrb2210-rb1.dts b/arch/arm64/boot/dts/qcom/qrb2210-rb1.dts
index eadba066972e..5cda5b761455 100644
--- a/arch/arm64/boot/dts/qcom/qrb2210-rb1.dts
+++ b/arch/arm64/boot/dts/qcom/qrb2210-rb1.dts
@@ -13,7 +13,7 @@ / {
compatible = "qcom,qrb2210-rb1", "qcom,qrb2210", "qcom,qcm2290";

aliases {
- serial0 = &uart0;
+ serial0 = &uart4;
sdhc1 = &sdhc_1;
sdhc2 = &sdhc_2;
};
@@ -357,7 +357,7 @@ key_volp_n: key-volp-n-state {
};

/* UART connected to the Micro-USB port via a FTDI chip */
-&uart0 {
+&uart4 {
compatible = "qcom,geni-debug-uart";
status = "okay";
};
--
2.42.0

Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# SPDX-License-Identifier: MIT

define KMACHINE qcom-armv8a
define KTYPE standard
define KARCH arm64

include ktypes/standard/standard.scc nocfg
branch qcom-armv8a

include qcom-armv8a.scc

#include features/bluetooth/bluetooth.scc
include features/cgroups/cgroups.scc
include features/transparent-hugepage/transparent-hugepage.cfg
include features/usb-net/usb-net.scc

include cfg/fs/devtmpfs.scc
include cfg/fs/debugfs.scc
include cfg/fs/ext2.scc
include cfg/fs/ext4.scc
include cfg/fs/vfat.scc

include cfg/timer/no_hz.scc

# enable the ability to run 32 bit apps
include arch/arm/32bit-compat.scc

kconf hardware qcom-extra.cfg
23 changes: 23 additions & 0 deletions recipes-kernel/linux/linux-yocto/bsp/qcom-armv8a/qcom-armv8a.scc
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# SPDX-License-Identifier: MIT

kconf hardware qcom.cfg

include qcom-msm8916.scc
include qcom-msm8996.scc
include qcom-qcm2290.scc
include qcom-sdm845.scc
include qcom-sm6115.scc
include qcom-sm8250.scc

include features/i2c/i2c.scc
include features/hrt/hrt.scc
include features/net/net.scc
include features/pci/pci.scc
include features/power/arm.scc
include features/spi/spi.scc
include features/usb/usb-base.scc
include features/leds/leds.scc
include features/pwm/pwm.scc

include cfg/timer/rtc.scc
include cfg/dmaengine.scc
20 changes: 20 additions & 0 deletions recipes-kernel/linux/linux-yocto/bsp/qcom-armv8a/qcom-extra.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# SPDX-License-Identifier: MIT

CONFIG_BPF_SYSCALL=y
CONFIG_CGROUP_BPF=y

CONFIG_AUTOFS_FS=y

CONFIG_TYPEC_MUX_NB7VPQ904M=y
CONFIG_TYPEC_MUX_FSA4480=y
CONFIG_TYPEC_DP_ALTMODE=y

CONFIG_DRM_LONTIUM_LT9611=y
CONFIG_DRM_LONTIUM_LT9611UXC=y
CONFIG_DRM_I2C_ADV7511=y
CONFIG_DRM_I2C_ADV7511_AUDIO=y
CONFIG_DRM_I2C_ADV7511_CEC=y

CONFIG_USB_XHCI_PCI_RENESAS=y

CONFIG_USB_HSIC_USB3503=y
34 changes: 34 additions & 0 deletions recipes-kernel/linux/linux-yocto/bsp/qcom-armv8a/qcom-msm8916.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# SPDX-License-Identifier: MIT

CONFIG_PINCTRL_MSM8916=y

CONFIG_QCOM_A53PLL=y
CONFIG_QCOM_CLK_APCS_MSM8916=y
CONFIG_MSM_GCC_8916=y

CONFIG_INTERCONNECT_QCOM_MSM8916=y

CONFIG_QCOM_IOMMU=y

CONFIG_PM8916_WATCHDOG=y

CONFIG_SND_SOC_APQ8016_SBC=m
CONFIG_SND_SOC_MSM8916_WCD_ANALOG=m
CONFIG_SND_SOC_MSM8916_WCD_DIGITAL=m

CONFIG_EXTCON=y
CONFIG_EXTCON_USB_GPIO=y

CONFIG_USB_ULPI_BUS=y
CONFIG_PHY_QCOM_USB_HS=y

CONFIG_QCOM_SPMI_TEMP_ALARM=y
CONFIG_QCOM_SPMI_VADC=y

CONFIG_QCOM_SMSM=y

CONFIG_USB_EHCI_HCD=y
CONFIG_USB_CHIPIDEA=y
CONFIG_USB_CHIPIDEA_MSM=y
CONFIG_USB_CHIPIDEA_UDC=y
CONFIG_USB_CHIPIDEA_HOST=y
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# SPDX-License-Identifier: MIT

kconf hardware qcom-rpm.cfg
kconf hardware qcom-msm8916.cfg
22 changes: 22 additions & 0 deletions recipes-kernel/linux/linux-yocto/bsp/qcom-armv8a/qcom-msm8996.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# SPDX-License-Identifier: MIT

CONFIG_PINCTRL_MSM8996=y

CONFIG_QCOM_CLK_APCC_MSM8996=y
CONFIG_MSM_GCC_8996=y
CONFIG_MSM_MMCC_8996=y
CONFIG_INTERCONNECT_QCOM_MSM8996=y

CONFIG_PHY_QCOM_QMP_PCIE_8996=y

CONFIG_SND_SOC_MSM8996=m

CONFIG_SND_SOC_WCD9335=m

CONFIG_PHY_QCOM_QUSB2=y

CONFIG_EXTCON=y
CONFIG_EXTCON_USB_GPIO=y

CONFIG_QCOM_SPMI_TEMP_ALARM=y
CONFIG_QCOM_SPMI_VADC=y
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# SPDX-License-Identifier: MIT

kconf hardware qcom-rpm.cfg
kconf hardware qcom-msm8996.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# SPDX-License-Identifier: MIT

CONFIG_PINCTRL_QCM2290=y
CONFIG_QCM_GCC_2290=y
CONFIG_QCM_DISPCC_2290=y
CONFIG_INTERCONNECT_QCOM_QCM2290=y

CONFIG_PHY_QCOM_QUSB2=y
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# SPDX-License-Identifier: MIT

kconf hardware qcom-rpm.cfg
kconf hardware qcom-qcm2290.cfg
11 changes: 11 additions & 0 deletions recipes-kernel/linux/linux-yocto/bsp/qcom-armv8a/qcom-rpm.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# SPDX-License-Identifier: MIT

CONFIG_RPMSG_QCOM_GLINK_RPM=y
CONFIG_REGULATOR_QCOM_SMD_RPM=y
CONFIG_QCOM_MPM=y
CONFIG_QCOM_SMD_RPM=y
CONFIG_QCOM_RPMPD=y
CONFIG_QCOM_CLK_SMD_RPM=y

# legacy boards
CONFIG_RPMSG_QCOM_SMD=y
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# SPDX-License-Identifier: MIT

CONFIG_QCOM_RPMH=y
CONFIG_QCOM_RPMHPD=y
CONFIG_QCOM_COMMAND_DB=y
CONFIG_RPMSG_QCOM_GLINK_SMEM=m
CONFIG_QCOM_AOSS_QMP=y
CONFIG_REGULATOR_QCOM_RPMH=y
CONFIG_QCOM_CLK_RPMH=y
14 changes: 14 additions & 0 deletions recipes-kernel/linux/linux-yocto/bsp/qcom-armv8a/qcom-sdm845.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# SPDX-License-Identifier: MIT

CONFIG_PINCTRL_SDM845=y
CONFIG_SDM_CAMCC_845=m
CONFIG_SDM_GCC_845=y
CONFIG_SDM_GPUCC_845=y
CONFIG_SDM_VIDEOCC_845=m
CONFIG_SDM_DISPCC_845=y
CONFIG_INTERCONNECT_QCOM_SDM845=y

CONFIG_MFD_WCD934X=m
CONFIG_GPIO_WCD934X=m
CONFIG_SND_SOC_WCD934X=m
CONFIG_SND_SOC_SDM845=m
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# SPDX-License-Identifier: MIT

kconf hardware qcom-rpmh.cfg
kconf hardware qcom-sdm845.cfg
11 changes: 11 additions & 0 deletions recipes-kernel/linux/linux-yocto/bsp/qcom-armv8a/qcom-sm6115.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# SPDX-License-Identifier: MIT

CONFIG_PINCTRL_SM6115=y
CONFIG_SM_DISPCC_6115=y
CONFIG_SM_GCC_6115=y
CONFIG_SM_GPUCC_6115=y

CONFIG_PHY_QCOM_QUSB2=y

CONFIG_QCOM_SPMI_TEMP_ALARM=y
CONFIG_QCOM_SPMI_ADC5=y
Loading

0 comments on commit e6b49c1

Please sign in to comment.