Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit 63e59cc

Browse files
author
Jarret Shook
authored
Merge pull request #6249 from prajwal-aithal/devel/arm-ci-documentation
Documentation: Add documentation for building coreclr for emulator
2 parents 9a9096b + 3c27708 commit 63e59cc

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

Documentation/building/cross-building.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,4 +95,43 @@ The output is at bin/Product/<BuildOS>.arm.Debug/mscorlib.dll.
9595
(console) ARMv7 Thumb Mono/.Net assembly, for MS Windows
9696
```
9797

98+
Building coreclr for Linux ARM Emulator
99+
=======================================
98100

101+
It is possible to build coreclr binaries (native and mscorlib.dll) and run coreclr unit tests on the Linux ARM Emulator (latest version provided here: [#3805](https://github.com/dotnet/coreclr/issues/3805)).
102+
The `tests/scripts/arm32_ci_script.sh` script does this.
103+
104+
The following instructions assume that:
105+
* You have set up the extracted emulator at `/opt/linux-arm-emulator` (such that `/opt/linux-arm-emulator/platform/rootfs-t30.ext4` exists)
106+
The emulator rootfs is of 4GB size by default. But to enable testing of coreclr binaries on the emulator, you need to resize the rootfs (to atleast 7GB) using the instructions given in the `doc/RESIZE-IMAGE.txt` file of the extracted emulator.
107+
* The mount path for the emulator rootfs is `/opt/linux-arm-emulator-root` (change this path if you have a working directory at this path).
108+
109+
All the following instructions are for the Release mode. Change the commands and files accordingly for the Debug mode.
110+
111+
To just build libcoreclr and mscorlib for the Linux ARM Emulator, run the following command:
112+
```
113+
prajwal@ubuntu ~/coreclr $ ./tests/scripts/arm32_ci_script.sh \
114+
--emulatorPath=/opt/linux-arm-emulator \
115+
--mountPath=/opt/linux-arm-emulator-root \
116+
--buildConfig=Release \
117+
--skipTests
118+
```
119+
120+
The Linux ARM Emulator is based on soft floating point and thus the native binaries in coreclr are built for the arm-softfp architecture. The coreclr binaries generated by the above command (native and mscorlib) can be found at `~/coreclr/bin/Product/Linux.arm-softfp.Release`.
121+
122+
To build libcoreclr and mscorlib, and run selected coreclr unit tests on the emulator, do the following:
123+
* Download the latest Coreclr unit test binaries (or build on Windows) from here: [Debug](http://dotnet-ci.cloudapp.net/job/dotnet_coreclr/job/master/job/debug_windows_nt_bld/lastSuccessfulBuild/artifact/bin/tests/tests.zip) and [Release](http://dotnet-ci.cloudapp.net/job/dotnet_coreclr/job/master/job/release_windows_nt_bld/lastSuccessfulBuild/artifact/bin/tests/tests.zip).
124+
Setup the binaries at `~/coreclr/bin/tests/Windows_NT.x64.Release`.
125+
* Build corefx binaries for the Emulator as given [here](https://github.com/dotnet/corefx/blob/master/Documentation/building/cross-building.md#building-corefx-for-linux-arm-emulator).
126+
Setup these binaries at `~/corefx/bin/Linux.arm-softfp.Release`, `~/corefx/bin/Linux.AnyCPU.Release`, `~/corefx/bin/Unix.AnyCPU.Release`, and `~/corefx/bin/AnyOS.AnyCPU.Release`.
127+
* Run the following command (change value of `--testDirFile` argument to the file containing your selection of tests):
128+
```
129+
prajwal@ubuntu ~/coreclr $ ./tests/scripts/arm32_ci_script.sh \
130+
--emulatorPath=/opt/linux-arm-emulator \
131+
--mountPath=/opt/linux-arm-emulator-root \
132+
--buildConfig=Release \
133+
--testRootDir=~/coreclr/bin/tests/Windows_NT.x64.Release \
134+
--coreFxNativeBinDir=~/corefx/bin/Linux.arm-softfp.Release \
135+
--coreFxBinDir="~/corefx/bin/Linux.AnyCPU.Release;~/corefx/bin/Unix.AnyCPU.Release;~/corefx/bin/AnyOS.AnyCPU.Release" \
136+
--testDirFile=~/coreclr/tests/testsRunningInsideARM.txt
137+
```

0 commit comments

Comments
 (0)