blob: e1c330db161899a637a2c3d85a1ec1dc1da5e421 [file] [log] [blame]
Patrick Williams8b8bc412016-08-17 15:02:23 -05001DESCRIPTION = "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."
5LICENSE = "MIT"
Brad Bishopf27bdd52018-05-07 15:42:31 +02006LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
Patrick Williams8b8bc412016-08-17 15:02:23 -05007
Brad Bishopd7bf8c12018-02-25 22:55:05 -05008COMPATIBLE_MACHINE = "^rpi$"
Patrick Williams8b8bc412016-08-17 15:02:23 -05009
10SRCREV = "648ffc470824c43eb0d16c485f4c24816b32cd6f"
11SRC_URI = "git://github.com/Evilpaul/RPi-config.git;protocol=git;branch=master \
12 "
13
14S = "${WORKDIR}/git"
15
Patrick Williamsb2e6a9b2017-02-23 20:31:26 -060016PR = "r5"
Patrick Williams8b8bc412016-08-17 15:02:23 -050017
Brad Bishop316dfdd2018-06-25 12:45:53 -040018INHIBIT_DEFAULT_DEPS = "1"
19
Patrick Williams8b8bc412016-08-17 15:02:23 -050020PITFT="${@bb.utils.contains("MACHINE_FEATURES", "pitft", "1", "0", d)}"
21PITFT22="${@bb.utils.contains("MACHINE_FEATURES", "pitft22", "1", "0", d)}"
22PITFT28r="${@bb.utils.contains("MACHINE_FEATURES", "pitft28r", "1", "0", d)}"
Brad Bishop1b9ee292020-01-16 09:06:00 -050023PITFT28c="${@bb.utils.contains("MACHINE_FEATURES", "pitft28c", "1", "0", d)}"
Brad Bishop6e60e8b2018-02-01 10:27:11 -050024PITFT35r="${@bb.utils.contains("MACHINE_FEATURES", "pitft35r", "1", "0", d)}"
Patrick Williams8b8bc412016-08-17 15:02:23 -050025
Patrick Williamsb2e6a9b2017-02-23 20:31:26 -060026VC4GRAPHICS="${@bb.utils.contains("MACHINE_FEATURES", "vc4graphics", "1", "0", d)}"
Brad Bishopd7bf8c12018-02-25 22:55:05 -050027VC4DTBO ?= "vc4-kms-v3d"
Andrew Geissler4fc9e432020-06-27 00:13:56 -050028GPIO_IR ?= "18"
29GPIO_IR_TX ?= "17"
Brad Bishop316dfdd2018-06-25 12:45:53 -040030
Andrew Geissler9d7e0aa2020-08-21 15:56:44 -050031CAN_OSCILLATOR ?= "16000000"
32
Brad Bishop316dfdd2018-06-25 12:45:53 -040033inherit deploy nopackages
Patrick Williams8b8bc412016-08-17 15:02:23 -050034
35do_deploy() {
Andrew Geissler9d7e0aa2020-08-21 15:56:44 -050036 install -d ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}
Patrick Williams8b8bc412016-08-17 15:02:23 -050037
Andrew Geissler9d7e0aa2020-08-21 15:56:44 -050038 cp ${S}/config.txt ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/
Patrick Williams8b8bc412016-08-17 15:02:23 -050039
40 if [ -n "${KEY_DECODE_MPG2}" ]; then
Andrew Geissler9d7e0aa2020-08-21 15:56:44 -050041 sed -i '/#decode_MPG2=/ c\decode_MPG2=${KEY_DECODE_MPG2}' ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
Patrick Williams8b8bc412016-08-17 15:02:23 -050042 fi
43 if [ -n "${KEY_DECODE_WVC1}" ]; then
Andrew Geissler9d7e0aa2020-08-21 15:56:44 -050044 sed -i '/#decode_WVC1=/ c\decode_WVC1=${KEY_DECODE_WVC1}' ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
Patrick Williams8b8bc412016-08-17 15:02:23 -050045 fi
46 if [ -n "${DISABLE_OVERSCAN}" ]; then
Andrew Geissler9d7e0aa2020-08-21 15:56:44 -050047 sed -i '/#disable_overscan=/ c\disable_overscan=${DISABLE_OVERSCAN}' ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
Patrick Williams8b8bc412016-08-17 15:02:23 -050048 fi
Brad Bishop26bdd442019-08-16 17:08:17 -040049 if [ "${DISABLE_SPLASH}" = "1" ]; then
Andrew Geissler9d7e0aa2020-08-21 15:56:44 -050050 sed -i '/#disable_splash=/ c\disable_splash=${DISABLE_SPLASH}' ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
Brad Bishop316dfdd2018-06-25 12:45:53 -040051 fi
52
53 # Set overclocking options
Patrick Williams8b8bc412016-08-17 15:02:23 -050054 if [ -n "${ARM_FREQ}" ]; then
Andrew Geissler9d7e0aa2020-08-21 15:56:44 -050055 sed -i '/#arm_freq=/ c\arm_freq=${ARM_FREQ}' ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
Brad Bishop316dfdd2018-06-25 12:45:53 -040056 fi
57 if [ -n "${GPU_FREQ}" ]; then
Andrew Geissler9d7e0aa2020-08-21 15:56:44 -050058 sed -i '/#gpu_freq=/ c\gpu_freq=${GPU_FREQ}' ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
Patrick Williams8b8bc412016-08-17 15:02:23 -050059 fi
60 if [ -n "${CORE_FREQ}" ]; then
Andrew Geissler9d7e0aa2020-08-21 15:56:44 -050061 sed -i '/#core_freq=/ c\core_freq=${CORE_FREQ}' ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
Patrick Williams8b8bc412016-08-17 15:02:23 -050062 fi
63 if [ -n "${SDRAM_FREQ}" ]; then
Andrew Geissler9d7e0aa2020-08-21 15:56:44 -050064 sed -i '/#sdram_freq=/ c\sdram_freq=${SDRAM_FREQ}' ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
Patrick Williams8b8bc412016-08-17 15:02:23 -050065 fi
66 if [ -n "${OVER_VOLTAGE}" ]; then
Andrew Geissler9d7e0aa2020-08-21 15:56:44 -050067 sed -i '/#over_voltage=/ c\over_voltage=${OVER_VOLTAGE}' ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
Patrick Williams8b8bc412016-08-17 15:02:23 -050068 fi
69
70 # GPU memory
71 if [ -n "${GPU_MEM}" ]; then
Andrew Geissler9d7e0aa2020-08-21 15:56:44 -050072 sed -i '/#gpu_mem=/ c\gpu_mem=${GPU_MEM}' ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
Patrick Williams8b8bc412016-08-17 15:02:23 -050073 fi
74 if [ -n "${GPU_MEM_256}" ]; then
Andrew Geissler9d7e0aa2020-08-21 15:56:44 -050075 sed -i '/#gpu_mem_256=/ c\gpu_mem_256=${GPU_MEM_256}' ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
Patrick Williams8b8bc412016-08-17 15:02:23 -050076 fi
77 if [ -n "${GPU_MEM_512}" ]; then
Andrew Geissler9d7e0aa2020-08-21 15:56:44 -050078 sed -i '/#gpu_mem_512=/ c\gpu_mem_512=${GPU_MEM_512}' ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
Patrick Williams8b8bc412016-08-17 15:02:23 -050079 fi
80 if [ -n "${GPU_MEM_1024}" ]; then
Andrew Geissler9d7e0aa2020-08-21 15:56:44 -050081 sed -i '/#gpu_mem_1024=/ c\gpu_mem_1024=${GPU_MEM_1024}' ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
Brad Bishop316dfdd2018-06-25 12:45:53 -040082 fi
83
84 # Set boot delay
85 if [ -n "${BOOT_DELAY}" ]; then
Andrew Geissler9d7e0aa2020-08-21 15:56:44 -050086 sed -i '/#boot_delay=/ c\boot_delay=${BOOT_DELAY}' ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
Brad Bishop316dfdd2018-06-25 12:45:53 -040087 fi
88 if [ -n "${BOOT_DELAY_MS}" ]; then
Andrew Geissler9d7e0aa2020-08-21 15:56:44 -050089 sed -i '/#boot_delay_ms=/ c\boot_delay_ms=${BOOT_DELAY_MS}' ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
Brad Bishop316dfdd2018-06-25 12:45:53 -040090 fi
91
92 # Set HDMI and composite video options
93 if [ -n "${HDMI_FORCE_HOTPLUG}" ]; then
Andrew Geissler9d7e0aa2020-08-21 15:56:44 -050094 sed -i '/#hdmi_force_hotplug=/ c\hdmi_force_hotplug=${HDMI_FORCE_HOTPLUG}' ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
Brad Bishop316dfdd2018-06-25 12:45:53 -040095 fi
96 if [ -n "${HDMI_DRIVE}" ]; then
Andrew Geissler9d7e0aa2020-08-21 15:56:44 -050097 sed -i '/#hdmi_drive=/ c\hdmi_drive=${HDMI_DRIVE}' ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
Brad Bishop316dfdd2018-06-25 12:45:53 -040098 fi
99 if [ -n "${HDMI_GROUP}" ]; then
Andrew Geissler9d7e0aa2020-08-21 15:56:44 -0500100 sed -i '/#hdmi_group=/ c\hdmi_group=${HDMI_GROUP}' ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
Brad Bishop316dfdd2018-06-25 12:45:53 -0400101 fi
102 if [ -n "${HDMI_MODE}" ]; then
Andrew Geissler9d7e0aa2020-08-21 15:56:44 -0500103 sed -i '/#hdmi_mode=/ c\hdmi_mode=${HDMI_MODE}' ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
Brad Bishop316dfdd2018-06-25 12:45:53 -0400104 fi
105 if [ -n "${CONFIG_HDMI_BOOST}" ]; then
Andrew Geissler9d7e0aa2020-08-21 15:56:44 -0500106 sed -i '/#config_hdmi_boost=/ c\config_hdmi_boost=${CONFIG_HDMI_BOOST}' ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
Brad Bishop316dfdd2018-06-25 12:45:53 -0400107 fi
108 if [ -n "${SDTV_MODE}" ]; then
Andrew Geissler9d7e0aa2020-08-21 15:56:44 -0500109 sed -i '/#sdtv_mode=/ c\sdtv_mode=${SDTV_MODE}' ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
Brad Bishop316dfdd2018-06-25 12:45:53 -0400110 fi
111 if [ -n "${SDTV_ASPECT}" ]; then
Andrew Geissler9d7e0aa2020-08-21 15:56:44 -0500112 sed -i '/#sdtv_aspect=/ c\sdtv_aspect=${SDTV_ASPECT}' ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
Brad Bishop316dfdd2018-06-25 12:45:53 -0400113 fi
114 if [ -n "${DISPLAY_ROTATE}" ]; then
Andrew Geissler9d7e0aa2020-08-21 15:56:44 -0500115 sed -i '/#display_rotate=/ c\display_rotate=${DISPLAY_ROTATE}' ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
Patrick Williams8b8bc412016-08-17 15:02:23 -0500116 fi
117
118 # Video camera support
Brad Bishop26bdd442019-08-16 17:08:17 -0400119 if [ "${VIDEO_CAMERA}" = "1" ]; then
Andrew Geissler9d7e0aa2020-08-21 15:56:44 -0500120 echo "# Enable video camera" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
121 echo "start_x=1" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
Patrick Williams8b8bc412016-08-17 15:02:23 -0500122 fi
123
124 # Offline compositing support
Brad Bishop26bdd442019-08-16 17:08:17 -0400125 if [ "${DISPMANX_OFFLINE}" = "1" ]; then
Andrew Geissler9d7e0aa2020-08-21 15:56:44 -0500126 echo "# Enable offline compositing" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
127 echo "dispmanx_offline=1" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
Patrick Williams8b8bc412016-08-17 15:02:23 -0500128 fi
129
130 # SPI bus support
Brad Bishop26bdd442019-08-16 17:08:17 -0400131 if [ "${ENABLE_SPI_BUS}" = "1" ] || [ "${PITFT}" = "1" ]; then
Andrew Geissler9d7e0aa2020-08-21 15:56:44 -0500132 echo "# Enable SPI bus" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
133 echo "dtparam=spi=on" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
Patrick Williams8b8bc412016-08-17 15:02:23 -0500134 fi
135
Brad Bishop316dfdd2018-06-25 12:45:53 -0400136 # I2C support
Brad Bishop26bdd442019-08-16 17:08:17 -0400137 if [ "${ENABLE_I2C}" = "1" ] || [ "${PITFT}" = "1" ]; then
Andrew Geissler9d7e0aa2020-08-21 15:56:44 -0500138 echo "# Enable I2C" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
139 echo "dtparam=i2c1=on" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
140 echo "dtparam=i2c_arm=on" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
Patrick Williams8b8bc412016-08-17 15:02:23 -0500141 fi
142
143 # PiTFT22 display support
144 if [ "${PITFT22}" = "1" ]; then
Andrew Geissler9d7e0aa2020-08-21 15:56:44 -0500145 echo "# Enable PITFT22 display" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
146 echo "dtoverlay=pitft22,rotate=270,speed=32000000,txbuflen=32768" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
Patrick Williams8b8bc412016-08-17 15:02:23 -0500147 fi
Patrick Williams8b8bc412016-08-17 15:02:23 -0500148 if [ "${PITFT28r}" = "1" ]; then
Andrew Geissler9d7e0aa2020-08-21 15:56:44 -0500149 echo "# Enable PITFT28r display" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
150 echo "dtoverlay=pitft28-resistive,rotate=90,speed=32000000,txbuflen=32768" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
Patrick Williams8b8bc412016-08-17 15:02:23 -0500151 fi
Brad Bishop1b9ee292020-01-16 09:06:00 -0500152 if [ "${PITFT28c}" = "1" ]; then
Andrew Geissler9d7e0aa2020-08-21 15:56:44 -0500153 echo "# Enable PITFT28c display" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
154 echo "dtoverlay=pitft28-capacitive,rotate=90,speed=32000000,txbuflen=32768" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
155 echo "dtoverlay=pitft28-capacitive,touch-swapxy,touch-invx" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
Brad Bishop1b9ee292020-01-16 09:06:00 -0500156 fi
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500157 if [ "${PITFT35r}" = "1" ]; then
Andrew Geissler9d7e0aa2020-08-21 15:56:44 -0500158 echo "# Enable PITFT35r display" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
159 echo "dtoverlay=pitft35-resistive,rotate=90,speed=42000000,fps=20" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500160 fi
161
Patrick Williams8b8bc412016-08-17 15:02:23 -0500162 # UART support
163 if [ "${ENABLE_UART}" = "1" ]; then
Andrew Geissler9d7e0aa2020-08-21 15:56:44 -0500164 echo "# Enable UART" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
165 echo "enable_uart=1" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
Patrick Williams8b8bc412016-08-17 15:02:23 -0500166 fi
Patrick Williamsb2e6a9b2017-02-23 20:31:26 -0600167
Andrew Geissler4fc9e432020-06-27 00:13:56 -0500168 # Infrared support
169 if [ "${ENABLE_IR}" = "1" ]; then
Andrew Geissler9d7e0aa2020-08-21 15:56:44 -0500170 echo "# Enable infrared" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
171 echo "dtoverlay=gpio-ir,gpio_pin=${GPIO_IR}" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
172 echo "dtoverlay=gpio-ir-tx,gpio_pin=${GPIO_IR_TX}" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
Andrew Geissler4fc9e432020-06-27 00:13:56 -0500173 fi
174
Patrick Williamsb2e6a9b2017-02-23 20:31:26 -0600175 # VC4 Graphics support
176 if [ "${VC4GRAPHICS}" = "1" ]; then
Andrew Geissler9d7e0aa2020-08-21 15:56:44 -0500177 echo "# Enable VC4 Graphics" >> ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
178 echo "dtoverlay=${VC4DTBO}" >> ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
Patrick Williamsb2e6a9b2017-02-23 20:31:26 -0600179 fi
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500180
Andrew Geissler26e4bea2020-11-30 19:54:03 -0600181 # Choose Camera Sensor to be used, default imx219 sensor
182 if [ "${RASPBERRYPI_CAMERA_V2}" = "1" ]; then
183 echo "# Enable Sony RaspberryPi Camera" >> ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
184 echo "dtoverlay=imx219" >> ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
185 fi
186
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500187 # Waveshare "C" 1024x600 7" Rev2.1 IPS capacitive touch (http://www.waveshare.com/7inch-HDMI-LCD-C.htm)
188 if [ "${WAVESHARE_1024X600_C_2_1}" = "1" ]; then
Andrew Geissler9d7e0aa2020-08-21 15:56:44 -0500189 echo "# Waveshare \"C\" 1024x600 7\" Rev2.1 IPS capacitive touch screen" >> ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
190 echo "max_usb_current=1" >> ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
191 echo "hdmi_group=2" >> ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
192 echo "hdmi_mode=87" >> ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
193 echo "hdmi_cvt 1024 600 60 6 0 0 0" >> ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
194 echo "hdmi_drive=1" >> ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500195 fi
Brad Bishop316dfdd2018-06-25 12:45:53 -0400196
197 # DWC2 USB peripheral support
198 if [ "${ENABLE_DWC2_PERIPHERAL}" = "1" ]; then
Andrew Geissler9d7e0aa2020-08-21 15:56:44 -0500199 echo "# Enable USB peripheral mode" >> ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
200 echo "dtoverlay=dwc2,dr_mode=peripheral" >> ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
Brad Bishop316dfdd2018-06-25 12:45:53 -0400201 fi
Brad Bishopf27bdd52018-05-07 15:42:31 +0200202
203 # AT86RF23X support
204 if [ "${ENABLE_AT86RF}" = "1" ]; then
Andrew Geissler9d7e0aa2020-08-21 15:56:44 -0500205 echo "# Enable AT86RF23X" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
206 echo "dtoverlay=at86rf233,speed=3000000" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
Brad Bishopf27bdd52018-05-07 15:42:31 +0200207 fi
208
Andrew Geissler5d59ec72020-07-24 16:09:26 -0500209 # ENABLE DUAL CAN
210 if [ "${ENABLE_DUAL_CAN}" = "1" ]; then
Andrew Geissler9d7e0aa2020-08-21 15:56:44 -0500211 echo "# Enable DUAL CAN" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
212 echo "dtoverlay=mcp2515-can0,oscillator=${CAN_OSCILLATOR},interrupt=25" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
213 echo "dtoverlay=mcp2515-can1,oscillator=${CAN_OSCILLATOR},interrupt=24" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
Brad Bishop19323692019-04-05 15:28:33 -0400214 # ENABLE CAN
Andrew Geissler5d59ec72020-07-24 16:09:26 -0500215 elif [ "${ENABLE_CAN}" = "1" ]; then
Andrew Geissler9d7e0aa2020-08-21 15:56:44 -0500216 echo "# Enable CAN" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
217 echo "dtoverlay=mcp2515-can0,oscillator=${CAN_OSCILLATOR},interrupt=25" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
Brad Bishop19323692019-04-05 15:28:33 -0400218 fi
219
Brad Bishop316dfdd2018-06-25 12:45:53 -0400220 # Append extra config if the user has provided any
Andrew Geissler9d7e0aa2020-08-21 15:56:44 -0500221 printf "${RPI_EXTRA_CONFIG}\n" >> ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
Brad Bishop26bdd442019-08-16 17:08:17 -0400222
223 # Handle setup with armstub file
224 if [ "${@bb.utils.contains("MACHINE_FEATURES", "armstub", "1", "0", d)}" = "1" ]; then
Andrew Geissler9d7e0aa2020-08-21 15:56:44 -0500225 echo "\n# ARM stub configuration" >> ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
226 echo "armstub=${ARMSTUB}" >> ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
Brad Bishop26bdd442019-08-16 17:08:17 -0400227 case "${ARMSTUB}" in
228 *-gic.bin)
Andrew Geissler9d7e0aa2020-08-21 15:56:44 -0500229 echo "enable_gic=1" >> ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
Brad Bishop26bdd442019-08-16 17:08:17 -0400230 ;;
231 esac
232 fi
Patrick Williams8b8bc412016-08-17 15:02:23 -0500233}
234
Brad Bishop3a5fbf52017-12-04 02:17:07 -0500235do_deploy_append_raspberrypi3-64() {
Andrew Geissler9d7e0aa2020-08-21 15:56:44 -0500236 echo "# have a properly sized image" >> ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
237 echo "disable_overscan=1" >> ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
Brad Bishopd7bf8c12018-02-25 22:55:05 -0500238
Andrew Geissler9d7e0aa2020-08-21 15:56:44 -0500239 echo "# Enable audio (loads snd_bcm2835)" >> ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
240 echo "dtparam=audio=on" >> ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
Brad Bishop3a5fbf52017-12-04 02:17:07 -0500241}
242
Brad Bishop316dfdd2018-06-25 12:45:53 -0400243addtask deploy before do_build after do_install
Andrew Geissler9d7e0aa2020-08-21 15:56:44 -0500244do_deploy[dirs] += "${DEPLOYDIR}/${BOOTFILES_DIR_NAME}"
Patrick Williams8b8bc412016-08-17 15:02:23 -0500245
246PACKAGE_ARCH = "${MACHINE_ARCH}"