Skip to content

Instantly share code, notes, and snippets.

View rayluo's full-sized avatar
🎯
Focusing

Ray Luo rayluo

🎯
Focusing
View GitHub Profile
@rayluo
rayluo / cross-compile-python.md
Created April 9, 2024 17:09 — forked from j-c-cook/cross-compile-python.md
Cross-compile Python for use on armv7l

Cross-compile Python for use on armv7l

Introduction

This post shows how to cross compile Python (using the [CPython][#cpython] implementation) for use on an armv7l chip. This can likely be extrapolated to other chip archetectures, but the proper cross-compilation toolchain would need to be substituded. The Python version utilized here is version 3.7.13. The driving force behind this effort was to get [python-can][#python-can] functional on an armv7l platform. This compilation process is done on a Ubuntu 20.04.4 LTS operating system. I have utilized various online references and will do my best to provide citation and links.

In my case the device with an armv7l chip contains a root file system and shared objects that are compiled using a version of [buildroot][#buildroot]. The buildroot menu configuration allows for the selection of Python 3 for installation, but not all of the basic packages are included. For example, importing the python-can package into an environment using Python 3 installed b

@rayluo
rayluo / README.rst
Last active September 12, 2015 07:44 — forked from dupuy/README.rst
Common markup for Markdown and reStructuredText

Markdown and reStructuredText

GitHub supports several lightweight markup languages for documentation; the most popular ones (generally, not just at GitHub) are Markdown and reStructuredText. Markdown is sometimes considered easier to use, and is often preferred when the purpose is simply to generate HTML. On the other hand, reStructuredText is more extensible and powerful, with native support (not just embedded HTML) for tables, as well as things like automatic generation of tables of contents.