From 1a724a14c3b47f84c5d8c4206b151efa0246fe51 Mon Sep 17 00:00:00 2001 From: Grzegorz Kowalski Date: Fri, 8 Mar 2024 01:37:02 +0100 Subject: [PATCH] custom configuration for Raspberry Pi Zero W --- conf/layer.conf | 20 ++++++++++++++++++++ conf/machine/include/rpi-common.inc | 6 ++++++ conf/machine/rpi-zero-w.conf | 8 ++++++++ recipes-bsp/bootfiles/rpi-bootfiles.bbappend | 5 +++++ recipes-core/images/helium-image-rpi.bb | 6 ++++++ 5 files changed, 45 insertions(+) create mode 100644 conf/layer.conf create mode 100644 conf/machine/include/rpi-common.inc create mode 100644 conf/machine/rpi-zero-w.conf create mode 100644 recipes-bsp/bootfiles/rpi-bootfiles.bbappend create mode 100644 recipes-core/images/helium-image-rpi.bb diff --git a/conf/layer.conf b/conf/layer.conf new file mode 100644 index 0000000..538aad1 --- /dev/null +++ b/conf/layer.conf @@ -0,0 +1,20 @@ +# We have a conf and classes directory, add to BBPATH +BBPATH .= ":${LAYERDIR}" + +# We have recipes-* directories, add to BBFILES +BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \ + ${LAYERDIR}/recipes-*/*/*.bbappend" + +BBFILE_COLLECTIONS += "helium-rpi" +BBFILE_PATTERN_helium-rpi = "^${LAYERDIR}/" +BBFILE_PRIORITY_helium-rpi = "6" + +# This should only be incremented on significant changes that will +# cause compatibility issues with other layers +LAYERVERSION_helium-rpi = "2" + + +LAYERDEPENDS_helium-rpi = "core raspberrypi helium" +LAYERSERIES_COMPAT_helium-rpi = "mickledore" + +LICENSE_FLAGS_ACCEPTED = "synaptics-killswitch" diff --git a/conf/machine/include/rpi-common.inc b/conf/machine/include/rpi-common.inc new file mode 100644 index 0000000..932a45c --- /dev/null +++ b/conf/machine/include/rpi-common.inc @@ -0,0 +1,6 @@ +# Raspberry Pi Helium common configuration + +ENABLE_UART = "1" +ENABLE_I2C = "1" +ENABLE_SPI_BUS = "1" +ENABLE_W1 = "1" diff --git a/conf/machine/rpi-zero-w.conf b/conf/machine/rpi-zero-w.conf new file mode 100644 index 0000000..3e42e3e --- /dev/null +++ b/conf/machine/rpi-zero-w.conf @@ -0,0 +1,8 @@ +#@TYPE: Machine +#@NAME: RaspberryPi Zero WiFi Development Board + +require conf/machine/include/rpi-common.inc +require conf/machine/raspberrypi0-wifi.conf + +KBUILD_DEFCONFIG:rpi-zero-w = "bcmrpi_defconfig" +RPI_KERNEL_DEVICETREE = "bcm2708-rpi-zero-w.dtb" diff --git a/recipes-bsp/bootfiles/rpi-bootfiles.bbappend b/recipes-bsp/bootfiles/rpi-bootfiles.bbappend new file mode 100644 index 0000000..c54b10c --- /dev/null +++ b/recipes-bsp/bootfiles/rpi-bootfiles.bbappend @@ -0,0 +1,5 @@ +# Enable UART output from bootcode.bin + +do_configure() { + sed -i -e "s/BOOT_UART=0/BOOT_UART=1/" ${S}/bootcode.bin +} diff --git a/recipes-core/images/helium-image-rpi.bb b/recipes-core/images/helium-image-rpi.bb new file mode 100644 index 0000000..e543ef5 --- /dev/null +++ b/recipes-core/images/helium-image-rpi.bb @@ -0,0 +1,6 @@ +SUMMARY = "Helium image for Raspberry Pi" +LICENSE = "MIT" + +require recipes-core/images/helium-image-default.bb +DEPENDS += "rpi-bootfiles" +