Skip to content

Instantly share code, notes, and snippets.

@bao3
Created October 23, 2017 06:34
Show Gist options
  • Save bao3/2bcc8f7d2146c69d7e615bdadcfffe1a to your computer and use it in GitHub Desktop.
Save bao3/2bcc8f7d2146c69d7e615bdadcfffe1a to your computer and use it in GitHub Desktop.
build freebsd on raspberry pi
#!/bin/sh
export MAKEOBJDIRPREFIX=/srv/obj
export SRCROOT=/srv
# build kernel
svn co svn://svn.freebsd.org/base/head $SRCROOT/head
cd $SRCROOT/head
make buildkernel KERNCONF=RPI-B
make installkernal KERNCONF=RPI-B
# build world, it will take 2~3 day
make buildworld
# it should be single mode, but i do not have ttl serial cable.
make installword
# delete old things
make delete-old
make delete-old-libs
# build userlang
git clone git://github.com/gonzoua/userland.git
cd $SRCROOT/userland/
git checkout freebsd
mkdir -p build/arm-freebsd/release/
cd build/arm-freebsd/release/
cmake -DCMAKE_TOOLCHAIN_FILE=../../../makefiles/cmake/toolchains/arm-freebsd.cmake -DCMAKE_BUILD_TYPE=Release ../../..
make install
# build vchiq
git clone git://github.com/gonzoua/vchiq-freebsd.git
cd $SRCROOT/vchiq-freebsd
make
make install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment