diff options
Diffstat (limited to 'docs/extra-build-config.md')
| -rw-r--r-- | docs/extra-build-config.md | 180 |
1 files changed, 180 insertions, 0 deletions
diff --git a/docs/extra-build-config.md b/docs/extra-build-config.md new file mode 100644 index 0000000..365c490 --- /dev/null +++ b/docs/extra-build-config.md | |||
| @@ -0,0 +1,180 @@ | |||
| 1 | # Optional build configuration | ||
| 2 | |||
| 3 | There are a set of ways in which a user can influence different paramenters of | ||
| 4 | the build. We list here the ones that are closely related to this BSP or | ||
| 5 | specific to it. For the rest please check: | ||
| 6 | <http://www.yoctoproject.org/docs/latest/ref-manual/ref-manual.html> | ||
| 7 | |||
| 8 | ## Compressed deployed files | ||
| 9 | |||
| 10 | 1. Overwrite IMAGE_FSTYPES in local.conf | ||
| 11 | * `IMAGE_FSTYPES = "tar.bz2 ext3.xz"` | ||
| 12 | |||
| 13 | 2. Overwrite SDIMG_ROOTFS_TYPE in local.conf | ||
| 14 | * `SDIMG_ROOTFS_TYPE = "ext3.xz"` | ||
| 15 | |||
| 16 | 3. Overwrite SDIMG_COMPRESSION in local.conf | ||
| 17 | * `SDIMG_COMPRESSION = "xz"` | ||
| 18 | |||
| 19 | Accommodate the values above to your own needs (ex: ext3 / ext4). | ||
| 20 | |||
| 21 | ## GPU memory | ||
| 22 | |||
| 23 | * `GPU_MEM`: GPU memory in megabyte. Sets the memory split between the ARM and | ||
| 24 | GPU. ARM gets the remaining memory. Min 16. Default 64. | ||
| 25 | |||
| 26 | * `GPU_MEM_256`: GPU memory in megabyte for the 256MB Raspberry Pi. Ignored by | ||
| 27 | the 512MB RP. Overrides gpu_mem. Max 192. Default not set. | ||
| 28 | |||
| 29 | * `GPU_MEM_512`: GPU memory in megabyte for the 512MB Raspberry Pi. Ignored by | ||
| 30 | the 256MB RP. Overrides gpu_mem. Max 448. Default not set. | ||
| 31 | |||
| 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. | ||
| 34 | |||
| 35 | ## Add purchased license codecs | ||
| 36 | |||
| 37 | To add you own licenses use variables `KEY_DECODE_MPG2` and `KEY_DECODE_WVC1` in | ||
| 38 | local.conf. Example: | ||
| 39 | |||
| 40 | KEY_DECODE_MPG2 = "12345678" | ||
| 41 | KEY_DECODE_WVC1 = "12345678" | ||
| 42 | |||
| 43 | You can supply more licenses separated by comma. Example: | ||
| 44 | |||
| 45 | KEY_DECODE_WVC1 = "0x12345678,0xabcdabcd,0x87654321" | ||
| 46 | |||
| 47 | |||
| 48 | ## Disable overscan | ||
| 49 | |||
| 50 | By default the GPU adds a black border around the video output to compensate for | ||
| 51 | TVs which cut off part of the image. To disable this set this variable in | ||
| 52 | local.conf: | ||
| 53 | |||
| 54 | DISABLE_OVERSCAN = "1" | ||
| 55 | |||
| 56 | ## Set overclocking options | ||
| 57 | |||
| 58 | 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 | ||
| 60 | the config.txt for a detailed description of options and modes. Example turbo | ||
| 61 | mode: | ||
| 62 | |||
| 63 | ARM_FREQ = "1000" | ||
| 64 | CORE_FREQ = "500" | ||
| 65 | SDRAM_FREQ = "500" | ||
| 66 | OVER_VOLTAGE = "6" | ||
| 67 | |||
| 68 | ## Video camera support with V4L2 drivers | ||
| 69 | |||
| 70 | Set this variable to enable support for the video camera (Linux 3.12.4+ | ||
| 71 | required): | ||
| 72 | |||
| 73 | VIDEO_CAMERA = "1" | ||
| 74 | |||
| 75 | ## Enable offline compositing support | ||
| 76 | |||
| 77 | Set this variable to enable support for dispmanx offline compositing: | ||
| 78 | |||
| 79 | DISPMANX_OFFLINE = "1" | ||
| 80 | |||
| 81 | This will enable the firmware to fall back to off-line compositing of Dispmanx | ||
| 82 | elements. Normally the compositing is done on-line, during scanout, but cannot | ||
| 83 | handle too many elements. With off-line enabled, an off-screen buffer is | ||
| 84 | allocated for compositing. When scene complexity (number and sizes | ||
| 85 | of elements) is high, compositing will happen off-line into the buffer. | ||
| 86 | |||
| 87 | Heavily recommended for Wayland/Weston. | ||
| 88 | |||
| 89 | See: <http://wayland.freedesktop.org/raspberrypi.html> | ||
| 90 | |||
| 91 | ## Enable kgdb over console support | ||
| 92 | |||
| 93 | To add the kdbg over console (kgdboc) parameter to the kernel command line, set | ||
| 94 | this variable in local.conf: | ||
| 95 | |||
| 96 | ENABLE_KGDB = "1" | ||
| 97 | |||
| 98 | ## Boot to U-Boot | ||
| 99 | |||
| 100 | To have u-boot load kernel image, set in your local.conf: | ||
| 101 | |||
| 102 | KERNEL_IMAGETYPE = "uImage" | ||
| 103 | |||
| 104 | This will make kernel.img be u-boot image which will load uImage. By default, | ||
| 105 | kernel.img is the actual kernel image (ex. Image). | ||
| 106 | |||
| 107 | ## Image with Initramfs | ||
| 108 | |||
| 109 | To build an initramfs image: | ||
| 110 | |||
| 111 | * Set this 3 kernel variables (in linux-raspberrypi.inc for example) | ||
| 112 | - kernel_configure_variable BLK_DEV_INITRD y | ||
| 113 | - kernel_configure_variable INITRAMFS_SOURCE "" | ||
| 114 | - kernel_configure_variable RD_GZIP y | ||
| 115 | |||
| 116 | * Set the yocto variables (in linux-raspberrypi.inc for example) | ||
| 117 | - `INITRAMFS_IMAGE = "<a name for your initramfs image>"` | ||
| 118 | - `INITRAMFS_IMAGE_BUNDLE = "1"` | ||
| 119 | |||
| 120 | * Set the meta-rasberrypi variable (in raspberrypi.conf for example) | ||
| 121 | - `KERNEL_INITRAMFS = "-initramfs"` | ||
| 122 | |||
| 123 | ## Enable SPI bus | ||
| 124 | |||
| 125 | When using device tree kernels, set this variable to enable the SPI bus: | ||
| 126 | |||
| 127 | ENABLE_SPI_BUS = "1" | ||
| 128 | |||
| 129 | ## Enable I2C | ||
| 130 | |||
| 131 | When using device tree kernels, set this variable to enable I2C: | ||
| 132 | |||
| 133 | ENABLE_I2C = "1" | ||
| 134 | |||
| 135 | ## Enable PiTFT support | ||
| 136 | |||
| 137 | Basic support for using PiTFT screens can be enabled by adding below in | ||
| 138 | local.conf: | ||
| 139 | |||
| 140 | * `MACHINE_FEATURES += "pitft"` | ||
| 141 | - This will enable SPI bus and i2c device-trees, it will also setup | ||
| 142 | framebuffer for console and x server on PiTFT. | ||
| 143 | |||
| 144 | NOTE: To get this working the overlay for the PiTFT model must be build, added | ||
| 145 | and specified as well (dtoverlay=<driver> in config.txt). | ||
| 146 | |||
| 147 | Below is a list of currently supported PiTFT models in meta-raspberrypi, the | ||
| 148 | modelname should be added as a MACHINE_FEATURES in local.conf like below: | ||
| 149 | |||
| 150 | MACHINE_FEATURES += "pitft <modelname>" | ||
| 151 | |||
| 152 | List of currently supported models: | ||
| 153 | * pitft22 | ||
| 154 | * pitft28r | ||
| 155 | * pitft35r | ||
| 156 | |||
| 157 | ## Misc. display | ||
| 158 | |||
| 159 | If you would like to use the Waveshare "C" 1024×600, 7 inch Capacitive Touch | ||
| 160 | Screen LCD, HDMI interface (<http://www.waveshare.com/7inch-HDMI-LCD-C.htm>) Rev | ||
| 161 | 2.1, please set the following in your local.conf: | ||
| 162 | |||
| 163 | WAVESHARE_1024X600_C_2_1 = "1" | ||
| 164 | |||
| 165 | ## Enable UART | ||
| 166 | |||
| 167 | RaspberryPi 0, 1, 2 and CM will have UART console enabled by default. | ||
| 168 | |||
| 169 | RaspberryPi 0 WiFi and 3 does not have the UART enabled by default because this | ||
| 170 | needs a fixed core frequency and enable_uart wil set it to the minimum. Certain | ||
| 171 | operations - 60fps h264 decode, high quality deinterlace - which aren't | ||
| 172 | performed on the ARM may be affected, and we wouldn't want to do that to users | ||
| 173 | who don't want to use the serial port. Users who want serial console support on | ||
| 174 | RaspberryPi3 will have to explicitely set in local.conf: | ||
| 175 | |||
| 176 | ENABLE_UART = "1" | ||
| 177 | |||
| 178 | Ref.: | ||
| 179 | * <https://github.com/raspberrypi/firmware/issues/553> | ||
| 180 | * <https://github.com/RPi-Distro/repo/issues/22> | ||
