diff options
| author | Paul Barker <pbarker@toganlabs.com> | 2017-05-23 10:26:05 +0100 |
|---|---|---|
| committer | Andrei Gherzan <andrei@gherzan.com> | 2017-05-26 12:16:52 +0100 |
| commit | 03976f7ff12885d1205effe526c83b10ed4252fe (patch) | |
| tree | 461c9904c83f102fb27096b5718b57aedb9311dd /docs/extra-build-config.md | |
| parent | 4f2dd0f0e8d09afcb08c5ec57f20c763814596df (diff) | |
| download | meta-raspberrypi-03976f7ff12885d1205effe526c83b10ed4252fe.tar.gz | |
docs: Initial split of README into docs directory
The top-level README document has got pretty unwieldy and so we need to
switch to add some more structure to our documentation. The first step
is to split out sub-sections of the README document into separate files
in a new 'docs' directory.
Whilst splitting up the README, we can also take the opportunity to tidy
things up and fix a couple of typos.
Signed-off-by: Paul Barker <pbarker@toganlabs.com>
Diffstat (limited to 'docs/extra-build-config.md')
| -rw-r--r-- | docs/extra-build-config.md | 183 |
1 files changed, 183 insertions, 0 deletions
diff --git a/docs/extra-build-config.md b/docs/extra-build-config.md new file mode 100644 index 0000000..ed0261e --- /dev/null +++ b/docs/extra-build-config.md | |||
| @@ -0,0 +1,183 @@ | |||
| 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 | | Variable | Details | | ||
| 24 | |----------------|---------------------------------------------------------------------| | ||
| 25 | | `GPU_MEM` | GPU memory in megabyte. Sets the memory split between the ARM and | | ||
| 26 | | | GPU. ARM gets the remaining memory. Min 16. Default 64. | | ||
| 27 | | `GPU_MEM_256` | GPU memory in megabyte for the 256MB Raspberry Pi. Ignored by the | | ||
| 28 | | | 512MB RP. Overrides gpu_mem. Max 192. Default not set. | | ||
| 29 | | `GPU_MEM_512` | GPU memory in megabyte for the 512MB Raspberry Pi. Ignored by the | | ||
| 30 | | | 256MB RP. Overrides gpu_mem. Max 448. Default not set. | | ||
| 31 | | `GPU_MEM_1024` | GPU memory in megabyte for the 1024MB Raspberry Pi. Ignored by the | | ||
| 32 | | | 256MB/512MB RP. Overrides gpu_mem. Max 944. Default not set. | | ||
| 33 | |||
| 34 | ## Add purchased license codecs | ||
| 35 | |||
| 36 | To add you own licenses use variables `KEY_DECODE_MPG2` and `KEY_DECODE_WVC1` in | ||
| 37 | local.conf. Example: | ||
| 38 | ``` | ||
| 39 | KEY_DECODE_MPG2 = "12345678" | ||
| 40 | KEY_DECODE_WVC1 = "12345678" | ||
| 41 | ``` | ||
| 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 | `DISABLE_OVERSCAN = "1"` | ||
| 54 | |||
| 55 | ## Set overclocking options | ||
| 56 | |||
| 57 | The Raspberry PI can be overclocked. As of now overclocking up to the "Turbo | ||
| 58 | Mode" is officially supported by the raspbery and does not void warranty. Check | ||
| 59 | the config.txt for a detailed description of options and modes. Example turbo | ||
| 60 | mode: | ||
| 61 | ``` | ||
| 62 | ARM_FREQ = "1000" | ||
| 63 | CORE_FREQ = "500" | ||
| 64 | SDRAM_FREQ = "500" | ||
| 65 | OVER_VOLTAGE = "6" | ||
| 66 | ``` | ||
| 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 | `VIDEO_CAMERA = "1"` | ||
| 73 | |||
| 74 | ## Enable offline compositing support | ||
| 75 | |||
| 76 | Set this variable to enable support for dispmanx offline compositing: | ||
| 77 | `DISPMANX_OFFLINE = "1"` | ||
| 78 | |||
| 79 | This will enable the firmware to fall back to off-line compositing of Dispmanx | ||
| 80 | elements. Normally the compositing is done on-line, during scanout, but cannot | ||
| 81 | handle too many elements. With off-line enabled, an off-screen buffer is | ||
| 82 | allocated for compositing. When scene complexity (number and sizes | ||
| 83 | of elements) is high, compositing will happen off-line into the buffer. | ||
| 84 | |||
| 85 | Heavily recommended for Wayland/Weston. | ||
| 86 | |||
| 87 | See: <http://wayland.freedesktop.org/raspberrypi.html> | ||
| 88 | |||
| 89 | ## Enable kgdb over console support | ||
| 90 | |||
| 91 | To add the kdbg over console (kgdboc) parameter to the kernel command line, set | ||
| 92 | this variable in local.conf: | ||
| 93 | `ENABLE_KGDB = "1"` | ||
| 94 | |||
| 95 | ## Boot to U-Boot | ||
| 96 | |||
| 97 | To have u-boot load kernel image, set in your local.conf: | ||
| 98 | `KERNEL_IMAGETYPE = "uImage"` | ||
| 99 | |||
| 100 | This will make kernel.img be u-boot image which will load uImage. By default, | ||
| 101 | kernel.img is the actual kernel image (ex. Image). | ||
| 102 | |||
| 103 | ## Image with Initramfs | ||
| 104 | |||
| 105 | To build an initramfs image: | ||
| 106 | |||
| 107 | * Set this 3 kernel variables (in linux-raspberrypi.inc for example) | ||
| 108 | - kernel_configure_variable BLK_DEV_INITRD y | ||
| 109 | - kernel_configure_variable INITRAMFS_SOURCE "" | ||
| 110 | - kernel_configure_variable RD_GZIP y | ||
| 111 | |||
| 112 | * Set the yocto variables (in linux-raspberrypi.inc for example) | ||
| 113 | - `INITRAMFS_IMAGE = "<a name for your initramfs image>"` | ||
| 114 | - `INITRAMFS_IMAGE_BUNDLE = "1"` | ||
| 115 | |||
| 116 | * Set the meta-rasberrypi variable (in raspberrypi.conf for example) | ||
| 117 | - `KERNEL_INITRAMFS = "-initramfs"` | ||
| 118 | |||
| 119 | ## Device tree support | ||
| 120 | |||
| 121 | Device tree for RPi is only supported when using linux-raspberrypi 3.18+ | ||
| 122 | kernels. | ||
| 123 | |||
| 124 | * Set `KERNEL_DEVICETREE` (in conf/machine/raspberrypi.conf) | ||
| 125 | - the trailer is added to the kernel image before kernel install task. While | ||
| 126 | creating the SDCard image, this modified kernel is put on boot partition (as | ||
| 127 | kernel.img) as well as DeviceTree blobs (.dtb files). | ||
| 128 | |||
| 129 | NOTE: `KERNEL_DEVICETREE` is default enabled for kernel >= 3.18 and always | ||
| 130 | disabled for older kernel versions. | ||
| 131 | |||
| 132 | ## Enable SPI bus | ||
| 133 | |||
| 134 | When using device tree kernels, set this variable to enable the SPI bus: | ||
| 135 | `ENABLE_SPI_BUS = "1"` | ||
| 136 | |||
| 137 | ## Enable I2C | ||
| 138 | |||
| 139 | When using device tree kernels, set this variable to enable I2C: | ||
| 140 | `ENABLE_I2C = "1"` | ||
| 141 | |||
| 142 | ## Enable PiTFT support | ||
| 143 | |||
| 144 | Basic support for using PiTFT screens can be enabled by adding below in | ||
| 145 | local.conf: | ||
| 146 | |||
| 147 | * `MACHINE_FEATURES += "pitft"` | ||
| 148 | - This will enable SPI bus and i2c device-trees, it will also setup | ||
| 149 | framebuffer for console and x server on PiTFT. | ||
| 150 | |||
| 151 | NOTE: To get this working the overlay for the PiTFT model must be build, added | ||
| 152 | and specified as well (dtoverlay=<driver> in config.txt). | ||
| 153 | |||
| 154 | Below is a list of currently supported PiTFT models in meta-raspberrypi, the | ||
| 155 | modelname should be added as a MACHINE_FEATURES in local.conf like below: | ||
| 156 | `MACHINE_FEATURES += "pitft <modelname>"` | ||
| 157 | |||
| 158 | List of currently supported models: | ||
| 159 | * pitft22 | ||
| 160 | * pitft28r | ||
| 161 | * pitft35r | ||
| 162 | |||
| 163 | ## Misc. display | ||
| 164 | |||
| 165 | If you would like to use the Waveshare "C" 1024×600, 7 inch Capacitive Touch | ||
| 166 | Screen LCD, HDMI interface (<http://www.waveshare.com/7inch-HDMI-LCD-C.htm>) Rev | ||
| 167 | 2.1, please set the following in your local.conf: | ||
| 168 | `WAVESHARE_1024X600_C_2_1 = "1"` | ||
| 169 | |||
| 170 | ## Enable UART | ||
| 171 | |||
| 172 | RaspberryPi 0, 1, 2 and CM will have UART console enabled by default. | ||
| 173 | |||
| 174 | RaspberryPi 0 WiFi and 3 does not have the UART enabled by default because this | ||
| 175 | needs a fixed core frequency and enable_uart wil set it to the minimum. Certain | ||
| 176 | operations - 60fps h264 decode, high quality deinterlace - which aren't | ||
| 177 | performed on the ARM may be affected, and we wouldn't want to do that to users | ||
| 178 | who don't want to use the serial port. Users who want serial console support on | ||
| 179 | RaspberryPi3 will have to explicitely set in local.conf: `ENABLE_UART = "1"`. | ||
| 180 | |||
| 181 | Ref.: | ||
| 182 | * <https://github.com/raspberrypi/firmware/issues/553> | ||
| 183 | * <https://github.com/RPi-Distro/repo/issues/22> | ||
