Mojo Setup/Installation on Lesser-used Linux platforms

Post Reply
chipbuster
Posts: 2
Joined: October 27th, 2014, 10:37 am

Mojo Setup/Installation on Lesser-used Linux platforms

Post by chipbuster » October 27th, 2014, 10:57 am

Hey all. I installed the Xilinx ISE and Mojo Loader on Arch and Sabayon Linux earlier this week, and I spent a fair bit of time running into issues, so I figured I'd document what I can remember. Maybe it'll help someone else out of a weird issue or two.

(Sorry if this is the wrong place for this post, feel free to move it to the right spot)

When I first tried to run xsetup on Sabayon, I got a "Cannot connect to X Server".
There are two possible issues here. One is that your user doesn't have permission to connect to the local xserver. To change this, run

Code: Select all

xhost +local:$(whoami)
That will give your user permission to connect to the X server and launch the installer as described on the tutorial page.

The more problematic one is that your DISPLAY variable might not be configured correctly. This is probably not going to happen, but if the above fix didn't work, try running

Code: Select all

DISPLAY=0:0
to tell the installer which display to use.

=====================================

The bigger problem for me was getting the darn computer to recognize the Mojo and let me connect to it. I would plug in the Mojo and it wouldn't even be listed in my devices. If your computer doesn't seem to recognize the Mojo at all, then like me, your module (driver) loading is probably broken. You'll need to manually load the correct driver using

Code: Select all

sudo modprobe cdc-acm
Even after this, I couldn't list the /dev/ttyACM0 device in the Mojo loader, even though I could see it in /dev. After some trial and error, I discovered that for some reason, udev had decided to place the device under the uucp group. You have two choices: you can either add yourself to the uucp group, or force udev to place the mojo in dialout. I found the second to be easier since they kindly provided a udev file with the mojo loader. Simply go into the file and add the attribute GROUP="dialout" at the end of each line so that the udev now looks like:

Code: Select all

SUBSYSTEM=="usb", ACTION=="add", ATTRS{idVendor}=="29dd", MODE="666"
ATTRS{idVendor}=="29dd", ATTRS{idProduct}=="8001", ENV{ID_MM_DEVICE_IGNORE}="1", GROUP="dialout"
ATTRS{idVendor}=="29dd", ATTRS{idProduct}=="0001", ENV{ID_MM_DEVICE_IGNORE}="1", GROUP="dialout"
That places the device node in the correct group, so that if you followed the setup instructions, you should be able to access it.

Unfortunately for me, my loader still refused to write anything. Running the mojo loader script from the terminal showed that something couldn't place a lock on /run/lock. It turns out that Arch Linux only lets the root user write to that directory. To change that, you'll need to copy the config to the right place as described at [url]https://bbs.archlinux.org/viewtopic.php?id=143400[url], then change some lines around inside to place /run/lock into a user group (or alternately, just change its permissions to 0777, though this can be dangerous).

Hope this helps someone!

NOTE: This was a lot of issues, but that's what happens when you use unsupported platforms. Stay on Ubuntu if you want an easy life!

embmicro
Site Admin
Posts: 834
Joined: March 24th, 2013, 12:45 pm

Re: Mojo Setup/Installation on Lesser-used Linux platforms

Post by embmicro » November 4th, 2014, 1:27 pm

For what it's worth I use Arch to develop the Mojo Loader and Mojo IDE. The fix for the USB stuff has to do with the permissions of the /var/lock directory.

To fix make or modify the file /etc/tmpfiles.d/legacy.conf with the following.

Code: Select all

# /etc/tmpfiles.d/legacy.conf
# Type Path Mode UID GID Age Argument
d /run/lock 0775 root lock - -
d /run/lock/lockdev 0775 root lock - -
Then make sure you're part of the groups lock, uucp, and dialout. Reboot and it should work. This is from https://aur.archlinux.org/packages/arduino/ since the Mojo uses the same USB library as Arduino.

chipbuster
Posts: 2
Joined: October 27th, 2014, 10:37 am

Re: Mojo Setup/Installation on Lesser-used Linux platforms

Post by chipbuster » November 18th, 2014, 2:25 am

Ah, I didn't know that. That's certainly a lot less convoluted than what I'd figured out. Thanks!

Post Reply