Skip to content

Commit

Permalink
Add python virtualenv to gitignore.
Browse files Browse the repository at this point in the history
  • Loading branch information
dahlinPL committed Jan 10, 2025
1 parent d3733f8 commit de0e27e
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,6 @@

# Makefile
/Makefile

# Python virtualenv
/venv
42 changes: 40 additions & 2 deletions docs/howto/how-to-cross-build-runtime-for-arm.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,17 +104,55 @@ ACL source will be automatically installed in `externals/ARMCOMPUTE` when you bu

You can check ACL source information in `infra/cmake/packages/ARMComputeSourceConfig.cmake`

## Install numpy

Python package `numpy` is needed for build. It's recommended to always install python packages in virtualenv.
To do this, at first you need to install python venv package:

```
$ sudo apt-get install python3-venv
```
Next, create virtualenv:

```
$ python3 -m venv venv
```

and activate it (please keep in mind that you will have to activate it always before build)

```
$ source /venv/bin/activate
```

Next, just in case upgrade pip package:

```
(venv)$ pip install -U pip
```

and finally install `numpy`:

```
(venv)$ pip install numpy
```

## Cross build for ARM by using Makefile.template

Give `TARGET_ARCH` variable to set the target architecture.

If you used `ROOTFS_DIR` to prepare in alternative folder, you should also give this to makefile.

Remember to activate venv if you didn't activate it already:

```
$ source /venv/bin/activate
```

```
$ CROSS_BUILD=1 TARGET_ARCH=armv7l make -f Makefile.template
(venv)$ CROSS_BUILD=1 TARGET_ARCH=armv7l make -f Makefile.template
# If ROOTFS_DIR is in alternative folder
$ ROOTFS_DIR=/path/to/your/rootfs/arm \
(venv)$ ROOTFS_DIR=/path/to/your/rootfs/arm \
CROSS_BUILD=1 TARGET_ARCH=armv7l make
```

Expand Down

0 comments on commit de0e27e

Please sign in to comment.