Skip to content

Add support for ODroid / Raspberry Pi OS 64-bit #79

Closed

Description

@danmed

I believe the Micro USB port on the Odroid C2 is OTG... so do you think it would work?

Activity

  1. mtlynch commented on Jul 24, 2020

    @mtlynch
    Contributor

    It's possible. I don't have one on hand to check, but I'd welcome reports from anyone who does.

    Summary

    The big blocker is support for the usb-gadget-hid in the kernel, which Raspberry Pi OS has natively, but it's hard to enable on other boards.

    Board OS Status
    Raspberry Pi 4B Ubuntu 20.04 LTS 32-bit Works with the standard installer
    LibreComputer Tritium H5 Armbian_21.02.1_Tritium-h5_buster_current_5.10.12 TinyPilot on LibreComputer Tritium
    up squared Ubuntu 18.04 confirmed working, required manual work to adapt the install script for Ubuntu
    ODroid C1+/C2/C4 ubuntu-18.04.3-3.16-minimal-odroid Probably won't work because the latest official ODroid builds are on v3.16 of the Linux Filesystem, and TinyPilot depends on configfs-usb-gadget-hid, which was added in 3.19.
    ODroid C1+/C2/C4 ubuntu-20.04-3.16-minimal-odroid Same as above.
    ODroid C1+/C2/C4 DietPi 6.31.2 Still on the 3.16.85 kernel, so similar reason to above.
    ODroid C1+/C2/C4 Armbian_20.05.2_Odroidc2_buster_current_5.6.15 This seems close to working, but it fails to create the /dev/hidg0 file
    ODroid C2 ArchLinuxARM This article claims to demonstrate it, but I tried those exact steps, and it failed. It's worth noting that they used a different kernel version than currently ships with ArchLinuxARM.
    Banana Pi M2+ 2020-04-23-raspbian-stretch-bpi-m2p-sd-emmc Uses Python 3.5, but TinyPilot requires 3.7+. I even tried recompiling 3.7 from source, but it fails on python3 -m venv venv
  2. danmed commented on Jul 24, 2020

    @danmed
    Author

    It's possible. I don't have one on hand to check, but I'd welcome reports from anyone who does.

    I had a good go at it today.. Got debian stretch on an sd card and all updated. I had to make a couple of changes to the quick_install script.. Mainly either side of the ansible install.. Something like +u and -U above and below so that it would install..

    But after that, it failed while building wheels.. something like "bdist wheel" as an invalid command...

    I;ve not got it powered up at the moment so can't get exact errors.

  3. mtlynch commented on Jul 24, 2020

    @mtlynch
    Contributor

    The bdist_wheel is an innocuous error as far as I can tell. It's a bug in Ansible's pip installation, but it seems to continue the install using another method. If it failed, there should be an error further down in the Ansible log.

  4. danmed commented on Jul 24, 2020

    @danmed
    Author

    The bdist_wheel is an innocuous error as far as I can tell. It's a bug in Ansible's pip installation, but it seems to continue the install using another method. If it failed, there should be an error further down in the Ansible log.

    Ah, then maybe i shouldn't of quit the install :) I'll try it again tomorrow and get back to you.. hopefully i've ordered the correct hdmi to usb adapter..

    https://www.amazon.co.uk/gp/product/B08C7B4DKM/ref=ppx_yo_dt_b_asin_title_o02_s00?ie=UTF8&psc=1

    I got this one because the one linked from your blog had a months wait time!

  5. mtlynch commented on Jul 25, 2020

    @mtlynch
    Contributor

    That's a slightly different one, but all these products are just different packaging on top of the same MacroSilicon MS2109 chip, so it should work exactly the same.

  6. danmed commented on Jul 25, 2020

    @danmed
    Author

    That's a slightly different one, but all these products are just different packaging on top of the same MacroSilicon MS2109 chip, so it should work exactly the same.

    So i went back to a fresh debian install and ran through it again..

    i had to change a small part of the script :

    set +u
    . venv/bin/activate
    set -u
    

    And this is how it finished :

    running install
    running build
    running build_py
    creating build
    creating build/lib.linux-aarch64-3.5
    creating build/lib.linux-aarch64-3.5/cffi
    copying cffi/setuptools_ext.py -> build/lib.linux-aarch64-3.5/cffi
    copying cffi/vengine_cpy.py -> build/lib.linux-aarch64-3.5/cffi
    copying cffi/verifier.py -> build/lib.linux-aarch64-3.5/cffi
    copying cffi/error.py -> build/lib.linux-aarch64-3.5/cffi
    copying cffi/pkgconfig.py -> build/lib.linux-aarch64-3.5/cffi
    copying cffi/commontypes.py -> build/lib.linux-aarch64-3.5/cffi
    copying cffi/cffi_opcode.py -> build/lib.linux-aarch64-3.5/cffi
    copying cffi/vengine_gen.py -> build/lib.linux-aarch64-3.5/cffi
    copying cffi/backend_ctypes.py -> build/lib.linux-aarch64-3.5/cffi
    copying cffi/recompiler.py -> build/lib.linux-aarch64-3.5/cffi
    copying cffi/__init__.py -> build/lib.linux-aarch64-3.5/cffi
    copying cffi/cparser.py -> build/lib.linux-aarch64-3.5/cffi
    copying cffi/model.py -> build/lib.linux-aarch64-3.5/cffi
    copying cffi/ffiplatform.py -> build/lib.linux-aarch64-3.5/cffi
    copying cffi/api.py -> build/lib.linux-aarch64-3.5/cffi
    copying cffi/lock.py -> build/lib.linux-aarch64-3.5/cffi
    copying cffi/_cffi_include.h -> build/lib.linux-aarch64-3.5/cffi
    copying cffi/parse_c_type.h -> build/lib.linux-aarch64-3.5/cffi
    copying cffi/_embedding.h -> build/lib.linux-aarch64-3.5/cffi
    copying cffi/_cffi_errors.h -> build/lib.linux-aarch64-3.5/cffi
    running build_ext
    building '_cffi_backend' extension
    creating build/temp.linux-aarch64-3.5
    creating build/temp.linux-aarch64-3.5/c
    aarch64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fdebug-prefix-map=/build/python3.5-R9trRz/python3.5-3.5.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/ffi -I/usr/include/libffi -I/tmp/tmp.3CkJZ2vPVE/venv/include -I/usr/include/python3.5m -c c/_cffi_backend.c -o build/temp.linux-aarch64-3.5/c/_cffi_backend.o
    unable to execute 'aarch64-linux-gnu-gcc': No such file or directory
    error: command 'aarch64-linux-gnu-gcc' failed with exit status 1
    
    ----------------------------------------
    Command "/tmp/tmp.3CkJZ2vPVE/venv/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-3dg9wxx1/cffi/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-piwkymyq-record/install-record.txt --single-version-externally-managed --compile --install-headers /tmp/tmp.3CkJZ2vPVE/venv/include/site/python3.5/cffi" failed with error code 1 in /tmp/pip-build-3dg9wxx1/cffi/
    
  7. mtlynch commented on Jul 25, 2020

    @mtlynch
    Contributor

    Oh, I forgot that ODroid is 64-bit. I haven't tested with aarch64 yet.

    @KuroSaru got TinyPilot working on an aarch64 beta of Raspberry Pi OS. They had to manually run sudo apt-get install libffi-dev but that doesn't look like it's your issue.

    Would you be able to link to a gist of your full log? I can't tell from the snippet where the failure happened in the process.

  8. danmed commented on Jul 25, 2020

    @danmed
    Author

    Oh, I forgot that ODroid is 64-bit. I haven't tested with aarch64 yet.

    @KuroSaru got TinyPilot working on an aarch64 beta of Raspberry Pi OS. They had to manually run sudo apt-get install libffi-dev but that doesn't look like it's your issue.

    Would you be able to link to a gist of your full log? I can't tell from the snippet where the failure happened in the process.

    I would, but i seem to of corrupted the SD card again.. The power supply i'm using is a bit loose and it seems to have moved and shafted it.. if i get it going again i'll let you know... I may just buy a pi4 though to be honest.

  9. danmed commented on Jul 25, 2020

    @danmed
    Author
  10. mtlynch commented on Jul 25, 2020

    @mtlynch
    Contributor

    Thanks! It looks like it's failing while trying to install ansible. I just merged in #88 to let Ansible build with wheel like it's trying to do. It installs fine either way on Raspberry Pi OS 32-bit, but it might make a difference on aarch64.

    Can you try running the quick install command again now that I've updated it?

    curl -sSL https://raw.githubusercontent.com/mtlynch/tinypilot/master/quick-install | bash -

    Edit: Actually, to avoid potentially pulling a cached version of the install script, it's better if you run the specific branch's script:

    curl -sSL https://raw.githubusercontent.com/mtlynch/tinypilot/install-wheel/quick-install | bash -
  11. danmed commented on Jul 25, 2020

    @danmed
    Author

    I've just done

    sudo apt-get install python3-dev
    

    And it seems to be potentially working.. bear with me.

    Edit : I'm still using the old quick_install that i modifed...

    Edit again: I think the only error i got is

    TASK [mtlynch.tinypilot : enable dwc2 driver in boot config]     ***************************************************************************************************************************************************
    fatal: [localhost]: FAILED! => {"changed": false, "msg": "Destination /boot/config.txt does not exist !", "rc": 257}
    

    hitting the IP i get an nginx welcome page though..

  12. mtlynch commented on Jul 25, 2020

    @mtlynch
    Contributor

    It looks like you're still pulling the old Ansible role. Can you give the new script a try?

    curl -sSL https://raw.githubusercontent.com/mtlynch/tinypilot/install-wheel/quick-install | bash -

    It's idempotent, so running it multiple times should be fine.

  13. danmed commented on Jul 25, 2020

    @danmed
    Author
    https://raw.githubusercontent.com/mtlynch/tinypilot/install-wheel/quick-install

    Giving it a go now.. added my changes in so it runs for me.

  14. danmed commented on Jul 25, 2020

    @danmed
    Author

    So, it was all going great.. no bdist errors.. then this happened :

    https://gist.github.com/mtlynch/4e58cb6a4b5826f75b07b2b04ef12745

    im still just getting an nginx welcome page.

    I've noticed there's no /opt/tinypilot folder.. which tinypilot.conf seems to be pointing to..

    Just a ustreamer folder.

    [maintainer edit: moved long output to separate gist]

  15. 10 remaining items

  16. lamarios commented on Aug 18, 2020

    @lamarios

    I'm using Ubuntu 18.04 (x86_64) bits it seems that the dwc driver loaded is dwc3 though, I'm not sure it makes a difference. I tried to load dwc2 but it doesn't seem to do anything.

    cat /sys/kernel/config/usb_gadget/g1/UDC 
    dwc3.0.auto
    
  17. lamarios commented on Aug 18, 2020

    @lamarios

    Ok, i'm an idiot, it works perfectly fine, I was just running tiny pilot as my user and didn't have permission to /dev/hidg0 running tinypilot as root fixes the issue.

    Thanks ! Sent you a beer.

  18. mtlynch commented on Aug 18, 2020

    @mtlynch
    Contributor

    Thanks for the donation, @lamarios!

    Did you have to do anything special to get /dev/hidg0 to appear under Ubuntu 18.04 or did it just work right out of the box with the same TinyPilot scripts?

  19. lamarios commented on Aug 19, 2020

    @lamarios

    It worked straight away with what's in the repo.

  20. mtlynch commented on Aug 21, 2020

    @mtlynch
    Contributor

    I spent some time experimenting with other boards this week, but wasn't able to get TinyPilot working. I updated a comment near the top of the thread for reference.

  21. lamarios commented on Aug 21, 2020

    @lamarios

    For the up squared board. The install script probably works but I didn’t use it because I already had some conflicting services installed so I went the manual way.

  22. WarheadsSE commented on Feb 15, 2021

    @WarheadsSE
    Contributor

    I've had to do some tweaking due to poor detection of CPU type in the installation scripting (Ansible), but I've manged to get all variants of the LibreComputer Tritium H3 working with armbian.

  23. mtlynch commented on Feb 15, 2021

    @mtlynch
    Contributor

    @WarheadsSE awesome! Could you share the configuration you used?

  24. WarheadsSE commented on Feb 15, 2021

    @WarheadsSE
    Contributor

    @mtlynch That's the plan. I have to dig it all out of the nodes 😅

  25. WarheadsSE commented on Feb 15, 2021

    @WarheadsSE
    Contributor

    This gist covers the items needed to enable OTG, but I haven't yet found time to document a walk-through of how to enabled device tree overlay.

  26. WarheadsSE commented on Feb 15, 2021

    @WarheadsSE
    Contributor

    Said gist updated (plus another) for LibreComputer Tritium

  27. WarheadsSE commented on Feb 17, 2021

    @WarheadsSE
    Contributor
    Board OS Status
    LibreComputer Tritium H5 Armbian_21.02.1_Tritium-h5_buster_current_5.10.12 TinyPilot on LibreComputer Tritium

    Here's a new entry for above @mtlynch 👍

  28. mtlynch commented on Feb 17, 2021

    @mtlynch
    Contributor

    @WarheadsSE - added, thanks!

  29. locked and limited conversation to collaborators on Aug 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions