Skip to content

Commit 5120397

Browse files
author
Andy Ray
committed
tweaks to install, 2gb image + readme updates
1 parent d8023b4 commit 5120397

File tree

2 files changed

+63
-2
lines changed

2 files changed

+63
-2
lines changed

rpi/CompilingOcaml.md

+60
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,63 @@ The plan is to get opam running. To start with I think I will have to compile
44
everything from scratch, however, I would like to set up binaries of opam
55
and a compiler (similar to 4.01.0+bin-ocp) so this is much faster on
66
subsequent installs.
7+
8+
# Ports
9+
10+
There are no binary packages for FreeBSD at the moment (perhaps some user
11+
maintained ones, but I have not found one). So, we need to compile stuff
12+
from source. For that we need the ports tree but its not been installed
13+
by default (and it is pretty huge while I have limited space on the
14+
SD card image - I should expand this).
15+
16+
```
17+
$ portsnap fetch
18+
```
19+
20+
This grabs all the ports (approx 68 MB) then extracts them to
21+
`/var/db/portsnap` (approx 136 MB). _Note; the verification step takes
22+
forever...._
23+
24+
```
25+
$ portsnap extract
26+
```
27+
28+
will extract the whole ports tree (>800Mb). You can also extract a subsets
29+
30+
```
31+
$ portsnap extract <pattern>
32+
```
33+
34+
This is causing me problems as (1) its shockingly slow and (2) its filling
35+
my SD card up and Im running out of space (aside; I tried building 4gb
36+
or slightly below 4gb images and they wouldnt boot, so I have settled on
37+
2gb for now - should be enough to build and install the stuff I need).
38+
39+
So....
40+
41+
# NFS
42+
43+
[Setting up NFS](http://www.freebsd.org/doc/handbook/network-nfs.html) went
44+
pretty smoothly except I also added
45+
46+
```
47+
mountd_enable="YES"
48+
```
49+
50+
To the server. My `/etc/exports` looks like
51+
52+
```
53+
/usr/home/andyman/dev/github/mirage-fpga/rpi/freebsd/fs/ports -maproot=root 192.168.1.85
54+
```
55+
56+
and I used portsnap to extract a copy of ports on the server and put them
57+
in `/.../freebsd/fs/ports`.
58+
59+
As root on the rpi do
60+
61+
```
62+
mkdir /usr/ports
63+
mount <ip_addr_of_server>:/home/.../freebsd/fs/ports /var/ports
64+
```
65+
66+

rpi/install.sh

+3-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ set -e
44
. ./env.sh
55

66
# Change this
7-
export GPU_MEM=128
7+
export GPU_MEM=32
88
export PI_USER=pi
99
export PI_USER_PASSWORD=raspberry
1010
export SRCROOT=$ROOT/freebsd/usr/src
@@ -36,8 +36,9 @@ eval $buildenv make -C $SRCROOT/sys/boot clean
3636
eval $buildenv make -C $SRCROOT/sys/boot obj
3737
eval $buildenv make -C $SRCROOT/sys/boot UBLDR_LOADADDR=0x2000000 all
3838

39+
# count=8 for 1 Gb
3940
rm -f $IMG
40-
dd if=/dev/zero of=$IMG bs=128M count=8
41+
dd if=/dev/zero of=$IMG bs=128M count=16
4142
MDFILE=`mdconfig -a -f $IMG`
4243
echo MDFILE = $MDFILE
4344
gpart create -s MBR ${MDFILE}

0 commit comments

Comments
 (0)