How To: Easily Install Openhab2 on Odroid C2 ARM64

@matt1

Tried to install Zulu following your script on Odroid C4 running Ubuntu 20.04 (clean system) :

sudo dpkg --add-architecture armhf
sudo apt-get update && sudo apt-get dist-upgrade -y

This reports 2 errors :
N: Skipping acquire of configured file ‘main/binary-arm64/Packages’ as repository ‘http://repos.azulsystems.com/ubuntu stable InRelease’ doesn’t support architecture ‘arm64’
N: Skipping acquire of configured file ‘main/binary-armhf/Packages’ as repository ‘http://deb.odroid.in/c4 bionic InRelease’ doesn’t support architecture ‘armhf’

The rest of the installation seems to go well, except that all files are owned by kernoops and if I try to do
/usr/lib/jvm/zulu8.46.0.225-ca-jdk8.0.252-linux_aarch32hf/bin/java
it will return :
-bash: java: command not found
even though java clearly exists …

I suppose this somewhat curious bash error message is the result of the arm32hf architecture not being recognized - and as a result it won´t run the java arm32hf binary …

Any ideas of how to get around this - or is this just a matter of wait & pray that Hardkernel will add support for the arm32hf architecture to the C4 repositories ?

Thx for any input you may provide !

Are you using Ubuntu mate, minimal, or server?

Ubuntu Mate desktop image (=only version shipped on the C4 at the moment)

http://ppa.linuxfactory.or.kr/images/raw/arm64/focal/ for Ubuntu minimal 20-04 LTS.

Did you try using Matt’s script or just trying to install Zulu?

I tried the Zulu installation part of Matt´s script … (by simply copying the commands and changing the zulu version to the current one)

No point in continuing with Openhab installation if I can´t even do ´java -version´ :cry:

Flash the minimal image I linked above and try the script again but without changing the java version and adding the openhabian-config option. Then after OH installs use openhabian-config tool to update java.

Kinda odd I just flashed Ubuntu Mate desktop on eMMC to give it a try. :upside_down_face:

Thkx for giving that a try …

I´d like to stick to the std Ubuntu image, because I may want to run other stuff next to Openhab as well …
(also I am new to this sort of board, only did some stuff on arduino in the past. I therefor wouldn´t like to make major platform changes - haven´t got eMMC lying around (yet) either - am still discovering the Odroid world. Ubuntu Mate seems ok, although I am used to Linux Mint)

I understand, I just recently got my Odriod and installed Debian to test with the script. It worked well so I thought I would give Ubuntu Desktop a try but will most likely change to minimal version as it will run headless.

I haven’t powered up the image yet but I will let you know if I get it working. Meantime try to install openhabian-config tool and see if that will resolve the Zulu issue.

# install git
sudo apt-get update
sudo apt-get install git

# download and link
sudo git clone https://github.com/openhab/openhabian.git /opt/openhabian
sudo ln -s /opt/openhabian/openhabian-setup.sh /usr/local/bin/openhabian-config

# execute
sudo openhabian-config

If I may chime in

I’d recommend a headless version of a Debian based OS, just to keep things simple.

@H102

Got my C4 5 days ago …

The sudo apt-get update resulted in the same 2 errors :
N: Skipping acquire of configured file ‘main/binary-arm64/Packages’ as repository ‘http://repos.azulsystems.com/ubuntu stable InRelease’ doesn’t support architecture ‘arm64’
N: Skipping acquire of configured file ‘main/binary-armhf/Packages’ as repository ‘http://deb.odroid.in/c4 bionic InRelease’ doesn’t support architecture ‘armhf’

but thereafter installation of the configtool went well and the openhabian-config tool starts up o.k.

@MDAR
You may chime in … :grinning: , on the Hardkernel forum it was suggested I move to Armbian (stable version yet to be released for C4 …). But as mentioned to H102 for now I had like to stick with the standard installed Ubuntu Mate and first get to know this little beauty. Also, isn´t Ubuntu based on Debian ? So how would that change things ? The issue here seems to be ARM32hf support on the ARM64 based Odroid C4 …

Yup

Think that through for a second…

Strip it back to a Debian back end and there’s less for the CPU to be doing.

Don’t get me wrong, my big desktop machine runs Linux Ubuntu Mate or Studio, depending on the tasks I’ve got to do.

But there isn’t a desktop manager in sight on any of the SBC machines.

I’ve even learnt how to run single applications in a standalone X Window, so that I don’t have to run a desktop manager.

Think of it as putting 500Kg of bricks in the back of your car.

Never the twain…

FYI

My ODroid C2 machines all run Java 64 bit without any issues.

(Default Java in DietPi OS, which is a stripped down Debian OS {not yet available for the C4})

Took a bit for everything to install but OH with Ubuntu desktop is up and running.

image

1 Like

Hehe it says free memory is 0, and used is 0 as well :slight_smile:

I don’t know what hardware you use for your desktop. I assume not something ancient … this is Nanopi T4, 2 years ago. https://www.youtube.com/watch?v=C0Bl0yjESLo

I don’t use SBC as a desktop, but Nico’s primary desktop is SBC - check his videos - they were made with it:
https://www.youtube.com/channel/UCpv7NFr0-9AB5xoklh3Snhg/videos

BTW. Updated Armbian, now also with (slightly improved) stock kernel.

Download + burn to eMMC + boot + create user + openhab web prompt in around 3m.

c4-legacy

Now both images are present - stock and mainline 5.6.y. All images - also stock from Hardkernel or just about anyone - are immature on the hardware (kernel) level at this moment … Armbian come without insecure Debian scripts replacements, has no spyware & provides clean build process.

On Odroid C2, mainline kernel based images is what one should run, not ancient stock 3.16.y.

Kernel is getting upgraded from 5.4.y → 5.6.y. in about two weeks.

2 Likes

If anyone is interested, I’ve tested the ODroid C4 and it’s working really well.

The Dropbox link for the Dietpi.com based openHAB2 images for both the C4 or C2 (very different images) can be found in this thread post

In what way are they different? Which one did I get ? :smiley:

Ones for the C2 board and the other is the C4… (I’m not sure how they are different on a board component level, but different they are)

Well, as you’ve got both boards now, I’d say that you’ve got both images.

Actually I havn´t got the C4 yet, but my plan is to get one.
I´ll play around with my C2 these next coupple of days. I got the “older” image file from you back in october.