Closed An-GG closed 1 year ago
Hmm, thanks, Just to clarify dfu-util is required to have root to work on ubuntu but not macos? Yeah i plan on vendoring dfu-util soon, just gotta figure out a few things on how to do that, Thanks i didnt realise the window couldn't be moved, i use a window manager which overrides certain application settings, ill figure that out.
Just to clarify dfu-util is required to have root to work on ubuntu but not macos?
Yep, this has also generally been my experience in the past. Linux usually just requires adding a dialout group to sudoers.
Interesting, i think this can be solved with a udev rule which ill have to ship with the flasher (may need to make debs, rpms, etc)
so i can write the udev rules could you run
udevadm monitor
then plug in the pinecil in dfu mode you should see a file path appear, then in a seperate command could you run
udevadm info -ap <file path from udevadm monitor>
and send me the pinecils ATTRS{idProduct} and ATTRS{idVendor} (they should appear near the top of the output).
Thanks
ATTRS{idVendor}=="28e9"
and ATTRS{idProduct}=="0189"
fyi pretty sure these params are already included in the .dfu
file though, unlikely but i guess in theory these could change. maybe have some way to run dfu-util as root as a fallback case. wouldn't adding the udev rule require install script to run as root anyway?
cheers, Yeah a root mode is probably a good idea, ill have to figure out how to do that. If i package it up as a .deb .rpm, PKGBUILD or anything like that i can include the rule though, speaking of that i should probably also make a .desktop file so it appears in app launchers, thanks again for the help.
Hey, i think ive fixed it by making some options in a .desktop file. would you mind git cloneing the repo and then running the generic_linux_install.sh
script (it will also build the project so you'll need rust installed, if you dont let me know and i can make a release) and launching it from your app launcher? Thanks for the help in figuring out this bug.
i have an odd debian testing(bookworm) without much of the graphical/system tools... so i followed the errors and installed these...
apt install cmake apt install pkg-config apt install libglib2.0-dev apt install libgdk-pixbuf-2.0-dev apt install libcairo2-dev apt install libpango1.0-dev apt install libgtk-3-dev
i was then able to successfuly run...
cargo build --release su -c 'cp ./Pineflash.desktop /usr/share/applications/Pineflash.desktop' su -c 'cp ./assets/pine64logo.png /usr/share/pixmaps/pine64logo.png' su -c 'cp ./target/release/pineflash /usr/bin/pineflash'
i then realized i had no launcher... apt install lxpanel
of course i needed a graphical polkit... apt install policykit-1-gnome
and launch it... /usr/lib/policykit-1-gnome/polkit-gnome-authentication-agent-1
PineFlash shows up in 'System Tools' and launches successfuly.
I reckon this is all solved now, thanks hierog for testing. Im going to close this now.
So everything seems to work great on mac, but I couldn't get it to work on linux (ubuntu 20.04 amd64).
Did some debugging, I double checked I can use dfu-utils to update, and I noticed I can only do that as root. This is what I get without sudo:
Similar error shows up in pineflash gui logs
pineflash has errors when running as root, as soon as i click update
Some QoL improvements would be appreciated: