Git Product home page Git Product logo

usbbootgui's Introduction

usbbootgui

usbbootgui is a GUI application that allows the user to use a Pi Zero or Compute Module as USB accessory.

Folders

src          - GUI C source code
data         - GUI data files (e.g. .ui file and icons)
debian       - Debian packaging files
gpioexpander - pre-built binary files from the gpioexpander project to let a Pi Zero act as GPIO expander

How to rebuild

Rebuilding gpio expander payload (optional)

Note: this step is optional, you can also skip it and use the pre-built binaries checked into git.

The gpioexpand code should be cross-compiled on a x86 Linux computer using buildroot. First the buildroot build dependencies need to be installed. If the Linux distribution used is Debian or Ubuntu this can be done with the command:

sudo apt-get update
sudo apt-get install git-core build-essential rsync libncurses-dev unzip python bc

Then run the following commands to remove the pre-built binaries, download the source code from the gpioexpander github repository, and build it:

rm -rf gpioexpander
git clone --depth 1 https://github.com/raspberrypi/gpioexpander.git
cd gpioexpander
./build.sh

After the build has finished, you can remove the gpioexpand/buildroot-2017.02 folder.

rm -rf buildroot-2017.02

(Otherwise debuild will also include all the build directories in the source code archive at the next step.)

Rebuilding the main usbbootgui application and .deb package

The usbbootgui application can be compiled on the target system.

Install build dependencies for Raspbian:

sudo apt-get install devscripts debhelper dh-autoreconf libglib2.0-dev libgtk2.0-dev intltool autopoint libusb-1.0-0-dev

To build, go to the main directory, and type:

debuild

After build, the .deb Debian package will be located in the parent directory

usbbootgui's People

Contributors

ghollingworth avatar maxnet avatar xecdesign avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

usbbootgui's Issues

usbbootgui should not run as root

Here is a summary of how it currently works:

  1. A udev rule detects when a RPi is plugged in and launches usbbootgui as root.
  2. usbbootgui (or a helper binary) steals the users' X11 key (this will not work under Wayland).
  3. usbbootgui runs rpiboot as root with the selected firmware.

Here is how I think it should be implemented:

  1. usbbootgui is (optionally) launched when a user logs in to the desktop, with normal user privileges, via the normal desktop autolaunch mechanisms (xdg-autostart).
  2. usbbootgui listens on DBus for udev events.
  3. A udev rule detects when a RPi is plugged in and gives the current desktop user access permissions.
  4. udev sends an event to DBus.
  5. usbbootgui receives the event and runs rpiboot as the desktop user.

Additionally, the udev rule should be part of the rpiboot package, so that it can function stand-alone without root privileges.

See commentary on #2 for discussion of why running usbbootgui as root might be insecure if its functionality is extended.

I can implement this if you think it is a good idea.

Add USB webcam gadget (pi camera) support

Feature-request

Wouldn't it be awesome if this tool can be enhanced to make a Pi Zero a USB video device class (UVC / webcam) with any Pi Camera but no SD card needed?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.