Skip to contentSkip to conversation

Raspberry pi 4 recipe and layer issues.

DISCUSSION Ed Vidal 2 participants 2 messages Dec 12, 2019 – Dec 13, 2019 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

Ed Vidal

author
#1 lore raw

Hi AllAny and all help is appreciated.  Thanks in advance.
I want to install 6 software packages needed for FPGA Development.These are icestorm, arachne-pnr, yosys, nextpnr, verilator, and zipcpu.I have created 4 of the recipes (icestorm_0.1.bb, arachne-pnr_0.1.bb, yosys_0.1.bb, and nextpnr_0.1.bb)using the recipetool & bitbake-layers, and I added these to a meta-yosys-tools layer.
https://github.com/develone/meta-yosys-tools.git
I can now execute "bitbake icestorm" which is a python and C++ Makefile project.The first time the recipe goes thru the python build and gets an error existing the shell.If I rerun "bitbake icestorm" I get
| iceprog.c:27:10: fatal error: ftdi.h: No such file or directory|    27 | #include <ftdi.h>|       |          ^~~~~~~~Which is the 2nd C++ program in the Makfile.On the rpi4-64 all that is needed are the following steps to build icestorm git clone https://github.com/cliffordwolf/icestorm.git cd icestorm  make real 33m4.774s user 32m39.073s sys 0m19.247s I first tried using the cross compiler with little sucess.  This is why I trying to generate the recipes to build using bitbake instead. These are the location of the header files, needed to be added to the cross compiler sdkwhich I installed for rpi4 using the following commands. "bitbake meta-toolchain" "bitbake core-image-sato -c populate_sdk_ext" "./poky-glibc-x86_64-meta-toolchain-aarch64-raspberrypi4-64-toolchain-3.0.1.sh" /usr/include/libftdi1/ftdi.h/usr/include/pcap/usb.h
As root make install which install to /usr/local/bin & /usr/local/share.Creates /usr/local/bin & /usr/local/sharels /usr/local/bin/icebox.py icebox_diff icebox_maps  icebram   iceprogicebox_asc2hlc icebox_explain icebox_stat  icemulti  icetimeicebox_chipdb icebox_hlc2asc icebox_vlog  icepack   iceunpackicebox_colbuf icebox_html iceboxdb.py  icepll
ls /usr/local/share/icebox/chipdb-1k.txt chipdb-lm4k.txt   timings_lp1k.txt   timings_up5k.txtchipdb-384.txt chipdb-u4k.txt   timings_lp384.txtchipdb-5k.txt timings_hx1k.txt  timings_lp8k.txtchipdb-8k.txt timings_hx8k.txt  timings_u4k.txt
When I executed "bitbake nextpnr", I noticed the boost was built first.  Since then I have added boost to rpi4-core-image-sato which added quite a bit to the image2420113408 without boost and 2839543808 with boost.
Let me know if I can provide additional information.
Best Regards

Edward Vidal Jr. e-mail [email protected] 915-595-1613

#2 lore raw
Quoted 9 lines · Ed Vidal

Hi AllAny and all help is appreciated.  Thanks in advance.
I want to install 6 software packages needed for FPGA Development.These are icestorm, arachne-pnr, yosys, nextpnr, verilator, and zipcpu.I have created 4 of the recipes (icestorm_0.1.bb, arachne-pnr_0.1.bb, yosys_0.1.bb, and nextpnr_0.1.bb)using the recipetool & bitbake-layers, and I added these to a meta-yosys-tools layer.
https://github.com/develone/meta-yosys-tools.git
I can now execute "bitbake icestorm" which is a python and C++ Makefile project.The first time the recipe goes thru the python build and gets an error existing the shell.If I rerun "bitbake icestorm" I get
| iceprog.c:27:10: fatal error: ftdi.h: No such file or directory|    27 | #include <ftdi.h>|       |          ^~~~~~~~Which is the 2nd C++ program in the Makfile.On the rpi4-64 all that is needed are the following steps to build icestorm git clone https://github.com/cliffordwolf/icestorm.git cd icestorm  make real 33m4.774s user 32m39.073s sys 0m19.247s I first tried using the cross compiler with little sucess.  This is why I trying to generate the recipes to build using bitbake instead. These are the location of the header files, needed to be added to the cross compiler sdkwhich I installed for rpi4 using the following commands. "bitbake meta-toolchain" "bitbake core-image-sato -c populate_sdk_ext" "./poky-glibc-x86_64-meta-toolchain-aarch64-raspberrypi4-64-toolchain-3.0.1.sh" /usr/include/libftdi1/ftdi.h/usr/include/pcap/usb.h
As root make install which install to /usr/local/bin & /usr/local/share.Creates /usr/local/bin & /usr/local/sharels /usr/local/bin/icebox.py icebox_diff icebox_maps  icebram   iceprogicebox_asc2hlc icebox_explain icebox_stat  icemulti  icetimeicebox_chipdb icebox_hlc2asc icebox_vlog  icepack   iceunpackicebox_colbuf icebox_html iceboxdb.py  icepll
ls /usr/local/share/icebox/chipdb-1k.txt chipdb-lm4k.txt   timings_lp1k.txt   timings_up5k.txtchipdb-384.txt chipdb-u4k.txt   timings_lp384.txtchipdb-5k.txt timings_hx1k.txt  timings_lp8k.txtchipdb-8k.txt timings_hx8k.txt  timings_u4k.txt
When I executed "bitbake nextpnr", I noticed the boost was built first.  Since then I have added boost to rpi4-core-image-sato which added quite a bit to the image2420113408 without boost and 2839543808 with boost.

This sounds all very much like you just need to sort out your dependencies. If something needs boost, there should be

DEPENDS = "boost"

in the recipe. If smething needs libftdi, there should be

DEPENDS = "libftdi"

and so on, and so on. Randomly adding things to the image does not solve those issue, for a simple reason: It guarantees that the thing go into the image. It does *not* guarantee that they are already around when some random, other recipe is being built.

So, first and foremost - sort out your dependencies.

There is some introductory information here:
https://youtu.be/IehnEC3GOGU

Greetz

Signature · 20 lines
———————————————
Josef Holzmayr
Software Developer Embedded Systems

Tel: +49 8444 9204-48
Fax: +49 8444 9204-50

R-S-I Elektrotechnik GmbH & Co. KG
Woelkestrasse 11
D-85301 Schweitenkirchen
www.rsi-elektrotechnik.de
———————————————
Amtsgericht Ingolstadt – GmbH: HRB 191328 – KG: HRA 170393
Geschäftsführer: Dr.-Ing. Michael Sorg, Dipl.-Ing. Franz Sorg
Ust-IdNr: DE 128592548 

_____________________________________________________________
Amtsgericht Ingolstadt - GmbH: HRB 191328 - KG: HRA 170363
Geschäftsführer: Dr.-Ing. Michael Sorg, Dipl.-Ing. Franz Sorg
USt-IdNr.: DE 128592548