Commit 712760df by devttys0

Updated deps.sh and installation procedure

parent acdfce5d
BEFORE YOU START BEFORE YOU START
----------------------------------------- -----------------------------------------
Binwalk supports Python 2.7 - 3.x. Although binwalk is slightly faster in Python 3, the Python OpenGL bindings Binwalk supports Python 2.7 - 3.x. Although binwalk is slightly faster in Python 3,
are still experimental for Python 3, so Python 2.7 is recommended. the Python OpenGL bindings are still experimental for Python 3, so Python 2.7 is
recommended.
The following installation procedures assume that you are installing binwalk to be run using Python 2.7. The following installation procedures assume that you are installing binwalk to
If you want to use binwalk in Python 3, some package names and installation procedures may differ slightly. be run using Python 2.7. If you want to use binwalk in Python 3, some package
names and installation procedures may differ slightly.
You will also need to have gcc, libtool and autoconf installed to build the supporting C libraries.
INSTALLATION INSTALLATION
----------------------------------------- -----------------------------------------
Most binwalk features will work out of the box without any additional dependencies. However, to take advantage Binwalk's core features will work out of the box without any additional dependencies.
of binwalk's graphing capabilities, you need to install the following packages (you may also need to install However, to take advantage of binwalk's graphing and extraction capabilities, multiple
OpenGL drivers for your video card): supporting utilities/packages need to be installed.
$ sudo apt-get install libqt4-opengl python-opengl python-qt4 python-qt4-gl python-numpy python-scipy
$ wget -O - http://www.pyqtgraph.org/downloads/pyqtgraph-0.9.8.tar.gz | tar -zxv && cd pyqtgraph-0.9.8 && sudo python ./setup.py install
To ease "dependency hell", a shell script named deps.sh is included which attempts to
install all required dependencies for Debian and RedHat based systems. If you are
running a different system, or prefer to install these dependencies manually, see the
DEPENDENCIES section below.
Installation follows the typical configure/make process: Installation follows the typical configure/make process:
$ ./deps.sh # Install optional dependencies (caution: many MB of downloads)
$ ./configure $ ./configure
$ make deps # Skip this if you don't want extraction utilities auto-installed (large download(s))
$ make $ make
$ sudo make install $ sudo make install
Note that 'make deps' should work on most Debian and RedHat based systems. If this does not work for your system,
see below for manaully installing extraction utilities.
DEPENDENCIES
MANUALLY INSTALLING EXTRACTION UTILITIES
------------------------------------------- -------------------------------------------
Binwalk can automatically invoke external extraction utilities to extract various types of files that it may find during The following dependencies are only required for optional binwalk features, such as
a scan. These utilities are optional, but recommended if you plan on using binwalk's extraction features. file extraction and graphing capabilities. Unless otherwise specified, these
dependencies are available from most Linux package managers:
Most utilities can be installed from your distro's repositories (package names may vary slightly based
on your particular distro): libqt4-opengl
python-opengl
$ sudo apt-get install git mtd-utils zlib1g-dev liblzma-dev ncompress gzip bzip2 tar arj p7zip p7zip-full openjdk-6-jdk python-qt4
python-qt4-gl
However, the Firmware-Mod-Kit, which contains many file system extractors, needs to be built from source python-numpy
and placed in the /opt/firmware-mod-kit directory: python-scipy
pyqtgraph-0.9.8 [http://www.pyqtgraph.org/downloads/pyqtgraph-0.9.8.tar.gz]
$ sudo mkdir -p /opt/firmware-mod-kit mtd-utils
$ sudo chmod -R a+rwx /opt/firmware-mod-kit zlib1g-dev
$ git clone https://code.google.com/p/firmware-mod-kit /opt/firmware-mod-kit/ liblzma-dev
$ cd /opt/firmware-mod-kit/src && ./configure && make ncompress
gzip
bzip2
tar
arj
p7zip
p7zip-full
openjdk-6-jdk
firmware-mod-kit [https://code.google.com/p/firmware-mod-kit]
UNINSTALL UNINSTALL
----------------------------------------- -----------------------------------------
The following command will remove binwalk from your system (note that this does *not* include utilities installed via 'make deps'): The following command will remove binwalk from your system. Note that this will *not*
remove utilities installed via deps.sh:
$ sudo make uninstall $ sudo make uninstall
...@@ -5,6 +5,16 @@ ...@@ -5,6 +5,16 @@
SUDO=$(which sudo) SUDO=$(which sudo)
SUMOUNT="$1 $2" SUMOUNT="$1 $2"
function pyqtgraph
{
# Get and install pyqtgraph
wget -O - http://www.pyqtgraph.org/downloads/pyqtgraph-0.9.8.tar.gz | tar -zxv
if [ -e pyqtgraph-0.9.8 ]
then
cd pyqtgraph-0.9.8 && $SUDO python ./setup.py install && cd - && $SUDO rm -rf pyqtgraph-0.9.8
fi
}
function fmk function fmk
{ {
# Get and build the firmware mod kit # Get and build the firmware mod kit
...@@ -54,6 +64,9 @@ function fmk ...@@ -54,6 +64,9 @@ function fmk
function debian function debian
{ {
# First make sure the repos are up to date
$SUDO apt-get update
# The appropriate unrar package goes under different names in Debian vs Ubuntu # The appropriate unrar package goes under different names in Debian vs Ubuntu
$SUDO apt-get -y install unrar $SUDO apt-get -y install unrar
if [ "$?" != "0" ] if [ "$?" != "0" ]
...@@ -65,7 +78,7 @@ function debian ...@@ -65,7 +78,7 @@ function debian
# Install binwalk/fmk pre-requisites and extraction tools # Install binwalk/fmk pre-requisites and extraction tools
# lha isn't in newer ubuntu repos, so install it separately in case it fails # lha isn't in newer ubuntu repos, so install it separately in case it fails
$SUDO apt-get -y install lha $SUDO apt-get -y install lha
$SUDO apt-get -y install git build-essential mtd-utils zlib1g-dev liblzma-dev ncompress gzip bzip2 tar arj p7zip p7zip-full openjdk-6-jdk $SUDO apt-get -y install git build-essential libtool autoconf mtd-utils zlib1g-dev liblzma-dev ncompress gzip bzip2 tar arj p7zip p7zip-full openjdk-6-jdk
$SUDO apt-get -y install libqt4-opengl python-opengl python-qt4 python-qt4-gl python-numpy python-scipy $SUDO apt-get -y install libqt4-opengl python-opengl python-qt4 python-qt4-gl python-numpy python-scipy
if [ "$(which python3)" != "" ] if [ "$(which python3)" != "" ]
then then
...@@ -76,7 +89,7 @@ function debian ...@@ -76,7 +89,7 @@ function debian
function redhat function redhat
{ {
$SUDO yum groupinstall -y "Development Tools" $SUDO yum groupinstall -y "Development Tools"
$SUDO yum install -y git mtd-utils unrar zlib1g-dev liblzma-dev xz-devel compress gzip bzip2 tar arj lha p7zip p7zip-full openjdk-6-jdk $SUDO yum install -y git libtool autoconf mtd-utils unrar zlib1g-dev liblzma-dev xz-devel compress gzip bzip2 tar arj lha p7zip p7zip-full openjdk-6-jdk
$SUDO yum install -y libqt4-opengl python-opengl python-qt4 python-qt4-gl python-numpy python-scipy $SUDO yum install -y libqt4-opengl python-opengl python-qt4 python-qt4-gl python-numpy python-scipy
if [ "$(which python3)" != "" ] if [ "$(which python3)" != "" ]
then then
...@@ -142,6 +155,9 @@ case $DISTRO in ...@@ -142,6 +155,9 @@ case $DISTRO in
exit 1 exit 1
esac esac
# Get and install pyqtgraph
pyqtgraph
# Get and build the firmware mod kit # Get and build the firmware mod kit
fmk fmk
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment