Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Armbian support for OctoPi #232

Closed
guysoft opened this issue Jun 4, 2016 · 64 comments
Closed

Armbian support for OctoPi #232

guysoft opened this issue Jun 4, 2016 · 64 comments

Comments

@guysoft
Copy link
Owner

guysoft commented Jun 4, 2016

Hey all,
I have opened a new branch called armbian, which has a variant under that name that lets you build OctoPi on Armbian. There is a a big list of devices that run armbian. And it would be interesting to hear if anyone there is a call for a popular device.

For now I am testing using a HummingBoard kindly provided by SolidRun, and it seems like OctoPrint, wifi system and webcams work smoothly.
The beta image of the HummingBoard is available here:
https://storage.googleapis.com/octoprint/Armbian_5.10_Cubox-i_Debian_jessie_3.14.67-0.14.0_beta.zip

md5:
https://storage.googleapis.com/octoprint/Armbian_5.10_Cubox-i_Debian_jessie_3.14.67-0.14.0_beta.zip.md5

@universam1
Copy link

universam1 commented Jun 15, 2016

Seriously interested for the Orange PI PC.
Will try this branch, thanks for good work!

Could you give some more information how to build with Armbian?

@guysoft
Copy link
Owner Author

guysoft commented Jun 15, 2016

  1. Download the armbian image you want, and place it in src/image-variants
  2. You will need to 7z extract it, and then zip (I just didn't write a method that can work with 7z yet). Note the zip should start with the word Armbian and end with .zip.
  3. Then run
git checkout armbian
cd src
sudo ./build armbian

or if you using the vagrant method:

git checkout armbian
cd src/vagrant
sudo ./run_vagrant_build.sh armbian

Like any other variant.

To confirm the build is indeed using the correct variant you can see in the config setting its picking the Armbian image, here is an example output:

--> Building VARIANT armbian, FLAVOR default
Sourcing variant config /OctoPi/src/variants/armbian/config...
================================================================
Using the following config:
OCTOPI_APT_CACHE = /OctoPi/src/workspace-armbian/aptcache
OCTOPI_APT_PROXY = 
OCTOPI_BUILD_REPO_MIRROR = 
OCTOPI_CHROOT_SCRIPT_PATH = /OctoPi/src/chroot_script
OCTOPI_COMMIT = 11f143544c51e016d20bb469390a9856a01a365c
OCTOPI_CURAENGINE_ARCHIVE = https://github.com/Ultimaker/CuraEngine/archive/15.04.6.zip
OCTOPI_CURAENGINE_VERSION = 15.04.6
OCTOPI_FBCP_REPO_BRANCH = 
OCTOPI_FBCP_REPO_BUILD = https://github.com/tasanakorn/rpi-fbcp
OCTOPI_FBCP_REPO_DEPTH = 1
OCTOPI_FBCP_REPO_SHIP = https://github.com/tasanakorn/rpi-fbcp
OCTOPI_IMAGE_ENLARGEROOT = 400
OCTOPI_IMAGE_PATH = /OctoPi/src/image
OCTOPI_IMAGE_RASPBIAN = no
OCTOPI_IMAGE_RESIZEROOT = 500
OCTOPI_INCLUDE_CURAENGINE = yes
OCTOPI_INCLUDE_HAPROXY = yes
OCTOPI_INCLUDE_MJPGSTREAMER = yes
OCTOPI_INCLUDE_OCTOPIPANEL = no
OCTOPI_INCLUDE_OCTOPRINT = yes
OCTOPI_INCLUDE_WIRINGPI = no
OCTOPI_MJPGSTREAMER_REPO_BRANCH = master
OCTOPI_MJPGSTREAMER_REPO_BUILD = 
OCTOPI_MJPGSTREAMER_REPO_DEPTH = 1
OCTOPI_MJPGSTREAMER_REPO_SHIP = https://github.com/jacksonliam/mjpg-streamer.git
OCTOPI_MOUNT_PATH = /OctoPi/src/workspace-armbian/mount
OCTOPI_OCTOPIPANEL_REPO_BRANCH = master
OCTOPI_OCTOPIPANEL_REPO_BUILD = 
OCTOPI_OCTOPIPANEL_REPO_DEPTH = 1
OCTOPI_OCTOPIPANEL_REPO_SHIP = https://github.com/jonaslorander/OctoPiPanel.git
OCTOPI_OCTOPRINT_REPO_BRANCH = master
OCTOPI_OCTOPRINT_REPO_BUILD = 
OCTOPI_OCTOPRINT_REPO_SHIP = https://github.com/foosel/OctoPrint.git
OCTOPI_OVERRIDE_HOSTNAME = octopi
OCTOPI_PATH = /OctoPi/src
OCTOPI_POSTSCRIPT = 
OCTOPI_PRESCRIPT = 
OCTOPI_PYPI_INDEX = 
OCTOPI_ROOT_PARTITION = 1
OCTOPI_SCRIPT_PATH = /OctoPi/src
OCTOPI_WORKSPACE = /OctoPi/src/workspace-armbian
OCTOPI_ZIP_IMG = /OctoPi/src/image-variants/Armbian_5.10_Cubox-i_Debian_jessie_3.14.67.zip
================================================================
/OctoPi/src/workspace-armbian /OctoPi
Archive:  /OctoPi/src/image-variants/Armbian_5.10_Cubox-i_Debian_jessie_3.14.67.zip
  inflating: Armbian_5.10_Cubox-i_Debian_jessie_3.14.67.raw 

You can see its extracting Armbian_5.10_Cubox-i_Debian_jessie_3.14.67.raw.
If you want to re-run it, delete the folder src/workspace-armbian

@guysoft
Copy link
Owner Author

guysoft commented Jun 26, 2016

@universam1 Any luck? I was considering building it for you on condition you test it and report back here.

@universam1
Copy link

@guysoft Sorry for late reply - I was struggling with Wifi driver on Armbian.

I am very willing to test, thanks for help!

@universam1
Copy link

universam1 commented Jul 5, 2016

Having following issues when running the build under Ubuntu 14.04 VM:

++ this_command='apt-get update'
+ apt-get update
Err:1 http://ports.ubuntu.com xenial InRelease
  Could not resolve 'ports.ubuntu.com'
...
E: Failed to fetch http://ports.ubuntu.com/pool/main/a/....

... and so on, fails at the end.

Looks like the mounted image cant reach out to internet, although the URLs that fail all are resolvable if tried manually from within the VM.

Any ideas?

EDIT:
Found the reason, the pre-shipped resolv.conf
src / variants / armbian / filesystem / root / etc / resolv.conf `
does not fit to my needed VM settings. So just replace this file with the VM ones.
Better would be, to use the VMs resolve.conf instead of shipping one.

@universam1
Copy link

@guysoft Awesome, works fantastic! :-D

jessie 5.14 still has wifi issues, but if anyone interested I created a working repo: https://github.com/universam1/rtl8188eu

I tried with Xenial, but vagrant failed because of the box image which can be fixed with using bento/ubuntu14.4.
Next issue cffi is not available so had to use pip instead.
This failed because of missing rights for .cache, can be fixed by using su -u with option -H.

But your image work perfect, thanks for the good work!

@guysoft
Copy link
Owner Author

guysoft commented Jul 5, 2016 via email

@tedo2007
Copy link

Any news on this?

@guysoft
Copy link
Owner Author

guysoft commented Sep 10, 2016 via email

@universam1
Copy link

Yes it runs stable since weeks! No issues, thanks!

@tedo2007
Copy link

Thanks. Universam1 what device did you use i have a orange pi lite

@tedo2007
Copy link

Also how did you go about installing?

@universam1
Copy link

I use a orange pi pc with 1gb ram. That's never needed, 512 will be way
enough.

Am Montag, 12. September 2016 schrieb tedo2007 :

Thanks. Universam1 what device did you use i have a orange pi lite


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#232 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AKWT2VDtVXdRF0xpF7_xEx2HayidDCXWks5qpWmSgaJpZM4IuHZh
.

@guysoft guysoft mentioned this issue Sep 14, 2016
@guysoft
Copy link
Owner Author

guysoft commented Sep 14, 2016

Branch has been merged In case anyone missed that

@tedo2007
Copy link

Sorry for the dumb question but what does that mean?

@guysoft
Copy link
Owner Author

guysoft commented Sep 17, 2016 via email

@tedo2007
Copy link

Sorry, what does merged mean when it comes to the branch. I know what branching means.

@tedo2007
Copy link

Disregard. Figured it out. Thanks

@poorredneck
Copy link

I hate to be "that guy" but I have been struggling to get OctoPrint running on Armbian 5.25 when installed manually. Won't autostart on boot, and doesn't recognize USB port.

I am very new to linux, and have no idea how to build one from here. I have the Armbian 5.25 Desktop version with Ubuntu Xenial image, how do I go about making this for the Orange Pi Lite using Armbian 5.25 and Octoprint?

I don't have a computer that runs linux, I guess I could try and get a VM going. Could it be built on the Orange Pi?

Thank you in advance for any help.

@anthonywob
Copy link

There is a good guide here http://www.orangepi.org/orangepibbsen/forum.php?mod=viewthread&tid=594 That goes through the steps. I've done it but couldn't get autostart as well so just use Terminal to start it and run int he background then close the shell and leave it be. I'm a noon to Linux as well so learning as I go as well.

@guysoft
Copy link
Owner Author

guysoft commented Feb 12, 2017

@anthonywob OctoPi can be built for Armbian. I think knowing how to build is much better, it lets you switch the base image when a new image is out. Long winding guides is why I built OctoPi.

@poorredneck Can you please link the exact base image you want?
There is already an OrangePi build at the top of this issue here: #232 (comment)
It could help if you explain why you need a different one.

@poorredneck
Copy link

Armbian 5.25 Desktop
Direct Download Link:
https://dl.armbian.com/orangepilite/Ubuntu_xenial_default_desktop.7z

My issue is more of ignorance than anything lol. This Orange Pi is the first time I've touched linux in 10 years. I dabbled with it in high school but most of that knowledge is gone.
Is the version linked above a "server" version (no desktop GUI) I would like to retain the desktop GUI as I will eventually be using this PI for not just Octoprint, and would just like to have a GUI environment.

I am running that version of Armbian right now, with Octoprint installed manually but as stated above can not get it to auto boot, or recognize USB/Serial port. I was using a very old image before hand but CPU scaling was broken and was stuck at min frequency no matter what I tried to fix it. Because it is so old, no-body would support it or assist with debugging it. Everybody says to start fresh. I did just that but now I have no working Octoprint for the reasons listed above.

Thank you for the fast response!

@poorredneck
Copy link

@anthonywob that is exactly the same article that I used. My issue is when I close the terminal shell the instance of Octoprint stops as well.
Also there is not USB/Serial. Only option on the drop down is Auto and that doesn't work.

@poorredneck
Copy link

poorredneck commented Feb 13, 2017

So just to make sure I understand this correctly.
Presumption #1: I can build this on the Orange Pi
Presumption #2: I can download any version of Armbian, just copy it to the /img/src directory.

The tutorial is assuming I have more knowledge than I really do. I can usually figure stuff out, but I'm just having difficulty with this.

The Armbian 7z that is downloaded will contain a .img file. I am to unzip the .img file, then ZIP that .img file with the proper naming structure outlined above. Armbian.zip would work.

I then copy that file to /img/src/

The next step you say : git checkout armbian

Is this assuming I have cloned it to the OrangePi first?
$ git -clone https://github.com/guysoft/OctoPi.git

@poorredneck
Copy link

poorredneck commented Feb 13, 2017

Ok, so I have burned and setup the image you posted using Armbian 5.14 listed above... but how the hell do I connect to WiFi?
nmtui doesn't work on the command line. Tried running sudo nmtui-connect and says not found.
I edited the octopi-network.txt file on the boot partition but that did not work.

Would it be possible for somebody to build a version using the image here:
https://dl.armbian.com/orangepilite/Ubuntu_xenial_default_desktop.7z

@anthonywob
Copy link

I don't know enough to help you out with the process I used.
Start the Octoprint server ./run
Then press ctrl + z "this stops/pauses the process"
Then type bg "moves the process to the background"
Then type disown -h "makes it so it doesn't end when you close the shell"

@guysoft
Copy link
Owner Author

guysoft commented Mar 11, 2017

@anthonywob You need to set up your network connection, if you are having issues setting up wireless I suggest you try first an ethernet connection.
Also what is the output of sudo ifconfig -a?

@anthonywob
Copy link

@guysoft I'm not using wifi. Currently have Ethernet connected. I attached an image of the output as I can't connect via SSH yet as it's not on the network.
img_1310

@guysoft
Copy link
Owner Author

guysoft commented Mar 11, 2017

Perhaps your network is on ipv6?

What is the output of sudo mii-tool eth0?

@anthonywob
Copy link

Im not sure.
Output to that command is:
negotiated 100baseTx-FD, link ok

@anthonywob
Copy link

I checked my router and I have not enable ipV6 so I should still be on ipV4.
test-ipv6.com confirms I'm still on ipV4 - if this is what you mean.

@anthonywob
Copy link

Also, looks like the orange pi is showing up in my LAN connected devices
with only this:
FE80::D84D:2AFF:FEAF:9F8 unknown DA:4D:2A:AF:09:F8 Ethernet 0-00-00 00:00:00.00
but not IP address usually there are two entries:
192.16.0.# "the name of device" "MAC address" "connection type" "expiration"
(then a repeat with the IP address changed to FE80:: (numbers and letters) "device name" etc

@anthonywob
Copy link

So it seems for some reason my router isn't assigning this device an ipV4 address only an ipV6 even though it assign ipV4 for all my other devices.
Using the ipV6 i was able to SSH into the orangepi and set it up.
using:
ifconfig eth0 192.168.0.100
I can manually assign an IP address and connect through my browser but this last until a reboot, on rebooting the ipV4 is lost.
Is there a way to permanently assign the ipV4 address?
Tomorrow I will work on getting a webcam linked - if the one I have lying around ends up working.

@guysoft
Copy link
Owner Author

guysoft commented Mar 14, 2017

This seems to be worth to ask on Arabian fourm why that happens. Its going a little beyond the knowledge I have of their system. It might be something they came across.
You can set up a static IP using /etc/network/interfaces. Here are instructions on that.

@gyrex
Copy link

gyrex commented Jun 7, 2017

Hi, Thanks for providing this wonderful resource! I'm trying to build a version of octopi from Armbian_5.27_Orangepilite_Debian_jessie_default_3.4.113 and I'm getting the following error message:

Device                                                       Boot Start     End Sectors  Size Id Type
Armbian_5.27_Orangepilite_Debian_jessie_default_3.4.113.img1       2048 3327999 3325952  1.6G 83 Linux

Command (m for help): The partition table has been altered.
Syncing disks.

e2fsck 1.42.13 (17-May-2015)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/loop0: 48524/78400 files (0.1% non-contiguous), 219918/313344 blocks
resize2fs 1.42.13 (17-May-2015)
Resizing the filesystem on /dev/loop0 to 415744 (4k) blocks.
The filesystem on /dev/loop0 is now 415744 (4k) blocks long.

Resized parition 1 of Armbian_5.27_Orangepilite_Debian_jessie_default_3.4.113.img to +400 MB
burr
1
Mounting image Armbian_5.27_Orangepilite_Debian_jessie_default_3.4.113.img on /home/john/git/OctoPi/src/workspace-armbian/mount, offset for boot partition is 1048576, offset for root partition is 1048576
~/git/OctoPi/src/workspace-armbian/mount ~/git/OctoPi/src/workspace-armbian ~/git/OctoPi/src
Injecting variant pre script from /home/john/git/OctoPi/src/variants/armbian...
'/home/john/git/OctoPi/src/variants/armbian/filesystem' -> './filesystem'
'/home/john/git/OctoPi/src/variants/armbian/filesystem/root' -> './filesystem/root'
'/home/john/git/OctoPi/src/variants/armbian/filesystem/root/etc' -> './filesystem/root/etc'
'/home/john/git/OctoPi/src/variants/armbian/filesystem/root/etc/network' -> './filesystem/root/etc/network'
'/home/john/git/OctoPi/src/variants/armbian/filesystem/root/etc/network/interfaces' -> './filesystem/root/etc/network/interfaces'
'/home/john/git/OctoPi/src/variants/armbian/filesystem/root/etc/resolv.conf' -> './filesystem/root/etc/resolv.conf'
'/home/john/git/OctoPi/src/variants/armbian/filesystem/root/etc/wpa_supplicant' -> './filesystem/root/etc/wpa_supplicant'
'/home/john/git/OctoPi/src/variants/armbian/filesystem/root/etc/wpa_supplicant/wpa_supplicant.conf' -> './filesystem/root/etc/wpa_supplicant/wpa_supplicant.conf'
cp: missing destination file operand after 'usr/bin'
Try 'cp --help' for more information.

Build.log attached.
build.log.txt

Any ideas?

@guysoft
Copy link
Owner Author

guysoft commented Jun 7, 2017

@gyrex I think its faling on the line

#black magic of qemu-arm-static
cp `which qemu-arm-static` usr/bin

which means you don't have qemu-arm-static installed, which is a requirement listed in the README

@gyrex
Copy link

gyrex commented Jun 7, 2017

@guysoft Thanks for your prompt response! I'm trying to build this in a vm using an i386 version of ubuntu and can't find qemu-arm* in apt-get. Will this work or do I need to build this on an ARM system?

@guysoft
Copy link
Owner Author

guysoft commented Jun 7, 2017

Hey,
The nightly builds are also done on a i386 machine. I suggest you use the vagrant build method as described here

@gyrex
Copy link

gyrex commented Jun 7, 2017

Thanks for your help @guysoft OK, the package on ubuntu is "qemu-user-static" and I got a little further but now I'm getting another build error. Build log attached.

build.log2.txt

Any ideas mate?

@guysoft
Copy link
Owner Author

guysoft commented Jun 7, 2017

@gyrex For some reason, that image does not have i2c installed, and therefore no i2c user group.
So you will need to remove the ,i2c from the line in this file

@gyrex
Copy link

gyrex commented Jun 7, 2017

@guysoft Do you mean my ubuntu system doesn't have an i2c user group or the armbian image? I'll remove i2c from the line in any case and let you know how it goes.

@guysoft
Copy link
Owner Author

guysoft commented Jun 7, 2017 via email

@gyrex
Copy link

gyrex commented Jun 7, 2017

I can't run vagrant because I require a licence for a vmware provider apparently. I removed i2c from pre_chroot_script and I'm still getting error messages. Build log attached.

I think I'll install a fresh version of ubuntu armbian on my OrangePi and try building it on that.

build.log3.txt

@gyrex
Copy link

gyrex commented Jun 7, 2017

@guysoft I tried building this on the OrangePi using the Ubuntu xenial build and it failed. build log attached.
build.log4.txt

@guysoft
Copy link
Owner Author

guysoft commented Jun 7, 2017 via email

@gyrex
Copy link

gyrex commented Jun 7, 2017

  1. I'm not running this in a virtual environment. It's running natively on the OrangePi Lite running Armbian_5.27_Orangepilite_Ubuntu_xenial_default_3.4.113_desktop
  2. I'm trying to build octopi using the "Armbian_5.27_Orangepilite_Debian_jessie_default_3.4.113" image

I don't know why it's not building :(

@gyrex
Copy link

gyrex commented Jun 8, 2017

@guysoft have you got any other suggestions mate? Sorry to bug you but I'm not well versed on build environments. I really appreciate your help :)

@guysoft
Copy link
Owner Author

guysoft commented Jun 8, 2017

Are you building this on the orangepi or on a different machine? It should be built on a different machine.
Please use vagrant

@hogtave
Copy link

hogtave commented Jun 10, 2017

Hi everyone,
Thanks guysoft and everyone helping linux newbs like me!
Is there any chance someone built Octopi for the Orange Pi zero using either the Debian or Ubuntu image?
I tried both build method without any success. Building directly on the Opi0 gives me an error ("losetup: /dev/loop0: detach failed: Device or resource busy"), so i tried the vagran method (using a VM) but couldn't make it work ("Couldn't open file /home/vm/Octopi-armbian/src/base" when sudo vagrant up).

@guysoft
Copy link
Owner Author

guysoft commented Jun 10, 2017 via email

@hogtave
Copy link

hogtave commented Jun 10, 2017

I did install vagrant and all as described in the guide and virtualbox 4.3 (newer version are not supported).

This is the full error message i get

Bringing machine 'default' up with 'virtualbox' provider...
==> default: Box 'base' could not be found. Attempting to find and install...
default: Box Provider: virtualbox
default: Box Version: >= 0
==> default: Adding box 'base' (v0) for provider: virtualbox
default: Downloading: base
An error occurred while downloading the remote file. The error
message, if any, is reproduced below. Please fix this error and try
again.

Couldn't open file /home/vm/Downloads/OctoPi-armbian/src/base

@gyrex
Copy link

gyrex commented Jun 10, 2017

@hogtave "Building directly on the Opi0 gives me an error ("losetup: /dev/loop0: detach failed: Device or resource busy")"

I got the same error when trying to build on my OPi Lite. I haven't tried building using vagrant but I'll give it a try. Let me know how you get on because it's frustrating me as well :(

@guysoft
Copy link
Owner Author

guysoft commented Jan 4, 2018

Closing, it works, talks about documentation go here:
guysoft/CustomPiOS#7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants