updated install link and instructions for R-Pi (#5495)

* updated install link and instructions for R-Pi
* remove libicu57 as it's not needed
This commit is contained in:
Steve Lee 2017-11-27 10:52:25 -08:00 committed by Aditya Patwardhan
parent 32286ed22a
commit d8eb4c5601
4 changed files with 34 additions and 94 deletions

View File

@ -184,6 +184,7 @@ TeamCity
thenewstellw
throttlelimit
toolset
toolchain
TraceSource
Unregister-Event
Unregister-PSSessionConfiguration
@ -419,14 +420,6 @@ _script.ps1
_script.ps1.
#endregion
#region demos/Raspberry-Pi/README.md Overrides
- demos/Raspberry-Pi/README.md
2.0.x
2.1.x
Raspbian
toolchain
#endregion
#region demos/rest/README.md Overrides
- demos/rest/README.md
rest.ps1
@ -959,6 +952,7 @@ msi
omnisharp-vscode
opencode
pkg
tgz
UserVoice
#endregion

View File

@ -44,6 +44,7 @@ You can download and install a PowerShell package for any of the following platf
| macOS 10.12 | [.pkg][rl-macos] | [Instructions][in-macos] |
| Docker | | [Instructions][in-docker] |
| Kali Linux | [.deb][rl-ubuntu16] | [Instructions][in-kali] |
| Raspbian (Stretch) | [.tgz][rl-raspbian] | [Instructions][in-raspbian] |
You can also download the PowerShell binary archives for Windows, macOS and Linux.
@ -67,6 +68,7 @@ You can also download the PowerShell binary archives for Windows, macOS and Linu
[rl-winx64-zip]: https://github.com/PowerShell/PowerShell/releases/download/v6.0.0-rc/PowerShell-6.0.0-rc-win-x64.zip
[rl-macos-tar]: https://github.com/PowerShell/PowerShell/releases/download/v6.0.0-rc/powershell-6.0.0-rc-osx-x64.tar.gz
[rl-linux-tar]: https://github.com/PowerShell/PowerShell/releases/download/v6.0.0-rc/powershell-6.0.0-rc-linux-x64.tar.gz
[rl-raspbian]: https://github.com/PowerShell/PowerShell/releases/download/v6.0.0-rc/powershell-6.0.0-rc-linux-arm32.tar.gz
[installation]: https://github.com/PowerShell/PowerShell/tree/master/docs/installation
[in-windows]: https://github.com/PowerShell/PowerShell/tree/master/docs/installation/windows.md#msi
@ -87,6 +89,7 @@ You can also download the PowerShell binary archives for Windows, macOS and Linu
[in-kali]: https://github.com/PowerShell/PowerShell/tree/master/docs/installation/linux.md#kali
[in-windows-zip]: https://github.com/PowerShell/PowerShell/tree/master/docs/installation/windows.md#zip
[in-tar]: https://github.com/PowerShell/PowerShell/tree/master/docs/installation/linux.md#binary-archives
[in-raspbian]: https://github.com/PowerShell/PowerShell/tree/master/docs/installation/linux.md#raspbian
To install a specific version, visit [releases](https://github.com/PowerShell/PowerShell/releases).

View File

@ -1,86 +0,0 @@
# Running PowerShell Core 6 on a Raspberry-Pi
## Setup your Pi
Note that CoreCLR (and thus PowerShell Core) will only work on Pi 2 and Pi 3 devices as other devices
like [Pi Zero](https://github.com/dotnet/coreclr/issues/10605) have an unsupported processor.
Download [Raspbian](https://www.raspberrypi.org/downloads/raspbian/) and follow the [installation instructions](https://www.raspberrypi.org/documentation/installation/installing-images/README.md) to get it onto your Pi.
Once your Pi is up and running, [enable SSH remoting](https://www.raspberrypi.org/documentation/remote-access/ssh/).
## Building PowerShell Core 6 for arm32
We'll need to cross-compile for the Linux arm32 architecture from Ubuntu.
Follow the [Linux instructions to Build PowerShell](https://github.com/PowerShell/PowerShell/blob/master/docs/building/linux.md).
Once your environment is working, you'll need to setup the toolchain for cross compilation:
```powershell
Start-PSBootstrap -BuildLinuxArm
```
You can now build PowerShell Core:
```powershell
Start-PSBuild -Clean -Runtime linux-arm -PSModuleRestore
```
Note that it's important to do a `-Clean` build because if you previously built for Ubuntu, it won't try to rebuild the native library `pslnative` for arm32.
## Copy the bits to your Pi
Use SSH to copy the bits remotely, replace `yourPi` with the name or IP address of your Pi.
```powershell
scp -r "$(split-path (Get-PSOutput))/*" pi@yourPi:/home/pi/powershell
```
## Get latest CoreCLR runtime
We need to get a CoreCLR that fixes a [threading bug](https://github.com/dotnet/coreclr/pull/13922) which is in DotNetCore 2.0.0.
You can do these steps locally on your Pi, but we're using SSH remoting here.
We'll be using the latest [build](https://github.com/dotnet/core-setup#daily-builds) from master which has the fix.
Note that at the time of authoring these instructions, the 2.0.x servicing build didn't have the necessary fix and the 2.1.x builds may be more unstable.
We'll use `curl` to get the latest DotNetCore runtime.
```bash
sudo apt install curl
```
Now we'll download it and unpack it.
```bash
# Connect to your Pi.
ssh pi@yourpi
# We'll make a folder to put latest CoreCLR runtime.
mkdir dotnet
cd dotnet
# Download the latest CoreCLR runtime.
curl -O https://dotnetcli.blob.core.windows.net/dotnet/Runtime/master/dotnet-runtime-latest-linux-arm.tar.gz
# Unpack it.
tar xvf ./dotnet-runtime-latest-linux-arm.tar.gz
# We're going to overwrite the CoreCLR bits we built with newer ones, replace the version named folder below as appropriate.
# If you build a newer version of PowerShell Core, you'll need to make sure you get latest CoreCLR runtime otherwise you may hit a segmentation fault.
cp shared/Microsoft.NetCore.App/2.1.0-preview1-25719-04/* ~/powershell
```
## Start PowerShell
```bash
~/powershell/pwsh
```
Note that until arm32 is [fully supported by CoreCLR](https://github.com/dotnet/coreclr/issues/3977), it's not supported by PowerShell Core.
If you get an error complaining about `libunwind.so.8` not being found, you'll need to install it as it's required by CoreCLR.
```bash
sudo apt install libunwind8
```
Have fun!

View File

@ -672,6 +672,35 @@ chmod a+x powershell-6.0.0-rc-x86_64.AppImage
dpkg -r powershell_6.0.0-rc-1.ubuntu.16.04_amd64.deb
```
## Raspbian
Currently, PowerShell is only supported on Raspbian Stretch.
### Installation
```sh
# Install prerequisites
sudo apt-get install libunwind8
# Grab the latest tar.gz
wget https://github.com/PowerShell/PowerShell/releases/download/v6.0.0-rc/powershell-6.0.0-rc-linux-arm32.tar.gz
# Make folder to put powershell
mkdir ~/powershell
# Unpack the tar.gz file
tar -xvf ./powershell-6.0.0-rc-linux-arm32.tar.gz -C ~/powershell
# Start PowerShell
~/powershell/pwsh
```
### Uninstallation - Raspbian
```sh
rm -rf ~/powershell
```
## Binary Archives
PowerShell binary `tar.gz` archives are provided for macOS and Linux platforms to enable advanced deployment scenarios.