--- title: My packages store for BeagleBone running Debian 9 date: 2017-11-01 03:11:04.662107 UTC --- I'm building IoT gateway based on BeagleBone Black at the startup [AgriConnect](https://agriconnect.vn), with Python as the primary programming language. When the application grows complex, the board shows to be weak. We cannot find stronger board than BeagleBone, so the only option is to try to make our app run lighter. We try to adopt latest Python version, now is 3.6, to take advantage of optimization work in them. The latest Debian image for BeagleBone is _stretch_ (Debian 9), which doesn't include Python 3.6 in its repository. There are some [backport](https://github.com/chriskuehl/python3.6-debian-stretch) packages of Python 3.6 for Debian 9, but only for _amd64_ arch. Fortunately they provide a build script. I can use it to build for _armhf_ arch, which is in BeagleBone boards. How to build for _armhf_? The board is weak, we should not run the build process directly on BeagleBone. It can take some days! - Option 1: Cross build it on PC, in a Docker container. The Docker is used to create a Debian 9 environment, to have the exact version of compiler, C library and tools as target board. - Option 2: Rent an ARM server and build there. I did [experiment](https://gitlab.com/agriconnect/docker-cross-compiler-armhf-ubuntu-xenial) with Option 1, only build plain Python, not package to _.deb_ files, however. I don't continue with this option because Python's build script doesn't enable "optimizing phase" in cross-compile, and also it needs more setup to package _.deb_ files in cross-compile. For Option 2, I found [Scaleway](https://www.scaleway.com/), who provides cloud ARM server, and lets you pay by hours of usage. It is economic because I only need some hours to do the work. If you also need Python 3.6 for your ARMv7 board, let grab it here: https://packagecloud.io/quan/beaglebone-stretch (thanks _PackageCloud_ for hosting).