Skip to content

Commit

Permalink
Update qemu_args to use correct CPU
Browse files Browse the repository at this point in the history
The default ARM CPU emulated by qemu is armv7l.  While this is fine for most packages,
it leads to the wrong opencv and tensorflow being installed.  By emulating the correct
CPU, we're guaranteed to end up with the correct binaries.

Signed-off-by: llamasoft <llamasoft@rm-rf.email>
  • Loading branch information
llamasoft committed Oct 3, 2022
1 parent 13769f6 commit e4ad0b9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 13 deletions.
3 changes: 2 additions & 1 deletion builder/pwnagotchi.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
"type": "arm-image",
"iso_url": "https://downloads.raspberrypi.org/raspios_oldstable_lite_armhf/images/raspios_oldstable_lite_armhf-2022-04-07/2022-04-04-raspios-buster-armhf-lite.img.xz",
"iso_checksum": "42fd907a0da36b8a8ce9db9cd1cb77746b6a10c4b77f8d0ae0b8065a3b358a37",
"last_partition_extra_size": 3221225472
"target_image_size": 6442450944,
"qemu_args": ["-cpu", "arm1176"]
}
],
"provisioners": [
Expand Down
12 changes: 0 additions & 12 deletions builder/pwnagotchi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -259,18 +259,6 @@
chdir: /usr/local/src/pwnagotchi
when: (pwnagotchigit.changed) or (pip_packages['pwnagotchi'] is undefined) or (pip_packages['pwnagotchi'] != pwnagotchi_version)

- name: install opencv-python
pip:
name: "https://www.piwheels.org/simple/opencv-python/opencv_python-3.4.3.18-cp37-cp37m-linux_armv6l.whl"
extra_args: "--no-deps --no-cache-dir --platform=linux_armv6l --only-binary=:all: --target={{ pip_target.stdout }}"
when: (pip_packages['opencv-python'] is undefined) or (pip_packages['opencv-python'] != '3.4.3.18')

- name: install tensorflow
pip:
name: "https://www.piwheels.org/simple/tensorflow/tensorflow-1.13.1-cp37-none-linux_armv6l.whl"
extra_args: "--no-deps --no-cache-dir --platform=linux_armv6l --only-binary=:all: --target={{ pip_target.stdout }}"
when: (pip_packages['tensorflow'] is undefined) or (pip_packages['tensorflow'] != '1.13.1')

- name: install pwnagotchi wheel and dependencies
pip:
name: "{{ lookup('fileglob', '/usr/local/src/pwnagotchi/dist/pwnagotchi*.whl') }}"
Expand Down

0 comments on commit e4ad0b9

Please sign in to comment.