mirror of
https://github.com/jayofelony/pwnagotchi.git
synced 2025-07-01 18:37:27 -04:00
@ -27,14 +27,14 @@ source "arm-image" "rpi-pwnagotchi" {
|
|||||||
target_image_size = 9368709120
|
target_image_size = 9368709120
|
||||||
qemu_args = ["-r", "6.1.21-v8+"]
|
qemu_args = ["-r", "6.1.21-v8+"]
|
||||||
}
|
}
|
||||||
# "arm-image" "opi-pwnagotchi" {
|
source "arm-image" "opi-pwnagotchi" {
|
||||||
# iso_checksum = ""
|
iso_checksum = ""
|
||||||
# iso_url = "https://drive.usercontent.google.com/download?id=12DgsOXXgpDTQLRBsh8cKqVGD2FUUMZDk&export=download&authuser=0&confirm=t&uuid=d97afcec-3979-44e2-838a-f17c576a87fb&at=APZUnTWoYAa6oVoxrZWwPP7o8Hn9:1698613336721"
|
iso_url = "https://drive.usercontent.google.com/download?id=1AJ_rrLAtCwurEB61VevSRKQwDOBF9GHN&export=download&authuser=0&confirm=t&uuid=ae4b66d9-adca-4fe1-9c4c-bf54bfc9d2ce&at=APZUnTV50dgaDoFFE0NnKqszShSm:1698614532340"
|
||||||
# output_file ="../../../pwnagotchi-orangepi-jammy-${var.pwn_version}-arm64.img"
|
output_file ="../../../pwnagotchi-orangepi-jammy-${var.pwn_version}-arm64.img"
|
||||||
# qemu_binary = "qemu-aarch64-static"
|
qemu_binary = "qemu-aarch64-static"
|
||||||
# target_image_size = 9368709120
|
target_image_size = 9368709120
|
||||||
# qemu_args = ["-r", "6.1.21-v8+"]
|
qemu_args = ["-r", "6.1.31-sun50iw9"]
|
||||||
#}
|
}
|
||||||
|
|
||||||
# a build block invokes sources and runs provisioning steps on them. The
|
# a build block invokes sources and runs provisioning steps on them. The
|
||||||
# documentation for build blocks can be found here:
|
# documentation for build blocks can be found here:
|
||||||
@ -43,7 +43,7 @@ build {
|
|||||||
name = "Pwnagotchi Torch 64bit"
|
name = "Pwnagotchi Torch 64bit"
|
||||||
sources = [
|
sources = [
|
||||||
"source.arm-image.rpi-pwnagotchi",
|
"source.arm-image.rpi-pwnagotchi",
|
||||||
# "source.arm-image.opi-pwnagotchi",
|
"source.arm-image.opi-pwnagotchi",
|
||||||
]
|
]
|
||||||
|
|
||||||
provisioner "file" {
|
provisioner "file" {
|
||||||
|
@ -199,107 +199,126 @@
|
|||||||
git:
|
git:
|
||||||
repo: https://github.com/DrSchottky/nexmon.git
|
repo: https://github.com/DrSchottky/nexmon.git
|
||||||
dest: /usr/local/src/nexmon
|
dest: /usr/local/src/nexmon
|
||||||
register: nexmongit
|
when: ansible_facts['kernel'] == "6.1.21-v8+"
|
||||||
|
|
||||||
- name: make firmware
|
- name: make firmware
|
||||||
shell: "source ./setup_env.sh && make"
|
shell: "source ./setup_env.sh && make"
|
||||||
args:
|
args:
|
||||||
executable: /bin/bash
|
executable: /bin/bash
|
||||||
chdir: /usr/local/src/nexmon/
|
chdir: /usr/local/src/nexmon/
|
||||||
|
when: ansible_facts['kernel'] == "6.1.21-v8+"
|
||||||
|
|
||||||
- name: make firmware patch (bcm43455c0)
|
- name: make firmware patch (bcm43455c0)
|
||||||
shell: "source ./setup_env.sh && cd /usr/local/src/nexmon/patches/bcm43455c0/7_45_206/nexmon/ && make"
|
shell: "source ./setup_env.sh && cd /usr/local/src/nexmon/patches/bcm43455c0/7_45_206/nexmon/ && make"
|
||||||
args:
|
args:
|
||||||
executable: /bin/bash
|
executable: /bin/bash
|
||||||
chdir: /usr/local/src/nexmon/
|
chdir: /usr/local/src/nexmon/
|
||||||
|
when: ansible_facts['kernel'] == "6.1.21-v8+"
|
||||||
|
|
||||||
- name: install new firmware (bcm43455c0)
|
- name: install new firmware (bcm43455c0)
|
||||||
copy:
|
copy:
|
||||||
src: /usr/local/src/nexmon/patches/bcm43455c0/7_45_206/nexmon/brcmfmac43455-sdio.bin
|
src: /usr/local/src/nexmon/patches/bcm43455c0/7_45_206/nexmon/brcmfmac43455-sdio.bin
|
||||||
dest: /usr/lib/firmware/brcm/brcmfmac43455-sdio.bin
|
dest: /usr/lib/firmware/brcm/brcmfmac43455-sdio.bin
|
||||||
follow: true
|
follow: true
|
||||||
|
when: ansible_facts['kernel'] == "6.1.21-v8+"
|
||||||
|
|
||||||
- name: make firmware patch (bcm43436b0)
|
- name: make firmware patch (bcm43436b0)
|
||||||
shell: "source ./setup_env.sh && cd /usr/local/src/nexmon/patches/bcm43436b0/9_88_4_65/nexmon/ && make"
|
shell: "source ./setup_env.sh && cd /usr/local/src/nexmon/patches/bcm43436b0/9_88_4_65/nexmon/ && make"
|
||||||
args:
|
args:
|
||||||
executable: /bin/bash
|
executable: /bin/bash
|
||||||
chdir: /usr/local/src/nexmon/
|
chdir: /usr/local/src/nexmon/
|
||||||
|
when: ansible_facts['kernel'] == "6.1.21-v8+"
|
||||||
|
|
||||||
- name: install new firmware (bcm43436b0)
|
- name: install new firmware (bcm43436b0)
|
||||||
copy:
|
copy:
|
||||||
src: /usr/local/src/nexmon/patches/bcm43436b0/9_88_4_65/nexmon/brcmfmac43436-sdio.bin
|
src: /usr/local/src/nexmon/patches/bcm43436b0/9_88_4_65/nexmon/brcmfmac43436-sdio.bin
|
||||||
dest: /usr/lib/firmware/brcm/brcmfmac43436-sdio.bin
|
dest: /usr/lib/firmware/brcm/brcmfmac43436-sdio.bin
|
||||||
follow: true
|
follow: true
|
||||||
|
when: ansible_facts['kernel'] == "6.1.21-v8+"
|
||||||
|
|
||||||
- name: make firmware patch (bcm43430a1)
|
- name: make firmware patch (bcm43430a1)
|
||||||
shell: "source ./setup_env.sh && cd /usr/local/src/nexmon/patches/bcm43430a1/7_45_41_46/nexmon/ && make"
|
shell: "source ./setup_env.sh && cd /usr/local/src/nexmon/patches/bcm43430a1/7_45_41_46/nexmon/ && make"
|
||||||
args:
|
args:
|
||||||
executable: /bin/bash
|
executable: /bin/bash
|
||||||
chdir: /usr/local/src/nexmon/
|
chdir: /usr/local/src/nexmon/
|
||||||
|
when: ansible_facts['kernel'] == "6.1.21-v8+"
|
||||||
|
|
||||||
- name: install new firmware (bcm43430a1)
|
- name: install new firmware (bcm43430a1)
|
||||||
copy:
|
copy:
|
||||||
src: /usr/local/src/nexmon/patches/bcm43430a1/7_45_41_46/nexmon/brcmfmac43430-sdio.bin
|
src: /usr/local/src/nexmon/patches/bcm43430a1/7_45_41_46/nexmon/brcmfmac43430-sdio.bin
|
||||||
dest: /usr/lib/firmware/brcm/brcmfmac43430-sdio.bin
|
dest: /usr/lib/firmware/brcm/brcmfmac43430-sdio.bin
|
||||||
follow: true
|
follow: true
|
||||||
|
when: ansible_facts['kernel'] == "6.1.21-v8+"
|
||||||
|
|
||||||
- name: copy 43430-sdio as 43436s-sdio for the special 43430/1 /2
|
- name: copy 43430-sdio as 43436s-sdio for the special 43430/1 /2
|
||||||
copy:
|
copy:
|
||||||
src: /usr/lib/firmware/brcm/brcmfmac43430-sdio.bin
|
src: /usr/lib/firmware/brcm/brcmfmac43430-sdio.bin
|
||||||
dest: /usr/lib/firmware/brcm/brcmfmac43436s-sdio.bin
|
dest: /usr/lib/firmware/brcm/brcmfmac43436s-sdio.bin
|
||||||
follow: true
|
follow: true
|
||||||
|
when: ansible_facts['kernel'] == "6.1.21-v8+"
|
||||||
|
|
||||||
- name: Delete the firmware blob to avoid it crashing
|
- name: Delete the firmware blob to avoid it crashing
|
||||||
file:
|
file:
|
||||||
state: absent
|
state: absent
|
||||||
path: /usr/lib/firmware/brcm/brcmfmac43430-sdio.clm_blob
|
path: /usr/lib/firmware/brcm/brcmfmac43430-sdio.clm_blob
|
||||||
|
when: ansible_facts['kernel'] == "6.1.21-v8+"
|
||||||
|
|
||||||
- name: Delete the RPiZW firmware blob to avoid it crashing
|
- name: Delete the RPiZW firmware blob to avoid it crashing
|
||||||
file:
|
file:
|
||||||
state: absent
|
state: absent
|
||||||
path: /usr/lib/firmware/brcm/brcmfmac43430-sdio.raspberrypi,model-zero-w.clm_blob
|
path: /usr/lib/firmware/brcm/brcmfmac43430-sdio.raspberrypi,model-zero-w.clm_blob
|
||||||
|
when: ansible_facts['kernel'] == "6.1.21-v8+"
|
||||||
|
|
||||||
- name: Delete the RPi3 firmware blob to avoid it crashing
|
- name: Delete the RPi3 firmware blob to avoid it crashing
|
||||||
file:
|
file:
|
||||||
state: absent
|
state: absent
|
||||||
path: /usr/lib/firmware/brcm/brcmfmac43430-sdio.raspberrypi,3-model-b.clm_blob
|
path: /usr/lib/firmware/brcm/brcmfmac43430-sdio.raspberrypi,3-model-b.clm_blob
|
||||||
|
when: ansible_facts['kernel'] == "6.1.21-v8+"
|
||||||
|
|
||||||
- name: Delete the RPi02w firmware blob to avoid it crashing
|
- name: Delete the RPi02w firmware blob to avoid it crashing
|
||||||
file:
|
file:
|
||||||
state: absent
|
state: absent
|
||||||
path: /usr/lib/firmware/brcm/brcmfmac43430b0-sdio.raspberrypi,model-zero-2-w.clm_blob
|
path: /usr/lib/firmware/brcm/brcmfmac43430b0-sdio.raspberrypi,model-zero-2-w.clm_blob
|
||||||
|
when: ansible_facts['kernel'] == "6.1.21-v8+"
|
||||||
|
|
||||||
- name: Delete the RPi02w firmware blob to avoid it crashing
|
- name: Delete the RPi02w firmware blob to avoid it crashing
|
||||||
file:
|
file:
|
||||||
state: absent
|
state: absent
|
||||||
path: /usr/lib/firmware/brcm/brcmfmac43436-sdio.clm_blob
|
path: /usr/lib/firmware/brcm/brcmfmac43436-sdio.clm_blob
|
||||||
|
when: ansible_facts['kernel'] == "6.1.21-v8+"
|
||||||
|
|
||||||
- name: Delete the RPi302w firmware blob to avoid it crashing
|
- name: Delete the RPi302w firmware blob to avoid it crashing
|
||||||
file:
|
file:
|
||||||
state: absent
|
state: absent
|
||||||
path: /usr/lib/firmware/brcm/brcmfmac43436-sdio.raspberrypi,model-zero-2-w.clm_blob
|
path: /usr/lib/firmware/brcm/brcmfmac43436-sdio.raspberrypi,model-zero-2-w.clm_blob
|
||||||
|
when: ansible_facts['kernel'] == "6.1.21-v8+"
|
||||||
|
|
||||||
- name: Delete the RPi02w firmware blob to avoid it crashing
|
- name: Delete the RPi02w firmware blob to avoid it crashing
|
||||||
file:
|
file:
|
||||||
state: absent
|
state: absent
|
||||||
path: /usr/lib/firmware/brcm/brcmfmac43455-sdio.clm_blob
|
path: /usr/lib/firmware/brcm/brcmfmac43455-sdio.clm_blob
|
||||||
|
when: ansible_facts['kernel'] == "6.1.21-v8+"
|
||||||
|
|
||||||
- name: backup original driver
|
- name: backup original driver
|
||||||
command: "mv /usr/lib/modules/{{ kernel.full }}/kernel/drivers/net/wireless/broadcom/brcm80211/brcmfmac/brcmfmac.ko.xz /usr/lib/modules/{{ kernel.full }}/kernel/drivers/net/wireless/broadcom/brcm80211/brcmfmac/brcmfmac.ko.xz.orig"
|
command: "mv /usr/lib/modules/{{ kernel.full }}/kernel/drivers/net/wireless/broadcom/brcm80211/brcmfmac/brcmfmac.ko.xz /usr/lib/modules/{{ kernel.full }}/kernel/drivers/net/wireless/broadcom/brcm80211/brcmfmac/brcmfmac.ko.xz.orig"
|
||||||
|
when: ansible_facts['kernel'] == "6.1.21-v8+"
|
||||||
|
|
||||||
- name: copy modified driver
|
- name: copy modified driver
|
||||||
copy:
|
copy:
|
||||||
src: "/usr/local/src/nexmon/patches/driver/brcmfmac_{{ kernel.min }}.y-nexmon/brcmfmac.ko"
|
src: "/usr/local/src/nexmon/patches/driver/brcmfmac_{{ kernel.min }}.y-nexmon/brcmfmac.ko"
|
||||||
dest: "/usr/lib/modules/{{ kernel.full }}/kernel/drivers/net/wireless/broadcom/brcm80211/brcmfmac/brcmfmac.ko"
|
dest: "/usr/lib/modules/{{ kernel.full }}/kernel/drivers/net/wireless/broadcom/brcm80211/brcmfmac/brcmfmac.ko"
|
||||||
|
when: ansible_facts['kernel'] == "6.1.21-v8+"
|
||||||
|
|
||||||
- name : load brcmfmac drivers
|
- name : load brcmfmac drivers
|
||||||
command: "/sbin/depmod -a"
|
command: "/sbin/depmod -a"
|
||||||
|
when: ansible_facts['kernel'] == "6.1.21-v8+"
|
||||||
|
|
||||||
# To shrink the final image, remove the nexmon directory (takes 2.5G of space) post build and installation
|
# To shrink the final image, remove the nexmon directory (takes 2.5G of space) post build and installation
|
||||||
- name: Delete nexmon content & directory
|
- name: Delete nexmon content & directory
|
||||||
file:
|
file:
|
||||||
state: absent
|
state: absent
|
||||||
path: /usr/local/src/nexmon/
|
path: /usr/local/src/nexmon/
|
||||||
|
when: ansible_facts['kernel'] == "6.1.21-v8+"
|
||||||
|
|
||||||
- name: Create custom plugin directory
|
- name: Create custom plugin directory
|
||||||
file:
|
file:
|
||||||
|
Reference in New Issue
Block a user