Skip to content

Commit 6eaae2f

Browse files
committed
doc/MAINTAINER-GUIDE: update ARM VM instructions
1 parent 491d0ef commit 6eaae2f

1 file changed

Lines changed: 30 additions & 21 deletions

File tree

doc/MAINTAINER_GUIDE.md

Lines changed: 30 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
## Pre-release steps
1212

1313
* Ensure `release` and `stable` branches merged to `master`
14+
* Check compatibility with latest stackage snapshot
1415
* Ensure integration tests pass on a representative Windows, Mac OS X, and Linux (Linux
1516
is handled by Jenkins automatically): `stack install --pedantic && stack test
1617
--pedantic --flag stack:integration-tests` . The actual release script will
@@ -248,13 +249,15 @@ line.
248249
qemu-img create -f raw armdisk.raw 15G && \
249250
qemu-system-arm -M vexpress-a9 -cpu cortex-a9 -kernel vmlinuz -initrd initrd.gz -sd armdisk.raw -append "root=/dev/mmcblk0p2" -m 1024M -redir tcp:2223::22 -dtb vexpress-v2p-ca9.dtb -append "console=ttyAMA0,115200" -serial stdio
250251

251-
Now the Debian installer will run. Add at least 1 GB SWAP during installation.
252+
Now the Debian installer will run. Don't use LVM for partitioning (it won't
253+
BOOT), and add at least 2 GB swap during installation.
252254

253255
### Get boot files after install
254256

255257
hdiutil attach -imagekey diskimage-class=CRawDiskImage -nomount armdisk.raw && \
256258
mkdir -p /Volumes/armdeb && \
257259
fuse-ext2 /dev/disk2s1 /Volumes/armdeb/ && \
260+
sleep 5 && \
258261
cp /Volumes/armdeb/vmlinuz-3.16.0-4-armmp . && \
259262
cp /Volumes/armdeb/initrd.img-3.16.0-4-armmp . && \
260263
hdiutil detach /dev/disk2
@@ -275,42 +278,48 @@ during Debian installation):
275278
Now you can SSH to the VM using `ssh -p 2223 <<<USERNAME>>>@localhost` and use `sudo` in
276279
the shell.
277280

278-
### Install GHC/clang
281+
### Install clang+llvmGHC/clang
279282

280283
NOTE: the Debian jessie `llvm` packge does not work (executables built with it
281284
just exit with "schedule: re-entered unsafely.").
282285

286+
The version of LLVM needed depends on the version of GHC you need.
287+
288+
#### GHC 7.10.3 (the standard for building Stack)
289+
283290
sudo apt-get install -y g++ gcc libc6-dev libffi-dev libgmp-dev make xz-utils zlib1g-dev git gnupg && \
284291
wget http://llvm.org/releases/3.5.2/clang+llvm-3.5.2-armv7a-linux-gnueabihf.tar.xz && \
285-
sudo tar xvf clang+llvm-3.5.2-armv7a-linux-gnueabihf.tar.xz -C /opt && \
286-
http://downloads.haskell.org/~ghc/7.10.3/ghc-7.10.3-armv7-deb8-linux.tar.xz
287-
tar xvf ghc-7.10.3-armv7-deb8-linux.tar.xz && \
288-
cd ghc-7.10.3 && \
289-
./configure --prefix=/opt/ghc-7.10.3 && \
290-
sudo make install && \
291-
cd ..
292+
sudo tar xvf clang+llvm-3.5.2-armv7a-linux-gnueabihf.tar.xz -C /opt
292293

293294
Run this now and add it to the `.profile`:
294295

295-
export PATH="$HOME/.local/bin:/opt/ghc-7.10.3/bin:/opt/clang+llvm-3.5.2-armv7a-linux-gnueabihf/bin:$PATH"
296+
export PATH="$HOME/.local/bin:/opt/clang+llvm-3.5.2-armv7a-linux-gnueabihf/bin:$PATH"
296297

297-
Note: to install GHC 8.0.1/clang 3.7.1 instead, use:
298+
#### GHC 8.0.1
298299

299300
wget http://llvm.org/releases/3.7.1/clang+llvm-3.7.1-armv7a-linux-gnueabihf.tar.xz && \
300-
sudo tar xvf clang+llvm-3.7.1-armv7a-linux-gnueabihf.tar.xz -C /opt && \
301-
wget http://downloads.haskell.org/~ghc/8.0.1/ghc-8.0.1-armv7-deb8-linux.tar.xz && \
302-
tar xvf ghc-8.0.1-armv7-deb8-linux.tar.xz && \
303-
cd ghc-8.0.1 && \
304-
./configure --prefix=/opt/ghc-8.0.1 && \
305-
sudo make install && \
306-
cd ..
301+
sudo tar xvf clang+llvm-3.7.1-armv7a-linux-gnueabihf.tar.xz -C /opt
302+
303+
Run this now and add it to the `.profile`:
304+
305+
export PATH="$HOME/.local/bin:/opt/clang+llvm-3.5.2-armv7a-linux-gnueabihf/bin:$PATH"
307306

308307
### Install Stack
309308

310-
Get an [existing `stack` binary](github.com/commercialhaskell/stack/releases)
311-
and put it in `~/.local/bin`. If that is not possible, bootstrap Stack using
312-
this process:
309+
#### Binary
310+
311+
Get an [existing `stack` binary](https://github.com/commercialhaskell/stack/releases)
312+
and put it in `~/.local/bin`.
313313

314+
#### From source (using cabal-install):
315+
316+
wget http://downloads.haskell.org/~ghc/7.10.3/ghc-7.10.3-armv7-deb8-linux.tar.xz && \
317+
tar xvf ghc-7.10.3-armv7-deb8-linux.tar.xz && \
318+
cd ghc-7.10.3 && \
319+
./configure --prefix=/opt/ghc-7.10.3 && \
320+
sudo make install && \
321+
cd ..
322+
export PATH="/opt/ghc-7.10.3/bin:$PATH"
314323
wget https://www.haskell.org/cabal/release/cabal-install-1.24.0.0/cabal-install-1.24.0.0.tar.gz &&&&& \
315324
tar xvf cabal-install-1.24.0.0.tar.gz && \
316325
cd cabal-install-1.24.0.0 && \

0 commit comments

Comments
 (0)