rockchip工具rkflashtools的 PKGBUILD

51-rockchip.rules

SUBSYSTEM=="usb", ATTR{idVendor}=="2207", MODE="0666", GROUP="plugdev"

udevadm control --reload-rules

~/.android/adb_usb.ini, add 0x2207


# Contributor: GunsNRose <zlbgps AT gmail.com>>
_gitname=rkflashtools
_gitroot="https://github.com/crewrktablets/rkflashtools"
pkgname=${_gitname}-git
pkgver=20130929
pkgrel=1
pkgdesc="rockchip utils tool"
arch=('i686' 'x86_64')
url="http://linux-rockchip.info/mw/index.php?title=Installing_new_kernel_image"
license=('GPL')
depends=('libusbx')
makedepends=('git')
provides=(${_gitname})
install=${_gitname}.install
source=("51-rockchip.rules")
build() {
  cd "$srcdir"
  if [ ! -d "$srcdir/${_gitname}" ] ; then
      git clone --depth=1 ${_gitroot}
  else
      cd "$srcdir/${_gitname}" || return 1
      git pull
  fi
  if [  -d "$srcdir/${_gitname}-build" ] ; then
      rm -rf "$srcdir/${_gitname}-build"
  fi
  if [ ! -d "$srcdir/${_gitname}-build" ] ; then
      cp -a "$srcdir/${_gitname}" "$srcdir"/${_gitname}-build || return 1
  fi
  cd "$srcdir"/${_gitname}-build
  make
}
package() {
  cd "$srcdir"/${_gitname}-build
  install -d -m755 ${pkgdir}/usr/bin
  install -m755 rkflashtool ${pkgdir}/usr/bin/rkflashtool
  install -d -m755 ${pkgdir}/etc/udev/rules.d/
  install -m644 ${srcdir}/51-rockchip.rules ${pkgdir}/etc/udev/rules.d/51-rockchip.rules
}
md5sums=('cbcdc3a55526222dd175f8b86861c416')
post_install() {
    echo "As root, restart udev with 'udevadm control --reload-rules'"
    echo "Log in with your normal unix user, and edit ~/.android/adb_usb.ini, add 0x2207 at the end of the file"
    echo "As user, restart the adb server with 'adb kill-server; adb start-server'"
    echo "As user, you should be able to list your device with 'adb devices'"
    echo "And finally, get a shell on the device if you have activated 'USB Debugging' on Android:"
}
post_upgrade() {
    post_install
}

注意可下载附件

你可能感兴趣的:(archLinux,rk3188)