[yocto] [meta-raspberrypi][PATCH] rpi-config: Allow arbitrary additions to config.txt.

drew.moseley at northern.tech drew.moseley at northern.tech
Thu Dec 28 15:00:46 PST 2017


From: Drew Moseley <drew.moseley at northern.tech>

Setup a bitbake variable to allow users to specify
arbitrary additions to config.txt that are not otherwise
covered by specific settings.

Signed-off-by: Drew Moseley <drew.moseley at northern.tech>
---
 docs/extra-build-config.md              | 12 ++++++++++++
 recipes-bsp/bootfiles/rpi-config_git.bb |  5 +++++
 2 files changed, 17 insertions(+)

diff --git a/docs/extra-build-config.md b/docs/extra-build-config.md
index 380d969..f66abdf 100644
--- a/docs/extra-build-config.md
+++ b/docs/extra-build-config.md
@@ -183,6 +183,18 @@ RaspberryPi3 will have to explicitely set in local.conf:
 
     ENABLE_UART = "1"
 
+## Extra configuration
+
+You can add arbitrary configuration settings to your local.conf using the following:
+
+    RPI_EXTRA_CONFIG = " \n\
+        # Raspberry Pi 7\" display/touch screen \n\
+        lcd_rotate=2 \n\
+    "
+The above will configure the system to use the Raspberry Pi 7 inch Capacitive Touch Screen
+in rotated mode which is needed for some setups.  Any text can be placed in the target
+config.txt file using this setting.
+
 Ref.:
 * <https://github.com/raspberrypi/firmware/issues/553>
 * <https://github.com/RPi-Distro/repo/issues/22>
diff --git a/recipes-bsp/bootfiles/rpi-config_git.bb b/recipes-bsp/bootfiles/rpi-config_git.bb
index ca4160b..b38c42a 100644
--- a/recipes-bsp/bootfiles/rpi-config_git.bb
+++ b/recipes-bsp/bootfiles/rpi-config_git.bb
@@ -127,6 +127,11 @@ do_deploy() {
         echo "hdmi_cvt 1024 600 60 6 0 0 0" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
         echo "hdmi_drive=1" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
     fi
+
+    # Arbitrary config.txt additions
+    if [ -n "${RPI_EXTRA_CONFIG}" ]; then
+        echo "${RPI_EXTRA_CONFIG}" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
+    fi
 }
 
 do_deploy_append_raspberrypi3-64() {
-- 
2.7.4




More information about the yocto mailing list