[yocto] [meta-raspberrypi][PATCH] rpi-config: Setup lcd_rotate for Raspberry Pi display
Paul Barker
pbarker at toganlabs.com
Thu Nov 30 09:43:43 PST 2017
On Thu, Nov 30, 2017 at 5:16 PM, Paul Barker <pbarker at toganlabs.com> wrote:
> On Wed, Nov 29, 2017 at 10:20 PM, <drew.moseley at northern.tech> wrote:
>> From: Drew Moseley <drew.moseley at northern.tech>
>>
>> Signed-off-by: Drew Moseley <drew.moseley at northern.tech>
>> ---
>> docs/extra-build-config.md | 6 ++++++
>> recipes-bsp/bootfiles/rpi-config_git.bb | 6 ++++++
>> 2 files changed, 12 insertions(+)
>>
>> diff --git a/docs/extra-build-config.md b/docs/extra-build-config.md
>> index 380d969..0390eee 100644
>> --- a/docs/extra-build-config.md
>> +++ b/docs/extra-build-config.md
>> @@ -170,6 +170,12 @@ Screen LCD, HDMI interface (<http://www.waveshare.com/7inch-HDMI-LCD-C.htm>) Rev
>>
>> WAVESHARE_1024X600_C_2_1 = "1"
>>
>> +If you would like to use the Raspberry Pi, 7 inch Capacitive Touch Screen
>> +LCD (https://www.raspberrypi.org/products/raspberry-pi-touch-display/), please
>> +set the following in your local.conf:
>> +
>> + RASPBERRYPI_DISPLAY = "1"
>> +
>> ## Enable UART
>>
>> RaspberryPi 0, 1, 2 and CM will have UART console enabled by default.
>> diff --git a/recipes-bsp/bootfiles/rpi-config_git.bb b/recipes-bsp/bootfiles/rpi-config_git.bb
>> index ca4160b..e9a4fe2 100644
>> --- a/recipes-bsp/bootfiles/rpi-config_git.bb
>> +++ b/recipes-bsp/bootfiles/rpi-config_git.bb
>> @@ -127,6 +127,12 @@ 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
>> +
>> + # Raspberry Pi 7" Display/Touch screen (https://www.raspberrypi.org/products/raspberry-pi-touch-display/)
>> + if [ "${RASPBERRYPI_DISPLAY}" = "1" ]; then
>> + echo "# Raspberry Pi 7\" display/touch screen" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
>> + echo "lcd_rotate=2" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
>> + fi
>> }
>>
>> do_deploy_append_raspberrypi3-64() {
>
> This all looks good in general. Just a quick check though - are all
> users of this display going to want that lcd_rotate value? I've never
> used this display so not sure if that's specific to particular use
> cases or not.
>
> If you're happy that this is applicable for everyone could you submit
> this as a pull request on github
> (https://github.com/agherzan/meta-raspberrypi).
>
Someone has come back off-list and said they use that display without
the lcd_rotate setting. I think we'll have to drop this then.
It may be good to have an RPI_EXTRA_CONFIG variable or similar to add
arbitrary text to the config file, so you could do something like
this:
RPI_EXTRA_CONFIG = " \
# Raspberry Pi 7\" display/touch screen \
lcd_rotate=2 \
"
How does that sound?
--
Paul Barker
Togán Labs Ltd
More information about the yocto
mailing list