summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorFigue2015-06-09 01:28:42 +0200
committerFigue2015-06-09 01:28:42 +0200
commite0210f8a40e023ca23163c50c0a91f72107df808 (patch)
treecf021a7e631f2677598f3e15e2c586f29c9059c7
downloadaur-e0210f8a40e023ca23163c50c0a91f72107df808.tar.gz
Initial import
-rw-r--r--.SRCINFO21
-rw-r--r--50-awusb.rules1
-rw-r--r--PKGBUILD43
-rw-r--r--cubieboard-livesuit.install38
4 files changed, 103 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..2df427deba32
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,21 @@
+pkgbase = cubieboard-livesuit
+ pkgdesc = LiveSuit is a tool to flash Images to the NAND of Allwinner devices, such as Cubieboard1, Cubieboard2, and Cubietruck. This package use the ZIP that comes from official Cubieboard download page.
+ pkgver = 306
+ pkgrel = 1
+ url = http://cubieboard.org
+ install = cubieboard-livesuit.install
+ arch = x86_64
+ license = GPL
+ makedepends = git
+ makedepends = dkms
+ depends = libpng12
+ depends = qt4
+ source = cubieboard-livesuit::git+https://github.com/linux-sunxi/sunxi-livesuite.git
+ source = http://dl.cubieboard.org/software/tools/livesuit/LiveSuitV306_For_Linux64.zip
+ source = 50-awusb.rules
+ sha256sums = SKIP
+ sha256sums = 12c042080e6b49e3edff7052cbb9ff0a89badce12be04d1443b1c9d5163d9bf3
+ sha256sums = 21e03a459c30fbf92bef5b086f8c93c6ac7071d97e7855dce7627e624969081f
+
+pkgname = cubieboard-livesuit
+
diff --git a/50-awusb.rules b/50-awusb.rules
new file mode 100644
index 000000000000..039c1047f001
--- /dev/null
+++ b/50-awusb.rules
@@ -0,0 +1 @@
+KERNEL=="aw_efex[0-9]*", MODE="0666"
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..63c516fcab6d
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,43 @@
+# Maintainer: Figue <ffigue@gmail.com>
+# Contributor: Pirea Radu <pirea.radu@gmail.com>
+
+pkgname=cubieboard-livesuit
+pkgver=306
+pkgrel=1
+pkgdesc="LiveSuit is a tool to flash Images to the NAND of Allwinner devices, such as Cubieboard1, Cubieboard2, and Cubietruck. This package use the ZIP that comes from official Cubieboard download page."
+arch=('x86_64')
+url="http://cubieboard.org"
+license=('GPL')
+depends=('libpng12' 'qt4')
+makedepends=('git' 'dkms')
+conflicts=()
+install=${pkgname}.install
+source=("${pkgname}"::'git+https://github.com/linux-sunxi/sunxi-livesuite.git'
+ "http://dl.cubieboard.org/software/tools/livesuit/LiveSuitV${pkgver}_For_Linux64.zip"
+ "50-awusb.rules")
+sha256sums=('SKIP'
+ '12c042080e6b49e3edff7052cbb9ff0a89badce12be04d1443b1c9d5163d9bf3'
+ '21e03a459c30fbf92bef5b086f8c93c6ac7071d97e7855dce7627e624969081f')
+
+build() {
+ # LiveSuit
+ cd ${srcdir}/LiveSuit_For_Linux64
+ tail -n +60 LiveSuit.run > LiveSuit.tar.bz2
+ tar xjvf LiveSuit.tar.bz2
+
+ # Kernel module awusb
+ cd ${srcdir}/${pkgname}/awusb
+ make
+}
+
+package() {
+ # LiveSuit
+ cd ${srcdir}/LiveSuit_For_Linux64
+ mkdir -p "${pkgdir}/opt/${pkgname}"
+ cp -r LiveSuit/* ${pkgdir}/opt/${pkgname}/
+
+ # Kernel module awusb
+ mkdir -p ${pkgdir}/usr/lib/modules/`uname -r`/kernel/ ${pkgdir}/etc/udev/rules.d
+ cp ${srcdir}/${pkgname}/awusb/awusb.ko ${pkgdir}/usr/lib/modules/`uname -r`/kernel/
+ cp ${srcdir}/50-awusb.rules ${pkgdir}/etc/udev/rules.d/
+}
diff --git a/cubieboard-livesuit.install b/cubieboard-livesuit.install
new file mode 100644
index 000000000000..2e67091def42
--- /dev/null
+++ b/cubieboard-livesuit.install
@@ -0,0 +1,38 @@
+post_install () {
+ echo " ==> Executing depmod -a"
+ depmod -a
+
+ echo " ==> Reloading udev rules."
+ udevadm control --reload-rules
+
+ echo -e "\nPost installation instructions:"
+ echo -e " KERNEL MODULE: You need to load awusb. You should rebuild this package after a kernel upgrade."
+ echo -e " IMPORTANT: You need to chown /opt/cubieboard-livesuit to yourself if you want to use this software. You can copy it to your home if you are sharing your computer."
+
+ echo -e "\nNote: If you try to flash a USB 2.0 Device (such as Cubietruck) from a recent Archlinux on an USB 3.0 Port, \n chances are your device is not flashed as it is recognized by both xhci_hcd and ehci_hcd kernel modules.\n Try deactivating xhci_hcd (it needs to be blacklisted if it is in the kernel, not needed in default Arch kernel),\n or, easier if available, deactivate USB 3.0 in your BIOS."
+}
+
+# arg 1: the new package version
+# arg 2: the old package version
+post_upgrade() {
+ echo " ==> Executing depmod -a"
+ depmod -a
+
+ echo " ==> Reloading udev rules."
+ udevadm control --reload-rules
+
+ echo -e "\nPost upgrade instructions:"
+ echo -e " KERNEL MODULE: You need to load awusb. You should rebuild this package after a kernel upgrade."
+ echo -e " IMPORTANT: You need to chown /opt/cubieboard-livesuit to yourself if you want to use this software. You can copy it to your home if you are sharing your computer."
+
+ echo -e "\nNote: If you try to flash a USB 2.0 Device (such as Cubietruck) from a recent Archlinux on an USB 3.0 Port, \n chances are your device is not flashed as it is recognized by both xhci_hcd and ehci_hcd kernel modules.\n Try deactivating xhci_hcd (it needs to be blacklisted if it is in the kernel, not needed in default Arch kernel),\n or, easier if available, deactivate USB 3.0 in your BIOS."
+}
+
+post_remove() {
+ depmod -a
+}
+
+#op=$1
+#shift
+
+#$op $*