Skip to content

Building From Source

starbasessd edited this page Aug 25, 2021 · 4 revisions

If you want to compile the latest GIT version, you need a computer running Linux (any recent distro should work). Follow the steps below to download, compile and prepare the image from the GIT repo. Replace [board] with your actual board's name (e.g. raspberrypi).

  1. make sure your system meets the BuildRoot requirements

     apt install sed make binutils build-essential gcc g++ bash patch gzip \
     bzip2 perl tar cpio unzip rsync file bc cvs git mercurial rsync \ 
     ssh subversion dosfstools
    

Install menuconfig tools:

    apt-get install libncurses5-dev libncursesw5-dev 
  1. clone the repository and change the current directory:

     git clone --depth 1 https://github.com/ccrisan/motioneyeos.git motioneyeos
     cd motioneyeos
    
  2. optionally make your changes to the package selection and buildroot configuration:

     ./build.sh [board] menuconfig
    
  3. build the OS for your board:

     ./build.sh [board]
    

    If everything went well, the last line in the build log should be build successful.

  4. build the OS image (at some point may be prompted for your password to become root):

     ./build.sh [board] mkimage
    

    You should now find your freshly built image at output/[board]/images/motioneyeos-[board].img.

  5. write the image file to your SD card using your preferred method (e.g. with dd, replacing /dev/mmcblk0 with your SD card reader device):

     sudo dd if=output/[board]/images/motioneyeos-[board].img of=/dev/mmcblk0 bs=4M