Patrick Williams | 8b8bc41 | 2016-08-17 15:02:23 -0500 | [diff] [blame] | 1 | DESCRIPTION = "Commented config.txt file for the Raspberry Pi. \ |
| 2 | The Raspberry Pi config.txt file is read by the GPU before \ |
| 3 | the ARM core is initialised. It can be used to set various \ |
| 4 | system configuration parameters." |
| 5 | LICENSE = "MIT" |
Brad Bishop | f27bdd5 | 2018-05-07 15:42:31 +0200 | [diff] [blame] | 6 | LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" |
Patrick Williams | 8b8bc41 | 2016-08-17 15:02:23 -0500 | [diff] [blame] | 7 | |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 8 | COMPATIBLE_MACHINE = "^rpi$" |
Patrick Williams | 8b8bc41 | 2016-08-17 15:02:23 -0500 | [diff] [blame] | 9 | |
| 10 | SRCREV = "648ffc470824c43eb0d16c485f4c24816b32cd6f" |
| 11 | SRC_URI = "git://github.com/Evilpaul/RPi-config.git;protocol=git;branch=master \ |
| 12 | " |
| 13 | |
| 14 | S = "${WORKDIR}/git" |
| 15 | |
Patrick Williams | b2e6a9b | 2017-02-23 20:31:26 -0600 | [diff] [blame] | 16 | PR = "r5" |
Patrick Williams | 8b8bc41 | 2016-08-17 15:02:23 -0500 | [diff] [blame] | 17 | |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 18 | INHIBIT_DEFAULT_DEPS = "1" |
| 19 | |
Patrick Williams | 8b8bc41 | 2016-08-17 15:02:23 -0500 | [diff] [blame] | 20 | PITFT="${@bb.utils.contains("MACHINE_FEATURES", "pitft", "1", "0", d)}" |
| 21 | PITFT22="${@bb.utils.contains("MACHINE_FEATURES", "pitft22", "1", "0", d)}" |
| 22 | PITFT28r="${@bb.utils.contains("MACHINE_FEATURES", "pitft28r", "1", "0", d)}" |
Brad Bishop | 1b9ee29 | 2020-01-16 09:06:00 -0500 | [diff] [blame] | 23 | PITFT28c="${@bb.utils.contains("MACHINE_FEATURES", "pitft28c", "1", "0", d)}" |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 24 | PITFT35r="${@bb.utils.contains("MACHINE_FEATURES", "pitft35r", "1", "0", d)}" |
Patrick Williams | 8b8bc41 | 2016-08-17 15:02:23 -0500 | [diff] [blame] | 25 | |
Patrick Williams | b2e6a9b | 2017-02-23 20:31:26 -0600 | [diff] [blame] | 26 | VC4GRAPHICS="${@bb.utils.contains("MACHINE_FEATURES", "vc4graphics", "1", "0", d)}" |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 27 | VC4DTBO ?= "vc4-kms-v3d" |
Andrew Geissler | 4fc9e43 | 2020-06-27 00:13:56 -0500 | [diff] [blame] | 28 | GPIO_IR ?= "18" |
| 29 | GPIO_IR_TX ?= "17" |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 30 | |
Andrew Geissler | 9d7e0aa | 2020-08-21 15:56:44 -0500 | [diff] [blame] | 31 | CAN_OSCILLATOR ?= "16000000" |
| 32 | |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 33 | inherit deploy nopackages |
Patrick Williams | 8b8bc41 | 2016-08-17 15:02:23 -0500 | [diff] [blame] | 34 | |
| 35 | do_deploy() { |
Andrew Geissler | 9d7e0aa | 2020-08-21 15:56:44 -0500 | [diff] [blame] | 36 | install -d ${DEPLOYDIR}/${BOOTFILES_DIR_NAME} |
Andrew Geissler | 1110521 | 2021-02-12 15:30:38 -0600 | [diff] [blame] | 37 | CONFIG=${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt |
Patrick Williams | 8b8bc41 | 2016-08-17 15:02:23 -0500 | [diff] [blame] | 38 | |
Andrew Geissler | 1110521 | 2021-02-12 15:30:38 -0600 | [diff] [blame] | 39 | cp ${S}/config.txt $CONFIG |
Patrick Williams | 8b8bc41 | 2016-08-17 15:02:23 -0500 | [diff] [blame] | 40 | |
| 41 | if [ -n "${KEY_DECODE_MPG2}" ]; then |
Andrew Geissler | 1110521 | 2021-02-12 15:30:38 -0600 | [diff] [blame] | 42 | sed -i '/#decode_MPG2=/ c\decode_MPG2=${KEY_DECODE_MPG2}' $CONFIG |
Patrick Williams | 8b8bc41 | 2016-08-17 15:02:23 -0500 | [diff] [blame] | 43 | fi |
| 44 | if [ -n "${KEY_DECODE_WVC1}" ]; then |
Andrew Geissler | 1110521 | 2021-02-12 15:30:38 -0600 | [diff] [blame] | 45 | sed -i '/#decode_WVC1=/ c\decode_WVC1=${KEY_DECODE_WVC1}' $CONFIG |
Patrick Williams | 8b8bc41 | 2016-08-17 15:02:23 -0500 | [diff] [blame] | 46 | fi |
| 47 | if [ -n "${DISABLE_OVERSCAN}" ]; then |
Andrew Geissler | 1110521 | 2021-02-12 15:30:38 -0600 | [diff] [blame] | 48 | sed -i '/#disable_overscan=/ c\disable_overscan=${DISABLE_OVERSCAN}' $CONFIG |
Patrick Williams | 8b8bc41 | 2016-08-17 15:02:23 -0500 | [diff] [blame] | 49 | fi |
Brad Bishop | 26bdd44 | 2019-08-16 17:08:17 -0400 | [diff] [blame] | 50 | if [ "${DISABLE_SPLASH}" = "1" ]; then |
Andrew Geissler | 1110521 | 2021-02-12 15:30:38 -0600 | [diff] [blame] | 51 | sed -i '/#disable_splash=/ c\disable_splash=${DISABLE_SPLASH}' $CONFIG |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 52 | fi |
| 53 | |
| 54 | # Set overclocking options |
Patrick Williams | 8b8bc41 | 2016-08-17 15:02:23 -0500 | [diff] [blame] | 55 | if [ -n "${ARM_FREQ}" ]; then |
Andrew Geissler | 1110521 | 2021-02-12 15:30:38 -0600 | [diff] [blame] | 56 | sed -i '/#arm_freq=/ c\arm_freq=${ARM_FREQ}' $CONFIG |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 57 | fi |
| 58 | if [ -n "${GPU_FREQ}" ]; then |
Andrew Geissler | 1110521 | 2021-02-12 15:30:38 -0600 | [diff] [blame] | 59 | sed -i '/#gpu_freq=/ c\gpu_freq=${GPU_FREQ}' $CONFIG |
Patrick Williams | 8b8bc41 | 2016-08-17 15:02:23 -0500 | [diff] [blame] | 60 | fi |
| 61 | if [ -n "${CORE_FREQ}" ]; then |
Andrew Geissler | 1110521 | 2021-02-12 15:30:38 -0600 | [diff] [blame] | 62 | sed -i '/#core_freq=/ c\core_freq=${CORE_FREQ}' $CONFIG |
Patrick Williams | 8b8bc41 | 2016-08-17 15:02:23 -0500 | [diff] [blame] | 63 | fi |
| 64 | if [ -n "${SDRAM_FREQ}" ]; then |
Andrew Geissler | 1110521 | 2021-02-12 15:30:38 -0600 | [diff] [blame] | 65 | sed -i '/#sdram_freq=/ c\sdram_freq=${SDRAM_FREQ}' $CONFIG |
Patrick Williams | 8b8bc41 | 2016-08-17 15:02:23 -0500 | [diff] [blame] | 66 | fi |
| 67 | if [ -n "${OVER_VOLTAGE}" ]; then |
Andrew Geissler | 1110521 | 2021-02-12 15:30:38 -0600 | [diff] [blame] | 68 | sed -i '/#over_voltage=/ c\over_voltage=${OVER_VOLTAGE}' $CONFIG |
Patrick Williams | 8b8bc41 | 2016-08-17 15:02:23 -0500 | [diff] [blame] | 69 | fi |
| 70 | |
| 71 | # GPU memory |
| 72 | if [ -n "${GPU_MEM}" ]; then |
Andrew Geissler | 1110521 | 2021-02-12 15:30:38 -0600 | [diff] [blame] | 73 | sed -i '/#gpu_mem=/ c\gpu_mem=${GPU_MEM}' $CONFIG |
Patrick Williams | 8b8bc41 | 2016-08-17 15:02:23 -0500 | [diff] [blame] | 74 | fi |
| 75 | if [ -n "${GPU_MEM_256}" ]; then |
Andrew Geissler | 1110521 | 2021-02-12 15:30:38 -0600 | [diff] [blame] | 76 | sed -i '/#gpu_mem_256=/ c\gpu_mem_256=${GPU_MEM_256}' $CONFIG |
Patrick Williams | 8b8bc41 | 2016-08-17 15:02:23 -0500 | [diff] [blame] | 77 | fi |
| 78 | if [ -n "${GPU_MEM_512}" ]; then |
Andrew Geissler | 1110521 | 2021-02-12 15:30:38 -0600 | [diff] [blame] | 79 | sed -i '/#gpu_mem_512=/ c\gpu_mem_512=${GPU_MEM_512}' $CONFIG |
Patrick Williams | 8b8bc41 | 2016-08-17 15:02:23 -0500 | [diff] [blame] | 80 | fi |
| 81 | if [ -n "${GPU_MEM_1024}" ]; then |
Andrew Geissler | 1110521 | 2021-02-12 15:30:38 -0600 | [diff] [blame] | 82 | sed -i '/#gpu_mem_1024=/ c\gpu_mem_1024=${GPU_MEM_1024}' $CONFIG |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 83 | fi |
| 84 | |
| 85 | # Set boot delay |
| 86 | if [ -n "${BOOT_DELAY}" ]; then |
Andrew Geissler | 1110521 | 2021-02-12 15:30:38 -0600 | [diff] [blame] | 87 | sed -i '/#boot_delay=/ c\boot_delay=${BOOT_DELAY}' $CONFIG |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 88 | fi |
| 89 | if [ -n "${BOOT_DELAY_MS}" ]; then |
Andrew Geissler | 1110521 | 2021-02-12 15:30:38 -0600 | [diff] [blame] | 90 | sed -i '/#boot_delay_ms=/ c\boot_delay_ms=${BOOT_DELAY_MS}' $CONFIG |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 91 | fi |
| 92 | |
| 93 | # Set HDMI and composite video options |
| 94 | if [ -n "${HDMI_FORCE_HOTPLUG}" ]; then |
Andrew Geissler | 1110521 | 2021-02-12 15:30:38 -0600 | [diff] [blame] | 95 | sed -i '/#hdmi_force_hotplug=/ c\hdmi_force_hotplug=${HDMI_FORCE_HOTPLUG}' $CONFIG |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 96 | fi |
| 97 | if [ -n "${HDMI_DRIVE}" ]; then |
Andrew Geissler | 1110521 | 2021-02-12 15:30:38 -0600 | [diff] [blame] | 98 | sed -i '/#hdmi_drive=/ c\hdmi_drive=${HDMI_DRIVE}' $CONFIG |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 99 | fi |
| 100 | if [ -n "${HDMI_GROUP}" ]; then |
Andrew Geissler | 1110521 | 2021-02-12 15:30:38 -0600 | [diff] [blame] | 101 | sed -i '/#hdmi_group=/ c\hdmi_group=${HDMI_GROUP}' $CONFIG |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 102 | fi |
| 103 | if [ -n "${HDMI_MODE}" ]; then |
Andrew Geissler | 1110521 | 2021-02-12 15:30:38 -0600 | [diff] [blame] | 104 | sed -i '/#hdmi_mode=/ c\hdmi_mode=${HDMI_MODE}' $CONFIG |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 105 | fi |
| 106 | if [ -n "${CONFIG_HDMI_BOOST}" ]; then |
Andrew Geissler | 1110521 | 2021-02-12 15:30:38 -0600 | [diff] [blame] | 107 | sed -i '/#config_hdmi_boost=/ c\config_hdmi_boost=${CONFIG_HDMI_BOOST}' $CONFIG |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 108 | fi |
| 109 | if [ -n "${SDTV_MODE}" ]; then |
Andrew Geissler | 1110521 | 2021-02-12 15:30:38 -0600 | [diff] [blame] | 110 | sed -i '/#sdtv_mode=/ c\sdtv_mode=${SDTV_MODE}' $CONFIG |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 111 | fi |
| 112 | if [ -n "${SDTV_ASPECT}" ]; then |
Andrew Geissler | 1110521 | 2021-02-12 15:30:38 -0600 | [diff] [blame] | 113 | sed -i '/#sdtv_aspect=/ c\sdtv_aspect=${SDTV_ASPECT}' $CONFIG |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 114 | fi |
| 115 | if [ -n "${DISPLAY_ROTATE}" ]; then |
Andrew Geissler | 1110521 | 2021-02-12 15:30:38 -0600 | [diff] [blame] | 116 | sed -i '/#display_rotate=/ c\display_rotate=${DISPLAY_ROTATE}' $CONFIG |
Patrick Williams | 8b8bc41 | 2016-08-17 15:02:23 -0500 | [diff] [blame] | 117 | fi |
| 118 | |
| 119 | # Video camera support |
Brad Bishop | 26bdd44 | 2019-08-16 17:08:17 -0400 | [diff] [blame] | 120 | if [ "${VIDEO_CAMERA}" = "1" ]; then |
William A. Kennington III | a99e9b6 | 2021-06-02 12:47:56 -0700 | [diff] [blame] | 121 | # It has been observed that Raspberry Pi 4B 4GB may fail to enable the |
| 122 | # camera if "start_x=1" is at the end of the file. Therefore, |
| 123 | # "start_x=1" has been set to replace the original occurrence in |
| 124 | # config.txt, which is at the middle of the file. |
| 125 | # The exact underlying cause is unknown. There are similar issues |
| 126 | # reported in the raspberrypi/firware repo and the conclusion reached |
| 127 | # was that there could be a file size limitation affecting certain |
| 128 | # variables. It was commented that this limitation could be 4k but |
| 129 | # not proved. |
Andrew Geissler | 1110521 | 2021-02-12 15:30:38 -0600 | [diff] [blame] | 130 | sed -i '/#start_x=/ c\start_x=1' $CONFIG |
Patrick Williams | 8b8bc41 | 2016-08-17 15:02:23 -0500 | [diff] [blame] | 131 | fi |
| 132 | |
| 133 | # Offline compositing support |
Brad Bishop | 26bdd44 | 2019-08-16 17:08:17 -0400 | [diff] [blame] | 134 | if [ "${DISPMANX_OFFLINE}" = "1" ]; then |
Andrew Geissler | 1110521 | 2021-02-12 15:30:38 -0600 | [diff] [blame] | 135 | echo "# Enable offline compositing" >>$CONFIG |
| 136 | echo "dispmanx_offline=1" >>$CONFIG |
Patrick Williams | 8b8bc41 | 2016-08-17 15:02:23 -0500 | [diff] [blame] | 137 | fi |
| 138 | |
| 139 | # SPI bus support |
Brad Bishop | 26bdd44 | 2019-08-16 17:08:17 -0400 | [diff] [blame] | 140 | if [ "${ENABLE_SPI_BUS}" = "1" ] || [ "${PITFT}" = "1" ]; then |
Andrew Geissler | 1110521 | 2021-02-12 15:30:38 -0600 | [diff] [blame] | 141 | echo "# Enable SPI bus" >>$CONFIG |
| 142 | echo "dtparam=spi=on" >>$CONFIG |
Patrick Williams | 8b8bc41 | 2016-08-17 15:02:23 -0500 | [diff] [blame] | 143 | fi |
| 144 | |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 145 | # I2C support |
Brad Bishop | 26bdd44 | 2019-08-16 17:08:17 -0400 | [diff] [blame] | 146 | if [ "${ENABLE_I2C}" = "1" ] || [ "${PITFT}" = "1" ]; then |
Andrew Geissler | 1110521 | 2021-02-12 15:30:38 -0600 | [diff] [blame] | 147 | echo "# Enable I2C" >>$CONFIG |
| 148 | echo "dtparam=i2c1=on" >>$CONFIG |
| 149 | echo "dtparam=i2c_arm=on" >>$CONFIG |
Patrick Williams | 8b8bc41 | 2016-08-17 15:02:23 -0500 | [diff] [blame] | 150 | fi |
| 151 | |
| 152 | # PiTFT22 display support |
| 153 | if [ "${PITFT22}" = "1" ]; then |
Andrew Geissler | 1110521 | 2021-02-12 15:30:38 -0600 | [diff] [blame] | 154 | echo "# Enable PITFT22 display" >>$CONFIG |
| 155 | echo "dtoverlay=pitft22,rotate=270,speed=32000000,txbuflen=32768" >>$CONFIG |
Patrick Williams | 8b8bc41 | 2016-08-17 15:02:23 -0500 | [diff] [blame] | 156 | fi |
Patrick Williams | 8b8bc41 | 2016-08-17 15:02:23 -0500 | [diff] [blame] | 157 | if [ "${PITFT28r}" = "1" ]; then |
Andrew Geissler | 1110521 | 2021-02-12 15:30:38 -0600 | [diff] [blame] | 158 | echo "# Enable PITFT28r display" >>$CONFIG |
| 159 | echo "dtoverlay=pitft28-resistive,rotate=90,speed=32000000,txbuflen=32768" >>$CONFIG |
Patrick Williams | 8b8bc41 | 2016-08-17 15:02:23 -0500 | [diff] [blame] | 160 | fi |
Brad Bishop | 1b9ee29 | 2020-01-16 09:06:00 -0500 | [diff] [blame] | 161 | if [ "${PITFT28c}" = "1" ]; then |
Andrew Geissler | 1110521 | 2021-02-12 15:30:38 -0600 | [diff] [blame] | 162 | echo "# Enable PITFT28c display" >>$CONFIG |
| 163 | echo "dtoverlay=pitft28-capacitive,rotate=90,speed=32000000,txbuflen=32768" >>$CONFIG |
| 164 | echo "dtoverlay=pitft28-capacitive,touch-swapxy,touch-invx" >>$CONFIG |
Brad Bishop | 1b9ee29 | 2020-01-16 09:06:00 -0500 | [diff] [blame] | 165 | fi |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 166 | if [ "${PITFT35r}" = "1" ]; then |
Andrew Geissler | 1110521 | 2021-02-12 15:30:38 -0600 | [diff] [blame] | 167 | echo "# Enable PITFT35r display" >>$CONFIG |
| 168 | echo "dtoverlay=pitft35-resistive,rotate=90,speed=42000000,fps=20" >>$CONFIG |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 169 | fi |
| 170 | |
Patrick Williams | 8b8bc41 | 2016-08-17 15:02:23 -0500 | [diff] [blame] | 171 | # UART support |
| 172 | if [ "${ENABLE_UART}" = "1" ]; then |
Andrew Geissler | 1110521 | 2021-02-12 15:30:38 -0600 | [diff] [blame] | 173 | echo "# Enable UART" >>$CONFIG |
| 174 | echo "enable_uart=1" >>$CONFIG |
Patrick Williams | 8b8bc41 | 2016-08-17 15:02:23 -0500 | [diff] [blame] | 175 | fi |
Patrick Williams | b2e6a9b | 2017-02-23 20:31:26 -0600 | [diff] [blame] | 176 | |
Andrew Geissler | 4fc9e43 | 2020-06-27 00:13:56 -0500 | [diff] [blame] | 177 | # Infrared support |
| 178 | if [ "${ENABLE_IR}" = "1" ]; then |
Andrew Geissler | 1110521 | 2021-02-12 15:30:38 -0600 | [diff] [blame] | 179 | echo "# Enable infrared" >>$CONFIG |
| 180 | echo "dtoverlay=gpio-ir,gpio_pin=${GPIO_IR}" >>$CONFIG |
| 181 | echo "dtoverlay=gpio-ir-tx,gpio_pin=${GPIO_IR_TX}" >>$CONFIG |
Andrew Geissler | 4fc9e43 | 2020-06-27 00:13:56 -0500 | [diff] [blame] | 182 | fi |
| 183 | |
Patrick Williams | b2e6a9b | 2017-02-23 20:31:26 -0600 | [diff] [blame] | 184 | # VC4 Graphics support |
| 185 | if [ "${VC4GRAPHICS}" = "1" ]; then |
Andrew Geissler | 1110521 | 2021-02-12 15:30:38 -0600 | [diff] [blame] | 186 | echo "# Enable VC4 Graphics" >> $CONFIG |
| 187 | echo "dtoverlay=${VC4DTBO}" >> $CONFIG |
Patrick Williams | b2e6a9b | 2017-02-23 20:31:26 -0600 | [diff] [blame] | 188 | fi |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 189 | |
Andrew Geissler | 26e4bea | 2020-11-30 19:54:03 -0600 | [diff] [blame] | 190 | # Choose Camera Sensor to be used, default imx219 sensor |
| 191 | if [ "${RASPBERRYPI_CAMERA_V2}" = "1" ]; then |
William A. Kennington III | a99e9b6 | 2021-06-02 12:47:56 -0700 | [diff] [blame] | 192 | echo "# Enable Sony RaspberryPi Camera(imx219)" >> $CONFIG |
Andrew Geissler | 1110521 | 2021-02-12 15:30:38 -0600 | [diff] [blame] | 193 | echo "dtoverlay=imx219" >> $CONFIG |
Andrew Geissler | 26e4bea | 2020-11-30 19:54:03 -0600 | [diff] [blame] | 194 | fi |
| 195 | |
William A. Kennington III | a99e9b6 | 2021-06-02 12:47:56 -0700 | [diff] [blame] | 196 | # Choose Camera Sensor to be used, default imx477 sensor |
| 197 | #if [ "${RASPBERRYPI_HD_CAMERA}" = "1" ]; then |
| 198 | # echo "# Enable Sony RaspberryPi Camera(imx477)" >> $CONFIG |
| 199 | # echo "dtoverlay=imx477" >> $CONFIG |
| 200 | #fi |
| 201 | |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 202 | # Waveshare "C" 1024x600 7" Rev2.1 IPS capacitive touch (http://www.waveshare.com/7inch-HDMI-LCD-C.htm) |
| 203 | if [ "${WAVESHARE_1024X600_C_2_1}" = "1" ]; then |
Andrew Geissler | 1110521 | 2021-02-12 15:30:38 -0600 | [diff] [blame] | 204 | echo "# Waveshare \"C\" 1024x600 7\" Rev2.1 IPS capacitive touch screen" >> $CONFIG |
| 205 | echo "max_usb_current=1" >> $CONFIG |
| 206 | echo "hdmi_group=2" >> $CONFIG |
| 207 | echo "hdmi_mode=87" >> $CONFIG |
| 208 | echo "hdmi_cvt 1024 600 60 6 0 0 0" >> $CONFIG |
| 209 | echo "hdmi_drive=1" >> $CONFIG |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 210 | fi |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 211 | |
| 212 | # DWC2 USB peripheral support |
| 213 | if [ "${ENABLE_DWC2_PERIPHERAL}" = "1" ]; then |
Andrew Geissler | 1110521 | 2021-02-12 15:30:38 -0600 | [diff] [blame] | 214 | echo "# Enable USB peripheral mode" >> $CONFIG |
| 215 | echo "dtoverlay=dwc2,dr_mode=peripheral" >> $CONFIG |
| 216 | fi |
| 217 | |
| 218 | # DWC2 USB host mode support |
| 219 | if [ "${ENABLE_DWC2_HOST}" = "1" ]; then |
| 220 | echo "# Enable USB host mode" >> $CONFIG |
| 221 | echo "dtoverlay=dwc2,dr_mode=host" >> $CONFIG |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 222 | fi |
Brad Bishop | f27bdd5 | 2018-05-07 15:42:31 +0200 | [diff] [blame] | 223 | |
| 224 | # AT86RF23X support |
| 225 | if [ "${ENABLE_AT86RF}" = "1" ]; then |
Andrew Geissler | 1110521 | 2021-02-12 15:30:38 -0600 | [diff] [blame] | 226 | echo "# Enable AT86RF23X" >>$CONFIG |
| 227 | echo "dtoverlay=at86rf233,speed=3000000" >>$CONFIG |
Brad Bishop | f27bdd5 | 2018-05-07 15:42:31 +0200 | [diff] [blame] | 228 | fi |
| 229 | |
Andrew Geissler | 5d59ec7 | 2020-07-24 16:09:26 -0500 | [diff] [blame] | 230 | # ENABLE DUAL CAN |
| 231 | if [ "${ENABLE_DUAL_CAN}" = "1" ]; then |
Andrew Geissler | 1110521 | 2021-02-12 15:30:38 -0600 | [diff] [blame] | 232 | echo "# Enable DUAL CAN" >>$CONFIG |
| 233 | echo "dtoverlay=mcp2515-can0,oscillator=${CAN_OSCILLATOR},interrupt=25" >>$CONFIG |
| 234 | echo "dtoverlay=mcp2515-can1,oscillator=${CAN_OSCILLATOR},interrupt=24" >>$CONFIG |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 235 | # ENABLE CAN |
Andrew Geissler | 5d59ec7 | 2020-07-24 16:09:26 -0500 | [diff] [blame] | 236 | elif [ "${ENABLE_CAN}" = "1" ]; then |
Andrew Geissler | 1110521 | 2021-02-12 15:30:38 -0600 | [diff] [blame] | 237 | echo "# Enable CAN" >>$CONFIG |
| 238 | echo "dtoverlay=mcp2515-can0,oscillator=${CAN_OSCILLATOR},interrupt=25" >>$CONFIG |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 239 | fi |
| 240 | |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 241 | # Append extra config if the user has provided any |
Andrew Geissler | 1110521 | 2021-02-12 15:30:38 -0600 | [diff] [blame] | 242 | printf "${RPI_EXTRA_CONFIG}\n" >> $CONFIG |
Brad Bishop | 26bdd44 | 2019-08-16 17:08:17 -0400 | [diff] [blame] | 243 | |
| 244 | # Handle setup with armstub file |
| 245 | if [ "${@bb.utils.contains("MACHINE_FEATURES", "armstub", "1", "0", d)}" = "1" ]; then |
Andrew Geissler | 1110521 | 2021-02-12 15:30:38 -0600 | [diff] [blame] | 246 | echo "\n# ARM stub configuration" >> $CONFIG |
| 247 | echo "armstub=${ARMSTUB}" >> $CONFIG |
Brad Bishop | 26bdd44 | 2019-08-16 17:08:17 -0400 | [diff] [blame] | 248 | case "${ARMSTUB}" in |
| 249 | *-gic.bin) |
Andrew Geissler | 1110521 | 2021-02-12 15:30:38 -0600 | [diff] [blame] | 250 | echo "enable_gic=1" >> $CONFIG |
Brad Bishop | 26bdd44 | 2019-08-16 17:08:17 -0400 | [diff] [blame] | 251 | ;; |
| 252 | esac |
| 253 | fi |
Patrick Williams | 8b8bc41 | 2016-08-17 15:02:23 -0500 | [diff] [blame] | 254 | } |
| 255 | |
Brad Bishop | 3a5fbf5 | 2017-12-04 02:17:07 -0500 | [diff] [blame] | 256 | do_deploy_append_raspberrypi3-64() { |
Andrew Geissler | 1110521 | 2021-02-12 15:30:38 -0600 | [diff] [blame] | 257 | echo "# have a properly sized image" >> $CONFIG |
| 258 | echo "disable_overscan=1" >> $CONFIG |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 259 | |
Andrew Geissler | 1110521 | 2021-02-12 15:30:38 -0600 | [diff] [blame] | 260 | echo "# Enable audio (loads snd_bcm2835)" >> $CONFIG |
| 261 | echo "dtparam=audio=on" >> $CONFIG |
Brad Bishop | 3a5fbf5 | 2017-12-04 02:17:07 -0500 | [diff] [blame] | 262 | } |
| 263 | |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 264 | addtask deploy before do_build after do_install |
Andrew Geissler | 9d7e0aa | 2020-08-21 15:56:44 -0500 | [diff] [blame] | 265 | do_deploy[dirs] += "${DEPLOYDIR}/${BOOTFILES_DIR_NAME}" |
Patrick Williams | 8b8bc41 | 2016-08-17 15:02:23 -0500 | [diff] [blame] | 266 | |
| 267 | PACKAGE_ARCH = "${MACHINE_ARCH}" |