Skip to contentSkip to conversation

rpi-firmware: Add recipe for building version 20230405

PATCH Superseded Yi Jiang 3 participants 11 messages May 21, 2024 – May 23, 2024

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore

Yi Jiang

author
#0 lore raw

PATCH 1/3 rpi-firmware: Add recipe for building version 20230405

From: Florian Bezdeka <[email protected]>

Preparation for supporting the Raspberry Pi 4 as target platform.

---
 .../rpi-firmware/files/debian/aliases.dts     | 18 +++++++++++
 .../rpi-firmware/files/debian/cmdline.txt     |  1 +
 .../rpi-firmware/files/debian/config.txt      | 12 ++++++++
 .../files/debian/rpi-firmware.install         |  9 ++++++
 recipes-bsp/rpi-firmware/files/rules          |  7 +++++
 .../rpi-firmware/rpi-firmware_1.20230405.bb   | 30 +++++++++++++++++++
 6 files changed, 77 insertions(+)
 create mode 100644 recipes-bsp/rpi-firmware/files/debian/aliases.dts
 create mode 100644 recipes-bsp/rpi-firmware/files/debian/cmdline.txt
 create mode 100644 recipes-bsp/rpi-firmware/files/debian/config.txt
 create mode 100644 recipes-bsp/rpi-firmware/files/debian/rpi-firmware.install
 create mode 100644 recipes-bsp/rpi-firmware/files/rules
 create mode 100644 recipes-bsp/rpi-firmware/rpi-firmware_1.20230405.bb
recipes-bsp/rpi-firmware/files/debian/aliases.dts new file +18 -0
new file mode 100644
index 0000000..15020d9
@@ -0,0 +1,18 @@
+/*
+ * Xenomai Real-Time System
+ *
+ * Copyright (c) Siemens AG, 2024
+ *
+ * Authors:
+ *  Florian Bezdeka <[email protected]>
+ *
+ * SPDX-License-Identifier: MIT
+ */
+
+/dts-v1/;
+/plugin/;
+&{/aliases} {
+	/* Ensure stable /dev/mmcblk0 assignment */
+	mmc0 = "/emmc2bus/mmc@7e340000";
+	mmc1 = "/soc/mmc@7e300000";
+};
recipes-bsp/rpi-firmware/files/debian/cmdline.txt new file +1 -0
new file mode 100644
index 0000000..58971c5
@@ -0,0 +1 @@
+module_blacklist=vc4 console=ttyS1,115200 root=/dev/mmcblk0p2 rootwait
recipes-bsp/rpi-firmware/files/debian/config.txt new file +12 -0
new file mode 100644
index 0000000..61eee20
@@ -0,0 +1,12 @@
+dtparam=audio=on
+
+[pi4]
+dtoverlay=vc4-fkms-v3d
+max_framebuffers=2
+
+[all]
+enable_uart=1
+arm_64bit=1
+dtoverlay=aliases
+dtoverlay=dwc2
+initramfs initrd.img followkernel
recipes-bsp/rpi-firmware/files/debian/rpi-firmware.install new file +9 -0
new file mode 100644
index 0000000..28d6cc3
@@ -0,0 +1,9 @@
+boot/bootcode.bin		usr/lib/rpi-firmware/
+boot/LICENCE.broadcom		usr/lib/rpi-firmware/
+boot/*.dat			usr/lib/rpi-firmware/
+boot/*.dtb			usr/lib/rpi-firmware/
+boot/*.elf			usr/lib/rpi-firmware/
+boot/overlays/README		usr/lib/rpi-firmware/overlays/
+boot/overlays/aliases.dtbo	usr/lib/rpi-firmware/overlays/
+debian/cmdline.txt		usr/lib/rpi-firmware/
+debian/config.txt		usr/lib/rpi-firmware/
recipes-bsp/rpi-firmware/files/rules new file +7 -0
new file mode 100644
index 0000000..df0582c
@@ -0,0 +1,7 @@
+#!/usr/bin/make -f
+
+override_dh_auto_build:
+	dtc -O dtb -b 0 -@ debian/aliases.dts -o boot/overlays/aliases.dtbo
+
+%:
+	dh $@
recipes-bsp/rpi-firmware/rpi-firmware_1.20230405.bb new file +30 -0
new file mode 100644
index 0000000..1cfb103
@@ -0,0 +1,30 @@
+#
+# Xenomai Real-Time System
+#
+# Copyright (c) Siemens AG, 2024
+#
+# Authors:
+#  Florian Bezdeka <[email protected]>
+#
+# SPDX-License-Identifier: MIT
+#
+
+inherit dpkg
+
+SRC_URI = " \
+    https://github.com/raspberrypi/firmware/archive/${PV}.tar.gz;downloadfilename=${PN}-${PV}.tar.gz \
+    file://debian \
+    file://rules"
+
+SRC_URI[sha256sum] = "08b208bf715d0379a93d38f20aed409cbe2e12c1dc27e3a3794416faefde1aa9"
+
+S = "${WORKDIR}/firmware-${PV}"
+
+DEBIAN_BUILD_DEPENDS = "device-tree-compiler"
+
+do_prepare_build[cleandirs] += "${S}/debian"
+do_prepare_build() {
+    cp -r ${WORKDIR}/debian ${S}
+
+    deb_debianize
+}
Signature · 1 line
2.39.2
author
#1 lore raw

PATCH 2/3 rpi4: Add rpi4 (Raspberry Pi 4) as target platform

From: Florian Bezdeka <[email protected]>

---
 board-rpi4.yml                                | 15 +++++++++
 conf/machine/rpi4.conf                        | 32 +++++++++++++++++++
 .../customizations/files/primary.network      |  2 +-
 recipes-kernel/linux/files/arm64_defconfig    | 10 ++++--
 recipes-kernel/linux/files/rpi4.cfg           | 20 ++++++++++++
 .../linux/linux-xenomai-3-dovetail.inc        |  1 +
 .../linux/linux-xenomai-3_latest.bb           |  1 +
 wic/rpi4.wks                                  | 17 ++++++++++
 8 files changed, 94 insertions(+), 4 deletions(-)
 create mode 100644 board-rpi4.yml
 create mode 100644 conf/machine/rpi4.conf
 create mode 100644 recipes-kernel/linux/files/rpi4.cfg
 create mode 100644 wic/rpi4.wks
board-rpi4.yml new file +15 -0
new file mode 100644
index 0000000..debff7a
@@ -0,0 +1,15 @@
+#
+# Xenomai Real-Time System
+#
+# Copyright (c) Siemens AG, 2024
+#
+# Authors:
+#  Florian Bezdeka <[email protected]>
+#
+# SPDX-License-Identifier: MIT
+#
+
+header:
+  version: 14
+
+machine: rpi4
conf/machine/rpi4.conf new file +32 -0
new file mode 100644
index 0000000..3c0607e
@@ -0,0 +1,32 @@
+#
+# Xenomai Real-Time System
+#
+# Copyright (c) Siemens AG, 2024
+#
+# Authors:
+#  Florian Bezdeka <[email protected]>
+#
+# SPDX-License-Identifier: MIT
+#
+
+DISTRO_ARCH = "arm64"
+
+IMAGE_FSTYPES ?= "wic"
+IMAGER_BUILD_DEPS = "rpi-firmware linux-image-${KERNEL_NAME}"
+IMAGER_INSTALL += "${IMAGER_BUILD_DEPS}"
+
+IMAGE_BOOT_FILES = " \
+    /usr/lib/rpi-firmware/bootcode.bin;bootcode.bin \
+    /usr/lib/rpi-firmware/cmdline.txt;cmdline.txt \
+    /usr/lib/rpi-firmware/config.txt;config.txt \
+    /usr/lib/rpi-firmware/fixup4.dat;fixup4.dat \
+    /usr/lib/rpi-firmware/fixup4x.dat;fixup4x.dat \
+    /usr/lib/rpi-firmware/start4.elf;start4.elf \
+    /usr/lib/rpi-firmware/start4x.elf;start4x.elf \
+    /usr/lib/rpi-firmware/overlays/*;overlays/ \
+    /usr/lib/linux-image-*/broadcom/bcm2711-rpi-4-b.dtb \
+    /usr/lib/linux-image-*/overlays/*;overlays/ \
+    ${IMAGE_ROOTFS}/vmlinuz;kernel8.img \
+    "
+
+IMAGE_PREINSTALL:append = " firmware-brcm80211"
recipes-core/customizations/files/primary.network +1 -1
index c517d10..2343386 100644
@@ -1,5 +1,5 @@
 [Match]
-Name=eth0 enp2s0 enp3s0
+Name=eth0 enp2s0 enp3s0 end0
 
 [Network]
 DHCP=yes
recipes-kernel/linux/files/arm64_defconfig +7 -3
index 9bacb82..94f7b5b 100644
@@ -603,6 +603,7 @@ CONFIG_FREEZER=y
 # CONFIG_ARCH_ACTIONS is not set
 CONFIG_ARCH_SUNXI=y
 CONFIG_ARCH_ALPINE=y
+CONFIG_ARCH_BCM=y
 CONFIG_ARCH_BCM2835=y
 CONFIG_ARCH_BCM_IPROC=y
 CONFIG_ARCH_BERLIN=y
@@ -704,6 +705,7 @@ CONFIG_PCIE_IPROC_MSI=y
 # CONFIG_PCI_HOST_THUNDER_ECAM is not set
 CONFIG_PCIE_ROCKCHIP=m
 # CONFIG_PCIE_MEDIATEK is not set
+CONFIG_PCIE_BRCMSTB=y
 
 #
 # PCI Endpoint
@@ -1552,7 +1554,7 @@ CONFIG_OF_MDIO=y
 CONFIG_OF_PCI=y
 CONFIG_OF_PCI_IRQ=y
 CONFIG_OF_RESERVED_MEM=y
-# CONFIG_OF_OVERLAY is not set
+CONFIG_OF_OVERLAY=y
 CONFIG_OF_NUMA=y
 # CONFIG_PARPORT is not set
 CONFIG_PNP=y
@@ -1949,7 +1951,7 @@ CONFIG_MACB_USE_HWSTAMP=y
 # CONFIG_MACB_PCI is not set
 CONFIG_NET_VENDOR_BROADCOM=y
 # CONFIG_B44 is not set
-# CONFIG_BCMGENET is not set
+ CONFIG_BCMGENET=y
 # CONFIG_BNX2 is not set
 # CONFIG_CNIC is not set
 # CONFIG_TIGON3 is not set
@@ -2640,7 +2642,7 @@ CONFIG_I2C_ALGOBIT=y
 #
 # I2C system bus drivers (mostly embedded / system-on-chip)
 #
-CONFIG_I2C_BCM2835=m
+CONFIG_I2C_BCM2835=y
 CONFIG_I2C_BCM_IPROC=y
 CONFIG_I2C_BRCMSTB=y
 # CONFIG_I2C_CADENCE is not set
@@ -2880,6 +2882,7 @@ CONFIG_GPIO_GENERIC=y
 # CONFIG_GPIO_ALTERA is not set
 # CONFIG_GPIO_AMDPT is not set
 # CONFIG_GPIO_AXP209 is not set
+CONFIG_GPIO_BCM_XGS_IPROC=y
 CONFIG_GPIO_BRCMSTB=y
 CONFIG_GPIO_DWAPB=y
 # CONFIG_GPIO_EXAR is not set
@@ -5473,6 +5476,7 @@ CONFIG_PHY_MESON_GXL_USB2=y
 # CONFIG_BCM_KONA_USB2_PHY is not set
 # CONFIG_PHY_BCM_NS_USB2 is not set
 # CONFIG_PHY_BCM_NS_USB3 is not set
+CONFIG_PHY_BCM_SR_USB=y
 CONFIG_PHY_NS2_PCIE=y
 CONFIG_PHY_NS2_USB_DRD=y
 CONFIG_PHY_BRCM_SATA=y
recipes-kernel/linux/files/rpi4.cfg new file +20 -0
new file mode 100644
index 0000000..9d77279
@@ -0,0 +1,20 @@
+#CONFIG_ARCH_BCM=y
+#CONFIG_ARCH_BCM2835=y
+#CONFIG_BCM2835_MBOX=y
+#CONFIG_RASPBERRYPI_FIRMWARE=y
+#CONFIG_OF_OVERLAY=y
+#CONFIG_SERIAL_8250_BCM2835AUX=y
+#CONFIG_MMC_BCM2835=y
+#CONFIG_MMC_SDHCI_IPROC=y
+#CONFIG_MMC_SDHCI_BRCMSTB=y
+#CONFIG_I2C_BCM2835=y
+#CONFIG_PHY_BCM_SR_USB=y
+#CONFIG_PWM_BCM_IPROC=y
+#CONFIG_PWM_BCM2835=m
+#CONFIG_DMA_BCM2835=m
+#CONFIG_SPI_BCM2835=m
+#CONFIG_GPIO_BRCMSTB=y
+#CONFIG_GPIO_BCM_XGS_IPROC=y
+#CONFIG_BCM2835_WDT=y
+#CONFIG_PCIE_BRCMSTB=y
+#CONFIG_BCMGENET=y
recipes-kernel/linux/linux-xenomai-3-dovetail.inc +1 -0
index a8612ba..36000dd 100644
@@ -12,5 +12,6 @@
 require recipes-kernel/linux/linux-xenomai-3.inc
 
 SRC_URI += "git://source.denx.de/xenomai/linux-dovetail.git;protocol=https;nobranch=1"
+SRC_URI:append:rpi4 = " file://rpi4.cfg"
 
 PV ?= "${@d.getVar('SRCREV').strip('-')[0].lstrip('v')}+"
recipes-kernel/linux/linux-xenomai-3_latest.bb +1 -0
index c65c28d..5908c59 100644
@@ -80,3 +80,4 @@ SRC_URI += "${GIT_REPO};protocol=https;branch=${GIT_BRANCH}"
 SRCREV = "${AUTOREV}"
 
 SRC_URI:append:beagle-bone-black = " ${@ 'file://bbb_4.4.cfg' if is_xeno_3_0(d) else '' }"
+SRC_URI:append:rpi4 = " file://rpi4.cfg"
wic/rpi4.wks new file +17 -0
new file mode 100644
index 0000000..22eeb87
@@ -0,0 +1,17 @@
+#
+# Xenomai Real-Time System
+#
+# Copyright (c) Siemens AG, 2024
+#
+# Authors:
+#  Florian Bezdeka <[email protected]>
+#
+# SPDX-License-Identifier: MIT
+#
+
+part --source bootimg-partition --ondisk mmcblk0 --fstype vfat --label boot --align 1 --size 128 --overhead-factor 1 --extra-space 0
+
+part / --source rootfs --ondisk mmcblk0 --fstype ext4 --mkfs-extraopts "-T default" --label platform --align 1024 --active
+
+# silence wic
+bootloader
Signature · 1 line
2.39.2
#2 lore raw

Re: [PATCH 2/3] rpi4: Add rpi4 (Raspberry Pi 4) as target platform

Quoted 145 lines · Yi Jiang

From: Florian Bezdeka <[email protected]>

---
 board-rpi4.yml                                | 15 +++++++++
 conf/machine/rpi4.conf                        | 32 +++++++++++++++++++
 .../customizations/files/primary.network      |  2 +-
 recipes-kernel/linux/files/arm64_defconfig    | 10 ++++--
 recipes-kernel/linux/files/rpi4.cfg           | 20 ++++++++++++
 .../linux/linux-xenomai-3-dovetail.inc        |  1 +
 .../linux/linux-xenomai-3_latest.bb           |  1 +
 wic/rpi4.wks                                  | 17 ++++++++++
 8 files changed, 94 insertions(+), 4 deletions(-)
 create mode 100644 board-rpi4.yml
 create mode 100644 conf/machine/rpi4.conf
 create mode 100644 recipes-kernel/linux/files/rpi4.cfg
 create mode 100644 wic/rpi4.wks
board-rpi4.yml new file +15 -0
new file mode 100644
index 0000000..debff7a
@@ -0,0 +1,15 @@
+#
+# Xenomai Real-Time System
+#
+# Copyright (c) Siemens AG, 2024
+#
+# Authors:
+#  Florian Bezdeka <[email protected]>
+#
+# SPDX-License-Identifier: MIT
+#
+
+header:
+  version: 14
+
+machine: rpi4
conf/machine/rpi4.conf new file +32 -0
new file mode 100644
index 0000000..3c0607e
@@ -0,0 +1,32 @@
+#
+# Xenomai Real-Time System
+#
+# Copyright (c) Siemens AG, 2024
+#
+# Authors:
+#  Florian Bezdeka <[email protected]>
+#
+# SPDX-License-Identifier: MIT
+#
+
+DISTRO_ARCH = "arm64"
+
+IMAGE_FSTYPES ?= "wic"
+IMAGER_BUILD_DEPS = "rpi-firmware linux-image-${KERNEL_NAME}"
+IMAGER_INSTALL += "${IMAGER_BUILD_DEPS}"
+
+IMAGE_BOOT_FILES = " \
+    /usr/lib/rpi-firmware/bootcode.bin;bootcode.bin \
+    /usr/lib/rpi-firmware/cmdline.txt;cmdline.txt \
+    /usr/lib/rpi-firmware/config.txt;config.txt \
+    /usr/lib/rpi-firmware/fixup4.dat;fixup4.dat \
+    /usr/lib/rpi-firmware/fixup4x.dat;fixup4x.dat \
+    /usr/lib/rpi-firmware/start4.elf;start4.elf \
+    /usr/lib/rpi-firmware/start4x.elf;start4x.elf \
+    /usr/lib/rpi-firmware/overlays/*;overlays/ \
+    /usr/lib/linux-image-*/broadcom/bcm2711-rpi-4-b.dtb \
+    /usr/lib/linux-image-*/overlays/*;overlays/ \
+    ${IMAGE_ROOTFS}/vmlinuz;kernel8.img \
+    "
+
+IMAGE_PREINSTALL:append = " firmware-brcm80211"
recipes-core/customizations/files/primary.network +1 -1
index c517d10..2343386 100644
@@ -1,5 +1,5 @@
 [Match]
-Name=eth0 enp2s0 enp3s0
+Name=eth0 enp2s0 enp3s0 end0
 
 [Network]
 DHCP=yes
recipes-kernel/linux/files/arm64_defconfig +6 -3
index 9bacb82..94f7b5b 100644
@@ -603,6 +603,7 @@ CONFIG_FREEZER=y
 # CONFIG_ARCH_ACTIONS is not set
 CONFIG_ARCH_SUNXI=y
 CONFIG_ARCH_ALPINE=y
+CONFIG_ARCH_BCM=y
 CONFIG_ARCH_BCM2835=y
 CONFIG_ARCH_BCM_IPROC=y
 CONFIG_ARCH_BERLIN=y
@@ -704,6 +705,7 @@ CONFIG_PCIE_IPROC_MSI=y
 # CONFIG_PCI_HOST_THUNDER_ECAM is not set
 CONFIG_PCIE_ROCKCHIP=m
 # CONFIG_PCIE_MEDIATEK is not set
+CONFIG_PCIE_BRCMSTB=y
 
 #
 # PCI Endpoint
@@ -1552,7 +1554,7 @@ CONFIG_OF_MDIO=y
 CONFIG_OF_PCI=y
 CONFIG_OF_PCI_IRQ=y
 CONFIG_OF_RESERVED_MEM=y
-# CONFIG_OF_OVERLAY is not set
+CONFIG_OF_OVERLAY=y
 CONFIG_OF_NUMA=y
 # CONFIG_PARPORT is not set
 CONFIG_PNP=y
@@ -1949,7 +1951,7 @@ CONFIG_MACB_USE_HWSTAMP=y
 # CONFIG_MACB_PCI is not set
 CONFIG_NET_VENDOR_BROADCOM=y
 # CONFIG_B44 is not set
-# CONFIG_BCMGENET is not set
+ CONFIG_BCMGENET=y
 # CONFIG_BNX2 is not set
 # CONFIG_CNIC is not set
 # CONFIG_TIGON3 is not set
@@ -2640,7 +2642,7 @@ CONFIG_I2C_ALGOBIT=y
 #
 # I2C system bus drivers (mostly embedded / system-on-chip)
 #
-CONFIG_I2C_BCM2835=m
+CONFIG_I2C_BCM2835=y
 CONFIG_I2C_BCM_IPROC=y
 CONFIG_I2C_BRCMSTB=y
 # CONFIG_I2C_CADENCE is not set
@@ -2880,6 +2882,7 @@ CONFIG_GPIO_GENERIC=y
 # CONFIG_GPIO_ALTERA is not set
 # CONFIG_GPIO_AMDPT is not set
 # CONFIG_GPIO_AXP209 is not set
+CONFIG_GPIO_BCM_XGS_IPROC=y
 CONFIG_GPIO_BRCMSTB=y
 CONFIG_GPIO_DWAPB=y
 # CONFIG_GPIO_EXAR is not set

recipes-kernel/linux/files/arm64_defconfig CONFIG_PHY_MESON_GXL_USB2=y · line 5482

Quoted 7 lines
recipes-kernel/linux/files/arm64_defconfig +1 -0
@@ -5473,6 +5476,7 @@ CONFIG_PHY_MESON_GXL_USB2=y
 # CONFIG_BCM_KONA_USB2_PHY is not set
 # CONFIG_PHY_BCM_NS_USB2 is not set
 # CONFIG_PHY_BCM_NS_USB3 is not set
+CONFIG_PHY_BCM_SR_USB=y
 CONFIG_PHY_NS2_PCIE=y
 CONFIG_PHY_NS2_USB_DRD=y
 CONFIG_PHY_BRCM_SATA=y

With all those changes to our shared arm64 defconfig, why do we still need the rpi4.cfg below?

Quoted 59 lines
recipes-kernel/linux/files/rpi4.cfg new file +20 -0
new file mode 100644
index 0000000..9d77279
@@ -0,0 +1,20 @@
+#CONFIG_ARCH_BCM=y
+#CONFIG_ARCH_BCM2835=y
+#CONFIG_BCM2835_MBOX=y
+#CONFIG_RASPBERRYPI_FIRMWARE=y
+#CONFIG_OF_OVERLAY=y
+#CONFIG_SERIAL_8250_BCM2835AUX=y
+#CONFIG_MMC_BCM2835=y
+#CONFIG_MMC_SDHCI_IPROC=y
+#CONFIG_MMC_SDHCI_BRCMSTB=y
+#CONFIG_I2C_BCM2835=y
+#CONFIG_PHY_BCM_SR_USB=y
+#CONFIG_PWM_BCM_IPROC=y
+#CONFIG_PWM_BCM2835=m
+#CONFIG_DMA_BCM2835=m
+#CONFIG_SPI_BCM2835=m
+#CONFIG_GPIO_BRCMSTB=y
+#CONFIG_GPIO_BCM_XGS_IPROC=y
+#CONFIG_BCM2835_WDT=y
+#CONFIG_PCIE_BRCMSTB=y
+#CONFIG_BCMGENET=y
recipes-kernel/linux/linux-xenomai-3-dovetail.inc +1 -0
index a8612ba..36000dd 100644
@@ -12,5 +12,6 @@
 require recipes-kernel/linux/linux-xenomai-3.inc
 
 SRC_URI += "git://source.denx.de/xenomai/linux-dovetail.git;protocol=https;nobranch=1"
+SRC_URI:append:rpi4 = " file://rpi4.cfg"
 
 PV ?= "${@d.getVar('SRCREV').strip('-')[0].lstrip('v')}+"
recipes-kernel/linux/linux-xenomai-3_latest.bb +1 -0
index c65c28d..5908c59 100644
@@ -80,3 +80,4 @@ SRC_URI += "${GIT_REPO};protocol=https;branch=${GIT_BRANCH}"
 SRCREV = "${AUTOREV}"
 
 SRC_URI:append:beagle-bone-black = " ${@ 'file://bbb_4.4.cfg' if is_xeno_3_0(d) else '' }"
+SRC_URI:append:rpi4 = " file://rpi4.cfg"
wic/rpi4.wks new file +7 -0
new file mode 100644
index 0000000..22eeb87
@@ -0,0 +1,17 @@
+#
+# Xenomai Real-Time System
+#
+# Copyright (c) Siemens AG, 2024
+#
+# Authors:
+#  Florian Bezdeka <[email protected]>

wic/rpi4.wks line 17

Quoted 10 lines
wic/rpi4.wks new file +10 -0
+#
+# SPDX-License-Identifier: MIT
+#
+
+part --source bootimg-partition --ondisk mmcblk0 --fstype vfat --label boot --align 1 --size 128 --overhead-factor 1 --extra-space 0
+
+part / --source rootfs --ondisk mmcblk0 --fstype ext4 --mkfs-extraopts "-T default" --label platform --align 1024 --active
+
+# silence wic
+bootloader

Rest of this looks good.

Thanks,
Jan

Signature · 2 lines
Siemens AG, Technology
Linux Expert Center
#3 lore raw

Re: [PATCH 2/3] rpi4: Add rpi4 (Raspberry Pi 4) as target platform

Quoted 148 lines · Jan Kiszka
Quoted 147 lines · Yi Jiang

From: Florian Bezdeka <[email protected]>

---
 board-rpi4.yml                                | 15 +++++++++
 conf/machine/rpi4.conf                        | 32 +++++++++++++++++++
 .../customizations/files/primary.network      |  2 +-
 recipes-kernel/linux/files/arm64_defconfig    | 10 ++++--
 recipes-kernel/linux/files/rpi4.cfg           | 20 ++++++++++++
 .../linux/linux-xenomai-3-dovetail.inc        |  1 +
 .../linux/linux-xenomai-3_latest.bb           |  1 +
 wic/rpi4.wks                                  | 17 ++++++++++
 8 files changed, 94 insertions(+), 4 deletions(-)
 create mode 100644 board-rpi4.yml
 create mode 100644 conf/machine/rpi4.conf
 create mode 100644 recipes-kernel/linux/files/rpi4.cfg
 create mode 100644 wic/rpi4.wks
board-rpi4.yml new file +15 -0
new file mode 100644
index 0000000..debff7a
@@ -0,0 +1,15 @@
+#
+# Xenomai Real-Time System
+#
+# Copyright (c) Siemens AG, 2024
+#
+# Authors:
+#  Florian Bezdeka <[email protected]>
+#
+# SPDX-License-Identifier: MIT
+#
+
+header:
+  version: 14
+
+machine: rpi4
conf/machine/rpi4.conf new file +32 -0
new file mode 100644
index 0000000..3c0607e
@@ -0,0 +1,32 @@
+#
+# Xenomai Real-Time System
+#
+# Copyright (c) Siemens AG, 2024
+#
+# Authors:
+#  Florian Bezdeka <[email protected]>
+#
+# SPDX-License-Identifier: MIT
+#
+
+DISTRO_ARCH = "arm64"
+
+IMAGE_FSTYPES ?= "wic"
+IMAGER_BUILD_DEPS = "rpi-firmware linux-image-${KERNEL_NAME}"
+IMAGER_INSTALL += "${IMAGER_BUILD_DEPS}"
+
+IMAGE_BOOT_FILES = " \
+    /usr/lib/rpi-firmware/bootcode.bin;bootcode.bin \
+    /usr/lib/rpi-firmware/cmdline.txt;cmdline.txt \
+    /usr/lib/rpi-firmware/config.txt;config.txt \
+    /usr/lib/rpi-firmware/fixup4.dat;fixup4.dat \
+    /usr/lib/rpi-firmware/fixup4x.dat;fixup4x.dat \
+    /usr/lib/rpi-firmware/start4.elf;start4.elf \
+    /usr/lib/rpi-firmware/start4x.elf;start4x.elf \
+    /usr/lib/rpi-firmware/overlays/*;overlays/ \
+    /usr/lib/linux-image-*/broadcom/bcm2711-rpi-4-b.dtb \
+    /usr/lib/linux-image-*/overlays/*;overlays/ \
+    ${IMAGE_ROOTFS}/vmlinuz;kernel8.img \
+    "
+
+IMAGE_PREINSTALL:append = " firmware-brcm80211"
recipes-core/customizations/files/primary.network +1 -1
index c517d10..2343386 100644
@@ -1,5 +1,5 @@
 [Match]
-Name=eth0 enp2s0 enp3s0
+Name=eth0 enp2s0 enp3s0 end0
 
 [Network]
 DHCP=yes
recipes-kernel/linux/files/arm64_defconfig +6 -3
index 9bacb82..94f7b5b 100644
@@ -603,6 +603,7 @@ CONFIG_FREEZER=y
 # CONFIG_ARCH_ACTIONS is not set
 CONFIG_ARCH_SUNXI=y
 CONFIG_ARCH_ALPINE=y
+CONFIG_ARCH_BCM=y
 CONFIG_ARCH_BCM2835=y
 CONFIG_ARCH_BCM_IPROC=y
 CONFIG_ARCH_BERLIN=y
@@ -704,6 +705,7 @@ CONFIG_PCIE_IPROC_MSI=y
 # CONFIG_PCI_HOST_THUNDER_ECAM is not set
 CONFIG_PCIE_ROCKCHIP=m
 # CONFIG_PCIE_MEDIATEK is not set
+CONFIG_PCIE_BRCMSTB=y
 
 #
 # PCI Endpoint
@@ -1552,7 +1554,7 @@ CONFIG_OF_MDIO=y
 CONFIG_OF_PCI=y
 CONFIG_OF_PCI_IRQ=y
 CONFIG_OF_RESERVED_MEM=y
-# CONFIG_OF_OVERLAY is not set
+CONFIG_OF_OVERLAY=y
 CONFIG_OF_NUMA=y
 # CONFIG_PARPORT is not set
 CONFIG_PNP=y
@@ -1949,7 +1951,7 @@ CONFIG_MACB_USE_HWSTAMP=y
 # CONFIG_MACB_PCI is not set
 CONFIG_NET_VENDOR_BROADCOM=y
 # CONFIG_B44 is not set
-# CONFIG_BCMGENET is not set
+ CONFIG_BCMGENET=y
 # CONFIG_BNX2 is not set
 # CONFIG_CNIC is not set
 # CONFIG_TIGON3 is not set
@@ -2640,7 +2642,7 @@ CONFIG_I2C_ALGOBIT=y
 #
 # I2C system bus drivers (mostly embedded / system-on-chip)
 #
-CONFIG_I2C_BCM2835=m
+CONFIG_I2C_BCM2835=y
 CONFIG_I2C_BCM_IPROC=y
 CONFIG_I2C_BRCMSTB=y
 # CONFIG_I2C_CADENCE is not set
@@ -2880,6 +2882,7 @@ CONFIG_GPIO_GENERIC=y
 # CONFIG_GPIO_ALTERA is not set
 # CONFIG_GPIO_AMDPT is not set
 # CONFIG_GPIO_AXP209 is not set
+CONFIG_GPIO_BCM_XGS_IPROC=y
 CONFIG_GPIO_BRCMSTB=y
 CONFIG_GPIO_DWAPB=y
 # CONFIG_GPIO_EXAR is not set
@@ -5473,6 +5476,7 @@ CONFIG_PHY_MESON_GXL_USB2=y
 # CONFIG_BCM_KONA_USB2_PHY is not set
 # CONFIG_PHY_BCM_NS_USB2 is not set
Quoted 8 lines

recipes-kernel/linux/files/arm64_defconfig CONFIG_PHY_MESON_GXL_USB2=y · line 5482

Quoted 5 lines
recipes-kernel/linux/files/arm64_defconfig +1 -0
 # CONFIG_PHY_BCM_NS_USB3 is not set
+CONFIG_PHY_BCM_SR_USB=y
 CONFIG_PHY_NS2_PCIE=y
 CONFIG_PHY_NS2_USB_DRD=y
 CONFIG_PHY_BRCM_SATA=y

With all those changes to our shared arm64 defconfig, why do we still need the rpi4.cfg below?

Confused.

- My original patch did not touch the arm64 defconfig.
So I'm still listed as author ("From:" inside the body) but the patch content is different.

- The subject says 2/3. Where is 3/3?

Quoted 79 lines
Quoted 60 lines
recipes-kernel/linux/files/rpi4.cfg new file +20 -0
new file mode 100644
index 0000000..9d77279
@@ -0,0 +1,20 @@
+#CONFIG_ARCH_BCM=y
+#CONFIG_ARCH_BCM2835=y
+#CONFIG_BCM2835_MBOX=y
+#CONFIG_RASPBERRYPI_FIRMWARE=y
+#CONFIG_OF_OVERLAY=y
+#CONFIG_SERIAL_8250_BCM2835AUX=y
+#CONFIG_MMC_BCM2835=y
+#CONFIG_MMC_SDHCI_IPROC=y
+#CONFIG_MMC_SDHCI_BRCMSTB=y
+#CONFIG_I2C_BCM2835=y
+#CONFIG_PHY_BCM_SR_USB=y
+#CONFIG_PWM_BCM_IPROC=y
+#CONFIG_PWM_BCM2835=m
+#CONFIG_DMA_BCM2835=m
+#CONFIG_SPI_BCM2835=m
+#CONFIG_GPIO_BRCMSTB=y
+#CONFIG_GPIO_BCM_XGS_IPROC=y
+#CONFIG_BCM2835_WDT=y
+#CONFIG_PCIE_BRCMSTB=y
+#CONFIG_BCMGENET=y
recipes-kernel/linux/linux-xenomai-3-dovetail.inc +1 -0
index a8612ba..36000dd 100644
@@ -12,5 +12,6 @@
 require recipes-kernel/linux/linux-xenomai-3.inc
 
 SRC_URI += "git://source.denx.de/xenomai/linux-dovetail.git;protocol=https;nobranch=1"
+SRC_URI:append:rpi4 = " file://rpi4.cfg"
 
 PV ?= "${@d.getVar('SRCREV').strip('-')[0].lstrip('v')}+"
recipes-kernel/linux/linux-xenomai-3_latest.bb +1 -0
index c65c28d..5908c59 100644
@@ -80,3 +80,4 @@ SRC_URI += "${GIT_REPO};protocol=https;branch=${GIT_BRANCH}"
 SRCREV = "${AUTOREV}"
 
 SRC_URI:append:beagle-bone-black = " ${@ 'file://bbb_4.4.cfg' if is_xeno_3_0(d) else '' }"
+SRC_URI:append:rpi4 = " file://rpi4.cfg"
wic/rpi4.wks new file +7 -0
new file mode 100644
index 0000000..22eeb87
@@ -0,0 +1,17 @@
+#
+# Xenomai Real-Time System
+#
+# Copyright (c) Siemens AG, 2024
+#
+# Authors:
+#  Florian Bezdeka <[email protected]>

wic/rpi4.wks line 17

Quoted 10 lines
wic/rpi4.wks new file +10 -0
+#
+# SPDX-License-Identifier: MIT
+#
+
+part --source bootimg-partition --ondisk mmcblk0 --fstype vfat --label boot --align 1 --size 128 --overhead-factor 1 --extra-space 0
+
+part / --source rootfs --ondisk mmcblk0 --fstype ext4 --mkfs-extraopts "-T default" --label platform --align 1024 --active
+
+# silence wic
+bootloader

Rest of this looks good.

Thanks,
Jan

Signature · 2 lines
Siemens AG, Technology
Linux Expert Center
author
#4 lore raw

Re: [PATCH 2/3] rpi4: Add rpi4 (Raspberry Pi 4) as target platform

Quoted 162 lines · Florian Bezdeka
Quoted 152 lines · Jan Kiszka
Quoted 151 lines · Yi Jiang

From: Florian Bezdeka <[email protected]>

---
 board-rpi4.yml                                | 15 +++++++++ conf/machine/rpi4.conf                        | 32
+++++++++++++++++++
 .../customizations/files/primary.network      |  2 +- recipes-kernel/linux/files/arm64_defconfig    | 10 ++++-- recipes-kernel/linux/files/rpi4.cfg           | 20 ++++++++++++ .../linux/linux-xenomai-3-dovetail.inc        |  1 + .../linux/linux-xenomai-3_latest.bb           |  1 + wic/rpi4.wks                                  | 17 ++++++++++

 8 files changed, 94 insertions(+), 4 deletions(-)

 create mode 100644 board-rpi4.yml
 create mode 100644 conf/machine/rpi4.conf create mode 100644 recipes-kernel/linux/files/rpi4.cfg create mode 100644 wic/rpi4.wks

board-rpi4.yml new file +15 -0
new file mode 100644
index 0000000..debff7a
@@ -0,0 +1,15 @@
+#
+# Xenomai Real-Time System
+#
+# Copyright (c) Siemens AG, 2024
+#
+# Authors:
+#  Florian Bezdeka <[email protected]>
+#
+# SPDX-License-Identifier: MIT
+#
+
+header:
+  version: 14
+
+machine: rpi4
conf/machine/rpi4.conf new file +32 -0
new file mode 100644
index 0000000..3c0607e
@@ -0,0 +1,32 @@
+#
+# Xenomai Real-Time System
+#
+# Copyright (c) Siemens AG, 2024
+#
+# Authors:
+#  Florian Bezdeka <[email protected]>
+#
+# SPDX-License-Identifier: MIT
+#
+
+DISTRO_ARCH = "arm64"
+
+IMAGE_FSTYPES ?= "wic"
+IMAGER_BUILD_DEPS = "rpi-firmware linux-image-${KERNEL_NAME}"
+IMAGER_INSTALL += "${IMAGER_BUILD_DEPS}"
+
+IMAGE_BOOT_FILES = " \
+    /usr/lib/rpi-firmware/bootcode.bin;bootcode.bin \
+    /usr/lib/rpi-firmware/cmdline.txt;cmdline.txt \
+    /usr/lib/rpi-firmware/config.txt;config.txt \
+    /usr/lib/rpi-firmware/fixup4.dat;fixup4.dat \
+    /usr/lib/rpi-firmware/fixup4x.dat;fixup4x.dat \
+    /usr/lib/rpi-firmware/start4.elf;start4.elf \
+    /usr/lib/rpi-firmware/start4x.elf;start4x.elf \
+    /usr/lib/rpi-firmware/overlays/*;overlays/ \
+    /usr/lib/linux-image-*/broadcom/bcm2711-rpi-4-b.dtb \
+    /usr/lib/linux-image-*/overlays/*;overlays/ \
+    ${IMAGE_ROOTFS}/vmlinuz;kernel8.img \
+    "
+
+IMAGE_PREINSTALL:append = " firmware-brcm80211"
recipes-core/customizations/files/primary.network +0 -0
index c517d10..2343386 100644
@@ -1,5 +1,5 @@

 [Match]

recipes-core/customizations/files/primary.network +1 -1
-Name=eth0 enp2s0 enp3s0
+Name=eth0 enp2s0 enp3s0 end0


 [Network]
 DHCP=yes

recipes-kernel/linux/files/arm64_defconfig +0 -0
index 9bacb82..94f7b5b 100644
@@ -603,6 +603,7 @@ CONFIG_FREEZER=y
  # CONFIG_ARCH_ACTIONS is not set

 CONFIG_ARCH_SUNXI=y
 CONFIG_ARCH_ALPINE=y
+CONFIG_ARCH_BCM=y
 CONFIG_ARCH_BCM2835=y
 CONFIG_ARCH_BCM_IPROC=y
 CONFIG_ARCH_BERLIN=y

recipes-kernel/linux/files/arm64_defconfig +0 -0
@@ -704,6 +705,7 @@ CONFIG_PCIE_IPROC_MSI=y
  # CONFIG_PCI_HOST_THUNDER_ECAM is not set

 CONFIG_PCIE_ROCKCHIP=m
 # CONFIG_PCIE_MEDIATEK is not set
+CONFIG_PCIE_BRCMSTB=y

 #
 # PCI Endpoint

recipes-kernel/linux/files/arm64_defconfig +0 -0
@@ -1552,7 +1554,7 @@ CONFIG_OF_MDIO=y

 CONFIG_OF_PCI=y
 CONFIG_OF_PCI_IRQ=y
 CONFIG_OF_RESERVED_MEM=y

recipes-kernel/linux/files/arm64_defconfig +1 -1
-# CONFIG_OF_OVERLAY is not set
+CONFIG_OF_OVERLAY=y

 CONFIG_OF_NUMA=y
 # CONFIG_PARPORT is not set
 CONFIG_PNP=y

recipes-kernel/linux/files/arm64_defconfig +0 -0
@@ -1949,7 +1951,7 @@ CONFIG_MACB_USE_HWSTAMP=y
  # CONFIG_MACB_PCI is not set

 CONFIG_NET_VENDOR_BROADCOM=y
 # CONFIG_B44 is not set
-# CONFIG_BCMGENET is not set
+ CONFIG_BCMGENET=y
 # CONFIG_BNX2 is not set
 # CONFIG_CNIC is not set
 # CONFIG_TIGON3 is not set

recipes-kernel/linux/files/arm64_defconfig +1 -1
@@ -2640,7 +2642,7 @@ CONFIG_I2C_ALGOBIT=y
  #
  # I2C system bus drivers (mostly embedded / system-on-chip)
  #
-CONFIG_I2C_BCM2835=m
+CONFIG_I2C_BCM2835=y

 CONFIG_I2C_BCM_IPROC=y
 CONFIG_I2C_BRCMSTB=y
 # CONFIG_I2C_CADENCE is not set

recipes-kernel/linux/files/arm64_defconfig +1 -0
@@ -2880,6 +2882,7 @@ CONFIG_GPIO_GENERIC=y
  # CONFIG_GPIO_ALTERA is not set
  # CONFIG_GPIO_AMDPT is not set
  # CONFIG_GPIO_AXP209 is not set
+CONFIG_GPIO_BCM_XGS_IPROC=y

 CONFIG_GPIO_BRCMSTB=y
 CONFIG_GPIO_DWAPB=y
 # CONFIG_GPIO_EXAR is not set

recipes-kernel/linux/files/arm64_defconfig +0 -0
@@ -5473,6 +5476,7 @@ CONFIG_PHY_MESON_GXL_USB2=y
  # CONFIG_BCM_KONA_USB2_PHY is not set
  # CONFIG_PHY_BCM_NS_USB2 is not set
  # CONFIG_PHY_BCM_NS_USB3 is not set
Quoted 8 lines
Quoted 4 lines
recipes-kernel/linux/files/arm64_defconfig +1 -0
+CONFIG_PHY_BCM_SR_USB=y

 CONFIG_PHY_NS2_PCIE=y
 CONFIG_PHY_NS2_USB_DRD=y
 CONFIG_PHY_BRCM_SATA=y

With all those changes to our shared arm64 defconfig, why do we still
need the rpi4.cfg below?

Quoted 7 lines

Confused.

- My original patch did not touch the arm64 defconfig. So I'm still listed as author ("From:" inside the body) but the patch
  content is different.

Yes, we do not need to keep rpi4.cfg any more, because the original content of rpi4.cfg has been merged to arm64_defconfig.

As I mentioned, I changed some contents of this patch, therefore I signed it off, and still keep you as the author.

Quoted 2 lines

- The subject says 2/3. Where is 3/3?

Sorry, I did not cc to you the 3/3 patch. I will do that when sending the next version of patch.

Quoted 90 lines
Quoted 89 lines
Quoted 77 lines
recipes- renamed from recipes-kernel/linux/files/rpi4.cfg +0 -0

kernel/linux/files/rpi4.cfg
new file mode 100644
index 0000000..9d77279

recipes-kernel/linux/files/rpi4.cfg new file +20 -0
@@ -0,0 +1,20 @@
+#CONFIG_ARCH_BCM=y
+#CONFIG_ARCH_BCM2835=y
+#CONFIG_BCM2835_MBOX=y
+#CONFIG_RASPBERRYPI_FIRMWARE=y
+#CONFIG_OF_OVERLAY=y
+#CONFIG_SERIAL_8250_BCM2835AUX=y
+#CONFIG_MMC_BCM2835=y
+#CONFIG_MMC_SDHCI_IPROC=y
+#CONFIG_MMC_SDHCI_BRCMSTB=y
+#CONFIG_I2C_BCM2835=y
+#CONFIG_PHY_BCM_SR_USB=y
+#CONFIG_PWM_BCM_IPROC=y
+#CONFIG_PWM_BCM2835=m
+#CONFIG_DMA_BCM2835=m
+#CONFIG_SPI_BCM2835=m
+#CONFIG_GPIO_BRCMSTB=y
+#CONFIG_GPIO_BCM_XGS_IPROC=y
+#CONFIG_BCM2835_WDT=y
+#CONFIG_PCIE_BRCMSTB=y
+#CONFIG_BCMGENET=y
recipes-kernel/linux/linux-xenomai-3-dovetail.inc +0 -0
index a8612ba..36000dd 100644
@@ -12,5 +12,6 @@

 require recipes-kernel/linux/linux-xenomai-3.inc
 SRC_URI += "git://source.denx.de/xenomai/linux- dovetail.git;protocol=https;nobranch=1" +SRC_URI:append:rpi4 = " file://rpi4.cfg"

 PV ?= "${@d.getVar('SRCREV').strip('-')[0].lstrip('v')}+"

recipes-kernel/linux/linux-xenomai-3_latest.bb +0 -0
index c65c28d..5908c59 100644
@@ -80,3 +80,4 @@ SRC_URI +=

"${GIT_REPO};protocol=https;branch=${GIT_BRANCH}" SRCREV = "${AUTOREV}"

 SRC_URI:append:beagle-bone-black = " ${@ 'file://bbb_4.4.cfg' if is_xeno_3_0(d) else '' }"

recipes-kernel/linux/linux-xenomai-3_latest.bb +1 -0
+SRC_URI:append:rpi4 = " file://rpi4.cfg"
wic/rpi4.wks new file +12 -1
new file mode 100644
index 0000000..22eeb87
@@ -0,0 +1,17 @@
+#
+# Xenomai Real-Time System
+#
+# Copyright (c) Siemens AG, 2024
+#
+# Authors:
+#  Florian Bezdeka <[email protected]>
+#
+# SPDX-License-Identifier: MIT
+#
+
+part --source bootimg-partition --ondisk mmcblk0 --fstype vfat -
-label boot --align 1 --size 128 --overhead-factor 1 --extra-

space 0

wic/rpi4.wks new file +2 -0
+
+part / --source rootfs --ondisk mmcblk0 --fstype ext4 --mkfs-

extraopts "-T default" --label platform --align 1024 --active

wic/rpi4.wks line 17

Quoted 3 lines
wic/rpi4.wks new file +3 -0
+
+# silence wic
+bootloader

Rest of this looks good.

Thanks,
Jan

Signature · 2 lines
Siemens AG, Technology
Linux Expert Center
Signature · 3 lines
Yi Jiang
Siemens AG
www.siemens.com
#5 lore raw

Re: [PATCH 2/3] rpi4: Add rpi4 (Raspberry Pi 4) as target platform

Quoted 10 lines · Yi (T CED OES-DE)
Quoted 7 lines

Confused.

- My original patch did not touch the arm64 defconfig. So I'm still listed as author ("From:" inside the body) but the patch
  content is different.

Yes, we do not need to keep rpi4.cfg any more, because the original content of rpi4.cfg has been merged to arm64_defconfig.

If that really works (especially for the older ipipe kernels for tersting xenomai stable branches) the patch needs some reworking.

Florian

#6 lore raw

Re: [PATCH 2/3] rpi4: Add rpi4 (Raspberry Pi 4) as target platform

Quoted 9 lines · Florian Bezdeka
Quoted 8 lines · Yi (T CED OES-DE)
Quoted 7 lines

Confused.

- My original patch did not touch the arm64 defconfig. So I'm still listed as author ("From:" inside the body) but the patch
  content is different.

Quoted 6 lines
Quoted 2 lines

Yes, we do not need to keep rpi4.cfg any more, because the original content of rpi4.cfg has been merged to arm64_defconfig.

If that really works (especially for the older ipipe kernels for tersting xenomai stable branches) the patch needs some reworking.

We don't support older than 5.10 with the RPi, thus also no I-pipe.

Jan

Signature · 2 lines
Siemens AG, Technology
Linux Expert Center
#7 lore raw

Re: [PATCH 2/3] rpi4: Add rpi4 (Raspberry Pi 4) as target platform

Quoted 10 lines · Jan Kiszka
Quoted 9 lines · Florian Bezdeka
Quoted 8 lines · Yi (T CED OES-DE)
Quoted 7 lines

Confused.

- My original patch did not touch the arm64 defconfig. So I'm still listed as author ("From:" inside the body) but the patch
  content is different.

Quoted 8 lines
Quoted 6 lines
Quoted 2 lines

Yes, we do not need to keep rpi4.cfg any more, because the original content of rpi4.cfg has been merged to arm64_defconfig.

If that really works (especially for the older ipipe kernels for tersting xenomai stable branches) the patch needs some reworking.

We don't support older than 5.10 with the RPi, thus also no I-pipe.

Sure, but IIRC one of the options triggered a build failure for older kernels (or other machines) when present in the defconfig. That was the reason for the machine specific configuration file back then. If the problem does not exist anymore: problem solved.

Florian

Quoted 6 lines

Jan

Signature · 2 lines
Siemens AG, Technology
Linux Expert Center
author
#8 lore raw

PATCH 3/3 rpi4: add building options, remove old kernel and Xenomai versions in kas menu.

In reply to Yi Jiang

The following kernel versions are removed from kas menu:

- Xenomai 3, Head of stable/v3.1.x branch.

The following Xenomai versions are removed from kas menu:

- Xenomai 3, Latest 4.19-cip I-pipe release;
- Xenomai 3, Head of 4.19-cip I-pipe branch;
- Xenomai 3, Latest 5.4 I-pipe release;
- Xenomai 3, Head of 5.4 I-pipe branch.

---
 Kconfig | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)
Kconfig +10 -4
index 669ea65..13699bf 100644
@@ -45,6 +45,10 @@ config TARGET_HIKEY
 	bool "LeMaker HiKey"
 	select ARCH_ARM64
 
+config TARGET_RPI4
+	bool "Raspberry Pi 4"
+	select ARCH_ARM64
+
 endchoice
 
 config KAS_INCLUDE_TARGET
@@ -55,6 +59,7 @@ config KAS_INCLUDE_TARGET
 	default "board-beagle-bone-black.yml" if TARGET_BBB
 	default "board-qemu-arm64.yml" if TARGET_QEMU_ARM64
 	default "board-hikey.yml" if TARGET_HIKEY
+	default "board-rpi4.yml" if TARGET_RPI4
 
 choice
 	prompt "Xenomai version"
@@ -85,6 +90,7 @@ config XENOMAI_3_2
 
 config XENOMAI_3_1_LATEST
 	bool "Head of stable/v3.1.x branch"
+	depends on !TARGET_RPI4
 
 config XENOMAI_3_0_LATEST
 	bool "Head of stable/v3.0.x branch"
@@ -141,19 +147,19 @@ config KERNEL_5_10
 
 config KERNEL_5_4_LATEST
 	bool "Head of 5.4 I-pipe branch"
-	depends on XENOMAI_3_2_LATEST || XENOMAI_3_2 || XENOMAI_3_1_LATEST || XENOMAI_3_1
+	depends on !TARGET_RPI4 && (XENOMAI_3_2_LATEST || XENOMAI_3_2 || XENOMAI_3_1_LATEST || XENOMAI_3_1)
 
 config KERNEL_5_4
 	bool "Latest 5.4 I-pipe release"
-	depends on XENOMAI_3_2_LATEST || XENOMAI_3_2 || XENOMAI_3_1_LATEST || XENOMAI_3_1
+	depends on !TARGET_RPI4 && (XENOMAI_3_2_LATEST || XENOMAI_3_2 || XENOMAI_3_1_LATEST || XENOMAI_3_1)
 
 config KERNEL_4_19_LATEST
 	bool "Head of 4.19-cip I-pipe branch"
-	depends on XENOMAI_3_2_LATEST || XENOMAI_3_2 || XENOMAI_3_1_LATEST || XENOMAI_3_1
+	depends on !TARGET_RPI4 && (XENOMAI_3_2_LATEST || XENOMAI_3_2 || XENOMAI_3_1_LATEST || XENOMAI_3_1)
 
 config KERNEL_4_19
 	bool "Latest 4.19-cip I-pipe release"
-	depends on XENOMAI_3_2_LATEST || XENOMAI_3_2 || XENOMAI_3_1_LATEST || XENOMAI_3_1
+	depends on !TARGET_RPI4 && (XENOMAI_3_2_LATEST || XENOMAI_3_2 || XENOMAI_3_1_LATEST || XENOMAI_3_1)
 
 config KERNEL_4_4_LATEST
 	bool "Head of 4.4-cip I-pipe branch"
Signature · 1 line
2.39.2
#9 lore raw

Re: [PATCH 3/3] rpi4: add building options, remove old kernel and Xenomai versions in kas menu.

Quoted 10 lines · Yi Jiang

The following kernel versions are removed from kas menu:

- Xenomai 3, Head of stable/v3.1.x branch.

The following Xenomai versions are removed from kas menu:

- Xenomai 3, Latest 4.19-cip I-pipe release;
- Xenomai 3, Head of 4.19-cip I-pipe branch;
- Xenomai 3, Latest 5.4 I-pipe release;
- Xenomai 3, Head of 5.4 I-pipe branch.

This message is confusing. It reads like those configurations are removed in general. But what you are rather doing is to prevent that unsupported combinations can be selected in the menu. Please reword.

Jan

Quoted 61 lines
---
 Kconfig | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)
Kconfig +10 -4
index 669ea65..13699bf 100644
@@ -45,6 +45,10 @@ config TARGET_HIKEY
 	bool "LeMaker HiKey"
 	select ARCH_ARM64
 
+config TARGET_RPI4
+	bool "Raspberry Pi 4"
+	select ARCH_ARM64
+
 endchoice
 
 config KAS_INCLUDE_TARGET
@@ -55,6 +59,7 @@ config KAS_INCLUDE_TARGET
 	default "board-beagle-bone-black.yml" if TARGET_BBB
 	default "board-qemu-arm64.yml" if TARGET_QEMU_ARM64
 	default "board-hikey.yml" if TARGET_HIKEY
+	default "board-rpi4.yml" if TARGET_RPI4
 
 choice
 	prompt "Xenomai version"
@@ -85,6 +90,7 @@ config XENOMAI_3_2
 
 config XENOMAI_3_1_LATEST
 	bool "Head of stable/v3.1.x branch"
+	depends on !TARGET_RPI4
 
 config XENOMAI_3_0_LATEST
 	bool "Head of stable/v3.0.x branch"
@@ -141,19 +147,19 @@ config KERNEL_5_10
 
 config KERNEL_5_4_LATEST
 	bool "Head of 5.4 I-pipe branch"
-	depends on XENOMAI_3_2_LATEST || XENOMAI_3_2 || XENOMAI_3_1_LATEST || XENOMAI_3_1
+	depends on !TARGET_RPI4 && (XENOMAI_3_2_LATEST || XENOMAI_3_2 || XENOMAI_3_1_LATEST || XENOMAI_3_1)
 
 config KERNEL_5_4
 	bool "Latest 5.4 I-pipe release"
-	depends on XENOMAI_3_2_LATEST || XENOMAI_3_2 || XENOMAI_3_1_LATEST || XENOMAI_3_1
+	depends on !TARGET_RPI4 && (XENOMAI_3_2_LATEST || XENOMAI_3_2 || XENOMAI_3_1_LATEST || XENOMAI_3_1)
 
 config KERNEL_4_19_LATEST
 	bool "Head of 4.19-cip I-pipe branch"
-	depends on XENOMAI_3_2_LATEST || XENOMAI_3_2 || XENOMAI_3_1_LATEST || XENOMAI_3_1
+	depends on !TARGET_RPI4 && (XENOMAI_3_2_LATEST || XENOMAI_3_2 || XENOMAI_3_1_LATEST || XENOMAI_3_1)
 
 config KERNEL_4_19
 	bool "Latest 4.19-cip I-pipe release"
-	depends on XENOMAI_3_2_LATEST || XENOMAI_3_2 || XENOMAI_3_1_LATEST || XENOMAI_3_1
+	depends on !TARGET_RPI4 && (XENOMAI_3_2_LATEST || XENOMAI_3_2 || XENOMAI_3_1_LATEST || XENOMAI_3_1)
 
 config KERNEL_4_4_LATEST
 	bool "Head of 4.4-cip I-pipe branch"
Signature · 2 lines
Siemens AG, Technology
Linux Expert Center
author
#10 lore raw

Re: [PATCH 3/3] rpi4: add building options, remove old kernel and Xenomai versions in kas menu.

Quoted 12 lines · Jan Kiszka
Quoted 10 lines · Yi Jiang

The following kernel versions are removed from kas menu:

 - Xenomai 3, Head of stable/v3.1.x branch.

The following Xenomai versions are removed from kas menu:

 - Xenomai 3, Latest 4.19-cip I-pipe release;
 - Xenomai 3, Head of 4.19-cip I-pipe branch;
 - Xenomai 3, Latest 5.4 I-pipe release;
 - Xenomai 3, Head of 5.4 I-pipe branch.

Quoted 5 lines

This message is confusing. It reads like those configurations are removed in general. But what you are rather doing is to prevent that unsupported combinations can be selected in the menu. Please reword.

Jan

Thanks for the suggestion. I will improve the wording in the next version of the patch.

Quoted 71 lines
Quoted 70 lines

---
 Kconfig | 14 ++++++++++----

 1 file changed, 10 insertions(+), 4 deletions(-)
Kconfig +0 -0
index 669ea65..13699bf 100644
@@ -45,6 +45,10 @@ config TARGET_HIKEY

        bool "LeMaker HiKey"
        select ARCH_ARM64

Kconfig +4 -0
+config TARGET_RPI4
+       bool "Raspberry Pi 4"
+       select ARCH_ARM64
+

 endchoice

 config KAS_INCLUDE_TARGET

Kconfig +0 -0
@@ -55,6 +59,7 @@ config KAS_INCLUDE_TARGET

        default "board-beagle-bone-black.yml" if TARGET_BBB default "board-qemu-arm64.yml" if TARGET_QEMU_ARM64 default "board-hikey.yml" if TARGET_HIKEY +       default "board-rpi4.yml" if TARGET_RPI4

 choice
        prompt "Xenomai version"

Kconfig +0 -0
@@ -85,6 +90,7 @@ config XENOMAI_3_2


 config XENOMAI_3_1_LATEST
        bool "Head of stable/v3.1.x branch"
+       depends on !TARGET_RPI4

 config XENOMAI_3_0_LATEST
        bool "Head of stable/v3.0.x branch"

Kconfig +0 -0
@@ -141,19 +147,19 @@ config KERNEL_5_10


 config KERNEL_5_4_LATEST
        bool "Head of 5.4 I-pipe branch"
-       depends on XENOMAI_3_2_LATEST || XENOMAI_3_2 || XENOMAI_3_1_LATEST || XENOMAI_3_1
+       depends on !TARGET_RPI4 && (XENOMAI_3_2_LATEST || XENOMAI_3_2 || XENOMAI_3_1_LATEST || XENOMAI_3_1)
 config KERNEL_5_4
        bool "Latest 5.4 I-pipe release"
-       depends on XENOMAI_3_2_LATEST || XENOMAI_3_2 || XENOMAI_3_1_LATEST || XENOMAI_3_1
+       depends on !TARGET_RPI4 && (XENOMAI_3_2_LATEST || XENOMAI_3_2 || XENOMAI_3_1_LATEST || XENOMAI_3_1)
 config KERNEL_4_19_LATEST
        bool "Head of 4.19-cip I-pipe branch"
-       depends on XENOMAI_3_2_LATEST || XENOMAI_3_2 || XENOMAI_3_1_LATEST || XENOMAI_3_1
+       depends on !TARGET_RPI4 && (XENOMAI_3_2_LATEST || XENOMAI_3_2 || XENOMAI_3_1_LATEST || XENOMAI_3_1)
 config KERNEL_4_19
        bool "Latest 4.19-cip I-pipe release"
-       depends on XENOMAI_3_2_LATEST || XENOMAI_3_2 || XENOMAI_3_1_LATEST || XENOMAI_3_1
+       depends on !TARGET_RPI4 && (XENOMAI_3_2_LATEST || XENOMAI_3_2 || XENOMAI_3_1_LATEST || XENOMAI_3_1)
 config KERNEL_4_4_LATEST
        bool "Head of 4.4-cip I-pipe branch"

Signature · 3 lines
Yi Jiang
Siemens AG
www.siemens.com