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

Add initial NetBSD documentation #4504

Merged
merged 1 commit into from May 4, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
128 changes: 128 additions & 0 deletions Documentation/building/netbsd-instructions.md
@@ -0,0 +1,128 @@
Build CoreCLR on NetBSD
=======================

This guide will walk you through building CoreCLR on NetBSD. We'll start by showing how to set up your environment from scratch.

Environment
===========

These instructions are written on NetBSD 7.x on the amd64 platform, since that's the release the team uses.

Older releases aren't supported because building CoreCLR requires the modern LLVM stack (Clang, libunwind, and LLDB) that is developed against the NetBSD-7.x branch.

Pull Requests are welcome to address other ports (like i386 or evbarm) as long as they don't break the ability to use NetBSD/amd64.

Minimum RAM required to build is 1GB.

The pkgsrc framework is required to build .NET projects on NetBSD. Minimal pkgsrc version required is 2016Q1.

pkgsrc setup
------------

Fetch pkgsrc and install to the system. By default it's done in the /usr directory as root:

```
ftp -o- ftp://ftp.netbsd.org/pub/pkgsrc/stable/pkgsrc.tar.gz | tar -zxpf- -C /usr
```

The .NET projects are tracked in pkgsrc-wip.

In order to use pkgsrc-wip, git must be installed:


```
cd /usr/pkgsrc/devel/git-base && make install
```

To access resources over SSL link, mozilla-rootcerts must be installed:

```
cd /usr/pkgsrc/security/mozilla-rootcerts && make install
```

And follow the MESSAGE commands to finish the installation.


Installing pkgsrc-wip
---------------------

Type the following command to fetch the pkgsrc-wip sources:


```
cd /usr/pkgsrc
git clone --depth 1 git://wip.pkgsrc.org/pkgsrc-wip.git wip
```

Then install the CoreCLR package you need:

```
cd /usr/pkgsrc/wip/coreclr-git
make install
```

CoreCLR is installed in `/usr/pkg/CoreCLR` subdirectory by default.


PAL tests
=========

To run PAL tests on NetBSD, use the `make test` in the coreclr-git package from pkgsrc-wip:

```
cd /usr/pkgsrc/wip/coreclr-git
make test
```

Build CoreFX
============

The CoreFX package is located in pkgsrc-wip as corefx-git. In order to build it you need to perform the following command:

```
cd /usr/pkgsrc/wip/coreclr-git
make
```

At the moment there is no install or test target in the pkgsrc framework.

CoreFX tests
============

The steps to run CoreFX managed code tests:

Build CoreCLR (with pkgsrc-wip/coreclr-git) on NetBSD x64, Debug and install the Product dir to /usr/pkg/CoreCLR:

```
cd /usr/pkgsrc/wip/coreclr-git && make install
```

Build CoreFX native x64 Debug and the work (build) dir is in /usr/pkgsrc/wip/corefx-git/work/corefx:

```
cd /usr/pkgsrc/wip/corefx-git && make
```

Build CoreCLR Debug x64 on Linux and copy mscorlib.dll from ./bin/Product/Linux.x64.Debug/mscorlib.dll to NetBSD machine under /usr/pkg/CoreCLR:

```
./build.sh mscorlib Debug
```

Build CoreFX Debug x64 on Linux and copy bin/ to NetBSD machine under /public/bin:

```
./build.sh /p:OSGroup=NetBSD /p:SkipTests=true
```

Run ./run-test.sh:

```
$ pwd
/usr/pkgsrc/wip/corefx-git/work/corefx
$ ./run-test.sh \
--coreclr-bins /usr/pkg/CoreCLR/ \
--mscorlib-bins /usr/pkg/CoreCLR/ \
--corefx-tests /public/bin/tests/NetBSD.AnyCPU.Debug/ \
--corefx-native-bins ./bin/NetBSD.x64.Debug/Native/
```
2 changes: 1 addition & 1 deletion Documentation/building/testing-with-corefx.md
Expand Up @@ -9,7 +9,7 @@ As part of building tests, CoreFX restores a copy of the runtime from myget, in

To run tests, follow the procedure for [running tests in CoreFX](https://github.com/dotnet/corefx/blob/master/Documentation/building/windows-instructions.md). You can pass `/p:BUILDTOOLS_OVERRIDE_RUNTIME=<path-to-coreclr>\bin\Product\Windows_NT.x64.Release` to build.cmd to set this property.

**Linux, OS X, FreeBSD**
**FreeBSD, Linux, NetBSD, OS X**

Refer to the procedure for [running tests in CoreFX](https://github.com/dotnet/corefx/blob/master/Documentation/building/cross-platform-testing.md)
- Note the --coreclr-bins and --mscorlib-bins arguments to [run-test.sh](https://github.com/dotnet/corefx/blob/master/run-test.sh)
Expand Down
7 changes: 3 additions & 4 deletions README.md
Expand Up @@ -23,9 +23,9 @@ Build Status
Building the Repo
-------------

|Linux |Windows |Mac OS X |FreeBSD |
|--------|--------|---------|---------|
| [Instructions](Documentation/building/linux-instructions.md) | [Instructions](Documentation/building/windows-instructions.md) | [Instructions](Documentation/building/osx-instructions.md) | [Instructions](Documentation/building/freebsd-instructions.md) |
|Linux |Windows |Mac OS X |FreeBSD | NetBSD |
|--------|--------|---------|---------|--------|
| [Instructions](Documentation/building/linux-instructions.md) | [Instructions](Documentation/building/windows-instructions.md) | [Instructions](Documentation/building/osx-instructions.md) | [Instructions](Documentation/building/freebsd-instructions.md) | [Instructions](Documentation/building/netbsd-instructions.md) |

Get .NET Core
----------------------
Expand Down Expand Up @@ -91,4 +91,3 @@ There are many .NET projects on GitHub.
[coreclr blog post]: http://blogs.msdn.com/b/dotnet/archive/2015/02/03/coreclr-is-now-open-source.aspx
[corefx]: http://github.com/dotnet/corefx
[coreclr]: http://github.com/dotnet/coreclr