diff options
author | Hugo Hromic <hhromic@gmail.com> | 2018-04-16 14:03:13 +0100 |
---|---|---|
committer | Andrei Gherzan <andrei@gherzan.com> | 2018-04-20 15:17:20 +0100 |
commit | 3175e7f3e2066ef34897013742ab95341c3ebaae (patch) | |
tree | 7f4cbe7aa20c498a0b250138433477e92b215bb2 | |
parent | 5641ac3730502980353e9dfb187d9c5a08a99e9f (diff) | |
download | meta-raspberrypi-3175e7f3e2066ef34897013742ab95341c3ebaae.tar.gz |
rpi-config: support more commonly used config variables and update documentation
Added support for and documented the following new extra build options:
* gpu_freq overclocking option
* disable boot rainbow splash screen
* configure the boot delay after GPU firmware loading
* configure common HDMI and composite video options
Signed-off-by: Hugo Hromic <hhromic@gmail.com>
-rw-r--r-- | docs/extra-build-config.md | 48 | ||||
-rw-r--r-- | recipes-bsp/bootfiles/rpi-config_git.bb | 45 |
2 files changed, 88 insertions, 5 deletions
diff --git a/docs/extra-build-config.md b/docs/extra-build-config.md index d162abc..35abbdf 100644 --- a/docs/extra-build-config.md +++ b/docs/extra-build-config.md | |||
@@ -32,6 +32,8 @@ Accommodate the values above to your own needs (ex: ext3 / ext4). | |||
32 | * `GPU_MEM_1024`: GPU memory in megabyte for the 1024MB Raspberry Pi. Ignored by | 32 | * `GPU_MEM_1024`: GPU memory in megabyte for the 1024MB Raspberry Pi. Ignored by |
33 | the 256MB/512MB RP. Overrides gpu_mem. Max 944. Default not set. | 33 | the 256MB/512MB RP. Overrides gpu_mem. Max 944. Default not set. |
34 | 34 | ||
35 | See: <https://www.raspberrypi.org/documentation/configuration/config-txt/memory.md> | ||
36 | |||
35 | ## Add purchased license codecs | 37 | ## Add purchased license codecs |
36 | 38 | ||
37 | To add you own licenses use variables `KEY_DECODE_MPG2` and `KEY_DECODE_WVC1` in | 39 | To add you own licenses use variables `KEY_DECODE_MPG2` and `KEY_DECODE_WVC1` in |
@@ -44,6 +46,7 @@ You can supply more licenses separated by comma. Example: | |||
44 | 46 | ||
45 | KEY_DECODE_WVC1 = "0x12345678,0xabcdabcd,0x87654321" | 47 | KEY_DECODE_WVC1 = "0x12345678,0xabcdabcd,0x87654321" |
46 | 48 | ||
49 | See: <https://www.raspberrypi.org/documentation/configuration/config-txt/codeclicence.md> | ||
47 | 50 | ||
48 | ## Disable overscan | 51 | ## Disable overscan |
49 | 52 | ||
@@ -53,18 +56,57 @@ local.conf: | |||
53 | 56 | ||
54 | DISABLE_OVERSCAN = "1" | 57 | DISABLE_OVERSCAN = "1" |
55 | 58 | ||
59 | ## Disable splash screen | ||
60 | |||
61 | By default a rainbow splash screen is shown after the GPU firmware is loaded. | ||
62 | To disable this set this variable in local.conf: | ||
63 | |||
64 | DISABLE_SPLASH = "1" | ||
65 | |||
66 | ## Boot delay | ||
67 | |||
68 | The Raspberry Pi waits a number of seconds after loading the GPU firmware and | ||
69 | before loading the kernel. By default it is one second. This is useful if your | ||
70 | SD card needs a while to get ready before Linux is able to boot from it. | ||
71 | To remove (or adjust) this delay set these variables in local.conf: | ||
72 | |||
73 | BOOT_DELAY = "0" | ||
74 | BOOT_DELAY_MS = "0" | ||
75 | |||
56 | ## Set overclocking options | 76 | ## Set overclocking options |
57 | 77 | ||
58 | The Raspberry PI can be overclocked. As of now overclocking up to the "Turbo | 78 | The Raspberry Pi can be overclocked. As of now overclocking up to the "Turbo |
59 | Mode" is officially supported by the raspbery and does not void warranty. Check | 79 | Mode" is officially supported by the raspbery and does not void warranty. Check |
60 | the config.txt for a detailed description of options and modes. Example turbo | 80 | the config.txt for a detailed description of options and modes. The following |
61 | mode: | 81 | variables are supported in local.conf: `ARM_FREQ`, `GPU_FREQ`, `CORE_FREQ`, |
82 | `SDRAM_FREQ` and `OVER_VOLTAGE`. | ||
83 | |||
84 | Example official settings for Turbo Mode in Raspberry Pi 2: | ||
62 | 85 | ||
63 | ARM_FREQ = "1000" | 86 | ARM_FREQ = "1000" |
64 | CORE_FREQ = "500" | 87 | CORE_FREQ = "500" |
65 | SDRAM_FREQ = "500" | 88 | SDRAM_FREQ = "500" |
66 | OVER_VOLTAGE = "6" | 89 | OVER_VOLTAGE = "6" |
67 | 90 | ||
91 | See: <https://www.raspberrypi.org/documentation/configuration/config-txt/overclocking.md> | ||
92 | |||
93 | ## HDMI and composite video options | ||
94 | |||
95 | The Raspberry Pi can output video over HDMI or SDTV composite (the RCA connector). | ||
96 | By default the video mode for these is autodetected on boot: the HDMI mode is | ||
97 | selected according to the connected monitor's EDID information and the composite | ||
98 | mode is defaulted to NTSC using a 4:3 aspect ratio. Check the config.txt for a | ||
99 | detailed description of options and modes. The following variables are supported in | ||
100 | local.conf: `HDMI_FORCE_HOTPLUG`, `HDMI_DRIVE`, `HDMI_GROUP`, `HDMI_MODE`, | ||
101 | `CONFIG_HDMI_BOOST`, `SDTV_MODE`, `SDTV_ASPECT` and `DISPLAY_ROTATE`. | ||
102 | |||
103 | Example to force HDMI output to 720p in CEA mode: | ||
104 | |||
105 | HDMI_GROUP = "1" | ||
106 | HDMI_MODE = "4" | ||
107 | |||
108 | See: <https://www.raspberrypi.org/documentation/configuration/config-txt/video.md> | ||
109 | |||
68 | ## Video camera support with V4L2 drivers | 110 | ## Video camera support with V4L2 drivers |
69 | 111 | ||
70 | Set this variable to enable support for the video camera (Linux 3.12.4+ | 112 | Set this variable to enable support for the video camera (Linux 3.12.4+ |
diff --git a/recipes-bsp/bootfiles/rpi-config_git.bb b/recipes-bsp/bootfiles/rpi-config_git.bb index bc6f0d8..c04090f 100644 --- a/recipes-bsp/bootfiles/rpi-config_git.bb +++ b/recipes-bsp/bootfiles/rpi-config_git.bb | |||
@@ -39,9 +39,17 @@ do_deploy() { | |||
39 | if [ -n "${DISABLE_OVERSCAN}" ]; then | 39 | if [ -n "${DISABLE_OVERSCAN}" ]; then |
40 | sed -i '/#disable_overscan=/ c\disable_overscan=${DISABLE_OVERSCAN}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt | 40 | sed -i '/#disable_overscan=/ c\disable_overscan=${DISABLE_OVERSCAN}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt |
41 | fi | 41 | fi |
42 | if [ -n "${DISABLE_SPLASH}" ]; then | ||
43 | sed -i '/#disable_splash=/ c\disable_splash=${DISABLE_SPLASH}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt | ||
44 | fi | ||
45 | |||
46 | # Set overclocking options | ||
42 | if [ -n "${ARM_FREQ}" ]; then | 47 | if [ -n "${ARM_FREQ}" ]; then |
43 | sed -i '/#arm_freq=/ c\arm_freq=${ARM_FREQ}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt | 48 | sed -i '/#arm_freq=/ c\arm_freq=${ARM_FREQ}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt |
44 | fi | 49 | fi |
50 | if [ -n "${GPU_FREQ}" ]; then | ||
51 | sed -i '/#gpu_freq=/ c\gpu_freq=${GPU_FREQ}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt | ||
52 | fi | ||
45 | if [ -n "${CORE_FREQ}" ]; then | 53 | if [ -n "${CORE_FREQ}" ]; then |
46 | sed -i '/#core_freq=/ c\core_freq=${CORE_FREQ}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt | 54 | sed -i '/#core_freq=/ c\core_freq=${CORE_FREQ}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt |
47 | fi | 55 | fi |
@@ -66,6 +74,40 @@ do_deploy() { | |||
66 | sed -i '/#gpu_mem_1024=/ c\gpu_mem_1024=${GPU_MEM_1024}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt | 74 | sed -i '/#gpu_mem_1024=/ c\gpu_mem_1024=${GPU_MEM_1024}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt |
67 | fi | 75 | fi |
68 | 76 | ||
77 | # Set boot delay | ||
78 | if [ -n "${BOOT_DELAY}" ]; then | ||
79 | sed -i '/#boot_delay=/ c\boot_delay=${BOOT_DELAY}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt | ||
80 | fi | ||
81 | if [ -n "${BOOT_DELAY_MS}" ]; then | ||
82 | sed -i '/#boot_delay_ms=/ c\boot_delay_ms=${BOOT_DELAY_MS}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt | ||
83 | fi | ||
84 | |||
85 | # Set HDMI and composite video options | ||
86 | if [ -n "${HDMI_FORCE_HOTPLUG}" ]; then | ||
87 | sed -i '/#hdmi_force_hotplug=/ c\hdmi_force_hotplug=${HDMI_FORCE_HOTPLUG}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt | ||
88 | fi | ||
89 | if [ -n "${HDMI_DRIVE}" ]; then | ||
90 | sed -i '/#hdmi_drive=/ c\hdmi_drive=${HDMI_DRIVE}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt | ||
91 | fi | ||
92 | if [ -n "${HDMI_GROUP}" ]; then | ||
93 | sed -i '/#hdmi_group=/ c\hdmi_group=${HDMI_GROUP}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt | ||
94 | fi | ||
95 | if [ -n "${HDMI_MODE}" ]; then | ||
96 | sed -i '/#hdmi_mode=/ c\hdmi_mode=${HDMI_MODE}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt | ||
97 | fi | ||
98 | if [ -n "${CONFIG_HDMI_BOOST}" ]; then | ||
99 | sed -i '/#config_hdmi_boost=/ c\config_hdmi_boost=${CONFIG_HDMI_BOOST}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt | ||
100 | fi | ||
101 | if [ -n "${SDTV_MODE}" ]; then | ||
102 | sed -i '/#sdtv_mode=/ c\sdtv_mode=${SDTV_MODE}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt | ||
103 | fi | ||
104 | if [ -n "${SDTV_ASPECT}" ]; then | ||
105 | sed -i '/#sdtv_aspect=/ c\sdtv_aspect=${SDTV_ASPECT}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt | ||
106 | fi | ||
107 | if [ -n "${DISPLAY_ROTATE}" ]; then | ||
108 | sed -i '/#display_rotate=/ c\display_rotate=${DISPLAY_ROTATE}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt | ||
109 | fi | ||
110 | |||
69 | # Video camera support | 111 | # Video camera support |
70 | if [ -n "${VIDEO_CAMERA}" ]; then | 112 | if [ -n "${VIDEO_CAMERA}" ]; then |
71 | echo "# Enable video camera" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt | 113 | echo "# Enable video camera" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt |
@@ -84,6 +126,7 @@ do_deploy() { | |||
84 | echo "dtparam=spi=on" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt | 126 | echo "dtparam=spi=on" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt |
85 | fi | 127 | fi |
86 | 128 | ||
129 | # I2C support | ||
87 | if [ -n "${ENABLE_I2C}" ] || [ "${PITFT}" = "1" ]; then | 130 | if [ -n "${ENABLE_I2C}" ] || [ "${PITFT}" = "1" ]; then |
88 | echo "# Enable I2C" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt | 131 | echo "# Enable I2C" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt |
89 | echo "dtparam=i2c1=on" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt | 132 | echo "dtparam=i2c1=on" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt |
@@ -95,12 +138,10 @@ do_deploy() { | |||
95 | echo "# Enable PITFT22 display" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt | 138 | echo "# Enable PITFT22 display" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt |
96 | echo "dtoverlay=pitft22,rotate=270,speed=32000000,txbuflen=32768" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt | 139 | echo "dtoverlay=pitft22,rotate=270,speed=32000000,txbuflen=32768" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt |
97 | fi | 140 | fi |
98 | |||
99 | if [ "${PITFT28r}" = "1" ]; then | 141 | if [ "${PITFT28r}" = "1" ]; then |
100 | echo "# Enable PITFT28r display" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt | 142 | echo "# Enable PITFT28r display" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt |
101 | echo "dtoverlay=pitft28-resistive,rotate=90,speed=32000000,txbuflen=32768" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt | 143 | echo "dtoverlay=pitft28-resistive,rotate=90,speed=32000000,txbuflen=32768" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt |
102 | fi | 144 | fi |
103 | |||
104 | if [ "${PITFT35r}" = "1" ]; then | 145 | if [ "${PITFT35r}" = "1" ]; then |
105 | echo "# Enable PITFT35r display" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt | 146 | echo "# Enable PITFT35r display" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt |
106 | echo "dtoverlay=pitft35-resistive,rotate=90,speed=42000000,fps=20" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt | 147 | echo "dtoverlay=pitft35-resistive,rotate=90,speed=42000000,fps=20" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt |