aboutsummaryrefslogtreecommitdiffstats
path: root/README.md
blob: e74c75a301c5811e709252aa2166434f08d27d7c (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
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
## Introduction

meta-mono is an OpenEmbedded layer that builds mono runtime and mono
libraries to allow users to run .NET applications under linux built
using OE. For more info about mono, see mono project's website. For
more info on OpenEmbedded, see OE's website.

This README pertains to meta-mono layer support for Mono 3.12.1 - 5.4.0

For Mono release notes please see:

* [Mono 3.12.0 Release Notes](http://www.mono-project.com/docs/about-mono/releases/3.12.0/)
* [Mono 3.12.1 Release Notes](http://www.mono-project.com/docs/about-mono/releases/3.12.1/)
* [Mono 4.0.0 Release Notes](http://www.mono-project.com/docs/about-mono/releases/4.0.0/)
* [Mono 4.0.1 Release Notes](http://www.mono-project.com/docs/about-mono/releases/4.0.1/)
* [Mono 4.0.2 Release Notes](http://www.mono-project.com/docs/about-mono/releases/4.0.2/)
* [Mono 4.0.3 Release Notes](http://www.mono-project.com/docs/about-mono/releases/4.0.3/)
* [Mono 4.2.0 Release Notes](http://www.mono-project.com/docs/about-mono/releases/4.2.0/)
* [Mono 4.2.1 Release Notes](http://www.mono-project.com/docs/about-mono/releases/4.2.1/)
* [Mono 4.4.0 Release Notes](http://www.mono-project.com/docs/about-mono/releases/4.4.0/)
* [Mono 4.6.1 Release Notes](http://www.mono-project.com/docs/about-mono/releases/4.6.1/)
* [Mono 4.8.0 Release Notes](http://www.mono-project.com/docs/about-mono/releases/4.8.0/)
* [Mono 4.8.1 Release Notes](http://www.mono-project.com/docs/about-mono/releases/4.8.1/)
* [Mono 5.0.0 Release Notes](http://www.mono-project.com/docs/about-mono/releases/5.0.0/)
* [Mono 5.0.1 Release Notes](http://www.mono-project.com/docs/about-mono/releases/5.0.1/)
* [Mono 5.2.0 Release Notes](http://www.mono-project.com/docs/about-mono/releases/5.2.0/)
* [Mono 5.4.0 Release Notes](http://www.mono-project.com/docs/about-mono/releases/5.4.0/)

NOTE: Mono TLS vulnerabilities. 3.12.1+ includes the fix in the release archive.

http://www.mono-project.com/news/2015/03/07/mono-tls-vulnerability/

NOTE: ARM hardfp support

Since Mono 3.2.7 there is initial support for the ARM hardfp ABI which should 
enable us to use hardfp builds of e.g. Yocto/Poky. However there are issues with 
using this, namely exceptions when using Windows Forms components. For details see:

https://bugzilla.xamarin.com/show_bug.cgi?id=20239

For now the recommendation is to use softfp only when using Mono.

There may be a solution to this issue in Mono 3.10.0 / 3.12.0+ but this is as yet untested.
Feedback on testing with armhf would be appreciated and incorporated into this README.

## Layer Dependencies

The libgdiplus recipe has a soft dependency on the giflib recipe which is provided by the meta-oe layer.
These dependencies can be controlled using the PACKAGECONFIG feature of yocto.  libgdiplus
recognizes the following options:

"jpeg exif gif tiff"

These can be controlled via the .bbappend mechanism or by adding:
PACKAGECONFIG_pn-mono = ""
PACKAGECONFIG_pn-mono-native = ""

directives to the local.conf

If this recipe is included in an image with gif enabled, for example when building core-image-mono, then
conf/bblayers needs to be modified to include meta-oe, e.g.

BBLAYERS = " \
  ..
  /path/to/meta-oe \
  ..
"

Otherwise an error of the following form will be seen:

ERROR: Required build target 'core-image-mono' has no buildable providers. Missing or unbuildable dependency chain was: ['core-image-mono', 'mono-helloworld', 'mono', 'libgdiplus', 'giflib']

## Other Dependencies

On the host:

The host system must have the following packges:
gcc g++ patch diffstat texi2html texinfo cvs subversion gawk
chrpath make libgl1-mesa-dev libglu1-mesa-dev libsdl1.2-dev
git libxml-parser-perl bison gettext flex unzip rpm2cpio

On the target:

So far, Windows Forms applications have been tested under Sato.
Mono does not require Sato, it does require X if you want to run
Windows Forms applications. 

## Build Examples

There are mono-helloworld and a mono-helloworld-xbuild recipes in recipes-mono

These show two ways of building C# projects for deployment to the target. Each
downloads a tarball release from a git repository, although they could just as
easily download and checkout a commit from the git repository.

mono-helloworld then implements the recommended autotools files for build with
autoconf. This is based on the Mono example, mono-skel.

For a walkthrough on building .NET recipes from first principles see:

* [Building and running embedded Linux .NET applications from first principles](https://wiki.yoctoproject.org/wiki/Building_and_running_embedded_Linux_.NET_applications_from_first_principles)

For details see: 

* [Mono Application Deployment Guidelines](http://mono-project.com/Guidelines:Application_Deployment)

mono-helloworld-xbuild implements a Visual Studio 2010 solution and projects 
which allow us to checkout and build using Visual Studio on a Windows host, 
or alternatively using Mono xbuild within a Yocto/OpenEmbedded recipe.

For a walkthrough on building Mono for Raspberry Pi see:

* [Getting Mono Running on a Raspberry Pi Using Yocto](http://www.codeproject.com/Articles/840489/Getting-Mono-Running-on-a-Raspberry-Pi-Using-Yocto)

## Contributors

* Alex J Lennon
* Autif Khan
* Chris Morgan
* Enric Balletbo i Serra
* Khem Raj
* Richard Tollerton
* Fabio Berton
* Barry Grussling
* Zoltán Böszörményi

## Maintainer(s) & Patch policy

* [Alex J Lennon](mailto:ajlennon@dynamicdevices.co.uk)

Follow Yocto change submission policy, detailed here:

* [Yocto - How to submit a change](http://www.yoctoproject.org/docs/1.4.2/dev-manual/dev-manual.html#how-to-submit-a-change)

Use the create-pull-request and send-pull-request scripts details in 3.9.1. 

Send to the maintainer and to [Yocto mailing list](mailto:yocto@yoctoproject.org)

## Copyright

MIT/GPLv2 - following the lead of libgdiplus and mono

## Current State - x86 emulation: Works

#### 18/06/2017

5.2.0.179

* Maintainer has tested Poky (pyro) build on a qemux86 platform, with a simple console application, a simple Windows Forms application, and a simple GTK# application

#### 30/05/2017

4.8.1.0

* Maintainer has tested Poky (master, morty) build on a qemux86 platform, with a simple console application, a simple Windows Forms application, and a simple GTK# application

#### 28/07/2015

3.12.1

* Maintainer has tested a Poky build on a qemux86 platform, with a simple console application, a simple Windows Forms application, and a simple GTK# application

## Current State - PPC emulation: Works

#### 22/12/2016

4.8.0.382

* Maintainer has tested a Poky (master) build on a qemuppc platform, with a simple console application, a simple Windows Forms application, and a simple GTK# application
  (Not convinced that the test applications are exiting reliably)

## Current State - ARM emulation: Works

#### 28/07/2015

4.0.3.19

* Maintainer has tested a Poky build on a qemuarm platform, with a simple console application, a simple Windows Forms application, and a simple GTK# application

#### 28/07/2015

3.12.1

* Maintainer has tested a Poky build on a qemuarm platform, with a simple console application, a simple Windows Forms application, and a simple GTK# application

## Current State - ARM vfp: Works

4.6.1

* Has been tested on Cortex-A9

#### 27/04/2014

4.0.1

* Maintainer has tested a Poky build on a Freescale i.MX6 platform with console helloworld and Matchbox UI helloworldform

#### 09/03/2015

3.12.1

* Maintainer has tested a Poky build on a Freescale i.MX6 platform with console helloworld and Matchbox UI helloworldform

#### 25/02/2014

* Maintainer has tested a Poky build on a Freescale i.MX6 platform, with a simple console application and a simple Windows Forms application. 

## Current State - ARM hardfp: Works / Issues with Windows Forms components

#### 22/04/2014

* Builds and runs on i.MX6 platform with hardfp enabled. 

## Current State - MIPS: Unknown

* More investigation is needed, if there is an interest in getting mono to work perfectly on MIPS, please contact the maintainer.

## Current State - PPC

#### 25/06/2017

5.4.0.56

* Maintainer has tested a Poky (master) build on a qemuppc platform, with  

a simple console application, helloworld which RUNS
a simple Windows Forms application, helloworldform which RUNS
a simple GTK# application hellloworldgtk, which RUNS

#### 01/07/2017

5.2.0.196

* Maintainer has tested a Poky (master) build on a qemuppc platform, with  

a simple console application, helloworld which RUNS
a simple Windows Forms application, helloworldform which RUNS
a simple GTK# application hellloworldgtk, which RUNS

#### 14/02/2016

4.2.0.179

* Maintainer has tested a Poky (Jethro) build on a qemuppc platform, with 

a simple console application, helloworld which RUNS
a simple Windows Forms application, helloworldform which FAILS
a simple GTK# application hellloworldgtk, which RUNS

#### 14/02/2016

4.0.1.34

* Maintainer has tested a Poky (Jethro) build on a qemux86 platform, with a simple console application, a simple Windows Forms application, and a simple GTK# application

#### 14/02/2016

3.12.1

Fails to link building Poky (Jethro) with:

| mono/3.12.1-r0/mono-3.12.1/mono/metadata/loader.c:2322: undefined reference to `mono_sigctx_to_monoctx'

## Current State - alpha, amd64, hppa, ia64, s390 & sparc: Unknown

* When qemu provided by Yocto supports one of these machines, the maintainer will support these architectures.

## TODO

* see if mono works for amd64, seems like qemux86-64 is available
* investigate why windows forms apps dont run on MIPS
* run mono runtime tests for ARM
* run mono runtime tests for MIPS
* run mono runtime tests for PPC
* run mono library tests for ARM
* run mono library tests for MIPS
* run mono library tests for PPC
* write recipes to create packages for runtime tests
* write recipes to create packages for mscorlib library tests
* write recipes to create packages for System.dll library tests
* try mono on beagleboard (email maintainer when you do this, he will thank you)