DarkElvenAngel
Posts: 162
Joined: Tue Mar 20, 2018 9:53 pm

Running Buildroot on a pi 3B+ [Solved]

Thu Jun 27, 2019 7:07 pm

Hello,

I'm trying out Buildroot for the first time and I am trying to do this on a RPI 3B+ to build for a RPI 0W.

I'm getting an error that says:

Code: Select all

mp-divrem_1.s:158: Error: selected processor does not support `mls r1,r4,r8,r11' in ARM mode
I've googled around and seems like the gcc installed is the issue.

Is there an easy way to install a prebuilt gcc that will work or do I really need to muck about in my apt settings to pull packages from Debian repositories?

I was wondering can't I just downloaded the packages from Debian and install them manually and not mess with the apt.source?If so what package(s) do I need?

Thanks,

Oh I'm running the latest raspbian Buster all upto date.
Last edited by DarkElvenAngel on Tue Jul 02, 2019 3:50 am, edited 1 time in total.

User avatar
rpdom
Posts: 15184
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: Running Buildroot on a pi 3B+

Thu Jun 27, 2019 8:23 pm

DarkElvenAngel wrote:
Thu Jun 27, 2019 7:07 pm
I was wondering can't I just downloaded the packages from Debian and install them manually
Most Debian packages will not run on a Pi Zero. They do not support the ARMv6 CPU that it has. That's why we have Raspbian.

DarkElvenAngel
Posts: 162
Joined: Tue Mar 20, 2018 9:53 pm

Re: Running Buildroot on a pi 3B+

Thu Jun 27, 2019 9:56 pm

rpdom wrote:
Thu Jun 27, 2019 8:23 pm
DarkElvenAngel wrote:
Thu Jun 27, 2019 7:07 pm
I was wondering can't I just downloaded the packages from Debian and install them manually
Most Debian packages will not run on a Pi Zero. They do not support the ARMv6 CPU that it has. That's why we have Raspbian.
I'm running a Pi 3 B+ though my understanding is that the compiler on that system isn't able to compile due to it missing build options( to keep it compatible with earlier Pi's.) I don't know for sure it would install the host version on the target.

User avatar
procount
Posts: 1734
Joined: Thu Jun 27, 2013 12:32 pm
Location: UK

Re: Running Buildroot on a pi 3B+

Thu Jun 27, 2019 10:35 pm

As this is your first time with buildroot, why not start building something that already exists and is known to work.
One example is noobs. https;//github.com/raspberry pi/noobs..
The initial build will take several hours as it builds all tools and libs, but thereafter it will be much quicker. You will need 6-8GB of free disk space.
Once you get that built and you understand it, you can start using buildroot for other projects.
PINN - NOOBS with the extras... https://www.raspberrypi.org/forums/viewtopic.php?f=63&t=142574

DarkElvenAngel
Posts: 162
Joined: Tue Mar 20, 2018 9:53 pm

Re: Running Buildroot on a pi 3B+

Thu Jun 27, 2019 11:07 pm

procount wrote:
Thu Jun 27, 2019 10:35 pm
As this is your first time with buildroot, why not start building something that already exists and is known to work.
One example is noobs. https;//github.com/raspberry pi/noobs..
The initial build will take several hours as it builds all tools and libs, but thereafter it will be much quicker. You will need 6-8GB of free disk space.
Once you get that built and you understand it, you can start using buildroot for other projects.
Could you please explain how that would be different?

All I have done are two actually build commands

Code: Select all

make raspberrypi0w_defconfig
make all
That's as far as it goes before erroring out

User avatar
procount
Posts: 1734
Joined: Thu Jun 27, 2013 12:32 pm
Location: UK

Re: Running Buildroot on a pi 3B+

Fri Jun 28, 2019 12:50 am

Have a look at the noobs readme concerning the pre-requisites you must install first. Like build-essential, etc.
PINN - NOOBS with the extras... https://www.raspberrypi.org/forums/viewtopic.php?f=63&t=142574

mich181189
Posts: 1
Joined: Fri Jun 28, 2019 2:31 pm

Re: Running Buildroot on a pi 3B+

Fri Jun 28, 2019 2:35 pm

If you’re using buildroot to produce a root filesystem, Debian packages don’t really come into it. By default, it builds its own toolchain - this should be compatible as long as you make sure you tell it you’re using a Zero (start with the correct defconfig or configure it equivalently)

DarkElvenAngel
Posts: 162
Joined: Tue Mar 20, 2018 9:53 pm

Re: Running Buildroot on a pi 3B+

Sat Jun 29, 2019 5:19 pm

mich181189 wrote:
Fri Jun 28, 2019 2:35 pm
If you’re using buildroot to produce a root filesystem, Debian packages don’t really come into it. By default, it builds its own toolchain - this should be compatible as long as you make sure you tell it you’re using a Zero (start with the correct defconfig or configure it equivalently)
The problem is the compiler from what I've read you need one that's built for the pi 3 and the Raspbian stock is for pi 1 for maximum compatibility. I've got gcc 9 freshly compiled I'm going to give it shot when I home.

DarkElvenAngel
Posts: 162
Joined: Tue Mar 20, 2018 9:53 pm

Re: Running Buildroot on a pi 3B+

Mon Jul 01, 2019 8:01 pm

Reporting in I've been a little busy and my pi has been working hard compiling successfully Buildroot.

I tried it out and the base install (without setting anything up) works like I expected. Now I'm rebuilding with wireless network tools and more customization to my build.

I had one issue with my keyboard not being recognized and having to use a different one.

The compile is still going on I keep having small issues with the compile missing something and having to restart it after sorting it out however...

The bottom line is yes you can compile Buildroot on a RPI but it will take days! Just getting menuconfigs to build took 45-60 minutes for busybox and I went to bed waiting for the kernel one so 3 hours plus for that one. Buildroot's menuconfig is not such a wait.

My RPI 3B+ has gcc 9 installed and a 1 GB swap file otherwise nothing really special beyond that.

I'll report back again after my customized version is built.
edit
My last build has finished successfully. I had two problems with it one was running out of space on my drive easy to solve. The other was a missing build library libstdc++6 this was installed didn't have support for LIBCXX_3.4.26 I had to install the package libstdc++6_9.1.0-5_armhf.deb from the Debian Experimental branch. I just used the following command to install and it worked.

Code: Select all

sudo dpkg --ignore-depends=gcc-9-base -i libstdc++6_9.1.0-5_armhf.deb
I really want to try this on a PI 4B with 4Gb of ram, swapping is killing the performance.

Return to “Advanced users”