Skip to content

Instantly share code, notes, and snippets.

@dmcclean
Created February 6, 2016 14:58
Show Gist options
  • Save dmcclean/bc0c5a858ef188989b06 to your computer and use it in GitHub Desktop.
Save dmcclean/bc0c5a858ef188989b06 to your computer and use it in GitHub Desktop.
Notes on installing GHC 7.10 on Raspberry Pi 2
Log:
1) Start with Raspbian image fresh on SD card
2015-02-16-raspbian-wheezy
2)
Expand filesystem
Configure for en-US, Eastern Time Zone, en-US keyboard, camera enabled
Ctrl-alt-backspace terminates x server
3) Switch to debian sid:
http://forums.debian.net/viewtopic.php?f=3&t=110687
sudo nano /etc/apt/sources.list
...
Change to:
deb http://http.debian.net/debian sid main contrib non-free rpi
...
?? Install keyring for debian sid
sudo apt-get install debian-archive-keyring
???
sudo apt-key update
sudo apt-get update
sudo apt-get install ghc cabal-install
cabal update
nano ~/.cabal/config
Edit it to have the GHC option: -opta-mcpu=cortex-a7 -opta-mfpu=neon -opta-mtune=native -opta-mfloat-abi=hard
4)
sudo apt-get update && apt-get upgrade
5)
sudo apt-get install ghc automake build-essential cabal-install
sudo apt-get install ncurses-dev
sudo apt-get install llvm-3.5
6)
cabal update
7)
cabal install -f-templatehaskell QuickCheck
8)
cabal install alex happy
9)
Set paths for cabal installed version of alex and happy:
https://ghc.haskell.org/trac/ghc/wiki/Building/QuickStart
PATH=~/.cabal/bin:$PATH
10)
git clone -b ghc-7.10 --recursive git://git.haskell.org/ghc.git ghc-7.10
11)
cd ghc-7.10
12)
./boot
13)
./configure --with-ghc=/usr/bin/ghc --with-llc=/usr/bin/llc-3.5 --with-opt=/usr/bin/opt-3.5
14)
wget https://gist.githubusercontent.com/bgamari/9399430/raw/build-ghc-arm.sh
15)
chmod ugo+rx build-ghc-arm.sh
16)
Use nano to change line 31 by removing blank spaces after EOF
17)
./build-ghc-arm.sh -j4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment