pwnagotchi icon indicating copy to clipboard operation
pwnagotchi copied to clipboard

WIP: Stab at fixing image build for new rpi zero 2w.

Open matglas opened this issue 2 years ago • 11 comments

Description

To be able to build a new image I had to change a few things to make building possible.

Motivation and Context

  • There was a change of name in packer-builder-arm-image.
  • I needed the latest raspbian lite image.
  • With the latest debian release there is a change in suite. This breaks apt update. Using the --allow-releaseinfo-change-suite help to make it all run again.
  • [x] I have raised an issue to propose this change (required)
  • [ ] https://github.com/evilsocket/pwnagotchi/issues/1073

How Has This Been Tested?

I only build the image successfully. I did not test it yet on the rpi zero 2 yet.

Types of changes

  • [x] Bug fix (non-breaking change which fixes an issue)

Checklist:

  • [x] My code follows the code style of this project.
  • [x] My change requires a change to the documentation.
  • [x] I have updated the documentation accordingly.
  • [x] I've read the CONTRIBUTION guide
  • [ ] I have signed-off my commits with git commit -s Will need to redo the commits to sign. If I need to split my changes please let me know.

matglas avatar Feb 04 '22 16:02 matglas

The quest to make AI mode work #1066 has these changes and changes to make AI Mode work. I even Mirrored my Fork of pwnagotchi to my Gitea server at https://git.chadwaltercummings.me/scifijunkie/pwnagotchi so I can keep working on my fork of the project without messing with my Pull Request.

scifijunk avatar Feb 05 '22 02:02 scifijunk

Great. You already got it a lot further. I'm just starting out with the project. I'm just wondering if adding small independent change would allow the maintainers to quickly review and merge.

Each smaller change its own PR. Then it does not need a lot motivations to be pulled. If they can let us know that would be great.

matglas avatar Feb 05 '22 06:02 matglas

Did anyone managed to test this by building an image and successfully running it?

evilsocket avatar Jul 18 '22 18:07 evilsocket

Hi there. I am still reworking it on my own side but that is to have it work with pi zero 2w. It should have new firmware for the broadcom. I can't say at this moment if my changes work. I'll change it to WIP and add my changes later again.

I was also reworking to make it work with the new packer hcl format and have more split ansible that has roles for the different changes that are needed. So more work to do.

matglas avatar Jul 18 '22 18:07 matglas

Gotcha, thanks. Keep in mind I can only merge this PR if it'll be backwards compatible with older rpis once ready.

evilsocket avatar Jul 18 '22 18:07 evilsocket

Good point. I am not able to verify but will try to keep changes to a minimum and rely on 32 bit instead of 64 which is possible for rpi zero 2w.

matglas avatar Jul 18 '22 19:07 matglas

No worries, no rush. Could you please change the title into something more explicit about this as possibly breaking on the older boards? i know so many users manually merging PRs like this in some forks they own assuming from the title that they are default and stable :D thanks

evilsocket avatar Jul 18 '22 21:07 evilsocket

Well, these changes work for my build then again I use a pi4 2GB with a Panda 300Mbps Wireless N USB Adapter, not a pi0 2w.

scifijunk avatar Jul 18 '22 22:07 scifijunk

Looked at my changes again. I think these changes just helped to update the image iso and allow us to run updates again. My rpi zero 2w did manage to start after this which did not work before with the old image.

matglas avatar Jul 19 '22 07:07 matglas

Glad to hear it works on 2w, but a newer distro might break some of the package dependencies (i'm especially worried about the python stuff) for older boards ... when this is fully tested it might be worth having two separate build scripts

evilsocket avatar Jul 19 '22 08:07 evilsocket

@matglas I created a fork that now supports the RPiZ2W reliably (both the new and old wifi chip) as well as newer boards RPi3B+ and RPi4B. I don't support the original RPiZW though and likely won't because I consider is obsolete and underpowered at this point.

aluminum-ice avatar Sep 01 '23 19:09 aluminum-ice