Build Domoticz from source on Raspberry and other Linux variants Topic is solved

On various Hardware and OS systems: pi / windows / routers / nas, etc

Moderator: leecollings

User avatar
erem
Posts: 230
Joined: Tuesday 27 March 2018 12:11
Target OS: Raspberry Pi / ODroid
Domoticz version: 2021.1
Location: Amsterdam/netherlands
Contact:

Re: Build Domoticz from source on Raspberry and other Linux variants

Post by erem »

@megamarco83

you wrote
EDIT:
a bit of topic: i use windows system daily and on same PC i installed Debian. Inside debian i have domoticz test
Every time i have to switch off windows than run debian to see domoticz test, otherwise it is offline.
there is a way to workaround this?
visualize debian is possible? how?
or other solution?
thanks

why don't you run domoticz test in a virtual linux debian machine (VMWare/Virtualbox) on your windows machine. that works for me.
Regards,

Rob
megamarco83
Posts: 108
Joined: Friday 21 September 2018 15:07
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Build Domoticz from source on Raspberry and other Linux variants

Post by megamarco83 »

erem wrote: Tuesday 05 January 2021 15:19 @megamarco83

you wrote
EDIT:
a bit of topic: i use windows system daily and on same PC i installed Debian. Inside debian i have domoticz test
Every time i have to switch off windows than run debian to see domoticz test, otherwise it is offline.
there is a way to workaround this?
visualize debian is possible? how?
or other solution?
thanks

why don't you run domoticz test in a virtual linux debian machine (VMWare/Virtualbox) on your windows machine. that works for me.
thanks i have a look at virtualbox but not succeed on NUC to emulate debian, but will try to understand better how it works.
thanks for your suggestion.

is it possible to compile on a different system, like debian installed on NUC and make the build compatible with raspberry pi3 ?
thanks
User avatar
kiddigital
Posts: 438
Joined: Thursday 10 August 2017 6:52
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Build Domoticz from source on Raspberry and other Linux variants

Post by kiddigital »

Look at the Wiki and search Build and Vagrant for more info on building on a virtual machine.

You could make a virtual Debian buster 32-bit and compile there. I would image that the binary could work on the Pi (as RaspOS = debian buster 32-bit based)
One RPi with Domoticz, RFX433e, aeon labs z-wave plus stick GEN5, ha-bridge 5.4.0 for Alexa, Philips Hue Bridge, Pimoroni Automation Hat
One RPi with Pi foundation standard touch screen to display Dashticz
User avatar
kiddigital
Posts: 438
Joined: Thursday 10 August 2017 6:52
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Build Domoticz from source on Raspberry and other Linux variants

Post by kiddigital »

kiddigital wrote:...

You could make a virtual Debian buster 32-bit and compile there. I would image that the binary could work on the Pi (as RaspOS = debian buster 32-bit based)
I have to correct myself; you can NOT copy the binary 1:1 as you build for a different architecture (x86) and not for the Pi (ARMv6-7).

You have to configure the compiler to cross-compile for the correct architecture first.
One RPi with Domoticz, RFX433e, aeon labs z-wave plus stick GEN5, ha-bridge 5.4.0 for Alexa, Philips Hue Bridge, Pimoroni Automation Hat
One RPi with Pi foundation standard touch screen to display Dashticz
User avatar
erem
Posts: 230
Joined: Tuesday 27 March 2018 12:11
Target OS: Raspberry Pi / ODroid
Domoticz version: 2021.1
Location: Amsterdam/netherlands
Contact:

Re: Build Domoticz from source on Raspberry and other Linux variants

Post by erem »

The reason i use a virtual machine is that it is way faster than the pi in compiling/debugging.
once i have the result i am looking for, i tar up the source tree and move it to the pi for a final compile.
for large compiles i do need to extend the swap file, but that is easy.

i found that setting up for cross-compiling on the vm was more trouble than i could handle :oops:
Regards,

Rob
megamarco83
Posts: 108
Joined: Friday 21 September 2018 15:07
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Build Domoticz from source on Raspberry and other Linux variants

Post by megamarco83 »

erem wrote: Wednesday 06 January 2021 14:54
once i have the result i am looking for, i tar up the source tree and move it to the pi for a final compile.
can you please explain in detail what steps of compiling you do in virtual machine and what step you use to finish the compile on RPI ?
thanks
Number8
Posts: 374
Joined: Friday 23 May 2014 7:55
Target OS: Linux
Domoticz version: 2022.1
Location: Saint Pierre de Jards
Contact:

Re: Build Domoticz from source on Raspberry and other Linux variants

Post by Number8 »

can you please explain in detail what steps of compiling you do in virtual machine
As for compiling with Vagrant/VirtualBox you may have a look here: viewtopic.php?f=47&t=35105
After doing that I was able to install domoticz on the same VM on a dedicated account. Everything is running smoothly. I will try now to get hands on cross compiling now. A bit challenging I guess
Debian buster on NUC and three RPi with buster.
megamarco83
Posts: 108
Joined: Friday 21 September 2018 15:07
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Build Domoticz from source on Raspberry and other Linux variants

Post by megamarco83 »

hi, thanks for reply, i'm a bit confused about your post.
what i thought to understood from @erem was:
he tar up the source tree and move it to the pi for a final compile
so i thought that he start to compile on a virtual machine and after that at certain step he compress the compiled source, move it to RPI and then "recompile" on RPI (guess that this time RPI will compile faster because major of the job was done by the virtual machine)
Number8
Posts: 374
Joined: Friday 23 May 2014 7:55
Target OS: Linux
Domoticz version: 2022.1
Location: Saint Pierre de Jards
Contact:

Re: Build Domoticz from source on Raspberry and other Linux variants

Post by Number8 »

Indeed, I thought you would be interested to know how to compile in a VM. Cross compile: I found this article that I haven't experienced yethttps://solarianprogrammer.com/2018/05/ ... pberry-pi/
Debian buster on NUC and three RPi with buster.
User avatar
erem
Posts: 230
Joined: Tuesday 27 March 2018 12:11
Target OS: Raspberry Pi / ODroid
Domoticz version: 2021.1
Location: Amsterdam/netherlands
Contact:

Re: Build Domoticz from source on Raspberry and other Linux variants

Post by erem »

@megamarco83

i was talking about general development, not specifically compiling domoticz, as i still do the compile at the pi.
but when i develop, eg in lazarus/delphi, c/c++ or python i develop and test on the VM.
then i tar up the SOURCE and do the final compile on the pi.

to enlarge your swap file
sudo dphys-swapfile swapoff
As root, edit the file /etc/dphys-swapfile and modify the variable CONF_SWAPSIZE: CONF_SWAPSIZE=4096
sudo dphys-swapfile swapon

hope this helps
Regards,

Rob
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest