This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
TinyPilot image build procedure
#1
Hello boaters,

I stumbled only recently over this very interesting project: thanks for sharing all this to the community!

After a first look at TinyCore Linux piCore and the different pypilot github repositories I am curious how the TinyPilot PiZero(2) images are build,
i.e. starting from e.g. piCore 9.0.3 (or 13.1.0 for Stelian's PiZero2 version).
Using https://github.com/pypilot/tinypilot and its build scripts probably creates different bricks, but what would be the complete build procedure for these images?

Thanks in advance & always fair winds, Dirk
Reply
#2
I am working on an image for tinycore 16 right now... it is not that easy.

Maybe check back soon for updates. I should push changes to:
https://github.com/pypilot/tinypilot
Reply
#3
OK thanks for your reply Sean!

I have spent some time following the piCore init/boot process/scripts and the mydata.tgz
this provides already some rough idea, although probably many nasty details do not jump into ones' eyes.

it seems currently there are lots of manual steps involved, no script nor procedure.
Reply
#4
This is true for tinycore in general unfortunately.

To get scipy working i have to recompile gcc, which took about 20 hours. Then build atlas, but atlas is failing now because I dont have a decompiler it needs... I am making progress though.
Reply
#5
to get some better idea I prepared a RaspiZero2W with piCore16 and trying to run some Python code (discovered that MicroPython comes for free).
but then trying to install e.g. numpy requires building (or using precompiled wheels via https://www.piwheels.org/simple/)

things are quite slow and fail depending on versions chosen (and maybe swap, /tmp etc), well it's just a Zero having to deal with quite some stuff

would be interested to learn a little more on the gcc fix
Note: ok, just found your posts on the TinyCoreLinux forum with some explanations:
- https://forum.tinycorelinux.net/index.php?topic=28090
- https://forum.tinycorelinux.net/index.php?topic=23624

Note#2: scanning through pypilot code for numpy & scipy usage: maybe these could be replaced by something much more simple?
apart from some LeastSq-fits only ODR which seem deprecated (and soon removed) in SciPy for odrpack - well maybe I am wrong, but just a different way to solve the numpy/scipy package compilation hassle...
Reply
#6
yes it is leastsq fit of odr, where did you find it is deprecated?

Yes it is for sure possible to implement the algorithm without scipy, and if you want to do this let me know. My intention was to use the existing working library, and because it can delay loading (load scipy later on with lower priority) it doesnt slow the boot speed either. The odr is kind of important as the alternate typical least squares fit of algebraic minima (doesn't even need iteration) is inferior to a geometric optimization. Then I want scipy anyway.

The good news is I managed to build gfortran as well lapack, so I am now trying to build numpy then scipy. After this the remaining dependencies are quite simple and I have already built several.

It should all work as it did in the past, it can just take days. Likely once I have a working tinycore 16 system it won't need to be rebuilt for several years, and this is just as well to prove stability. What do you think?
Reply
#7
https://docs.scipy.org/doc/scipy/reference/odr.html
Deprecated since version 1.17.0: scipy.odr is deprecated and will be removed in SciPy 1.19.0. Please use pypi.org/project/odrpack/ instead.
odrpack requires Fortran as well, so not so much gain ;-)

funny to read about Lapack: ~25 years ago we used to write wrappers to use all these Fortran libraries from within C/C++

these libraries are quite sophisticated and robust: better use them unless one just needs some simple textbook LeastSq

since compiling larger packages like gcc/gfortran, lapack/blas, numpy, scipy, on resource-restricted Zero take quite some time (and effort to make it work):
did you consider cross-compile on an Ubuntu or even TinyCoreLinux x86? Maybe much easier, I will maybe give it a try...

do you plan to include these build scripts into the tinypilot repo? these could be a good starting point for others.

but: the h/w, o/s and software frameworks are only the base, the fun parts then happens in your pypilot code! ;-)
thanks for providing this project to the community!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)