fvollmer / SIP-Heating-Gateway

Remote control any device by calling your raspberry pi with your phone via sip
Other
2 stars 0 forks source link

Build on Raspberry Pi 3B+ #2

Open SSStechnical opened 4 years ago

SSStechnical commented 4 years ago

Hi I'm interested in getting your project running but only have a Raspberry Pi 3B+. I tried flashing the prebuilt image but this just hangs on the rainbow boot screen. I then tried to build it but when running make -C buildroot it gives the following error:

tmp-divrem_1.s: Assembler messages:
tmp-divrem_1.s:129: Error: selected processor does not support `mls r1,r4,r8,r11' in ARM mode
tmp-divrem_1.s:145: Error: selected processor does not support `mls r1,r4,r8,r11' in ARM mode
tmp-divrem_1.s:158: Error: selected processor does not support `mls r1,r4,r8,r11' in ARM mode
tmp-divrem_1.s:175: Error: selected processor does not support `mls r1,r4,r3,r8' in ARM mode
tmp-divrem_1.s:209: Error: selected processor does not support `mls r11,r4,r12,r3' in ARM mode
Makefile:768: recipe for target 'divrem_1.lo' failed
make[3]: *** [divrem_1.lo] Error 1
make[3]: *** Waiting for unfinished jobs....
 /usr/bin/gcc -c -DHAVE_CONFIG_H -I. -I.. -D__GMP_WITHIN_GMP -I.. -DOPERATION_sqr_basecase -I/root/SIP-Heating-Gateway/software/buildroot/output/host/include -O2 -I/root/SIP-Heating-Gateway/software/buildroot/output/host/include -Wa,--noexecstack tmp-sqr_basecase.s -fPIC -DPIC -o .libs/sqr_basecase.o
make[3]: Leaving directory '/root/SIP-Heating-Gateway/software/buildroot/output/build/host-gmp-6.1.2/mpn'
Makefile:956: recipe for target 'all-recursive' failed
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory '/root/SIP-Heating-Gateway/software/buildroot/output/build/host-gmp-6.1.2'
Makefile:775: recipe for target 'all' failed
make[1]: *** [all] Error 2
make[1]: Leaving directory '/root/SIP-Heating-Gateway/software/buildroot/output/build/host-gmp-6.1.2'
package/pkg-generic.mk:266: recipe for target '/root/SIP-Heating-Gateway/software/buildroot/output/build/host-gmp-6.1.2/.stamp_built' failed
make: *** [/root/SIP-Heating-Gateway/software/buildroot/output/build/host-gmp-6.1.2/.stamp_built] Error 2
make: Leaving directory '/root/SIP-Heating-Gateway/software/buildroot'

Are you able to advise on what changes I need to make to get this to compile correctly?

fvollmer commented 4 years ago

Hi,

it shouldn't be hard to get this running on a Raspberry Pi 3b+, but I simply havn't tried it. I can try to add a build config.

Could you please tell me all the steps you did to compile and your OS? I need this info to reproduce your error message.

SSStechnical commented 4 years ago

Hi, thanks for your help with this

cat /etc/os-release gives: PRETTY_NAME="Raspbian GNU/Linux 9 (stretch)" NAME="Raspbian GNU/Linux" VERSION_ID="9" VERSION="9 (stretch)" VERSION_CODENAME=stretch ID=raspbian ID_LIKE=debian HOME_URL="http://www.raspbian.org/" SUPPORT_URL="http://www.raspbian.org/RaspbianForums" BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"

I ran apt update and apt upgrade; Then followed your How To Build The SD Card Image steps:

  1. Clone repository (use --recursive to get buildroot submodule)
  2. Change into software folder (cd software)
  3. make BR2_EXTERNAL=$PWD/br-external -C buildroot raspberrypi2-heating-control_defconfig
  4. make -C buildroot

Steps 1-3 completed successfully but 4 resulted in the error. I'm not really sure how the make command works but the error seemed to be to do with the processor and I'm aware the 3B uses a different processor to the 2B

fvollmer commented 4 years ago

Are you trying to build on a raspberry pi? I'm not sure if this is supported by buildroot and even if it is supported it would probably take forever.

I created a PR to add support for the Raspberry Pi 3 (#3). The build seems to work and you could try the build artifact from here: https://github.com/fvollmer/SIP-Heating-Gateway/suites/1280634537/artifacts/19854112 (I didn't test it). If it works I could tag a new release.

fvollmer commented 4 years ago

It seems like my link isn't public. I'll see what I can do about this.

And I think it would be more useful to have one universal image instead of different images for every raspberry pi variant. This shouldn't be too hard. I'm just not sure about the serial console.

fvollmer commented 4 years ago

I created a pre release which should support the raspberry pi 2 and 3 (see https://github.com/fvollmer/SIP-Heating-Gateway/releases/tag/v1.1). I currently have neither a pi2 nor a pi3 at hand and couldn't test it yet. It would be great if you could test it and report back. I would also love to hear if the serial console is working.

Regarding your build error: I didn't try to reproduce it. The intended use is crosscompiling. Building it directly on the pi is a pretty niche (and slow!) application. I think the build process works fine, because the automatic build scripts were sucessful to cross compile it on ubuntu 18.04. To avoid further confusion I added a note about cross compiling to the README.md.