Thanks Igor.
A lot of useful info on those two pages. However, still not sure I have a simple and non-contradictory set of instructions for building and including the PCIe Root Complex into a kernel and image.
In the Reference manual section 42.2.2 it says:
Root Complex is not supported by the default kernel configurations on i.MX 6 boards.
To set the default configuration, execute the following command as follows:
make CROSS_COMPILE=arm-none-linux-gnueabi-ARCH=arm imx_v7_defconfig
Configure the Root Complex to be built in:
#
# Bus support
#
CONFIG_PCI=y
CONFIG_PCI_DOMAINS=y
CONFIG_PCI_SYSCALL=y
#
# PCI host controller drivers
#
CONFIG_PCIE_DW=y
CONFIG_PCI_IMX6=y
NOTE
PCI Express support can't be built as a module.
But, the first link you pointed me to (https://community.freescale.com/docs/DOC-95014) refers to:
CONFIG_IMX_PCIE=y
# CONFIG_IMX_PCIE_EP_MODE_IN_EP_RC_SYS is not set
CONFIG_IMX_PCIE_RC_MODE_IN_EP_RC_SYS=y
However, this link also only talks about iMXSQ, where as I am using a iMX6 SoloX.
Either I need to do something to build the driver first, or I don't and I just need to add these lines to a bitbake recipe. And then which recipe? Do I need another recipe for a kernel, or can I just add the necessary lines to my custom image recipe?