2016年12月5日 星期一

How to build FreeBSD for Raspberry Pi {1,2,3}

1.
On x86 or other fast platforms, use Crochet-Build to build images that can be written to sdcard and boot. Useful for initial installation, if you choose not to use pre-built -head or -stable snapshot images. It saves you some manual installation steps onto sdcard.

2.
Cross-build arm/arm64 binaries on a x86 PC, and then install kernel & world to upgrade existing disk partitions, e.g. put sdcard above in card reader and plug into PC.

make TARGET_ARCH=armv6 KERNCONF=RPI2 buildworld buildkernel 
make DESTDIR=/path/to/sdcard installkernel
mergemaster -A armv6 -D /path/to/sdcard -p
make DESTDIR=/path/to/sdcard installworld
mergemaster -A armv6 -D /path/to/sdcard -iU

3.
Cross-build arm/arm64 binaries, and then install them from running RPI mounting obj path
(Not working yet)

4.
Native build on RPI.
Very slow. RPi2/900MHz takes over 24 hours to complete. RPi1 takes a couple of days, close to a week. on x86 cross-build can be ~20x faster. You'd like to put obj files on NFS or other USB storage. sdcard I/O is slooooooow.

沒有留言:

張貼留言