diff options
-rw-r--r-- | recipes-bsp/bootfiles/rpi-config_git.bb | 147 |
1 files changed, 74 insertions, 73 deletions
diff --git a/recipes-bsp/bootfiles/rpi-config_git.bb b/recipes-bsp/bootfiles/rpi-config_git.bb index 0e5f107..25e3e89 100644 --- a/recipes-bsp/bootfiles/rpi-config_git.bb +++ b/recipes-bsp/bootfiles/rpi-config_git.bb | |||
@@ -34,85 +34,86 @@ inherit deploy nopackages | |||
34 | 34 | ||
35 | do_deploy() { | 35 | do_deploy() { |
36 | install -d ${DEPLOYDIR}/${BOOTFILES_DIR_NAME} | 36 | install -d ${DEPLOYDIR}/${BOOTFILES_DIR_NAME} |
37 | CONFIG=${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt | ||
37 | 38 | ||
38 | cp ${S}/config.txt ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/ | 39 | cp ${S}/config.txt $CONFIG |
39 | 40 | ||
40 | if [ -n "${KEY_DECODE_MPG2}" ]; then | 41 | if [ -n "${KEY_DECODE_MPG2}" ]; then |
41 | sed -i '/#decode_MPG2=/ c\decode_MPG2=${KEY_DECODE_MPG2}' ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt | 42 | sed -i '/#decode_MPG2=/ c\decode_MPG2=${KEY_DECODE_MPG2}' $CONFIG |
42 | fi | 43 | fi |
43 | if [ -n "${KEY_DECODE_WVC1}" ]; then | 44 | if [ -n "${KEY_DECODE_WVC1}" ]; then |
44 | sed -i '/#decode_WVC1=/ c\decode_WVC1=${KEY_DECODE_WVC1}' ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt | 45 | sed -i '/#decode_WVC1=/ c\decode_WVC1=${KEY_DECODE_WVC1}' $CONFIG |
45 | fi | 46 | fi |
46 | if [ -n "${DISABLE_OVERSCAN}" ]; then | 47 | if [ -n "${DISABLE_OVERSCAN}" ]; then |
47 | sed -i '/#disable_overscan=/ c\disable_overscan=${DISABLE_OVERSCAN}' ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt | 48 | sed -i '/#disable_overscan=/ c\disable_overscan=${DISABLE_OVERSCAN}' $CONFIG |
48 | fi | 49 | fi |
49 | if [ "${DISABLE_SPLASH}" = "1" ]; then | 50 | if [ "${DISABLE_SPLASH}" = "1" ]; then |
50 | sed -i '/#disable_splash=/ c\disable_splash=${DISABLE_SPLASH}' ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt | 51 | sed -i '/#disable_splash=/ c\disable_splash=${DISABLE_SPLASH}' $CONFIG |
51 | fi | 52 | fi |
52 | 53 | ||
53 | # Set overclocking options | 54 | # Set overclocking options |
54 | if [ -n "${ARM_FREQ}" ]; then | 55 | if [ -n "${ARM_FREQ}" ]; then |
55 | sed -i '/#arm_freq=/ c\arm_freq=${ARM_FREQ}' ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt | 56 | sed -i '/#arm_freq=/ c\arm_freq=${ARM_FREQ}' $CONFIG |
56 | fi | 57 | fi |
57 | if [ -n "${GPU_FREQ}" ]; then | 58 | if [ -n "${GPU_FREQ}" ]; then |
58 | sed -i '/#gpu_freq=/ c\gpu_freq=${GPU_FREQ}' ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt | 59 | sed -i '/#gpu_freq=/ c\gpu_freq=${GPU_FREQ}' $CONFIG |
59 | fi | 60 | fi |
60 | if [ -n "${CORE_FREQ}" ]; then | 61 | if [ -n "${CORE_FREQ}" ]; then |
61 | sed -i '/#core_freq=/ c\core_freq=${CORE_FREQ}' ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt | 62 | sed -i '/#core_freq=/ c\core_freq=${CORE_FREQ}' $CONFIG |
62 | fi | 63 | fi |
63 | if [ -n "${SDRAM_FREQ}" ]; then | 64 | if [ -n "${SDRAM_FREQ}" ]; then |
64 | sed -i '/#sdram_freq=/ c\sdram_freq=${SDRAM_FREQ}' ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt | 65 | sed -i '/#sdram_freq=/ c\sdram_freq=${SDRAM_FREQ}' $CONFIG |
65 | fi | 66 | fi |
66 | if [ -n "${OVER_VOLTAGE}" ]; then | 67 | if [ -n "${OVER_VOLTAGE}" ]; then |
67 | sed -i '/#over_voltage=/ c\over_voltage=${OVER_VOLTAGE}' ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt | 68 | sed -i '/#over_voltage=/ c\over_voltage=${OVER_VOLTAGE}' $CONFIG |
68 | fi | 69 | fi |
69 | 70 | ||
70 | # GPU memory | 71 | # GPU memory |
71 | if [ -n "${GPU_MEM}" ]; then | 72 | if [ -n "${GPU_MEM}" ]; then |
72 | sed -i '/#gpu_mem=/ c\gpu_mem=${GPU_MEM}' ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt | 73 | sed -i '/#gpu_mem=/ c\gpu_mem=${GPU_MEM}' $CONFIG |
73 | fi | 74 | fi |
74 | if [ -n "${GPU_MEM_256}" ]; then | 75 | if [ -n "${GPU_MEM_256}" ]; then |
75 | sed -i '/#gpu_mem_256=/ c\gpu_mem_256=${GPU_MEM_256}' ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt | 76 | sed -i '/#gpu_mem_256=/ c\gpu_mem_256=${GPU_MEM_256}' $CONFIG |
76 | fi | 77 | fi |
77 | if [ -n "${GPU_MEM_512}" ]; then | 78 | if [ -n "${GPU_MEM_512}" ]; then |
78 | sed -i '/#gpu_mem_512=/ c\gpu_mem_512=${GPU_MEM_512}' ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt | 79 | sed -i '/#gpu_mem_512=/ c\gpu_mem_512=${GPU_MEM_512}' $CONFIG |
79 | fi | 80 | fi |
80 | if [ -n "${GPU_MEM_1024}" ]; then | 81 | if [ -n "${GPU_MEM_1024}" ]; then |
81 | sed -i '/#gpu_mem_1024=/ c\gpu_mem_1024=${GPU_MEM_1024}' ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt | 82 | sed -i '/#gpu_mem_1024=/ c\gpu_mem_1024=${GPU_MEM_1024}' $CONFIG |
82 | fi | 83 | fi |
83 | 84 | ||
84 | # Set boot delay | 85 | # Set boot delay |
85 | if [ -n "${BOOT_DELAY}" ]; then | 86 | if [ -n "${BOOT_DELAY}" ]; then |
86 | sed -i '/#boot_delay=/ c\boot_delay=${BOOT_DELAY}' ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt | 87 | sed -i '/#boot_delay=/ c\boot_delay=${BOOT_DELAY}' $CONFIG |
87 | fi | 88 | fi |
88 | if [ -n "${BOOT_DELAY_MS}" ]; then | 89 | if [ -n "${BOOT_DELAY_MS}" ]; then |
89 | sed -i '/#boot_delay_ms=/ c\boot_delay_ms=${BOOT_DELAY_MS}' ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt | 90 | sed -i '/#boot_delay_ms=/ c\boot_delay_ms=${BOOT_DELAY_MS}' $CONFIG |
90 | fi | 91 | fi |
91 | 92 | ||
92 | # Set HDMI and composite video options | 93 | # Set HDMI and composite video options |
93 | if [ -n "${HDMI_FORCE_HOTPLUG}" ]; then | 94 | if [ -n "${HDMI_FORCE_HOTPLUG}" ]; then |
94 | sed -i '/#hdmi_force_hotplug=/ c\hdmi_force_hotplug=${HDMI_FORCE_HOTPLUG}' ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt | 95 | sed -i '/#hdmi_force_hotplug=/ c\hdmi_force_hotplug=${HDMI_FORCE_HOTPLUG}' $CONFIG |
95 | fi | 96 | fi |
96 | if [ -n "${HDMI_DRIVE}" ]; then | 97 | if [ -n "${HDMI_DRIVE}" ]; then |
97 | sed -i '/#hdmi_drive=/ c\hdmi_drive=${HDMI_DRIVE}' ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt | 98 | sed -i '/#hdmi_drive=/ c\hdmi_drive=${HDMI_DRIVE}' $CONFIG |
98 | fi | 99 | fi |
99 | if [ -n "${HDMI_GROUP}" ]; then | 100 | if [ -n "${HDMI_GROUP}" ]; then |
100 | sed -i '/#hdmi_group=/ c\hdmi_group=${HDMI_GROUP}' ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt | 101 | sed -i '/#hdmi_group=/ c\hdmi_group=${HDMI_GROUP}' $CONFIG |
101 | fi | 102 | fi |
102 | if [ -n "${HDMI_MODE}" ]; then | 103 | if [ -n "${HDMI_MODE}" ]; then |
103 | sed -i '/#hdmi_mode=/ c\hdmi_mode=${HDMI_MODE}' ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt | 104 | sed -i '/#hdmi_mode=/ c\hdmi_mode=${HDMI_MODE}' $CONFIG |
104 | fi | 105 | fi |
105 | if [ -n "${CONFIG_HDMI_BOOST}" ]; then | 106 | if [ -n "${CONFIG_HDMI_BOOST}" ]; then |
106 | sed -i '/#config_hdmi_boost=/ c\config_hdmi_boost=${CONFIG_HDMI_BOOST}' ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt | 107 | sed -i '/#config_hdmi_boost=/ c\config_hdmi_boost=${CONFIG_HDMI_BOOST}' $CONFIG |
107 | fi | 108 | fi |
108 | if [ -n "${SDTV_MODE}" ]; then | 109 | if [ -n "${SDTV_MODE}" ]; then |
109 | sed -i '/#sdtv_mode=/ c\sdtv_mode=${SDTV_MODE}' ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt | 110 | sed -i '/#sdtv_mode=/ c\sdtv_mode=${SDTV_MODE}' $CONFIG |
110 | fi | 111 | fi |
111 | if [ -n "${SDTV_ASPECT}" ]; then | 112 | if [ -n "${SDTV_ASPECT}" ]; then |
112 | sed -i '/#sdtv_aspect=/ c\sdtv_aspect=${SDTV_ASPECT}' ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt | 113 | sed -i '/#sdtv_aspect=/ c\sdtv_aspect=${SDTV_ASPECT}' $CONFIG |
113 | fi | 114 | fi |
114 | if [ -n "${DISPLAY_ROTATE}" ]; then | 115 | if [ -n "${DISPLAY_ROTATE}" ]; then |
115 | sed -i '/#display_rotate=/ c\display_rotate=${DISPLAY_ROTATE}' ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt | 116 | sed -i '/#display_rotate=/ c\display_rotate=${DISPLAY_ROTATE}' $CONFIG |
116 | fi | 117 | fi |
117 | 118 | ||
118 | # Video camera support | 119 | # Video camera support |
@@ -121,126 +122,126 @@ do_deploy() { | |||
121 | # of the file. The underlying cause is unknown, but it can be related with a file size limitation affecting | 122 | # of the file. The underlying cause is unknown, but it can be related with a file size limitation affecting |
122 | # this variable. Therefore, "start_x=1" has been set to replace the original occurrence in config.txt, | 123 | # this variable. Therefore, "start_x=1" has been set to replace the original occurrence in config.txt, |
123 | # which is at the middle of the file. | 124 | # which is at the middle of the file. |
124 | sed -i '/#start_x=/ c\start_x=1' ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt | 125 | sed -i '/#start_x=/ c\start_x=1' $CONFIG |
125 | fi | 126 | fi |
126 | 127 | ||
127 | # Offline compositing support | 128 | # Offline compositing support |
128 | if [ "${DISPMANX_OFFLINE}" = "1" ]; then | 129 | if [ "${DISPMANX_OFFLINE}" = "1" ]; then |
129 | echo "# Enable offline compositing" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt | 130 | echo "# Enable offline compositing" >>$CONFIG |
130 | echo "dispmanx_offline=1" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt | 131 | echo "dispmanx_offline=1" >>$CONFIG |
131 | fi | 132 | fi |
132 | 133 | ||
133 | # SPI bus support | 134 | # SPI bus support |
134 | if [ "${ENABLE_SPI_BUS}" = "1" ] || [ "${PITFT}" = "1" ]; then | 135 | if [ "${ENABLE_SPI_BUS}" = "1" ] || [ "${PITFT}" = "1" ]; then |
135 | echo "# Enable SPI bus" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt | 136 | echo "# Enable SPI bus" >>$CONFIG |
136 | echo "dtparam=spi=on" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt | 137 | echo "dtparam=spi=on" >>$CONFIG |
137 | fi | 138 | fi |
138 | 139 | ||
139 | # I2C support | 140 | # I2C support |
140 | if [ "${ENABLE_I2C}" = "1" ] || [ "${PITFT}" = "1" ]; then | 141 | if [ "${ENABLE_I2C}" = "1" ] || [ "${PITFT}" = "1" ]; then |
141 | echo "# Enable I2C" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt | 142 | echo "# Enable I2C" >>$CONFIG |
142 | echo "dtparam=i2c1=on" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt | 143 | echo "dtparam=i2c1=on" >>$CONFIG |
143 | echo "dtparam=i2c_arm=on" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt | 144 | echo "dtparam=i2c_arm=on" >>$CONFIG |
144 | fi | 145 | fi |
145 | 146 | ||
146 | # PiTFT22 display support | 147 | # PiTFT22 display support |
147 | if [ "${PITFT22}" = "1" ]; then | 148 | if [ "${PITFT22}" = "1" ]; then |
148 | echo "# Enable PITFT22 display" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt | 149 | echo "# Enable PITFT22 display" >>$CONFIG |
149 | echo "dtoverlay=pitft22,rotate=270,speed=32000000,txbuflen=32768" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt | 150 | echo "dtoverlay=pitft22,rotate=270,speed=32000000,txbuflen=32768" >>$CONFIG |
150 | fi | 151 | fi |
151 | if [ "${PITFT28r}" = "1" ]; then | 152 | if [ "${PITFT28r}" = "1" ]; then |
152 | echo "# Enable PITFT28r display" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt | 153 | echo "# Enable PITFT28r display" >>$CONFIG |
153 | echo "dtoverlay=pitft28-resistive,rotate=90,speed=32000000,txbuflen=32768" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt | 154 | echo "dtoverlay=pitft28-resistive,rotate=90,speed=32000000,txbuflen=32768" >>$CONFIG |
154 | fi | 155 | fi |
155 | if [ "${PITFT28c}" = "1" ]; then | 156 | if [ "${PITFT28c}" = "1" ]; then |
156 | echo "# Enable PITFT28c display" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt | 157 | echo "# Enable PITFT28c display" >>$CONFIG |
157 | echo "dtoverlay=pitft28-capacitive,rotate=90,speed=32000000,txbuflen=32768" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt | 158 | echo "dtoverlay=pitft28-capacitive,rotate=90,speed=32000000,txbuflen=32768" >>$CONFIG |
158 | echo "dtoverlay=pitft28-capacitive,touch-swapxy,touch-invx" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt | 159 | echo "dtoverlay=pitft28-capacitive,touch-swapxy,touch-invx" >>$CONFIG |
159 | fi | 160 | fi |
160 | if [ "${PITFT35r}" = "1" ]; then | 161 | if [ "${PITFT35r}" = "1" ]; then |
161 | echo "# Enable PITFT35r display" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt | 162 | echo "# Enable PITFT35r display" >>$CONFIG |
162 | echo "dtoverlay=pitft35-resistive,rotate=90,speed=42000000,fps=20" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt | 163 | echo "dtoverlay=pitft35-resistive,rotate=90,speed=42000000,fps=20" >>$CONFIG |
163 | fi | 164 | fi |
164 | 165 | ||
165 | # UART support | 166 | # UART support |
166 | if [ "${ENABLE_UART}" = "1" ]; then | 167 | if [ "${ENABLE_UART}" = "1" ]; then |
167 | echo "# Enable UART" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt | 168 | echo "# Enable UART" >>$CONFIG |
168 | echo "enable_uart=1" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt | 169 | echo "enable_uart=1" >>$CONFIG |
169 | fi | 170 | fi |
170 | 171 | ||
171 | # Infrared support | 172 | # Infrared support |
172 | if [ "${ENABLE_IR}" = "1" ]; then | 173 | if [ "${ENABLE_IR}" = "1" ]; then |
173 | echo "# Enable infrared" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt | 174 | echo "# Enable infrared" >>$CONFIG |
174 | echo "dtoverlay=gpio-ir,gpio_pin=${GPIO_IR}" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt | 175 | echo "dtoverlay=gpio-ir,gpio_pin=${GPIO_IR}" >>$CONFIG |
175 | echo "dtoverlay=gpio-ir-tx,gpio_pin=${GPIO_IR_TX}" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt | 176 | echo "dtoverlay=gpio-ir-tx,gpio_pin=${GPIO_IR_TX}" >>$CONFIG |
176 | fi | 177 | fi |
177 | 178 | ||
178 | # VC4 Graphics support | 179 | # VC4 Graphics support |
179 | if [ "${VC4GRAPHICS}" = "1" ]; then | 180 | if [ "${VC4GRAPHICS}" = "1" ]; then |
180 | echo "# Enable VC4 Graphics" >> ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt | 181 | echo "# Enable VC4 Graphics" >> $CONFIG |
181 | echo "dtoverlay=${VC4DTBO}" >> ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt | 182 | echo "dtoverlay=${VC4DTBO}" >> $CONFIG |
182 | fi | 183 | fi |
183 | 184 | ||
184 | # Choose Camera Sensor to be used, default imx219 sensor | 185 | # Choose Camera Sensor to be used, default imx219 sensor |
185 | if [ "${RASPBERRYPI_CAMERA_V2}" = "1" ]; then | 186 | if [ "${RASPBERRYPI_CAMERA_V2}" = "1" ]; then |
186 | echo "# Enable Sony RaspberryPi Camera" >> ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt | 187 | echo "# Enable Sony RaspberryPi Camera" >> $CONFIG |
187 | echo "dtoverlay=imx219" >> ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt | 188 | echo "dtoverlay=imx219" >> $CONFIG |
188 | fi | 189 | fi |
189 | 190 | ||
190 | # Waveshare "C" 1024x600 7" Rev2.1 IPS capacitive touch (http://www.waveshare.com/7inch-HDMI-LCD-C.htm) | 191 | # Waveshare "C" 1024x600 7" Rev2.1 IPS capacitive touch (http://www.waveshare.com/7inch-HDMI-LCD-C.htm) |
191 | if [ "${WAVESHARE_1024X600_C_2_1}" = "1" ]; then | 192 | if [ "${WAVESHARE_1024X600_C_2_1}" = "1" ]; then |
192 | echo "# Waveshare \"C\" 1024x600 7\" Rev2.1 IPS capacitive touch screen" >> ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt | 193 | echo "# Waveshare \"C\" 1024x600 7\" Rev2.1 IPS capacitive touch screen" >> $CONFIG |
193 | echo "max_usb_current=1" >> ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt | 194 | echo "max_usb_current=1" >> $CONFIG |
194 | echo "hdmi_group=2" >> ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt | 195 | echo "hdmi_group=2" >> $CONFIG |
195 | echo "hdmi_mode=87" >> ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt | 196 | echo "hdmi_mode=87" >> $CONFIG |
196 | echo "hdmi_cvt 1024 600 60 6 0 0 0" >> ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt | 197 | echo "hdmi_cvt 1024 600 60 6 0 0 0" >> $CONFIG |
197 | echo "hdmi_drive=1" >> ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt | 198 | echo "hdmi_drive=1" >> $CONFIG |
198 | fi | 199 | fi |
199 | 200 | ||
200 | # DWC2 USB peripheral support | 201 | # DWC2 USB peripheral support |
201 | if [ "${ENABLE_DWC2_PERIPHERAL}" = "1" ]; then | 202 | if [ "${ENABLE_DWC2_PERIPHERAL}" = "1" ]; then |
202 | echo "# Enable USB peripheral mode" >> ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt | 203 | echo "# Enable USB peripheral mode" >> $CONFIG |
203 | echo "dtoverlay=dwc2,dr_mode=peripheral" >> ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt | 204 | echo "dtoverlay=dwc2,dr_mode=peripheral" >> $CONFIG |
204 | fi | 205 | fi |
205 | 206 | ||
206 | # AT86RF23X support | 207 | # AT86RF23X support |
207 | if [ "${ENABLE_AT86RF}" = "1" ]; then | 208 | if [ "${ENABLE_AT86RF}" = "1" ]; then |
208 | echo "# Enable AT86RF23X" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt | 209 | echo "# Enable AT86RF23X" >>$CONFIG |
209 | echo "dtoverlay=at86rf233,speed=3000000" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt | 210 | echo "dtoverlay=at86rf233,speed=3000000" >>$CONFIG |
210 | fi | 211 | fi |
211 | 212 | ||
212 | # ENABLE DUAL CAN | 213 | # ENABLE DUAL CAN |
213 | if [ "${ENABLE_DUAL_CAN}" = "1" ]; then | 214 | if [ "${ENABLE_DUAL_CAN}" = "1" ]; then |
214 | echo "# Enable DUAL CAN" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt | 215 | echo "# Enable DUAL CAN" >>$CONFIG |
215 | echo "dtoverlay=mcp2515-can0,oscillator=${CAN_OSCILLATOR},interrupt=25" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt | 216 | echo "dtoverlay=mcp2515-can0,oscillator=${CAN_OSCILLATOR},interrupt=25" >>$CONFIG |
216 | echo "dtoverlay=mcp2515-can1,oscillator=${CAN_OSCILLATOR},interrupt=24" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt | 217 | echo "dtoverlay=mcp2515-can1,oscillator=${CAN_OSCILLATOR},interrupt=24" >>$CONFIG |
217 | # ENABLE CAN | 218 | # ENABLE CAN |
218 | elif [ "${ENABLE_CAN}" = "1" ]; then | 219 | elif [ "${ENABLE_CAN}" = "1" ]; then |
219 | echo "# Enable CAN" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt | 220 | echo "# Enable CAN" >>$CONFIG |
220 | echo "dtoverlay=mcp2515-can0,oscillator=${CAN_OSCILLATOR},interrupt=25" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt | 221 | echo "dtoverlay=mcp2515-can0,oscillator=${CAN_OSCILLATOR},interrupt=25" >>$CONFIG |
221 | fi | 222 | fi |
222 | 223 | ||
223 | # Append extra config if the user has provided any | 224 | # Append extra config if the user has provided any |
224 | printf "${RPI_EXTRA_CONFIG}\n" >> ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt | 225 | printf "${RPI_EXTRA_CONFIG}\n" >> $CONFIG |
225 | 226 | ||
226 | # Handle setup with armstub file | 227 | # Handle setup with armstub file |
227 | if [ "${@bb.utils.contains("MACHINE_FEATURES", "armstub", "1", "0", d)}" = "1" ]; then | 228 | if [ "${@bb.utils.contains("MACHINE_FEATURES", "armstub", "1", "0", d)}" = "1" ]; then |
228 | echo "\n# ARM stub configuration" >> ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt | 229 | echo "\n# ARM stub configuration" >> $CONFIG |
229 | echo "armstub=${ARMSTUB}" >> ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt | 230 | echo "armstub=${ARMSTUB}" >> $CONFIG |
230 | case "${ARMSTUB}" in | 231 | case "${ARMSTUB}" in |
231 | *-gic.bin) | 232 | *-gic.bin) |
232 | echo "enable_gic=1" >> ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt | 233 | echo "enable_gic=1" >> $CONFIG |
233 | ;; | 234 | ;; |
234 | esac | 235 | esac |
235 | fi | 236 | fi |
236 | } | 237 | } |
237 | 238 | ||
238 | do_deploy_append_raspberrypi3-64() { | 239 | do_deploy_append_raspberrypi3-64() { |
239 | echo "# have a properly sized image" >> ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt | 240 | echo "# have a properly sized image" >> $CONFIG |
240 | echo "disable_overscan=1" >> ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt | 241 | echo "disable_overscan=1" >> $CONFIG |
241 | 242 | ||
242 | echo "# Enable audio (loads snd_bcm2835)" >> ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt | 243 | echo "# Enable audio (loads snd_bcm2835)" >> $CONFIG |
243 | echo "dtparam=audio=on" >> ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt | 244 | echo "dtparam=audio=on" >> $CONFIG |
244 | } | 245 | } |
245 | 246 | ||
246 | addtask deploy before do_build after do_install | 247 | addtask deploy before do_build after do_install |