aboutsummaryrefslogtreecommitdiffstats
path: root/README
blob: ca641fbd7613a7cce7ac6cc17f76ac4bfd6b9039 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
meta-xilinx
===========

This layer provides Official support for Xilinx MicroBlaze and Zynq architectures
as well as evaluation boards.

Supported Boards/Machines
=========================

Boards Supported by this layer and sub-layers:
	* Xilinx KC705 Embedded TRD (MicroBlaze)
	* Xilinx ZC702 (Zynq)
	* Avnet/Digilent ZedBoard (Zynq)

Patches
=======

Please submit any patches for this layer to: meta-xilinx@lists.yoctoproject.org.

Please see the MAINTAINERS file for more details.

Dependencies
============

This layer depends on:

	URI: git://git.openembedded.org/bitbake

	URI: git://git.openembedded.org/openembedded-core
	layers: meta

	(for external toolchains only)
	URI: git://github.com/MentorEmbedded/meta-sourcery.git
	layers: meta-sourcery

This repository also contains sub-layers which depend on this layer.

Sub-Layers
==========

This repository contains the meta-xilinx layer as well as additional board
specific layers. Each of these board specific layers provide additional
configuration for the associated board. Please refer to the associated README
in each sub-layer for more details.

Note: sub-layers have no dependency between each other, all sub-layers can be
used at the same time without conflicts.

Build Instructions
==================

The following instructions require a Poky installation (or equivalent).

Initialize a build using the 'oe-init-build-env' script in Poky. Once
initialized configure bblayers.conf by adding the 'meta-xilinx' layer as
well as any or all of the sub-layers of this repository, e.g.:

	meta-xilinx \
	meta-xilinx/meta-kc705 \
	meta-xilinx/meta-zc702 \
	meta-xilinx/meta-zedboard \

To build a specific target BSP configure the associated machine in local.conf:
(See associated sub-layers for available machines and additional details)

	MACHINE ?= "zc702"

Note: Currently MicroBlaze targets only support being built with an External
toolchain, please see the section below 'Configuring External Toolchain'.

Build the target file system image using bitbake:

	$ bitbake core-image-minimal

Build additional targets include Linux and U-Boot:

	$ bitbake linux-xlnx u-boot-xlnx

Once complete the images for the target machine will be available in the output
directory 'tmp/deploy/images'.

Images generated:
	* core-image-minimal-<machine name>.cpio (rootfs in CPIO format)
	* core-image-minimal-<machine name>.ext2.gz.u-boot (rootfs in EXT2+GZIP, u-boot wrapped format)
	* u-boot.elf (U-Boot ELF)
	* For Zynq:
		* uImage (Linux Kernel binary, in u-boot wrapped format)
		* uImage-<machine name>.dtb (DTB for target machine)
	* For MicroBlaze:
		* linux.bin.ub (Linux Kernel binary, in u-boot wrapped format)
		* linux.bin.ub-<machine name>.dtb (DTB for target machine)

Booting
=======

Please see the associated README for the target machine, located in the
associated sub-layer.

Configuring External Toolchain
==============================

In order to build with an external toolchain some additional configuration must
be set in the build environments local.conf. The 'meta-sourcery' layer must also
be setup in your bblayers.conf

First configure the use of an external toolchain, including the location to the
toolchain (this example is for a microblazeel toolchain, ensure that you insert
the relevant information for your target machine and target toolchain):

	TCMODE = "external-csl"
	CSL_TARGET_SYS_<machine name> = "microblazeel-xilinx-linux-gnu"
	EXTERNAL_TOOLCHAIN = "<path to toolchain>/microblazeel-xilinx-linux-gnu"
	EXTERNAL_TOOLCHAIN_SYSROOT = "<path to toolchain>/microblazeel-xilinx-linux-gnu/microblazeel-xilinx-linux-gnu/libc"
	INSANE_SKIP_external-sourcery-toolchain-dev += "ldflags"

Additionally the preferred provider for various packages must be configured to
use the external toolchain:

	PREFERRED_PROVIDER_linux-libc-headers = "external-sourcery-toolchain"
	PREFERRED_PROVIDER_linux-libc-headers-dev = "external-sourcery-toolchain"
	PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}gcc = "external-sourcery-toolchain"
	PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}gcc-initial = "external-sourcery-toolchain"
	PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}gcc-intermediate = "external-sourcery-toolchain"
	PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}g++ = "external-sourcery-toolchain"
	PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}binutils = "external-sourcery-toolchain"
	PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}libc-initial = "external-sourcery-toolchain"
	PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}libc-for-gcc = "external-sourcery-toolchain"
	PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}compilerlibs = "external-sourcery-toolchain"
	PREFERRED_PROVIDER_libgcc = "external-sourcery-toolchain"
	PREFERRED_PROVIDER_eglibc = "external-sourcery-toolchain"
	PREFERRED_PROVIDER_virtual/libc = "external-sourcery-toolchain"
	PREFERRED_PROVIDER_virtual/libintl = "external-sourcery-toolchain"
	PREFERRED_PROVIDER_virtual/libiconv = "external-sourcery-toolchain"
	PREFERRED_PROVIDER_glibc-thread-db = "external-sourcery-toolchain"
	PREFERRED_PROVIDER_virtual/linux-libc-headers = "external-sourcery-toolchain"
	PREFERRED_PROVIDER_virtual/linux-libc-headers-dev = "external-sourcery-toolchain"
	PREFERRED_PROVIDER_gdbserver = "external-sourcery-toolchain"