matrix-io / matrix-creator-init

Debian package to initialize MATRIX Creator on boot
https://matrix-io.github.io/matrix-documentation/
7 stars 13 forks source link

Build from source #56

Open anasvaf opened 4 years ago

anasvaf commented 4 years ago

Hello,

I am trying to build the matrixio-creator-init from source so I can make it interact with an Asus TinkerBoard S, which has the same GPIO layout as an RPi 3b+. Does anyone have instructions on that?

fpgasdr commented 3 years ago

I guess will be cloning the repository and then running the install shell...

Have you tried?, also interested but with the jetson nano.

anasvaf commented 3 years ago

Hello @eljuligallego. Unfortunately, I did not have time to try with the install .sh I will let you know once I manage to do it

KylePalko commented 3 years ago

@eljuguetero, the install shell has not been kept up to date with the evolution of the project. For instance, it is still looking for asound.conf. I primarily work on macOS, but I also noticed the cp commands don't have a to path, and it is also using -avr. The -r recursive flag, on macOS at least, does not like to handle files.

I ended up with something like the below for the install.bash script, but I should note that I'm building to run on balenaOS inside a container. I've stripped the systemctl commands to start the services.

#!/bin/bash

cd /usr/src/app/matrix-creator-init || exit

mkdir /etc/matrixio-devices/
mkdir /usr/share/matrixlabs
mkdir /usr/share/matrixlabs/matrixio-devices
mkdir /usr/share/matrixlabs/matrixio-devices/config

cp -avr blob \
        cfg \
        /usr/share/matrixlabs/matrixio-devices

cp -av sam3-program.bash \
       voice.version \
       fpga-program.bash \
       em358-program.bash \
       matrix-init.bash \
       radio-init.bash \
       ./build/cpp/firmware_info \
       ./build/cpp/fpga_info \
       mcu_firmware.version \
       matrixlabs_edit_settings.py \
       matrixlabs_remove_console.py \
       /usr/share/matrixlabs/matrixio-devices

cp -av voice_esp32_enable \
       voice_esp32_reset \
       /usr/bin

cp -av boot_modifications.txt \
       /usr/share/matrixlabs/matrixio-devices/config

cp -av matrixio-devices-firmware.service \
       /lib/systemd/system

cp -av matrix-creator-reset-jtag \
       /usr/bin

cp -av matrix-mics.conf \
       /etc/modules-load.d

cp -av raspicam.conf \
       /etc/modules-load.d

cp -av matrix_voice.config \
       /etc/matrixio-devices/
KylePalko commented 3 years ago

Also, I had to manually run cmake and make firmware_info to get the firmware_info file to copy.

AlieGG commented 3 years ago

Let us know if this works.

I know at one point a few years ago we had our repos working with the TinkerBoard but I'm not sure if they are still compatible. Specifically our matrixio-kernel-modules.