From 8a5360921dbbe1a93ac9e1e2ef60693bc77fec25 Mon Sep 17 00:00:00 2001 From: Jeroen Oudshoorn Date: Thu, 28 Sep 2023 09:28:36 +0200 Subject: [PATCH] v2.4.4 Signed-off-by: Jeroen Oudshoorn --- .idea/misc.xml | 2 +- .idea/pwnagotchi.iml | 2 +- Makefile | 2 +- builder/pwnagotchi.yml | 69 +++++++++++------------------------------- pwnagotchi/_version.py | 2 +- 5 files changed, 21 insertions(+), 56 deletions(-) diff --git a/.idea/misc.xml b/.idea/misc.xml index 6178365c..dc9ea490 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -1,4 +1,4 @@ - + \ No newline at end of file diff --git a/.idea/pwnagotchi.iml b/.idea/pwnagotchi.iml index 7e680cfc..38d1fd89 100644 --- a/.idea/pwnagotchi.iml +++ b/.idea/pwnagotchi.iml @@ -4,7 +4,7 @@ - + diff --git a/Makefile b/Makefile index 23ff36d5..e64c9a2f 100644 --- a/Makefile +++ b/Makefile @@ -55,7 +55,7 @@ $(PWN_RELEASE).img: $(SDIST) builder/pwnagotchi.json builder/pwnagotchi.yml $(sh sudo $(PACKER) plugins install github.com/solo-io/arm-image cd builder && sudo $(UNSHARE) $(PACKER) build -var "pwn_hostname=$(PWN_HOSTNAME)" -var "pwn_version=$(PWN_VERSION)" pwnagotchi.json sudo chown -R $$USER:$$USER builder/images - mv builder/images ../../../../ + mv builder/images/* ../../../ # If any of these files are updated, rebuild the checksums. $(PWN_RELEASE).sha256: $(PWN_RELEASE).img diff --git a/builder/pwnagotchi.yml b/builder/pwnagotchi.yml index 2b343ee7..654f4b0a 100644 --- a/builder/pwnagotchi.yml +++ b/builder/pwnagotchi.yml @@ -4,6 +4,9 @@ gather_facts: true become: true vars: + kernel: + min: "6.1" + full: "6.1.21-v8+" pwnagotchi: hostname: "{{ lookup('env', 'PWN_HOSTNAME') | default('pwnagotchi', true) }}" version: "{{ lookup('env', 'PWN_VERSION') | default('pwnagotchi-torch', true) }}" @@ -62,7 +65,7 @@ - libraspberrypi-dev - libraspberrypi-doc - libraspberrypi-bin - - golang + - ansible install: - bluez - raspberrypi-kernel-headers @@ -211,13 +214,13 @@ dest: /usr/local/src/nexmon/patches/bcm43436b0/9_88_4_65/nexmon/Makefile backup: no regexp: "KERNEL_VERSION = .*$" - replace: "KERNEL_VERSION = 6.1" + replace: "KERNEL_VERSION = {{ kernel.min }}" - name: choose the right kernel release (variable) (bcm43436b0) lineinfile: dest: /usr/local/src/nexmon/patches/bcm43436b0/9_88_4_65/nexmon/Makefile insertafter: "DRIVER_FOLDER_NAME = .*$" - line: "KERNEL_RELEASE = 6.1.21-v8+" + line: "KERNEL_RELEASE = {{ kernel.full }}" - name: choose the right kernel release (replace string) (bcm43436b0) replace: @@ -243,13 +246,13 @@ dest: /usr/local/src/nexmon/patches/bcm43430a1/7_45_41_46/nexmon/Makefile backup: no regexp: "KERNEL_VERSION = .*$" - replace: "KERNEL_VERSION = 6.1" + replace: "KERNEL_VERSION = {{ kernel.min }}" - name: choose the right kernel release (variable) (bcm43430a1) lineinfile: dest: /usr/local/src/nexmon/patches/bcm43430a1/7_45_41_46/nexmon/Makefile insertafter: "DRIVER_FOLDER_NAME = .*$" - line: "KERNEL_RELEASE = 6.1.21-v8+" + line: "KERNEL_RELEASE = {{ kernel.full }}" - name: choose the right kernel release (replace string) (bcm43430a1) replace: @@ -294,13 +297,13 @@ dest: /usr/local/src/nexmon/patches/bcm43455c0/7_45_206/nexmon/Makefile backup: no regexp: "KERNEL_VERSION = .*$" - replace: "KERNEL_VERSION = 6.1" + replace: "KERNEL_VERSION = {{ kernel.min }}" - name: choose the right kernel release (variable) (bcm43455c0) lineinfile: dest: /usr/local/src/nexmon/patches/bcm43455c0/7_45_206/nexmon/Makefile insertafter: "DRIVER_FOLDER_NAME = .*$" - line: "KERNEL_RELEASE = 6.1.21-v8+" + line: "KERNEL_RELEASE = {{ kernel.full }}" - name: choose the right kernel release (replace string) (bcm43455c0) replace: @@ -322,16 +325,16 @@ - name: backup original driver copy: - src: /usr/lib/modules/6.1.21-v8+/kernel/drivers/net/wireless/broadcom/brcm80211/brcmfmac/brcmfmac.ko.xz - dest: /usr/lib/modules/6.1.21-v8+/kernel/drivers/net/wireless/broadcom/brcm80211/brcmfmac/brcmfmac.ko.xz.orig + src: "/usr/lib/modules/{{ kernel.full }}/kernel/drivers/net/wireless/broadcom/brcm80211/brcmfmac/brcmfmac.ko.xz" + dest: "/usr/lib/modules/{{ kernel.full }}/kernel/drivers/net/wireless/broadcom/brcm80211/brcmfmac/brcmfmac.ko.xz.orig" - name: copy modified driver copy: - src: /usr/local/src/nexmon/patches/driver/brcmfmac_6.1.y-nexmon/brcmfmac.ko - dest: /usr/lib/modules/6.1.21-v8+/kernel/drivers/net/wireless/broadcom/brcm80211/brcmfmac/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" - name : load brcmfmac drivers - command: "/sbin/depmod -A -b -F System.map 6.1.21-v8+" + command: "/sbin/depmod -a {{ kernel.full }}" # To shrink the final image, remove the nexmon directory (takes 2.5G of space) post build and installation - name: Delete nexmon content & directory @@ -339,7 +342,7 @@ state: absent path: /usr/local/src/nexmon/ - - name: Creates custom plugin directory + - name: Create custom plugin directory file: path: /usr/local/share/pwnagotchi/custom-plugins/ state: directory @@ -516,51 +519,13 @@ regexp: '(.*)$' line: '\1 modules-load=dwc2,g_ether' - - name: configure 01-motd - become_user: root - copy: - dest: /etc/update-motd.d/01-motd - content: | - #!/bin/sh - _hostname=$(hostname) - _version=$(cut -d"'" -f2 < /usr/local/lib/python3.9/dist-packages/pwnagotchi/_version.py) - echo - echo "(◕‿‿◕) $_hostname" - echo - echo " Hi! I'm a pwnagotchi $_version, please take good care of me!" - echo " Here are some basic things you need to know to raise me properly!" - echo - echo " If you want to change my configuration, use /etc/pwnagotchi/config.toml" - echo - echo " All the configuration options can be found on /etc/pwnagotchi/default.toml," - echo " but don't change this file because I will recreate it every time I'm restarted!" - echo - echo " I use oPwnGrid as my main API, you can check stats at https://opwngrid.xyz" - echo - echo " I'm managed by systemd. Here are some basic commands." - echo - echo " If you want to know what I'm doing, you can check my logs with the command" - echo " - pwnlog" - echo " - sudo pwnagotchi --version, to check the current version" - echo " - sudo pwnagotchi --donate, to see how you can donate to this project" - echo " - sudo pwnagotchi --check-update, to see if there is a new version available" - echo - echo " If you want to know if I'm running, you can use" - echo " systemctl status pwnagotchi" - echo - echo " You can restart me using" - echo " systemctl restart pwnagotchi" - echo - echo " You learn more about me at https://pwnagotchi.ai/" - when: hostname.changed - - name: Add pwnlog alias lineinfile: dest: /home/pi/.bashrc line: "\nalias pwnlog='tail -f -n300 /var/log/pwn*.log | sed --unbuffered \"s/,[[:digit:]]\\{3\\}\\]//g\" | cut -d \" \" -f 2-'" insertafter: EOF - - name: Add pwnlog alias + - name: Add pwnver alias lineinfile: dest: /home/pi/.bashrc line: "\nalias pwnver='python3 -c \"import pwnagotchi as p; print(p.__version__)\"'" diff --git a/pwnagotchi/_version.py b/pwnagotchi/_version.py index 9a0e3da6..0d6ef5fb 100644 --- a/pwnagotchi/_version.py +++ b/pwnagotchi/_version.py @@ -1 +1 @@ -__version__ = '2.4.3' +__version__ = '2.4.4'