everything in the user space is built as ‘debian packages’. 99% of the user space content is just debian packages from official Debian repositories , unmodified by us.
to build any Debian (or any Debian based distro):
get the source code
apt-get source <package name>
install all packages needed to build <package name>
sudo apt-get build-dep <package-name>
cd <package name>_<version>
dpkg-buildpackage -b -us -uc
That should always work, and if it doesn’t it’s likely a bug, in which case feel free to report the bugs, with all log files.
We customize some packages in our images in 2 different ways:
- patch existing packages from Debian.
- create new packages that don’t exist in Debian
In both cases, all our changes are also done as ‘debian packages’ that we publish into our own Debian repository here: http://repo.linaro.org/ubuntu/linaro-overlay/.
and the instructions above to build the package will work as well.
Note that on Debian based distro, builds are typically done ‘natively’, e.g. on the target on which they will run, so you can do that directly on your board. It sounds counter productive (since building on a PC is faster…) but cross compiling Debian packages on your PC for the board isn’t trivial, so I wouldn’t recommend that for now.