Compare commits

..

No commits in common. "master" and "v1.3.1" have entirely different histories.

176 changed files with 187384 additions and 11370 deletions

View File

@ -1,24 +0,0 @@
image: alpine/edge
sources:
- https://git.sr.ht/~grimler/Heimdall
artifacts:
- Heimdall/build/bin/heimdall
- Heimdall/build/bin/heimdall-frontend
packages:
- make
- cmake
- gcc
- g++
- libc-dev
- qt5-qtbase-dev
- libusb-dev
tasks:
- build: |
cd Heimdall
mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
make -j8

View File

@ -1,20 +0,0 @@
image: archlinux
sources:
- https://git.sr.ht/~grimler/Heimdall
artifacts:
- Heimdall/build/bin/heimdall
- Heimdall/build/bin/heimdall-frontend
packages:
- cmake
- libusb
- qt5-base
tasks:
- build: |
cd Heimdall
mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
make -j8

View File

@ -1,23 +0,0 @@
image: ubuntu/lts
sources:
- https://git.sr.ht/~grimler/Heimdall
artifacts:
- Heimdall/build/bin/heimdall
- Heimdall/build/bin/heimdall-frontend
packages:
- cmake
- g++
- pkg-config
- libusb-1.0-0-dev
- qtbase5-dev
- zlib1g-dev
tasks:
- build: |
cd Heimdall
mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
make -j8

3
.gitignore vendored
View File

@ -1,5 +1,2 @@
.DS_Store
._*
.idea/
/build/
*~

View File

@ -1,18 +0,0 @@
cmake_minimum_required(VERSION 3.0.0)
set(CMAKE_MODULE_PATH
${CMAKE_SOURCE_DIR}/cmake
${CMAKE_MODULE_PATH})
project(Heimdall)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
option(DISABLE_FRONTEND "Disable GUI frontend" OFF)
add_subdirectory(libpit)
add_subdirectory(heimdall)
if(NOT DISABLE_FRONTEND)
add_subdirectory(heimdall-frontend)
add_dependencies(heimdall-frontend heimdall)
endif()

View File

@ -1,5 +1,5 @@
Heimdall (c) 2010-2017 Benjamin Dobell, Glass Echidna
https://www.glassechidna.com.au/products/heimdall/
Heimdall (c) 2010-2011 Benjamin Dobell, Glass Echidna
http://www.glassechidna.com.au/products/heimdall/
DISCLAIMER:
@ -85,12 +85,11 @@ Performing a Custom Flash with Heimdall Frontend:
If you're not an advanced user or a developer, in the event that a Heimdall
Firmware Package doesn't exist for the particular firmware (or files) that
you wish to flash, then I strongly recommend you get in touch with the
developer of the firmware (or files) and politely ask them to create a
Heimdall Firmware Package for you. In doing so, you avoid the risk of
you wish to flash, then I strongly recommend you get in touch with developer
of the firmware (or files) and politely ask them to create a Heimdall
Firmware Package for you. In doing so then you don't have to worry about
making mistakes due to inexperience.
If you're looking to customise an existing Heimdall Firmware Package then
follow steps 1-8 of "Flashing Heimdall Firmware Package with Heimdall
Frontend" then start from below with step 5.
@ -98,15 +97,14 @@ Performing a Custom Flash with Heimdall Frontend:
1. Fully charge your device (use the wall charger as it's faster).
2. Download a decrypted device ROM or a Heimdall Firmware Package
2. Download a decrypted Samsung Galaxy S ROM or a Heimdall Firmware Package
and extract everything to the one directory.
3. If the ROM is not a Heimdall Firmware Package it may instead be provided
as multiple archives (nested or otherwise), extract them all to the same
location.
NOTE: If you want to use the CSC then extract it last. If you're asked
to overwrite files then do so.
NOTE: If you want to use the CSC then extract it last.
3. Open the a terminal and run Heimdall Frontend by typing:
@ -123,9 +121,9 @@ Performing a Custom Flash with Heimdall Frontend:
If you do not already have a valid PIT file stored on your computer you
can download your device's PIT file from the "Utilities" tab.
6. If a valid PIT file has been selected then the "Add" button below the
"Partitions (Files)" list-box will be enabled. Press this button to add
a partition to your flash.
6. If a valid PIT file has been selected then "Add" button below the
"Partitions (Files)" list-box will become enabled. Press this button to
add a partition to your flash.
7. When you first add a partition you will see the "Partition Name" and
"Partition ID" be populated with information. Use the "Partition Name"
@ -147,7 +145,7 @@ Performing a Custom Flash with Heimdall Frontend:
clicking the "Remove" button. Removing a partition from the list doesn't
remove it from your device, it simply means it will not be flashed.
10. Repeat steps 7-9 as often as needed to specify all the partitions/files
10. Repeat steps 7-9 as often as needed to specify all the partions/files
that you wish to flash.
11. Now you can chose whether you would like to repartition your device as
@ -186,7 +184,7 @@ Flashing Firmware from Command Line:
1. Fully charge your phone (use the wall charger as it's faster).
2. Download a decrypted device ROM or a Heimdall Firmware Package
2. Download a decrypted Samsung Galaxy S ROM or a Heimdall Firmware Package
and extract everything to the one directory.
3. If the ROM is not a Heimdall Firmware Package it may instead be provided
@ -204,27 +202,15 @@ Flashing Firmware from Command Line:
heimdall help
7. Before flashing, you must first know the names of the partitions you
wish to flash. These can be obtained by executing:
heimdall print-pit --no-reboot
The inclusion of --no-reboot ensures the phone will not reboot after PIT
file has been downloaded and displayed. After executing a command with
the --no-reboot argument, the next command should include the --resume
argument.
NOTE: You can still safely reboot your phone manually (with the power
button) after executing --no-reboot commands.
8. Use the help and print-pit output to construct a command with all the
files you want to flash.
7. Use the instructions to manually enter a command with all the files you
want to flash.
Here is an example that does a full flash and repartition on a GT-I9000:
heimdall flash --repartition --resume --pit s1_odin_20100512.pit --FACTORYFS factoryfs.rfs --CACHE cache.rfs --DBDATA dbdata.rfs --IBL+PBL boot.bin --SBL Sbl.bin --PARAM param.lfs --KERNEL zImage --MODEM modem.bin
heimdall flash --repartition --pit s1_odin_20100512.pit --factoryfs factoryfs.rfs --cache cache.rfs --dbdata dbdata.rfs --primary-boot boot.bin --secondary-boot Sbl.bin --param param.lfs --kernel zImage --modem modem.bin
9. Heimdall will display the progress as it flashes so that you know things
8. Heimdall will display the progress as it flashes so that you know things
are working as they should.
@ -243,7 +229,8 @@ How to Create a Heimdall Firmware Package:
create a package from scratch, or you can load an existing package, apply
modifications and then save the package. Creating a package from scratch
is the preferred approach, by taking this approach you're far less likely
to run into file name length limitations.
to run into file name length limitations. These are not Heimdall's own
limitation but rather a limitation of the TAR archive format.
Before you can access Heimdall Frontend's firmware creation functionality
(available from the "Create Package" tab) you must first specify which
@ -268,13 +255,13 @@ How to Create a Heimdall Firmware Package:
example would be "Cyanogenmod".
Firmware Version - This is the version identifier for your package. Any
valid string will be accepted, although the inclusion of decimal
valid string will be accepted although a the inclusion of decimal
point version number is preferred i.e. "7.1". If it makes sense
then feel free to append a text string like "RC1" or "Beta 1" to
the decimal point version.
Platform Name - This is the name of platform (or operating system) that
your firmware is based on. In most cases this will simply be
Platform Name - This is the name of the platform (or operating system)
that your firmware is based on. In most cases this will simply be
"Android".
Platform Version - This is the operating system version that your
@ -289,8 +276,8 @@ How to Create a Heimdall Firmware Package:
Homepage - Here you can enter your personal URL or a URL particularly
pertaining to the firmware being packaged. The URL must be well
formed for it to work. An example of a well formed URL is
"https://www.glassechidna.com.au/products/heimdall/". It is
important to include "https://" in order to specify the protocol as
"http://www.glassechidna.com.au/products/heimdall/". It is
important to include "http://" in order to specify the protocol as
other protocols such as "ftp://" are equally valid although
unlikely to be used.
@ -298,8 +285,8 @@ How to Create a Heimdall Firmware Package:
make donations for the effort you've put into developing your
firmware. Once again the URL must be well formed but there is no
requirement on how your donation page should work. For instance
both "https://www.glassechidna.com.au/donate/" and
"https://forum.xda-developers.com/donatetome.php?u=2710388" are
both "http://www.glassechidna.com.au/donate/" and
"http://forum.xda-developers.com/donatetome.php?u=2710388" are
equally valid.
Developer Info:
@ -308,7 +295,7 @@ How to Create a Heimdall Firmware Package:
team name. Click "Add" and the developer will be added to the list
on the right. If you make a mistake you can select a developer from
the list and click "Remove". You can list as many developers as you
like, however visual constraints of the "Load Package" tab means
like however visual constraints of the "Load Package" tab means
only a few names will be visible. Where possible you may want to
opt for team names over listing individual team members.
@ -375,7 +362,6 @@ All Heimdall Firmware Packages must contain a file called firmware.xml. This
file stores flash information and meta-data for the package as well as
information about other files contained within the package.
The format is fairly straight-forward so it won't be explained in great detail.
Nonetheless the following is an example of a valid firmware.xml file.
@ -391,8 +377,8 @@ Nonetheless the following is an example of a valid firmware.xml file.
<name>Benjamin Dobell</name>
<name>Hedonism Bot</name>
</developers>
<url>https://www.glassechidna.com.au/</url>
<donateurl>https://www.glassechidna.com.au/donate/</donateurl>
<url>http://www.glassechidna.com.au/</url>
<donateurl>http://www.glassechidna.com.au/donate/</donateurl>
<devices>
<device>
<manufacturer>Samsung</manufacturer>
@ -472,21 +458,68 @@ be included.
Appendix B - Installing Heimdall Suite from Source:
1. First make sure you have installed build-essential, cmake, zlib1g-dev,
qt5-default, libusb-1.0-0-dev and OpenGL (e.g libgl1-mesa-glx and
libgl1-mesa-dev).
Appendix B - Installing Heimdall from Source:
1. First make sure you have installed build-tools, pkgconfig, zlib-dev and
libusb-1.0-dev (v1.0.8 or newer).
NOTE: Package names may not be absolutely identical to those above.
2. Open a terminal and navigate to the directory you downloaded,
or extracted, Heimdall to.
3. Enter the following commands to compile Heimdall Suite:
3. Enter the following commands to compile libpit.
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
cd libpit
./configure
make
cd ..
NOTE: There is no need to run "sudo make install".
4. Enter the following commands to compile and install Heimdall:
cd heimdall
./configure
make
sudo make install
cd ..
NOTE: As an alternative to "sudo make install" you may chose to generate
a package by typing the following:
sudo checkinstall --pkgversion <version>
Where <version> is the current Heimdall release e.g. 1.3.0
5. Done
Appendix C - Installing Heimdall Frontend from Source:
1. Compile and install Heimdall, see Appendix B.
2. First make sure you have installed Qt 4.7 or later, available from:
http://qt.nokia.com/downloads/
3. Open a terminal and navigate to the directory you extracted Heimdall to.
4. Enter the following commands to compile and install Heimdall Frontend:
cd heimdall-frontend
qmake heimdall-frontend.pro
make
sudo make install
NOTE: As an alternative to "sudo make install" you may chose to generate
a package by typing the following:
sudo checkinstall --pkgversion <version>
Where <version> is the current Heimdall release e.g. 1.3.0
5. Done

View File

@ -1,5 +1,5 @@
Heimdall (c) 2010-2017 Benjamin Dobell, Glass Echidna
https://www.glassechidna.com.au/products/heimdall/
Heimdall (c) 2010-2011 Benjamin Dobell, Glass Echidna
http://www.glassechidna.com.au/products/heimdall/
DISCLAIMER:
@ -105,7 +105,7 @@ Performing a Custom Flash with Heimdall Frontend:
1. Fully charge your device (use the wall charger as it's faster).
2. Download a decrypted device ROM or a Heimdall Firmware Package
2. Download a decrypted Samsung Galaxy S ROM or a Heimdall Firmware Package
and extract everything to the one directory.
3. If the ROM is not a Heimdall Firmware Package it may instead be provided
@ -151,7 +151,7 @@ Performing a Custom Flash with Heimdall Frontend:
clicking the "Remove" button. Removing a partition from the list doesn't
remove it from your device, it simply means it will not be flashed.
10. Repeat steps 7-9 as often as needed to specify all the partitions/files
10. Repeat steps 7-9 as often as needed to specify all the partions/files
that you wish to flash.
11. Now you can chose whether you would like to repartition your device as
@ -190,7 +190,7 @@ Flashing Firmware from Command Line:
1. Fully charge your phone (use the wall charger as it's faster).
2. Download a decrypted device ROM or a Heimdall Firmware Package
2. Download a decrypted Samsung Galaxy S ROM or a Heimdall Firmware Package
and extract everything to the one directory.
3. If the ROM is not a Heimdall Firmware Package it may instead be provided
@ -209,27 +209,15 @@ Flashing Firmware from Command Line:
heimdall help
7. Before flashing, you must first know the names of the partitions you
wish to flash. These can be obtained by executing:
heimdall print-pit --no-reboot
The inclusion of --no-reboot ensures the phone will not reboot after PIT
file has been downloaded and displayed. After executing a command with
the --no-reboot argument, the next command should include the --resume
argument.
NOTE: You can still safely reboot your phone manually (with the power
button) after executing --no-reboot commands.
8. Use the help and print-pit output to construct a command with all the
file you want to flash.
7. Use the instructions to manually enter a command with all the files you
want to flash.
Here is an example that does a full flash and repartition on a GT-I9000:
heimdall flash --repartition --resume --pit s1_odin_20100512.pit --FACTORYFS factoryfs.rfs --CACHE cache.rfs --DBDATA dbdata.rfs --IBL+PBL boot.bin --SBL Sbl.bin --PARAM param.lfs --KERNEL zImage --MODEM modem.bin
heimdall flash --repartition --pit s1_odin_20100512.pit --factoryfs factoryfs.rfs --cache cache.rfs --dbdata dbdata.rfs --primary-boot boot.bin --secondary-boot Sbl.bin --param param.lfs --kernel zImage --modem modem.bin
9. Heimdall will display the progress as it flashes so that you know things
8. Heimdall will display the progress as it flashes so that you know things
are working as they should.
@ -295,8 +283,8 @@ How to Create a Heimdall Firmware Package:
Homepage - Here you can enter your personal URL or a URL particularly
pertaining to the firmware being packaged. The URL must be well
formed for it to work. An example of a well formed URL is
"https://www.glassechidna.com.au/products/heimdall/". It is
important to include "https://" in order to specify the protocol as
"http://www.glassechidna.com.au/products/heimdall/". It is
important to include "http://" in order to specify the protocol as
other protocols such as "ftp://" are equally valid although
unlikely to be used.
@ -304,8 +292,8 @@ How to Create a Heimdall Firmware Package:
make donations for the effort you've put into developing your
firmware. Once again the URL must be well formed but there is no
requirement on how your donation page should work. For instance
both "https://www.glassechidna.com.au/donate/" and
"https://forum.xda-developers.com/donatetome.php?u=2710388" are
both "http://www.glassechidna.com.au/donate/" and
"http://forum.xda-developers.com/donatetome.php?u=2710388" are
equally valid.
Developer Info:
@ -396,8 +384,8 @@ Nonetheless the following is an example of a valid firmware.xml file.
<name>Benjamin Dobell</name>
<name>Hedonism Bot</name>
</developers>
<url>https://www.glassechidna.com.au/</url>
<donateurl>https://www.glassechidna.com.au/donate/</donateurl>
<url>http://www.glassechidna.com.au/</url>
<donateurl>http://www.glassechidna.com.au/donate/</donateurl>
<devices>
<device>
<manufacturer>Samsung</manufacturer>
@ -477,15 +465,69 @@ be included.
Appendix B - Installing Heimdall Suite from Source
Appendix B - Installing Heimdall from Source:
1. Open Terminal and install dependencies using Homebrew (https://brew.sh)
1. First make sure you have installed XCode and pkgconfig.
brew install libusb qt5 cmake
NOTE: There are several different ways you can install pkgconfig, one
option is to use Macports (http://www.macports.org/).
2. Build Heimdall & Heimdall Frontend
2. Open a terminal and navigate to the directory you downloaded,
or extracted, Heimdall to.
3. Download, compile and install libusb-1.0:
http://www.libusb.org/
NOTE: Alternatively you may install Macport's libusb-devel package.
4. Enter the following commands to compile libpit.
cd libpit
./configure
make
cd ..
NOTE: There is no need to run "sudo make install".
4. Enter the following commands to compile and install Heimdall:
cd heimdall
./configure
make
sudo make install
cd ..
5. If you haven't installed the driver before, enter the following:
cd OSX
sudo ./install-kext.sh
6. Done
Appendix C - Installing Heimdall Frontend from Source:
1. Compile and install Heimdall, see Appendix B.
2. First make sure you have installed XCode from your OS X install DVD.
You'll also need Qt 4.7 or later, available from:
http://qt.nokia.com/downloads/
3. Open a terminal and navigate to the directory you extracted Heimdall to.
4. Enter the following commands to compile and install Heimdall Frontend:
cd heimdall-frontend
qmake heimdall-frontend.pro
5. Open Finder and navigate to the heimdall-frontend sub-directory. Open
the newly created XCode project.
6. From the menu bar select Build -> Build. This outputs heimdall-frontend
to /Applications
7. Done
mkdir build
cd build
cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DQt5Widgets_DIR=/usr/local/opt/qt5/lib/cmake/Qt5Widgets ..
make

View File

@ -3,44 +3,38 @@
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key> <string>English</string>
<key>CFBundleGetInfoString</key> <string>Heimdall Download Mode</string>
<key>CFBundleIdentifier</key> <string>au.com.glassechidna.heimdall.usb_shield</string>
<key>CFBundleGetInfoString</key> <string>Galaxy S Download Mode (Heimdall)</string>
<key>CFBundleIdentifier</key> <string>au.com.glassechidna.heimdall_usb_shield</string>
<key>CFBundleInfoDictionaryVersion</key> <string>6.0</string>
<key>CFBundleName</key> <string>Heimdall Download Mode</string>
<key>CFBundleName</key> <string>Galaxy S Download Mode (Heimdall)</string>
<key>CFBundlePackageType</key> <string>KEXT</string>
<key>CFBundleSignature</key> <string>????</string>
<key>CFBundleVersion</key> <string>6.0</string>
<key>IOKitPersonalities</key>
<dict>
<key>0x6001</key>
<key>GalaxyS</key>
<dict>
<key>CFBundleIdentifier</key> <string>com.apple.driver.AppleUSBComposite</string>
<key>IOClass</key> <string>AppleUSBComposite</string>
<key>IOProbeScore</key> <integer>300000</integer>
<key>IOProviderClass</key> <string>IOUSBDevice</string>
<key>idVendor</key> <integer>1256</integer>
<key>idProduct</key> <integer>26113</integer>
<key>bcdDevice</key> <integer>256</integer>
</dict>
<key>0x685D</key>
<key>GalaxyS2</key>
<dict>
<key>CFBundleIdentifier</key> <string>com.apple.driver.AppleUSBComposite</string>
<key>IOClass</key> <string>AppleUSBComposite</string>
<key>IOProbeScore</key> <integer>300000</integer>
<key>IOProviderClass</key> <string>IOUSBDevice</string>
<key>idVendor</key> <integer>1256</integer>
<key>idProduct</key> <integer>26717</integer>
<key>bcdDevice</key> <integer>256</integer>
</dict>
<key>0x68C3</key>
<key>DroidCharge</key>
<dict>
<key>CFBundleIdentifier</key> <string>com.apple.driver.AppleUSBComposite</string>
<key>IOClass</key> <string>AppleUSBComposite</string>
<key>IOProbeScore</key> <integer>300000</integer>
<key>IOProviderClass</key> <string>IOUSBDevice</string>
<key>idVendor</key> <integer>1256</integer>
<key>idProduct</key> <integer>26819</integer>
<key>bcdDevice</key> <integer>256</integer>
</dict>
</dict>
<key>OSBundleCompatibleVersion</key> <string>1.8</string>

View File

@ -1,105 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>files</key>
<dict/>
<key>files2</key>
<dict/>
<key>rules</key>
<dict>
<key>^Resources/</key>
<true/>
<key>^Resources/.*\.lproj/</key>
<dict>
<key>optional</key>
<true/>
<key>weight</key>
<real>1000</real>
</dict>
<key>^Resources/.*\.lproj/locversion.plist$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>1100</real>
</dict>
<key>^version.plist$</key>
<true/>
</dict>
<key>rules2</key>
<dict>
<key>.*\.dSYM($|/)</key>
<dict>
<key>weight</key>
<real>11</real>
</dict>
<key>^(.*/)?\.DS_Store$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>2000</real>
</dict>
<key>^(Frameworks|SharedFrameworks|PlugIns|Plug-ins|XPCServices|Helpers|MacOS|Library/(Automator|Spotlight|LoginItems))/</key>
<dict>
<key>nested</key>
<true/>
<key>weight</key>
<real>10</real>
</dict>
<key>^.*</key>
<true/>
<key>^Info\.plist$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>20</real>
</dict>
<key>^PkgInfo$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>20</real>
</dict>
<key>^Resources/</key>
<dict>
<key>weight</key>
<real>20</real>
</dict>
<key>^Resources/.*\.lproj/</key>
<dict>
<key>optional</key>
<true/>
<key>weight</key>
<real>1000</real>
</dict>
<key>^Resources/.*\.lproj/locversion.plist$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>1100</real>
</dict>
<key>^[^/]+$</key>
<dict>
<key>nested</key>
<true/>
<key>weight</key>
<real>10</real>
</dict>
<key>^embedded\.provisionprofile$</key>
<dict>
<key>weight</key>
<real>20</real>
</dict>
<key>^version\.plist$</key>
<dict>
<key>weight</key>
<real>20</real>
</dict>
</dict>
</dict>
</plist>

View File

@ -1,7 +1,6 @@
#!/bin/bash
BASEDIR=$(dirname $0)
echo 'Installing Driver...'
sudo cp -R "$BASEDIR/heimdall.kext" /System/Library/Extensions
sudo cp -R heimdall.kext /System/Library/Extensions
sudo chmod -R 755 /System/Library/Extensions/heimdall.kext
sudo chown -R root:wheel /System/Library/Extensions/heimdall.kext
sudo kextload /System/Library/Extensions/heimdall.kext

27
README Normal file
View File

@ -0,0 +1,27 @@
--------------------------------------------------------------------------------
Heimdall (c) 2010-2011 Benjamin Dobell, Glass Echidna
http://www.glassechidna.com.au/products/heimdall/
DISCLAIMER:
This software attempts to flash your Galaxy S device. The very nature of
flashing is dangerous. As with all flashing software, Heimdall has the
potential to damage (brick) your phone if not used carefully. If you're
concerned, don't use this software. Flashing ROMs onto your phone may also
void your warranty. Benjamin Dobell and Glass Echidna are not responsible
for the result of your actions.
--------------------------------------------------------------------------------
For more details about how to compile and install Heimdall please refer to the
appropriate platform specific README:
- Linux:
Linux/README
- OS X
OSX/README.txt
- Windows
Win32/README.txt

View File

@ -1,60 +0,0 @@
# Heimdall
[![builds.sr.ht status](https://builds.sr.ht/~grimler/Heimdall/commits/ubuntu.yml.svg)](https://builds.sr.ht/~grimler/Heimdall/commits/ubuntu.yml?)
[![builds.sr.ht status](https://builds.sr.ht/~grimler/Heimdall/commits/archlinux.yml.svg)](https://builds.sr.ht/~grimler/Heimdall/commits/archlinux.yml?)
[![builds.sr.ht status](https://builds.sr.ht/~grimler/Heimdall/commits/alpine.yml.svg)](https://builds.sr.ht/~grimler/Heimdall/commits/alpine.yml?)
Heimdall is a cross-platform open-source tool suite used to flash
firmware (aka ROMs) onto Samsung mobile devices.
## Supported Platforms
Heimdall should work on AMD64/x86-64 (64-bit) or x86 (32-bit)
computers running GNU/Linux, macOS or Windows.
However, several third-parties have reported success running Heimdall
on ARM chipsets (in particular Raspberry Pi), as well as additional
operating systems such as FreeBSD.
## How does Heimdall work?
Heimdall connects to a mobile device over USB and interacts with
low-level software running on the device, known as Loke. Loke and
Heimdall communicate via the custom Samsung-developed protocol
typically referred to as the 'Odin 3 protocol'.
USB communication in Heimdall is handled by the popular open-source
USB library, [libusb](https://libusb.info).
## Free & Open Source
Heimdall is both free and open source. It is licensed under the MIT
license (see LICENSE).
Heimdall is maintained and predominantly developed by [Glass
Echidna](https://glassechidna.com.au/), a _tiny_ independent software
development company. If you appreciate our work and would like to
support future development please consider making a
[donation](https://glassechidna.com.au/donate/).
## Documentation
For more details about how to compile and install Heimdall please
refer to the appropriate platform specific README:
#### Linux
- Linux/README ([online](Linux/README))
#### OS X
- OSX/README.txt ([online](OSX/README.txt))
#### Windows
- Win32/README.txt ([online](Win32/README.txt))
### Odin protocol and PIT format
For more details on the Odin protocol, and the PIT files, see the
external project [samsung-loki/samsung-docs](https://samsung-loki.github.io/samsung-docs/).

BIN
Win32/Drivers/zadig.exe Normal file

Binary file not shown.

View File

@ -1,5 +1,5 @@
Heimdall (c) 2010-2017 Benjamin Dobell, Glass Echidna
https://www.glassechidna.com.au/products/heimdall/
Heimdall (c) 2010-2011 Benjamin Dobell, Glass Echidna
http://www.glassechidna.com.au/products/heimdall/
DISCLAIMER:
@ -11,16 +11,30 @@ DISCLAIMER:
for the result of your actions.
These instructions were written for Windows 7 / Vista / Server 2008 however the
procedure should be essentially the same for all supported versions of
These instructions were written for Windows Vista / Server 2008 however the
producedure should be essentially the same for all supported versions of
Windows (XP onwards).
Troubleshooting:
1. If you get an error as follows:
The program can't start because MSVCP100.dll is missing from your
computer.
This means that you haven't installed the Microsoft Visual C++ 2010
runtimes. The runtimes can be downloaded from Microsoft's website:
http://www.microsoft.com/download/en/details.aspx?id=5555
Driver Installation Instructions:
1. Put your device into download mode and plug it in.
1. Put your Samsung Galaxy S into download mode and plug it in.
2. Download zadig from https://zadig.akeo.ie/downloads/, and run zadig.exe.
2. Run zadig.exe included in the Drivers subdirectory.
3. From the menu chose Options -> List All Devices.
@ -36,7 +50,7 @@ Driver Installation Instructions:
Driver Uninstallation Instructions:
1. Put your device into download mode by holding Volume Down + Home + Power.
1. Put your Samsung Galaxy S into download mode by holding Volume Down + Home + Power.
2. Plug your phone into your PC.
@ -137,7 +151,7 @@ Performing a Custom Flash with Heimdall Frontend:
1. Fully charge your device (use the wall charger as it's faster).
2. Download a decrypted device ROM or a Heimdall Firmware Package
2. Download a decrypted Samsung Galaxy S ROM or a Heimdall Firmware Package
and extract everything to the one directory.
3. If the ROM is not a Heimdall Firmware Package it may instead be provided
@ -183,7 +197,7 @@ Performing a Custom Flash with Heimdall Frontend:
clicking the "Remove" button. Removing a partition from the list doesn't
remove it from your device, it simply means it will not be flashed.
10. Repeat steps 7-9 as often as needed to specify all the partitions/files
10. Repeat steps 7-9 as often as needed to specify all the partions/files
that you wish to flash.
11. Now you can chose whether you would like to repartition your device as
@ -222,7 +236,7 @@ Flashing Firmware from Command Line:
1. Fully charge your phone (use the wall charger as it's faster).
2. Download a decrypted device ROM or a Heimdall Firmware Package
2. Download a decrypted Samsung Galaxy S ROM or a Heimdall Firmware Package
and extract everything to the one directory.
3. If the ROM is not a Heimdall Firmware Package it may instead be provided
@ -244,30 +258,17 @@ Flashing Firmware from Command Line:
heimdall help
7. Before flashing, you must first know the names of the partitions you
wish to flash. These can be obtained by executing:
heimdall print-pit --no-reboot
The inclusion of --no-reboot ensures the phone will not reboot after PIT
file has been downloaded and displayed. After executing a command with
the --no-reboot argument, the next command should include the --resume
argument.
NOTE: You can still safely reboot your phone manually (with the power
button) after executing --no-reboot commands.
8. Use the help and print-pit output to construct a command with all the
file you want to flash.
7. Use the instructions to manually enter a command with all the files you
want to flash.
Here is an example that does a full flash and repartition on a GT-I9000:
heimdall flash --repartition --resume --pit s1_odin_20100512.pit --FACTORYFS factoryfs.rfs --CACHE cache.rfs --DBDATA dbdata.rfs --IBL+PBL boot.bin --SBL Sbl.bin --PARAM param.lfs --KERNEL zImage --MODEM modem.bin
heimdall flash --repartition --pit s1_odin_20100512.pit --factoryfs factoryfs.rfs --cache cache.rfs --dbdata dbdata.rfs --primary-boot boot.bin --secondary-boot Sbl.bin --param param.lfs --kernel zImage --modem modem.bin
NOTE: The above command assumes the files specified are installed in the
same directory as Heimdall.
9. Heimdall will display the progress as it flashes so that you know things
8. Heimdall will display the progress as it flashes so that you know things
are working as they should.
@ -333,8 +334,8 @@ How to Create a Heimdall Firmware Package:
Homepage - Here you can enter your personal URL or a URL particularly
pertaining to the firmware being packaged. The URL must be well
formed for it to work. An example of a well formed URL is
"https://www.glassechidna.com.au/products/heimdall/". It is
important to include "https://" in order to specify the protocol as
"http://www.glassechidna.com.au/products/heimdall/". It is
important to include "http://" in order to specify the protocol as
other protocols such as "ftp://" are equally valid although
unlikely to be used.
@ -342,8 +343,8 @@ How to Create a Heimdall Firmware Package:
make donations for the effort you've put into developing your
firmware. Once again the URL must be well formed but there is no
requirement on how your donation page should work. For instance
both "https://www.glassechidna.com.au/donate/" and
"https://forum.xda-developers.com/donatetome.php?u=2710388" are
both "http://www.glassechidna.com.au/donate/" and
"http://forum.xda-developers.com/donatetome.php?u=2710388" are
equally valid.
Developer Info:
@ -434,8 +435,8 @@ Nonetheless the following is an example of a valid firmware.xml file.
<name>Benjamin Dobell</name>
<name>Hedonism Bot</name>
</developers>
<url>https://www.glassechidna.com.au/</url>
<donateurl>https://www.glassechidna.com.au/donate/</donateurl>
<url>http://www.glassechidna.com.au/</url>
<donateurl>http://www.glassechidna.com.au/donate/</donateurl>
<devices>
<device>
<manufacturer>Samsung</manufacturer>
@ -517,31 +518,31 @@ be included.
Appendix B - Installing Heimdall Suite from Source
Heimdall and Heimdall Frontend both utilise CMake for managing the build
process. CMake can generate files for various build systems including GNU
Make and Visual Studio. However, official packages are compiled with GNU
Make and MinGW-W64 GCC/G++.
1. Ensure that you have both a version of Visual Studio 2010 with C++
support and Qt Developer Framework 4.7 (or newer) installed on your
system.
NOTE: Official builds use MinGW-W64 simply because on-going cross-platform
development is simpler when using just the one IDE (Jetbrain's CLion)
and similar toolchains.
A free version (Visual C++ 2010 Express) can be downloaded from
Microsoft's website:
1. Setup a MinGW-W64 build environment by utilising MSYS2:
http://www.microsoft.com/visualstudio/en-us/products/2010-editions/visual-cpp-express
https://msys2.github.io/
Qt can also be downloaded freely from Nokia's website:
2. After installing MSYS2 a command prompt will launch, enter:
http://qt.nokia.com/downloads/
Pacman -Syu
Pacman -S mingw-w64-x86_64 mingw-w64-x86_64-clang mingw-w64-x86_64-cmake mingw-w64-x86_64-libusb mingw-w64-x86_64-qt5-static make
2. Open Heimdall/msvc2010.sln
3. Add the MinGW-W64 binaries to your PATH environment variable:
3. From the Solutions Configuration drop-down change from "Debug" to
"Release".
export PATH="/mingw64/bin:$PATH"
4. In the Solution Explorer right-click on the heimdall-frontend project
and chose "Build".
4. Build Heimdall & Heimdall Frontend
5. Depending on how you've installed Qt on your system you may need to copy
"QtCore4.dll, "QtGui4.dll" and "QtXml4.dll" from your Qt bin/
sub-directory to Heimdall's Win32/Release sub-directory.
6. Heimdall Frontend can then be run from Win32/Release or command line can
be used to run Heimdall (command line) from the same directory.
mkdir build
cd build
cmake -G "MSYS Makefiles" -DCMAKE_BUILD_TYPE=Release -DQt5Widgets_DIR=/c/msys64/mingw64/qt5-static/lib/cmake/Qt5Widgets ..
make

View File

@ -1,85 +0,0 @@
# CMake support for fseeko
#
# Based on FindLFS.cmake by
# Copyright (C) 2016 Julian Andres Klode <jak@debian.org>.
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation files
# (the "Software"), to deal in the Software without restriction,
# including without limitation the rights to use, copy, modify, merge,
# publish, distribute, sublicense, and/or sell copies of the Software,
# and to permit persons to whom the Software is furnished to do so,
# subject to the following conditions:
#
# The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
# BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
# ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
#
# This defines the following variables
#
# FSEEKO_DEFINITIONS - List of definitions to pass to add_definitions()
# FSEEKO_COMPILE_OPTIONS - List of definitions to pass to add_compile_options()
# FSEEKO_LIBRARIES - List of libraries and linker flags
# FSEEKO_FOUND - If there is Large files support
#
include(CheckCSourceCompiles)
include(FindPackageHandleStandardArgs)
include(CMakePushCheckState)
# Check for the availability of fseeko()
# The cases handled are:
#
# * Native fseeko()
# * Preprocessor flag -D_LARGEFILE_SOURCE
#
function(_fseeko_check)
set(_fseeko_cppflags)
cmake_push_check_state()
set(CMAKE_REQUIRED_QUIET 1)
set(CMAKE_REQUIRED_DEFINITIONS ${LFS_DEFINITIONS})
message(STATUS "Looking for native fseeko support")
check_symbol_exists(fseeko stdio.h fseeko_native)
cmake_pop_check_state()
if (fseeko_native)
message(STATUS "Looking for native fseeko support - found")
set(FSEEKO_FOUND TRUE)
else()
message(STATUS "Looking for native fseeko support - not found")
endif()
if (NOT FSEEKO_FOUND)
# See if it's available with _LARGEFILE_SOURCE.
cmake_push_check_state()
set(CMAKE_REQUIRED_QUIET 1)
set(CMAKE_REQUIRED_DEFINITIONS ${LFS_DEFINITIONS} "-D_LARGEFILE_SOURCE")
check_symbol_exists(fseeko stdio.h fseeko_need_largefile_source)
cmake_pop_check_state()
if (fseeko_need_largefile_source)
message(STATUS "Looking for fseeko support with _LARGEFILE_SOURCE - found")
set(FSEEKO_FOUND TRUE)
set(_fseeko_cppflags "-D_LARGEFILE_SOURCE")
else()
message(STATUS "Looking for fseeko support with _LARGEFILE_SOURCE - not found")
endif()
endif()
set(FSEEKO_DEFINITIONS ${_fseeko_cppflags} CACHE STRING "Extra definitions for fseeko support")
set(FSEEKO_COMPILE_OPTIONS "" CACHE STRING "Extra compiler options for fseeko support")
set(FSEEKO_LIBRARIES "" CACHE STRING "Extra definitions for fseeko support")
set(FSEEKO_FOUND ${FSEEKO_FOUND} CACHE INTERNAL "Found fseeko")
endfunction()
if (NOT FSEEKO_FOUND)
_fseeko_check()
endif()
find_package_handle_standard_args(FSEEKO "Could not find fseeko. Set FSEEKO_DEFINITIONS, FSEEKO_COMPILE_OPTIONS, FSEEKO_LIBRARIES." FSEEKO_FOUND)

View File

@ -1,153 +0,0 @@
# CMake support for large files
#
# Copyright (C) 2016 Julian Andres Klode <jak@debian.org>.
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation files
# (the "Software"), to deal in the Software without restriction,
# including without limitation the rights to use, copy, modify, merge,
# publish, distribute, sublicense, and/or sell copies of the Software,
# and to permit persons to whom the Software is furnished to do so,
# subject to the following conditions:
#
# The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
# BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
# ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
#
# This defines the following variables
#
# LFS_DEFINITIONS - List of definitions to pass to add_definitions()
# LFS_COMPILE_OPTIONS - List of definitions to pass to add_compile_options()
# LFS_LIBRARIES - List of libraries and linker flags
# LFS_FOUND - If there is Large files support
#
include(CheckCSourceCompiles)
include(FindPackageHandleStandardArgs)
include(CMakePushCheckState)
# Test program to check for LFS. Requires that off_t has at least 8 byte large
set(_lfs_test_source
"
#include <sys/types.h>
typedef char my_static_assert[sizeof(off_t) >= 8 ? 1 : -1];
int main(void) { return 0; }
"
)
# Check if the given options are needed
#
# This appends to the variables _lfs_cppflags, _lfs_cflags, and _lfs_ldflags,
# it also sets LFS_FOUND to 1 if it works.
function(_lfs_check_compiler_option var options definitions libraries)
cmake_push_check_state()
set(CMAKE_REQUIRED_QUIET 1)
set(CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS} ${options})
set(CMAKE_REQUIRED_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS} ${definitions})
set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_DEFINITIONS} ${libraries})
message(STATUS "Looking for LFS support using ${options} ${definitions} ${libraries}")
check_c_source_compiles("${_lfs_test_source}" ${var})
cmake_pop_check_state()
if(${var})
message(STATUS "Looking for LFS support using ${options} ${definitions} ${libraries} - found")
set(_lfs_cppflags ${_lfs_cppflags} ${definitions} PARENT_SCOPE)
set(_lfs_cflags ${_lfs_cflags} ${options} PARENT_SCOPE)
set(_lfs_ldflags ${_lfs_ldflags} ${libraries} PARENT_SCOPE)
set(LFS_FOUND TRUE PARENT_SCOPE)
else()
message(STATUS "Looking for LFS support using ${options} ${definitions} ${libraries} - not found")
endif()
endfunction()
# Check for the availability of LFS.
# The cases handled are:
#
# * Native LFS
# * Output of getconf LFS_CFLAGS; getconf LFS_LIBS; getconf LFS_LDFLAGS
# * Preprocessor flag -D_FILE_OFFSET_BITS=64
# * Preprocessor flag -D_LARGE_FILES
#
function(_lfs_check)
set(_lfs_cflags)
set(_lfs_cppflags)
set(_lfs_ldflags)
set(_lfs_libs)
cmake_push_check_state()
set(CMAKE_REQUIRED_QUIET 1)
message(STATUS "Looking for native LFS support")
check_c_source_compiles("${_lfs_test_source}" lfs_native)
cmake_pop_check_state()
if (lfs_native)
message(STATUS "Looking for native LFS support - found")
set(LFS_FOUND TRUE)
else()
message(STATUS "Looking for native LFS support - not found")
endif()
if (NOT LFS_FOUND)
# Check using getconf. If getconf fails, don't worry, the check in
# _lfs_check_compiler_option will fail as well.
execute_process(COMMAND getconf LFS_CFLAGS
OUTPUT_VARIABLE _lfs_cflags_raw
OUTPUT_STRIP_TRAILING_WHITESPACE
ERROR_QUIET)
execute_process(COMMAND getconf LFS_LIBS
OUTPUT_VARIABLE _lfs_libs_tmp
OUTPUT_STRIP_TRAILING_WHITESPACE
ERROR_QUIET)
execute_process(COMMAND getconf LFS_LDFLAGS
OUTPUT_VARIABLE _lfs_ldflags_tmp
OUTPUT_STRIP_TRAILING_WHITESPACE
ERROR_QUIET)
separate_arguments(_lfs_cflags_raw)
separate_arguments(_lfs_ldflags_tmp)
separate_arguments(_lfs_libs_tmp)
# Move -D flags to the place they are supposed to be
foreach(flag ${_lfs_cflags_raw})
if (flag MATCHES "-D.*")
list(APPEND _lfs_cppflags_tmp ${flag})
else()
list(APPEND _lfs_cflags_tmp ${flag})
endif()
endforeach()
# Check if the flags we received (if any) produce working LFS support
_lfs_check_compiler_option(lfs_getconf_works
"${_lfs_cflags_tmp}"
"${_lfs_cppflags_tmp}"
"${_lfs_libs_tmp};${_lfs_ldflags_tmp}")
endif()
if(NOT LFS_FOUND) # IRIX stuff
_lfs_check_compiler_option(lfs_need_n32 "-n32" "" "")
endif()
if(NOT LFS_FOUND) # Linux and friends
_lfs_check_compiler_option(lfs_need_file_offset_bits "" "-D_FILE_OFFSET_BITS=64" "")
endif()
if(NOT LFS_FOUND) # AIX
_lfs_check_compiler_option(lfs_need_large_files "" "-D_LARGE_FILES=1" "")
endif()
set(LFS_DEFINITIONS ${_lfs_cppflags} CACHE STRING "Extra definitions for large file support")
set(LFS_COMPILE_OPTIONS ${_lfs_cflags} CACHE STRING "Extra definitions for large file support")
set(LFS_LIBRARIES ${_lfs_libs} ${_lfs_ldflags} CACHE STRING "Extra definitions for large file support")
set(LFS_FOUND ${LFS_FOUND} CACHE INTERNAL "Found LFS")
endfunction()
if (NOT LFS_FOUND)
_lfs_check()
endif()
find_package_handle_standard_args(LFS "Could not find LFS. Set LFS_DEFINITIONS, LFS_COMPILE_OPTIONS, LFS_LIBRARIES." LFS_FOUND)

View File

@ -1,130 +0,0 @@
# Based on module from bladeRF: https://github.com/Nuand/bladeRF/blob/e09200c38e1b273ebe43cd789839e66b0506aead/host/cmake/modules/FindLibUSB.cmake
# This is a modified version of the file written by Hedrik Sattler,
# from the OpenOBEX project (licensed GPLv2/LGPL). (If this is not correct,
# please contact us so we can attribute the author appropriately.)
#
# https://github.com/zuckschwerdt/openobex/blob/master/CMakeModules/FindLibUSB.cmake
# http://dev.zuckschwerdt.org/openobex/
#
# Find libusb-1.0
#
# It will use PkgConfig if present and supported, otherwise this
# script searches for binary distribution in the path defined by
# the LIBUSB_PATH variable.
#
# The following standard variables get defined:
# LIBUSB_FOUND: true if LibUSB was found
# LIBUSB_HEADER_FILE: the location of the C header file
# LIBUSB_INCLUDE_DIRS: the directorys that contain headers
# LIBUSB_LIBRARIES: the library files
# LIBUSB_VERSION the detected libusb version
# LIBUSB_HAVE_GET_VERSION True if libusb has libusb_get_version()
include(CheckLibraryExists)
include(CheckIncludeFile)
# In Linux, folks should generally be able to simply fetch the libusb library and
# development packages from their distros package repository. Windows users will
# likely want to fetch a binary distribution, hence the Windows-oriented default.
#
# See http://www.libusb.org/wiki/windows_backend#LatestBinarySnapshots
if(WIN32)
set(LIBUSB_PATH
"C:/Program Files (x86)/libusb-1.0.20"
CACHE
PATH
"Path to libusb files. (This is generally only needed for Windows users who downloaded binary distributions.)"
)
endif()
# FreeBSD has built-in libusb since 800069
if((${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD") OR (${CMAKE_SYSTEM_NAME} MATCHES "kFreeBSD") )
exec_program(sysctl ARGS -n kern.osreldate OUTPUT_VARIABLE FREEBSD_VERSION)
set(LIBUSB_FOUND TRUE)
set(LIBUSB_SKIP_VERSION_CHECK TRUE)
set(LIBUSB_INCLUDE_DIRS "/usr/include")
set(LIBUSB_HEADER_FILE "${LIBUSB_INCLUDE_DIRS}/libusb.h")
set(LIBUSB_LIBRARIES "usb")
set(LIBUSB_LIBRARY_DIRS "/usr/lib/")
endif((${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD") OR (${CMAKE_SYSTEM_NAME} MATCHES "kFreeBSD") )
find_package(PkgConfig)
if(PKG_CONFIG_FOUND)
pkg_check_modules(PKGCONFIG_LIBUSB QUIET libusb-1.0 libusb)
endif(PKG_CONFIG_FOUND)
if(PKGCONFIG_LIBUSB_FOUND AND NOT LIBUSB_FOUND)
set(LIBUSB_INCLUDE_DIRS ${PKGCONFIG_LIBUSB_INCLUDE_DIRS})
foreach(i ${PKGCONFIG_LIBUSB_LIBRARIES})
string(REGEX MATCH "[^-]*" ibase "${i}")
find_library(${ibase}_LIBRARY
NAMES ${i}
PATHS ${PKGCONFIG_LIBUSB_LIBRARY_DIRS}
)
if(${ibase}_LIBRARY)
list(APPEND LIBUSB_LIBRARIES ${${ibase}_LIBRARY})
endif(${ibase}_LIBRARY)
mark_as_advanced(${ibase}_LIBRARY)
endforeach(i)
else(PKGCONFIG_LIBUSB_FOUND)
if(${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
# The libusbx binary distribution contains several libs.
# Use the lib that got compiled with the same compiler.
if(MSVC)
if(CMAKE_CL_64)
set(LIBUSB_LIBRARY_PATH_SUFFIX MS64/dll)
else(CMAKE_CL_64)
set(LIBUSB_LIBRARY_PATH_SUFFIX MS32/dll)
endif(CMAKE_CL_64)
elseif(CMAKE_COMPILER_IS_GNUCC)
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
set(LIBUSB_LIBRARY_PATH_SUFFIX MinGW32/dll)
else(CMAKE_SIZEOF_VOID_P EQUAL 8)
set(LIBUSB_LIBRARY_PATH_SUFFIX MinGW64/dll)
endif(CMAKE_SIZEOF_VOID_P EQUAL 8)
endif(MSVC)
else()
set(LIBUSB_LIBRARY_PATH_SUFFIX lib)
set(LIBUSB_EXTRA_PATHS /usr /usr/local /opt/local)
endif(${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
find_file(LIBUSB_HEADER_FILE
NAMES
libusb.h
PATHS
${LIBUSB_PATH}
${LIBUSB_EXTRA_PATHS}
PATH_SUFFIXES
include include/libusbx-1.0 include/libusb-1.0
)
mark_as_advanced(LIBUSB_HEADER_FILE)
get_filename_component(LIBUSB_INCLUDE_DIRS "${LIBUSB_HEADER_FILE}" PATH)
find_library(usb_LIBRARY
NAMES
libusb-1.0 usb-1.0
PATHS
${LIBUSB_PATH}
${LIBUSB_EXTRA_PATHS}
PATH_SUFFIXES
${LIBUSB_LIBRARY_PATH_SUFFIX}
)
mark_as_advanced(usb_LIBRARY)
if(usb_LIBRARY)
set(LIBUSB_LIBRARIES ${usb_LIBRARY})
endif(usb_LIBRARY)
endif(PKGCONFIG_LIBUSB_FOUND AND NOT LIBUSB_FOUND)
if(LIBUSB_INCLUDE_DIRS AND LIBUSB_LIBRARIES)
set(LIBUSB_FOUND TRUE)
endif(LIBUSB_INCLUDE_DIRS AND LIBUSB_LIBRARIES)
if(LIBUSB_FOUND)
set(CMAKE_REQUIRED_INCLUDES "${LIBUSB_INCLUDE_DIRS}")
check_include_file("{LIBUSB_HEADER_FILE}" LIBUSB_FOUND)
endif(LIBUSB_FOUND)

View File

@ -1,89 +0,0 @@
cmake_minimum_required(VERSION 3.0.0)
project(heimdall-frontend)
set(LIBPIT_INCLUDE_DIRS
../libpit/source)
set(CMAKE_AUTOMOC ON)
set(CMAKE_INCLUDE_CURRENT_DIR ON) # moc files are generated in build (current) directory
find_package(Qt5Widgets REQUIRED)
find_package(ZLIB REQUIRED)
if(APPLE)
set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LIBRARY "libc++")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -lobjc -framework IOKit -framework CoreFoundation")
endif()
if(MINGW)
set(CMAKE_EXE_LINKER_FLAGS "-static-libgcc -static-libstdc++ -static")
endif(MINGW)
include_directories(${LIBPIT_INCLUDE_DIRS})
set(HEIMDALL_FRONTEND_SOURCE_FILES
source/aboutform.cpp
source/Alerts.cpp
source/FirmwareInfo.cpp
source/main.cpp
source/mainwindow.cpp
source/PackageData.cpp
source/Packaging.cpp)
qt5_wrap_ui(HEIMDALL_FRONTEND_FORMS
mainwindow.ui
aboutform.ui)
qt5_add_resources(HEIMDALL_FRONTEND_RESOURCES
mainwindow.qrc)
add_executable(heimdall-frontend WIN32
MACOSX_BUNDLE
${HEIMDALL_FRONTEND_SOURCE_FILES}
${HEIMDALL_FRONTEND_FORMS}
${HEIMDALL_FRONTEND_RESOURCES})
target_compile_features(heimdall-frontend PRIVATE cxx_std_11)
include(CheckSymbolExists)
#
# Large file support on UN*X, a/k/a LFS.
#
# On Windows, we require _fseeki64() and _ftelli64(). Visual Studio
# has had supported them since Visual Studio 2005/MSVCR80.
#
if(NOT WIN32)
include(FindLFS)
if(LFS_FOUND)
#
# Add the required #defines.
#
add_definitions(${LFS_DEFINITIONS})
endif()
#
# Check for fseeko as well.
#
include(FindFseeko)
if(FSEEKO_FOUND)
set(HAVE_FSEEKO ON)
#
# Add the required #defines.
#
add_definitions(${FSEEKO_DEFINITIONS})
endif()
endif()
set_property(TARGET heimdall-frontend
APPEND PROPERTY COMPILE_DEFINITIONS "QT_LARGEFILE_SUPPORT")
target_link_libraries(heimdall-frontend pit)
target_link_libraries(heimdall-frontend Qt5::Widgets)
target_link_libraries(heimdall-frontend z)
install (TARGETS heimdall-frontend
RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
BUNDLE DESTINATION /Applications)

View File

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ImportGroup Label="PropertySheets" />
<PropertyGroup Label="UserMacros">
<QTDIR>D:\development\cpp\libraries\Qt\2010.05\qt</QTDIR>
</PropertyGroup>
<PropertyGroup />
<ItemDefinitionGroup />
<ItemGroup>
<BuildMacro Include="QTDIR">
<Value>$(QTDIR)</Value>
<EnvironmentVariable>true</EnvironmentVariable>
</BuildMacro>
</ItemGroup>
</Project>

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2010-2017 Benjamin Dobell, Glass Echidna
/* Copyright (c) 2010-2011 Benjamin Dobell, Glass Echidna
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2010-2017 Benjamin Dobell, Glass Echidna
/* Copyright (c) 2010-2011 Benjamin Dobell, Glass Echidna
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2010-2017 Benjamin Dobell, Glass Echidna
/* Copyright (c) 2010-2011 Benjamin Dobell, Glass Echidna
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@ -772,9 +772,7 @@ void FirmwareInfo::WriteXml(QXmlStreamWriter& xml) const
xml.writeStartElement("files");
for (int i = 0; i < fileInfos.length(); i++)
{
fileInfos[i].WriteXml(xml, Packaging::ClashlessFilename(fileInfos, i));
}
xml.writeEndElement();

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2010-2017 Benjamin Dobell, Glass Echidna
/* Copyright (c) 2010-2011 Benjamin Dobell, Glass Echidna
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2010-2017 Benjamin Dobell, Glass Echidna
/* Copyright (c) 2010-2011 Benjamin Dobell, Glass Echidna
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2010-2017 Benjamin Dobell, Glass Echidna
/* Copyright (c) 2010-2011 Benjamin Dobell, Glass Echidna
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2010-2017 Benjamin Dobell, Glass Echidna
/* Copyright (c) 2010-2011 Benjamin Dobell, Glass Echidna
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@ -32,7 +32,6 @@
#include <QDateTime>
#include <QDir>
#include <QProgressDialog>
#include <QRandomGenerator>
// Heimdall Frontend
#include "Alerts.h"
@ -302,7 +301,7 @@ bool Packaging::WriteTarEntry(const QString& filePath, QTemporaryFile *tarFile,
// Note: We don't support base-256 encoding. Support could be added later.
sprintf(tarHeader.fields.size, "%011llo", file.size());
sprintf(tarHeader.fields.modifiedTime, "%u", qtFileInfo.lastModified().toTime_t());
sprintf(tarHeader.fields.modifiedTime, "%011llo", qtFileInfo.lastModified().toMSecsSinceEpoch() / 1000);
// Regular File
tarHeader.fields.typeFlag = '0';
@ -382,24 +381,6 @@ bool Packaging::CreateTar(const FirmwareInfo& firmwareInfo, QTemporaryFile *tarF
for (int i = 0; i < fileInfos.length(); i++)
{
// If the file was already compressed we don't compress it again.
bool skip = false;
for (int j = 0; j < i; j++)
{
if (fileInfos[i].GetFilename() == fileInfos[j].GetFilename())
{
skip = true;
break;
}
}
if (skip)
{
progressDialog.setValue(i);
continue;
}
QString filename = ClashlessFilename(fileInfos, i);
if (filename == "firmware.xml")
@ -408,7 +389,7 @@ bool Packaging::CreateTar(const FirmwareInfo& firmwareInfo, QTemporaryFile *tarF
return (false);
}
if (!WriteTarEntry(fileInfos[i].GetFilename(), tarFile, filename))
if (!WriteTarEntry(fileInfos[i].GetFilename(), tarFile, ClashlessFilename(fileInfos, i)))
{
tarFile->resize(0);
tarFile->close();
@ -685,121 +666,122 @@ QString Packaging::ClashlessFilename(const QList<FileInfo>& fileInfos, int fileI
QString otherFilename = fileInfos[i].GetFilename().mid(lastSlash + 1);
// If the filenames are the same, but the files themselves aren't the same (i.e. not the same path), then rename.
if (filename == otherFilename && fileInfos[i].GetFilename() != fileInfos[fileInfoIndex].GetFilename())
if (filename == otherFilename)
renameIndex++;
}
if (renameIndex <= 0)
if (renameIndex > 0)
{
return (filename);
}
int lastPeriodIndex = filename.lastIndexOf(QChar('.'));
QString shortFilename;
QString fileType;
int lastPeriodIndex = filename.lastIndexOf(QChar('.'));
QString shortFilename;
QString fileType;
if (lastPeriodIndex >= 0)
{
shortFilename = filename.left(lastPeriodIndex);
fileType = filename.mid(lastPeriodIndex);
}
else
{
shortFilename = filename;
}
unsigned int renameIndexOffset = 0;
bool validIndexOffset = true;
// Before we append a rename index we must ensure it doesn't produce further collisions.
for (int i = 0; i < fileInfos.length(); i++)
{
int lastSlash = fileInfos[i].GetFilename().lastIndexOf('/');
if (lastSlash < 0)
lastSlash = fileInfos[i].GetFilename().lastIndexOf('\\');
QString otherFilename = fileInfos[i].GetFilename().mid(lastSlash + 1);
if (otherFilename.length() > filename.length() + 1)
if (lastPeriodIndex >= 0)
{
QString trimmedOtherFilename = otherFilename.left(shortFilename.length());
if (shortFilename == trimmedOtherFilename)
{
lastPeriodIndex = otherFilename.lastIndexOf(QChar('.'));
QString shortOtherFilename;
if (lastPeriodIndex >= 0)
shortOtherFilename = otherFilename.left(lastPeriodIndex);
else
shortOtherFilename = otherFilename;
QRegExp renameExp("-[0-9]+");
if (renameExp.lastIndexIn(shortOtherFilename) == shortFilename.length())
{
unsigned int trailingInteger = shortOtherFilename.mid(shortFilename.length() + 1).toUInt(&validIndexOffset);
if (!validIndexOffset)
break;
if (trailingInteger > renameIndexOffset)
renameIndexOffset = trailingInteger;
}
}
shortFilename = filename.left(lastPeriodIndex);
fileType = filename.mid(lastPeriodIndex);
}
}
if (validIndexOffset)
{
// Ensure renaming won't involve integer overflow!
if (renameIndex > static_cast<unsigned int>(-1) - renameIndexOffset)
validIndexOffset = false;
}
if (validIndexOffset)
{
shortFilename.append(QChar('-'));
shortFilename.append(QString::number(renameIndexOffset + renameIndex));
return (shortFilename + fileType);
}
else
{
// Fallback behaviour... an absolutely terrible brute force implementation!
QString filename;
QString renamePrefix;
for (;;)
else
{
renamePrefix.append(QChar('+'));
shortFilename = filename;
}
for (unsigned int i = 0; i < static_cast<unsigned int>(-1); i++)
unsigned int renameIndexOffset = 0;
bool validIndexOffset = true;
// Before we append a rename index we must ensure it doesn't produce further collisions.
for (int i = 0; i < fileInfos.length(); i++)
{
int lastSlash = fileInfos[i].GetFilename().lastIndexOf('/');
if (lastSlash < 0)
lastSlash = fileInfos[i].GetFilename().lastIndexOf('\\');
QString otherFilename = fileInfos[i].GetFilename().mid(lastSlash + 1);
if (otherFilename.length() > filename.length() + 1)
{
filename = shortFilename + renamePrefix + QString::number(i) + fileType;
QString trimmedOtherFilename = otherFilename.left(shortFilename.length());
bool valid = true;
for (int i = 0; i < fileInfos.length(); i++)
if (shortFilename == trimmedOtherFilename)
{
int lastSlash = fileInfos[i].GetFilename().lastIndexOf('/');
lastPeriodIndex = otherFilename.lastIndexOf(QChar('.'));
QString shortOtherFilename;
if (lastSlash < 0)
lastSlash = fileInfos[i].GetFilename().lastIndexOf('\\');
if (lastPeriodIndex >= 0)
shortOtherFilename = otherFilename.left(lastPeriodIndex);
else
shortOtherFilename = otherFilename;
if (filename == fileInfos[i].GetFilename().mid(lastSlash + 1))
QRegExp renameExp("-[0-9]+");
if (renameExp.lastIndexIn(shortOtherFilename) == shortFilename.length())
{
valid = false;
break;
unsigned int trailingInteger = shortOtherFilename.mid(shortFilename.length() + 1).toUInt(&validIndexOffset);
if (!validIndexOffset)
break;
if (trailingInteger > renameIndexOffset)
renameIndexOffset = trailingInteger;
}
}
if (valid)
return (filename);
}
}
if (validIndexOffset)
{
// Ensure renaming won't involve integer overflow!
if (renameIndex > static_cast<unsigned int>(-1) - renameIndexOffset)
validIndexOffset = false;
}
if (validIndexOffset)
{
shortFilename.append(QChar('-'));
shortFilename.append(QString::number(renameIndexOffset + renameIndex));
return (shortFilename + fileType);
}
else
{
// Fallback behaviour... an absolutely terrible brute force implementation!
QString filename;
QString renamePrefix;
for (;;)
{
renamePrefix.append(QChar('+'));
for (unsigned int i = 0; i < static_cast<unsigned int>(-1); i++)
{
filename = shortFilename + renamePrefix + QString::number(i) + fileType;
bool valid = true;
for (int i = 0; i < fileInfos.length(); i++)
{
int lastSlash = fileInfos[i].GetFilename().lastIndexOf('/');
if (lastSlash < 0)
lastSlash = fileInfos[i].GetFilename().lastIndexOf('\\');
if (filename == fileInfos[i].GetFilename().mid(lastSlash + 1))
{
valid = false;
break;
}
}
if (valid)
return (filename);
}
}
}
}
else
{
return (filename);
}
}
@ -821,111 +803,113 @@ QString Packaging::ClashlessFilename(const QList<FileInfo>& fileInfos, const QSt
renameIndex++;
}
if (renameIndex <= 0)
if (renameIndex > 0)
{
return (filename);
}
int lastPeriodIndex = filename.lastIndexOf(QChar('.'));
QString shortFilename;
QString fileType;
int lastPeriodIndex = filename.lastIndexOf(QChar('.'));
QString shortFilename;
QString fileType;
if (lastPeriodIndex >= 0)
{
shortFilename = filename.left(lastPeriodIndex);
fileType = filename.mid(lastPeriodIndex);
}
else
{
shortFilename = filename;
}
unsigned int renameIndexOffset = 0;
bool validIndexOffset = true;
// Before we append a rename index we must ensure it doesn't produce further collisions.
for (int i = 0; i < fileInfos.length(); i++)
{
int lastSlash = fileInfos[i].GetFilename().lastIndexOf('/');
if (lastSlash < 0)
lastSlash = fileInfos[i].GetFilename().lastIndexOf('\\');
QString otherFilename = fileInfos[i].GetFilename().mid(lastSlash + 1);
if (otherFilename.length() > filename.length() + 1)
if (lastPeriodIndex >= 0)
{
QString trimmedOtherFilename = otherFilename.left(filename.length());
shortFilename = filename.left(lastPeriodIndex);
fileType = filename.mid(lastPeriodIndex);
}
else
{
shortFilename = filename;
}
if (filename == trimmedOtherFilename)
unsigned int renameIndexOffset = 0;
bool validIndexOffset = true;
// Before we append a rename index we must ensure it doesn't produce further collisions.
for (int i = 0; i < fileInfos.length(); i++)
{
int lastSlash = fileInfos[i].GetFilename().lastIndexOf('/');
if (lastSlash < 0)
lastSlash = fileInfos[i].GetFilename().lastIndexOf('\\');
QString otherFilename = fileInfos[i].GetFilename().mid(lastSlash + 1);
if (otherFilename.length() > filename.length() + 1)
{
lastPeriodIndex = otherFilename.lastIndexOf(QChar('.'));
QString shortOtherFilename;
QString trimmedOtherFilename = otherFilename.left(filename.length());
if (lastPeriodIndex >= 0)
shortOtherFilename = otherFilename.left(lastPeriodIndex);
else
shortOtherFilename = otherFilename;
QRegExp renameExp("-[0-9]+");
if (renameExp.lastIndexIn(shortOtherFilename) == shortFilename.length())
if (filename == trimmedOtherFilename)
{
unsigned int trailingInteger = shortOtherFilename.mid(shortFilename.length() + 1).toUInt(&validIndexOffset);
lastPeriodIndex = otherFilename.lastIndexOf(QChar('.'));
QString shortOtherFilename;
if (!validIndexOffset)
break;
if (lastPeriodIndex >= 0)
shortOtherFilename = otherFilename.left(lastPeriodIndex);
else
shortOtherFilename = otherFilename;
if (trailingInteger > renameIndexOffset)
renameIndexOffset = trailingInteger;
QRegExp renameExp("-[0-9]+");
if (renameExp.lastIndexIn(shortOtherFilename) == shortFilename.length())
{
unsigned int trailingInteger = shortOtherFilename.mid(shortFilename.length() + 1).toUInt(&validIndexOffset);
if (!validIndexOffset)
break;
if (trailingInteger > renameIndexOffset)
renameIndexOffset = trailingInteger;
}
}
}
}
}
if (validIndexOffset)
{
// Ensure renaming won't involve integer overflow!
if (renameIndex > static_cast<unsigned int>(-1) - renameIndexOffset)
validIndexOffset = false;
}
if (validIndexOffset)
{
// Ensure renaming won't involve integer overflow!
if (renameIndex > static_cast<unsigned int>(-1) - renameIndexOffset)
validIndexOffset = false;
}
if (validIndexOffset)
{
shortFilename.append(QChar('-'));
shortFilename.append(QString::number(renameIndexOffset + renameIndex));
if (validIndexOffset)
{
shortFilename.append(QChar('-'));
shortFilename.append(QString::number(renameIndexOffset + renameIndex));
return (shortFilename + fileType);
return (shortFilename + fileType);
}
else
{
// Fallback behaviour, brute-force/semi-random.
bool valid;
QString filename;
do
{
valid = true;
filename = shortFilename + "-";
for (int i = 0; i < 8; i++)
filename.append(QChar(qrand() % ('Z' - 'A' + 1) + 'A'));
for (int i = 0; i < fileInfos.length(); i++)
{
int lastSlash = fileInfos[i].GetFilename().lastIndexOf('/');
if (lastSlash < 0)
lastSlash = fileInfos[i].GetFilename().lastIndexOf('\\');
if (filename == fileInfos[i].GetFilename().mid(lastSlash + 1))
{
valid = false;
break;
}
}
} while (!valid);
return (filename);
}
}
else
{
// Fallback behaviour, brute-force/semi-random.
bool valid;
QString filename;
do
{
valid = true;
filename = shortFilename + "-";
for (int i = 0; i < 8; i++)
filename.append(QChar(QRandomGenerator::global()->bounded(('Z' - 'A' + 1) + 'A')));
for (int i = 0; i < fileInfos.length(); i++)
{
int lastSlash = fileInfos[i].GetFilename().lastIndexOf('/');
if (lastSlash < 0)
lastSlash = fileInfos[i].GetFilename().lastIndexOf('\\');
if (filename == fileInfos[i].GetFilename().mid(lastSlash + 1))
{
valid = false;
break;
}
}
} while (!valid);
return (filename);
}
}

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2010-2017 Benjamin Dobell, Glass Echidna
/* Copyright (c) 2010-2011 Benjamin Dobell, Glass Echidna
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2010-2017 Benjamin Dobell, Glass Echidna
/* Copyright (c) 2010-2011 Benjamin Dobell, Glass Echidna
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@ -18,17 +18,12 @@
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.*/
#ifndef HELPACTION_H
#define HELPACTION_H
// Heimdall Frontend
#include "aboutform.h"
namespace Heimdall
using namespace HeimdallFrontend;
AboutForm::AboutForm(QWidget *parent) : QWidget(parent)
{
namespace HelpAction
{
extern const char *usage;
int Execute(int argc, char **argv);
}
setupUi(this);
}
#endif

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2010-2017 Benjamin Dobell, Glass Echidna
/* Copyright (c) 2010-2011 Benjamin Dobell, Glass Echidna
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@ -18,17 +18,18 @@
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.*/
#ifndef DETECTACTION_H
#define DETECTACTION_H
// Qt
#include <QWidget>
namespace Heimdall
// Heimdall Frontend
#include "ui_aboutform.h"
namespace HeimdallFrontend
{
namespace DetectAction
class AboutForm : public QWidget, public Ui::AboutForm
{
extern const char *usage;
public:
int Execute(int argc, char **argv);
}
explicit AboutForm(QWidget *parent = 0);
};
}
#endif

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2010-2017 Benjamin Dobell, Glass Echidna
/* Copyright (c) 2010-2011 Benjamin Dobell, Glass Echidna
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@ -19,16 +19,11 @@
THE SOFTWARE.*/
// Qt
#include <QApplication>
#include <QtPlugin>
#include <QtGui/QApplication>
// Heimdall Frontend
#include "mainwindow.h"
#if defined(QT_STATIC)
Q_IMPORT_PLUGIN (QWindowsIntegrationPlugin);
#endif
using namespace HeimdallFrontend;
int main(int argc, char *argv[])

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2010-2017 Benjamin Dobell, Glass Echidna
/* Copyright (c) 2010-2011 Benjamin Dobell, Glass Echidna
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@ -32,18 +32,18 @@
#include "mainwindow.h"
#include "Packaging.h"
#define UNUSED(x) (void)(x)
using namespace HeimdallFrontend;
void MainWindow::StartHeimdall(const QStringList& arguments)
{
flashProgressBar->setEnabled(true);
UpdateInterfaceAvailability();
heimdallProcess.setReadChannel(QProcess::StandardOutput);
int pathIndex = -1;
process.setReadChannel(QProcess::StandardOutput);
heimdallProcess.start("heimdall", arguments);
heimdallProcess.waitForStarted(3000);
process.start("heimdall", arguments);
process.waitForStarted(3000);
// OS X was playing up and not finding heimdall, so we're manually checking the PATH.
if (heimdallFailed)
@ -52,32 +52,23 @@ void MainWindow::StartHeimdall(const QStringList& arguments)
QStringList paths;
// Ensure /usr/local/bin and /usr/bin are in PATH.
// Ensure /usr/bin is in PATH
for (int i = 0; i < environment.length(); i++)
{
if (environment[i].left(5) == "PATH=")
{
paths = environment[i].mid(5).split(':');
if (!paths.contains("/usr/local/bin"))
paths.prepend("/usr/local/bin");
if (!paths.contains("/usr/bin"))
paths.prepend("/usr/bin");
paths.prepend("/usr/bin");
break;
}
}
int pathIndex = -1;
while (heimdallFailed && ++pathIndex < paths.length())
{
QString heimdallPath = paths[pathIndex];
if (heimdallPath.length() > 0)
{
utilityOutputPlainTextEdit->clear();
heimdallFailed = false;
if (heimdallPath[heimdallPath.length() - 1] != QDir::separator())
@ -85,8 +76,8 @@ void MainWindow::StartHeimdall(const QStringList& arguments)
heimdallPath += "heimdall";
heimdallProcess.start(heimdallPath, arguments);
heimdallProcess.waitForStarted(3000);
process.start(heimdallPath, arguments);
process.waitForStarted(3000);
}
}
@ -94,7 +85,8 @@ void MainWindow::StartHeimdall(const QStringList& arguments)
{
flashLabel->setText("Failed to start Heimdall!");
heimdallState = HeimdallState::Stopped;
heimdallState = MainWindow::kHeimdallStateStopped;
flashProgressBar->setEnabled(false);
UpdateInterfaceAvailability();
}
}
@ -109,8 +101,8 @@ void MainWindow::UpdateUnusedPartitionIds(void)
{
const PitEntry *pitEntry = currentPitData.GetEntry(i);
if (pitEntry->IsFlashable() && strcmp(pitEntry->GetPartitionName(), "PIT") != 0 && strcmp(pitEntry->GetPartitionName(), "PT") != 0)
unusedPartitionIds.append(pitEntry->GetIdentifier());
if (!pitEntry->GetUnused() && strcmp(pitEntry->GetPartitionName(), "PIT") != 0)
unusedPartitionIds.append(pitEntry->GetPartitionIdentifier());
}
// Remove any used partition IDs from unusedPartitionIds
@ -131,7 +123,7 @@ bool MainWindow::ReadPit(QFile *file)
file->close();
bool success = currentPitData.Unpack(buffer);
delete[] buffer;
delete buffer;
if (!success)
currentPitData.Clear();
@ -154,8 +146,13 @@ void MainWindow::UpdatePackageUserInterface(void)
platformLineEdit->clear();
developerHomepageButton->setEnabled(false);
developerDonateButton->setEnabled(false);
repartitionRadioButton->setChecked(false);
noRebootRadioButton->setChecked(false);
loadFirmwareButton->setEnabled(false);
}
else
{
@ -176,6 +173,16 @@ void MainWindow::UpdatePackageUserInterface(void)
platformLineEdit->setText(loadedPackageData.GetFirmwareInfo().GetPlatformInfo().GetName() + " ("
+ loadedPackageData.GetFirmwareInfo().GetPlatformInfo().GetVersion() + ")");
if (!loadedPackageData.GetFirmwareInfo().GetUrl().isEmpty())
developerHomepageButton->setEnabled(true);
else
developerHomepageButton->setEnabled(false);
if (!loadedPackageData.GetFirmwareInfo().GetDonateUrl().isEmpty())
developerDonateButton->setEnabled(true);
else
developerDonateButton->setEnabled(false);
for (int i = 0; i < loadedPackageData.GetFirmwareInfo().GetDeviceInfos().length(); i++)
{
const DeviceInfo& deviceInfo = loadedPackageData.GetFirmwareInfo().GetDeviceInfos()[i];
@ -190,9 +197,9 @@ void MainWindow::UpdatePackageUserInterface(void)
repartitionRadioButton->setChecked(loadedPackageData.GetFirmwareInfo().GetRepartition());
noRebootRadioButton->setChecked(loadedPackageData.GetFirmwareInfo().GetNoReboot());
}
UpdateLoadPackageInterfaceAvailability();
loadFirmwareButton->setEnabled(true);
}
}
bool MainWindow::IsArchive(QString path)
@ -202,9 +209,9 @@ bool MainWindow::IsArchive(QString path)
|| path.endsWith(".bz2", Qt::CaseInsensitive) || path.endsWith(".7z", Qt::CaseInsensitive) || path.endsWith(".rar", Qt::CaseInsensitive));
}
QString MainWindow::PromptFileSelection(const QString& caption, const QString& filter)
QString MainWindow::PromptFileSelection(void)
{
QString path = QFileDialog::getOpenFileName(this, caption, lastDirectory, filter);
QString path = QFileDialog::getOpenFileName(this, "Select File", lastDirectory);
if (path != "")
lastDirectory = path.left(path.lastIndexOf('/') + 1);
@ -212,9 +219,9 @@ QString MainWindow::PromptFileSelection(const QString& caption, const QString& f
return (path);
}
QString MainWindow::PromptFileCreation(const QString& caption, const QString& filter)
QString MainWindow::PromptFileCreation(void)
{
QString path = QFileDialog::getSaveFileName(this, caption, lastDirectory, filter);
QString path = QFileDialog::getSaveFileName(this, "Save File", lastDirectory);
if (path != "")
lastDirectory = path.left(path.lastIndexOf('/') + 1);
@ -222,146 +229,6 @@ QString MainWindow::PromptFileCreation(const QString& caption, const QString& fi
return (path);
}
void MainWindow::UpdateLoadPackageInterfaceAvailability(void)
{
if (loadedPackageData.IsCleared())
{
developerHomepageButton->setEnabled(false);
developerDonateButton->setEnabled(false);
loadFirmwareButton->setEnabled(false);
}
else
{
developerHomepageButton->setEnabled(!loadedPackageData.GetFirmwareInfo().GetUrl().isEmpty());
developerDonateButton->setEnabled(!loadedPackageData.GetFirmwareInfo().GetDonateUrl().isEmpty());
loadFirmwareButton->setEnabled(!!(heimdallState & HeimdallState::Stopped));
}
}
void MainWindow::UpdateFlashInterfaceAvailability(void)
{
if (!!(heimdallState & HeimdallState::Stopped))
{
partitionNameComboBox->setEnabled(partitionsListWidget->currentRow() >= 0);
bool allPartitionsValid = true;
QList<FileInfo>& fileList = workingPackageData.GetFirmwareInfo().GetFileInfos();
for (int i = 0; i < fileList.length(); i++)
{
if (fileList[i].GetFilename().isEmpty())
{
allPartitionsValid = false;
break;
}
}
bool validFlashSettings = allPartitionsValid && fileList.length() > 0;
flashProgressBar->setEnabled(false);
optionsGroup->setEnabled(true);
sessionGroup->setEnabled(true);
startFlashButton->setEnabled(validFlashSettings);
noRebootCheckBox->setEnabled(validFlashSettings);
resumeCheckbox->setEnabled(validFlashSettings);
}
else
{
partitionNameComboBox->setEnabled(false);
flashProgressBar->setEnabled(true);
optionsGroup->setEnabled(false);
sessionGroup->setEnabled(false);
}
}
void MainWindow::UpdateCreatePackageInterfaceAvailability(void)
{
if (!!(heimdallState & HeimdallState::Stopped))
{
const FirmwareInfo& firmwareInfo = workingPackageData.GetFirmwareInfo();
bool fieldsPopulated = !(firmwareInfo.GetName().isEmpty() || firmwareInfo.GetVersion().isEmpty() || firmwareInfo.GetPlatformInfo().GetName().isEmpty()
|| firmwareInfo.GetPlatformInfo().GetVersion().isEmpty() || firmwareInfo.GetDevelopers().isEmpty() || firmwareInfo.GetDeviceInfos().isEmpty());
buildPackageButton->setEnabled(fieldsPopulated);
addDeveloperButton->setEnabled(!addDeveloperButton->text().isEmpty());
removeDeveloperButton->setEnabled(createDevelopersListWidget->currentRow() >= 0);
}
else
{
buildPackageButton->setEnabled(false);
}
}
void MainWindow::UpdateUtilitiesInterfaceAvailability(void)
{
if (!!(heimdallState & HeimdallState::Stopped))
{
detectDeviceButton->setEnabled(true);
closePcScreenButton->setEnabled(true);
pitSaveAsButton->setEnabled(true);
downloadPitButton->setEnabled(!pitDestinationLineEdit->text().isEmpty());
if (printPitDeviceRadioBox->isChecked())
{
// Device
printLocalPitGroup->setEnabled(false);
printPitButton->setEnabled(true);
}
else
{
// Local File
printLocalPitGroup->setEnabled(true);
printLocalPitLineEdit->setEnabled(true);
printLocalPitBrowseButton->setEnabled(true);
printPitButton->setEnabled(!printLocalPitLineEdit->text().isEmpty());
}
}
else
{
detectDeviceButton->setEnabled(false);
closePcScreenButton->setEnabled(false);
pitSaveAsButton->setEnabled(false);
downloadPitButton->setEnabled(false);
printLocalPitGroup->setEnabled(false);
printPitButton->setEnabled(false);
}
}
void MainWindow::UpdateInterfaceAvailability(void)
{
UpdateLoadPackageInterfaceAvailability();
UpdateFlashInterfaceAvailability();
UpdateCreatePackageInterfaceAvailability();
UpdateUtilitiesInterfaceAvailability();
if (!!(heimdallState & HeimdallState::Stopped))
{
// Enable/disable tabs
for (int i = 0; i < functionTabWidget->count(); i++)
functionTabWidget->setTabEnabled(i, true);
functionTabWidget->setTabEnabled(functionTabWidget->indexOf(createPackageTab), startFlashButton->isEnabled());
}
else
{
// Disable non-current tabs
for (int i = 0; i < functionTabWidget->count(); i++)
{
if (i == functionTabWidget->currentIndex())
functionTabWidget->setTabEnabled(i, true);
else
functionTabWidget->setTabEnabled(i, false);
}
}
}
void MainWindow::UpdatePartitionNamesInterface(void)
{
populatingPartitionNames = true;
@ -379,25 +246,91 @@ void MainWindow::UpdatePartitionNamesInterface(void)
partitionNameComboBox->addItem(currentPitData.FindEntry(partitionInfo.GetPartitionId())->GetPartitionName());
partitionNameComboBox->setCurrentIndex(unusedPartitionIds.length());
partitionNameComboBox->setEnabled(true);
}
else
{
partitionNameComboBox->setEnabled(false);
}
populatingPartitionNames = false;
}
UpdateFlashInterfaceAvailability();
void MainWindow::UpdateInterfaceAvailability(void)
{
if (heimdallState != MainWindow::kHeimdallStateStopped)
{
startFlashButton->setEnabled(false);
detectDeviceButton->setEnabled(false);
closePcScreenButton->setEnabled(false);
pitSaveAsButton->setEnabled(false);
downloadPitButton->setEnabled(false);
printPitButton->setEnabled(false);
return;
}
else
{
detectDeviceButton->setEnabled(true);
closePcScreenButton->setEnabled(true);
pitSaveAsButton->setEnabled(true);
if (!pitDestinationLineEdit->text().isEmpty())
downloadPitButton->setEnabled(true);
else
downloadPitButton->setEnabled(false);
printPitButton->setEnabled(true);
}
bool allPartitionsValid = true;
QList<FileInfo>& fileList = workingPackageData.GetFirmwareInfo().GetFileInfos();
for (int i = 0; i < fileList.length(); i++)
{
if (fileList[i].GetFilename().isEmpty())
{
allPartitionsValid = false;
break;
}
}
bool validSettings = allPartitionsValid && fileList.length() > 0;
startFlashButton->setEnabled(validSettings);
functionTabWidget->setTabEnabled(functionTabWidget->indexOf(createPackageTab), validSettings);
}
void MainWindow::UpdateBuildPackageButton(void)
{
const FirmwareInfo& firmwareInfo = workingPackageData.GetFirmwareInfo();
if (firmwareInfo.GetName().isEmpty() || firmwareInfo.GetVersion().isEmpty() || firmwareInfo.GetPlatformInfo().GetName().isEmpty()
|| firmwareInfo.GetPlatformInfo().GetVersion().isEmpty() || firmwareInfo.GetDevelopers().isEmpty() || firmwareInfo.GetDeviceInfos().isEmpty())
{
buildPackageButton->setEnabled(false);
}
else
{
buildPackageButton->setEnabled(true);
}
}
MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent)
{
setupUi(this);
heimdallState = HeimdallState::Stopped;
heimdallState = MainWindow::kHeimdallStateStopped;
lastDirectory = QDir::toNativeSeparators(QApplication::applicationDirPath());
populatingPartitionNames = false;
verboseOutput = false;
resume = false;
tabIndex = functionTabWidget->currentIndex();
functionTabWidget->setTabEnabled(functionTabWidget->indexOf(createPackageTab), false);
@ -407,7 +340,6 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent)
// Menu
QObject::connect(actionDonate, SIGNAL(triggered()), this, SLOT(OpenDonationWebpage()));
QObject::connect(actionVerboseOutput, SIGNAL(toggled(bool)), this, SLOT(SetVerboseOutput(bool)));
QObject::connect(actionResumeConnection, SIGNAL(toggled(bool)), this, SLOT(SetResume(bool)));
QObject::connect(actionAboutHeimdall, SIGNAL(triggered()), this, SLOT(ShowAbout()));
// Load Package Tab
@ -427,9 +359,7 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent)
QObject::connect(pitBrowseButton, SIGNAL(clicked()), this, SLOT(SelectPit()));
QObject::connect(repartitionCheckBox, SIGNAL(stateChanged(int)), this, SLOT(SetRepartition(int)));
QObject::connect(noRebootCheckBox, SIGNAL(stateChanged(int)), this, SLOT(SetNoReboot(int)));
QObject::connect(resumeCheckbox, SIGNAL(stateChanged(int)), this, SLOT(SetResume(int)));
QObject::connect(startFlashButton, SIGNAL(clicked()), this, SLOT(StartFlash()));
@ -458,21 +388,15 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent)
// Utilities Tab
QObject::connect(detectDeviceButton, SIGNAL(clicked()), this, SLOT(DetectDevice()));
QObject::connect(closePcScreenButton, SIGNAL(clicked()), this, SLOT(ClosePcScreen()));
QObject::connect(printPitDeviceRadioBox, SIGNAL(toggled(bool)), this, SLOT(DevicePrintPitToggled(bool)));
QObject::connect(printPitLocalFileRadioBox, SIGNAL(toggled(bool)), this, SLOT(LocalFilePrintPitToggled(bool)));
QObject::connect(printLocalPitBrowseButton, SIGNAL(clicked()), this, SLOT(SelectPrintPitFile()));
QObject::connect(printPitButton, SIGNAL(clicked()), this, SLOT(PrintPit()));
QObject::connect(pitSaveAsButton, SIGNAL(clicked()), this, SLOT(SelectPitDestination()));
QObject::connect(downloadPitButton, SIGNAL(clicked()), this, SLOT(DownloadPit()));
// Heimdall Command Line
QObject::connect(&heimdallProcess, SIGNAL(readyRead()), this, SLOT(HandleHeimdallStdout()));
QObject::connect(&heimdallProcess, SIGNAL(finished(int, QProcess::ExitStatus)), this, SLOT(HandleHeimdallReturned(int, QProcess::ExitStatus)));
QObject::connect(&heimdallProcess, SIGNAL(error(QProcess::ProcessError)), this, SLOT(HandleHeimdallError(QProcess::ProcessError)));
QObject::connect(&process, SIGNAL(readyRead()), this, SLOT(HandleHeimdallStdout()));
QObject::connect(&process, SIGNAL(finished(int, QProcess::ExitStatus)), this, SLOT(HandleHeimdallReturned(int, QProcess::ExitStatus)));
QObject::connect(&process, SIGNAL(error(QProcess::ProcessError)), this, SLOT(HandleHeimdallError(QProcess::ProcessError)));
}
MainWindow::~MainWindow()
@ -505,7 +429,7 @@ void MainWindow::SelectFirmwarePackage(void)
loadedPackageData.Clear();
UpdatePackageUserInterface();
QString path = PromptFileSelection("Select Package", "Firmware Package (*.gz)");
QString path = PromptFileSelection();
firmwarePackageLineEdit->setText(path);
if (firmwarePackageLineEdit->text() != "")
@ -534,6 +458,7 @@ void MainWindow::LoadFirmwarePackage(void)
workingPackageData.Clear();
currentPitData.Clear();
// Make flashSettings responsible for the temporary files
workingPackageData.GetFiles().append(loadedPackageData.GetFiles());
loadedPackageData.RemoveAllFiles();
@ -630,7 +555,7 @@ void MainWindow::LoadFirmwarePackage(void)
partitionsListWidget->setEnabled(true);
addPartitionButton->setEnabled(true);
removePartitionButton->setEnabled(partitionsListWidget->currentRow() >= 0);
removePartitionButton->setEnabled(true && partitionsListWidget->currentRow() >= 0);
pitLineEdit->setText(workingPackageData.GetFirmwareInfo().GetPitFilename());
@ -650,18 +575,10 @@ void MainWindow::SelectPartitionName(int index)
unusedPartitionIds.append(fileInfo.GetPartitionId());
fileInfo.SetPartitionId(newPartitionIndex);
PitEntry *pitEntry = currentPitData.FindEntry(newPartitionIndex);
QString title("File");
if (pitEntry && strlen(pitEntry->GetFlashFilename()) > 0)
title += " (" + QString(pitEntry->GetFlashFilename()) + ")";
partitionFileGroup->setTitle(title);
if (pitEntry && !fileInfo.GetFilename().isEmpty())
if (!fileInfo.GetFilename().isEmpty())
{
QString partitionFilename = pitEntry->GetFlashFilename();
PitEntry *pitEntry = currentPitData.FindEntry(newPartitionIndex);
QString partitionFilename = pitEntry->GetFilename();
int lastPeriod = partitionFilename.lastIndexOf(QChar('.'));
if (lastPeriod >= 0)
@ -693,7 +610,7 @@ void MainWindow::SelectPartitionFile(void)
FileInfo& fileInfo = workingPackageData.GetFirmwareInfo().GetFileInfos()[partitionsListWidget->currentRow()];
PitEntry *pitEntry = currentPitData.FindEntry(fileInfo.GetPartitionId());
QString partitionFilename = pitEntry->GetFlashFilename();
QString partitionFilename = pitEntry->GetFilename();
int lastPeriod = partitionFilename.lastIndexOf(QChar('.'));
if (lastPeriod >= 0)
@ -731,15 +648,6 @@ void MainWindow::SelectPartition(int row)
partitionFileBrowseButton->setEnabled(true);
removePartitionButton->setEnabled(true);
QString title("File");
PitEntry *pitEntry = currentPitData.FindEntry(partitionInfo.GetPartitionId());
if (pitEntry && strlen(pitEntry->GetFlashFilename()) > 0)
title += " (" + QString(pitEntry->GetFlashFilename()) + ")";
partitionFileGroup->setTitle(title);
}
else
{
@ -750,8 +658,6 @@ void MainWindow::SelectPartition(int row)
partitionFileBrowseButton->setEnabled(false);
removePartitionButton->setEnabled(false);
partitionFileGroup->setTitle("File");
}
}
@ -767,7 +673,6 @@ void MainWindow::AddPartition(void)
partitionsListWidget->addItem(currentPitData.FindEntry(partitionInfo.GetPartitionId())->GetPartitionName());
partitionsListWidget->setCurrentRow(partitionsListWidget->count() - 1);
partitionsListWidget->setEnabled(false);
UpdateInterfaceAvailability();
}
@ -788,7 +693,7 @@ void MainWindow::RemovePartition(void)
void MainWindow::SelectPit(void)
{
QString path = PromptFileSelection("Select PIT", "*.pit");
QString path = PromptFileSelection();
bool validPit = path != "";
if (validPit)
@ -814,11 +719,11 @@ void MainWindow::SelectPit(void)
for (int i = 0; i < partitionNamesCount; i++)
{
const PitEntry *pitEntry = currentPitData.FindEntry(partitionNames[i].toLatin1().constData());
const PitEntry *pitEntry = currentPitData.FindEntry(partitionNames[i].toAscii().constData());
if (pitEntry)
{
fileInfos[partitionInfoIndex++].SetPartitionId(pitEntry->GetIdentifier());
fileInfos[partitionInfoIndex++].SetPartitionId(pitEntry->GetPartitionIdentifier());
partitionsListWidget->addItem(pitEntry->GetPartitionName());
}
else
@ -872,39 +777,20 @@ void MainWindow::SelectPit(void)
}
}
void MainWindow::SetRepartition(int enabled)
{
workingPackageData.GetFirmwareInfo().SetRepartition(enabled);
repartitionCheckBox->setChecked(enabled);
}
void MainWindow::SetNoReboot(int enabled)
{
workingPackageData.GetFirmwareInfo().SetNoReboot(enabled);
noRebootCheckBox->setChecked(enabled);
}
void MainWindow::SetResume(bool enabled)
{
resume = enabled;
actionResumeConnection->setChecked(enabled);
resumeCheckbox->setChecked(enabled);
}
void MainWindow::SetResume(int enabled)
{
SetResume(enabled != 0);
}
void MainWindow::StartFlash(void)
{
outputPlainTextEdit->clear();
heimdallState = HeimdallState::Flashing;
heimdallState = MainWindow::kHeimdallStateFlashing;
heimdallFailed = false;
const FirmwareInfo& firmwareInfo = workingPackageData.GetFirmwareInfo();
@ -922,19 +808,14 @@ void MainWindow::StartFlash(void)
for (int i = 0; i < fileInfos.length(); i++)
{
QString flag;
flag = QString::asprintf("--%u", fileInfos[i].GetPartitionId());
flag.sprintf("--%u", fileInfos[i].GetPartitionId());
arguments.append(flag);
arguments.append(fileInfos[i].GetFilename());
}
if (firmwareInfo.GetNoReboot())
{
arguments.append("--no-reboot");
heimdallState |= HeimdallState::NoReboot;
}
if (resume)
arguments.append("--resume");
if (verboseOutput)
arguments.append("--verbose");
@ -947,25 +828,25 @@ void MainWindow::StartFlash(void)
void MainWindow::FirmwareNameChanged(const QString& text)
{
workingPackageData.GetFirmwareInfo().SetName(text);
UpdateInterfaceAvailability();
UpdateBuildPackageButton();
}
void MainWindow::FirmwareVersionChanged(const QString& text)
{
workingPackageData.GetFirmwareInfo().SetVersion(text);
UpdateInterfaceAvailability();
UpdateBuildPackageButton();
}
void MainWindow::PlatformNameChanged(const QString& text)
{
workingPackageData.GetFirmwareInfo().GetPlatformInfo().SetName(text);
UpdateInterfaceAvailability();
UpdateBuildPackageButton();
}
void MainWindow::PlatformVersionChanged(const QString& text)
{
workingPackageData.GetFirmwareInfo().GetPlatformInfo().SetVersion(text);
UpdateInterfaceAvailability();
UpdateBuildPackageButton();
}
void MainWindow::HomepageUrlChanged(const QString& text)
@ -980,16 +861,18 @@ void MainWindow::DonateUrlChanged(const QString& text)
void MainWindow::DeveloperNameChanged(const QString& text)
{
UNUSED(text);
UpdateCreatePackageInterfaceAvailability();
if (text.isEmpty())
addDeveloperButton->setEnabled(false);
else
addDeveloperButton->setEnabled(true);
}
void MainWindow::SelectDeveloper(int row)
{
UNUSED(row);
UpdateCreatePackageInterfaceAvailability();
if (row >= 0)
removeDeveloperButton->setEnabled(true);
else
removeDeveloperButton->setEnabled(false);
}
void MainWindow::AddDeveloper(void)
@ -999,7 +882,7 @@ void MainWindow::AddDeveloper(void)
createDevelopersListWidget->addItem(createDeveloperNameLineEdit->text());
createDeveloperNameLineEdit->clear();
UpdateCreatePackageInterfaceAvailability();
UpdateBuildPackageButton();
}
void MainWindow::RemoveDeveloper(void)
@ -1012,13 +895,11 @@ void MainWindow::RemoveDeveloper(void)
removeDeveloperButton->setEnabled(false);
UpdateInterfaceAvailability();
UpdateBuildPackageButton();
}
void MainWindow::DeviceInfoChanged(const QString& text)
{
UNUSED(text);
if (deviceManufacturerLineEdit->text().isEmpty() || deviceNameLineEdit->text().isEmpty() || deviceProductCodeLineEdit->text().isEmpty())
addDeviceButton->setEnabled(false);
else
@ -1027,7 +908,10 @@ void MainWindow::DeviceInfoChanged(const QString& text)
void MainWindow::SelectDevice(int row)
{
removeDeviceButton->setEnabled(row >= 0);
if (row >= 0)
removeDeviceButton->setEnabled(true);
else
removeDeviceButton->setEnabled(false);
}
void MainWindow::AddDevice(void)
@ -1040,7 +924,7 @@ void MainWindow::AddDevice(void)
deviceNameLineEdit->clear();
deviceProductCodeLineEdit->clear();
UpdateInterfaceAvailability();
UpdateBuildPackageButton();
}
void MainWindow::RemoveDevice(void)
@ -1053,12 +937,12 @@ void MainWindow::RemoveDevice(void)
removeDeviceButton->setEnabled(false);
UpdateInterfaceAvailability();
UpdateBuildPackageButton();
}
void MainWindow::BuildPackage(void)
{
QString packagePath = PromptFileCreation("Save Package", "Firmware Package (*.gz)");
QString packagePath = PromptFileCreation();
if (!packagePath.isEmpty())
{
@ -1083,15 +967,12 @@ void MainWindow::DetectDevice(void)
deviceDetectedRadioButton->setChecked(false);
utilityOutputPlainTextEdit->clear();
heimdallState = HeimdallState::DetectingDevice;
heimdallState = MainWindow::kHeimdallStateDetectingDevice;
heimdallFailed = false;
QStringList arguments;
arguments.append("detect");
if (verboseOutput)
arguments.append("--verbose");
arguments.append("--stdout-errors");
StartHeimdall(arguments);
@ -1101,18 +982,12 @@ void MainWindow::ClosePcScreen(void)
{
utilityOutputPlainTextEdit->clear();
heimdallState = HeimdallState::ClosingPcScreen;
heimdallState = MainWindow::kHeimdallStateClosingPcScreen;
heimdallFailed = false;
QStringList arguments;
arguments.append("close-pc-screen");
if (resume)
arguments.append("--resume");
if (verboseOutput)
arguments.append("--verbose");
arguments.append("--stdout-errors");
StartHeimdall(arguments);
@ -1120,7 +995,7 @@ void MainWindow::ClosePcScreen(void)
void MainWindow::SelectPitDestination(void)
{
QString path = PromptFileCreation("Save PIT", "*.pit");
QString path = PromptFileCreation();
if (path != "")
{
@ -1138,7 +1013,7 @@ void MainWindow::DownloadPit(void)
deviceDetectedRadioButton->setChecked(false);
utilityOutputPlainTextEdit->clear();
heimdallState = HeimdallState::DownloadingPit | HeimdallState::NoReboot;
heimdallState = MainWindow::kHeimdallStateDetectingDevice;
heimdallFailed = false;
QStringList arguments;
@ -1149,85 +1024,29 @@ void MainWindow::DownloadPit(void)
arguments.append("--no-reboot");
if (resume)
arguments.append("--resume");
if (verboseOutput)
arguments.append("--verbose");
arguments.append("--stdout-errors");
StartHeimdall(arguments);
}
void MainWindow::DevicePrintPitToggled(bool checked)
{
if (checked)
{
if (printPitLocalFileRadioBox->isChecked())
printPitLocalFileRadioBox->setChecked(false);
}
UpdateUtilitiesInterfaceAvailability();
}
void MainWindow::LocalFilePrintPitToggled(bool checked)
{
if (checked)
{
if (printPitDeviceRadioBox->isChecked())
printPitDeviceRadioBox->setChecked(false);
}
UpdateUtilitiesInterfaceAvailability();
}
void MainWindow::SelectPrintPitFile(void)
{
QString path = PromptFileSelection("Select PIT", "*.pit");
if (path.length() > 0)
{
printLocalPitLineEdit->setText(path);
printPitButton->setEnabled(true);
}
else
{
printPitButton->setEnabled(false);
}
}
void MainWindow::PrintPit(void)
{
utilityOutputPlainTextEdit->clear();
heimdallState = HeimdallState::PrintingPit | HeimdallState::NoReboot;
heimdallState = MainWindow::kHeimdallStatePrintingPit;
heimdallFailed = false;
QStringList arguments;
arguments.append("print-pit");
if (printPitLocalFileRadioBox->isChecked())
{
arguments.append("--file");
arguments.append(printLocalPitLineEdit->text());
}
arguments.append("--stdout-errors");
arguments.append("--no-reboot");
if (resume)
arguments.append("--resume");
if (verboseOutput)
arguments.append("--verbose");
StartHeimdall(arguments);
}
void MainWindow::HandleHeimdallStdout(void)
{
QString output = heimdallProcess.readAll();
QString output = process.readAll();
// We often receive multiple lots of output from Heimdall at one time. So we use regular expressions
// to ensure we don't miss out on any important information.
@ -1245,7 +1064,7 @@ void MainWindow::HandleHeimdallStdout(void)
output.remove(QChar('\b'));
output.replace(QChar('%'), QString("%\n"));
if (!!(heimdallState & HeimdallState::Flashing))
if (heimdallState == MainWindow::kHeimdallStateFlashing)
{
outputPlainTextEdit->insertPlainText(output);
outputPlainTextEdit->ensureCursorVisible();
@ -1259,26 +1078,29 @@ void MainWindow::HandleHeimdallStdout(void)
void MainWindow::HandleHeimdallReturned(int exitCode, QProcess::ExitStatus exitStatus)
{
HandleHeimdallStdout();
// This is a work-around for strange issues as a result of a exitCode being cast to
// a unsigned char.
char byteExitCode = exitCode;
if (exitStatus == QProcess::NormalExit && exitCode == 0)
if (exitStatus == QProcess::NormalExit && byteExitCode >= 0)
{
SetResume(!!(heimdallState & HeimdallState::NoReboot));
if (!!(heimdallState & HeimdallState::Flashing))
if (heimdallState == MainWindow::kHeimdallStateFlashing)
{
flashLabel->setText("Flash completed successfully!");
if (byteExitCode == 1)
flashLabel->setText("Failed to detect compatible device!");
else
flashLabel->setText("Flash completed sucessfully!");
}
else if (!!(heimdallState & HeimdallState::DetectingDevice))
else if (heimdallState == MainWindow::kHeimdallStateDetectingDevice)
{
deviceDetectedRadioButton->setChecked(true);
deviceDetectedRadioButton->setChecked(byteExitCode == 0);
}
}
else
{
if (!!(heimdallState & HeimdallState::Flashing))
if (heimdallState == MainWindow::kHeimdallStateFlashing)
{
QString error = heimdallProcess.readAllStandardError();
QString error = process.readAllStandardError();
int lastNewLineChar = error.lastIndexOf('\n');
@ -1289,14 +1111,9 @@ void MainWindow::HandleHeimdallReturned(int exitCode, QProcess::ExitStatus exitS
flashLabel->setText(error);
}
else if (!!(heimdallState & HeimdallState::DetectingDevice))
{
deviceDetectedRadioButton->setChecked(false);
}
}
heimdallState = HeimdallState::Stopped;
flashProgressBar->setValue(0);
heimdallState = MainWindow::kHeimdallStateStopped;
flashProgressBar->setEnabled(false);
UpdateInterfaceAvailability();
}
@ -1305,7 +1122,7 @@ void MainWindow::HandleHeimdallError(QProcess::ProcessError error)
{
if (error == QProcess::FailedToStart || error == QProcess::Timedout)
{
if (!!(heimdallState & HeimdallState::Flashing))
if (heimdallState == kHeimdallStateFlashing)
{
flashLabel->setText("Failed to start Heimdall!");
flashProgressBar->setEnabled(false);
@ -1316,12 +1133,12 @@ void MainWindow::HandleHeimdallError(QProcess::ProcessError error)
}
heimdallFailed = true;
heimdallState = HeimdallState::Stopped;
heimdallState = MainWindow::kHeimdallStateStopped;
UpdateInterfaceAvailability();
}
else if (error == QProcess::Crashed)
{
if (!!(heimdallState & HeimdallState::Flashing))
if (heimdallState == kHeimdallStateFlashing)
{
flashLabel->setText("Heimdall crashed!");
flashProgressBar->setEnabled(false);
@ -1331,12 +1148,12 @@ void MainWindow::HandleHeimdallError(QProcess::ProcessError error)
utilityOutputPlainTextEdit->appendPlainText("\nFRONTEND ERROR: Heimdall crashed!");
}
heimdallState = HeimdallState::Stopped;
heimdallState = MainWindow::kHeimdallStateStopped;
UpdateInterfaceAvailability();
}
else
{
if (!!(heimdallState & HeimdallState::Flashing))
if (heimdallState == kHeimdallStateFlashing)
{
flashLabel->setText("Heimdall reported an unknown error!");
flashProgressBar->setEnabled(false);
@ -1346,7 +1163,7 @@ void MainWindow::HandleHeimdallError(QProcess::ProcessError error)
utilityOutputPlainTextEdit->appendPlainText("\nFRONTEND ERROR: Heimdall reported an unknown error!");
}
heimdallState = HeimdallState::Stopped;
heimdallState = MainWindow::kHeimdallStateStopped;
UpdateInterfaceAvailability();
}
}

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2010-2017 Benjamin Dobell, Glass Echidna
/* Copyright (c) 2010-2011 Benjamin Dobell, Glass Echidna
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@ -39,39 +39,6 @@ using namespace libpit;
namespace HeimdallFrontend
{
enum class HeimdallState : int
{
Stopped = 1,
Flashing = (int)Stopped << 1,
DetectingDevice = (int)Flashing << 1,
ClosingPcScreen = (int)DetectingDevice << 1,
PrintingPit = (int)ClosingPcScreen << 1,
DownloadingPit = (int)PrintingPit << 1,
NoReboot = (int)DownloadingPit << 1
};
inline HeimdallState operator|(HeimdallState lhs, HeimdallState rhs)
{
return (HeimdallState)((int)lhs | (int)rhs);
}
inline HeimdallState& operator|=(HeimdallState& lhs, HeimdallState rhs)
{
lhs = lhs | rhs;
return lhs;
}
inline HeimdallState operator&(HeimdallState lhs, HeimdallState rhs)
{
lhs = (HeimdallState)((int)lhs & (int)rhs);
return lhs;
}
inline bool operator!(HeimdallState state)
{
return (int)state == 0;
}
class MainWindow : public QMainWindow, public Ui::MainWindow
{
Q_OBJECT
@ -80,8 +47,13 @@ namespace HeimdallFrontend
enum
{
kPrintPitSourceDevice = 0,
kPrintPitSourceLocalFile
kHeimdallStateStopped = 0,
kHeimdallStateFlashing,
kHeimdallStateDetectingDevice,
kHeimdallStateClosingPcScreen,
kHeimdallStatePrintingPit,
kHeimdallStateDownloadingPit,
kHeimdallStateCount
};
AboutForm aboutForm;
@ -91,8 +63,8 @@ namespace HeimdallFrontend
int tabIndex;
bool heimdallFailed;
HeimdallState heimdallState;
QProcess heimdallProcess;
int heimdallState;
QProcess process;
PackageData loadedPackageData;
@ -103,8 +75,6 @@ namespace HeimdallFrontend
QList<unsigned int> unusedPartitionIds;
bool verboseOutput;
bool resume;
void StartHeimdall(const QStringList& arguments);
@ -115,16 +85,13 @@ namespace HeimdallFrontend
bool IsArchive(QString path);
QString PromptFileSelection(const QString& caption = QString("Select File"), const QString& filter = QString());
QString PromptFileCreation(const QString& caption = QString("Save File"), const QString& filter = QString());
void UpdateLoadPackageInterfaceAvailability(void);
void UpdateFlashInterfaceAvailability(void);
void UpdateCreatePackageInterfaceAvailability(void);
void UpdateUtilitiesInterfaceAvailability(void);
void UpdateInterfaceAvailability(void);
QString PromptFileSelection(void);
QString PromptFileCreation(void);
void UpdatePartitionNamesInterface(void);
void UpdateInterfaceAvailability(void);
void UpdateBuildPackageButton(void);
public:
@ -156,10 +123,7 @@ namespace HeimdallFrontend
void SelectPit(void);
void SetRepartition(int enabled);
void SetNoReboot(int enabled);
void SetResume(bool enabled);
void SetResume(int enabled);
void StartFlash(void);
@ -191,9 +155,6 @@ namespace HeimdallFrontend
void SelectPitDestination(void);
void DownloadPit(void);
void DevicePrintPitToggled(bool checked);
void LocalFilePrintPitToggled(bool checked);
void SelectPrintPitFile(void);
void PrintPit(void);
// Heimdall Command Line

View File

@ -72,7 +72,7 @@
<property name="geometry">
<rect>
<x>0</x>
<y>-701</y>
<y>0</y>
<width>542</width>
<height>1140</height>
</rect>
@ -96,7 +96,7 @@
<number>0</number>
</property>
<item>
<widget class="QLabel" name="versionCopyrightLabel">
<widget class="QLabel" name="label_3">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
@ -114,11 +114,11 @@
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'MS Shell Dlg 2'; font-size:10pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-weight:600;&quot;&gt;Heimdall Frontend&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Version 2.0.2&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Copyright © 2010-2017 Benjamin Dobell, Glass Echidna&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Version 1.3.1&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Copyright © 2010-2011 Benjamin Dobell, Glass Echidna&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-weight:600;&quot;&gt;Heimdall (command line)&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;%HEIMDALL-VERSION%Copyright © 2010-2017 Benjamin Dobell, Glass Echidna&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Copyright © 2010-2011 Benjamin Dobell, Glass Echidna&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="textFormat">
@ -411,10 +411,10 @@ p, li { white-space: pre-wrap; }
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:10pt; font-weight:600;&quot;&gt;Heimdall (command line) utilises libusbx for all USB communication:&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;&quot;&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:10pt;&quot;&gt;libusbx is licensed under the &lt;/span&gt;&lt;a href=&quot;http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html&quot;&gt;&lt;span style=&quot; font-size:10pt; text-decoration: underline; color:#0000ff;&quot;&gt;Lesser General Public License v2.1.&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Lucida Grande'; font-size:13pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'MS Shell Dlg 2'; font-size:10pt; font-weight:600;&quot;&gt;Heimdall (command line) utilises libusb-1.0 for all USB communication:&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'MS Shell Dlg 2'; font-size:10pt;&quot;&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'MS Shell Dlg 2'; font-size:10pt;&quot;&gt;libusb-1.0 is licensed under the &lt;/span&gt;&lt;a href=&quot;http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html&quot;&gt;&lt;span style=&quot; font-family:'MS Shell Dlg 2'; font-size:10pt; text-decoration: underline; color:#0000ff;&quot;&gt;Lesser General Public License v2.1.&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="textFormat">
<enum>Qt::RichText</enum>

View File

@ -0,0 +1 @@
Heimdall Frontend is the official graphical user interface for the Heimdall tool suite.

View File

@ -1,4 +1,4 @@
Copyright (c) 2010-2017 Benjamin Dobell, Glass Echidna
Copyright (c) 2010-2011 Benjamin Dobell, Glass Echidna
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@ -0,0 +1,528 @@
Heimdall (c) 2010-2011 Benjamin Dobell, Glass Echidna
http://www.glassechidna.com.au/products/heimdall/
DISCLAIMER:
This software attempts to flash your Galaxy S device. The very nature of
flashing is dangerous. As with all flashing software, Heimdall has the
potential to damage (brick) your device if not used carefully. If you're
concerned, don't use this software. Flashing ROMs onto your phone may also
void your warranty. Benjamin Dobell and Glass Echidna are not responsible
for the result of your actions.
These instructions are for Linux operating systems.
Flashing Heimdall Firmware Package with Heimdall Frontend:
As of Heimdall Frontend 1.3 there are now two main ways to flash a ROM from
Heimdall Frontend. The simpler and preferred option is to download a
Heimdall Firmware Package and follow the following steps.
1. Fully charge your device (use the wall charger as it's faster).
2. Open Heimdall Frontend, which can be done by entering the following
command in a terminal:
heimdall-frontend
3. From the "Load Package" tab, under the "Heimdall Firmware Package"
section click the "Browse" button.
4. Use the dialogue that appears to navigate to, and select, the Heimdall
firmware package that you wish to flash.
5. You will see progress bars appear as the package is decompressed and
extracted.
When the package has finished being decompressed you should see
information about the particular firmware package that has been
selected.
6. Verify that your device is listed under "Supported Devices". If it's not
then STOP immediately! DO NOT flash this firmware to your device!
Instead search for an appropriate firmware package for your device.
If you believe there is a mistake and your device is actually
supported please get in contact with the firmware developer (not Glass
Echidna!) and ask them to rectify the issue. If the developer provided
a URL you may be able to contact them by pressing the "Homepage" button.
7. If you've verified your device is supported you may continue to press
the "Load / Customise" button.
8. You should now be looking at the "Flash" tab. If not verify that you did
in fact push the "Load / Customise" button.
Generally, you won't NEED or WANT to customise a firmware package! In
which case you can safely move on to step 9.
Nonetheless, the "Flash" tab provides you with a means to customise the
firmware package before flashing it to your device. See "Performing a
Custom Flash with Heimdall Frontend" for more details.
9. Put your Galaxy S device into download mode and plug it in to your PC.
Download mode can be accessed several different ways depending on your
particular device model. If you're unsure how to do this please search
online for the appropriate method.
10. Press the "Start" button.
11. Heimdall Frontend will display the progress and inform you when the
flash is complete.
If something went wrong i.e. your device wasn't detected because it
wasn't in download mode, then the status section will let you know the
cause of the problem.
Performing a Custom Flash with Heimdall Frontend:
This is the advanced means of flashing firmware to your device. You should
only flash firmware to your device this way if you know what you're doing.
If you're not an advanced user or a developer, in the event that a Heimdall
Firmware Package doesn't exist for the particular firmware you wish to
flash. I strongly recommend you get in touch with developer of the
firmware, or an advanced user, and politely ask them to create a Heimdall
Firmware Package for you.
If you're looking to customise an existing Heimdall Firmware Package then
follow steps 1-8 of "Flashing Heimdall Firmware Package with Heimdall
Frontend" then start from below with step 5.
1. Fully charge your device (use the wall charger as it's faster).
2. Download a decrypted Samsung Galaxy S ROM or a Heimdall Firmware Package
and extract everything to the one directory.
3. If the ROM is not a Heimdall Firmware Package it may instead be provided
as multiple archives (nested or otherwise), extract them all to the same
location.
NOTE: If you want to use the CSC then extract it last. If you're asked
to overwrite files then do so.
3. Open Heimdall Frontend, which can be done by entering the following
command in a terminal:
heimdall-frontend
4. Select the "Flash" tab. From the "Flash" tab you're able to completely
customise a flash.
5. Before you can chose which partitions you want to flash with particular
files you MUST first select a PIT file. To do this click the "Browse"
button in the "PIT" section. This will open a dialogue allowing you to
navigate to and select a valid PIT (.pit) file.
6. If a valid PIT file has been selected then "Add" button below the list
box will become enabled. Press this button to add a partition to your
flash.
7. When you first add a partition you will see the "Partition Name" and
"Partition ID" be populated with information. Use the "Partition Name"
drop down to select which partition you wish to flash. "Partition ID"
will automatically update and is never directly editable.
8. You must then select a file to flash to the partition that you just
specified using the "Browse" button under the "File / Partition". You
will not be able to flash, create a firmware package or add another
partition until you have selected a file. However, you're still able to
press the "Remove" button if you've decided not to flash the partition
you've just specified.
9. When you've specified a file name then you'll be able to see the updated
information in the partition list to the right. You can select any
partition from this list and customise it as you see fit.
You can also remove a partition from the list by selecting it and
clicking the "Remove" button. Removing a partition from the list doesn't
remove it from your device, it simply means it will not be flashed.
10. Repeat steps 7-9 as often as needed to specify all the partions/files
that you wish to flash.
11. Now you can chose whether you would like to repartition your device as
well as whether you would like to prevent the device rebooting once a
flash has been completed. These options can be enabled or disabled by
toggling the "Repartition" and "No Reboot" check-boxes.
In the general case you will only need to enable repartition if you wish
to change the PIT file on your device. Keep in mind that repartitioning
will wipe your device!
The "No Reboot" option is rarely required. It's mostly in place so you
can manually boot straight into recovery mode after a flash (rather than
booting up normally).
12. If you've added at least one partition to your flash (and selected a
file for that partition) then the "Start" button will be enabled. Press
the "Start" button to begin the flashing process.
You may notice that the "Create Package" tab becomes available at the
whenever the "Start" button becomes available. From this tab you're able
to create a reusable, redistributable Heimdall Firmware Package with the
files and partitions you just selected. See "How to Create a Heimdall
Firmware Package" for details.
13. Heimdall Frontend will display the progress and inform you when the
flash is complete.
If something went wrong i.e. your device wasn't detected because it
wasn't in download mode, then the status section will let you know the
cause of the problem.
Flashing Firmware from Command Line:
1. Fully charge your phone (use the wall charger as it's faster).
2. Download a decrypted Samsung Galaxy S ROM or a Heimdall Firmware Package
and extract everything to the one directory.
3. If the ROM is not a Heimdall Firmware Package it may instead be provided
as multiple archives (nested or otherwise), extract them all to the same
location.
NOTE: If you want to use the CSC then extract it last.
4. Put your Galaxy S device into download mode and plug it in..
5. Open a terminal and navigate to the directory where you extracted
the ROM/firmware files.
6. Type the following to list all the functionality Heimdall supports:
heimdall help
7. Use the instructions to manually enter a command with all the files you
want to flash.
Here is an example that does a full flash and repartition on a GT-I9000:
heimdall flash --repartition --pit s1_odin_20100512.pit --factoryfs factoryfs.rfs --cache cache.rfs --dbdata dbdata.rfs --primary-boot boot.bin --secondary-boot Sbl.bin --param param.lfs --kernel zImage --modem modem.bin
8. Heimdall will display the progress as it flashes so that you know things
are working as they should.
How to Create a Heimdall Firmware Package:
Firstly, Heimdall's firmware package format is just a regular TAR archive
compressed with gzip. The only two real requirements are that a valid
firmware.xml must be included (refer to Appendix A) and you can only
include files (no directories, links etc.) As such if you'd like there is
nothing preventing you creating Heimdall packages manually. Of course
Heimdall Frontend provides a simple user interface that takes care of all
the hard work for you.
There are two ways in which you can create a firmware package. You can
create a package from scratch, or you can load an existing package, apply
modifications and then save the package. Creating a package from scratch
is the preferred approach, by taking this approach you're far less likely
to run into file name length limitations, these are not Heimdall's own
limitation but rather a limitation of the TAR archive format.
Before you can access Heimdall Frontend's firmware creation functionality
(available from the "Create Package" tab) you must first specify which
files will be included in your package as well as a few flashing options
i.e. Whether or not users should repartition when flashing. This
information must be filled out from the "Flash" tab in exactly the same
fashion you would provide information to flash your device (see "Performing
a Custom Flash with Heimdall Frontend"). As mentioned above, it's not the
preferred means, but you're able to load an existing package as a starting
point for this information.
Once you've specified the files/partitions you wish to include in your
firmware package the "Create Package" tab will become available. Clicking
this tab will display additional information that you can include in your
package. In order to continue you must fill out all sections except for the
URLs section, which is optional. The following is break-down of what all
these options mean.
- General Firmware Information: -
Firmware Name - This is the name of your particular firmware. An
example would be "Cyanogenmod".
Firmware Version - This is the particular version identifier for your
package. Any valid string will be accepted although a the inclusion
of decimal point version number is preferred releases i.e. "7.1".
If it makes sense then feel free to append a text string like "RC1"
or "Beta 1" to the decimal point version.
Platform Name - This is the name of platform (or operating system) that
your firmware is based on. In most cases this will simply be
"Android".
Platform Version - This is the operating system version that your
firmware is based on. Again decimal point version numbers are
preferred over text, i.e. "2.3.4" is preferred over "Gingerbread".
- Developers -
URLs (Optional):
Homepage - Here you can enter your personal URL or a URL particularly
pertaining to the firmware being packaged. The URL must be well
formed for it to work. An example of a well formed URL is
"http://www.glassechidna.com.au/products/heimdall/". It is
important to include "http://" in order to specify the protocol as
other protocols such as "ftp://" are equally valid although
unlikely to be used.
Donate - Here you can enter a URL that will link users to a page to
make donations for the effort you've put into developing your
firmware. Once again the URL must be well formed but there is no
requirement on how your donation page should work. For instance
both "http://www.glassechidna.com.au/donate/" and
"http://forum.xda-developers.com/donatetome.php?u=2710388" are
equally valid.
Developer Info:
Name - Here you can enter in the name of individual team members or a
team name. Click "Add" and the developer will be added to the list
on the right. If you make a mistake you can select a developer from
the list and click "Remove". You can list as many developers as you
like however size constraints of the "Load Package" means only a
few will be visible. Where possible you may want to opt for team
names over listing individual team members.
- Supported Devices -
This section allows you to create a list of devices that are supported by
your particular firmware. Although Heimdall isn't capable of enforcing this
we strongly recommend you take this section seriously. If filled out
correctly you could help save a number of accidental bricks!
Device Info:
Manufacturer - This is where you can enter the name of the manufacturer
for a particular device. For now this will most likely be
"Samsung".
Name - This is the human readable name for a particular device.
"Galaxy S", "Galaxy S II", "Droid Charge", "Vibrant" and
"Galaxy S (Telstra)" are all valid names. There are a lot of
possible variations here so be as specific as you think is
necessary.
Product Code - This is by far the most important bit of device
information. Device names tend to be region specific and further
subject to the whims of telecommunication companies and resellers.
Product Codes (or product IDs) are designated by manufacturers and
are generally the definitive means of referring to a particular
device. Examples are "GT-I9000", "GT-I9100" and "SCH-I897". If
you're unsure of a particular product code then Google and
GSMArena are your friends!
After filling out all the necessary information the "Build" button will be
enabled. If it's still disabled then you know you're missing some required
information. In particular you must specify at least one developer and at
least one supported device. Pressing the "Build" button will bring up a
save dialogue where you must chose a file name for your particular package.
Don't worry about specifying the ".tar.gz" extension Heimdall Frontend will
take care of this automatically.
Once you've chosen a file name Heimdall Frontend will begin the process of
building the firmware package. In doing so a valid firmware.xml file will
be generated from the information entered, all files will be archived in a
single TAR file then the TAR archive will be compressed via gzip
compression. Compression will take a little while but you will see progress
bars so you know the application hasn't hung. When the progress bars
disappear you're finished making your package.
Congratulations! You're now ready to redistribute your firmware package
online or by any means you see fit.
Appendix A - firmware.xml
The following details a part of the Heimdall Firmware Package format. This
is only relevant to developers or advanced users who wish to create Heimdall
Firmware Packages outside of Heimdall Frontend or in some way integrate support
for the format in their own software.
All Heimdall Firmware Packages must contain a file called firmware.xml. This
file stores information stores meta-data for the package as well as information
about other files contained in the package that indicates how they should be
flashed.
The format is fairly straight-forward so it won't be explained in great detail,
nonetheless the following is an example of a valid firmware.xml file.
<?xml version="1.0" encoding="UTF-8"?>
<firmware version="1">
<name>Test Firmware</name>
<version>1.1</version>
<platform>
<name>Android</name>
<version>2.3.4</version>
</platform>
<developers>
<name>Benjamin Dobell</name>
<name>Hedonism Bot</name>
</developers>
<url>http://www.glassechidna.com.au/</url>
<donateurl>http://www.glassechidna.com.au/donate/</donateurl>
<devices>
<device>
<manufacturer>Samsung</manufacturer>
<product>GT-I9000</product>
<name>Galaxy S</name>
</device>
<device>
<manufacturer>Samsung</manufacturer>
<product>GT-I9000T</product>
<name>Galaxy S (Telstra)</name>
</device>
<device>
<manufacturer>Samsung</manufacturer>
<product>GT-I9000M</product>
<name>Vibrant</name>
</device>
</devices>
<pit>Nl3276-I9000 s1_odin_20100512.pit</pit>
<repartition>0</repartition>
<noreboot>0</noreboot>
<files>
<file>
<id>0</id>
<filename>gq3276-boot.bin</filename>
</file>
<file>
<id>24</id>
<filename>Uh3276-cache.rfs</filename>
</file>
<file>
<id>22</id>
<filename>em3276-factoryfs.rfs</filename>
</file>
<file>
<id>11</id>
<filename>fl3276-modem.bin</filename>
</file>
<file>
<id>21</id>
<filename>Xd3276-param.lfs</filename>
</file>
<file>
<id>3</id>
<filename>if3276-Sbl.bin</filename>
</file>
<file>
<id>6</id>
<filename>cr3276-zImage</filename>
</file>
</files>
</firmware>
New lines need not be included and the order in which elements are specified
does not need to match that of the above example.
One and only one <firmware> element must be included. The <firmware> element
must also have a version attribute specified. The version must be parsable as
an integer and indicates what version of the Heimdall Firmware Package
specification the package adheres to.
All data is stored as strings, however a <file>'s <id> element must be parsable
as an integer. The <id> value represents the partition ID (according to the
specified PIT file) that the file should be flashed to.
A <firmware>'s <repartition> and <noreboot> elements must also be parsable as
an integer. However, as they represent boolean values, a value of zero ("0")
means false (or disabled) where as a non-zero value (typically "1") means true
(or enabled).
File names are specified relative to the TAR archive in which firmware.xml and
all other files are to be stored. Heimdall Firmware Packages do not support
directories or links, as such file names should only be a name and not a path.
<url> and <donateurl> are the only optional elements, all other elements must
be included.
Appendix B - Installing Heimdall from Source:
1. First make sure you have installed build-tools and pkgconfig.
2. Open a terminal and navigate to the directory you downloaded,
or extracted, Heimdall to.
3. Enter the following commands to compile and install libusb-1.0:
cd libusb-1.0
./configure
make
sudo make install
cd ..
If you have problems please consult http://www.libusb.org/
4. Enter the following commands to compile libpit.
cd libusb-1.0
./configure
make
cd ..
NOTE: There is no need to run "sudo make install".
4. Enter the following commands to compile and install Heimdall:
cd heimdall
./configure
make
sudo make install
cd ..
NOTE: You can use "checkinstall" instead of "make install" in order
to generate a redistributable package.
5. Done
Appendix C - Installing Heimdall Frontend from Source:
1. Compile and install Heimdall, see Appendix B.
2. First make sure you have installed Qt 4.7 or later, available from:
http://qt.nokia.com/downloads/
3. Open a terminal and navigate to the directory you extracted Heimdall to.
4. Enter the following commands to compile and install Heimdall Frontend:
cd heimdall-frontend
qmake heimdall-frontend.pro
make
sudo make install
NOTE: As an alternative to "sudo make install" you may chose to generate
a package by typing the following:
sudo checkinstall --pkgversion <version>
Where <version> is the current Heimdall release e.g. 1.3.0
5. Done

View File

@ -0,0 +1,16 @@
HEADERS += ./Source/aboutform.h \
./Source/Alerts.h \
./Source/FirmwareInfo.h \
./Source/mainwindow.h \
./Source/PackageData.h \
./Source/Packaging.h
SOURCES += ./Source/aboutform.cpp \
./Source/Alerts.cpp \
./Source/FirmwareInfo.cpp \
./Source/main.cpp \
./Source/mainwindow.cpp \
./Source/PackageData.cpp \
./Source/Packaging.cpp
FORMS += ./mainwindow.ui \
./aboutform.ui
RESOURCES += mainwindow.qrc

View File

@ -0,0 +1,62 @@
# ----------------------------------------------------
# This file is generated by the Qt Visual Studio Add-in.
# ------------------------------------------------------
TEMPLATE = app
TARGET = heimdall-frontend
macx {
PRIVATE_FRAMEWORKS.files = /Library/Frameworks/QtCore.framework \
/Library/Frameworks/QtGui.framework /Library/Frameworks/QtXml.framework
PRIVATE_FRAMEWORKS.path = Contents/Frameworks
QMAKE_BUNDLE_DATA += PRIVATE_FRAMEWORKS
QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.4
QMAKE_MAC_SDK=/Developer/SDKs/MacOSX10.4u.sdk
config += x86 x86_64 ppc
isEqual(OUTPUTDIR, "") {
DESTDIR = /Applications
} else {
DESTDIR = $$OUTPUTDIR
}
} else {
win32 { # It's recommended that Windows users compile via VS2010, but just in case...
DESTDIR = ../Win32
!isEqual(OUTPUTDIR, "") {
target.path = $$OUTPUTDIR
INSTALLS += target
}
} else {
DESTDIR = ../Linux
isEqual(OUTPUTDIR, "") {
target.path = /usr/local/bin
} else {
target.path = $$OUTPUTDIR
}
INSTALLS += target
}
}
unix:LIBS += -lz ../libpit/libpit-1.3.a
win32:LIBS += ../Win32/Release/lib/libpit.lib
QT += core gui xml
CONFIG += release
DEFINES += QT_LARGEFILE_SUPPORT
INCLUDEPATH += ./GeneratedFiles \
./GeneratedFiles/Release \
../libpit/Source \
.
DEPENDPATH += .
MOC_DIR += ./GeneratedFiles/release
OBJECTS_DIR += release
UI_DIR += ./GeneratedFiles
RCC_DIR += ./GeneratedFiles
include(heimdall-frontend.pri)

View File

@ -0,0 +1,183 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{EAD352DF-7CDE-478C-8D70-B0E42A951DEF}</ProjectGuid>
<Keyword>Qt4VSv1.0</Keyword>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="Qt4VSPropertySheet.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="Qt4VSPropertySheet.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</IntDir>
<IncludePath Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectDir)include;$(SolutionDir)libpit\Source;$(IncludePath)</IncludePath>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
<IncludePath Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectDir)include;$(SolutionDir)libpit\Source;$(IncludePath)</IncludePath>
<LibraryPath Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectDir)lib\win32;$(LibraryPath)</LibraryPath>
<LibraryPath Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectDir)lib\win32;$(LibraryPath)</LibraryPath>
<SourcePath Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SourcePath)</SourcePath>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<PreprocessorDefinitions>UNICODE;WIN32;QT_LARGEFILE_SUPPORT;QT_CORE_LIB;QT_GUI_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>.\GeneratedFiles;$(QTDIR)\include;.\GeneratedFiles\$(ConfigurationName);$(QTDIR)\include\qtmain;$(QTDIR)\include\QtCore;$(QTDIR)\include\QtGui;$(QTDIR)\include\QtXml;..\libpit\Source;.\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<Optimization>Disabled</Optimization>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<TreatWChar_tAsBuiltInType>false</TreatWChar_tAsBuiltInType>
<WarningLevel>Level3</WarningLevel>
<MinimalRebuild>true</MinimalRebuild>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
<AdditionalLibraryDirectories>$(QTDIR)\lib;$(SolutionDir)$(Platform)\$(Configuration)\lib\;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>qtmaind.lib;QtCored4.lib;QtGuid4.lib;QtXml4.lib;libpit.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<PreprocessorDefinitions>UNICODE;WIN32;QT_LARGEFILE_SUPPORT;QT_NO_DEBUG;NDEBUG;QT_CORE_LIB;QT_GUI_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>.\GeneratedFiles;$(QTDIR)\include;.\GeneratedFiles\$(ConfigurationName);$(QTDIR)\include\qtmain;$(QTDIR)\include\QtCore;$(QTDIR)\include\QtGui;$(QTDIR)\include\QtXml;..\libpit\Source;.\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<DebugInformationFormat>
</DebugInformationFormat>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<TreatWChar_tAsBuiltInType>false</TreatWChar_tAsBuiltInType>
<PrecompiledHeaderFile>
</PrecompiledHeaderFile>
<PrecompiledHeaderOutputFile>
</PrecompiledHeaderOutputFile>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
<AdditionalLibraryDirectories>$(QTDIR)\lib;$(SolutionDir)$(Platform)\$(Configuration)\lib\;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>false</GenerateDebugInformation>
<AdditionalDependencies>qtmain.lib;QtCore4.lib;QtGui4.lib;QtXml4.lib;libpit.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="GeneratedFiles\Debug\moc_mainwindow.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="GeneratedFiles\qrc_mainwindow.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
</PrecompiledHeader>
</ClCompile>
<ClCompile Include="GeneratedFiles\Release\moc_mainwindow.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="Source\aboutform.cpp" />
<ClCompile Include="Source\Alerts.cpp" />
<ClCompile Include="Source\FirmwareInfo.cpp" />
<ClCompile Include="Source\main.cpp" />
<ClCompile Include="Source\mainwindow.cpp" />
<ClCompile Include="Source\PackageData.cpp" />
<ClCompile Include="Source\Packaging.cpp" />
</ItemGroup>
<ItemGroup>
<CustomBuild Include="mainwindow.ui">
<FileType>Document</FileType>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(QTDIR)\bin\uic.exe;%(AdditionalInputs)</AdditionalInputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Uic%27ing %(Identity)...</Message>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\GeneratedFiles\ui_%(Filename).h;%(Outputs)</Outputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">"$(QTDIR)\bin\uic.exe" -o ".\GeneratedFiles\ui_%(Filename).h" "%(FullPath)"</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(QTDIR)\bin\uic.exe;%(AdditionalInputs)</AdditionalInputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Uic%27ing %(Identity)...</Message>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\GeneratedFiles\ui_%(Filename).h;%(Outputs)</Outputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">"$(QTDIR)\bin\uic.exe" -o ".\GeneratedFiles\ui_%(Filename).h" "%(FullPath)"</Command>
</CustomBuild>
</ItemGroup>
<ItemGroup>
<ClInclude Include="GeneratedFiles\ui_aboutform.h" />
<ClInclude Include="GeneratedFiles\ui_mainwindow.h" />
<ClInclude Include="Source\aboutform.h" />
<ClInclude Include="Source\Alerts.h" />
<ClInclude Include="Source\FirmwareInfo.h" />
<ClInclude Include="Source\PackageData.h" />
<ClInclude Include="Source\Packaging.h" />
<CustomBuild Include="Source\mainwindow.h">
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Moc%27ing %(Identity)...</Message>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp</Outputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">"$(QTDIR)\bin\moc.exe" -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_CORE_LIB -DQT_GUI_LIB -D_UNICODE "-I." "-I.\GeneratedFiles" "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include\qtmain" "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtXml" "-I.\..\libpit\Source" "-I." "-I." "-I." "-I." "-I." "-I." "Source\mainwindow.h" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp"</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Moc%27ing %(Identity)...</Message>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp</Outputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">"$(QTDIR)\bin\moc.exe" -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_NO_DEBUG -DNDEBUG -DQT_CORE_LIB -DQT_GUI_LIB "-I." "-I.\GeneratedFiles" "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include\qtmain" "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtXml" "-I.\..\libpit\Source" "-I." "-I." "-I." "-I." "-I." "Source\mainwindow.h" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp"</Command>
</CustomBuild>
</ItemGroup>
<ItemGroup>
<CustomBuild Include="mainwindow.qrc">
<FileType>Document</FileType>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(FullPath);%(AdditionalInputs)</AdditionalInputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Rcc%27ing %(Identity)...</Message>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\GeneratedFiles\qrc_%(Filename).cpp;%(Outputs)</Outputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">"$(QTDIR)\bin\rcc.exe" -name "%(Filename)" -no-compress "%(FullPath)" -o .\GeneratedFiles\qrc_%(Filename).cpp</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(FullPath);%(AdditionalInputs)</AdditionalInputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Rcc%27ing %(Identity)...</Message>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\GeneratedFiles\qrc_%(Filename).cpp;%(Outputs)</Outputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">"$(QTDIR)\bin\rcc.exe" -name "%(Filename)" -no-compress "%(FullPath)" -o .\GeneratedFiles\qrc_%(Filename).cpp</Command>
</CustomBuild>
</ItemGroup>
<ItemGroup>
<CustomBuild Include="aboutform.ui">
<FileType>Document</FileType>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(QTDIR)\bin\uic.exe;%(AdditionalInputs)</AdditionalInputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Uic%27ing %(Identity)...</Message>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\GeneratedFiles\ui_%(Filename).h;%(Outputs)</Outputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">"$(QTDIR)\bin\uic.exe" -o ".\GeneratedFiles\ui_%(Filename).h" "%(FullPath)"</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(QTDIR)\bin\uic.exe;%(AdditionalInputs)</AdditionalInputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Uic%27ing %(Identity)...</Message>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\GeneratedFiles\ui_%(Filename).h;%(Outputs)</Outputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">"$(QTDIR)\bin\uic.exe" -o ".\GeneratedFiles\ui_%(Filename).h" "%(FullPath)"</Command>
</CustomBuild>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
<ProjectExtensions>
<VisualStudio>
<UserProperties UicDir=".\GeneratedFiles" MocDir=".\GeneratedFiles\$(ConfigurationName)" MocOptions="" RccDir=".\GeneratedFiles" lupdateOnBuild="0" QtVersion_x0020_Win32="qt" />
</VisualStudio>
</ProjectExtensions>
</Project>

View File

@ -0,0 +1,102 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Form Files">
<UniqueIdentifier>{99349809-55BA-4b9d-BF79-8FDBB0286EB3}</UniqueIdentifier>
<Extensions>ui</Extensions>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{D9D6E242-F8AF-46E4-B9FD-80ECBC20BA3E}</UniqueIdentifier>
<Extensions>qrc;*</Extensions>
<ParseFiles>false</ParseFiles>
</Filter>
<Filter Include="Generated Files">
<UniqueIdentifier>{71ED8ED8-ACB9-4CE9-BBE1-E00B30144E11}</UniqueIdentifier>
<Extensions>moc;h;cpp</Extensions>
<SourceControlFiles>False</SourceControlFiles>
</Filter>
<Filter Include="Generated Files\Debug">
<UniqueIdentifier>{ead127e5-64ec-4f27-8f35-5fb8f8b0b46e}</UniqueIdentifier>
<Extensions>cpp;moc</Extensions>
<SourceControlFiles>False</SourceControlFiles>
</Filter>
<Filter Include="Generated Files\Release">
<UniqueIdentifier>{2a437972-0e31-44d0-be90-ea5d62a68ff5}</UniqueIdentifier>
<Extensions>cpp;moc</Extensions>
<SourceControlFiles>False</SourceControlFiles>
</Filter>
<Filter Include="Source">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;cxx;c;def</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="GeneratedFiles\qrc_mainwindow.cpp">
<Filter>Generated Files</Filter>
</ClCompile>
<ClCompile Include="Source\main.cpp">
<Filter>Source</Filter>
</ClCompile>
<ClCompile Include="Source\mainwindow.cpp">
<Filter>Source</Filter>
</ClCompile>
<ClCompile Include="GeneratedFiles\Debug\moc_mainwindow.cpp">
<Filter>Generated Files\Debug</Filter>
</ClCompile>
<ClCompile Include="GeneratedFiles\Release\moc_mainwindow.cpp">
<Filter>Generated Files\Release</Filter>
</ClCompile>
<ClCompile Include="Source\aboutform.cpp">
<Filter>Source</Filter>
</ClCompile>
<ClCompile Include="Source\Packaging.cpp">
<Filter>Source</Filter>
</ClCompile>
<ClCompile Include="Source\PackageData.cpp">
<Filter>Source</Filter>
</ClCompile>
<ClCompile Include="Source\FirmwareInfo.cpp">
<Filter>Source</Filter>
</ClCompile>
<ClCompile Include="Source\Alerts.cpp">
<Filter>Source</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<CustomBuild Include="mainwindow.ui">
<Filter>Form Files</Filter>
</CustomBuild>
<CustomBuild Include="mainwindow.qrc">
<Filter>Resource Files</Filter>
</CustomBuild>
<CustomBuild Include="Source\mainwindow.h">
<Filter>Source</Filter>
</CustomBuild>
<CustomBuild Include="AboutForm.ui">
<Filter>Form Files</Filter>
</CustomBuild>
</ItemGroup>
<ItemGroup>
<ClInclude Include="GeneratedFiles\ui_mainwindow.h">
<Filter>Generated Files</Filter>
</ClInclude>
<ClInclude Include="GeneratedFiles\ui_AboutForm.h">
<Filter>Generated Files</Filter>
</ClInclude>
<ClInclude Include="Source\aboutform.h">
<Filter>Source</Filter>
</ClInclude>
<ClInclude Include="Source\Packaging.h">
<Filter>Source</Filter>
</ClInclude>
<ClInclude Include="Source\PackageData.h">
<Filter>Source</Filter>
</ClInclude>
<ClInclude Include="Source\FirmwareInfo.h">
<Filter>Source</Filter>
</ClInclude>
<ClInclude Include="Source\Alerts.h">
<Filter>Source</Filter>
</ClInclude>
</ItemGroup>
</Project>

View File

@ -0,0 +1,428 @@
/* zconf.h -- configuration of the zlib compression library
* Copyright (C) 1995-2010 Jean-loup Gailly.
* For conditions of distribution and use, see copyright notice in zlib.h
*/
/* @(#) $Id$ */
#ifndef ZCONF_H
#define ZCONF_H
/*
* If you *really* need a unique prefix for all types and library functions,
* compile with -DZ_PREFIX. The "standard" zlib should be compiled without it.
* Even better than compiling with -DZ_PREFIX would be to use configure to set
* this permanently in zconf.h using "./configure --zprefix".
*/
#ifdef Z_PREFIX /* may be set to #if 1 by ./configure */
/* all linked symbols */
# define _dist_code z__dist_code
# define _length_code z__length_code
# define _tr_align z__tr_align
# define _tr_flush_block z__tr_flush_block
# define _tr_init z__tr_init
# define _tr_stored_block z__tr_stored_block
# define _tr_tally z__tr_tally
# define adler32 z_adler32
# define adler32_combine z_adler32_combine
# define adler32_combine64 z_adler32_combine64
# define compress z_compress
# define compress2 z_compress2
# define compressBound z_compressBound
# define crc32 z_crc32
# define crc32_combine z_crc32_combine
# define crc32_combine64 z_crc32_combine64
# define deflate z_deflate
# define deflateBound z_deflateBound
# define deflateCopy z_deflateCopy
# define deflateEnd z_deflateEnd
# define deflateInit2_ z_deflateInit2_
# define deflateInit_ z_deflateInit_
# define deflateParams z_deflateParams
# define deflatePrime z_deflatePrime
# define deflateReset z_deflateReset
# define deflateSetDictionary z_deflateSetDictionary
# define deflateSetHeader z_deflateSetHeader
# define deflateTune z_deflateTune
# define deflate_copyright z_deflate_copyright
# define get_crc_table z_get_crc_table
# define gz_error z_gz_error
# define gz_intmax z_gz_intmax
# define gz_strwinerror z_gz_strwinerror
# define gzbuffer z_gzbuffer
# define gzclearerr z_gzclearerr
# define gzclose z_gzclose
# define gzclose_r z_gzclose_r
# define gzclose_w z_gzclose_w
# define gzdirect z_gzdirect
# define gzdopen z_gzdopen
# define gzeof z_gzeof
# define gzerror z_gzerror
# define gzflush z_gzflush
# define gzgetc z_gzgetc
# define gzgets z_gzgets
# define gzoffset z_gzoffset
# define gzoffset64 z_gzoffset64
# define gzopen z_gzopen
# define gzopen64 z_gzopen64
# define gzprintf z_gzprintf
# define gzputc z_gzputc
# define gzputs z_gzputs
# define gzread z_gzread
# define gzrewind z_gzrewind
# define gzseek z_gzseek
# define gzseek64 z_gzseek64
# define gzsetparams z_gzsetparams
# define gztell z_gztell
# define gztell64 z_gztell64
# define gzungetc z_gzungetc
# define gzwrite z_gzwrite
# define inflate z_inflate
# define inflateBack z_inflateBack
# define inflateBackEnd z_inflateBackEnd
# define inflateBackInit_ z_inflateBackInit_
# define inflateCopy z_inflateCopy
# define inflateEnd z_inflateEnd
# define inflateGetHeader z_inflateGetHeader
# define inflateInit2_ z_inflateInit2_
# define inflateInit_ z_inflateInit_
# define inflateMark z_inflateMark
# define inflatePrime z_inflatePrime
# define inflateReset z_inflateReset
# define inflateReset2 z_inflateReset2
# define inflateSetDictionary z_inflateSetDictionary
# define inflateSync z_inflateSync
# define inflateSyncPoint z_inflateSyncPoint
# define inflateUndermine z_inflateUndermine
# define inflate_copyright z_inflate_copyright
# define inflate_fast z_inflate_fast
# define inflate_table z_inflate_table
# define uncompress z_uncompress
# define zError z_zError
# define zcalloc z_zcalloc
# define zcfree z_zcfree
# define zlibCompileFlags z_zlibCompileFlags
# define zlibVersion z_zlibVersion
/* all zlib typedefs in zlib.h and zconf.h */
# define Byte z_Byte
# define Bytef z_Bytef
# define alloc_func z_alloc_func
# define charf z_charf
# define free_func z_free_func
# define gzFile z_gzFile
# define gz_header z_gz_header
# define gz_headerp z_gz_headerp
# define in_func z_in_func
# define intf z_intf
# define out_func z_out_func
# define uInt z_uInt
# define uIntf z_uIntf
# define uLong z_uLong
# define uLongf z_uLongf
# define voidp z_voidp
# define voidpc z_voidpc
# define voidpf z_voidpf
/* all zlib structs in zlib.h and zconf.h */
# define gz_header_s z_gz_header_s
# define internal_state z_internal_state
#endif
#if defined(__MSDOS__) && !defined(MSDOS)
# define MSDOS
#endif
#if (defined(OS_2) || defined(__OS2__)) && !defined(OS2)
# define OS2
#endif
#if defined(_WINDOWS) && !defined(WINDOWS)
# define WINDOWS
#endif
#if defined(_WIN32) || defined(_WIN32_WCE) || defined(__WIN32__)
# ifndef WIN32
# define WIN32
# endif
#endif
#if (defined(MSDOS) || defined(OS2) || defined(WINDOWS)) && !defined(WIN32)
# if !defined(__GNUC__) && !defined(__FLAT__) && !defined(__386__)
# ifndef SYS16BIT
# define SYS16BIT
# endif
# endif
#endif
/*
* Compile with -DMAXSEG_64K if the alloc function cannot allocate more
* than 64k bytes at a time (needed on systems with 16-bit int).
*/
#ifdef SYS16BIT
# define MAXSEG_64K
#endif
#ifdef MSDOS
# define UNALIGNED_OK
#endif
#ifdef __STDC_VERSION__
# ifndef STDC
# define STDC
# endif
# if __STDC_VERSION__ >= 199901L
# ifndef STDC99
# define STDC99
# endif
# endif
#endif
#if !defined(STDC) && (defined(__STDC__) || defined(__cplusplus))
# define STDC
#endif
#if !defined(STDC) && (defined(__GNUC__) || defined(__BORLANDC__))
# define STDC
#endif
#if !defined(STDC) && (defined(MSDOS) || defined(WINDOWS) || defined(WIN32))
# define STDC
#endif
#if !defined(STDC) && (defined(OS2) || defined(__HOS_AIX__))
# define STDC
#endif
#if defined(__OS400__) && !defined(STDC) /* iSeries (formerly AS/400). */
# define STDC
#endif
#ifndef STDC
# ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */
# define const /* note: need a more gentle solution here */
# endif
#endif
/* Some Mac compilers merge all .h files incorrectly: */
#if defined(__MWERKS__)||defined(applec)||defined(THINK_C)||defined(__SC__)
# define NO_DUMMY_DECL
#endif
/* Maximum value for memLevel in deflateInit2 */
#ifndef MAX_MEM_LEVEL
# ifdef MAXSEG_64K
# define MAX_MEM_LEVEL 8
# else
# define MAX_MEM_LEVEL 9
# endif
#endif
/* Maximum value for windowBits in deflateInit2 and inflateInit2.
* WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files
* created by gzip. (Files created by minigzip can still be extracted by
* gzip.)
*/
#ifndef MAX_WBITS
# define MAX_WBITS 15 /* 32K LZ77 window */
#endif
/* The memory requirements for deflate are (in bytes):
(1 << (windowBits+2)) + (1 << (memLevel+9))
that is: 128K for windowBits=15 + 128K for memLevel = 8 (default values)
plus a few kilobytes for small objects. For example, if you want to reduce
the default memory requirements from 256K to 128K, compile with
make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7"
Of course this will generally degrade compression (there's no free lunch).
The memory requirements for inflate are (in bytes) 1 << windowBits
that is, 32K for windowBits=15 (default value) plus a few kilobytes
for small objects.
*/
/* Type declarations */
#ifndef OF /* function prototypes */
# ifdef STDC
# define OF(args) args
# else
# define OF(args) ()
# endif
#endif
/* The following definitions for FAR are needed only for MSDOS mixed
* model programming (small or medium model with some far allocations).
* This was tested only with MSC; for other MSDOS compilers you may have
* to define NO_MEMCPY in zutil.h. If you don't need the mixed model,
* just define FAR to be empty.
*/
#ifdef SYS16BIT
# if defined(M_I86SM) || defined(M_I86MM)
/* MSC small or medium model */
# define SMALL_MEDIUM
# ifdef _MSC_VER
# define FAR _far
# else
# define FAR far
# endif
# endif
# if (defined(__SMALL__) || defined(__MEDIUM__))
/* Turbo C small or medium model */
# define SMALL_MEDIUM
# ifdef __BORLANDC__
# define FAR _far
# else
# define FAR far
# endif
# endif
#endif
#if defined(WINDOWS) || defined(WIN32)
/* If building or using zlib as a DLL, define ZLIB_DLL.
* This is not mandatory, but it offers a little performance increase.
*/
# ifdef ZLIB_DLL
# if defined(WIN32) && (!defined(__BORLANDC__) || (__BORLANDC__ >= 0x500))
# ifdef ZLIB_INTERNAL
# define ZEXTERN extern __declspec(dllexport)
# else
# define ZEXTERN extern __declspec(dllimport)
# endif
# endif
# endif /* ZLIB_DLL */
/* If building or using zlib with the WINAPI/WINAPIV calling convention,
* define ZLIB_WINAPI.
* Caution: the standard ZLIB1.DLL is NOT compiled using ZLIB_WINAPI.
*/
# ifdef ZLIB_WINAPI
# ifdef FAR
# undef FAR
# endif
# include <windows.h>
/* No need for _export, use ZLIB.DEF instead. */
/* For complete Windows compatibility, use WINAPI, not __stdcall. */
# define ZEXPORT WINAPI
# ifdef WIN32
# define ZEXPORTVA WINAPIV
# else
# define ZEXPORTVA FAR CDECL
# endif
# endif
#endif
#if defined (__BEOS__)
# ifdef ZLIB_DLL
# ifdef ZLIB_INTERNAL
# define ZEXPORT __declspec(dllexport)
# define ZEXPORTVA __declspec(dllexport)
# else
# define ZEXPORT __declspec(dllimport)
# define ZEXPORTVA __declspec(dllimport)
# endif
# endif
#endif
#ifndef ZEXTERN
# define ZEXTERN extern
#endif
#ifndef ZEXPORT
# define ZEXPORT
#endif
#ifndef ZEXPORTVA
# define ZEXPORTVA
#endif
#ifndef FAR
# define FAR
#endif
#if !defined(__MACTYPES__)
typedef unsigned char Byte; /* 8 bits */
#endif
typedef unsigned int uInt; /* 16 bits or more */
typedef unsigned long uLong; /* 32 bits or more */
#ifdef SMALL_MEDIUM
/* Borland C/C++ and some old MSC versions ignore FAR inside typedef */
# define Bytef Byte FAR
#else
typedef Byte FAR Bytef;
#endif
typedef char FAR charf;
typedef int FAR intf;
typedef uInt FAR uIntf;
typedef uLong FAR uLongf;
#ifdef STDC
typedef void const *voidpc;
typedef void FAR *voidpf;
typedef void *voidp;
#else
typedef Byte const *voidpc;
typedef Byte FAR *voidpf;
typedef Byte *voidp;
#endif
#ifdef HAVE_UNISTD_H /* may be set to #if 1 by ./configure */
# define Z_HAVE_UNISTD_H
#endif
#ifdef STDC
# include <sys/types.h> /* for off_t */
#endif
/* a little trick to accommodate both "#define _LARGEFILE64_SOURCE" and
* "#define _LARGEFILE64_SOURCE 1" as requesting 64-bit operations, (even
* though the former does not conform to the LFS document), but considering
* both "#undef _LARGEFILE64_SOURCE" and "#define _LARGEFILE64_SOURCE 0" as
* equivalently requesting no 64-bit operations
*/
#if -_LARGEFILE64_SOURCE - -1 == 1
# undef _LARGEFILE64_SOURCE
#endif
#if defined(Z_HAVE_UNISTD_H) || defined(_LARGEFILE64_SOURCE)
# include <unistd.h> /* for SEEK_* and off_t */
# ifdef VMS
# include <unixio.h> /* for off_t */
# endif
# ifndef z_off_t
# define z_off_t off_t
# endif
#endif
#ifndef SEEK_SET
# define SEEK_SET 0 /* Seek from beginning of file. */
# define SEEK_CUR 1 /* Seek from current position. */
# define SEEK_END 2 /* Set file pointer to EOF plus "offset" */
#endif
#ifndef z_off_t
# define z_off_t long
#endif
#if defined(_LARGEFILE64_SOURCE) && _LFS64_LARGEFILE-0
# define z_off64_t off64_t
#else
# define z_off64_t z_off_t
#endif
#if defined(__OS400__)
# define NO_vsnprintf
#endif
#if defined(__MVS__)
# define NO_vsnprintf
#endif
/* MVS linker does not support external names larger than 8 bytes */
#if defined(__MVS__)
#pragma map(deflateInit_,"DEIN")
#pragma map(deflateInit2_,"DEIN2")
#pragma map(deflateEnd,"DEEND")
#pragma map(deflateBound,"DEBND")
#pragma map(inflateInit_,"ININ")
#pragma map(inflateInit2_,"ININ2")
#pragma map(inflateEnd,"INEND")
#pragma map(inflateSync,"INSY")
#pragma map(inflateSetDictionary,"INSEDI")
#pragma map(compressBound,"CMBND")
#pragma map(inflate_table,"INTABL")
#pragma map(inflate_fast,"INFA")
#pragma map(inflate_copyright,"INCOPY")
#endif
#endif /* ZCONF_H */

File diff suppressed because it is too large Load Diff

Binary file not shown.

View File

@ -53,6 +53,17 @@
<enum>QTabWidget::Rounded</enum>
</property>
<widget class="QWidget" name="centralWidget">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<family>MS Shell Dlg 2</family>
</font>
</property>
<widget class="QTabWidget" name="functionTabWidget">
<property name="enabled">
<bool>true</bool>
@ -196,9 +207,6 @@
<height>31</height>
</rect>
</property>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="text">
<string>Load / Customise</string>
</property>
@ -272,9 +280,6 @@
<height>23</height>
</rect>
</property>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="text">
<string>Browse</string>
</property>
@ -349,9 +354,6 @@
<height>23</height>
</rect>
</property>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="text">
<string>Donate</string>
</property>
@ -368,9 +370,6 @@
<height>23</height>
</rect>
</property>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="text">
<string>Homepage</string>
</property>
@ -402,7 +401,7 @@
<rect>
<x>10</x>
<y>300</y>
<width>511</width>
<width>751</width>
<height>171</height>
</rect>
</property>
@ -415,9 +414,9 @@
</property>
<property name="geometry">
<rect>
<x>280</x>
<x>320</x>
<y>130</y>
<width>221</width>
<width>301</width>
<height>31</height>
</rect>
</property>
@ -433,8 +432,8 @@
<rect>
<x>10</x>
<y>30</y>
<width>491</width>
<height>81</height>
<width>731</width>
<height>91</height>
</rect>
</property>
<property name="undoRedoEnabled">
@ -452,7 +451,7 @@
<rect>
<x>10</x>
<y>130</y>
<width>261</width>
<width>301</width>
<height>21</height>
</rect>
</property>
@ -469,6 +468,59 @@
<set>Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft</set>
</property>
</widget>
<widget class="QPushButton" name="startFlashButton">
<property name="enabled">
<bool>false</bool>
</property>
<property name="geometry">
<rect>
<x>620</x>
<y>130</y>
<width>91</width>
<height>31</height>
</rect>
</property>
<property name="text">
<string>Start</string>
</property>
</widget>
<widget class="QLabel" name="startFlashTipLabel">
<property name="geometry">
<rect>
<x>720</x>
<y>130</y>
<width>21</width>
<height>23</height>
</rect>
</property>
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="toolTip">
<string notr="true">The &quot;Start&quot; button will remain inactive until at least one partition/file is added.</string>
</property>
<property name="frameShape">
<enum>QFrame::Panel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
<property name="lineWidth">
<number>2</number>
</property>
<property name="midLineWidth">
<number>0</number>
</property>
<property name="text">
<string>?</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</widget>
<widget class="QGroupBox" name="optionsGroup">
<property name="geometry">
@ -488,7 +540,7 @@
<x>10</x>
<y>20</y>
<width>391</width>
<height>91</height>
<height>61</height>
</rect>
</property>
<property name="title">
@ -522,21 +574,9 @@
<height>23</height>
</rect>
</property>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="text">
<string>Browse</string>
</property>
<property name="autoDefault">
<bool>false</bool>
</property>
<property name="default">
<bool>false</bool>
</property>
<property name="flat">
<bool>false</bool>
</property>
</widget>
<widget class="QLabel" name="pitBrowseTipLabel">
<property name="enabled">
@ -584,25 +624,6 @@
<set>Qt::AlignCenter</set>
</property>
</widget>
<widget class="QCheckBox" name="repartitionCheckBox">
<property name="enabled">
<bool>false</bool>
</property>
<property name="geometry">
<rect>
<x>10</x>
<y>60</y>
<width>131</width>
<height>21</height>
</rect>
</property>
<property name="toolTip">
<string notr="true">Repartitioning will wipe all data for your phone and install the selected PIT file.</string>
</property>
<property name="text">
<string>Repartition</string>
</property>
</widget>
</widget>
<widget class="QGroupBox" name="partitionGroup">
<property name="geometry">
@ -717,6 +738,44 @@
</property>
</widget>
</widget>
<widget class="QCheckBox" name="noRebootCheckBox">
<property name="enabled">
<bool>false</bool>
</property>
<property name="geometry">
<rect>
<x>250</x>
<y>90</y>
<width>151</width>
<height>21</height>
</rect>
</property>
<property name="toolTip">
<string notr="true">Can be enabled to prevent your device rebooting after the flash finishes.</string>
</property>
<property name="text">
<string>No Reboot</string>
</property>
</widget>
<widget class="QCheckBox" name="repartitionCheckBox">
<property name="enabled">
<bool>false</bool>
</property>
<property name="geometry">
<rect>
<x>20</x>
<y>90</y>
<width>151</width>
<height>21</height>
</rect>
</property>
<property name="toolTip">
<string notr="true">Repartitioning will wipe all data for your phone and install the selected PIT file.</string>
</property>
<property name="text">
<string>Repartition</string>
</property>
</widget>
<widget class="QGroupBox" name="partitionsGroup">
<property name="geometry">
<rect>
@ -813,110 +872,6 @@
</widget>
</widget>
</widget>
<widget class="QGroupBox" name="sessionGroup">
<property name="geometry">
<rect>
<x>530</x>
<y>300</y>
<width>231</width>
<height>171</height>
</rect>
</property>
<property name="title">
<string>Session</string>
</property>
<widget class="QCheckBox" name="noRebootCheckBox">
<property name="enabled">
<bool>false</bool>
</property>
<property name="geometry">
<rect>
<x>10</x>
<y>30</y>
<width>211</width>
<height>21</height>
</rect>
</property>
<property name="toolTip">
<string notr="true">Can be enabled to prevent your device rebooting after the flash finishes.</string>
</property>
<property name="text">
<string>No Reboot</string>
</property>
</widget>
<widget class="QCheckBox" name="resumeCheckbox">
<property name="enabled">
<bool>false</bool>
</property>
<property name="geometry">
<rect>
<x>10</x>
<y>60</y>
<width>211</width>
<height>21</height>
</rect>
</property>
<property name="toolTip">
<string notr="true">Can be enabled to prevent your device rebooting after the flash finishes.</string>
</property>
<property name="text">
<string>Resume (use after &quot;No Reboot&quot;)</string>
</property>
</widget>
<widget class="QPushButton" name="startFlashButton">
<property name="enabled">
<bool>false</bool>
</property>
<property name="geometry">
<rect>
<x>50</x>
<y>120</y>
<width>111</width>
<height>31</height>
</rect>
</property>
<property name="text">
<string>Start</string>
</property>
</widget>
<widget class="QLabel" name="startFlashTipLabel">
<property name="geometry">
<rect>
<x>170</x>
<y>120</y>
<width>21</width>
<height>23</height>
</rect>
</property>
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="toolTip">
<string notr="true">The &quot;Start&quot; button will remain inactive until at least one partition/file is added.</string>
</property>
<property name="frameShape">
<enum>QFrame::Panel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
<property name="lineWidth">
<number>2</number>
</property>
<property name="midLineWidth">
<number>0</number>
</property>
<property name="text">
<string>?</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</widget>
</widget>
<widget class="QWidget" name="createPackageTab">
<property name="enabled">
@ -959,9 +914,6 @@
<height>23</height>
</rect>
</property>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="text">
<string>Remove Device</string>
</property>
@ -1132,9 +1084,6 @@
<height>23</height>
</rect>
</property>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="text">
<string>Add</string>
</property>
@ -1152,9 +1101,6 @@
<height>23</height>
</rect>
</property>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="text">
<string>Remove</string>
</property>
@ -1371,9 +1317,6 @@
<height>23</height>
</rect>
</property>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="text">
<string>Add Device</string>
</property>
@ -1391,9 +1334,6 @@
<height>31</height>
</rect>
</property>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="text">
<string>Build</string>
</property>
@ -1408,7 +1348,7 @@
<rect>
<x>10</x>
<y>80</y>
<width>461</width>
<width>471</width>
<height>141</height>
</rect>
</property>
@ -1420,7 +1360,7 @@
<rect>
<x>10</x>
<y>30</y>
<width>441</width>
<width>451</width>
<height>71</height>
</rect>
</property>
@ -1435,7 +1375,7 @@
<rect>
<x>10</x>
<y>30</y>
<width>311</width>
<width>321</width>
<height>21</height>
</rect>
</property>
@ -1449,15 +1389,12 @@
</property>
<property name="geometry">
<rect>
<x>340</x>
<x>350</x>
<y>30</y>
<width>91</width>
<height>23</height>
</rect>
</property>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="text">
<string>Save As...</string>
</property>
@ -1469,15 +1406,12 @@
</property>
<property name="geometry">
<rect>
<x>320</x>
<x>330</x>
<y>110</y>
<width>101</width>
<height>23</height>
</rect>
</property>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="text">
<string>Download</string>
</property>
@ -1485,7 +1419,7 @@
<widget class="QLabel" name="downloadPitTipLabel">
<property name="geometry">
<rect>
<x>430</x>
<x>440</x>
<y>110</y>
<width>21</width>
<height>23</height>
@ -1498,7 +1432,7 @@
</font>
</property>
<property name="toolTip">
<string notr="true">Download and save a device's PIT file.</string>
<string notr="true">Download a devices PIT file.</string>
</property>
<property name="frameShape">
<enum>QFrame::Panel</enum>
@ -1560,7 +1494,7 @@
<rect>
<x>10</x>
<y>10</y>
<width>291</width>
<width>301</width>
<height>61</height>
</rect>
</property>
@ -1570,15 +1504,12 @@
<widget class="QPushButton" name="detectDeviceButton">
<property name="geometry">
<rect>
<x>170</x>
<x>180</x>
<y>30</y>
<width>81</width>
<height>23</height>
</rect>
</property>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="toolTip">
<string/>
</property>
@ -1594,7 +1525,7 @@
<rect>
<x>10</x>
<y>30</y>
<width>151</width>
<width>161</width>
<height>21</height>
</rect>
</property>
@ -1611,7 +1542,7 @@
</property>
<property name="geometry">
<rect>
<x>260</x>
<x>270</x>
<y>30</y>
<width>21</width>
<height>23</height>
@ -1624,7 +1555,7 @@
</font>
</property>
<property name="toolTip">
<string notr="true">Detect whether or not a device is connected in download mode.</string>
<string notr="true">Detect for a device connected in download mode.</string>
</property>
<property name="statusTip">
<string notr="true"/>
@ -1655,10 +1586,10 @@
<widget class="QGroupBox" name="printPitGroup">
<property name="geometry">
<rect>
<x>480</x>
<x>490</x>
<y>10</y>
<width>291</width>
<height>211</height>
<width>161</width>
<height>61</height>
</rect>
</property>
<property name="title">
@ -1667,15 +1598,12 @@
<widget class="QPushButton" name="printPitButton">
<property name="geometry">
<rect>
<x>160</x>
<y>180</y>
<x>40</x>
<y>30</y>
<width>81</width>
<height>23</height>
</rect>
</property>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="text">
<string>Print</string>
</property>
@ -1683,8 +1611,8 @@
<widget class="QLabel" name="printPitTipLabel">
<property name="geometry">
<rect>
<x>250</x>
<y>180</y>
<x>130</x>
<y>30</y>
<width>21</width>
<height>23</height>
</rect>
@ -1696,7 +1624,7 @@
</font>
</property>
<property name="toolTip">
<string notr="true">Print the contents of a PIT file in a human readable fashion.</string>
<string notr="true">Print the contents of a device's PIT file.</string>
</property>
<property name="frameShape">
<enum>QFrame::Panel</enum>
@ -1717,103 +1645,11 @@
<set>Qt::AlignCenter</set>
</property>
</widget>
<widget class="QRadioButton" name="printPitDeviceRadioBox">
<property name="enabled">
<bool>true</bool>
</property>
<property name="geometry">
<rect>
<x>20</x>
<y>30</y>
<width>261</width>
<height>21</height>
</rect>
</property>
<property name="text">
<string>Device</string>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
<widget class="QRadioButton" name="printPitLocalFileRadioBox">
<property name="enabled">
<bool>true</bool>
</property>
<property name="geometry">
<rect>
<x>20</x>
<y>60</y>
<width>261</width>
<height>21</height>
</rect>
</property>
<property name="text">
<string>Local File</string>
</property>
<property name="checkable">
<bool>true</bool>
</property>
</widget>
<widget class="QGroupBox" name="printLocalPitGroup">
<property name="enabled">
<bool>false</bool>
</property>
<property name="geometry">
<rect>
<x>10</x>
<y>100</y>
<width>271</width>
<height>71</height>
</rect>
</property>
<property name="title">
<string>PIT File</string>
</property>
<widget class="QLineEdit" name="printLocalPitLineEdit">
<property name="enabled">
<bool>false</bool>
</property>
<property name="geometry">
<rect>
<x>10</x>
<y>30</y>
<width>171</width>
<height>21</height>
</rect>
</property>
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
<widget class="QPushButton" name="printLocalPitBrowseButton">
<property name="enabled">
<bool>false</bool>
</property>
<property name="geometry">
<rect>
<x>190</x>
<y>30</y>
<width>71</width>
<height>23</height>
</rect>
</property>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="text">
<string>Browse</string>
</property>
</widget>
</widget>
</widget>
<widget class="QGroupBox" name="closePcScreenGroup">
<property name="geometry">
<rect>
<x>310</x>
<x>320</x>
<y>10</y>
<width>161</width>
<height>61</height>
@ -1831,9 +1667,6 @@
<height>23</height>
</rect>
</property>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="text">
<string>Close</string>
</property>
@ -1854,7 +1687,7 @@
</font>
</property>
<property name="toolTip">
<string notr="true">Close the &quot;device &lt;--&gt; PC&quot; screen displayed on a device.</string>
<string notr="true">Close the device &lt;--&gt; PC screen displayed on a device.</string>
</property>
<property name="frameShape">
<enum>QFrame::Panel</enum>
@ -1885,7 +1718,7 @@
<x>0</x>
<y>0</y>
<width>788</width>
<height>22</height>
<height>21</height>
</rect>
</property>
<widget class="QMenu" name="menuHelp">
@ -1904,8 +1737,6 @@
<property name="title">
<string>Advanced</string>
</property>
<addaction name="actionResumeConnection"/>
<addaction name="separator"/>
<addaction name="actionVerboseOutput"/>
</widget>
<addaction name="menuDonate"/>
@ -1940,14 +1771,6 @@
<string>Verbose Output</string>
</property>
</action>
<action name="actionResumeConnection">
<property name="checkable">
<bool>true</bool>
</property>
<property name="text">
<string>Resume Connection</string>
</property>
</action>
</widget>
<layoutdefault spacing="6" margin="11"/>
<tabstops>
@ -1971,6 +1794,7 @@
<tabstop>partitionFileLineEdit</tabstop>
<tabstop>partitionFileBrowseButton</tabstop>
<tabstop>outputPlainTextEdit</tabstop>
<tabstop>startFlashButton</tabstop>
<tabstop>createFirmwareNameLineEdit</tabstop>
<tabstop>createFirmwareVersionLineEdit</tabstop>
<tabstop>createPlatformNameLineEdit</tabstop>

View File

@ -1,126 +0,0 @@
/* Copyright (c) 2010-2017 Benjamin Dobell, Glass Echidna
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.*/
// Qt
#include <QDir>
#include <QProcess>
// Heimdall Frontend
#include "aboutform.h"
#include <QStringList>
#define UNUSED(x) (void)(x)
using namespace HeimdallFrontend;
AboutForm::AboutForm(QWidget *parent) : QWidget(parent)
{
setupUi(this);
// Heimdall Command Line
QObject::connect(&heimdallProcess, SIGNAL(readyRead()), this, SLOT(HandleHeimdallStdout()));
QObject::connect(&heimdallProcess, SIGNAL(finished(int, QProcess::ExitStatus)), this, SLOT(HandleHeimdallReturned(int, QProcess::ExitStatus)));
QObject::connect(&heimdallProcess, SIGNAL(error(QProcess::ProcessError)), this, SLOT(HandleHeimdallError(QProcess::ProcessError)));
heimdallFailed = false;
RetrieveHeimdallVersion();
}
void AboutForm::RetrieveHeimdallVersion(void)
{
heimdallProcess.setReadChannel(QProcess::StandardOutput);
heimdallProcess.start("heimdall", QStringList("version"));
heimdallProcess.waitForFinished(350);
// OS X was playing up and not finding heimdall, so we're manually checking the PATH.
if (heimdallFailed)
{
QStringList environment = QProcess::systemEnvironment();
QStringList paths;
// Ensure /usr/bin is in PATH
for (int i = 0; i < environment.length(); i++)
{
if (environment[i].left(5) == "PATH=")
{
paths = environment[i].mid(5).split(':');
paths.prepend("/usr/bin");
break;
}
}
int pathIndex = -1;
while (heimdallFailed && ++pathIndex < paths.length())
{
QString heimdallPath = paths[pathIndex];
if (heimdallPath.length() > 0)
{
heimdallFailed = false;
if (heimdallPath[heimdallPath.length() - 1] != QDir::separator())
heimdallPath += QDir::separator();
heimdallPath += "heimdall";
heimdallProcess.start(heimdallPath, QStringList("version"));
heimdallProcess.waitForFinished(350);
}
}
if (heimdallFailed)
versionCopyrightLabel->setText(versionCopyrightLabel->text().replace("%HEIMDALL-VERSION%", ""));
}
}
void AboutForm::HandleHeimdallStdout(void)
{
QString version = heimdallProcess.readAll();
if (version.length() > 0)
{
if (version.at(0) == QChar('v'))
version = version.mid(1);
versionCopyrightLabel->setText(versionCopyrightLabel->text().replace("%HEIMDALL-VERSION%", "Version " + version + "<br />"));
}
}
void AboutForm::HandleHeimdallReturned(int exitCode, QProcess::ExitStatus exitStatus)
{
UNUSED(exitCode);
UNUSED(exitStatus);
// If for some reason %HEIMDALL-VERSION% hasn't been replaced yet, we'll replace it with an empty string.
versionCopyrightLabel->setText(versionCopyrightLabel->text().replace("%HEIMDALL-VERSION%", ""));
}
void AboutForm::HandleHeimdallError(QProcess::ProcessError error)
{
UNUSED(error);
heimdallFailed = true;
}

View File

@ -1,58 +0,0 @@
/* Copyright (c) 2010-2017 Benjamin Dobell, Glass Echidna
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.*/
#ifndef ABOUTFORM_H
#define ABOUTFORM_H
// Qt
#include <QProcess>
#include <QWidget>
// Heimdall Frontend
#include "ui_aboutform.h"
namespace HeimdallFrontend
{
class AboutForm : public QWidget, public Ui::AboutForm
{
Q_OBJECT
private:
bool heimdallFailed;
QProcess heimdallProcess;
void RetrieveHeimdallVersion(void);
public:
explicit AboutForm(QWidget *parent = 0);
public slots:
// Heimdall Command Line
void HandleHeimdallStdout(void);
void HandleHeimdallReturned(int exitCode, QProcess::ExitStatus exitStatus);
void HandleHeimdallError(QProcess::ProcessError error);
};
}
#endif

View File

@ -0,0 +1,3 @@
SUBSYSTEM=="usb", ATTR{idVendor}=="04e8", ATTR{idProduct}=="6601", MODE="0666"
SUBSYSTEM=="usb", ATTR{idVendor}=="04e8", ATTR{idProduct}=="685D", MODE="0666"
SUBSYSTEM=="usb", ATTR{idVendor}=="04e8", ATTR{idProduct}=="68C3", MODE="0666"

View File

@ -1,3 +0,0 @@
SUBSYSTEM=="usb", ATTR{idVendor}=="04e8", ATTR{idProduct}=="6601", MODE="0666"
SUBSYSTEM=="usb", ATTR{idVendor}=="04e8", ATTR{idProduct}=="685d", MODE="0666"
SUBSYSTEM=="usb", ATTR{idVendor}=="04e8", ATTR{idProduct}=="68c3", MODE="0666"

View File

@ -1,80 +0,0 @@
cmake_minimum_required(VERSION 3.0.0)
project(heimdall)
find_package(libusb REQUIRED)
set(LIBPIT_INCLUDE_DIRS
../libpit/source)
if(APPLE)
set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LIBRARY "libc++")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -lobjc -framework IOKit -framework CoreFoundation")
endif()
if(MINGW)
set(CMAKE_EXE_LINKER_FLAGS "-static-libgcc -static-libstdc++ -static")
endif(MINGW)
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
add_definitions(-DOS_LINUX)
endif(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
include_directories(SYSTEM ${LIBUSB_INCLUDE_DIRS})
include_directories(${LIBPIT_INCLUDE_DIRS})
set(HEIMDALL_SOURCE_FILES
source/Arguments.cpp
source/BridgeManager.cpp
source/ClosePcScreenAction.cpp
source/DetectAction.cpp
source/DownloadPitAction.cpp
source/FlashAction.cpp
source/HelpAction.cpp
source/InfoAction.cpp
source/Interface.cpp
source/main.cpp
source/PrintPitAction.cpp
source/Utility.cpp
source/VersionAction.cpp)
include(CheckSymbolExists)
#
# Large file support on UN*X, a/k/a LFS.
#
# On Windows, we require _fseeki64() and _ftelli64(). Visual Studio
# has had supported them since Visual Studio 2005/MSVCR80.
#
if(NOT WIN32)
include(FindLFS)
if(LFS_FOUND)
#
# Add the required #defines.
#
add_definitions(${LFS_DEFINITIONS})
endif()
#
# Check for fseeko as well.
#
include(FindFseeko)
if(FSEEKO_FOUND)
set(HAVE_FSEEKO ON)
#
# Add the required #defines.
#
add_definitions(${FSEEKO_DEFINITIONS})
endif()
endif()
add_executable(heimdall ${HEIMDALL_SOURCE_FILES})
target_compile_features(heimdall PRIVATE cxx_std_11)
target_link_libraries(heimdall PRIVATE pit)
target_link_libraries(heimdall PRIVATE ${LIBUSB_LIBRARIES})
install (TARGETS heimdall
RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})

19
heimdall/LICENSE Normal file
View File

@ -0,0 +1,19 @@
Copyright (c) 2010-2011 Benjamin Dobell, Glass Echidna
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

34
heimdall/Makefile.am Normal file
View File

@ -0,0 +1,34 @@
AUTOMAKE_OPTIONS = subdir-objects
ACLOCAL_AMFLAGS = ${ACLOCAL_FLAGS}
AM_CPPFLAGS = $(DEPS_CFLAGS) -I../libpit/Source
STATIC_LIBS = ../libpit/libpit-1.3.a
bin_PROGRAMS = heimdall
heimdall_SOURCES = source/BeginDumpPacket.h source/BridgeManager.cpp \
source/BridgeManager.h source/DumpPartPitFilePacket.h source/DumpResponse.h \
source/EndFileTransferPacket.h source/EndModemFileTransferPacket.h \
source/EndPitFileTransferPacket.h source/EndPhoneFileTransferPacket.h \
source/EndSessionPacket.h source/FileTransferPacket.h source/FlashPartFileTransferPacket.h \
source/FlashPartPitFilePacket.h source/Heimdall.h source/InboundPacket.h \
source/Interface.cpp source/Interface.h source/main.cpp source/OutboundPacket.h \
source/Packet.h source/PitFilePacket.h source/PitFileResponse.h source/ReceiveFilePartPacket.h \
source/ResponsePacket.h source/SendFilePartPacket.h source/SendFilePartResponse.h \
source/ControlPacket.h source/SessionSetupPacket.h source/SessionSetupResponse.h \
source/DumpPartFileTransferPacket.h
heimdall_LDADD = $(DEPS_LIBS) $(STATIC_LIBS)
if LINUXTARGET
udevrulesdir = /lib/udev/rules.d
udevrules_DATA = 60-heimdall-galaxy-s.rules
install-data-hook:
if UDEVADM
sudo udevadm control --reload_rules
else
sudo service udev restart
endif
endif
dist_noinst_SCRIPTS = autogen.sh

787
heimdall/Makefile.in Normal file
View File

@ -0,0 +1,787 @@
# Makefile.in generated by automake 1.11.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
# Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
target_triplet = @target@
bin_PROGRAMS = heimdall$(EXEEXT)
subdir = .
DIST_COMMON = $(am__configure_deps) $(dist_noinst_SCRIPTS) \
$(srcdir)/Makefile.am $(srcdir)/Makefile.in \
$(srcdir)/config.h.in $(top_srcdir)/configure config.guess \
config.sub depcomp install-sh ltmain.sh missing
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
configure.lineno config.status.lineno
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(udevrulesdir)"
PROGRAMS = $(bin_PROGRAMS)
am__dirstamp = $(am__leading_dot)dirstamp
am_heimdall_OBJECTS = source/BridgeManager.$(OBJEXT) \
source/Interface.$(OBJEXT) source/main.$(OBJEXT)
heimdall_OBJECTS = $(am_heimdall_OBJECTS)
am__DEPENDENCIES_1 =
heimdall_DEPENDENCIES = $(am__DEPENDENCIES_1) $(STATIC_LIBS)
SCRIPTS = $(dist_noinst_SCRIPTS)
DEFAULT_INCLUDES = -I.@am__isrc@
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
am__mv = mv -f
CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
--mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
CXXLD = $(CXX)
CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
--mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
$(LDFLAGS) -o $@
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
--mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
$(LDFLAGS) -o $@
SOURCES = $(heimdall_SOURCES)
DIST_SOURCES = $(heimdall_SOURCES)
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
*) f=$$p;; \
esac;
am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
am__install_max = 40
am__nobase_strip_setup = \
srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
am__nobase_strip = \
for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
am__nobase_list = $(am__nobase_strip_setup); \
for p in $$list; do echo "$$p $$p"; done | \
sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
$(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
if (++n[$$2] == $(am__install_max)) \
{ print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
END { for (dir in files) print dir, files[dir] }'
am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
DATA = $(udevrules_DATA)
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
distdir = $(PACKAGE)-$(VERSION)
top_distdir = $(distdir)
am__remove_distdir = \
{ test ! -d "$(distdir)" \
|| { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
&& rm -fr "$(distdir)"; }; }
DIST_ARCHIVES = $(distdir).tar.gz
GZIP_ENV = --best
distuninstallcheck_listfiles = find . -type f -print
distcleancheck_listfiles = find . -type f -print
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AR = @AR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DEPS_CFLAGS = @DEPS_CFLAGS@
DEPS_LIBS = @DEPS_LIBS@
DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GREP = @GREP@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
NM = @NM@
NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
lt_ECHO = @lt_ECHO@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target = @target@
target_alias = @target_alias@
target_cpu = @target_cpu@
target_os = @target_os@
target_vendor = @target_vendor@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
udevadminstalled = @udevadminstalled@
AUTOMAKE_OPTIONS = subdir-objects
ACLOCAL_AMFLAGS = ${ACLOCAL_FLAGS}
AM_CPPFLAGS = $(DEPS_CFLAGS) -I../libpit/Source
STATIC_LIBS = ../libpit/libpit-1.3.a
heimdall_SOURCES = source/BeginDumpPacket.h source/BridgeManager.cpp \
source/BridgeManager.h source/DumpPartPitFilePacket.h source/DumpResponse.h \
source/EndFileTransferPacket.h source/EndModemFileTransferPacket.h \
source/EndPitFileTransferPacket.h source/EndPhoneFileTransferPacket.h \
source/EndSessionPacket.h source/FileTransferPacket.h source/FlashPartFileTransferPacket.h \
source/FlashPartPitFilePacket.h source/Heimdall.h source/InboundPacket.h \
source/Interface.cpp source/Interface.h source/main.cpp source/OutboundPacket.h \
source/Packet.h source/PitFilePacket.h source/PitFileResponse.h source/ReceiveFilePartPacket.h \
source/ResponsePacket.h source/SendFilePartPacket.h source/SendFilePartResponse.h \
source/ControlPacket.h source/SessionSetupPacket.h source/SessionSetupResponse.h \
source/DumpPartFileTransferPacket.h
heimdall_LDADD = $(DEPS_LIBS) $(STATIC_LIBS)
@LINUXTARGET_TRUE@udevrulesdir = /lib/udev/rules.d
@LINUXTARGET_TRUE@udevrules_DATA = 60-heimdall-galaxy-s.rules
dist_noinst_SCRIPTS = autogen.sh
all: config.h
$(MAKE) $(AM_MAKEFLAGS) all-am
.SUFFIXES:
.SUFFIXES: .cpp .lo .o .obj
am--refresh:
@:
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \
$(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \
&& exit 0; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --foreign Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
echo ' $(SHELL) ./config.status'; \
$(SHELL) ./config.status;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
$(SHELL) ./config.status --recheck
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
$(am__cd) $(srcdir) && $(AUTOCONF)
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
$(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
$(am__aclocal_m4_deps):
config.h: stamp-h1
@if test ! -f $@; then \
rm -f stamp-h1; \
$(MAKE) $(AM_MAKEFLAGS) stamp-h1; \
else :; fi
stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
@rm -f stamp-h1
cd $(top_builddir) && $(SHELL) ./config.status config.h
$(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
($(am__cd) $(top_srcdir) && $(AUTOHEADER))
rm -f stamp-h1
touch $@
distclean-hdr:
-rm -f config.h stamp-h1
install-binPROGRAMS: $(bin_PROGRAMS)
@$(NORMAL_INSTALL)
test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
for p in $$list; do echo "$$p $$p"; done | \
sed 's/$(EXEEXT)$$//' | \
while read p p1; do if test -f $$p || test -f $$p1; \
then echo "$$p"; echo "$$p"; else :; fi; \
done | \
sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
-e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
sed 'N;N;N;s,\n, ,g' | \
$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
{ d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
if ($$2 == $$4) files[d] = files[d] " " $$1; \
else { print "f", $$3 "/" $$4, $$1; } } \
END { for (d in files) print "f", d, files[d] }' | \
while read type dir files; do \
if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
test -z "$$files" || { \
echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
$(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
} \
; done
uninstall-binPROGRAMS:
@$(NORMAL_UNINSTALL)
@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
files=`for p in $$list; do echo "$$p"; done | \
sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
-e 's/$$/$(EXEEXT)/' `; \
test -n "$$list" || exit 0; \
echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
cd "$(DESTDIR)$(bindir)" && rm -f $$files
clean-binPROGRAMS:
@list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \
echo " rm -f" $$list; \
rm -f $$list || exit $$?; \
test -n "$(EXEEXT)" || exit 0; \
list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
echo " rm -f" $$list; \
rm -f $$list
source/$(am__dirstamp):
@$(MKDIR_P) source
@: > source/$(am__dirstamp)
source/$(DEPDIR)/$(am__dirstamp):
@$(MKDIR_P) source/$(DEPDIR)
@: > source/$(DEPDIR)/$(am__dirstamp)
source/BridgeManager.$(OBJEXT): source/$(am__dirstamp) \
source/$(DEPDIR)/$(am__dirstamp)
source/Interface.$(OBJEXT): source/$(am__dirstamp) \
source/$(DEPDIR)/$(am__dirstamp)
source/main.$(OBJEXT): source/$(am__dirstamp) \
source/$(DEPDIR)/$(am__dirstamp)
heimdall$(EXEEXT): $(heimdall_OBJECTS) $(heimdall_DEPENDENCIES)
@rm -f heimdall$(EXEEXT)
$(CXXLINK) $(heimdall_OBJECTS) $(heimdall_LDADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
-rm -f source/BridgeManager.$(OBJEXT)
-rm -f source/Interface.$(OBJEXT)
-rm -f source/main.$(OBJEXT)
distclean-compile:
-rm -f *.tab.c
@AMDEP_TRUE@@am__include@ @am__quote@source/$(DEPDIR)/BridgeManager.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@source/$(DEPDIR)/Interface.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@source/$(DEPDIR)/main.Po@am__quote@
.cpp.o:
@am__fastdepCXX_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
@am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $<
.cpp.obj:
@am__fastdepCXX_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
@am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
.cpp.lo:
@am__fastdepCXX_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\
@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
@am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $<
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
distclean-libtool:
-rm -f libtool config.lt
install-udevrulesDATA: $(udevrules_DATA)
@$(NORMAL_INSTALL)
test -z "$(udevrulesdir)" || $(MKDIR_P) "$(DESTDIR)$(udevrulesdir)"
@list='$(udevrules_DATA)'; test -n "$(udevrulesdir)" || list=; \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; \
done | $(am__base_list) | \
while read files; do \
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(udevrulesdir)'"; \
$(INSTALL_DATA) $$files "$(DESTDIR)$(udevrulesdir)" || exit $$?; \
done
uninstall-udevrulesDATA:
@$(NORMAL_UNINSTALL)
@list='$(udevrules_DATA)'; test -n "$(udevrulesdir)" || list=; \
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
test -n "$$files" || exit 0; \
echo " ( cd '$(DESTDIR)$(udevrulesdir)' && rm -f" $$files ")"; \
cd "$(DESTDIR)$(udevrulesdir)" && rm -f $$files
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
mkid -fID $$unique
tags: TAGS
TAGS: $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
set x; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
shift; \
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
if test $$# -gt 0; then \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
"$$@" $$unique; \
else \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$unique; \
fi; \
fi
ctags: CTAGS
CTAGS: $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
test -z "$(CTAGS_ARGS)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& $(am__cd) $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) "$$here"
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
$(am__remove_distdir)
test -d "$(distdir)" || mkdir "$(distdir)"
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
dist_files=`for file in $$list; do echo $$file; done | \
sed -e "s|^$$srcdirstrip/||;t" \
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
case $$dist_files in \
*/*) $(MKDIR_P) `echo "$$dist_files" | \
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
sort -u` ;; \
esac; \
for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
if test -d $$d/$$file; then \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d "$(distdir)/$$file"; then \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
else \
test -f "$(distdir)/$$file" \
|| cp -p $$d/$$file "$(distdir)/$$file" \
|| exit 1; \
fi; \
done
-test -n "$(am__skip_mode_fix)" \
|| find "$(distdir)" -type d ! -perm -755 \
-exec chmod u+rwx,go+rx {} \; -o \
! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
! -type d ! -perm -400 -exec chmod a+r {} \; -o \
! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
|| chmod -R a+r "$(distdir)"
dist-gzip: distdir
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
$(am__remove_distdir)
dist-bzip2: distdir
tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
$(am__remove_distdir)
dist-lzma: distdir
tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma
$(am__remove_distdir)
dist-xz: distdir
tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz
$(am__remove_distdir)
dist-tarZ: distdir
tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
$(am__remove_distdir)
dist-shar: distdir
shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
$(am__remove_distdir)
dist-zip: distdir
-rm -f $(distdir).zip
zip -rq $(distdir).zip $(distdir)
$(am__remove_distdir)
dist dist-all: distdir
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
$(am__remove_distdir)
# This target untars the dist file and tries a VPATH configuration. Then
# it guarantees that the distribution is self-contained by making another
# tarfile.
distcheck: dist
case '$(DIST_ARCHIVES)' in \
*.tar.gz*) \
GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
*.tar.bz2*) \
bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
*.tar.lzma*) \
lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\
*.tar.xz*) \
xz -dc $(distdir).tar.xz | $(am__untar) ;;\
*.tar.Z*) \
uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
*.shar.gz*) \
GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\
*.zip*) \
unzip $(distdir).zip ;;\
esac
chmod -R a-w $(distdir); chmod a+w $(distdir)
mkdir $(distdir)/_build
mkdir $(distdir)/_inst
chmod a-w $(distdir)
test -d $(distdir)/_build || exit 0; \
dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
&& dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
&& am__cwd=`pwd` \
&& $(am__cd) $(distdir)/_build \
&& ../configure --srcdir=.. --prefix="$$dc_install_base" \
$(DISTCHECK_CONFIGURE_FLAGS) \
&& $(MAKE) $(AM_MAKEFLAGS) \
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
&& $(MAKE) $(AM_MAKEFLAGS) check \
&& $(MAKE) $(AM_MAKEFLAGS) install \
&& $(MAKE) $(AM_MAKEFLAGS) installcheck \
&& $(MAKE) $(AM_MAKEFLAGS) uninstall \
&& $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
distuninstallcheck \
&& chmod -R a-w "$$dc_install_base" \
&& ({ \
(cd ../.. && umask 077 && mkdir "$$dc_destdir") \
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
} || { rm -rf "$$dc_destdir"; exit 1; }) \
&& rm -rf "$$dc_destdir" \
&& $(MAKE) $(AM_MAKEFLAGS) dist \
&& rm -rf $(DIST_ARCHIVES) \
&& $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
&& cd "$$am__cwd" \
|| exit 1
$(am__remove_distdir)
@(echo "$(distdir) archives ready for distribution: "; \
list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
distuninstallcheck:
@$(am__cd) '$(distuninstallcheck_dir)' \
&& test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
|| { echo "ERROR: files left after uninstall:" ; \
if test -n "$(DESTDIR)"; then \
echo " (check DESTDIR support)"; \
fi ; \
$(distuninstallcheck_listfiles) ; \
exit 1; } >&2
distcleancheck: distclean
@if test '$(srcdir)' = . ; then \
echo "ERROR: distcleancheck can only run from a VPATH build" ; \
exit 1 ; \
fi
@test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
|| { echo "ERROR: files left in build directory after distclean:" ; \
$(distcleancheck_listfiles) ; \
exit 1; } >&2
check-am: all-am
check: check-am
all-am: Makefile $(PROGRAMS) $(SCRIPTS) $(DATA) config.h
installdirs:
for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(udevrulesdir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
-rm -f source/$(DEPDIR)/$(am__dirstamp)
-rm -f source/$(am__dirstamp)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
@LINUXTARGET_FALSE@install-data-hook:
clean: clean-am
clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
distclean: distclean-am
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
-rm -rf source/$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-hdr distclean-libtool distclean-tags
dvi: dvi-am
dvi-am:
html: html-am
html-am:
info: info-am
info-am:
install-data-am: install-udevrulesDATA
@$(NORMAL_INSTALL)
$(MAKE) $(AM_MAKEFLAGS) install-data-hook
install-dvi: install-dvi-am
install-dvi-am:
install-exec-am: install-binPROGRAMS
install-html: install-html-am
install-html-am:
install-info: install-info-am
install-info-am:
install-man:
install-pdf: install-pdf-am
install-pdf-am:
install-ps: install-ps-am
install-ps-am:
installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
-rm -rf $(top_srcdir)/autom4te.cache
-rm -rf source/$(DEPDIR)
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-compile mostlyclean-generic \
mostlyclean-libtool
pdf: pdf-am
pdf-am:
ps: ps-am
ps-am:
uninstall-am: uninstall-binPROGRAMS uninstall-udevrulesDATA
.MAKE: all install-am install-data-am install-strip
.PHONY: CTAGS GTAGS all all-am am--refresh check check-am clean \
clean-binPROGRAMS clean-generic clean-libtool ctags dist \
dist-all dist-bzip2 dist-gzip dist-lzma dist-shar dist-tarZ \
dist-xz dist-zip distcheck distclean distclean-compile \
distclean-generic distclean-hdr distclean-libtool \
distclean-tags distcleancheck distdir distuninstallcheck dvi \
dvi-am html html-am info info-am install install-am \
install-binPROGRAMS install-data install-data-am \
install-data-hook install-dvi install-dvi-am install-exec \
install-exec-am install-html install-html-am install-info \
install-info-am install-man install-pdf install-pdf-am \
install-ps install-ps-am install-strip install-udevrulesDATA \
installcheck installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-compile \
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
tags uninstall uninstall-am uninstall-binPROGRAMS \
uninstall-udevrulesDATA
@LINUXTARGET_TRUE@install-data-hook:
@LINUXTARGET_TRUE@@UDEVADM_TRUE@ sudo udevadm control --reload_rules
@LINUXTARGET_TRUE@@UDEVADM_FALSE@ sudo service udev restart
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

9115
heimdall/aclocal.m4 vendored Normal file

File diff suppressed because it is too large Load Diff

3
heimdall/autogen.sh Executable file
View File

@ -0,0 +1,3 @@
#!/bin/sh
autoreconf --force --install

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,280 @@
# This file was generated by Autom4te Thu Aug 5 21:29:16 UTC 2010.
# It contains the lists of macros which have been traced.
# It can be safely removed.
@request = (
bless( [
'0',
1,
[
'/usr/share/autoconf'
],
[
'/usr/share/autoconf/autoconf/autoconf.m4f',
'/usr/share/aclocal/argz.m4',
'/usr/share/aclocal/libtool.m4',
'/usr/share/aclocal/ltdl.m4',
'/usr/share/aclocal/ltoptions.m4',
'/usr/share/aclocal/ltsugar.m4',
'/usr/share/aclocal/ltversion.m4',
'/usr/share/aclocal/lt~obsolete.m4',
'/usr/share/aclocal/pkg.m4',
'/usr/share/aclocal-1.11/amversion.m4',
'/usr/share/aclocal-1.11/auxdir.m4',
'/usr/share/aclocal-1.11/cond.m4',
'/usr/share/aclocal-1.11/depend.m4',
'/usr/share/aclocal-1.11/depout.m4',
'/usr/share/aclocal-1.11/init.m4',
'/usr/share/aclocal-1.11/install-sh.m4',
'/usr/share/aclocal-1.11/lead-dot.m4',
'/usr/share/aclocal-1.11/maintainer.m4',
'/usr/share/aclocal-1.11/make.m4',
'/usr/share/aclocal-1.11/missing.m4',
'/usr/share/aclocal-1.11/mkdirp.m4',
'/usr/share/aclocal-1.11/options.m4',
'/usr/share/aclocal-1.11/runlog.m4',
'/usr/share/aclocal-1.11/sanity.m4',
'/usr/share/aclocal-1.11/silent.m4',
'/usr/share/aclocal-1.11/strip.m4',
'/usr/share/aclocal-1.11/substnot.m4',
'/usr/share/aclocal-1.11/tar.m4',
'configure.ac'
],
{
'AM_ENABLE_STATIC' => 1,
'AC_LIBTOOL_LANG_RC_CONFIG' => 1,
'_LT_AC_SHELL_INIT' => 1,
'AC_DEFUN' => 1,
'AC_PROG_LIBTOOL' => 1,
'_LT_AC_LANG_CXX_CONFIG' => 1,
'AM_PROG_MKDIR_P' => 1,
'AM_AUTOMAKE_VERSION' => 1,
'AM_SUBST_NOTMAKE' => 1,
'AM_MISSING_PROG' => 1,
'AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH' => 1,
'_LT_AC_LANG_C_CONFIG' => 1,
'AM_PROG_INSTALL_STRIP' => 1,
'_m4_warn' => 1,
'AC_LIBTOOL_OBJDIR' => 1,
'gl_FUNC_ARGZ' => 1,
'LTOBSOLETE_VERSION' => 1,
'AM_SANITY_CHECK' => 1,
'AC_LIBTOOL_LANG_GCJ_CONFIG' => 1,
'AC_LIBTOOL_PROG_COMPILER_PIC' => 1,
'LT_LIB_M' => 1,
'_LT_AC_CHECK_DLFCN' => 1,
'AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE' => 1,
'LTSUGAR_VERSION' => 1,
'_LT_PROG_LTMAIN' => 1,
'LT_SYS_SYMBOL_USCORE' => 1,
'_AM_PROG_TAR' => 1,
'AC_LIBTOOL_GCJ' => 1,
'LT_SYS_DLOPEN_DEPLIBS' => 1,
'LT_FUNC_DLSYM_USCORE' => 1,
'_LT_AC_LANG_F77' => 1,
'AC_LIBTOOL_CONFIG' => 1,
'_AM_SUBST_NOTMAKE' => 1,
'AC_LTDL_DLLIB' => 1,
'_AM_AUTOCONF_VERSION' => 1,
'AM_DISABLE_SHARED' => 1,
'_LTDL_SETUP' => 1,
'_LT_AC_LANG_CXX' => 1,
'AM_PROG_LIBTOOL' => 1,
'AC_LIB_LTDL' => 1,
'_LT_AC_FILE_LTDLL_C' => 1,
'AM_PROG_LD' => 1,
'AU_DEFUN' => 1,
'AC_PROG_NM' => 1,
'AC_LIBTOOL_DLOPEN' => 1,
'AC_PROG_LD' => 1,
'AC_PROG_LD_GNU' => 1,
'AC_ENABLE_FAST_INSTALL' => 1,
'AC_LIBTOOL_FC' => 1,
'LTDL_CONVENIENCE' => 1,
'_AM_SET_OPTION' => 1,
'AC_LTDL_PREOPEN' => 1,
'_LT_LINKER_BOILERPLATE' => 1,
'AC_LIBTOOL_LANG_CXX_CONFIG' => 1,
'AC_LIBTOOL_PROG_CC_C_O' => 1,
'gl_PREREQ_ARGZ' => 1,
'LT_SUPPORTED_TAG' => 1,
'AM_OUTPUT_DEPENDENCY_COMMANDS' => 1,
'LT_PROG_RC' => 1,
'LT_SYS_MODULE_EXT' => 1,
'AC_DEFUN_ONCE' => 1,
'_LT_AC_LANG_GCJ' => 1,
'AC_LTDL_OBJDIR' => 1,
'_LT_PATH_TOOL_PREFIX' => 1,
'AC_LIBTOOL_RC' => 1,
'AM_SILENT_RULES' => 1,
'AC_DISABLE_FAST_INSTALL' => 1,
'_LT_AC_PROG_ECHO_BACKSLASH' => 1,
'_LT_AC_SYS_LIBPATH_AIX' => 1,
'_LT_AC_TRY_DLOPEN_SELF' => 1,
'include' => 1,
'LT_AC_PROG_SED' => 1,
'AM_ENABLE_SHARED' => 1,
'LTDL_INSTALLABLE' => 1,
'_LT_AC_LANG_GCJ_CONFIG' => 1,
'AC_ENABLE_SHARED' => 1,
'AC_ENABLE_STATIC' => 1,
'AC_LIBTOOL_SYS_HARD_LINK_LOCKS' => 1,
'_LT_AC_TAGVAR' => 1,
'AC_LIBTOOL_LANG_F77_CONFIG' => 1,
'AM_CONDITIONAL' => 1,
'LT_LIB_DLLOAD' => 1,
'LTDL_INIT' => 1,
'LTVERSION_VERSION' => 1,
'AM_PROG_INSTALL_SH' => 1,
'm4_include' => 1,
'AC_PROG_EGREP' => 1,
'_AC_AM_CONFIG_HEADER_HOOK' => 1,
'AC_PATH_MAGIC' => 1,
'AC_LTDL_SYSSEARCHPATH' => 1,
'AM_MAKE_INCLUDE' => 1,
'LT_CMD_MAX_LEN' => 1,
'_LT_AC_TAGCONFIG' => 1,
'm4_pattern_forbid' => 1,
'_LT_LINKER_OPTION' => 1,
'AC_LIBTOOL_COMPILER_OPTION' => 1,
'AC_DISABLE_SHARED' => 1,
'_LT_COMPILER_BOILERPLATE' => 1,
'AC_LIBTOOL_WIN32_DLL' => 1,
'AC_LIBTOOL_SETUP' => 1,
'AC_PROG_LD_RELOAD_FLAG' => 1,
'AC_LTDL_DLSYM_USCORE' => 1,
'AM_MISSING_HAS_RUN' => 1,
'LT_LANG' => 1,
'LT_SYS_DLSEARCH_PATH' => 1,
'LT_CONFIG_LTDL_DIR' => 1,
'AC_LIBTOOL_DLOPEN_SELF' => 1,
'LT_OUTPUT' => 1,
'AC_LIBTOOL_PROG_LD_SHLIBS' => 1,
'_PKG_SHORT_ERRORS_SUPPORTED' => 1,
'AC_WITH_LTDL' => 1,
'AC_LIBTOOL_LINKER_OPTION' => 1,
'PKG_CHECK_EXISTS' => 1,
'LT_AC_PROG_RC' => 1,
'AC_LIBTOOL_CXX' => 1,
'LT_INIT' => 1,
'LT_AC_PROG_GCJ' => 1,
'LT_SYS_DLOPEN_SELF' => 1,
'AM_DEP_TRACK' => 1,
'AM_DISABLE_STATIC' => 1,
'_AC_PROG_LIBTOOL' => 1,
'_AM_IF_OPTION' => 1,
'AC_PATH_TOOL_PREFIX' => 1,
'm4_pattern_allow' => 1,
'AC_LIBTOOL_F77' => 1,
'AM_SET_LEADING_DOT' => 1,
'LT_AC_PROG_EGREP' => 1,
'_AM_DEPENDENCIES' => 1,
'AC_LIBTOOL_LANG_C_CONFIG' => 1,
'LTOPTIONS_VERSION' => 1,
'_LT_AC_SYS_COMPILER' => 1,
'AM_PROG_NM' => 1,
'PKG_CHECK_MODULES' => 1,
'AC_LIBLTDL_CONVENIENCE' => 1,
'AC_DEPLIBS_CHECK_METHOD' => 1,
'AM_SET_CURRENT_AUTOMAKE_VERSION' => 1,
'AC_LIBLTDL_INSTALLABLE' => 1,
'jm_MAINTAINER_MODE' => 1,
'AC_LTDL_ENABLE_INSTALL' => 1,
'AC_LIBTOOL_SYS_DYNAMIC_LINKER' => 1,
'LT_PROG_GCJ' => 1,
'AM_INIT_AUTOMAKE' => 1,
'AC_DISABLE_STATIC' => 1,
'LT_PATH_NM' => 1,
'AM_MAINTAINER_MODE' => 1,
'AC_LTDL_SHLIBEXT' => 1,
'_LT_AC_LOCK' => 1,
'_LT_AC_LANG_RC_CONFIG' => 1,
'LT_SYS_MODULE_PATH' => 1,
'AC_LIBTOOL_POSTDEP_PREDEP' => 1,
'LT_WITH_LTDL' => 1,
'AC_LTDL_SHLIBPATH' => 1,
'AM_AUX_DIR_EXPAND' => 1,
'_LT_AC_LANG_F77_CONFIG' => 1,
'AC_LIBTOOL_PROG_COMPILER_NO_RTTI' => 1,
'_AM_SET_OPTIONS' => 1,
'_LT_COMPILER_OPTION' => 1,
'_AM_OUTPUT_DEPENDENCY_COMMANDS' => 1,
'AM_RUN_LOG' => 1,
'AC_LIBTOOL_SYS_OLD_ARCHIVE' => 1,
'AC_LTDL_SYS_DLOPEN_DEPLIBS' => 1,
'AC_LIBTOOL_PICMODE' => 1,
'LT_PATH_LD' => 1,
'AC_CHECK_LIBM' => 1,
'AC_LIBTOOL_SYS_LIB_STRIP' => 1,
'_AM_MANGLE_OPTION' => 1,
'AC_LTDL_SYMBOL_USCORE' => 1,
'AC_LIBTOOL_SYS_MAX_CMD_LEN' => 1,
'AM_SET_DEPDIR' => 1,
'_LT_CC_BASENAME' => 1,
'PKG_PROG_PKG_CONFIG' => 1,
'_LT_LIBOBJ' => 1
}
], 'Autom4te::Request' ),
bless( [
'1',
1,
[
'/usr/share/autoconf'
],
[
'/usr/share/autoconf/autoconf/autoconf.m4f',
'aclocal.m4',
'configure.ac'
],
{
'_LT_AC_TAGCONFIG' => 1,
'AM_PROG_F77_C_O' => 1,
'm4_pattern_forbid' => 1,
'AC_INIT' => 1,
'_AM_COND_IF' => 1,
'AC_CANONICAL_TARGET' => 1,
'AC_SUBST' => 1,
'AC_CONFIG_LIBOBJ_DIR' => 1,
'AC_FC_SRCEXT' => 1,
'AC_CANONICAL_HOST' => 1,
'AC_PROG_LIBTOOL' => 1,
'AM_INIT_AUTOMAKE' => 1,
'AC_CONFIG_SUBDIRS' => 1,
'AM_AUTOMAKE_VERSION' => 1,
'LT_CONFIG_LTDL_DIR' => 1,
'AC_REQUIRE_AUX_FILE' => 1,
'AC_CONFIG_LINKS' => 1,
'm4_sinclude' => 1,
'LT_SUPPORTED_TAG' => 1,
'AM_MAINTAINER_MODE' => 1,
'AM_GNU_GETTEXT_INTL_SUBDIR' => 1,
'_m4_warn' => 1,
'AM_PROG_CXX_C_O' => 1,
'_AM_COND_ENDIF' => 1,
'AM_ENABLE_MULTILIB' => 1,
'AM_SILENT_RULES' => 1,
'AC_CONFIG_FILES' => 1,
'LT_INIT' => 1,
'include' => 1,
'AM_GNU_GETTEXT' => 1,
'AC_LIBSOURCE' => 1,
'AM_PROG_FC_C_O' => 1,
'AC_CANONICAL_BUILD' => 1,
'AC_FC_FREEFORM' => 1,
'AH_OUTPUT' => 1,
'_AM_SUBST_NOTMAKE' => 1,
'AC_CONFIG_AUX_DIR' => 1,
'sinclude' => 1,
'm4_pattern_allow' => 1,
'AM_PROG_CC_C_O' => 1,
'AC_CANONICAL_SYSTEM' => 1,
'AM_CONDITIONAL' => 1,
'AC_CONFIG_HEADERS' => 1,
'AC_DEFINE_TRACE_LITERAL' => 1,
'm4_include' => 1,
'_AM_COND_ELSE' => 1,
'AC_SUBST_TRACE' => 1
}
], 'Autom4te::Request' )
);

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,658 @@
m4trace:configure.ac:1: -1- AC_INIT([Heimdall], [1.3], [bug-report@glassechidna.com.au], [heimdall], [http://www.glassechidna.com.au/])
m4trace:configure.ac:1: -1- m4_pattern_forbid([^_?A[CHUM]_])
m4trace:configure.ac:1: -1- m4_pattern_forbid([_AC_])
m4trace:configure.ac:1: -1- m4_pattern_forbid([^LIBOBJS$], [do not use LIBOBJS directly, use AC_LIBOBJ (see section `AC_LIBOBJ vs LIBOBJS'])
m4trace:configure.ac:1: -1- m4_pattern_allow([^AS_FLAGS$])
m4trace:configure.ac:1: -1- m4_pattern_forbid([^_?m4_])
m4trace:configure.ac:1: -1- m4_pattern_forbid([^dnl$])
m4trace:configure.ac:1: -1- m4_pattern_forbid([^_?AS_])
m4trace:configure.ac:1: -1- AC_SUBST([SHELL])
m4trace:configure.ac:1: -1- AC_SUBST_TRACE([SHELL])
m4trace:configure.ac:1: -1- m4_pattern_allow([^SHELL$])
m4trace:configure.ac:1: -1- AC_SUBST([PATH_SEPARATOR])
m4trace:configure.ac:1: -1- AC_SUBST_TRACE([PATH_SEPARATOR])
m4trace:configure.ac:1: -1- m4_pattern_allow([^PATH_SEPARATOR$])
m4trace:configure.ac:1: -1- AC_SUBST([PACKAGE_NAME], [m4_ifdef([AC_PACKAGE_NAME], ['AC_PACKAGE_NAME'])])
m4trace:configure.ac:1: -1- AC_SUBST_TRACE([PACKAGE_NAME])
m4trace:configure.ac:1: -1- m4_pattern_allow([^PACKAGE_NAME$])
m4trace:configure.ac:1: -1- AC_SUBST([PACKAGE_TARNAME], [m4_ifdef([AC_PACKAGE_TARNAME], ['AC_PACKAGE_TARNAME'])])
m4trace:configure.ac:1: -1- AC_SUBST_TRACE([PACKAGE_TARNAME])
m4trace:configure.ac:1: -1- m4_pattern_allow([^PACKAGE_TARNAME$])
m4trace:configure.ac:1: -1- AC_SUBST([PACKAGE_VERSION], [m4_ifdef([AC_PACKAGE_VERSION], ['AC_PACKAGE_VERSION'])])
m4trace:configure.ac:1: -1- AC_SUBST_TRACE([PACKAGE_VERSION])
m4trace:configure.ac:1: -1- m4_pattern_allow([^PACKAGE_VERSION$])
m4trace:configure.ac:1: -1- AC_SUBST([PACKAGE_STRING], [m4_ifdef([AC_PACKAGE_STRING], ['AC_PACKAGE_STRING'])])
m4trace:configure.ac:1: -1- AC_SUBST_TRACE([PACKAGE_STRING])
m4trace:configure.ac:1: -1- m4_pattern_allow([^PACKAGE_STRING$])
m4trace:configure.ac:1: -1- AC_SUBST([PACKAGE_BUGREPORT], [m4_ifdef([AC_PACKAGE_BUGREPORT], ['AC_PACKAGE_BUGREPORT'])])
m4trace:configure.ac:1: -1- AC_SUBST_TRACE([PACKAGE_BUGREPORT])
m4trace:configure.ac:1: -1- m4_pattern_allow([^PACKAGE_BUGREPORT$])
m4trace:configure.ac:1: -1- AC_SUBST([PACKAGE_URL], [m4_ifdef([AC_PACKAGE_URL], ['AC_PACKAGE_URL'])])
m4trace:configure.ac:1: -1- AC_SUBST_TRACE([PACKAGE_URL])
m4trace:configure.ac:1: -1- m4_pattern_allow([^PACKAGE_URL$])
m4trace:configure.ac:1: -1- AC_SUBST([exec_prefix], [NONE])
m4trace:configure.ac:1: -1- AC_SUBST_TRACE([exec_prefix])
m4trace:configure.ac:1: -1- m4_pattern_allow([^exec_prefix$])
m4trace:configure.ac:1: -1- AC_SUBST([prefix], [NONE])
m4trace:configure.ac:1: -1- AC_SUBST_TRACE([prefix])
m4trace:configure.ac:1: -1- m4_pattern_allow([^prefix$])
m4trace:configure.ac:1: -1- AC_SUBST([program_transform_name], [s,x,x,])
m4trace:configure.ac:1: -1- AC_SUBST_TRACE([program_transform_name])
m4trace:configure.ac:1: -1- m4_pattern_allow([^program_transform_name$])
m4trace:configure.ac:1: -1- AC_SUBST([bindir], ['${exec_prefix}/bin'])
m4trace:configure.ac:1: -1- AC_SUBST_TRACE([bindir])
m4trace:configure.ac:1: -1- m4_pattern_allow([^bindir$])
m4trace:configure.ac:1: -1- AC_SUBST([sbindir], ['${exec_prefix}/sbin'])
m4trace:configure.ac:1: -1- AC_SUBST_TRACE([sbindir])
m4trace:configure.ac:1: -1- m4_pattern_allow([^sbindir$])
m4trace:configure.ac:1: -1- AC_SUBST([libexecdir], ['${exec_prefix}/libexec'])
m4trace:configure.ac:1: -1- AC_SUBST_TRACE([libexecdir])
m4trace:configure.ac:1: -1- m4_pattern_allow([^libexecdir$])
m4trace:configure.ac:1: -1- AC_SUBST([datarootdir], ['${prefix}/share'])
m4trace:configure.ac:1: -1- AC_SUBST_TRACE([datarootdir])
m4trace:configure.ac:1: -1- m4_pattern_allow([^datarootdir$])
m4trace:configure.ac:1: -1- AC_SUBST([datadir], ['${datarootdir}'])
m4trace:configure.ac:1: -1- AC_SUBST_TRACE([datadir])
m4trace:configure.ac:1: -1- m4_pattern_allow([^datadir$])
m4trace:configure.ac:1: -1- AC_SUBST([sysconfdir], ['${prefix}/etc'])
m4trace:configure.ac:1: -1- AC_SUBST_TRACE([sysconfdir])
m4trace:configure.ac:1: -1- m4_pattern_allow([^sysconfdir$])
m4trace:configure.ac:1: -1- AC_SUBST([sharedstatedir], ['${prefix}/com'])
m4trace:configure.ac:1: -1- AC_SUBST_TRACE([sharedstatedir])
m4trace:configure.ac:1: -1- m4_pattern_allow([^sharedstatedir$])
m4trace:configure.ac:1: -1- AC_SUBST([localstatedir], ['${prefix}/var'])
m4trace:configure.ac:1: -1- AC_SUBST_TRACE([localstatedir])
m4trace:configure.ac:1: -1- m4_pattern_allow([^localstatedir$])
m4trace:configure.ac:1: -1- AC_SUBST([includedir], ['${prefix}/include'])
m4trace:configure.ac:1: -1- AC_SUBST_TRACE([includedir])
m4trace:configure.ac:1: -1- m4_pattern_allow([^includedir$])
m4trace:configure.ac:1: -1- AC_SUBST([oldincludedir], ['/usr/include'])
m4trace:configure.ac:1: -1- AC_SUBST_TRACE([oldincludedir])
m4trace:configure.ac:1: -1- m4_pattern_allow([^oldincludedir$])
m4trace:configure.ac:1: -1- AC_SUBST([docdir], [m4_ifset([AC_PACKAGE_TARNAME],
['${datarootdir}/doc/${PACKAGE_TARNAME}'],
['${datarootdir}/doc/${PACKAGE}'])])
m4trace:configure.ac:1: -1- AC_SUBST_TRACE([docdir])
m4trace:configure.ac:1: -1- m4_pattern_allow([^docdir$])
m4trace:configure.ac:1: -1- AC_SUBST([infodir], ['${datarootdir}/info'])
m4trace:configure.ac:1: -1- AC_SUBST_TRACE([infodir])
m4trace:configure.ac:1: -1- m4_pattern_allow([^infodir$])
m4trace:configure.ac:1: -1- AC_SUBST([htmldir], ['${docdir}'])
m4trace:configure.ac:1: -1- AC_SUBST_TRACE([htmldir])
m4trace:configure.ac:1: -1- m4_pattern_allow([^htmldir$])
m4trace:configure.ac:1: -1- AC_SUBST([dvidir], ['${docdir}'])
m4trace:configure.ac:1: -1- AC_SUBST_TRACE([dvidir])
m4trace:configure.ac:1: -1- m4_pattern_allow([^dvidir$])
m4trace:configure.ac:1: -1- AC_SUBST([pdfdir], ['${docdir}'])
m4trace:configure.ac:1: -1- AC_SUBST_TRACE([pdfdir])
m4trace:configure.ac:1: -1- m4_pattern_allow([^pdfdir$])
m4trace:configure.ac:1: -1- AC_SUBST([psdir], ['${docdir}'])
m4trace:configure.ac:1: -1- AC_SUBST_TRACE([psdir])
m4trace:configure.ac:1: -1- m4_pattern_allow([^psdir$])
m4trace:configure.ac:1: -1- AC_SUBST([libdir], ['${exec_prefix}/lib'])
m4trace:configure.ac:1: -1- AC_SUBST_TRACE([libdir])
m4trace:configure.ac:1: -1- m4_pattern_allow([^libdir$])
m4trace:configure.ac:1: -1- AC_SUBST([localedir], ['${datarootdir}/locale'])
m4trace:configure.ac:1: -1- AC_SUBST_TRACE([localedir])
m4trace:configure.ac:1: -1- m4_pattern_allow([^localedir$])
m4trace:configure.ac:1: -1- AC_SUBST([mandir], ['${datarootdir}/man'])
m4trace:configure.ac:1: -1- AC_SUBST_TRACE([mandir])
m4trace:configure.ac:1: -1- m4_pattern_allow([^mandir$])
m4trace:configure.ac:1: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_NAME])
m4trace:configure.ac:1: -1- m4_pattern_allow([^PACKAGE_NAME$])
m4trace:configure.ac:1: -1- AH_OUTPUT([PACKAGE_NAME], [/* Define to the full name of this package. */
@%:@undef PACKAGE_NAME])
m4trace:configure.ac:1: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_TARNAME])
m4trace:configure.ac:1: -1- m4_pattern_allow([^PACKAGE_TARNAME$])
m4trace:configure.ac:1: -1- AH_OUTPUT([PACKAGE_TARNAME], [/* Define to the one symbol short name of this package. */
@%:@undef PACKAGE_TARNAME])
m4trace:configure.ac:1: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_VERSION])
m4trace:configure.ac:1: -1- m4_pattern_allow([^PACKAGE_VERSION$])
m4trace:configure.ac:1: -1- AH_OUTPUT([PACKAGE_VERSION], [/* Define to the version of this package. */
@%:@undef PACKAGE_VERSION])
m4trace:configure.ac:1: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_STRING])
m4trace:configure.ac:1: -1- m4_pattern_allow([^PACKAGE_STRING$])
m4trace:configure.ac:1: -1- AH_OUTPUT([PACKAGE_STRING], [/* Define to the full name and version of this package. */
@%:@undef PACKAGE_STRING])
m4trace:configure.ac:1: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_BUGREPORT])
m4trace:configure.ac:1: -1- m4_pattern_allow([^PACKAGE_BUGREPORT$])
m4trace:configure.ac:1: -1- AH_OUTPUT([PACKAGE_BUGREPORT], [/* Define to the address where bug reports for this package should be sent. */
@%:@undef PACKAGE_BUGREPORT])
m4trace:configure.ac:1: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_URL])
m4trace:configure.ac:1: -1- m4_pattern_allow([^PACKAGE_URL$])
m4trace:configure.ac:1: -1- AH_OUTPUT([PACKAGE_URL], [/* Define to the home page for this package. */
@%:@undef PACKAGE_URL])
m4trace:configure.ac:1: -1- AC_SUBST([DEFS])
m4trace:configure.ac:1: -1- AC_SUBST_TRACE([DEFS])
m4trace:configure.ac:1: -1- m4_pattern_allow([^DEFS$])
m4trace:configure.ac:1: -1- AC_SUBST([ECHO_C])
m4trace:configure.ac:1: -1- AC_SUBST_TRACE([ECHO_C])
m4trace:configure.ac:1: -1- m4_pattern_allow([^ECHO_C$])
m4trace:configure.ac:1: -1- AC_SUBST([ECHO_N])
m4trace:configure.ac:1: -1- AC_SUBST_TRACE([ECHO_N])
m4trace:configure.ac:1: -1- m4_pattern_allow([^ECHO_N$])
m4trace:configure.ac:1: -1- AC_SUBST([ECHO_T])
m4trace:configure.ac:1: -1- AC_SUBST_TRACE([ECHO_T])
m4trace:configure.ac:1: -1- m4_pattern_allow([^ECHO_T$])
m4trace:configure.ac:1: -1- AC_SUBST([LIBS])
m4trace:configure.ac:1: -1- AC_SUBST_TRACE([LIBS])
m4trace:configure.ac:1: -1- m4_pattern_allow([^LIBS$])
m4trace:configure.ac:1: -1- AC_SUBST([build_alias])
m4trace:configure.ac:1: -1- AC_SUBST_TRACE([build_alias])
m4trace:configure.ac:1: -1- m4_pattern_allow([^build_alias$])
m4trace:configure.ac:1: -1- AC_SUBST([host_alias])
m4trace:configure.ac:1: -1- AC_SUBST_TRACE([host_alias])
m4trace:configure.ac:1: -1- m4_pattern_allow([^host_alias$])
m4trace:configure.ac:1: -1- AC_SUBST([target_alias])
m4trace:configure.ac:1: -1- AC_SUBST_TRACE([target_alias])
m4trace:configure.ac:1: -1- m4_pattern_allow([^target_alias$])
m4trace:configure.ac:3: -1- m4_pattern_forbid([^_?PKG_[A-Z_]+$])
m4trace:configure.ac:3: -1- m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
m4trace:configure.ac:3: -1- AC_SUBST([PKG_CONFIG])
m4trace:configure.ac:3: -1- AC_SUBST_TRACE([PKG_CONFIG])
m4trace:configure.ac:3: -1- m4_pattern_allow([^PKG_CONFIG$])
m4trace:configure.ac:3: -1- AC_SUBST([PKG_CONFIG_PATH])
m4trace:configure.ac:3: -1- AC_SUBST_TRACE([PKG_CONFIG_PATH])
m4trace:configure.ac:3: -1- m4_pattern_allow([^PKG_CONFIG_PATH$])
m4trace:configure.ac:3: -1- AC_SUBST([PKG_CONFIG_LIBDIR])
m4trace:configure.ac:3: -1- AC_SUBST_TRACE([PKG_CONFIG_LIBDIR])
m4trace:configure.ac:3: -1- m4_pattern_allow([^PKG_CONFIG_LIBDIR$])
m4trace:configure.ac:3: -1- AC_SUBST([PKG_CONFIG])
m4trace:configure.ac:3: -1- AC_SUBST_TRACE([PKG_CONFIG])
m4trace:configure.ac:3: -1- m4_pattern_allow([^PKG_CONFIG$])
m4trace:configure.ac:3: -1- AC_SUBST([DEPS_CFLAGS])
m4trace:configure.ac:3: -1- AC_SUBST_TRACE([DEPS_CFLAGS])
m4trace:configure.ac:3: -1- m4_pattern_allow([^DEPS_CFLAGS$])
m4trace:configure.ac:3: -1- AC_SUBST([DEPS_LIBS])
m4trace:configure.ac:3: -1- AC_SUBST_TRACE([DEPS_LIBS])
m4trace:configure.ac:3: -1- m4_pattern_allow([^DEPS_LIBS$])
m4trace:configure.ac:4: -1- _m4_warn([obsolete], [The macro `AC_PROGRAM_CHECK' is obsolete.
You should run autoupdate.], [../../lib/autoconf/oldnames.m4:41: AC_PROGRAM_CHECK is expanded from...
configure.ac:4: the top level])
m4trace:configure.ac:4: -1- AC_SUBST([udevadminstalled])
m4trace:configure.ac:4: -1- AC_SUBST_TRACE([udevadminstalled])
m4trace:configure.ac:4: -1- m4_pattern_allow([^udevadminstalled$])
m4trace:configure.ac:5: -1- AC_CANONICAL_TARGET
m4trace:configure.ac:5: -1- AC_CANONICAL_HOST
m4trace:configure.ac:5: -1- AC_CANONICAL_BUILD
m4trace:configure.ac:5: -1- AC_REQUIRE_AUX_FILE([config.sub])
m4trace:configure.ac:5: -1- AC_REQUIRE_AUX_FILE([config.guess])
m4trace:configure.ac:5: -1- AC_SUBST([build], [$ac_cv_build])
m4trace:configure.ac:5: -1- AC_SUBST_TRACE([build])
m4trace:configure.ac:5: -1- m4_pattern_allow([^build$])
m4trace:configure.ac:5: -1- AC_SUBST([build_cpu], [$[1]])
m4trace:configure.ac:5: -1- AC_SUBST_TRACE([build_cpu])
m4trace:configure.ac:5: -1- m4_pattern_allow([^build_cpu$])
m4trace:configure.ac:5: -1- AC_SUBST([build_vendor], [$[2]])
m4trace:configure.ac:5: -1- AC_SUBST_TRACE([build_vendor])
m4trace:configure.ac:5: -1- m4_pattern_allow([^build_vendor$])
m4trace:configure.ac:5: -1- AC_SUBST([build_os])
m4trace:configure.ac:5: -1- AC_SUBST_TRACE([build_os])
m4trace:configure.ac:5: -1- m4_pattern_allow([^build_os$])
m4trace:configure.ac:5: -1- AC_SUBST([host], [$ac_cv_host])
m4trace:configure.ac:5: -1- AC_SUBST_TRACE([host])
m4trace:configure.ac:5: -1- m4_pattern_allow([^host$])
m4trace:configure.ac:5: -1- AC_SUBST([host_cpu], [$[1]])
m4trace:configure.ac:5: -1- AC_SUBST_TRACE([host_cpu])
m4trace:configure.ac:5: -1- m4_pattern_allow([^host_cpu$])
m4trace:configure.ac:5: -1- AC_SUBST([host_vendor], [$[2]])
m4trace:configure.ac:5: -1- AC_SUBST_TRACE([host_vendor])
m4trace:configure.ac:5: -1- m4_pattern_allow([^host_vendor$])
m4trace:configure.ac:5: -1- AC_SUBST([host_os])
m4trace:configure.ac:5: -1- AC_SUBST_TRACE([host_os])
m4trace:configure.ac:5: -1- m4_pattern_allow([^host_os$])
m4trace:configure.ac:5: -1- AC_SUBST([target], [$ac_cv_target])
m4trace:configure.ac:5: -1- AC_SUBST_TRACE([target])
m4trace:configure.ac:5: -1- m4_pattern_allow([^target$])
m4trace:configure.ac:5: -1- AC_SUBST([target_cpu], [$[1]])
m4trace:configure.ac:5: -1- AC_SUBST_TRACE([target_cpu])
m4trace:configure.ac:5: -1- m4_pattern_allow([^target_cpu$])
m4trace:configure.ac:5: -1- AC_SUBST([target_vendor], [$[2]])
m4trace:configure.ac:5: -1- AC_SUBST_TRACE([target_vendor])
m4trace:configure.ac:5: -1- m4_pattern_allow([^target_vendor$])
m4trace:configure.ac:5: -1- AC_SUBST([target_os])
m4trace:configure.ac:5: -1- AC_SUBST_TRACE([target_os])
m4trace:configure.ac:5: -1- m4_pattern_allow([^target_os$])
m4trace:configure.ac:6: -1- AM_INIT_AUTOMAKE([1.10 -Wall no-define foreign])
m4trace:configure.ac:6: -1- m4_pattern_allow([^AM_[A-Z]+FLAGS$])
m4trace:configure.ac:6: -1- AM_AUTOMAKE_VERSION([1.11.1])
m4trace:configure.ac:6: -1- AC_REQUIRE_AUX_FILE([install-sh])
m4trace:configure.ac:6: -1- AC_SUBST([INSTALL_PROGRAM])
m4trace:configure.ac:6: -1- AC_SUBST_TRACE([INSTALL_PROGRAM])
m4trace:configure.ac:6: -1- m4_pattern_allow([^INSTALL_PROGRAM$])
m4trace:configure.ac:6: -1- AC_SUBST([INSTALL_SCRIPT])
m4trace:configure.ac:6: -1- AC_SUBST_TRACE([INSTALL_SCRIPT])
m4trace:configure.ac:6: -1- m4_pattern_allow([^INSTALL_SCRIPT$])
m4trace:configure.ac:6: -1- AC_SUBST([INSTALL_DATA])
m4trace:configure.ac:6: -1- AC_SUBST_TRACE([INSTALL_DATA])
m4trace:configure.ac:6: -1- m4_pattern_allow([^INSTALL_DATA$])
m4trace:configure.ac:6: -1- AC_SUBST([am__isrc], [' -I$(srcdir)'])
m4trace:configure.ac:6: -1- AC_SUBST_TRACE([am__isrc])
m4trace:configure.ac:6: -1- m4_pattern_allow([^am__isrc$])
m4trace:configure.ac:6: -1- _AM_SUBST_NOTMAKE([am__isrc])
m4trace:configure.ac:6: -1- AC_SUBST([CYGPATH_W])
m4trace:configure.ac:6: -1- AC_SUBST_TRACE([CYGPATH_W])
m4trace:configure.ac:6: -1- m4_pattern_allow([^CYGPATH_W$])
m4trace:configure.ac:6: -1- AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])
m4trace:configure.ac:6: -1- AC_SUBST_TRACE([PACKAGE])
m4trace:configure.ac:6: -1- m4_pattern_allow([^PACKAGE$])
m4trace:configure.ac:6: -1- AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])
m4trace:configure.ac:6: -1- AC_SUBST_TRACE([VERSION])
m4trace:configure.ac:6: -1- m4_pattern_allow([^VERSION$])
m4trace:configure.ac:6: -1- AC_REQUIRE_AUX_FILE([missing])
m4trace:configure.ac:6: -1- AC_SUBST([ACLOCAL])
m4trace:configure.ac:6: -1- AC_SUBST_TRACE([ACLOCAL])
m4trace:configure.ac:6: -1- m4_pattern_allow([^ACLOCAL$])
m4trace:configure.ac:6: -1- AC_SUBST([AUTOCONF])
m4trace:configure.ac:6: -1- AC_SUBST_TRACE([AUTOCONF])
m4trace:configure.ac:6: -1- m4_pattern_allow([^AUTOCONF$])
m4trace:configure.ac:6: -1- AC_SUBST([AUTOMAKE])
m4trace:configure.ac:6: -1- AC_SUBST_TRACE([AUTOMAKE])
m4trace:configure.ac:6: -1- m4_pattern_allow([^AUTOMAKE$])
m4trace:configure.ac:6: -1- AC_SUBST([AUTOHEADER])
m4trace:configure.ac:6: -1- AC_SUBST_TRACE([AUTOHEADER])
m4trace:configure.ac:6: -1- m4_pattern_allow([^AUTOHEADER$])
m4trace:configure.ac:6: -1- AC_SUBST([MAKEINFO])
m4trace:configure.ac:6: -1- AC_SUBST_TRACE([MAKEINFO])
m4trace:configure.ac:6: -1- m4_pattern_allow([^MAKEINFO$])
m4trace:configure.ac:6: -1- AC_SUBST([install_sh])
m4trace:configure.ac:6: -1- AC_SUBST_TRACE([install_sh])
m4trace:configure.ac:6: -1- m4_pattern_allow([^install_sh$])
m4trace:configure.ac:6: -1- AC_SUBST([STRIP])
m4trace:configure.ac:6: -1- AC_SUBST_TRACE([STRIP])
m4trace:configure.ac:6: -1- m4_pattern_allow([^STRIP$])
m4trace:configure.ac:6: -1- AC_SUBST([INSTALL_STRIP_PROGRAM])
m4trace:configure.ac:6: -1- AC_SUBST_TRACE([INSTALL_STRIP_PROGRAM])
m4trace:configure.ac:6: -1- m4_pattern_allow([^INSTALL_STRIP_PROGRAM$])
m4trace:configure.ac:6: -1- AC_REQUIRE_AUX_FILE([install-sh])
m4trace:configure.ac:6: -1- AC_SUBST([MKDIR_P])
m4trace:configure.ac:6: -1- AC_SUBST_TRACE([MKDIR_P])
m4trace:configure.ac:6: -1- m4_pattern_allow([^MKDIR_P$])
m4trace:configure.ac:6: -1- AC_SUBST([mkdir_p], ["$MKDIR_P"])
m4trace:configure.ac:6: -1- AC_SUBST_TRACE([mkdir_p])
m4trace:configure.ac:6: -1- m4_pattern_allow([^mkdir_p$])
m4trace:configure.ac:6: -1- AC_SUBST([AWK])
m4trace:configure.ac:6: -1- AC_SUBST_TRACE([AWK])
m4trace:configure.ac:6: -1- m4_pattern_allow([^AWK$])
m4trace:configure.ac:6: -1- AC_SUBST([SET_MAKE])
m4trace:configure.ac:6: -1- AC_SUBST_TRACE([SET_MAKE])
m4trace:configure.ac:6: -1- m4_pattern_allow([^SET_MAKE$])
m4trace:configure.ac:6: -1- AC_SUBST([am__leading_dot])
m4trace:configure.ac:6: -1- AC_SUBST_TRACE([am__leading_dot])
m4trace:configure.ac:6: -1- m4_pattern_allow([^am__leading_dot$])
m4trace:configure.ac:6: -1- AC_SUBST([AMTAR])
m4trace:configure.ac:6: -1- AC_SUBST_TRACE([AMTAR])
m4trace:configure.ac:6: -1- m4_pattern_allow([^AMTAR$])
m4trace:configure.ac:6: -1- AC_SUBST([am__tar])
m4trace:configure.ac:6: -1- AC_SUBST_TRACE([am__tar])
m4trace:configure.ac:6: -1- m4_pattern_allow([^am__tar$])
m4trace:configure.ac:6: -1- AC_SUBST([am__untar])
m4trace:configure.ac:6: -1- AC_SUBST_TRACE([am__untar])
m4trace:configure.ac:6: -1- m4_pattern_allow([^am__untar$])
m4trace:configure.ac:8: -1- AC_CONFIG_HEADERS([config.h])
m4trace:configure.ac:9: -1- AC_SUBST([CXX])
m4trace:configure.ac:9: -1- AC_SUBST_TRACE([CXX])
m4trace:configure.ac:9: -1- m4_pattern_allow([^CXX$])
m4trace:configure.ac:9: -1- AC_SUBST([CXXFLAGS])
m4trace:configure.ac:9: -1- AC_SUBST_TRACE([CXXFLAGS])
m4trace:configure.ac:9: -1- m4_pattern_allow([^CXXFLAGS$])
m4trace:configure.ac:9: -1- AC_SUBST([LDFLAGS])
m4trace:configure.ac:9: -1- AC_SUBST_TRACE([LDFLAGS])
m4trace:configure.ac:9: -1- m4_pattern_allow([^LDFLAGS$])
m4trace:configure.ac:9: -1- AC_SUBST([LIBS])
m4trace:configure.ac:9: -1- AC_SUBST_TRACE([LIBS])
m4trace:configure.ac:9: -1- m4_pattern_allow([^LIBS$])
m4trace:configure.ac:9: -1- AC_SUBST([CPPFLAGS])
m4trace:configure.ac:9: -1- AC_SUBST_TRACE([CPPFLAGS])
m4trace:configure.ac:9: -1- m4_pattern_allow([^CPPFLAGS$])
m4trace:configure.ac:9: -1- AC_SUBST([CXX])
m4trace:configure.ac:9: -1- AC_SUBST_TRACE([CXX])
m4trace:configure.ac:9: -1- m4_pattern_allow([^CXX$])
m4trace:configure.ac:9: -1- AC_SUBST([ac_ct_CXX])
m4trace:configure.ac:9: -1- AC_SUBST_TRACE([ac_ct_CXX])
m4trace:configure.ac:9: -1- m4_pattern_allow([^ac_ct_CXX$])
m4trace:configure.ac:9: -1- AC_SUBST([EXEEXT], [$ac_cv_exeext])
m4trace:configure.ac:9: -1- AC_SUBST_TRACE([EXEEXT])
m4trace:configure.ac:9: -1- m4_pattern_allow([^EXEEXT$])
m4trace:configure.ac:9: -1- AC_SUBST([OBJEXT], [$ac_cv_objext])
m4trace:configure.ac:9: -1- AC_SUBST_TRACE([OBJEXT])
m4trace:configure.ac:9: -1- m4_pattern_allow([^OBJEXT$])
m4trace:configure.ac:9: -1- AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])
m4trace:configure.ac:9: -1- AC_SUBST_TRACE([DEPDIR])
m4trace:configure.ac:9: -1- m4_pattern_allow([^DEPDIR$])
m4trace:configure.ac:9: -1- AC_SUBST([am__include])
m4trace:configure.ac:9: -1- AC_SUBST_TRACE([am__include])
m4trace:configure.ac:9: -1- m4_pattern_allow([^am__include$])
m4trace:configure.ac:9: -1- AC_SUBST([am__quote])
m4trace:configure.ac:9: -1- AC_SUBST_TRACE([am__quote])
m4trace:configure.ac:9: -1- m4_pattern_allow([^am__quote$])
m4trace:configure.ac:9: -1- AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
m4trace:configure.ac:9: -1- AC_SUBST([AMDEP_TRUE])
m4trace:configure.ac:9: -1- AC_SUBST_TRACE([AMDEP_TRUE])
m4trace:configure.ac:9: -1- m4_pattern_allow([^AMDEP_TRUE$])
m4trace:configure.ac:9: -1- AC_SUBST([AMDEP_FALSE])
m4trace:configure.ac:9: -1- AC_SUBST_TRACE([AMDEP_FALSE])
m4trace:configure.ac:9: -1- m4_pattern_allow([^AMDEP_FALSE$])
m4trace:configure.ac:9: -1- _AM_SUBST_NOTMAKE([AMDEP_TRUE])
m4trace:configure.ac:9: -1- _AM_SUBST_NOTMAKE([AMDEP_FALSE])
m4trace:configure.ac:9: -1- AC_SUBST([AMDEPBACKSLASH])
m4trace:configure.ac:9: -1- AC_SUBST_TRACE([AMDEPBACKSLASH])
m4trace:configure.ac:9: -1- m4_pattern_allow([^AMDEPBACKSLASH$])
m4trace:configure.ac:9: -1- _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])
m4trace:configure.ac:9: -1- AC_SUBST([CXXDEPMODE], [depmode=$am_cv_CXX_dependencies_compiler_type])
m4trace:configure.ac:9: -1- AC_SUBST_TRACE([CXXDEPMODE])
m4trace:configure.ac:9: -1- m4_pattern_allow([^CXXDEPMODE$])
m4trace:configure.ac:9: -1- AM_CONDITIONAL([am__fastdepCXX], [
test "x$enable_dependency_tracking" != xno \
&& test "$am_cv_CXX_dependencies_compiler_type" = gcc3])
m4trace:configure.ac:9: -1- AC_SUBST([am__fastdepCXX_TRUE])
m4trace:configure.ac:9: -1- AC_SUBST_TRACE([am__fastdepCXX_TRUE])
m4trace:configure.ac:9: -1- m4_pattern_allow([^am__fastdepCXX_TRUE$])
m4trace:configure.ac:9: -1- AC_SUBST([am__fastdepCXX_FALSE])
m4trace:configure.ac:9: -1- AC_SUBST_TRACE([am__fastdepCXX_FALSE])
m4trace:configure.ac:9: -1- m4_pattern_allow([^am__fastdepCXX_FALSE$])
m4trace:configure.ac:9: -1- _AM_SUBST_NOTMAKE([am__fastdepCXX_TRUE])
m4trace:configure.ac:9: -1- _AM_SUBST_NOTMAKE([am__fastdepCXX_FALSE])
m4trace:configure.ac:10: -1- AC_PROG_LIBTOOL
m4trace:configure.ac:10: -1- _m4_warn([obsolete], [The macro `AC_PROG_LIBTOOL' is obsolete.
You should run autoupdate.], [aclocal.m4:123: AC_PROG_LIBTOOL is expanded from...
configure.ac:10: the top level])
m4trace:configure.ac:10: -1- LT_INIT
m4trace:configure.ac:10: -1- m4_pattern_forbid([^_?LT_[A-Z_]+$])
m4trace:configure.ac:10: -1- m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])
m4trace:configure.ac:10: -1- AC_REQUIRE_AUX_FILE([ltmain.sh])
m4trace:configure.ac:10: -1- AC_SUBST([LIBTOOL])
m4trace:configure.ac:10: -1- AC_SUBST_TRACE([LIBTOOL])
m4trace:configure.ac:10: -1- m4_pattern_allow([^LIBTOOL$])
m4trace:configure.ac:10: -1- AC_SUBST([CC])
m4trace:configure.ac:10: -1- AC_SUBST_TRACE([CC])
m4trace:configure.ac:10: -1- m4_pattern_allow([^CC$])
m4trace:configure.ac:10: -1- AC_SUBST([CFLAGS])
m4trace:configure.ac:10: -1- AC_SUBST_TRACE([CFLAGS])
m4trace:configure.ac:10: -1- m4_pattern_allow([^CFLAGS$])
m4trace:configure.ac:10: -1- AC_SUBST([LDFLAGS])
m4trace:configure.ac:10: -1- AC_SUBST_TRACE([LDFLAGS])
m4trace:configure.ac:10: -1- m4_pattern_allow([^LDFLAGS$])
m4trace:configure.ac:10: -1- AC_SUBST([LIBS])
m4trace:configure.ac:10: -1- AC_SUBST_TRACE([LIBS])
m4trace:configure.ac:10: -1- m4_pattern_allow([^LIBS$])
m4trace:configure.ac:10: -1- AC_SUBST([CPPFLAGS])
m4trace:configure.ac:10: -1- AC_SUBST_TRACE([CPPFLAGS])
m4trace:configure.ac:10: -1- m4_pattern_allow([^CPPFLAGS$])
m4trace:configure.ac:10: -1- AC_SUBST([CC])
m4trace:configure.ac:10: -1- AC_SUBST_TRACE([CC])
m4trace:configure.ac:10: -1- m4_pattern_allow([^CC$])
m4trace:configure.ac:10: -1- AC_SUBST([CC])
m4trace:configure.ac:10: -1- AC_SUBST_TRACE([CC])
m4trace:configure.ac:10: -1- m4_pattern_allow([^CC$])
m4trace:configure.ac:10: -1- AC_SUBST([CC])
m4trace:configure.ac:10: -1- AC_SUBST_TRACE([CC])
m4trace:configure.ac:10: -1- m4_pattern_allow([^CC$])
m4trace:configure.ac:10: -1- AC_SUBST([CC])
m4trace:configure.ac:10: -1- AC_SUBST_TRACE([CC])
m4trace:configure.ac:10: -1- m4_pattern_allow([^CC$])
m4trace:configure.ac:10: -1- AC_SUBST([ac_ct_CC])
m4trace:configure.ac:10: -1- AC_SUBST_TRACE([ac_ct_CC])
m4trace:configure.ac:10: -1- m4_pattern_allow([^ac_ct_CC$])
m4trace:configure.ac:10: -1- AC_SUBST([CCDEPMODE], [depmode=$am_cv_CC_dependencies_compiler_type])
m4trace:configure.ac:10: -1- AC_SUBST_TRACE([CCDEPMODE])
m4trace:configure.ac:10: -1- m4_pattern_allow([^CCDEPMODE$])
m4trace:configure.ac:10: -1- AM_CONDITIONAL([am__fastdepCC], [
test "x$enable_dependency_tracking" != xno \
&& test "$am_cv_CC_dependencies_compiler_type" = gcc3])
m4trace:configure.ac:10: -1- AC_SUBST([am__fastdepCC_TRUE])
m4trace:configure.ac:10: -1- AC_SUBST_TRACE([am__fastdepCC_TRUE])
m4trace:configure.ac:10: -1- m4_pattern_allow([^am__fastdepCC_TRUE$])
m4trace:configure.ac:10: -1- AC_SUBST([am__fastdepCC_FALSE])
m4trace:configure.ac:10: -1- AC_SUBST_TRACE([am__fastdepCC_FALSE])
m4trace:configure.ac:10: -1- m4_pattern_allow([^am__fastdepCC_FALSE$])
m4trace:configure.ac:10: -1- _AM_SUBST_NOTMAKE([am__fastdepCC_TRUE])
m4trace:configure.ac:10: -1- _AM_SUBST_NOTMAKE([am__fastdepCC_FALSE])
m4trace:configure.ac:10: -1- AC_SUBST([SED])
m4trace:configure.ac:10: -1- AC_SUBST_TRACE([SED])
m4trace:configure.ac:10: -1- m4_pattern_allow([^SED$])
m4trace:configure.ac:10: -1- AC_SUBST([GREP])
m4trace:configure.ac:10: -1- AC_SUBST_TRACE([GREP])
m4trace:configure.ac:10: -1- m4_pattern_allow([^GREP$])
m4trace:configure.ac:10: -1- AC_SUBST([EGREP])
m4trace:configure.ac:10: -1- AC_SUBST_TRACE([EGREP])
m4trace:configure.ac:10: -1- m4_pattern_allow([^EGREP$])
m4trace:configure.ac:10: -1- AC_SUBST([FGREP])
m4trace:configure.ac:10: -1- AC_SUBST_TRACE([FGREP])
m4trace:configure.ac:10: -1- m4_pattern_allow([^FGREP$])
m4trace:configure.ac:10: -1- AC_SUBST([GREP])
m4trace:configure.ac:10: -1- AC_SUBST_TRACE([GREP])
m4trace:configure.ac:10: -1- m4_pattern_allow([^GREP$])
m4trace:configure.ac:10: -1- AC_SUBST([LD])
m4trace:configure.ac:10: -1- AC_SUBST_TRACE([LD])
m4trace:configure.ac:10: -1- m4_pattern_allow([^LD$])
m4trace:configure.ac:10: -1- AC_SUBST([DUMPBIN])
m4trace:configure.ac:10: -1- AC_SUBST_TRACE([DUMPBIN])
m4trace:configure.ac:10: -1- m4_pattern_allow([^DUMPBIN$])
m4trace:configure.ac:10: -1- AC_SUBST([ac_ct_DUMPBIN])
m4trace:configure.ac:10: -1- AC_SUBST_TRACE([ac_ct_DUMPBIN])
m4trace:configure.ac:10: -1- m4_pattern_allow([^ac_ct_DUMPBIN$])
m4trace:configure.ac:10: -1- AC_SUBST([DUMPBIN])
m4trace:configure.ac:10: -1- AC_SUBST_TRACE([DUMPBIN])
m4trace:configure.ac:10: -1- m4_pattern_allow([^DUMPBIN$])
m4trace:configure.ac:10: -1- AC_SUBST([NM])
m4trace:configure.ac:10: -1- AC_SUBST_TRACE([NM])
m4trace:configure.ac:10: -1- m4_pattern_allow([^NM$])
m4trace:configure.ac:10: -1- AC_SUBST([LN_S], [$as_ln_s])
m4trace:configure.ac:10: -1- AC_SUBST_TRACE([LN_S])
m4trace:configure.ac:10: -1- m4_pattern_allow([^LN_S$])
m4trace:configure.ac:10: -1- AC_SUBST([OBJDUMP])
m4trace:configure.ac:10: -1- AC_SUBST_TRACE([OBJDUMP])
m4trace:configure.ac:10: -1- m4_pattern_allow([^OBJDUMP$])
m4trace:configure.ac:10: -1- AC_SUBST([OBJDUMP])
m4trace:configure.ac:10: -1- AC_SUBST_TRACE([OBJDUMP])
m4trace:configure.ac:10: -1- m4_pattern_allow([^OBJDUMP$])
m4trace:configure.ac:10: -1- AC_SUBST([AR])
m4trace:configure.ac:10: -1- AC_SUBST_TRACE([AR])
m4trace:configure.ac:10: -1- m4_pattern_allow([^AR$])
m4trace:configure.ac:10: -1- AC_SUBST([STRIP])
m4trace:configure.ac:10: -1- AC_SUBST_TRACE([STRIP])
m4trace:configure.ac:10: -1- m4_pattern_allow([^STRIP$])
m4trace:configure.ac:10: -1- AC_SUBST([RANLIB])
m4trace:configure.ac:10: -1- AC_SUBST_TRACE([RANLIB])
m4trace:configure.ac:10: -1- m4_pattern_allow([^RANLIB$])
m4trace:configure.ac:10: -1- m4_pattern_allow([LT_OBJDIR])
m4trace:configure.ac:10: -1- AC_DEFINE_TRACE_LITERAL([LT_OBJDIR])
m4trace:configure.ac:10: -1- m4_pattern_allow([^LT_OBJDIR$])
m4trace:configure.ac:10: -1- AH_OUTPUT([LT_OBJDIR], [/* Define to the sub-directory in which libtool stores uninstalled libraries.
*/
@%:@undef LT_OBJDIR])
m4trace:configure.ac:10: -1- AC_SUBST([lt_ECHO])
m4trace:configure.ac:10: -1- AC_SUBST_TRACE([lt_ECHO])
m4trace:configure.ac:10: -1- m4_pattern_allow([^lt_ECHO$])
m4trace:configure.ac:10: -1- LT_SUPPORTED_TAG([CC])
m4trace:configure.ac:10: -1- AC_SUBST([DSYMUTIL])
m4trace:configure.ac:10: -1- AC_SUBST_TRACE([DSYMUTIL])
m4trace:configure.ac:10: -1- m4_pattern_allow([^DSYMUTIL$])
m4trace:configure.ac:10: -1- AC_SUBST([NMEDIT])
m4trace:configure.ac:10: -1- AC_SUBST_TRACE([NMEDIT])
m4trace:configure.ac:10: -1- m4_pattern_allow([^NMEDIT$])
m4trace:configure.ac:10: -1- AC_SUBST([LIPO])
m4trace:configure.ac:10: -1- AC_SUBST_TRACE([LIPO])
m4trace:configure.ac:10: -1- m4_pattern_allow([^LIPO$])
m4trace:configure.ac:10: -1- AC_SUBST([OTOOL])
m4trace:configure.ac:10: -1- AC_SUBST_TRACE([OTOOL])
m4trace:configure.ac:10: -1- m4_pattern_allow([^OTOOL$])
m4trace:configure.ac:10: -1- AC_SUBST([OTOOL64])
m4trace:configure.ac:10: -1- AC_SUBST_TRACE([OTOOL64])
m4trace:configure.ac:10: -1- m4_pattern_allow([^OTOOL64$])
m4trace:configure.ac:10: -1- AH_OUTPUT([HAVE_DLFCN_H], [/* Define to 1 if you have the <dlfcn.h> header file. */
@%:@undef HAVE_DLFCN_H])
m4trace:configure.ac:10: -1- AC_SUBST([CPP])
m4trace:configure.ac:10: -1- AC_SUBST_TRACE([CPP])
m4trace:configure.ac:10: -1- m4_pattern_allow([^CPP$])
m4trace:configure.ac:10: -1- AC_SUBST([CPPFLAGS])
m4trace:configure.ac:10: -1- AC_SUBST_TRACE([CPPFLAGS])
m4trace:configure.ac:10: -1- m4_pattern_allow([^CPPFLAGS$])
m4trace:configure.ac:10: -1- AC_SUBST([CPP])
m4trace:configure.ac:10: -1- AC_SUBST_TRACE([CPP])
m4trace:configure.ac:10: -1- m4_pattern_allow([^CPP$])
m4trace:configure.ac:10: -1- AC_DEFINE_TRACE_LITERAL([STDC_HEADERS])
m4trace:configure.ac:10: -1- m4_pattern_allow([^STDC_HEADERS$])
m4trace:configure.ac:10: -1- AH_OUTPUT([STDC_HEADERS], [/* Define to 1 if you have the ANSI C header files. */
@%:@undef STDC_HEADERS])
m4trace:configure.ac:10: -1- AH_OUTPUT([HAVE_SYS_TYPES_H], [/* Define to 1 if you have the <sys/types.h> header file. */
@%:@undef HAVE_SYS_TYPES_H])
m4trace:configure.ac:10: -1- AH_OUTPUT([HAVE_SYS_STAT_H], [/* Define to 1 if you have the <sys/stat.h> header file. */
@%:@undef HAVE_SYS_STAT_H])
m4trace:configure.ac:10: -1- AH_OUTPUT([HAVE_STDLIB_H], [/* Define to 1 if you have the <stdlib.h> header file. */
@%:@undef HAVE_STDLIB_H])
m4trace:configure.ac:10: -1- AH_OUTPUT([HAVE_STRING_H], [/* Define to 1 if you have the <string.h> header file. */
@%:@undef HAVE_STRING_H])
m4trace:configure.ac:10: -1- AH_OUTPUT([HAVE_MEMORY_H], [/* Define to 1 if you have the <memory.h> header file. */
@%:@undef HAVE_MEMORY_H])
m4trace:configure.ac:10: -1- AH_OUTPUT([HAVE_STRINGS_H], [/* Define to 1 if you have the <strings.h> header file. */
@%:@undef HAVE_STRINGS_H])
m4trace:configure.ac:10: -1- AH_OUTPUT([HAVE_INTTYPES_H], [/* Define to 1 if you have the <inttypes.h> header file. */
@%:@undef HAVE_INTTYPES_H])
m4trace:configure.ac:10: -1- AH_OUTPUT([HAVE_STDINT_H], [/* Define to 1 if you have the <stdint.h> header file. */
@%:@undef HAVE_STDINT_H])
m4trace:configure.ac:10: -1- AH_OUTPUT([HAVE_UNISTD_H], [/* Define to 1 if you have the <unistd.h> header file. */
@%:@undef HAVE_UNISTD_H])
m4trace:configure.ac:10: -1- AC_DEFINE_TRACE_LITERAL([HAVE_DLFCN_H])
m4trace:configure.ac:10: -1- m4_pattern_allow([^HAVE_DLFCN_H$])
m4trace:configure.ac:10: -1- LT_SUPPORTED_TAG([CXX])
m4trace:configure.ac:10: -1- AC_SUBST([CXX])
m4trace:configure.ac:10: -1- AC_SUBST_TRACE([CXX])
m4trace:configure.ac:10: -1- m4_pattern_allow([^CXX$])
m4trace:configure.ac:10: -1- AC_SUBST([CXXFLAGS])
m4trace:configure.ac:10: -1- AC_SUBST_TRACE([CXXFLAGS])
m4trace:configure.ac:10: -1- m4_pattern_allow([^CXXFLAGS$])
m4trace:configure.ac:10: -1- AC_SUBST([LDFLAGS])
m4trace:configure.ac:10: -1- AC_SUBST_TRACE([LDFLAGS])
m4trace:configure.ac:10: -1- m4_pattern_allow([^LDFLAGS$])
m4trace:configure.ac:10: -1- AC_SUBST([LIBS])
m4trace:configure.ac:10: -1- AC_SUBST_TRACE([LIBS])
m4trace:configure.ac:10: -1- m4_pattern_allow([^LIBS$])
m4trace:configure.ac:10: -1- AC_SUBST([CPPFLAGS])
m4trace:configure.ac:10: -1- AC_SUBST_TRACE([CPPFLAGS])
m4trace:configure.ac:10: -1- m4_pattern_allow([^CPPFLAGS$])
m4trace:configure.ac:10: -1- AC_SUBST([CXX])
m4trace:configure.ac:10: -1- AC_SUBST_TRACE([CXX])
m4trace:configure.ac:10: -1- m4_pattern_allow([^CXX$])
m4trace:configure.ac:10: -1- AC_SUBST([ac_ct_CXX])
m4trace:configure.ac:10: -1- AC_SUBST_TRACE([ac_ct_CXX])
m4trace:configure.ac:10: -1- m4_pattern_allow([^ac_ct_CXX$])
m4trace:configure.ac:10: -1- AC_SUBST([CXXDEPMODE], [depmode=$am_cv_CXX_dependencies_compiler_type])
m4trace:configure.ac:10: -1- AC_SUBST_TRACE([CXXDEPMODE])
m4trace:configure.ac:10: -1- m4_pattern_allow([^CXXDEPMODE$])
m4trace:configure.ac:10: -1- AM_CONDITIONAL([am__fastdepCXX], [
test "x$enable_dependency_tracking" != xno \
&& test "$am_cv_CXX_dependencies_compiler_type" = gcc3])
m4trace:configure.ac:10: -1- AC_SUBST([am__fastdepCXX_TRUE])
m4trace:configure.ac:10: -1- AC_SUBST_TRACE([am__fastdepCXX_TRUE])
m4trace:configure.ac:10: -1- m4_pattern_allow([^am__fastdepCXX_TRUE$])
m4trace:configure.ac:10: -1- AC_SUBST([am__fastdepCXX_FALSE])
m4trace:configure.ac:10: -1- AC_SUBST_TRACE([am__fastdepCXX_FALSE])
m4trace:configure.ac:10: -1- m4_pattern_allow([^am__fastdepCXX_FALSE$])
m4trace:configure.ac:10: -1- _AM_SUBST_NOTMAKE([am__fastdepCXX_TRUE])
m4trace:configure.ac:10: -1- _AM_SUBST_NOTMAKE([am__fastdepCXX_FALSE])
m4trace:configure.ac:10: -1- AC_SUBST([CXXCPP])
m4trace:configure.ac:10: -1- AC_SUBST_TRACE([CXXCPP])
m4trace:configure.ac:10: -1- m4_pattern_allow([^CXXCPP$])
m4trace:configure.ac:10: -1- AC_SUBST([CPPFLAGS])
m4trace:configure.ac:10: -1- AC_SUBST_TRACE([CPPFLAGS])
m4trace:configure.ac:10: -1- m4_pattern_allow([^CPPFLAGS$])
m4trace:configure.ac:10: -1- AC_SUBST([CXXCPP])
m4trace:configure.ac:10: -1- AC_SUBST_TRACE([CXXCPP])
m4trace:configure.ac:10: -1- m4_pattern_allow([^CXXCPP$])
m4trace:configure.ac:10: -1- AC_SUBST([LD])
m4trace:configure.ac:10: -1- AC_SUBST_TRACE([LD])
m4trace:configure.ac:10: -1- m4_pattern_allow([^LD$])
m4trace:configure.ac:11: -1- AC_CONFIG_FILES([Makefile])
m4trace:configure.ac:13: -1- AM_MAINTAINER_MODE
m4trace:configure.ac:13: -1- AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
m4trace:configure.ac:13: -1- AC_SUBST([MAINTAINER_MODE_TRUE])
m4trace:configure.ac:13: -1- AC_SUBST_TRACE([MAINTAINER_MODE_TRUE])
m4trace:configure.ac:13: -1- m4_pattern_allow([^MAINTAINER_MODE_TRUE$])
m4trace:configure.ac:13: -1- AC_SUBST([MAINTAINER_MODE_FALSE])
m4trace:configure.ac:13: -1- AC_SUBST_TRACE([MAINTAINER_MODE_FALSE])
m4trace:configure.ac:13: -1- m4_pattern_allow([^MAINTAINER_MODE_FALSE$])
m4trace:configure.ac:13: -1- _AM_SUBST_NOTMAKE([MAINTAINER_MODE_TRUE])
m4trace:configure.ac:13: -1- _AM_SUBST_NOTMAKE([MAINTAINER_MODE_FALSE])
m4trace:configure.ac:13: -1- AC_SUBST([MAINT])
m4trace:configure.ac:13: -1- AC_SUBST_TRACE([MAINT])
m4trace:configure.ac:13: -1- m4_pattern_allow([^MAINT$])
m4trace:configure.ac:18: -1- AC_DEFINE_TRACE_LITERAL([OS_LINUX])
m4trace:configure.ac:18: -1- m4_pattern_allow([^OS_LINUX$])
m4trace:configure.ac:18: -1- AH_OUTPUT([OS_LINUX], [/* Linux backend */
@%:@undef OS_LINUX])
m4trace:configure.ac:23: -1- AC_DEFINE_TRACE_LITERAL([OS_DARWIN])
m4trace:configure.ac:23: -1- m4_pattern_allow([^OS_DARWIN$])
m4trace:configure.ac:23: -1- AH_OUTPUT([OS_DARWIN], [/* Darwin backend */
@%:@undef OS_DARWIN])
m4trace:configure.ac:28: -1- AC_DEFINE_TRACE_LITERAL([OS_WINDOWS])
m4trace:configure.ac:28: -1- m4_pattern_allow([^OS_WINDOWS$])
m4trace:configure.ac:28: -1- AH_OUTPUT([OS_WINDOWS], [/* Windows backend */
@%:@undef OS_WINDOWS])
m4trace:configure.ac:33: -1- AC_DEFINE_TRACE_LITERAL([OS_WINDOWS])
m4trace:configure.ac:33: -1- m4_pattern_allow([^OS_WINDOWS$])
m4trace:configure.ac:33: -1- AH_OUTPUT([OS_WINDOWS], [/* Windows backend */
@%:@undef OS_WINDOWS])
m4trace:configure.ac:41: -1- AM_CONDITIONAL([LINUXTARGET], [test x$linuxtarget = xtrue])
m4trace:configure.ac:41: -1- AC_SUBST([LINUXTARGET_TRUE])
m4trace:configure.ac:41: -1- AC_SUBST_TRACE([LINUXTARGET_TRUE])
m4trace:configure.ac:41: -1- m4_pattern_allow([^LINUXTARGET_TRUE$])
m4trace:configure.ac:41: -1- AC_SUBST([LINUXTARGET_FALSE])
m4trace:configure.ac:41: -1- AC_SUBST_TRACE([LINUXTARGET_FALSE])
m4trace:configure.ac:41: -1- m4_pattern_allow([^LINUXTARGET_FALSE$])
m4trace:configure.ac:41: -1- _AM_SUBST_NOTMAKE([LINUXTARGET_TRUE])
m4trace:configure.ac:41: -1- _AM_SUBST_NOTMAKE([LINUXTARGET_FALSE])
m4trace:configure.ac:42: -1- AM_CONDITIONAL([UDEVADM], [test x$udevadmninstalled = xtrue])
m4trace:configure.ac:42: -1- AC_SUBST([UDEVADM_TRUE])
m4trace:configure.ac:42: -1- AC_SUBST_TRACE([UDEVADM_TRUE])
m4trace:configure.ac:42: -1- m4_pattern_allow([^UDEVADM_TRUE$])
m4trace:configure.ac:42: -1- AC_SUBST([UDEVADM_FALSE])
m4trace:configure.ac:42: -1- AC_SUBST_TRACE([UDEVADM_FALSE])
m4trace:configure.ac:42: -1- m4_pattern_allow([^UDEVADM_FALSE$])
m4trace:configure.ac:42: -1- _AM_SUBST_NOTMAKE([UDEVADM_TRUE])
m4trace:configure.ac:42: -1- _AM_SUBST_NOTMAKE([UDEVADM_FALSE])
m4trace:configure.ac:44: -1- AH_OUTPUT([WORDS_BIGENDIAN], [/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
significant byte first (like Motorola and SPARC, unlike Intel). */
#if defined AC_APPLE_UNIVERSAL_BUILD
# if defined __BIG_ENDIAN__
# define WORDS_BIGENDIAN 1
# endif
#else
# ifndef WORDS_BIGENDIAN
# undef WORDS_BIGENDIAN
# endif
#endif])
m4trace:configure.ac:44: -1- AC_DEFINE_TRACE_LITERAL([WORDS_BIGENDIAN])
m4trace:configure.ac:44: -1- m4_pattern_allow([^WORDS_BIGENDIAN$])
m4trace:configure.ac:44: -1- AC_DEFINE_TRACE_LITERAL([AC_APPLE_UNIVERSAL_BUILD])
m4trace:configure.ac:44: -1- m4_pattern_allow([^AC_APPLE_UNIVERSAL_BUILD$])
m4trace:configure.ac:44: -1- AH_OUTPUT([AC_APPLE_UNIVERSAL_BUILD], [/* Define if building universal (internal helper macro) */
@%:@undef AC_APPLE_UNIVERSAL_BUILD])
m4trace:configure.ac:46: -1- AC_SUBST([LIB@&t@OBJS], [$ac_libobjs])
m4trace:configure.ac:46: -1- AC_SUBST_TRACE([LIB@&t@OBJS])
m4trace:configure.ac:46: -1- m4_pattern_allow([^LIB@&t@OBJS$])
m4trace:configure.ac:46: -1- AC_SUBST([LTLIBOBJS], [$ac_ltlibobjs])
m4trace:configure.ac:46: -1- AC_SUBST_TRACE([LTLIBOBJS])
m4trace:configure.ac:46: -1- m4_pattern_allow([^LTLIBOBJS$])
m4trace:configure.ac:46: -1- AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])
m4trace:configure.ac:46: -1- AC_SUBST([am__EXEEXT_TRUE])
m4trace:configure.ac:46: -1- AC_SUBST_TRACE([am__EXEEXT_TRUE])
m4trace:configure.ac:46: -1- m4_pattern_allow([^am__EXEEXT_TRUE$])
m4trace:configure.ac:46: -1- AC_SUBST([am__EXEEXT_FALSE])
m4trace:configure.ac:46: -1- AC_SUBST_TRACE([am__EXEEXT_FALSE])
m4trace:configure.ac:46: -1- m4_pattern_allow([^am__EXEEXT_FALSE$])
m4trace:configure.ac:46: -1- _AM_SUBST_NOTMAKE([am__EXEEXT_TRUE])
m4trace:configure.ac:46: -1- _AM_SUBST_NOTMAKE([am__EXEEXT_FALSE])
m4trace:configure.ac:46: -1- AC_SUBST_TRACE([top_builddir])
m4trace:configure.ac:46: -1- AC_SUBST_TRACE([top_build_prefix])
m4trace:configure.ac:46: -1- AC_SUBST_TRACE([srcdir])
m4trace:configure.ac:46: -1- AC_SUBST_TRACE([abs_srcdir])
m4trace:configure.ac:46: -1- AC_SUBST_TRACE([top_srcdir])
m4trace:configure.ac:46: -1- AC_SUBST_TRACE([abs_top_srcdir])
m4trace:configure.ac:46: -1- AC_SUBST_TRACE([builddir])
m4trace:configure.ac:46: -1- AC_SUBST_TRACE([abs_builddir])
m4trace:configure.ac:46: -1- AC_SUBST_TRACE([abs_top_builddir])
m4trace:configure.ac:46: -1- AC_SUBST_TRACE([INSTALL])
m4trace:configure.ac:46: -1- AC_SUBST_TRACE([MKDIR_P])
m4trace:configure.ac:46: -1- AC_REQUIRE_AUX_FILE([ltmain.sh])

1502
heimdall/config.guess vendored Executable file

File diff suppressed because it is too large Load Diff

80
heimdall/config.h.in Normal file
View File

@ -0,0 +1,80 @@
/* config.h.in. Generated from configure.ac by autoheader. */
/* Define if building universal (internal helper macro) */
#undef AC_APPLE_UNIVERSAL_BUILD
/* Define to 1 if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
/* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H
/* Define to 1 if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H
/* Define to 1 if you have the <strings.h> header file. */
#undef HAVE_STRINGS_H
/* Define to 1 if you have the <string.h> header file. */
#undef HAVE_STRING_H
/* Define to 1 if you have the <sys/stat.h> header file. */
#undef HAVE_SYS_STAT_H
/* Define to 1 if you have the <sys/types.h> header file. */
#undef HAVE_SYS_TYPES_H
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
/* Define to the sub-directory in which libtool stores uninstalled libraries.
*/
#undef LT_OBJDIR
/* Darwin backend */
#undef OS_DARWIN
/* Linux backend */
#undef OS_LINUX
/* Windows backend */
#undef OS_WINDOWS
/* Define to the address where bug reports for this package should be sent. */
#undef PACKAGE_BUGREPORT
/* Define to the full name of this package. */
#undef PACKAGE_NAME
/* Define to the full name and version of this package. */
#undef PACKAGE_STRING
/* Define to the one symbol short name of this package. */
#undef PACKAGE_TARNAME
/* Define to the home page for this package. */
#undef PACKAGE_URL
/* Define to the version of this package. */
#undef PACKAGE_VERSION
/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS
/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
significant byte first (like Motorola and SPARC, unlike Intel). */
#if defined AC_APPLE_UNIVERSAL_BUILD
# if defined __BIG_ENDIAN__
# define WORDS_BIGENDIAN 1
# endif
#else
# ifndef WORDS_BIGENDIAN
# undef WORDS_BIGENDIAN
# endif
#endif

80
heimdall/config.h.in~ Normal file
View File

@ -0,0 +1,80 @@
/* config.h.in. Generated from configure.ac by autoheader. */
/* Define if building universal (internal helper macro) */
#undef AC_APPLE_UNIVERSAL_BUILD
/* Define to 1 if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
/* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H
/* Define to 1 if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H
/* Define to 1 if you have the <strings.h> header file. */
#undef HAVE_STRINGS_H
/* Define to 1 if you have the <string.h> header file. */
#undef HAVE_STRING_H
/* Define to 1 if you have the <sys/stat.h> header file. */
#undef HAVE_SYS_STAT_H
/* Define to 1 if you have the <sys/types.h> header file. */
#undef HAVE_SYS_TYPES_H
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
/* Define to the sub-directory in which libtool stores uninstalled libraries.
*/
#undef LT_OBJDIR
/* Darwin backend */
#undef OS_DARWIN
/* Linux backend */
#undef OS_LINUX
/* Windows backend */
#undef OS_WINDOWS
/* Define to the address where bug reports for this package should be sent. */
#undef PACKAGE_BUGREPORT
/* Define to the full name of this package. */
#undef PACKAGE_NAME
/* Define to the full name and version of this package. */
#undef PACKAGE_STRING
/* Define to the one symbol short name of this package. */
#undef PACKAGE_TARNAME
/* Define to the home page for this package. */
#undef PACKAGE_URL
/* Define to the version of this package. */
#undef PACKAGE_VERSION
/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS
/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
significant byte first (like Motorola and SPARC, unlike Intel). */
#if defined AC_APPLE_UNIVERSAL_BUILD
# if defined __BIG_ENDIAN__
# define WORDS_BIGENDIAN 1
# endif
#else
# ifndef WORDS_BIGENDIAN
# undef WORDS_BIGENDIAN
# endif
#endif

1714
heimdall/config.sub vendored Executable file

File diff suppressed because it is too large Load Diff

17454
heimdall/configure vendored Executable file

File diff suppressed because it is too large Load Diff

46
heimdall/configure.ac Normal file
View File

@ -0,0 +1,46 @@
AC_INIT([Heimdall], [1.3], [bug-report@glassechidna.com.au], [heimdall], [http://www.glassechidna.com.au/])
AC_PREREQ([2.59])
PKG_CHECK_MODULES([DEPS], [libusb-1.0 >= 1.0.8])
AC_PROGRAM_CHECK(udevadminstalled, udevadm)
AC_CANONICAL_TARGET
AM_INIT_AUTOMAKE([1.10 -Wall no-define foreign])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_HEADERS([config.h])
AC_PROG_CXX
AC_PROG_LIBTOOL
AC_CONFIG_FILES([Makefile])
AM_MAINTAINER_MODE
AC_MSG_CHECKING([operating system])
case $target in
*-linux*)
AC_DEFINE(OS_LINUX, [], [Linux backend])
AC_MSG_RESULT([Linux])
linuxtarget=true
;;
*-darwin*)
AC_DEFINE(OS_DARWIN, [], [Darwin backend])
AC_MSG_RESULT([Darwin/MacOS X])
linuxtarget=false
;;
*-mingw*)
AC_DEFINE(OS_WINDOWS, [], [Windows backend])
AC_MSG_RESULT([Windows])
linuxtarget=false
;;
*-cygwin*)
AC_DEFINE(OS_WINDOWS, [], [Windows backend])
AC_MSG_RESULT([Windows])
linuxtarget=false
;;
*)
AC_MSG_ERROR([unsupported operating system])
esac
AM_CONDITIONAL([LINUXTARGET], [test x$linuxtarget = xtrue])
AM_CONDITIONAL([UDEVADM], [test x$udevadmninstalled = xtrue])
AC_C_BIGENDIAN
AC_OUTPUT

630
heimdall/depcomp Executable file
View File

@ -0,0 +1,630 @@
#! /bin/sh
# depcomp - compile a program generating dependencies as side-effects
scriptversion=2009-04-28.21; # UTC
# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009 Free
# Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
case $1 in
'')
echo "$0: No command. Try \`$0 --help' for more information." 1>&2
exit 1;
;;
-h | --h*)
cat <<\EOF
Usage: depcomp [--help] [--version] PROGRAM [ARGS]
Run PROGRAMS ARGS to compile a file, generating dependencies
as side-effects.
Environment variables:
depmode Dependency tracking mode.
source Source file read by `PROGRAMS ARGS'.
object Object file output by `PROGRAMS ARGS'.
DEPDIR directory where to store dependencies.
depfile Dependency file to output.
tmpdepfile Temporary file to use when outputing dependencies.
libtool Whether libtool is used (yes/no).
Report bugs to <bug-automake@gnu.org>.
EOF
exit $?
;;
-v | --v*)
echo "depcomp $scriptversion"
exit $?
;;
esac
if test -z "$depmode" || test -z "$source" || test -z "$object"; then
echo "depcomp: Variables source, object and depmode must be set" 1>&2
exit 1
fi
# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
depfile=${depfile-`echo "$object" |
sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
rm -f "$tmpdepfile"
# Some modes work just like other modes, but use different flags. We
# parameterize here, but still list the modes in the big case below,
# to make depend.m4 easier to write. Note that we *cannot* use a case
# here, because this file can only contain one case statement.
if test "$depmode" = hp; then
# HP compiler uses -M and no extra arg.
gccflag=-M
depmode=gcc
fi
if test "$depmode" = dashXmstdout; then
# This is just like dashmstdout with a different argument.
dashmflag=-xM
depmode=dashmstdout
fi
cygpath_u="cygpath -u -f -"
if test "$depmode" = msvcmsys; then
# This is just like msvisualcpp but w/o cygpath translation.
# Just convert the backslash-escaped backslashes to single forward
# slashes to satisfy depend.m4
cygpath_u="sed s,\\\\\\\\,/,g"
depmode=msvisualcpp
fi
case "$depmode" in
gcc3)
## gcc 3 implements dependency tracking that does exactly what
## we want. Yay! Note: for some reason libtool 1.4 doesn't like
## it if -MD -MP comes after the -MF stuff. Hmm.
## Unfortunately, FreeBSD c89 acceptance of flags depends upon
## the command line argument order; so add the flags where they
## appear in depend2.am. Note that the slowdown incurred here
## affects only configure: in makefiles, %FASTDEP% shortcuts this.
for arg
do
case $arg in
-c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;;
*) set fnord "$@" "$arg" ;;
esac
shift # fnord
shift # $arg
done
"$@"
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile"
exit $stat
fi
mv "$tmpdepfile" "$depfile"
;;
gcc)
## There are various ways to get dependency output from gcc. Here's
## why we pick this rather obscure method:
## - Don't want to use -MD because we'd like the dependencies to end
## up in a subdir. Having to rename by hand is ugly.
## (We might end up doing this anyway to support other compilers.)
## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
## -MM, not -M (despite what the docs say).
## - Using -M directly means running the compiler twice (even worse
## than renaming).
if test -z "$gccflag"; then
gccflag=-MD,
fi
"$@" -Wp,"$gccflag$tmpdepfile"
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile"
exit $stat
fi
rm -f "$depfile"
echo "$object : \\" > "$depfile"
alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
## The second -e expression handles DOS-style file names with drive letters.
sed -e 's/^[^:]*: / /' \
-e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
## This next piece of magic avoids the `deleted header file' problem.
## The problem is that when a header file which appears in a .P file
## is deleted, the dependency causes make to die (because there is
## typically no way to rebuild the header). We avoid this by adding
## dummy dependencies for each header file. Too bad gcc doesn't do
## this for us directly.
tr ' ' '
' < "$tmpdepfile" |
## Some versions of gcc put a space before the `:'. On the theory
## that the space means something, we add a space to the output as
## well.
## Some versions of the HPUX 10.20 sed can't process this invocation
## correctly. Breaking it into two sed invocations is a workaround.
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
hp)
# This case exists only to let depend.m4 do its work. It works by
# looking at the text of this script. This case will never be run,
# since it is checked for above.
exit 1
;;
sgi)
if test "$libtool" = yes; then
"$@" "-Wp,-MDupdate,$tmpdepfile"
else
"$@" -MDupdate "$tmpdepfile"
fi
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile"
exit $stat
fi
rm -f "$depfile"
if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
echo "$object : \\" > "$depfile"
# Clip off the initial element (the dependent). Don't try to be
# clever and replace this with sed code, as IRIX sed won't handle
# lines with more than a fixed number of characters (4096 in
# IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
# the IRIX cc adds comments like `#:fec' to the end of the
# dependency line.
tr ' ' '
' < "$tmpdepfile" \
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
tr '
' ' ' >> "$depfile"
echo >> "$depfile"
# The second pass generates a dummy entry for each header file.
tr ' ' '
' < "$tmpdepfile" \
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
>> "$depfile"
else
# The sourcefile does not contain any dependencies, so just
# store a dummy comment line, to avoid errors with the Makefile
# "include basename.Plo" scheme.
echo "#dummy" > "$depfile"
fi
rm -f "$tmpdepfile"
;;
aix)
# The C for AIX Compiler uses -M and outputs the dependencies
# in a .u file. In older versions, this file always lives in the
# current directory. Also, the AIX compiler puts `$object:' at the
# start of each line; $object doesn't have directory information.
# Version 6 uses the directory in both cases.
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
test "x$dir" = "x$object" && dir=
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
if test "$libtool" = yes; then
tmpdepfile1=$dir$base.u
tmpdepfile2=$base.u
tmpdepfile3=$dir.libs/$base.u
"$@" -Wc,-M
else
tmpdepfile1=$dir$base.u
tmpdepfile2=$dir$base.u
tmpdepfile3=$dir$base.u
"$@" -M
fi
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
exit $stat
fi
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
do
test -f "$tmpdepfile" && break
done
if test -f "$tmpdepfile"; then
# Each line is of the form `foo.o: dependent.h'.
# Do two passes, one to just change these to
# `$object: dependent.h' and one to simply `dependent.h:'.
sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
# That's a tab and a space in the [].
sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
else
# The sourcefile does not contain any dependencies, so just
# store a dummy comment line, to avoid errors with the Makefile
# "include basename.Plo" scheme.
echo "#dummy" > "$depfile"
fi
rm -f "$tmpdepfile"
;;
icc)
# Intel's C compiler understands `-MD -MF file'. However on
# icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
# ICC 7.0 will fill foo.d with something like
# foo.o: sub/foo.c
# foo.o: sub/foo.h
# which is wrong. We want:
# sub/foo.o: sub/foo.c
# sub/foo.o: sub/foo.h
# sub/foo.c:
# sub/foo.h:
# ICC 7.1 will output
# foo.o: sub/foo.c sub/foo.h
# and will wrap long lines using \ :
# foo.o: sub/foo.c ... \
# sub/foo.h ... \
# ...
"$@" -MD -MF "$tmpdepfile"
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile"
exit $stat
fi
rm -f "$depfile"
# Each line is of the form `foo.o: dependent.h',
# or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
# Do two passes, one to just change these to
# `$object: dependent.h' and one to simply `dependent.h:'.
sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
# Some versions of the HPUX 10.20 sed can't process this invocation
# correctly. Breaking it into two sed invocations is a workaround.
sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
hp2)
# The "hp" stanza above does not work with aCC (C++) and HP's ia64
# compilers, which have integrated preprocessors. The correct option
# to use with these is +Maked; it writes dependencies to a file named
# 'foo.d', which lands next to the object file, wherever that
# happens to be.
# Much of this is similar to the tru64 case; see comments there.
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
test "x$dir" = "x$object" && dir=
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
if test "$libtool" = yes; then
tmpdepfile1=$dir$base.d
tmpdepfile2=$dir.libs/$base.d
"$@" -Wc,+Maked
else
tmpdepfile1=$dir$base.d
tmpdepfile2=$dir$base.d
"$@" +Maked
fi
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile1" "$tmpdepfile2"
exit $stat
fi
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2"
do
test -f "$tmpdepfile" && break
done
if test -f "$tmpdepfile"; then
sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile"
# Add `dependent.h:' lines.
sed -ne '2,${
s/^ *//
s/ \\*$//
s/$/:/
p
}' "$tmpdepfile" >> "$depfile"
else
echo "#dummy" > "$depfile"
fi
rm -f "$tmpdepfile" "$tmpdepfile2"
;;
tru64)
# The Tru64 compiler uses -MD to generate dependencies as a side
# effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
# At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
# dependencies in `foo.d' instead, so we check for that too.
# Subdirectories are respected.
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
test "x$dir" = "x$object" && dir=
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
if test "$libtool" = yes; then
# With Tru64 cc, shared objects can also be used to make a
# static library. This mechanism is used in libtool 1.4 series to
# handle both shared and static libraries in a single compilation.
# With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d.
#
# With libtool 1.5 this exception was removed, and libtool now
# generates 2 separate objects for the 2 libraries. These two
# compilations output dependencies in $dir.libs/$base.o.d and
# in $dir$base.o.d. We have to check for both files, because
# one of the two compilations can be disabled. We should prefer
# $dir$base.o.d over $dir.libs/$base.o.d because the latter is
# automatically cleaned when .libs/ is deleted, while ignoring
# the former would cause a distcleancheck panic.
tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4
tmpdepfile2=$dir$base.o.d # libtool 1.5
tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5
tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504
"$@" -Wc,-MD
else
tmpdepfile1=$dir$base.o.d
tmpdepfile2=$dir$base.d
tmpdepfile3=$dir$base.d
tmpdepfile4=$dir$base.d
"$@" -MD
fi
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
exit $stat
fi
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
do
test -f "$tmpdepfile" && break
done
if test -f "$tmpdepfile"; then
sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
# That's a tab and a space in the [].
sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
else
echo "#dummy" > "$depfile"
fi
rm -f "$tmpdepfile"
;;
#nosideeffect)
# This comment above is used by automake to tell side-effect
# dependency tracking mechanisms from slower ones.
dashmstdout)
# Important note: in order to support this mode, a compiler *must*
# always write the preprocessed file to stdout, regardless of -o.
"$@" || exit $?
# Remove the call to Libtool.
if test "$libtool" = yes; then
while test "X$1" != 'X--mode=compile'; do
shift
done
shift
fi
# Remove `-o $object'.
IFS=" "
for arg
do
case $arg in
-o)
shift
;;
$object)
shift
;;
*)
set fnord "$@" "$arg"
shift # fnord
shift # $arg
;;
esac
done
test -z "$dashmflag" && dashmflag=-M
# Require at least two characters before searching for `:'
# in the target name. This is to cope with DOS-style filenames:
# a dependency such as `c:/foo/bar' could be seen as target `c' otherwise.
"$@" $dashmflag |
sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile"
rm -f "$depfile"
cat < "$tmpdepfile" > "$depfile"
tr ' ' '
' < "$tmpdepfile" | \
## Some versions of the HPUX 10.20 sed can't process this invocation
## correctly. Breaking it into two sed invocations is a workaround.
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
dashXmstdout)
# This case only exists to satisfy depend.m4. It is never actually
# run, as this mode is specially recognized in the preamble.
exit 1
;;
makedepend)
"$@" || exit $?
# Remove any Libtool call
if test "$libtool" = yes; then
while test "X$1" != 'X--mode=compile'; do
shift
done
shift
fi
# X makedepend
shift
cleared=no eat=no
for arg
do
case $cleared in
no)
set ""; shift
cleared=yes ;;
esac
if test $eat = yes; then
eat=no
continue
fi
case "$arg" in
-D*|-I*)
set fnord "$@" "$arg"; shift ;;
# Strip any option that makedepend may not understand. Remove
# the object too, otherwise makedepend will parse it as a source file.
-arch)
eat=yes ;;
-*|$object)
;;
*)
set fnord "$@" "$arg"; shift ;;
esac
done
obj_suffix=`echo "$object" | sed 's/^.*\././'`
touch "$tmpdepfile"
${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
rm -f "$depfile"
cat < "$tmpdepfile" > "$depfile"
sed '1,2d' "$tmpdepfile" | tr ' ' '
' | \
## Some versions of the HPUX 10.20 sed can't process this invocation
## correctly. Breaking it into two sed invocations is a workaround.
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile" "$tmpdepfile".bak
;;
cpp)
# Important note: in order to support this mode, a compiler *must*
# always write the preprocessed file to stdout.
"$@" || exit $?
# Remove the call to Libtool.
if test "$libtool" = yes; then
while test "X$1" != 'X--mode=compile'; do
shift
done
shift
fi
# Remove `-o $object'.
IFS=" "
for arg
do
case $arg in
-o)
shift
;;
$object)
shift
;;
*)
set fnord "$@" "$arg"
shift # fnord
shift # $arg
;;
esac
done
"$@" -E |
sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
-e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
sed '$ s: \\$::' > "$tmpdepfile"
rm -f "$depfile"
echo "$object : \\" > "$depfile"
cat < "$tmpdepfile" >> "$depfile"
sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
msvisualcpp)
# Important note: in order to support this mode, a compiler *must*
# always write the preprocessed file to stdout.
"$@" || exit $?
# Remove the call to Libtool.
if test "$libtool" = yes; then
while test "X$1" != 'X--mode=compile'; do
shift
done
shift
fi
IFS=" "
for arg
do
case "$arg" in
-o)
shift
;;
$object)
shift
;;
"-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
set fnord "$@"
shift
shift
;;
*)
set fnord "$@" "$arg"
shift
shift
;;
esac
done
"$@" -E 2>/dev/null |
sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile"
rm -f "$depfile"
echo "$object : \\" > "$depfile"
sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile"
echo " " >> "$depfile"
sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile"
rm -f "$tmpdepfile"
;;
msvcmsys)
# This case exists only to let depend.m4 do its work. It works by
# looking at the text of this script. This case will never be run,
# since it is checked for above.
exit 1
;;
none)
exec "$@"
;;
*)
echo "Unknown depmode $depmode" 1>&2
exit 1
;;
esac
exit 0
# Local Variables:
# mode: shell-script
# sh-indentation: 2
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-time-zone: "UTC"
# time-stamp-end: "; # UTC"
# End:

1
heimdall/description-pak Normal file
View File

@ -0,0 +1 @@
Heimdall command-line interface, a part of the Heimdall tool suite. Heimdall is a cross-platform open-source tool suite used to flash firmware (aka ROMs) onto Samsung Galaxy S devices.

19
heimdall/doc-pak/LICENSE Normal file
View File

@ -0,0 +1,19 @@
Copyright (c) 2010-2011 Benjamin Dobell, Glass Echidna
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

528
heimdall/doc-pak/README Normal file
View File

@ -0,0 +1,528 @@
Heimdall (c) 2010-2011 Benjamin Dobell, Glass Echidna
http://www.glassechidna.com.au/products/heimdall/
DISCLAIMER:
This software attempts to flash your Galaxy S device. The very nature of
flashing is dangerous. As with all flashing software, Heimdall has the
potential to damage (brick) your device if not used carefully. If you're
concerned, don't use this software. Flashing ROMs onto your phone may also
void your warranty. Benjamin Dobell and Glass Echidna are not responsible
for the result of your actions.
These instructions are for Linux operating systems.
Flashing Heimdall Firmware Package with Heimdall Frontend:
As of Heimdall Frontend 1.3 there are now two main ways to flash a ROM from
Heimdall Frontend. The simpler and preferred option is to download a
Heimdall Firmware Package and follow the following steps.
1. Fully charge your device (use the wall charger as it's faster).
2. Open Heimdall Frontend, which can be done by entering the following
command in a terminal:
heimdall-frontend
3. From the "Load Package" tab, under the "Heimdall Firmware Package"
section click the "Browse" button.
4. Use the dialogue that appears to navigate to, and select, the Heimdall
firmware package that you wish to flash.
5. You will see progress bars appear as the package is decompressed and
extracted.
When the package has finished being decompressed you should see
information about the particular firmware package that has been
selected.
6. Verify that your device is listed under "Supported Devices". If it's not
then STOP immediately! DO NOT flash this firmware to your device!
Instead search for an appropriate firmware package for your device.
If you believe there is a mistake and your device is actually
supported please get in contact with the firmware developer (not Glass
Echidna!) and ask them to rectify the issue. If the developer provided
a URL you may be able to contact them by pressing the "Homepage" button.
7. If you've verified your device is supported you may continue to press
the "Load / Customise" button.
8. You should now be looking at the "Flash" tab. If not verify that you did
in fact push the "Load / Customise" button.
Generally, you won't NEED or WANT to customise a firmware package! In
which case you can safely move on to step 9.
Nonetheless, the "Flash" tab provides you with a means to customise the
firmware package before flashing it to your device. See "Performing a
Custom Flash with Heimdall Frontend" for more details.
9. Put your Galaxy S device into download mode and plug it in to your PC.
Download mode can be accessed several different ways depending on your
particular device model. If you're unsure how to do this please search
online for the appropriate method.
10. Press the "Start" button.
11. Heimdall Frontend will display the progress and inform you when the
flash is complete.
If something went wrong i.e. your device wasn't detected because it
wasn't in download mode, then the status section will let you know the
cause of the problem.
Performing a Custom Flash with Heimdall Frontend:
This is the advanced means of flashing firmware to your device. You should
only flash firmware to your device this way if you know what you're doing.
If you're not an advanced user or a developer, in the event that a Heimdall
Firmware Package doesn't exist for the particular firmware you wish to
flash. I strongly recommend you get in touch with developer of the
firmware, or an advanced user, and politely ask them to create a Heimdall
Firmware Package for you.
If you're looking to customise an existing Heimdall Firmware Package then
follow steps 1-8 of "Flashing Heimdall Firmware Package with Heimdall
Frontend" then start from below with step 5.
1. Fully charge your device (use the wall charger as it's faster).
2. Download a decrypted Samsung Galaxy S ROM or a Heimdall Firmware Package
and extract everything to the one directory.
3. If the ROM is not a Heimdall Firmware Package it may instead be provided
as multiple archives (nested or otherwise), extract them all to the same
location.
NOTE: If you want to use the CSC then extract it last. If you're asked
to overwrite files then do so.
3. Open Heimdall Frontend, which can be done by entering the following
command in a terminal:
heimdall-frontend
4. Select the "Flash" tab. From the "Flash" tab you're able to completely
customise a flash.
5. Before you can chose which partitions you want to flash with particular
files you MUST first select a PIT file. To do this click the "Browse"
button in the "PIT" section. This will open a dialogue allowing you to
navigate to and select a valid PIT (.pit) file.
6. If a valid PIT file has been selected then "Add" button below the list
box will become enabled. Press this button to add a partition to your
flash.
7. When you first add a partition you will see the "Partition Name" and
"Partition ID" be populated with information. Use the "Partition Name"
drop down to select which partition you wish to flash. "Partition ID"
will automatically update and is never directly editable.
8. You must then select a file to flash to the partition that you just
specified using the "Browse" button under the "File / Partition". You
will not be able to flash, create a firmware package or add another
partition until you have selected a file. However, you're still able to
press the "Remove" button if you've decided not to flash the partition
you've just specified.
9. When you've specified a file name then you'll be able to see the updated
information in the partition list to the right. You can select any
partition from this list and customise it as you see fit.
You can also remove a partition from the list by selecting it and
clicking the "Remove" button. Removing a partition from the list doesn't
remove it from your device, it simply means it will not be flashed.
10. Repeat steps 7-9 as often as needed to specify all the partions/files
that you wish to flash.
11. Now you can chose whether you would like to repartition your device as
well as whether you would like to prevent the device rebooting once a
flash has been completed. These options can be enabled or disabled by
toggling the "Repartition" and "No Reboot" check-boxes.
In the general case you will only need to enable repartition if you wish
to change the PIT file on your device. Keep in mind that repartitioning
will wipe your device!
The "No Reboot" option is rarely required. It's mostly in place so you
can manually boot straight into recovery mode after a flash (rather than
booting up normally).
12. If you've added at least one partition to your flash (and selected a
file for that partition) then the "Start" button will be enabled. Press
the "Start" button to begin the flashing process.
You may notice that the "Create Package" tab becomes available at the
whenever the "Start" button becomes available. From this tab you're able
to create a reusable, redistributable Heimdall Firmware Package with the
files and partitions you just selected. See "How to Create a Heimdall
Firmware Package" for details.
13. Heimdall Frontend will display the progress and inform you when the
flash is complete.
If something went wrong i.e. your device wasn't detected because it
wasn't in download mode, then the status section will let you know the
cause of the problem.
Flashing Firmware from Command Line:
1. Fully charge your phone (use the wall charger as it's faster).
2. Download a decrypted Samsung Galaxy S ROM or a Heimdall Firmware Package
and extract everything to the one directory.
3. If the ROM is not a Heimdall Firmware Package it may instead be provided
as multiple archives (nested or otherwise), extract them all to the same
location.
NOTE: If you want to use the CSC then extract it last.
4. Put your Galaxy S device into download mode and plug it in..
5. Open a terminal and navigate to the directory where you extracted
the ROM/firmware files.
6. Type the following to list all the functionality Heimdall supports:
heimdall help
7. Use the instructions to manually enter a command with all the files you
want to flash.
Here is an example that does a full flash and repartition on a GT-I9000:
heimdall flash --repartition --pit s1_odin_20100512.pit --factoryfs factoryfs.rfs --cache cache.rfs --dbdata dbdata.rfs --primary-boot boot.bin --secondary-boot Sbl.bin --param param.lfs --kernel zImage --modem modem.bin
8. Heimdall will display the progress as it flashes so that you know things
are working as they should.
How to Create a Heimdall Firmware Package:
Firstly, Heimdall's firmware package format is just a regular TAR archive
compressed with gzip. The only two real requirements are that a valid
firmware.xml must be included (refer to Appendix A) and you can only
include files (no directories, links etc.) As such if you'd like there is
nothing preventing you creating Heimdall packages manually. Of course
Heimdall Frontend provides a simple user interface that takes care of all
the hard work for you.
There are two ways in which you can create a firmware package. You can
create a package from scratch, or you can load an existing package, apply
modifications and then save the package. Creating a package from scratch
is the preferred approach, by taking this approach you're far less likely
to run into file name length limitations, these are not Heimdall's own
limitation but rather a limitation of the TAR archive format.
Before you can access Heimdall Frontend's firmware creation functionality
(available from the "Create Package" tab) you must first specify which
files will be included in your package as well as a few flashing options
i.e. Whether or not users should repartition when flashing. This
information must be filled out from the "Flash" tab in exactly the same
fashion you would provide information to flash your device (see "Performing
a Custom Flash with Heimdall Frontend"). As mentioned above, it's not the
preferred means, but you're able to load an existing package as a starting
point for this information.
Once you've specified the files/partitions you wish to include in your
firmware package the "Create Package" tab will become available. Clicking
this tab will display additional information that you can include in your
package. In order to continue you must fill out all sections except for the
URLs section, which is optional. The following is break-down of what all
these options mean.
- General Firmware Information: -
Firmware Name - This is the name of your particular firmware. An
example would be "Cyanogenmod".
Firmware Version - This is the particular version identifier for your
package. Any valid string will be accepted although a the inclusion
of decimal point version number is preferred releases i.e. "7.1".
If it makes sense then feel free to append a text string like "RC1"
or "Beta 1" to the decimal point version.
Platform Name - This is the name of platform (or operating system) that
your firmware is based on. In most cases this will simply be
"Android".
Platform Version - This is the operating system version that your
firmware is based on. Again decimal point version numbers are
preferred over text, i.e. "2.3.4" is preferred over "Gingerbread".
- Developers -
URLs (Optional):
Homepage - Here you can enter your personal URL or a URL particularly
pertaining to the firmware being packaged. The URL must be well
formed for it to work. An example of a well formed URL is
"http://www.glassechidna.com.au/products/heimdall/". It is
important to include "http://" in order to specify the protocol as
other protocols such as "ftp://" are equally valid although
unlikely to be used.
Donate - Here you can enter a URL that will link users to a page to
make donations for the effort you've put into developing your
firmware. Once again the URL must be well formed but there is no
requirement on how your donation page should work. For instance
both "http://www.glassechidna.com.au/donate/" and
"http://forum.xda-developers.com/donatetome.php?u=2710388" are
equally valid.
Developer Info:
Name - Here you can enter in the name of individual team members or a
team name. Click "Add" and the developer will be added to the list
on the right. If you make a mistake you can select a developer from
the list and click "Remove". You can list as many developers as you
like however size constraints of the "Load Package" means only a
few will be visible. Where possible you may want to opt for team
names over listing individual team members.
- Supported Devices -
This section allows you to create a list of devices that are supported by
your particular firmware. Although Heimdall isn't capable of enforcing this
we strongly recommend you take this section seriously. If filled out
correctly you could help save a number of accidental bricks!
Device Info:
Manufacturer - This is where you can enter the name of the manufacturer
for a particular device. For now this will most likely be
"Samsung".
Name - This is the human readable name for a particular device.
"Galaxy S", "Galaxy S II", "Droid Charge", "Vibrant" and
"Galaxy S (Telstra)" are all valid names. There are a lot of
possible variations here so be as specific as you think is
necessary.
Product Code - This is by far the most important bit of device
information. Device names tend to be region specific and further
subject to the whims of telecommunication companies and resellers.
Product Codes (or product IDs) are designated by manufacturers and
are generally the definitive means of referring to a particular
device. Examples are "GT-I9000", "GT-I9100" and "SCH-I897". If
you're unsure of a particular product code then Google and
GSMArena are your friends!
After filling out all the necessary information the "Build" button will be
enabled. If it's still disabled then you know you're missing some required
information. In particular you must specify at least one developer and at
least one supported device. Pressing the "Build" button will bring up a
save dialogue where you must chose a file name for your particular package.
Don't worry about specifying the ".tar.gz" extension Heimdall Frontend will
take care of this automatically.
Once you've chosen a file name Heimdall Frontend will begin the process of
building the firmware package. In doing so a valid firmware.xml file will
be generated from the information entered, all files will be archived in a
single TAR file then the TAR archive will be compressed via gzip
compression. Compression will take a little while but you will see progress
bars so you know the application hasn't hung. When the progress bars
disappear you're finished making your package.
Congratulations! You're now ready to redistribute your firmware package
online or by any means you see fit.
Appendix A - firmware.xml
The following details a part of the Heimdall Firmware Package format. This
is only relevant to developers or advanced users who wish to create Heimdall
Firmware Packages outside of Heimdall Frontend or in some way integrate support
for the format in their own software.
All Heimdall Firmware Packages must contain a file called firmware.xml. This
file stores information stores meta-data for the package as well as information
about other files contained in the package that indicates how they should be
flashed.
The format is fairly straight-forward so it won't be explained in great detail,
nonetheless the following is an example of a valid firmware.xml file.
<?xml version="1.0" encoding="UTF-8"?>
<firmware version="1">
<name>Test Firmware</name>
<version>1.1</version>
<platform>
<name>Android</name>
<version>2.3.4</version>
</platform>
<developers>
<name>Benjamin Dobell</name>
<name>Hedonism Bot</name>
</developers>
<url>http://www.glassechidna.com.au/</url>
<donateurl>http://www.glassechidna.com.au/donate/</donateurl>
<devices>
<device>
<manufacturer>Samsung</manufacturer>
<product>GT-I9000</product>
<name>Galaxy S</name>
</device>
<device>
<manufacturer>Samsung</manufacturer>
<product>GT-I9000T</product>
<name>Galaxy S (Telstra)</name>
</device>
<device>
<manufacturer>Samsung</manufacturer>
<product>GT-I9000M</product>
<name>Vibrant</name>
</device>
</devices>
<pit>Nl3276-I9000 s1_odin_20100512.pit</pit>
<repartition>0</repartition>
<noreboot>0</noreboot>
<files>
<file>
<id>0</id>
<filename>gq3276-boot.bin</filename>
</file>
<file>
<id>24</id>
<filename>Uh3276-cache.rfs</filename>
</file>
<file>
<id>22</id>
<filename>em3276-factoryfs.rfs</filename>
</file>
<file>
<id>11</id>
<filename>fl3276-modem.bin</filename>
</file>
<file>
<id>21</id>
<filename>Xd3276-param.lfs</filename>
</file>
<file>
<id>3</id>
<filename>if3276-Sbl.bin</filename>
</file>
<file>
<id>6</id>
<filename>cr3276-zImage</filename>
</file>
</files>
</firmware>
New lines need not be included and the order in which elements are specified
does not need to match that of the above example.
One and only one <firmware> element must be included. The <firmware> element
must also have a version attribute specified. The version must be parsable as
an integer and indicates what version of the Heimdall Firmware Package
specification the package adheres to.
All data is stored as strings, however a <file>'s <id> element must be parsable
as an integer. The <id> value represents the partition ID (according to the
specified PIT file) that the file should be flashed to.
A <firmware>'s <repartition> and <noreboot> elements must also be parsable as
an integer. However, as they represent boolean values, a value of zero ("0")
means false (or disabled) where as a non-zero value (typically "1") means true
(or enabled).
File names are specified relative to the TAR archive in which firmware.xml and
all other files are to be stored. Heimdall Firmware Packages do not support
directories or links, as such file names should only be a name and not a path.
<url> and <donateurl> are the only optional elements, all other elements must
be included.
Appendix B - Installing Heimdall from Source:
1. First make sure you have installed build-tools and pkgconfig.
2. Open a terminal and navigate to the directory you downloaded,
or extracted, Heimdall to.
3. Enter the following commands to compile and install libusb-1.0:
cd libusb-1.0
./configure
make
sudo make install
cd ..
If you have problems please consult http://www.libusb.org/
4. Enter the following commands to compile libpit.
cd libusb-1.0
./configure
make
cd ..
NOTE: There is no need to run "sudo make install".
4. Enter the following commands to compile and install Heimdall:
cd heimdall
./configure
make
sudo make install
cd ..
NOTE: You can use "checkinstall" instead of "make install" in order
to generate a redistributable package.
5. Done
Appendix C - Installing Heimdall Frontend from Source:
1. Compile and install Heimdall, see Appendix B.
2. First make sure you have installed Qt 4.7 or later, available from:
http://qt.nokia.com/downloads/
3. Open a terminal and navigate to the directory you extracted Heimdall to.
4. Enter the following commands to compile and install Heimdall Frontend:
cd heimdall-frontend
qmake heimdall-frontend.pro
make
sudo make install
NOTE: As an alternative to "sudo make install" you may chose to generate
a package by typing the following:
sudo checkinstall --pkgversion <version>
Where <version> is the current Heimdall release e.g. 1.3.0
5. Done

139
heimdall/heimdall.vcxproj Normal file
View File

@ -0,0 +1,139 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{DC0D782C-8DB7-44CA-A984-D3A97483E0D0}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>heimdall</RootNamespace>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental>
<IncludePath>$(SolutionDir)libpit\Source;$(SolutionDir)libusb-1.0\include;$(IncludePath)</IncludePath>
<LibraryPath>$(LibraryPath)</LibraryPath>
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
<IncludePath>$(SolutionDir)libpit\Source;$(SolutionDir)libusb-1.0\libusb;$(IncludePath)</IncludePath>
<LibraryPath>$(LibraryPath)</LibraryPath>
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;OS_WINDOWS;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<PrecompiledHeaderFile>
</PrecompiledHeaderFile>
<PrecompiledHeaderOutputFile>
</PrecompiledHeaderOutputFile>
<AdditionalIncludeDirectories>..\libusb-1.0\include;..\libpit\Source</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>libusb-1.0.lib;libpit.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>$(SolutionDir)libusb-1.0\lib\$(Platform)\$(Configuration)\;$(SolutionDir)$(Platform)\$(Configuration)\lib\</AdditionalLibraryDirectories>
</Link>
<PostBuildEvent>
<Command>xcopy /y $(SolutionDir)libusb-1.0\lib\$(Platform)\$(Configuration)\libusb-1.0.dll $(SolutionDir)$(Platform)\$(Configuration)\</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;OS_WINDOWS;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<PrecompiledHeaderFile>
</PrecompiledHeaderFile>
<PrecompiledHeaderOutputFile>
</PrecompiledHeaderOutputFile>
<AdditionalIncludeDirectories>..\libusb-1.0\include;..\libpit\Source</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<AdditionalDependencies>libusb-1.0.lib;libpit.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>$(SolutionDir)libusb-1.0\lib\$(Platform)\$(Configuration)\;$(SolutionDir)$(Platform)\$(Configuration)\lib\</AdditionalLibraryDirectories>
</Link>
<PostBuildEvent>
<Command>xcopy /y $(SolutionDir)libusb-1.0\lib\$(Platform)\$(Configuration)\libusb-1.0.dll $(SolutionDir)$(Platform)\$(Configuration)\</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemGroup>
<ClInclude Include="source\BeginDumpPacket.h" />
<ClInclude Include="source\BridgeManager.h" />
<ClInclude Include="source\ControlPacket.h" />
<ClInclude Include="source\SetupSessionPacket.h" />
<ClInclude Include="source\SetupSessionResponse.h" />
<ClInclude Include="source\DumpPartFileTransferPacket.h" />
<ClInclude Include="source\DumpPartPitFilePacket.h" />
<ClInclude Include="source\DumpResponse.h" />
<ClInclude Include="source\EndFileTransferPacket.h" />
<ClInclude Include="source\EndModemFileTransferPacket.h" />
<ClInclude Include="source\EndPhoneFileTransferPacket.h" />
<ClInclude Include="source\EndPitFileTransferPacket.h" />
<ClInclude Include="source\FileTransferPacket.h" />
<ClInclude Include="source\FlashPartFileTransferPacket.h" />
<ClInclude Include="source\FlashPartPitFilePacket.h" />
<ClInclude Include="source\Heimdall.h" />
<ClInclude Include="source\InboundPacket.h" />
<ClInclude Include="source\Interface.h" />
<ClInclude Include="source\OutboundPacket.h" />
<ClInclude Include="source\Packet.h" />
<ClInclude Include="source\PitFilePacket.h" />
<ClInclude Include="source\PitFileResponse.h" />
<ClInclude Include="source\EndSessionPacket.h" />
<ClInclude Include="source\ReceiveFilePartPacket.h" />
<ClInclude Include="source\ResponsePacket.h" />
<ClInclude Include="source\SendFilePartPacket.h" />
<ClInclude Include="source\SendFilePartResponse.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="source\BridgeManager.cpp" />
<ClCompile Include="source\Interface.cpp" />
<ClCompile Include="source\main.cpp" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -0,0 +1,103 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClInclude Include="source\BeginDumpPacket.h">
<Filter>Source</Filter>
</ClInclude>
<ClInclude Include="source\BridgeManager.h">
<Filter>Source</Filter>
</ClInclude>
<ClInclude Include="source\ControlPacket.h">
<Filter>Source</Filter>
</ClInclude>
<ClInclude Include="source\DumpPartFileTransferPacket.h">
<Filter>Source</Filter>
</ClInclude>
<ClInclude Include="source\DumpPartPitFilePacket.h">
<Filter>Source</Filter>
</ClInclude>
<ClInclude Include="source\DumpResponse.h">
<Filter>Source</Filter>
</ClInclude>
<ClInclude Include="source\EndFileTransferPacket.h">
<Filter>Source</Filter>
</ClInclude>
<ClInclude Include="source\EndModemFileTransferPacket.h">
<Filter>Source</Filter>
</ClInclude>
<ClInclude Include="source\EndPhoneFileTransferPacket.h">
<Filter>Source</Filter>
</ClInclude>
<ClInclude Include="source\FileTransferPacket.h">
<Filter>Source</Filter>
</ClInclude>
<ClInclude Include="source\FlashPartFileTransferPacket.h">
<Filter>Source</Filter>
</ClInclude>
<ClInclude Include="source\FlashPartPitFilePacket.h">
<Filter>Source</Filter>
</ClInclude>
<ClInclude Include="source\Heimdall.h">
<Filter>Source</Filter>
</ClInclude>
<ClInclude Include="source\InboundPacket.h">
<Filter>Source</Filter>
</ClInclude>
<ClInclude Include="source\OutboundPacket.h">
<Filter>Source</Filter>
</ClInclude>
<ClInclude Include="source\Packet.h">
<Filter>Source</Filter>
</ClInclude>
<ClInclude Include="source\PitFilePacket.h">
<Filter>Source</Filter>
</ClInclude>
<ClInclude Include="source\PitFileResponse.h">
<Filter>Source</Filter>
</ClInclude>
<ClInclude Include="source\ReceiveFilePartPacket.h">
<Filter>Source</Filter>
</ClInclude>
<ClInclude Include="source\ResponsePacket.h">
<Filter>Source</Filter>
</ClInclude>
<ClInclude Include="source\SendFilePartPacket.h">
<Filter>Source</Filter>
</ClInclude>
<ClInclude Include="source\SendFilePartResponse.h">
<Filter>Source</Filter>
</ClInclude>
<ClInclude Include="source\Interface.h">
<Filter>Source</Filter>
</ClInclude>
<ClInclude Include="source\EndPitFileTransferPacket.h">
<Filter>Source</Filter>
</ClInclude>
<ClInclude Include="source\SetupSessionPacket.h">
<Filter>Source</Filter>
</ClInclude>
<ClInclude Include="source\SetupSessionResponse.h">
<Filter>Source</Filter>
</ClInclude>
<ClInclude Include="source\EndSessionPacket.h">
<Filter>Source</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="source\BridgeManager.cpp">
<Filter>Source</Filter>
</ClCompile>
<ClCompile Include="source\main.cpp">
<Filter>Source</Filter>
</ClCompile>
<ClCompile Include="source\Interface.cpp">
<Filter>Source</Filter>
</ClCompile>
</ItemGroup>
</Project>

520
heimdall/install-sh Executable file
View File

@ -0,0 +1,520 @@
#!/bin/sh
# install - install a program, script, or datafile
scriptversion=2009-04-28.21; # UTC
# This originates from X11R5 (mit/util/scripts/install.sh), which was
# later released in X11R6 (xc/config/util/install.sh) with the
# following copyright and license.
#
# Copyright (C) 1994 X Consortium
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
# sell copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
# Except as contained in this notice, the name of the X Consortium shall not
# be used in advertising or otherwise to promote the sale, use or other deal-
# ings in this Software without prior written authorization from the X Consor-
# tium.
#
#
# FSF changes to this file are in the public domain.
#
# Calling this script install-sh is preferred over install.sh, to prevent
# `make' implicit rules from creating a file called install from it
# when there is no Makefile.
#
# This script is compatible with the BSD install script, but was written
# from scratch.
nl='
'
IFS=" "" $nl"
# set DOITPROG to echo to test this script
# Don't use :- since 4.3BSD and earlier shells don't like it.
doit=${DOITPROG-}
if test -z "$doit"; then
doit_exec=exec
else
doit_exec=$doit
fi
# Put in absolute file names if you don't have them in your path;
# or use environment vars.
chgrpprog=${CHGRPPROG-chgrp}
chmodprog=${CHMODPROG-chmod}
chownprog=${CHOWNPROG-chown}
cmpprog=${CMPPROG-cmp}
cpprog=${CPPROG-cp}
mkdirprog=${MKDIRPROG-mkdir}
mvprog=${MVPROG-mv}
rmprog=${RMPROG-rm}
stripprog=${STRIPPROG-strip}
posix_glob='?'
initialize_posix_glob='
test "$posix_glob" != "?" || {
if (set -f) 2>/dev/null; then
posix_glob=
else
posix_glob=:
fi
}
'
posix_mkdir=
# Desired mode of installed file.
mode=0755
chgrpcmd=
chmodcmd=$chmodprog
chowncmd=
mvcmd=$mvprog
rmcmd="$rmprog -f"
stripcmd=
src=
dst=
dir_arg=
dst_arg=
copy_on_change=false
no_target_directory=
usage="\
Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
or: $0 [OPTION]... SRCFILES... DIRECTORY
or: $0 [OPTION]... -t DIRECTORY SRCFILES...
or: $0 [OPTION]... -d DIRECTORIES...
In the 1st form, copy SRCFILE to DSTFILE.
In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
In the 4th, create DIRECTORIES.
Options:
--help display this help and exit.
--version display version info and exit.
-c (ignored)
-C install only if different (preserve the last data modification time)
-d create directories instead of installing files.
-g GROUP $chgrpprog installed files to GROUP.
-m MODE $chmodprog installed files to MODE.
-o USER $chownprog installed files to USER.
-s $stripprog installed files.
-t DIRECTORY install into DIRECTORY.
-T report an error if DSTFILE is a directory.
Environment variables override the default commands:
CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
RMPROG STRIPPROG
"
while test $# -ne 0; do
case $1 in
-c) ;;
-C) copy_on_change=true;;
-d) dir_arg=true;;
-g) chgrpcmd="$chgrpprog $2"
shift;;
--help) echo "$usage"; exit $?;;
-m) mode=$2
case $mode in
*' '* | *' '* | *'
'* | *'*'* | *'?'* | *'['*)
echo "$0: invalid mode: $mode" >&2
exit 1;;
esac
shift;;
-o) chowncmd="$chownprog $2"
shift;;
-s) stripcmd=$stripprog;;
-t) dst_arg=$2
shift;;
-T) no_target_directory=true;;
--version) echo "$0 $scriptversion"; exit $?;;
--) shift
break;;
-*) echo "$0: invalid option: $1" >&2
exit 1;;
*) break;;
esac
shift
done
if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
# When -d is used, all remaining arguments are directories to create.
# When -t is used, the destination is already specified.
# Otherwise, the last argument is the destination. Remove it from $@.
for arg
do
if test -n "$dst_arg"; then
# $@ is not empty: it contains at least $arg.
set fnord "$@" "$dst_arg"
shift # fnord
fi
shift # arg
dst_arg=$arg
done
fi
if test $# -eq 0; then
if test -z "$dir_arg"; then
echo "$0: no input file specified." >&2
exit 1
fi
# It's OK to call `install-sh -d' without argument.
# This can happen when creating conditional directories.
exit 0
fi
if test -z "$dir_arg"; then
trap '(exit $?); exit' 1 2 13 15
# Set umask so as not to create temps with too-generous modes.
# However, 'strip' requires both read and write access to temps.
case $mode in
# Optimize common cases.
*644) cp_umask=133;;
*755) cp_umask=22;;
*[0-7])
if test -z "$stripcmd"; then
u_plus_rw=
else
u_plus_rw='% 200'
fi
cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
*)
if test -z "$stripcmd"; then
u_plus_rw=
else
u_plus_rw=,u+rw
fi
cp_umask=$mode$u_plus_rw;;
esac
fi
for src
do
# Protect names starting with `-'.
case $src in
-*) src=./$src;;
esac
if test -n "$dir_arg"; then
dst=$src
dstdir=$dst
test -d "$dstdir"
dstdir_status=$?
else
# Waiting for this to be detected by the "$cpprog $src $dsttmp" command
# might cause directories to be created, which would be especially bad
# if $src (and thus $dsttmp) contains '*'.
if test ! -f "$src" && test ! -d "$src"; then
echo "$0: $src does not exist." >&2
exit 1
fi
if test -z "$dst_arg"; then
echo "$0: no destination specified." >&2
exit 1
fi
dst=$dst_arg
# Protect names starting with `-'.
case $dst in
-*) dst=./$dst;;
esac
# If destination is a directory, append the input filename; won't work
# if double slashes aren't ignored.
if test -d "$dst"; then
if test -n "$no_target_directory"; then
echo "$0: $dst_arg: Is a directory" >&2
exit 1
fi
dstdir=$dst
dst=$dstdir/`basename "$src"`
dstdir_status=0
else
# Prefer dirname, but fall back on a substitute if dirname fails.
dstdir=`
(dirname "$dst") 2>/dev/null ||
expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$dst" : 'X\(//\)[^/]' \| \
X"$dst" : 'X\(//\)$' \| \
X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
echo X"$dst" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
s//\1/
q
}
/^X\(\/\/\)[^/].*/{
s//\1/
q
}
/^X\(\/\/\)$/{
s//\1/
q
}
/^X\(\/\).*/{
s//\1/
q
}
s/.*/./; q'
`
test -d "$dstdir"
dstdir_status=$?
fi
fi
obsolete_mkdir_used=false
if test $dstdir_status != 0; then
case $posix_mkdir in
'')
# Create intermediate dirs using mode 755 as modified by the umask.
# This is like FreeBSD 'install' as of 1997-10-28.
umask=`umask`
case $stripcmd.$umask in
# Optimize common cases.
*[2367][2367]) mkdir_umask=$umask;;
.*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
*[0-7])
mkdir_umask=`expr $umask + 22 \
- $umask % 100 % 40 + $umask % 20 \
- $umask % 10 % 4 + $umask % 2
`;;
*) mkdir_umask=$umask,go-w;;
esac
# With -d, create the new directory with the user-specified mode.
# Otherwise, rely on $mkdir_umask.
if test -n "$dir_arg"; then
mkdir_mode=-m$mode
else
mkdir_mode=
fi
posix_mkdir=false
case $umask in
*[123567][0-7][0-7])
# POSIX mkdir -p sets u+wx bits regardless of umask, which
# is incompatible with FreeBSD 'install' when (umask & 300) != 0.
;;
*)
tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
if (umask $mkdir_umask &&
exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
then
if test -z "$dir_arg" || {
# Check for POSIX incompatibilities with -m.
# HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
# other-writeable bit of parent directory when it shouldn't.
# FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
ls_ld_tmpdir=`ls -ld "$tmpdir"`
case $ls_ld_tmpdir in
d????-?r-*) different_mode=700;;
d????-?--*) different_mode=755;;
*) false;;
esac &&
$mkdirprog -m$different_mode -p -- "$tmpdir" && {
ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
}
}
then posix_mkdir=:
fi
rmdir "$tmpdir/d" "$tmpdir"
else
# Remove any dirs left behind by ancient mkdir implementations.
rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
fi
trap '' 0;;
esac;;
esac
if
$posix_mkdir && (
umask $mkdir_umask &&
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
)
then :
else
# The umask is ridiculous, or mkdir does not conform to POSIX,
# or it failed possibly due to a race condition. Create the
# directory the slow way, step by step, checking for races as we go.
case $dstdir in
/*) prefix='/';;
-*) prefix='./';;
*) prefix='';;
esac
eval "$initialize_posix_glob"
oIFS=$IFS
IFS=/
$posix_glob set -f
set fnord $dstdir
shift
$posix_glob set +f
IFS=$oIFS
prefixes=
for d
do
test -z "$d" && continue
prefix=$prefix$d
if test -d "$prefix"; then
prefixes=
else
if $posix_mkdir; then
(umask=$mkdir_umask &&
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
# Don't fail if two instances are running concurrently.
test -d "$prefix" || exit 1
else
case $prefix in
*\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
*) qprefix=$prefix;;
esac
prefixes="$prefixes '$qprefix'"
fi
fi
prefix=$prefix/
done
if test -n "$prefixes"; then
# Don't fail if two instances are running concurrently.
(umask $mkdir_umask &&
eval "\$doit_exec \$mkdirprog $prefixes") ||
test -d "$dstdir" || exit 1
obsolete_mkdir_used=true
fi
fi
fi
if test -n "$dir_arg"; then
{ test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
{ test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
else
# Make a couple of temp file names in the proper directory.
dsttmp=$dstdir/_inst.$$_
rmtmp=$dstdir/_rm.$$_
# Trap to clean up those temp files at exit.
trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
# Copy the file name to the temp name.
(umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
# and set any options; do chmod last to preserve setuid bits.
#
# If any of these fail, we abort the whole thing. If we want to
# ignore errors from any of these, just make sure not to ignore
# errors from the above "$doit $cpprog $src $dsttmp" command.
#
{ test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
{ test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
{ test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
# If -C, don't bother to copy if it wouldn't change the file.
if $copy_on_change &&
old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
eval "$initialize_posix_glob" &&
$posix_glob set -f &&
set X $old && old=:$2:$4:$5:$6 &&
set X $new && new=:$2:$4:$5:$6 &&
$posix_glob set +f &&
test "$old" = "$new" &&
$cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
then
rm -f "$dsttmp"
else
# Rename the file to the real destination.
$doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
# The rename failed, perhaps because mv can't rename something else
# to itself, or perhaps because mv is so ancient that it does not
# support -f.
{
# Now remove or move aside any old file at destination location.
# We try this two ways since rm can't unlink itself on some
# systems and the destination file might be busy for other
# reasons. In this case, the final cleanup might fail but the new
# file should still install successfully.
{
test ! -f "$dst" ||
$doit $rmcmd -f "$dst" 2>/dev/null ||
{ $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
{ $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
} ||
{ echo "$0: cannot unlink or rename $dst" >&2
(exit 1); exit 1
}
} &&
# Now rename the file to the real destination.
$doit $mvcmd "$dsttmp" "$dst"
}
fi || exit 1
trap '' 0
fi
done
# Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-time-zone: "UTC"
# time-stamp-end: "; # UTC"
# End:

8413
heimdall/ltmain.sh Executable file

File diff suppressed because it is too large Load Diff

7377
heimdall/m4/libtool.m4 vendored Normal file

File diff suppressed because it is too large Load Diff

368
heimdall/m4/ltoptions.m4 vendored Normal file
View File

@ -0,0 +1,368 @@
# Helper functions for option handling. -*- Autoconf -*-
#
# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
# Written by Gary V. Vaughan, 2004
#
# This file is free software; the Free Software Foundation gives
# unlimited permission to copy and/or distribute it, with or without
# modifications, as long as this notice is preserved.
# serial 6 ltoptions.m4
# This is to help aclocal find these macros, as it can't see m4_define.
AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
# ------------------------------------------
m4_define([_LT_MANGLE_OPTION],
[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
# ---------------------------------------
# Set option OPTION-NAME for macro MACRO-NAME, and if there is a
# matching handler defined, dispatch to it. Other OPTION-NAMEs are
# saved as a flag.
m4_define([_LT_SET_OPTION],
[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
_LT_MANGLE_DEFUN([$1], [$2]),
[m4_warning([Unknown $1 option `$2'])])[]dnl
])
# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
# ------------------------------------------------------------
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
m4_define([_LT_IF_OPTION],
[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
# -------------------------------------------------------
# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
# are set.
m4_define([_LT_UNLESS_OPTIONS],
[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
[m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
[m4_define([$0_found])])])[]dnl
m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
])[]dnl
])
# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
# ----------------------------------------
# OPTION-LIST is a space-separated list of Libtool options associated
# with MACRO-NAME. If any OPTION has a matching handler declared with
# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
# the unknown option and exit.
m4_defun([_LT_SET_OPTIONS],
[# Set options
m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
[_LT_SET_OPTION([$1], _LT_Option)])
m4_if([$1],[LT_INIT],[
dnl
dnl Simply set some default values (i.e off) if boolean options were not
dnl specified:
_LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
])
_LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
])
dnl
dnl If no reference was made to various pairs of opposing options, then
dnl we run the default mode handler for the pair. For example, if neither
dnl `shared' nor `disable-shared' was passed, we enable building of shared
dnl archives by default:
_LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
_LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
_LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
_LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
[_LT_ENABLE_FAST_INSTALL])
])
])# _LT_SET_OPTIONS
## --------------------------------- ##
## Macros to handle LT_INIT options. ##
## --------------------------------- ##
# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
# -----------------------------------------
m4_define([_LT_MANGLE_DEFUN],
[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
# -----------------------------------------------
m4_define([LT_OPTION_DEFINE],
[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
])# LT_OPTION_DEFINE
# dlopen
# ------
LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
])
AU_DEFUN([AC_LIBTOOL_DLOPEN],
[_LT_SET_OPTION([LT_INIT], [dlopen])
AC_DIAGNOSE([obsolete],
[$0: Remove this warning and the call to _LT_SET_OPTION when you
put the `dlopen' option into LT_INIT's first parameter.])
])
dnl aclocal-1.4 backwards compatibility:
dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
# win32-dll
# ---------
# Declare package support for building win32 dll's.
LT_OPTION_DEFINE([LT_INIT], [win32-dll],
[enable_win32_dll=yes
case $host in
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*)
AC_CHECK_TOOL(AS, as, false)
AC_CHECK_TOOL(DLLTOOL, dlltool, false)
AC_CHECK_TOOL(OBJDUMP, objdump, false)
;;
esac
test -z "$AS" && AS=as
_LT_DECL([], [AS], [0], [Assembler program])dnl
test -z "$DLLTOOL" && DLLTOOL=dlltool
_LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl
test -z "$OBJDUMP" && OBJDUMP=objdump
_LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl
])# win32-dll
AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
_LT_SET_OPTION([LT_INIT], [win32-dll])
AC_DIAGNOSE([obsolete],
[$0: Remove this warning and the call to _LT_SET_OPTION when you
put the `win32-dll' option into LT_INIT's first parameter.])
])
dnl aclocal-1.4 backwards compatibility:
dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
# _LT_ENABLE_SHARED([DEFAULT])
# ----------------------------
# implement the --enable-shared flag, and supports the `shared' and
# `disable-shared' LT_INIT options.
# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
m4_define([_LT_ENABLE_SHARED],
[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
AC_ARG_ENABLE([shared],
[AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
[build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
[p=${PACKAGE-default}
case $enableval in
yes) enable_shared=yes ;;
no) enable_shared=no ;;
*)
enable_shared=no
# Look at the argument we got. We use all the common list separators.
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
for pkg in $enableval; do
IFS="$lt_save_ifs"
if test "X$pkg" = "X$p"; then
enable_shared=yes
fi
done
IFS="$lt_save_ifs"
;;
esac],
[enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
_LT_DECL([build_libtool_libs], [enable_shared], [0],
[Whether or not to build shared libraries])
])# _LT_ENABLE_SHARED
LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
# Old names:
AC_DEFUN([AC_ENABLE_SHARED],
[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
])
AC_DEFUN([AC_DISABLE_SHARED],
[_LT_SET_OPTION([LT_INIT], [disable-shared])
])
AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
dnl aclocal-1.4 backwards compatibility:
dnl AC_DEFUN([AM_ENABLE_SHARED], [])
dnl AC_DEFUN([AM_DISABLE_SHARED], [])
# _LT_ENABLE_STATIC([DEFAULT])
# ----------------------------
# implement the --enable-static flag, and support the `static' and
# `disable-static' LT_INIT options.
# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
m4_define([_LT_ENABLE_STATIC],
[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
AC_ARG_ENABLE([static],
[AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
[build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
[p=${PACKAGE-default}
case $enableval in
yes) enable_static=yes ;;
no) enable_static=no ;;
*)
enable_static=no
# Look at the argument we got. We use all the common list separators.
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
for pkg in $enableval; do
IFS="$lt_save_ifs"
if test "X$pkg" = "X$p"; then
enable_static=yes
fi
done
IFS="$lt_save_ifs"
;;
esac],
[enable_static=]_LT_ENABLE_STATIC_DEFAULT)
_LT_DECL([build_old_libs], [enable_static], [0],
[Whether or not to build static libraries])
])# _LT_ENABLE_STATIC
LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
# Old names:
AC_DEFUN([AC_ENABLE_STATIC],
[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
])
AC_DEFUN([AC_DISABLE_STATIC],
[_LT_SET_OPTION([LT_INIT], [disable-static])
])
AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
dnl aclocal-1.4 backwards compatibility:
dnl AC_DEFUN([AM_ENABLE_STATIC], [])
dnl AC_DEFUN([AM_DISABLE_STATIC], [])
# _LT_ENABLE_FAST_INSTALL([DEFAULT])
# ----------------------------------
# implement the --enable-fast-install flag, and support the `fast-install'
# and `disable-fast-install' LT_INIT options.
# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
m4_define([_LT_ENABLE_FAST_INSTALL],
[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
AC_ARG_ENABLE([fast-install],
[AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
[optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
[p=${PACKAGE-default}
case $enableval in
yes) enable_fast_install=yes ;;
no) enable_fast_install=no ;;
*)
enable_fast_install=no
# Look at the argument we got. We use all the common list separators.
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
for pkg in $enableval; do
IFS="$lt_save_ifs"
if test "X$pkg" = "X$p"; then
enable_fast_install=yes
fi
done
IFS="$lt_save_ifs"
;;
esac],
[enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
_LT_DECL([fast_install], [enable_fast_install], [0],
[Whether or not to optimize for fast installation])dnl
])# _LT_ENABLE_FAST_INSTALL
LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
# Old names:
AU_DEFUN([AC_ENABLE_FAST_INSTALL],
[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
AC_DIAGNOSE([obsolete],
[$0: Remove this warning and the call to _LT_SET_OPTION when you put
the `fast-install' option into LT_INIT's first parameter.])
])
AU_DEFUN([AC_DISABLE_FAST_INSTALL],
[_LT_SET_OPTION([LT_INIT], [disable-fast-install])
AC_DIAGNOSE([obsolete],
[$0: Remove this warning and the call to _LT_SET_OPTION when you put
the `disable-fast-install' option into LT_INIT's first parameter.])
])
dnl aclocal-1.4 backwards compatibility:
dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
# _LT_WITH_PIC([MODE])
# --------------------
# implement the --with-pic flag, and support the `pic-only' and `no-pic'
# LT_INIT options.
# MODE is either `yes' or `no'. If omitted, it defaults to `both'.
m4_define([_LT_WITH_PIC],
[AC_ARG_WITH([pic],
[AS_HELP_STRING([--with-pic],
[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
[pic_mode="$withval"],
[pic_mode=default])
test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
])# _LT_WITH_PIC
LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
# Old name:
AU_DEFUN([AC_LIBTOOL_PICMODE],
[_LT_SET_OPTION([LT_INIT], [pic-only])
AC_DIAGNOSE([obsolete],
[$0: Remove this warning and the call to _LT_SET_OPTION when you
put the `pic-only' option into LT_INIT's first parameter.])
])
dnl aclocal-1.4 backwards compatibility:
dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
## ----------------- ##
## LTDL_INIT Options ##
## ----------------- ##
m4_define([_LTDL_MODE], [])
LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
[m4_define([_LTDL_MODE], [nonrecursive])])
LT_OPTION_DEFINE([LTDL_INIT], [recursive],
[m4_define([_LTDL_MODE], [recursive])])
LT_OPTION_DEFINE([LTDL_INIT], [subproject],
[m4_define([_LTDL_MODE], [subproject])])
m4_define([_LTDL_TYPE], [])
LT_OPTION_DEFINE([LTDL_INIT], [installable],
[m4_define([_LTDL_TYPE], [installable])])
LT_OPTION_DEFINE([LTDL_INIT], [convenience],
[m4_define([_LTDL_TYPE], [convenience])])

123
heimdall/m4/ltsugar.m4 vendored Normal file
View File

@ -0,0 +1,123 @@
# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*-
#
# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
# Written by Gary V. Vaughan, 2004
#
# This file is free software; the Free Software Foundation gives
# unlimited permission to copy and/or distribute it, with or without
# modifications, as long as this notice is preserved.
# serial 6 ltsugar.m4
# This is to help aclocal find these macros, as it can't see m4_define.
AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
# lt_join(SEP, ARG1, [ARG2...])
# -----------------------------
# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
# associated separator.
# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
# versions in m4sugar had bugs.
m4_define([lt_join],
[m4_if([$#], [1], [],
[$#], [2], [[$2]],
[m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
m4_define([_lt_join],
[m4_if([$#$2], [2], [],
[m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
# lt_car(LIST)
# lt_cdr(LIST)
# ------------
# Manipulate m4 lists.
# These macros are necessary as long as will still need to support
# Autoconf-2.59 which quotes differently.
m4_define([lt_car], [[$1]])
m4_define([lt_cdr],
[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
[$#], 1, [],
[m4_dquote(m4_shift($@))])])
m4_define([lt_unquote], $1)
# lt_append(MACRO-NAME, STRING, [SEPARATOR])
# ------------------------------------------
# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
# Note that neither SEPARATOR nor STRING are expanded; they are appended
# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
# No SEPARATOR is output if MACRO-NAME was previously undefined (different
# than defined and empty).
#
# This macro is needed until we can rely on Autoconf 2.62, since earlier
# versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
m4_define([lt_append],
[m4_define([$1],
m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
# ----------------------------------------------------------
# Produce a SEP delimited list of all paired combinations of elements of
# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list
# has the form PREFIXmINFIXSUFFIXn.
# Needed until we can rely on m4_combine added in Autoconf 2.62.
m4_define([lt_combine],
[m4_if(m4_eval([$# > 3]), [1],
[m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
[[m4_foreach([_Lt_prefix], [$2],
[m4_foreach([_Lt_suffix],
]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
[_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
# -----------------------------------------------------------------------
# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
m4_define([lt_if_append_uniq],
[m4_ifdef([$1],
[m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
[lt_append([$1], [$2], [$3])$4],
[$5])],
[lt_append([$1], [$2], [$3])$4])])
# lt_dict_add(DICT, KEY, VALUE)
# -----------------------------
m4_define([lt_dict_add],
[m4_define([$1($2)], [$3])])
# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
# --------------------------------------------
m4_define([lt_dict_add_subkey],
[m4_define([$1($2:$3)], [$4])])
# lt_dict_fetch(DICT, KEY, [SUBKEY])
# ----------------------------------
m4_define([lt_dict_fetch],
[m4_ifval([$3],
m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
# -----------------------------------------------------------------
m4_define([lt_if_dict_fetch],
[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
[$5],
[$6])])
# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
# --------------------------------------------------------------
m4_define([lt_dict_filter],
[m4_if([$5], [], [],
[lt_join(m4_quote(m4_default([$4], [[, ]])),
lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
[lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
])

23
heimdall/m4/ltversion.m4 vendored Normal file
View File

@ -0,0 +1,23 @@
# ltversion.m4 -- version numbers -*- Autoconf -*-
#
# Copyright (C) 2004 Free Software Foundation, Inc.
# Written by Scott James Remnant, 2004
#
# This file is free software; the Free Software Foundation gives
# unlimited permission to copy and/or distribute it, with or without
# modifications, as long as this notice is preserved.
# Generated from ltversion.in.
# serial 3017 ltversion.m4
# This file is part of GNU Libtool
m4_define([LT_PACKAGE_VERSION], [2.2.6b])
m4_define([LT_PACKAGE_REVISION], [1.3017])
AC_DEFUN([LTVERSION_VERSION],
[macro_version='2.2.6b'
macro_revision='1.3017'
_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
_LT_DECL(, macro_revision, 0)
])

92
heimdall/m4/lt~obsolete.m4 vendored Normal file
View File

@ -0,0 +1,92 @@
# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
#
# Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc.
# Written by Scott James Remnant, 2004.
#
# This file is free software; the Free Software Foundation gives
# unlimited permission to copy and/or distribute it, with or without
# modifications, as long as this notice is preserved.
# serial 4 lt~obsolete.m4
# These exist entirely to fool aclocal when bootstrapping libtool.
#
# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
# which have later been changed to m4_define as they aren't part of the
# exported API, or moved to Autoconf or Automake where they belong.
#
# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN
# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
# using a macro with the same name in our local m4/libtool.m4 it'll
# pull the old libtool.m4 in (it doesn't see our shiny new m4_define
# and doesn't know about Autoconf macros at all.)
#
# So we provide this file, which has a silly filename so it's always
# included after everything else. This provides aclocal with the
# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
# because those macros already exist, or will be overwritten later.
# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
#
# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
# Yes, that means every name once taken will need to remain here until
# we give up compatibility with versions before 1.7, at which point
# we need to keep only those names which we still refer to.
# This is to help aclocal find these macros, as it can't see m4_define.
AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])])
m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])])
m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])])
m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])])
m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])])
m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])])
m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])])
m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])])
m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])])
m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])])
m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])])
m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])])
m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])])
m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])])
m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])])
m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])])
m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])])
m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])])
m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])])
m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])])
m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])])
m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])])
m4_ifndef([AC_LIBTOOL_RC], [AC_DEFUN([AC_LIBTOOL_RC])])
m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])])
m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])

376
heimdall/missing Executable file
View File

@ -0,0 +1,376 @@
#! /bin/sh
# Common stub for a few missing GNU programs while installing.
scriptversion=2009-04-28.21; # UTC
# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006,
# 2008, 2009 Free Software Foundation, Inc.
# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
if test $# -eq 0; then
echo 1>&2 "Try \`$0 --help' for more information"
exit 1
fi
run=:
sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p'
sed_minuso='s/.* -o \([^ ]*\).*/\1/p'
# In the cases where this matters, `missing' is being run in the
# srcdir already.
if test -f configure.ac; then
configure_ac=configure.ac
else
configure_ac=configure.in
fi
msg="missing on your system"
case $1 in
--run)
# Try to run requested program, and just exit if it succeeds.
run=
shift
"$@" && exit 0
# Exit code 63 means version mismatch. This often happens
# when the user try to use an ancient version of a tool on
# a file that requires a minimum version. In this case we
# we should proceed has if the program had been absent, or
# if --run hadn't been passed.
if test $? = 63; then
run=:
msg="probably too old"
fi
;;
-h|--h|--he|--hel|--help)
echo "\
$0 [OPTION]... PROGRAM [ARGUMENT]...
Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
error status if there is no known handling for PROGRAM.
Options:
-h, --help display this help and exit
-v, --version output version information and exit
--run try to run the given command, and emulate it if it fails
Supported PROGRAM values:
aclocal touch file \`aclocal.m4'
autoconf touch file \`configure'
autoheader touch file \`config.h.in'
autom4te touch the output file, or create a stub one
automake touch all \`Makefile.in' files
bison create \`y.tab.[ch]', if possible, from existing .[ch]
flex create \`lex.yy.c', if possible, from existing .c
help2man touch the output file
lex create \`lex.yy.c', if possible, from existing .c
makeinfo touch the output file
tar try tar, gnutar, gtar, then tar without non-portable flags
yacc create \`y.tab.[ch]', if possible, from existing .[ch]
Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and
\`g' are ignored when checking the name.
Send bug reports to <bug-automake@gnu.org>."
exit $?
;;
-v|--v|--ve|--ver|--vers|--versi|--versio|--version)
echo "missing $scriptversion (GNU Automake)"
exit $?
;;
-*)
echo 1>&2 "$0: Unknown \`$1' option"
echo 1>&2 "Try \`$0 --help' for more information"
exit 1
;;
esac
# normalize program name to check for.
program=`echo "$1" | sed '
s/^gnu-//; t
s/^gnu//; t
s/^g//; t'`
# Now exit if we have it, but it failed. Also exit now if we
# don't have it and --version was passed (most likely to detect
# the program). This is about non-GNU programs, so use $1 not
# $program.
case $1 in
lex*|yacc*)
# Not GNU programs, they don't have --version.
;;
tar*)
if test -n "$run"; then
echo 1>&2 "ERROR: \`tar' requires --run"
exit 1
elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
exit 1
fi
;;
*)
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
# We have it, but it failed.
exit 1
elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
# Could not run --version or --help. This is probably someone
# running `$TOOL --version' or `$TOOL --help' to check whether
# $TOOL exists and not knowing $TOOL uses missing.
exit 1
fi
;;
esac
# If it does not exist, or fails to run (possibly an outdated version),
# try to emulate it.
case $program in
aclocal*)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified \`acinclude.m4' or \`${configure_ac}'. You might want
to install the \`Automake' and \`Perl' packages. Grab them from
any GNU archive site."
touch aclocal.m4
;;
autoconf*)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified \`${configure_ac}'. You might want to install the
\`Autoconf' and \`GNU m4' packages. Grab them from any GNU
archive site."
touch configure
;;
autoheader*)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified \`acconfig.h' or \`${configure_ac}'. You might want
to install the \`Autoconf' and \`GNU m4' packages. Grab them
from any GNU archive site."
files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
test -z "$files" && files="config.h"
touch_files=
for f in $files; do
case $f in
*:*) touch_files="$touch_files "`echo "$f" |
sed -e 's/^[^:]*://' -e 's/:.*//'`;;
*) touch_files="$touch_files $f.in";;
esac
done
touch $touch_files
;;
automake*)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
You might want to install the \`Automake' and \`Perl' packages.
Grab them from any GNU archive site."
find . -type f -name Makefile.am -print |
sed 's/\.am$/.in/' |
while read f; do touch "$f"; done
;;
autom4te*)
echo 1>&2 "\
WARNING: \`$1' is needed, but is $msg.
You might have modified some files without having the
proper tools for further handling them.
You can get \`$1' as part of \`Autoconf' from any GNU
archive site."
file=`echo "$*" | sed -n "$sed_output"`
test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
if test -f "$file"; then
touch $file
else
test -z "$file" || exec >$file
echo "#! /bin/sh"
echo "# Created by GNU Automake missing as a replacement of"
echo "# $ $@"
echo "exit 0"
chmod +x $file
exit 1
fi
;;
bison*|yacc*)
echo 1>&2 "\
WARNING: \`$1' $msg. You should only need it if
you modified a \`.y' file. You may need the \`Bison' package
in order for those modifications to take effect. You can get
\`Bison' from any GNU archive site."
rm -f y.tab.c y.tab.h
if test $# -ne 1; then
eval LASTARG="\${$#}"
case $LASTARG in
*.y)
SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
if test -f "$SRCFILE"; then
cp "$SRCFILE" y.tab.c
fi
SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
if test -f "$SRCFILE"; then
cp "$SRCFILE" y.tab.h
fi
;;
esac
fi
if test ! -f y.tab.h; then
echo >y.tab.h
fi
if test ! -f y.tab.c; then
echo 'main() { return 0; }' >y.tab.c
fi
;;
lex*|flex*)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified a \`.l' file. You may need the \`Flex' package
in order for those modifications to take effect. You can get
\`Flex' from any GNU archive site."
rm -f lex.yy.c
if test $# -ne 1; then
eval LASTARG="\${$#}"
case $LASTARG in
*.l)
SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
if test -f "$SRCFILE"; then
cp "$SRCFILE" lex.yy.c
fi
;;
esac
fi
if test ! -f lex.yy.c; then
echo 'main() { return 0; }' >lex.yy.c
fi
;;
help2man*)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified a dependency of a manual page. You may need the
\`Help2man' package in order for those modifications to take
effect. You can get \`Help2man' from any GNU archive site."
file=`echo "$*" | sed -n "$sed_output"`
test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
if test -f "$file"; then
touch $file
else
test -z "$file" || exec >$file
echo ".ab help2man is required to generate this page"
exit $?
fi
;;
makeinfo*)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified a \`.texi' or \`.texinfo' file, or any other file
indirectly affecting the aspect of the manual. The spurious
call might also be the consequence of using a buggy \`make' (AIX,
DU, IRIX). You might want to install the \`Texinfo' package or
the \`GNU make' package. Grab either from any GNU archive site."
# The file to touch is that specified with -o ...
file=`echo "$*" | sed -n "$sed_output"`
test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
if test -z "$file"; then
# ... or it is the one specified with @setfilename ...
infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
file=`sed -n '
/^@setfilename/{
s/.* \([^ ]*\) *$/\1/
p
q
}' $infile`
# ... or it is derived from the source name (dir/f.texi becomes f.info)
test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
fi
# If the file does not exist, the user really needs makeinfo;
# let's fail without touching anything.
test -f $file || exit 1
touch $file
;;
tar*)
shift
# We have already tried tar in the generic part.
# Look for gnutar/gtar before invocation to avoid ugly error
# messages.
if (gnutar --version > /dev/null 2>&1); then
gnutar "$@" && exit 0
fi
if (gtar --version > /dev/null 2>&1); then
gtar "$@" && exit 0
fi
firstarg="$1"
if shift; then
case $firstarg in
*o*)
firstarg=`echo "$firstarg" | sed s/o//`
tar "$firstarg" "$@" && exit 0
;;
esac
case $firstarg in
*h*)
firstarg=`echo "$firstarg" | sed s/h//`
tar "$firstarg" "$@" && exit 0
;;
esac
fi
echo 1>&2 "\
WARNING: I can't seem to be able to run \`tar' with the given arguments.
You may want to install GNU tar or Free paxutils, or check the
command line arguments."
exit 1
;;
*)
echo 1>&2 "\
WARNING: \`$1' is needed, and is $msg.
You might have modified some files without having the
proper tools for further handling them. Check the \`README' file,
it often tells you about the needed prerequisites for installing
this package. You may also peek at any GNU archive site, in case
some other package would contain this missing \`$1' program."
exit 1
;;
esac
exit 0
# Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-time-zone: "UTC"
# time-stamp-end: "; # UTC"
# End:

5
heimdall/postinstall-pak Normal file
View File

@ -0,0 +1,5 @@
#!/bin/sh
sudo echo "SUBSYSTEM==\"usb\", SYSFS{idVendor}==\"04e8\", SYSFS{idProduct}==\"6601\", MODE=\"0666\"" > /etc/udev/rules.d/60-heimdall-galaxy-s.rules
sudo service udev reload
exit 0

5
heimdall/postremove-pak Normal file
View File

@ -0,0 +1,5 @@
#!/bin/sh
sudo rm /etc/udev/rules.d/60-heimdall-galaxy-s.rules
sudo service udev reload
exit 0

View File

@ -1,215 +0,0 @@
/* Copyright (c) 2010-2017 Benjamin Dobell, Glass Echidna
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.*/
// Heimdall
#include "Arguments.h"
#include "Heimdall.h"
#include "Interface.h"
#include "Utility.h"
using namespace std;
using namespace Heimdall;
FlagArgument *FlagArgument::ParseArgument(const std::string& name, int argc, char **argv, int& argi)
{
return new FlagArgument(name);
}
StringArgument *StringArgument::ParseArgument(const std::string& name, int argc, char **argv, int& argi)
{
if (++argi < argc)
{
return (new StringArgument(name, argv[argi]));
}
else
{
Interface::Print("Missing parameter for argument: %s\n\n", argv[argi - 1]);
return (nullptr);
}
}
UnsignedIntegerArgument *UnsignedIntegerArgument::ParseArgument(const std::string& name, int argc, char **argv, int& argi)
{
UnsignedIntegerArgument *unsignedIntegerArgument = nullptr;
if (++argi < argc)
{
unsigned int value;
if (Utility::ParseUnsignedInt(value, argv[argi]) == kNumberParsingStatusSuccess)
unsignedIntegerArgument = new UnsignedIntegerArgument(name, value);
else
Interface::Print("%s must be a positive integer.", argv[argi - 1]);
}
else
{
Interface::Print("Missing parameter for argument: %s\n\n", argv[argi - 1]);
}
return (unsignedIntegerArgument);
}
Arguments::Arguments(const map<string, ArgumentType>& argumentTypes, const map<string, string>& shortArgumentAliases,
const map<string, string>& argumentAliases) :
argumentTypes(argumentTypes),
shortArgumentAliases(shortArgumentAliases),
argumentAliases(argumentAliases)
{
}
Arguments::~Arguments()
{
for (vector<const Argument *>::const_iterator it = argumentVector.begin(); it != argumentVector.end(); it++)
delete *it;
}
bool Arguments::ParseArguments(int argc, char **argv, int argi)
{
for (; argi < argc; ++argi)
{
string argumentName = argv[argi];
string nonwildcardArgumentName;
if (argumentName.find_first_of("--") == 0)
{
// Regular argument
argumentName = argumentName.substr(2);
nonwildcardArgumentName = argumentName;
}
else if (argumentName.find_first_of("-") == 0)
{
// Short argument alias
string shortArgumentAlias = argumentName.substr(1);
map<string, string>::const_iterator shortAliasIt = shortArgumentAliases.find(shortArgumentAlias);
if (shortAliasIt != shortArgumentAliases.end())
{
argumentName = shortAliasIt->second;
nonwildcardArgumentName = argumentName;
}
else
{
Interface::Print("Unknown argument: %s\n\n", argv[argi]);
return (false);
}
}
else
{
Interface::Print("Invalid argument: %s\n\n", argv[argi]);
return (false);
}
map<string, ArgumentType>::const_iterator argumentTypeIt = argumentTypes.find(argumentName);
if (argumentTypeIt == argumentTypes.end())
{
// No argument with that name, maybe it's an alias...
map<string, string>::const_iterator aliasIt = argumentAliases.find(argumentName);
if (aliasIt != argumentAliases.end())
{
argumentName = aliasIt->second;
nonwildcardArgumentName = argumentName;
argumentTypeIt = argumentTypes.find(argumentName);
}
}
// Handle wilcards
unsigned int unsignedIntName;
if (argumentTypeIt == argumentTypes.end())
{
// Look for the unsigned integer wildcard "%d".
if (Utility::ParseUnsignedInt(unsignedIntName, argumentName.c_str()) == kNumberParsingStatusSuccess)
{
argumentTypeIt = argumentTypes.find("%d");
argumentName = "%d";
}
// Look for the string wildcard "%s"
if (argumentTypeIt == argumentTypes.end())
{
argumentTypeIt = argumentTypes.find("%s");
argumentName = "%s";
}
}
// We don't want to insert wild-cards into our argument map.
if (argumentName == "%d" || argumentName == "%s")
argumentName = nonwildcardArgumentName;
Argument *argument = nullptr;
if (argumentTypeIt != argumentTypes.end())
{
switch (argumentTypeIt->second)
{
case kArgumentTypeFlag:
argument = FlagArgument::ParseArgument(argumentName, argc, argv, argi);
break;
case kArgumentTypeString:
argument = StringArgument::ParseArgument(argumentName, argc, argv, argi);
break;
case kArgumentTypeUnsignedInteger:
argument = UnsignedIntegerArgument::ParseArgument(argumentName, argc, argv, argi);
break;
default:
Interface::Print("Unknown argument type: %s\n\n", argv[argi]);
break;
}
}
else
{
Interface::Print("Unknown argument: %s\n\n", argv[argi]);
}
if (argument)
{
pair<map<string, const Argument *>::iterator, bool> insertResult = argumentMap.insert(pair<string, const Argument *>(argumentName, argument));
if (!insertResult.second)
{
Interface::Print("Duplicate argument: %s (%s)\n\n", argv[argi], argumentName.c_str());
delete argument;
return (false);
}
argumentVector.push_back(argument);
}
else
{
return (false);
}
}
return (true);
}

View File

@ -1,168 +0,0 @@
/* Copyright (c) 2010-2017 Benjamin Dobell, Glass Echidna
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.*/
#ifndef ARGUMENTS_H
#define ARGUMENTS_H
// C/C++ Standard Library
#include <map>
#include <string>
#include <vector>
// Heimdall
#include "Heimdall.h"
namespace Heimdall
{
typedef enum
{
kArgumentTypeFlag = 0,
kArgumentTypeString,
kArgumentTypeUnsignedInteger
} ArgumentType;
class Argument
{
private:
std::string name;
ArgumentType type;
protected:
Argument(const std::string& name, ArgumentType type)
{
this->name = name;
this->type = type;
}
public:
virtual ~Argument()
{
}
const std::string& GetName(void) const
{
return name;
}
ArgumentType GetType(void) const
{
return type;
}
};
class FlagArgument : public Argument
{
private:
FlagArgument(const std::string& name) : Argument(name, kArgumentTypeFlag)
{
}
public:
static FlagArgument *ParseArgument(const std::string& name, int argc, char **argv, int& argi);
};
class StringArgument : public Argument
{
private:
std::string value;
StringArgument(const std::string& name, const std::string& value) : Argument(name, kArgumentTypeString)
{
this->value = value;
}
public:
static StringArgument *ParseArgument(const std::string& name, int argc, char **argv, int& argi);
const std::string& GetValue(void) const
{
return (value);
}
};
class UnsignedIntegerArgument : public Argument
{
private:
unsigned int value;
UnsignedIntegerArgument(const std::string& name, unsigned int value) : Argument(name, kArgumentTypeUnsignedInteger)
{
this->value = value;
}
public:
static UnsignedIntegerArgument *ParseArgument(const std::string& name, int argc, char **argv, int& argi);
unsigned int GetValue(void) const
{
return (value);
}
};
class Arguments
{
private:
const std::map<std::string, ArgumentType> argumentTypes;
const std::map<std::string, std::string> shortArgumentAliases;
const std::map<std::string, std::string> argumentAliases;
std::vector<const Argument *> argumentVector;
std::map<std::string, const Argument *> argumentMap;
public:
Arguments(const std::map<std::string, ArgumentType>& argumentTypes,
const std::map<std::string, std::string>& shortArgumentAliases = (std::map<std::string, std::string>()),
const std::map<std::string, std::string>& argumentAliases = (std::map<std::string, std::string>()));
~Arguments();
// argi is the index of the first argument to parse.
bool ParseArguments(int argc, char **argv, int argi);
const Argument *GetArgument(std::string argumentName) const
{
std::map<std::string, const Argument *>::const_iterator it = argumentMap.find(argumentName);
return (it != argumentMap.end() ? it->second : nullptr);
}
const std::map<std::string, ArgumentType>& GetArgumentTypes(void) const
{
return (argumentTypes);
}
const std::vector<const Argument *>& GetArguments(void) const
{
return (argumentVector);
}
};
}
#endif

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2010-2017 Benjamin Dobell, Glass Echidna
/* Copyright (c) 2010-2011 Benjamin Dobell, Glass Echidna
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@ -1,54 +0,0 @@
/* Copyright (c) 2010-2017 Benjamin Dobell, Glass Echidna
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.*/
#ifndef BEGINSESSIONPACKET_H
#define BEGINSESSIONPACKET_H
// Heimdall
#include "SessionSetupPacket.h"
namespace Heimdall
{
class BeginSessionPacket : public SessionSetupPacket
{
protected:
enum
{
kDataSize = SessionSetupPacket::kDataSize + 4
};
public:
BeginSessionPacket() : SessionSetupPacket(SessionSetupPacket::kBeginSession)
{
}
void Pack(void)
{
SessionSetupPacket::Pack();
/* Odin protocol version. */
PackInteger(SessionSetupPacket::kDataSize, 0x4);
}
};
}
#endif

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2010-2017 Benjamin Dobell, Glass Echidna
/* Copyright (c) 2010-2011 Benjamin Dobell, Glass Echidna
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@ -21,9 +21,6 @@
#ifndef BRIDGEMANAGER_H
#define BRIDGEMANAGER_H
// libpit
#include "libpit.h"
// Heimdall
#include "Heimdall.h"
@ -44,8 +41,8 @@ namespace Heimdall
const int productId;
DeviceIdentifier(int vid, int pid) :
vendorId(vid),
productId(pid)
vendorId(vid),
productId(pid)
{
}
};
@ -56,7 +53,10 @@ namespace Heimdall
enum
{
kSupportedDeviceCount = 3
kSupportedDeviceCount = 3,
kCommunicationDelayDefault = 0,
kDumpBufferSize = 4096
};
enum
@ -73,35 +73,9 @@ namespace Heimdall
enum
{
kPidGalaxyS = 0x6601,
kPidGalaxyS2 = 0x685D,
kPidDroidCharge = 0x68C3
};
enum
{
kDefaultTimeoutSend = 3000,
kDefaultTimeoutReceive = 3000,
kDefaultTimeoutEmptyTransfer = 100
};
enum class UsbLogLevel
{
None = 0,
Error,
Warning,
Info,
Debug,
Default = Error
};
enum
{
kEmptyTransferNone = 0,
kEmptyTransferBefore = 1,
kEmptyTransferAfter = 1 << 1,
kEmptyTransferBeforeAndAfter = kEmptyTransferBefore | kEmptyTransferAfter
kPidGalaxyS = 0x6601,
kPidGalaxyS2 = 0x685D,
kPidDroidCharge = 0x68C3
};
private:
@ -113,13 +87,11 @@ namespace Heimdall
libusb_context *libusbContext;
libusb_device_handle *deviceHandle;
libusb_device *heimdallDevice;
int interfaceIndex;
int altSettingIndex;
int inEndpoint;
int outEndpoint;
bool interfaceClaimed;
int communicationDelay;
#ifdef OS_LINUX
@ -127,52 +99,30 @@ namespace Heimdall
#endif
unsigned int fileTransferSequenceMaxLength;
unsigned int fileTransferPacketSize;
unsigned int fileTransferSequenceTimeout;
UsbLogLevel usbLogLevel;
int FindDeviceInterface(void);
bool ClaimDeviceInterface(void);
bool SetupDeviceInterface(void);
void ReleaseDeviceInterface(void);
bool InitialiseProtocol(void);
bool SendBulkTransfer(unsigned char *data, int length, int timeout, bool retry = true) const;
int ReceiveBulkTransfer(unsigned char *data, int length, int timeout, bool retry = true) const;
bool CheckProtocol(void) const;
bool InitialiseProtocol(void) const;
public:
BridgeManager(bool verbose);
BridgeManager(bool verbose, int communicationDelay);
~BridgeManager();
bool DetectDevice(void);
int Initialise(bool resume);
int Initialise(void);
bool BeginSession(void);
bool BeginSession(void) const;
bool EndSession(bool reboot) const;
bool SendPacket(OutboundPacket *packet, int timeout = kDefaultTimeoutSend, int emptyTransferFlags = kEmptyTransferAfter) const;
bool ReceivePacket(InboundPacket *packet, int timeout = kDefaultTimeoutReceive, int emptyTransferFlags = kEmptyTransferNone) const;
bool SendPacket(OutboundPacket *packet, int timeout = 3000, bool retry = true) const;
bool ReceivePacket(InboundPacket *packet, int timeout = 3000, bool retry = true) const;
bool RequestDeviceType(unsigned int request, int *result) const;
bool RequestDeviceInfo(unsigned int request, int *result) const;
bool SendPitData(const libpit::PitData *pitData) const;
bool SendPitFile(FILE *file) const;
int ReceivePitFile(unsigned char **pitBuffer) const;
int DownloadPitFile(unsigned char **pitBuffer) const; // Thin wrapper around ReceivePitFile() with additional logging.
bool SendFile(FILE *file, unsigned int destination, unsigned int deviceType, unsigned int fileIdentifier = 0xFFFFFFFF) const;
void SetUsbLogLevel(UsbLogLevel usbLogLevel);
#ifdef OS_LINUX
bool IsUbuntu(void);
#endif
UsbLogLevel GetUsbLogLevel(void) const
{
return usbLogLevel;
}
bool SendFile(FILE *file, int destination, int fileIdentifier = -1) const;
bool ReceiveDump(int chipType, int chipId, FILE *file) const;
bool IsVerbose(void) const
{

View File

@ -1,130 +0,0 @@
/* Copyright (c) 2010-2017 Benjamin Dobell, Glass Echidna
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.*/
// Heimdall
#include "Arguments.h"
#include "BridgeManager.h"
#include "ClosePcScreenAction.h"
#include "Heimdall.h"
#include "Interface.h"
using namespace std;
using namespace Heimdall;
const char *ClosePcScreenAction::usage = "Action: close-pc-screen\n\
Arguments: [--verbose] [--no-reboot] [--resume] [--stdout-errors]\n\
[--usb-log-level <none/error/warning/debug>]\n\
Description: Attempts to get rid off the \"connect phone to PC\" screen.\n\
Note: --no-reboot causes the device to remain in download mode after the action\n\
is completed. If you wish to perform another action whilst remaining in\n\
download mode, then the following action must specify the --resume flag.\n";
int ClosePcScreenAction::Execute(int argc, char **argv)
{
// Handle arguments
map<string, ArgumentType> argumentTypes;
argumentTypes["no-reboot"] = kArgumentTypeFlag;
argumentTypes["resume"] = kArgumentTypeFlag;
argumentTypes["verbose"] = kArgumentTypeFlag;
argumentTypes["stdout-errors"] = kArgumentTypeFlag;
argumentTypes["usb-log-level"] = kArgumentTypeString;
Arguments arguments(argumentTypes);
if (!arguments.ParseArguments(argc, argv, 2))
{
Interface::Print(ClosePcScreenAction::usage);
return (0);
}
const StringArgument *usbLogLevelArgument = static_cast<const StringArgument *>(arguments.GetArgument("usb-log-level"));
BridgeManager::UsbLogLevel usbLogLevel = BridgeManager::UsbLogLevel::Default;
if (usbLogLevelArgument)
{
const string& usbLogLevelString = usbLogLevelArgument->GetValue();
if (usbLogLevelString.compare("none") == 0 || usbLogLevelString.compare("NONE") == 0)
{
usbLogLevel = BridgeManager::UsbLogLevel::None;
}
else if (usbLogLevelString.compare("error") == 0 || usbLogLevelString.compare("ERROR") == 0)
{
usbLogLevel = BridgeManager::UsbLogLevel::Error;
}
else if (usbLogLevelString.compare("warning") == 0 || usbLogLevelString.compare("WARNING") == 0)
{
usbLogLevel = BridgeManager::UsbLogLevel::Warning;
}
else if (usbLogLevelString.compare("info") == 0 || usbLogLevelString.compare("INFO") == 0)
{
usbLogLevel = BridgeManager::UsbLogLevel::Info;
}
else if (usbLogLevelString.compare("debug") == 0 || usbLogLevelString.compare("DEBUG") == 0)
{
usbLogLevel = BridgeManager::UsbLogLevel::Debug;
}
else
{
Interface::Print("Unknown USB log level: %s\n\n", usbLogLevelString.c_str());
Interface::Print(ClosePcScreenAction::usage);
return (0);
}
}
bool reboot = arguments.GetArgument("no-reboot") == nullptr;
bool resume = arguments.GetArgument("resume") != nullptr;
bool verbose = arguments.GetArgument("verbose") != nullptr;
if (arguments.GetArgument("stdout-errors") != nullptr)
Interface::SetStdoutErrors(true);
// Info
Interface::PrintReleaseInfo();
Sleep(1000);
// Download PIT file from device.
BridgeManager *bridgeManager = new BridgeManager(verbose);
bridgeManager->SetUsbLogLevel(usbLogLevel);
if (bridgeManager->Initialise(resume) != BridgeManager::kInitialiseSucceeded || !bridgeManager->BeginSession())
{
delete bridgeManager;
return (1);
}
Interface::Print("Attempting to close connect to pc screen...\n");
bool success = bridgeManager->EndSession(reboot);
delete bridgeManager;
if (success)
{
Interface::Print("Attempt complete\n");
return (0);
}
else
{
return (1);
}
}

View File

@ -1,34 +0,0 @@
/* Copyright (c) 2010-2017 Benjamin Dobell, Glass Echidna
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.*/
#ifndef CLOSEPCSCREENACTION_H
#define CLOSEPCSCREENACTION_H
namespace Heimdall
{
namespace ClosePcScreenAction
{
extern const char *usage;
int Execute(int argc, char **argv);
}
}
#endif

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2010-2017 Benjamin Dobell, Glass Echidna
/* Copyright (c) 2010-2011 Benjamin Dobell, Glass Echidna
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@ -32,10 +32,10 @@ namespace Heimdall
enum
{
kControlTypeSession = 0x64,
kControlTypePitFile = 0x65,
kControlTypeFileTransfer = 0x66,
kControlTypeEndSession = 0x67
kControlTypeSetupSession = 0x64,
kControlTypePitFile = 0x65,
kControlTypeFileTransfer = 0x66,
kControlTypeEndSession = 0x67
};
protected:

View File

@ -1,104 +0,0 @@
/* Copyright (c) 2010-2017 Benjamin Dobell, Glass Echidna
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.*/
// Heimdall
#include "Arguments.h"
#include "BridgeManager.h"
#include "DetectAction.h"
#include "Heimdall.h"
#include "Interface.h"
using namespace std;
using namespace Heimdall;
const char *DetectAction::usage = "Action: detect\n\
Arguments: [--verbose] [--stdout-errors]\n\
[--usb-log-level <none/error/warning/debug>]\n\
Description: Indicates whether or not a download mode device can be detected.\n";
int DetectAction::Execute(int argc, char **argv)
{
// Handle arguments
map<string, ArgumentType> argumentTypes;
argumentTypes["verbose"] = kArgumentTypeFlag;
argumentTypes["stdout-errors"] = kArgumentTypeFlag;
argumentTypes["usb-log-level"] = kArgumentTypeString;
Arguments arguments(argumentTypes);
if (!arguments.ParseArguments(argc, argv, 2))
{
Interface::Print(DetectAction::usage);
return (0);
}
bool verbose = arguments.GetArgument("verbose") != nullptr;
if (arguments.GetArgument("stdout-errors") != nullptr)
Interface::SetStdoutErrors(true);
const StringArgument *usbLogLevelArgument = static_cast<const StringArgument *>(arguments.GetArgument("usb-log-level"));
BridgeManager::UsbLogLevel usbLogLevel = BridgeManager::UsbLogLevel::Default;
if (usbLogLevelArgument)
{
const string& usbLogLevelString = usbLogLevelArgument->GetValue();
if (usbLogLevelString.compare("none") == 0 || usbLogLevelString.compare("NONE") == 0)
{
usbLogLevel = BridgeManager::UsbLogLevel::None;
}
else if (usbLogLevelString.compare("error") == 0 || usbLogLevelString.compare("ERROR") == 0)
{
usbLogLevel = BridgeManager::UsbLogLevel::Error;
}
else if (usbLogLevelString.compare("warning") == 0 || usbLogLevelString.compare("WARNING") == 0)
{
usbLogLevel = BridgeManager::UsbLogLevel::Warning;
}
else if (usbLogLevelString.compare("info") == 0 || usbLogLevelString.compare("INFO") == 0)
{
usbLogLevel = BridgeManager::UsbLogLevel::Info;
}
else if (usbLogLevelString.compare("debug") == 0 || usbLogLevelString.compare("DEBUG") == 0)
{
usbLogLevel = BridgeManager::UsbLogLevel::Debug;
}
else
{
Interface::Print("Unknown USB log level: %s\n\n", usbLogLevelString.c_str());
Interface::Print(DetectAction::usage);
return (0);
}
}
// Download PIT file from device.
BridgeManager *bridgeManager = new BridgeManager(verbose);
bridgeManager->SetUsbLogLevel(usbLogLevel);
bool detected = bridgeManager->DetectDevice();
delete bridgeManager;
return ((detected) ? 0 : 1);
}

View File

@ -1,39 +0,0 @@
/* Copyright (c) 2010-2017 Benjamin Dobell, Glass Echidna
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.*/
#ifndef DEVICETYPEPACKET_H
#define DEVICETYPEPACKET_H
// Heimdall
#include "SessionSetupPacket.h"
namespace Heimdall
{
class DeviceTypePacket : public SessionSetupPacket
{
public:
DeviceTypePacket() : SessionSetupPacket(SessionSetupPacket::kDeviceType)
{
}
};
}
#endif

View File

@ -1,171 +0,0 @@
/* Copyright (c) 2010-2017 Benjamin Dobell, Glass Echidna
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.*/
// C Standard Library
#include <stdio.h>
// Heimdall
#include "Arguments.h"
#include "BridgeManager.h"
#include "DownloadPitAction.h"
#include "Heimdall.h"
#include "Interface.h"
using namespace std;
using namespace Heimdall;
const char *DownloadPitAction::usage = "Action: download-pit\n\
Arguments: --output <filename> [--verbose] [--no-reboot] [--stdout-errors]\n\
[--usb-log-level <none/error/warning/debug>]\n\
Description: Downloads the connected device's PIT file to the specified\n\
output file.\n\
Note: --no-reboot causes the device to remain in download mode after the action\n\
is completed. If you wish to perform another action whilst remaining in\n\
download mode, then the following action must specify the --resume flag.\n";
int DownloadPitAction::Execute(int argc, char **argv)
{
// Handle arguments
map<string, ArgumentType> argumentTypes;
argumentTypes["output"] = kArgumentTypeString;
argumentTypes["no-reboot"] = kArgumentTypeFlag;
argumentTypes["resume"] = kArgumentTypeFlag;
argumentTypes["verbose"] = kArgumentTypeFlag;
argumentTypes["stdout-errors"] = kArgumentTypeFlag;
argumentTypes["usb-log-level"] = kArgumentTypeString;
Arguments arguments(argumentTypes);
if (!arguments.ParseArguments(argc, argv, 2))
{
Interface::Print(DownloadPitAction::usage);
return (0);
}
const StringArgument *outputArgument = static_cast<const StringArgument *>(arguments.GetArgument("output"));
if (!outputArgument)
{
Interface::Print("Output file was not specified.\n\n");
Interface::Print(DownloadPitAction::usage);
return (0);
}
bool reboot = arguments.GetArgument("no-reboot") == nullptr;
bool resume = arguments.GetArgument("resume") != nullptr;
bool verbose = arguments.GetArgument("verbose") != nullptr;
if (arguments.GetArgument("stdout-errors") != nullptr)
Interface::SetStdoutErrors(true);
const StringArgument *usbLogLevelArgument = static_cast<const StringArgument *>(arguments.GetArgument("usb-log-level"));
BridgeManager::UsbLogLevel usbLogLevel = BridgeManager::UsbLogLevel::Default;
if (usbLogLevelArgument)
{
const string& usbLogLevelString = usbLogLevelArgument->GetValue();
if (usbLogLevelString.compare("none") == 0 || usbLogLevelString.compare("NONE") == 0)
{
usbLogLevel = BridgeManager::UsbLogLevel::None;
}
else if (usbLogLevelString.compare("error") == 0 || usbLogLevelString.compare("ERROR") == 0)
{
usbLogLevel = BridgeManager::UsbLogLevel::Error;
}
else if (usbLogLevelString.compare("warning") == 0 || usbLogLevelString.compare("WARNING") == 0)
{
usbLogLevel = BridgeManager::UsbLogLevel::Warning;
}
else if (usbLogLevelString.compare("info") == 0 || usbLogLevelString.compare("INFO") == 0)
{
usbLogLevel = BridgeManager::UsbLogLevel::Info;
}
else if (usbLogLevelString.compare("debug") == 0 || usbLogLevelString.compare("DEBUG") == 0)
{
usbLogLevel = BridgeManager::UsbLogLevel::Debug;
}
else
{
Interface::Print("Unknown USB log level: %s\n\n", usbLogLevelString.c_str());
Interface::Print(DownloadPitAction::usage);
return (0);
}
}
// Info
Interface::PrintReleaseInfo();
Sleep(1000);
// Open output file
const char *outputFilename = outputArgument->GetValue().c_str();
FILE *outputPitFile = FileOpen(outputFilename, "wb");
if (!outputPitFile)
{
Interface::PrintError("Failed to open output file \"%s\"\n", outputFilename);
return (1);
}
// Download PIT file from device.
BridgeManager *bridgeManager = new BridgeManager(verbose);
bridgeManager->SetUsbLogLevel(usbLogLevel);
if (bridgeManager->Initialise(resume) != BridgeManager::kInitialiseSucceeded || !bridgeManager->BeginSession())
{
FileClose(outputPitFile);
delete bridgeManager;
return (1);
}
unsigned char *pitBuffer;
int fileSize = bridgeManager->DownloadPitFile(&pitBuffer);
bool success = true;
if (fileSize > 0)
{
if (fwrite(pitBuffer, 1, fileSize, outputPitFile) != static_cast<size_t>(fileSize))
{
Interface::PrintError("Failed to write PIT data to output file.\n");
success = false;
}
}
else
{
success = false;
}
if (!bridgeManager->EndSession(reboot))
success = false;
delete bridgeManager;
FileClose(outputPitFile);
delete [] pitBuffer;
return (success ? 0 : 1);
}

View File

@ -1,34 +0,0 @@
/* Copyright (c) 2010-2017 Benjamin Dobell, Glass Echidna
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.*/
#ifndef DOWNLOADPITACTION_H
#define DOWNLOADPITACTION_H
namespace Heimdall
{
namespace DownloadPitAction
{
extern const char *usage;
int Execute(int argc, char **argv);
}
}
#endif

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2010-2017 Benjamin Dobell, Glass Echidna
/* Copyright (c) 2010-2011 Benjamin Dobell, Glass Echidna
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2010-2017 Benjamin Dobell, Glass Echidna
/* Copyright (c) 2010-2011 Benjamin Dobell, Glass Echidna
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2010-2017 Benjamin Dobell, Glass Echidna
/* Copyright (c) 2010-2011 Benjamin Dobell, Glass Echidna
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

Some files were not shown because too many files have changed in this diff Show More