rpi-config: Set max_framebuffers to 2 to support dual display
[AGL/meta-agl.git] / meta-agl-bsp / meta-raspberrypi / recipes-bsp / bootfiles / rpi-config_git.bbappend
1 DISABLE_OVERSCAN = "1"
2
3 do_deploy_append_raspberrypi4() {
4     # ENABLE CAN
5     if [ "${ENABLE_CAN}" = "1" ]; then
6         echo "# Enable CAN" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
7         echo "dtoverlay=mcp2515-can0,oscillator=16000000,interrupt=25" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
8     fi
9
10     # Handle setup with armstub file
11     if [ -n "${ARMSTUB}" ]; then
12         echo "\n# ARM stub configuration" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
13         echo "armstub=${ARMSTUB}" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
14         case "${ARMSTUB}" in
15             *-gic.bin)
16                 echo  "enable_gic=1" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
17                 ;;
18         esac
19     fi
20 }
21
22 do_deploy_append() {
23     if [ "${ENABLE_CMA}" = "1" ] && [ -n "${CMA_LWM}" ]; then
24         sed -i '/#cma_lwm/ c\cma_lwm=${CMA_LWM}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
25     fi
26
27     if [ "${ENABLE_CMA}" = "1" ] && [ -n "${CMA_HWM}" ]; then
28         sed -i '/#cma_hwm/ c\cma_hwm=${CMA_HWM}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
29     fi
30
31     echo "avoid_warnings=2" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
32     echo "mask_gpu_interrupt0=0x400" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
33     echo "dtoverlay=vc4-kms-v3d-overlay,cma-256" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
34     echo "dtoverlay=rpi-ft5406-overlay" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
35     echo "dtparam=audio=on" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
36 }
37
38 do_deploy_append_raspberrypi4() {
39     echo -e "\n[pi4]" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
40     echo "max_framebuffers=2" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
41 }
42
43 do_deploy_append_sota() {
44     echo "device_tree_address=0x0c800000" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
45 }
46
47 ENABLE_UART_raspberrypi3 = "1"
48 ENABLE_UART_raspberrypi4 = "1"