Page 1 of 1

Compiling linux buildroot for esp32 gives error

Posted: Thu May 11, 2017 7:50 pm
by timl12332
hello,

I thought it would be fun to see if i can get buildroot linux to compile for esp32.
I already know i will probably get memory errors if i try to upload it but still i want to compile it. :D
BUt it throws an error when building buildroot:

Code: Select all

/usr/xtensa-buildroot-linux-uclibc/bin/ -B/home/tim/Desktop/linuxforesp32/buildroot-build/host/usr/xtensa-buildroot-linux-uclibc/lib/ -isystem /home/tim/Desktop/linuxforesp32/buildroot-build/host/usr/xtensa-buildroot-linux-uclibc/include -isystem /home/tim/Desktop/linuxforesp32/buildroot-build/host/usr/xtensa-buildroot-linux-uclibc/sys-include    -g -Os -O2  -g -Os -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE  -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem ./include   -fPIC -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector -Dinhibit_libc  -fPIC -I. -I. -I../.././gcc -I../../../libgcc -I../../../libgcc/. -I../../../libgcc/../gcc -I../../../libgcc/../include    -o _mulxc3.o -MT _mulxc3.o -MD -MP -MF _mulxc3.dep -DL_mulxc3 -c ../../../libgcc/libgcc2.c -fvisibility=hidden -DHIDE_EXPORTS
/home/tim/Desktop/linuxforesp32/buildroot-build/build/host-gcc-initial-4.8.3/build/./gcc/xgcc -B/home/tim/Desktop/linuxforesp32/buildroot-build/build/host-gcc-initial-4.8.3/build/./gcc/ -B/home/tim/Desktop/linuxforesp32/buildroot-build/host/usr/xtensa-buildroot-linux-uclibc/bin/ -B/home/tim/Desktop/linuxforesp32/buildroot-build/host/usr/xtensa-buildroot-linux-uclibc/lib/ -isystem /home/tim/Desktop/linuxforesp32/buildroot-build/host/usr/xtensa-buildroot-linux-uclibc/include -isystem /home/tim/Desktop/linuxforesp32/buildroot-build/host/usr/xtensa-buildroot-linux-uclibc/sys-include    -g -Os -O2  -g -Os -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE  -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem ./include   -fPIC -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector -Dinhibit_libc  -fPIC -I. -I. -I../.././gcc -I../../../libgcc -I../../../libgcc/. -I../../../libgcc/../gcc -I../../../libgcc/../include    -o _multc3.o -MT _multc3.o -MD -MP -MF _multc3.dep -DL_multc3 -c ../../../libgcc/libgcc2.c -fvisibility=hidden -DHIDE_EXPORTS
/tmp/cckLVToT.s: Assembler messages:
/tmp/cckLVToT.s:51: Error: unknown opcode or format name 'div.s'
Makefile:460: recipe for target '_powisf2.o' failed
make[2]: *** [_powisf2.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: Leaving directory '/home/tim/Desktop/linuxforesp32/buildroot-build/build/host-gcc-initial-4.8.3/build/xtensa-buildroot-linux-uclibc/libgcc'
Makefile:9969: recipe for target 'all-target-libgcc' failed
make[1]: *** [all-target-libgcc] Error 2
make[1]: Leaving directory '/home/tim/Desktop/linuxforesp32/buildroot-build/build/host-gcc-initial-4.8.3/build'
package/pkg-generic.mk:182: recipe for target '/home/tim/Desktop/linuxforesp32/buildroot-build/build/host-gcc-initial-4.8.3/.stamp_built' failed
make: *** [/home/tim/Desktop/linuxforesp32/buildroot-build/build/host-gcc-initial-4.8.3/.stamp_built] Error 2
make: Leaving directory '/home/tim/Desktop/linuxforesp32/buildroot'
i am following this tutorial: http://wiki.linux-xtensa.org/index.php/ ... ting_Linux
And i am using the esp32 overlay file from here: server.soud.co.uk/esp8266/esp-open-sdk- ... /overlays/
I used this command to built buildroot:

Code: Select all

make -C buildroot O=$(pwd)/buildroot-build
I am running ubuntu 16.04(amd64).
Could someone help me resolve this error?
I dont realy know what information to provide you with so if i am missing something then you can ask for it.

I hope to hear soon from you peaple,


thanks in advance

Re: Compiling linux buildroot for esp32 gives error

Posted: Fri May 12, 2017 2:26 am
by ESP_Sprite
FYI, this is not going to work at all, not without massive work on the Linux-kernel. Buildroot is a way to build a Linux-based OS, and Linux needs the Xtensa-native MMU to work. We do have an (external to the CPU) MMU, but it is too rudimentary to support Linux.

Re: Compiling linux buildroot for esp32 gives error

Posted: Fri May 12, 2017 1:09 pm
by timl12332
well, okay thanks.

I dont have much knowledge on building linux so i probably wont be able to do it.
Do you(or someone else at espressif) have plans to build linux for it?
Running something like openwrt(or another linux os) would be absolute fantastic!

Re: Compiling linux buildroot for esp32 gives error

Posted: Fri May 12, 2017 2:55 pm
by WiFive
Try uclinux if you really really want, even then you will need external ram. Otherwise abandon the dream its not going to work.

Re: Compiling linux buildroot for esp32 gives error

Posted: Fri May 12, 2017 4:14 pm
by timl12332
Would love to try that,
Do you know a tutorial or someting?

Re: Compiling linux buildroot for esp32 gives error

Posted: Sat May 13, 2017 2:58 am
by ESP_Sprite
You would need to port uclinux first; this means diving deep into the kernel and modifying/writing a fair amount of code.

Re: Compiling linux buildroot for esp32 gives error

Posted: Mon May 15, 2017 4:20 pm
by madscientist_42
Other than the, "because I could," aspect of a port, I don't know if there's any value there. Not enough RAM.

Now, if you wanted to port Zephyr or one of the other nifty IOT platforms... >:-D

While IDF is shaping up nicely, I'm sure they'd still welcome a bit of competition from some of the other platforms there.

NuttX is allegedly already there. I say allegedly mainly because they claim it, but I've not seen/tried it myself yet...yet.

Might be interesting to see the Linux or Apache Foundation's IoT RTOS on this silicon.

Re: Compiling linux buildroot for esp32 gives error

Posted: Tue May 16, 2017 4:48 am
by ESP_igrr
madscientist_42 wrote:Now, if you wanted to port Zephyr or one of the other nifty IOT platforms... >:-D
https://jira.zephyrproject.org/browse/ZEP-2030

Re: Compiling linux buildroot for esp32 gives error

Posted: Wed May 17, 2017 6:52 pm
by madscientist_42
ESP_igrr wrote:
madscientist_42 wrote:Now, if you wanted to port Zephyr or one of the other nifty IOT platforms... >:-D
https://jira.zephyrproject.org/browse/ZEP-2030
X-D

Oh, this gets better by the minute- thanks for sharing that. I didn't have enough insight into their community to know what they were/weren't doing. Makes for more sales of the SoC...which is a win for pretty much everyone.

As an aside, they have a complete, functioning minimal Dual-mode stack for BT. I'm looking at the guts of it for an alternate for IDF...just the start because I've already too much on my plate right now. Looks like it's able to be bolted on with a few re-works.

Re: Compiling linux buildroot for esp32 gives error

Posted: Sat Jul 17, 2021 9:15 am
by juiceRv