Compare commits

..

215 Commits

Author SHA1 Message Date
Henrik Grimler 02b577ec77
v2.0.2
* Fix segfault when file to flash does not exist

* Rename some fields in the flashing protocol, MMC4096 seem to be UFS,
  and what I thought was the protocol number seem to be the number of
  logical units in the storage
2022-07-12 17:42:55 +02:00
Henrik Grimler 14f3521a6b
FlashAction: fix FileOpen check
Check needs to be right after it is opened, before we try to seek in
it.  Before this fix, heimdall segfaults if file does not exist.

Fixes commit 60ab9bbaff ("FlashAction: Make sure file fit partition
before flashing")
2022-07-12 17:23:21 +02:00
Henrik Grimler 0cf817a591
libpit: MMC4096 is really UFS
Change name to better describe the hardware.
2022-05-04 13:12:31 +02:00
Henrik Grimler c3516307d2
libpit: last number in PIT header is the "LUN count"
Where LUN probably stands for Logical Unit Number.  Previous
assumption that it was the odin protocol version was wrong, so let's
fix this.
2022-05-04 13:12:28 +02:00
Henrik Grimler f6c4698c8b
Revert "PIT: unknown version in PIT header has to be protocol version"
This assumption was wrong.  The number is really the number of logical
units in the storage, which tends to increase over time as the storage
space is increased I suppose.

This reverts commit e916c679ed.
2022-05-04 13:11:18 +02:00
Henrik Grimler d81e0f5bc2
v2.0.1
Except for general cleanup we have these functional changes:

* Change printed pit header: last unknown number seem to be the Odin
  protocol version.

* Only run libusb_reset_device on ubuntu: on some distros/devices
  resetting the device causes the handshake to fail (observered for
  degaswifi/SM-T230).
2022-02-13 11:38:55 +01:00
Henrik Grimler 62368adc7d
BridgeManager: only libusb_reset_device on ubuntu
It seems that only ubuntu needs libusb_reset_device for successful
handshake. On most distros and device it works with or without, but
for some devices (like degaswifi/SM-T230 with a Marvell PXA 1088 SOC)
it causes handshake to fail.

Probably libusb_reset_device causes issues only for some devices, but
there seem to be no way to distinguish which ones from Heimdall (not
based on Odin protocol version or SOC at least).

Fixes commit 07a14d4aa8 ("InitialiseProtocol: reset device before
handshake").
2022-02-13 11:17:22 +01:00
Henrik Grimler 0f1843c93c
BridgeManager: break another long line 2022-02-13 08:53:03 +01:00
Henrik Grimler 172ab65cbe
BridgeManager: use SetUsbLogLevel for setting usb log level 2022-02-13 08:53:00 +01:00
Henrik Grimler 1e7ff3b659
README: point to samsung-loki/samsung-docs for more docs 2022-01-01 20:38:27 +01:00
Henrik Grimler e916c679ed
PIT: unknown version in PIT header has to be protocol version
And in that case there now exists a fifth version of the Odin
protocol, seen on Galaxy S9 and newer.

In total we have seen these versions (as of January 2022):

* 0, on devices from around 2014 or older
* 3, on devices from around 2015
* 4, on devices from around 2016 - 2017
* 5, on devices from around 2018 or newer
2022-01-01 20:38:19 +01:00
Henrik Grimler e9a68f6862
BridgeManager: fix return value by libusb_get_device_list
And remove unnecessary spaces and break a long line.
2022-01-01 20:38:12 +01:00
Henrik Grimler 990ce68f5c
BridgeManager: fix missing newline in error messages 2021-12-31 00:16:46 +01:00
Antony Cherepanov c939ab18d1
Fix comparison between signed and unsigned integers
Warning was seen when compiling with -Wall.
2021-12-18 18:22:42 +01:00
Antony Cherepanov 1385b183d2
Packet destructor should be virtual
Fixes warning seen when compiling with -Wall.
2021-12-18 18:21:40 +01:00
Henrik Grimler 95e5c1cdcb
heimdall-frontend: set version to 2.0.0 here as well
Will not make a new release for just this though.
2021-12-16 17:40:42 +01:00
Henrik Grimler 622067f284
Release v2.0.0
Go from 1.4.2 to 2.0.0 to indicate that maintainer, and upstream repo,
has changed.

Main changes:

* A check so that partition is not smaller than file size has been
  added, to make it a bit harder to overwrite things on the emmc by
  accident:
  60ab9bbaff
* libusb_reset_device is needed before handshake on ubuntu:
  https://github.com/Benjamin-Dobell/Heimdall/pull/478
* Support for flashing images larger than 3.5 GB:
  https://github.com/Benjamin-Dobell/Heimdall/pull/459
* Avoid libusb_set_interface_alt_setting when it anyways doesn't do
  anything: https://github.com/Benjamin-Dobell/Heimdall/issues/497, fixed
  in: 2ecc98020c
* Some compilation issues on
  [freeBSD](64bd479db6),
  [Android](719edaff9e)
  and
  [macOS](6ede1f1f33)
  have been fixed.

All changes are verified to be compatible for devices as old as Galaxy
S3, and as new as Galaxy S8 (I don't have access to anything older, or
newer, than that).
2021-12-16 16:59:29 +01:00
Henrik Grimler 9b0e9ff174
README: add build status images 2021-12-16 16:15:51 +01:00
Henrik Grimler 225164f87e
README: point to OS specific READMEs inside the repository 2021-12-16 16:14:05 +01:00
Henrik Grimler 91802883a0
README: use https for libusb link 2021-12-16 16:13:47 +01:00
Henrik Grimler 40be58b43e
FlashAction: add option --skip-size-check
Can be used to skip the check that verifies that all files fit in the
partitions. The option need to be set if we are to be able to flash
stock android to some devices, for example klimtlte (sboot.bin is
larger than the BOOTLOADER partition on this device).
2021-12-16 16:07:41 +01:00
Henrik Grimler 60ab9bbaff
FlashAction: Make sure file fit partition before flashing
Partition size is calculated as block count times a block size of 512
for DeviceType 2 and 4096 for DeviceType 8.

Flashing stock android on some devices fail due to some partitions
being too small for the corresponding file.  This is the case on
klimtlte (and other exynos5420 devices), where sboot.bin does not fit
into the BOOTLOADER partition.

Tests done:

* Flash stock android (A500FXXS1CSB2) to a5lte, works fine
* Flash stock android (I9300XXUGPE1) to i9300, works fine
* Flash stock android (I9505XXUPQG1) to i9505, works fine
* Flash stock android (G930FXXU8ETI2) to herolte (with block
  size 4096), works fine
* Flash stock android (T705XXU1CPL1) to klimtlte, fails due to
  BOOTLOADER partition being smaller than sboot.bin, the file has a
  size of 1148160, and the partition 2046*512=1047552
2021-12-16 16:05:42 +01:00
Henrik Grimler e51c9119f1
libpit: describe more parts of pit header
The unknown string is "COM_TAR2" in all devices I have access to.  The
last unknown 4 bytes might be some sort of version, in old devices it
is 0000, in Galaxy S6 0003, in Galaxy S7 and S8 0004 and in Galaxy S9
and tab S6 lite 0005.

The CPU/bootloader string looks something like:

* LSI5410 - Seen in Exynos 5420, 5433 devices (and perhaps others)
* LSI7420 - Seen in Exynos 7420, 8890, 8895 devices (and perhaps others)
* LSI7880 - Seen in a5y17lte (exynos 7880)
* LSI9610 - Seen in gta4xl (exynos 9611)
* LSI9810 - Seen in star2lte (exynos 9810)
* Mx      - Seen in Galaxy S3 (device codename is m0/m3)
* MSM8916 - Seen in MSM8916 devices
* MSM8960 - Seen in jflte (and probably in others, jflte has a APQ8064AB CPU)
2021-12-16 16:01:18 +01:00
Henrik Grimler 31745c287a
libpit: add DeviceType = 8 entry for MMC with blksize 4096
Newer devices have an emmc with 4096 block size instead of 512.  These
seem to have DeviceType=8 instead of DeviceType=2.
2021-12-16 16:01:15 +01:00
Henrik Grimler cedfcd8c80
win32: remove zadig.exe from repo
Carrying around this (now outdated) driver in the repo seems
unnecessary. Windows users can download latest from
https://zadig.akeo.ie/downloads/ instead.
2021-12-14 11:22:04 +01:00
Henrik Grimler 6441c6a6c5
Remove some extra whitespace and convert some spaces to tabs 2021-12-10 09:46:30 +01:00
Henrik Grimler af87b7b7e4
cmake: replace LFS check with scripts from wireshark
Testing on 32bit arm have weird issues where the build failed if
run/continued without configuring again.

With these scripts we also require less files, no .c files in cmake/.

One downside is that we now require at least Visual Studio
2005 (MSVCR80) for compiling on windows (and there's no check for this
currently).
2021-12-10 09:46:24 +01:00
Henrik Grimler 761c2db4d2
cmake: set -std=c+++11 with target_compile_features instead 2021-12-10 09:46:17 +01:00
Henrik Grimler 719edaff9e
heimdall, libpit: fix (MSVC) nullptr check
We should only need to define it for old versions of MSVC.  On linux
it seems that defining nullptr does not really have any downsides, but
on android we get some obscure compiler errors due to how nullptr is
defined.  Fix nullptr check and thereby make heimdall compile on
android.

Error message looked something like:

[  6%] Building CXX object libpit/CMakeFiles/pit.dir/source/libpit.cpp.o
In file included from /data/data/com.termux/files/home/Heimdall/libpit/source/libpit.cpp:22:
In file included from /data/data/com.termux/files/home/Heimdall/libpit/source/libpit.h:38:
In file included from /data/data/com.termux/files/usr/include/c++/v1/string:504:
In file included from /data/data/com.termux/files/usr/include/c++/v1/string_view:175:
In file included from /data/data/com.termux/files/usr/include/c++/v1/__string:57:
In file included from /data/data/com.termux/files/usr/include/c++/v1/algorithm:643:
/data/data/com.termux/files/usr/include/c++/v1/memory:2268:9: error: cannot initialize a member subobject of type 'libpit::PitEntry **' with an rvalue of type 'int'
      : __value_(_VSTD::forward<_Up>(__u))
        ^        ~~~~~~~~~~~~~~~~~~~~~~~~
/data/data/com.termux/files/usr/include/c++/v1/memory:2353:9: note: in instantiation of function template specialization 'std::__compressed_pair_elem<libpit::PitEntry **, 0, false>::__compressed_pair_elem<int, void>' requested here
      : _Base1(std::forward<_U1>(__t1)), _Base2(std::forward<_U2>(__t2)) {}
        ^
/data/data/com.termux/files/usr/include/c++/v1/vector:436:7: note: in instantiation of function template specialization 'std::__compressed_pair<libpit::PitEntry **, std::allocator<libpit::PitEntry *>>::__compressed_pair<int, std::__default_init_tag>' requested here
      __end_cap_(nullptr, __default_init_tag())
      ^
/data/data/com.termux/files/usr/include/c++/v1/vector:495:5: note: in instantiation of member function 'std::__vector_base<libpit::PitEntry *, std::allocator<libpit::PitEntry *>>::__vector_base' requested here
    vector() _NOEXCEPT_(is_nothrow_default_constructible<allocator_type>::value)
    ^
/data/data/com.termux/files/home/projects/Heimdall/libpit/source/libpit.cpp:65:10: note: in instantiation of member function 'std::vector<libpit::PitEntry *>::vector' requested here
PitData::PitData()
         ^
2021-11-25 21:26:37 +01:00
Henrik Grimler f0594beaf6
builds: test build for ubuntu 20.04 as well 2021-11-22 17:26:43 +01:00
Henrik Grimler 2ecc98020c
BridgeManager: skip libusb_set_interface_alt_setting if altsetting=0
Some (older) devices seem to have a problem with this:
https://github.com/Benjamin-Dobell/Heimdall/issues/497

As far as I can see from logs, alt_setting is always 0, so with this
change libusb_set_interface_alt_setting will probably never be run.

tests: flash and boot recovery onto SM-G955
2021-11-22 16:25:45 +01:00
Henrik Grimler 6317e88503 */README: replace http with https in urls 2021-06-15 11:29:49 +02:00
Henrik Grimler 74c498d61e builds: add more (build) dependencies on alpine and arch 2021-06-15 11:29:25 +02:00
Henrik Grimler f3bdacf03d CI: test build heimdall on alpine and archlinux
Using sourcehuts build service builds.sr.ht.
2021-06-15 10:46:43 +02:00
Henrik Grimler 53466cbd51 gitignore: ignore *~ as well 2021-06-15 10:46:25 +02:00
Henrik Grimler df83a4b010 CMakeLists: update usb library variable
It was renamed in the update of the Findlibusb cmake module.
2021-06-06 20:37:55 +02:00
Henrik Grimler 64bd479db6 cmake: update Findlibusb.cmake
This one adds support for more platforms (like freebsd) out of the
box, so that those distros do not need to patch the module.
2021-05-29 20:26:37 +02:00
Henrik Grimler 4fadfe9c5d heimdall: cmake: do not set libusb_USE_STATIC_LIBS
It does not have an effect, heimdall is dynamically linked in any
case.
2021-05-29 19:32:05 +02:00
Henrik Grimler 82f7241133 Use https in urls and link to libusb instead of libusbx 2021-05-29 16:54:04 +02:00
Jesse Chan 07a14d4aa8 InitialiseProtocol: reset device before handshake
Heimdall fails to handshake with device on my Linux installation:
Initialising protocol...
ERROR: libusb error -7 whilst sending bulk transfer. Retrying...
ERROR: libusb error -7 whilst sending bulk transfer. Retrying...
ERROR: libusb error -7 whilst sending bulk transfer. Retrying...
ERROR: libusb error -7 whilst sending bulk transfer. Retrying...
ERROR: libusb error -7 whilst sending bulk transfer. Retrying...
ERROR: libusb error -7 whilst sending bulk transfer.
ERROR: Failed to send handshake!
ERROR: Failed to receive handshake response. Result: -7
ERROR: Protocol initialisation failed!

However, with the same USB cable, port and device, Heimdall
successfully handshake with the device on Windows via WinUSB.
This indicates handling of USB devices of host (AMD X570) on
Linux might lead to undesired results. Though, without further
testing, the interference from userspace (Ubuntu 20.04, KDE) can
not be ruled out.

Thus, this patch calls libusb_reset_device to ensure
the USB port is in a clean state before we send the data.

Fixes issues with newer devices and hosts.

Signed-off-by: Jesse Chan <jc@linux.com>
2021-05-03 22:38:41 +02:00
Henrik Grimler 6d17eb5178 heimdall-frontend: Remove one indentation level from Packaging
In the two variants of Packaging::ClashlessFilename.
2021-05-03 14:53:19 +02:00
Henrik Grimler 54d58b8244 README: re-format, re-phrase supported platform section
And use https for external links.
2021-05-03 14:53:19 +02:00
Romain Hunault 6ede1f1f33 Fix macOS issues
[ Taken from https://gitlab.e.foundation/e/tools/heimdall/-/tree/new_master ]
2021-05-03 14:53:19 +02:00
Henrik Grimler af3f0d6ac9 Convert all files to unix line endings
All except Win32/README.txt.
2021-05-03 14:24:06 +02:00
Henrik Grimler ccafa21e64 heimdall-frontend: fix deprecated use of qrand()
Use QRandomGenerator instead. Fixes compilation warning:

/home/grimler/Heimdall/heimdall-frontend/source/Packaging.cpp: In static member function ‘static QString HeimdallFrontend::Packaging::ClashlessFilename(const QList<HeimdallFrontend::FileInfo>&, const QString&)’:
/home/grimler/Heimdall/heimdall-frontend/source/Packaging.cpp:910:34: warning: ‘int qrand()’ is deprecated: use QRandomGenerator instead [-Wdeprecated-declarations]
  910 |      filename.append(QChar(qrand() % ('Z' - 'A' + 1) + 'A'));
      |                                  ^
In file included from /usr/include/qt/QtCore/qchar.h:43,
                 from /usr/include/qt/QtCore/qstring.h:49,
                 from /usr/include/qt/QtCore/qdatetime.h:44,
                 from /usr/include/qt/QtCore/QDateTime:1,
                 from /home/grimler/Heimdall/heimdall-frontend/source/Packaging.cpp:32:
/usr/include/qt/QtCore/qglobal.h:1274:80: note: declared here
 1274 | Q_CORE_EXPORT QT_DEPRECATED_VERSION_X_5_15("use QRandomGenerator instead") int qrand();
      |                                                                                ^~~~~
2021-05-03 14:24:06 +02:00
Henrik Grimler 220f90a4fe heimdall-frontend: fix deprecated use of sprintf
Use QString::asprintf instead. Fixes compilation warning:

/home/grimler/Heimdall/heimdall-frontend/source/mainwindow.cpp: In member function ‘void HeimdallFrontend::MainWindow::StartFlash()’:
/home/grimler/Heimdall/heimdall-frontend/source/mainwindow.cpp:925:53: warning: ‘QString& QString::sprintf(const char*, ...)’ is deprecated: Use asprintf(), arg() or QTextStream instead [-Wdeprecated-declarations]
  925 |   flag.sprintf("--%u", fileInfos[i].GetPartitionId());
      |                                                     ^
In file included from /usr/include/qt/QtCore/qcoreapplication.h:44,
                 from /usr/include/qt/QtCore/QCoreApplication:1,
                 from /home/grimler/Heimdall/heimdall-frontend/source/mainwindow.cpp:22:
/usr/include/qt/QtCore/qstring.h:393:14: note: declared here
  393 |     QString &sprintf(const char *format, ...) Q_ATTRIBUTE_FORMAT_PRINTF(2, 3);
      |
2021-05-03 14:24:06 +02:00
Henrik Grimler 094f715c4d heimdall: BridgeManager: libusb_set_debug->libusb_set_option
The former is deprecated. Fixes compilation warning:

/home/grimler/Heimdall/heimdall/source/BridgeManager.cpp: In member function ‘bool Heimdall::BridgeManager::DetectDevice()’:
/home/grimler/Heimdall/heimdall/source/BridgeManager.cpp:402:57: warning: ‘void libusb_set_debug(libusb_context*, int)’ is deprecated: Use libusb_set_option instead [-Wdeprecated-declarations]
  402 |    libusb_set_debug(libusbContext, LIBUSB_LOG_LEVEL_NONE);
      |                                                         ^
In file included from /home/grimler/Heimdall/heimdall/source/BridgeManager.cpp:25:
/usr/include/libusb-1.0/libusb.h:1352:18: note: declared here
 1352 | void LIBUSB_CALL libusb_set_debug(libusb_context *ctx, int level);
      |                  ^~~~~~~~~~~~~~~~
2021-05-03 14:23:40 +02:00
Henrik Grimler 9bff064d40 CMake: bump minimum version
Mostly because 2.8.4 will be deprecated in the not too far future
2021-05-03 14:07:33 +02:00
fft 92ea948323 fixup! heimdall: Fix flashing firmwares bigger than 3.5GB
Fix show progress percentage for big files.
2021-05-03 14:04:53 +02:00
Mallon Lobjakas c87f5bf210 heimdall: Fix flashing firmwares bigger than 3.5GB 2021-05-03 14:04:53 +02:00
Rudolf Tammekivi bfe1a68512 heimdall: Odin protocol version 4 support 2021-05-03 14:04:53 +02:00
Benjamin Dobell f6b618c435 Back to Github
Revert "Updated README.md so the README[.txt] links point to the gitlab version, rather than the broken gituser links they were pointing to."

This reverts commit af5b574042.
2021-05-03 13:49:24 +02:00
Benjamin Dobell a2cfdaa5ed Merge branch 'patch-1' into 'master'
Updated README.md so the README[.txt] links point to the gitlab version, rather…

See merge request 
2018-07-30 04:14:51 +00:00
Kenneth Swarthout af5b574042 Updated README.md so the README[.txt] links point to the gitlab version, rather than the broken gituser links they were pointing to. 2018-07-29 05:47:06 +00:00
Benjamin Dobell 5377b6286c
Merge pull request from 414n/cmake-install-targets
Added install targets
2017-11-11 01:34:24 +11:00
Alan 4a9259b477 Added install targets 2017-11-10 15:25:08 +01:00
Benjamin Dobell 9bcc42da35 Merge pull request from grayed/master
Use library found instead of hardcoding compiler flag.
2017-09-20 12:05:45 +10:00
Vadim Zhukov cc44b3497d Use library found instead of hardcoding compiler flag.
Fixes build on OpenBSD.
2017-07-30 06:42:06 +03:00
Benjamin Dobell 3b4f34e2a9 Minor typo. I'm sure there are more. 2017-05-12 05:13:08 +10:00
Benjamin Dobell 699549e3c6 Bumped version to 1.4.2 2017-05-12 04:34:25 +10:00
Benjamin Dobell 663bb80f22 Merge branch 'tflash' 2017-05-12 04:34:19 +10:00
Benjamin Dobell bf891c9366 Refactor T-Flash implementation before merging. 2017-05-12 04:32:20 +10:00
Benjamin Dobell 8709370bc4 It's 2017. Where did the years go? 2017-05-12 03:47:37 +10:00
Benjamin Dobell 5b90f09625 A modern README 2017-05-12 03:47:19 +10:00
Frédéric Basse aa40b07450 allow higher timeout when switching to t-flash due to sd card initialization 2016-12-24 18:55:56 +01:00
Frédéric Basse 259f5f8973 add T-Flash option in FlashAction 2016-12-24 14:33:39 +01:00
Benjamin Dobell b6fe7f8535 Revert "Merge pull request from ljani/master"
This reverts commit 9784dd2e2a, reversing
changes made to 7ebee1e877.
2016-07-20 16:11:53 +10:00
Benjamin Dobell 9784dd2e2a Merge pull request from ljani/master
Use the found libusb
2016-07-18 12:28:48 +10:00
Jani d2e2f76556 Use the found libusb 2016-07-17 23:37:28 +03:00
Benjamin Dobell 7ebee1e877 Merge pull request from kratz00/superfluous_semicolon
- removed superfluous semicolons from namespace definitions
2016-04-02 00:49:09 +11:00
Steffen Pankratz e8a77e6686 - removed superfluous semicolons from namespace definitions 2016-03-06 16:31:00 +01:00
Benjamin Dobell 86b7be8329 Merge pull request from kratz00/unused_variables
- fixed compiler warning: dead initialization (the values are never read)
2016-03-07 01:47:06 +11:00
Steffen Pankratz 05d4c747a9 - fixed compiler warning: dead initialization (the values are never read)
In order to not get compiler warnings about 'unused return values'
a void cast is used, which also makes it clear the the returned values
are ignored on purpose
2016-03-06 13:45:37 +01:00
Benjamin Dobell 2bab8d9473 Merge pull request from kratz00/misc_fixes
Minor bug fixes.
2016-03-01 17:57:37 +11:00
Steffen Pankratz 34c4636ee0 - fixed possible null pointer access 2016-02-29 19:50:53 +01:00
Steffen Pankratz 46c4f8be14 - fixed logical error, wrong variable was used in error message 2016-02-29 18:42:55 +01:00
Steffen Pankratz 6d7d35fa76 - fixed memory leak
Memory allocated by 'new[]' should be deallocated by 'delete[]'.
2016-02-29 18:39:21 +01:00
Steffen Pankratz a813fee3a0 - fixed typos
prefox <-> prefix
2016-02-29 18:37:21 +01:00
Benjamin Dobell a59a290e23 Merge pull request from yan12125/allow-disable-gui
Add an option to disable the frontend when building
2016-02-21 17:10:13 +11:00
Benjamin Dobell 8e45fd81c9 Merge pull request from vaselo/master
Fixed libpit array overflows
2016-02-08 18:15:52 +11:00
vaselo 4be0c30302 Fixed libpit array overflows 2016-02-08 09:05:32 +02:00
Yen Chi Hsuan f789e25d85 Add an option to disable GUI 2015-08-22 23:23:02 +08:00
Benjamin Dobell d0526a3b74 Do not use static libusb-1.0 by default on Linux. 2015-03-21 14:53:43 +11:00
Benjamin Dobell 8cb7f3dd87 Actually fix (CMake Linux detection) 2015-03-06 00:48:18 +11:00
Benjamin Dobell 2ad53a5100 Due to a Qt bug on OS X we need to browse for *.gz not *.tar.gz 2015-03-06 00:48:18 +11:00
Benjamin Dobell b75bdcbc52 Added missing info to the Windows README 2015-02-21 05:31:14 +11:00
Benjamin Dobell d3335dec58 Fixed a few Heimdall Frontend niggles
Yes, the HeimdallState enum class operator overloading and operator usage is
crazy nonsense. I want to love enum class, but this is just ridiculous.
2015-02-21 03:50:55 +11:00
Benjamin Dobell fae5f627a0 Implemented hack to make WinUSB play nice with empty receive transfers 2015-02-21 03:50:55 +11:00
Benjamin Dobell e98281afb7 Fixed incorrect method arguments causing PIT transfers to fail 2015-02-21 03:50:54 +11:00
Benjamin Dobell b5f771346e New signed codeless kext
In theory this codeless kext should be higher priority than Kies, however it
does not seem to be working consistently.
2015-02-21 03:30:26 +11:00
Benjamin Dobell 30f1968ff3 Make OS X kext installation work irrespective of current directory 2015-02-21 00:12:51 +11:00
Benjamin Dobell 625fdf2736 Fix issue with Linux specific code not compiling () 2015-02-20 23:57:08 +11:00
Benjamin Dobell e2f0470faf Fix FindLibusb.cmake and make CMake setup IDE compatible 2015-02-20 02:15:31 +11:00
Benjamin Dobell df988075c7 Fix case sensitive FS issue and update Linux README 2015-02-19 19:01:13 +11:00
Benjamin Dobell 67c17cc48b Fix Unix build issues and work-around Qt5 Mac UI bugs 2015-02-19 05:22:04 +11:00
Benjamin Dobell b22ae7b89f Removed autotools and VS files, and standardised source dir naming 2015-02-19 04:13:33 +11:00
Benjamin Dobell 39b48f2357 Upgrade Heimdall Frontend to Qt5 and build with cmake 2015-02-19 04:13:26 +11:00
Benjamin Dobell 09ba183922 Update Heimdall CLI build to use an MSYS2 environment 2015-02-19 02:49:11 +11:00
Benjamin Dobell 69c3aafd81 Fix UNIX CMake (and OS X autotools) builds for Heimdall CLI 2014-12-10 00:57:29 +11:00
Benjamin Dobell b9e722768f CMake build fixes 2014-11-17 16:06:06 +11:00
Benjamin Dobell ee53613ec1 Continue to support autotools... for now 2014-11-17 16:05:34 +11:00
Benjamin Dobell 1ddfdc1a88 CMake files for Heimdall CLI and mingw support 2014-11-17 07:02:39 +11:00
Benjamin Dobell d613a87cdb More empty transfer craziness, this time when receving packets
It seems newer devices need more weird empty transfers in order to
function.
2014-07-06 03:50:48 +10:00
Benjamin Dobell fbebc394f4 Autogen'd files for Heimdall 1.4.1 2014-06-01 14:49:56 +10:00
Benjamin Dobell 082fb091f1 Fixed support for large files (up to 2^32 - 1 bytes)
The Loke protocol supports 32-bit unsigned for the size of files being
flashed. However, POSIX file commands only support 32-bit (signed). As
such we now have platform specific support for larger files.
2014-06-01 14:09:56 +10:00
Benjamin Dobell 46d9a51e18 Fixed file transfer sequence bug 2014-06-01 13:12:07 +10:00
Benjamin Dobell 7d6ddcd5d5 Give devices some leeway to handle empty bulk transfers. 2014-05-31 12:09:33 +10:00
Benjamin Dobell 7e29d7ef9a Fixed line endings in install-kext.sh 2014-05-21 03:31:25 +10:00
Benjamin Dobell cadb167e0c Signed the OS X codeless kext. 2014-05-21 03:26:43 +10:00
Benjamin Dobell 900161750e Fixed regression that broke support for GT-I9100 etc. 2014-05-18 05:45:39 +10:00
Benjamin Dobell d1a7f8d693 Tweaked VC++ linker options for Frontend (to ensure quicker builds). 2014-05-18 05:03:57 +10:00
Benjamin Dobell fd23c07ef5 Removed unused optional parameters in BridgeManager. 2014-05-18 04:18:36 +10:00
Benjamin Dobell fc0d542bc2 Fixed Frontend bug that could cause flashing to fail.
The resume boolean did not have a default value set. Consequently if the
memory address containing the boolean was already non-null it resulted in
the heimdall CLI binary being called with the --resume flag even though
the Resume check-box in the UI was not checked.
2014-05-18 03:05:46 +10:00
Benjamin Dobell bd9b2bdee6 Removed VC++ info from Windows README as builds are now statically linked. 2014-05-17 04:43:34 +10:00
Benjamin Dobell b62d66b297 Windows does not provide (or require) va_copy. 2014-05-17 04:36:51 +10:00
Benjamin Dobell ac8fd8500f Updated .gitignore to exclude ./configure and Make output. 2014-05-15 01:00:24 +10:00
Benjamin Dobell ba8600a6c3 Fixed Heimdall Frontend Mac builds. 2014-05-15 00:59:47 +10:00
Benjamin Dobell abea6dbbe0 Added missing new lines to CLI help output. 2014-05-15 00:59:13 +10:00
Benjamin Dobell e6fdafd482 Fixed help output alignment. 2014-05-11 19:26:26 +10:00
Benjamin Dobell 150e3344de Fixed header guard typo. 2014-05-11 19:18:59 +10:00
Benjamin Dobell e28d6c0768 Fixed hard-coded libdir regression. 2014-05-10 11:50:34 +10:00
Benjamin Dobell b518fdc9f6 Merge pull request from m-willers/fix_stdargs 2014-05-10 01:27:19 +10:00
Martin Willers d5cd49b73c fix --stdout-errors handling
When using --stdout-errors, the messages written to stdout contained garbage.

Inside vfprintf(), each va_arg() consumes one entry from the va_args.
Trying to use the same va_args variable again results in undefined behavior
as subsequent va_arg() invocations continue to read from memory past the
actual variable space.

Instead, a copy has to be made with va_copy() and this be used for
outputting to stdout.
2014-05-10 01:22:22 +10:00
Benjamin Dobell ce486f7ecb Removed a few unused variables. 2014-05-07 06:48:00 +10:00
Benjamin Dobell 9b56396ba1 It would seem that messing around with line coding etc. is not necessary. 2014-05-07 00:23:19 +10:00
Benjamin Dobell 9f957a1937 Updated copyright notices to 2014 2014-05-06 22:53:10 +10:00
Benjamin Dobell 32383b994d Merge pull request from r-craig/master
Fix error condition check on finding correct usb interface.
2014-05-06 22:40:04 +10:00
Benjamin Dobell 7d0d608473 Fixed statically linked builds on Windows. 2014-05-06 21:39:08 +10:00
Benjamin Dobell ca6db9a647 Upgraded to libusb-1.0 (1.0.18) post libusbx merge. 2014-05-06 21:39:07 +10:00
Benjamin Dobell a5452e884a Cleaned up command line interface
- Removed the "--delay <ms>" argument.
- Improved Action usage info.
2014-05-06 21:39:07 +10:00
Benjamin Dobell 0767cff624 autogen'd for 1.4.1 2014-05-06 21:39:06 +10:00
Benjamin Dobell 3dae56a596 Bumped version number to 1.4.1 2014-05-06 21:39:06 +10:00
Benjamin Dobell 1e345bcd7c Fix support for SGS4 (with empty bulk transfers)
After each bulk transfer sent containing an Odin/Loke protocol packet, we now
send through a zero length bulk transfer. This is required for newer devices to
function correctly.
2014-05-06 21:39:05 +10:00
Benjamin Dobell a934ad2608 Project file changes (for statically linked vc++ library builds). 2014-05-06 21:39:04 +10:00
Benjamin Dobell 3af0c3ad63 Minor code clean up. 2014-05-06 21:39:04 +10:00
Benjamin Dobell 4435da4a8a Merge pull request from marclaporte/master
fix typos
2014-05-05 02:57:14 +10:00
Benjamin Dobell f7d8c18636 Merge pull request from marclaporte/patch-1
Fix typos
2014-05-05 02:56:16 +10:00
Marc Laporte 0624b2fb3b Fix typo 2014-01-13 17:56:49 -05:00
Marc Laporte 3277922cb6 Fix typo 2014-01-13 17:55:49 -05:00
Marc Laporte cdd53cdb9b Fix typos 2014-01-13 17:48:25 -05:00
Robert Craig 5cd4141c98 Fix error condition check on finding correct usb interface. 2013-11-06 10:00:33 -05:00
Benjamin Dobell f95619028f Merge pull request from jorti/master
Fix udev rules directory
2013-06-26 20:41:24 -07:00
Juan Orti Alcaine e9311908a0 Fix udev rules directory
The udev rules always must be installed in /lib/udev/rules.d even when it is
a 64 bits OS
2013-06-12 09:35:26 +02:00
Benjamin Dobell 910ae1d1fe After swapping to clang for OS X, I've now swapped to GNU GCC 4.7+, instead of Apple's out-dated version. 2013-06-08 18:04:12 +10:00
Benjamin Dobell f47b69d037 Modified Heimdall Frontend so it can find Heimdall CLI in /usr/local/bin on OS X. Also updated the OS X build files, as well as READMEs for all platforms. 2013-06-08 15:07:01 +10:00
Benjamin Dobell b8a92f1c71 Fixed configure/libtool issue on OS X by placing AC_PROG_LIBTOOL after AC_PROG_CXX. 2013-06-06 22:09:36 +10:00
Benjamin Dobell 3d6a35972b Renamed udev rules file and explictly added /usr/include to the include search path for Heimdall Frontend on UNIX systems. 2013-06-04 23:00:55 +10:00
Benjamin Dobell 858a3470e9 Moved LICENSE to root of the repo and deleted heimdall-frontend duplicate documentation in doc-pak. 2013-05-14 00:09:19 +10:00
Benjamin Dobell 9fa0a13022 Minor build file clean-up for linux and regenerated autotools output for 1.4.0 release. 2013-05-13 23:38:33 +10:00
Benjamin Dobell 797fbeea69 Updated zadig (Windows driver installer) to a newer version. 2013-05-13 00:28:24 +10:00
Benjamin Dobell e8b00e6426 Updated copyright in source repo README. 2013-05-13 00:24:03 +10:00
Benjamin Dobell 07dcba54fc Update copyright notices, version identifier and documentation for 1.4.0 release. 2013-05-13 00:08:30 +10:00
Benjamin Dobell 4b089d8084 Fix OS X qmake/environment variable usage in .pro file. 2013-05-13 00:06:44 +10:00
Benjamin Dobell c9e4f764c2 Removed bad Galaxy Camera device identifier, as it was the PID for regular boot, not download mode. 2013-05-11 13:36:05 +10:00
Benjamin Dobell 59cc6133d5 Fixed bug in Heimdall Frontend where "resume" wasn't being checked when it should have been. 2013-05-06 00:01:08 +10:00
Benjamin Dobell f46ef9d47a For devices that support variable packet size - decreased sequence size from 100 MiB to 30 MiB. 2013-05-05 23:59:47 +10:00
Benjamin Dobell 8301663c99 Minor command line output changes - No functional changes. 2013-05-05 20:57:50 +10:00
Benjamin Dobell 55d6c9551e Fixed two major bugs in libpit related functionality:
- Partitions were being excluded from flashing (and UI) if the block-count
  was zero. Instead this is now done using a new IsFlashable() method
  which checks if the partition name is not blank.
- PitData::Pack() was packing the partition name where it should have been
  packing the "flash filename". This resulted in incorrect PIT files being
  flashed to the device.
2013-05-05 20:53:36 +10:00
Benjamin Dobell a653a4800b Changed Arguments.h constructors with default parameters so it compiles with clang. 2013-03-14 00:28:39 +11:00
Benjamin Dobell 973ad82fef Regenerated autoconf files. 2013-03-14 00:18:50 +11:00
Benjamin Dobell e4011af213 Ancient Mac GCC does not support C++11/C++0x. Swapped to using clang on OS X. 2013-03-14 00:09:39 +11:00
Benjamin Dobell f7f29172cb Updated Linux build files and fixed a string formatting warning in Heimdall Frontend. 2013-03-10 02:33:12 +11:00
Benjamin Dobell ef7c9a6377 Fixed output bug attempting to log a std::string instead of a C-style string with printf. 2013-03-10 01:26:22 +11:00
Benjamin Dobell ebbc3e7cd2 - Removed legacy command line hard-coded partition name parameters.
- As a result of the above two points, there are no "known boot
  partitions", and hence boot partitions are not automatically flashed
  last.
- Made partitions flash in the order in order in which partition arguments
  are specified. Hence, it's recommended that you specify boot partitions
  last.
- Added --usb-level argument that can be used for debugging libusbx, or
  flashing issues in general.
- Removed generally non-functional firmware dumping behaviour.
- Removed auto-resume functionality - Although this feature was definitely
  nice to have; I believe it may be responsible for flashing compatibility
  issues for a variety of devices.
- As a result of the above. In order perform another action after a
  --no-reboot action, you must provide the --resume flag.
- Heimdall Frontend also has support for specifying the --resume flag
  via a GUI. Heimdall Frontend also tries to keep track of your actions
  and enable "Resume" automatically after a "No Reboot" action.
- Refactored quite a few of the actions, and code responsible for flashing
  (particularly PIT file flashing).
- Bumped version to 1.4RC3 *however* this commit is not yet an official
  release candidate. It's still a WIP. In particular build files still
  have not been updated for Linux and OS X.
2013-03-08 00:12:27 +11:00
Benjamin Dobell 9d7008e4ba Previous libusbx fix was a red herring of sorts. Inadvertedly it did fix the
issue. However, the correct solution was much simpler:
https://github.com/libusbx/libusbx/pull/80
2013-02-02 01:57:45 +11:00
Benjamin Dobell fec8bbc4db Actually fixed the bug (race condition) in libusbx-1.0 this time! Source
available at https://github.com/libusbx/libusbx/pull/79
2013-02-01 01:39:46 +11:00
Benjamin Dobell 1d2927be56 Added a patched version of libusbx that fixes device claiming on Windows.
Changes to libusbx are documented here:
https://github.com/libusbx/libusbx/issues/78
2013-01-27 02:37:51 +11:00
Benjamin Dobell 8c6b20a487 - Incrementing to 1.4 RC2.
- Fixed Release xcopy command that was referring to libusb instead of
  libusbx.
2013-01-24 00:51:32 +11:00
Benjamin Dobell 5212bf58c5 Added libusbx-1.0 library and DLL missed due to .gitignore 2013-01-24 00:46:30 +11:00
Benjamin Dobell 7caa014dcf Added Galaxy Camera download mode identifier (apparently). 2013-01-23 01:12:58 +11:00
Benjamin Dobell 4d850a272a - Updated MSVC projects to MSVC2012.
- Changed from libusb-1.0 to libusbx.
- Upgraded to C++11 (defined as C++0x for backwards compatibility with gcc < 4.7).
2013-01-23 00:44:12 +11:00
Benjamin Dobell 31b1b0b2b0 - Changed interpretation of packet size reponses of 0 from meaning "don't
care" to "unsupported".
- Changed block size in libpit to mean either block size or block offset.
2013-01-22 23:53:30 +11:00
Benjamin Dobell e0e84b2f7a Fixed --repartition flag parsing bug. 2012-12-01 03:15:02 +11:00
Benjamin Dobell 87341122db Turns out udev ATTR{idProduct} really is case sensitive. 2012-10-13 20:26:29 +11:00
Benjamin Dobell 7a8f81347b Made Heimdall Frontend pass the --verbose parameter for all actions when 'Verbose Output' is checked. 2012-10-13 19:35:20 +11:00
Benjamin Dobell 648bfb1bb7 Added a Qt4VSPropertySheet.props file that will hopefully work for other people. 2012-10-07 23:40:07 +11:00
Benjamin Dobell 8ac74126b4 PIT files are no longer always exactly 4096 bytes. Fixed a bug that was a
result of making this assumption.
2012-10-07 23:33:44 +11:00
Benjamin Dobell 4f3220646d Added missing reference& in heimdall/source/Arguments.cpp 2012-10-03 10:11:00 +10:00
Benjamin Dobell 4994531230 Made Qt project (qmake) configurable using environment variables on OS X. Also added a missing &reference symbol in heimdall/source/Arguments.h 2012-10-03 00:54:30 +10:00
Benjamin Dobell 28269910f2 Added fixed for g++ parsing issue on OS X. 2012-10-02 22:18:47 +10:00
Benjamin Dobell 6cd6b35c73 Heimdall 1.4 RC1:
- Massive refactoring.
    - Support for Qualcomm based devices.
    - Print PIT from file.
    - Use partition names as arguments e.g. --HIDDEN, --KERNEL, --MOVINAND etc.
    - Heimdall Frontend UI improvements.
    - And much more...
2012-10-02 01:41:25 +10:00
Benjamin Dobell 66f1e84dd2 Updated version to 1.3.2 and copyright notices to 2012. 2012-03-31 12:22:17 +11:00
Benjamin Dobell 907c942fd1 Renamed partitionType to chipIdentifier as partition type was incorrect. 2012-03-30 00:50:27 +11:00
Benjamin Dobell 713af23d0a Replaced some extremely weird code that I came up with during the initial
reverse engineering of the flashing protocol. Turns out all I needed to do
was send the sequence size in bytes rather than performing weird
calculations (which when packed) end up representing the same thing!
2012-03-29 10:17:05 +11:00
Benjamin Dobell ee02a9c7c5 Made the last parameter of EndFileTransferPacket partitionType (obtained
from the device's PIT)
2012-03-28 23:59:27 +11:00
Benjamin Dobell e40e701387 Updated libusb-1.0 binaries/headers for windows. 2012-03-18 20:14:51 +11:00
Benjamin Dobell fbbed42c1e Updated Heimdall (command line) autotools files for the 1.3.1 changes.
Heimdall 1.3.1 should now build on Linux and OS X.
2011-09-13 00:34:15 +10:00
Benjamin Dobell 0de82e08b6 Heimdall 1.3.1
- Improved the no-reboot functionality, you no longer have to reboot to
  flash more files.
- Fixed repartitioning functionality (thanks XDA user psych0phobia
  for finding the problem!)
2011-09-11 23:02:55 +10:00
Benjamin-Dobell ed9b08e5d9 Minor OS X UI tweaks. 2011-07-28 02:01:23 +10:00
Benjamin-Dobell 30dce11463 Added note to OS X README about Macports libusb-1.0. 2011-07-28 01:33:50 +10:00
Benjamin Dobell d8642f9ce2 Added proper copyright notices to the About window and also updated some documentation slightly. 2011-07-26 17:50:06 +10:00
Benjamin Dobell babef8e580 - Added file extension checks to Heimdall Frontend (for partition files).
- Made sure Heimdall command line always returns 1 if a device is not detected.
- Minor interface tweaks for Heimdall Frontend.
2011-07-21 02:43:49 +10:00
Benjamin Dobell 7dc796a988 Documentation update. 2011-07-20 04:55:22 +10:00
Benjamin Dobell 3fe2564481 - Heimdall Frontend large font fixes.
- Heimdall Frontend name collision resolution (over the top).
- Attempt at resolving SGS2 failure to end session errors. (Needs testing)
2011-07-20 04:18:18 +10:00
Benjamin Dobell a18d2e6b02 Merge branch 'master' of github.com:Benjamin-Dobell/Heimdall 2011-07-17 19:55:32 +10:00
Benjamin Dobell 8cb7f6ee8f - Added Utilities tab to Heimdall Frontend.
- Fixed Heimdall command line support for PIT files without a reference to themselves.
- Added tool tips to Heimdall Frontend.
- Added heimdall 'info' and 'download-pit' actions.
- Made 'detect' action return 0 if a device is detected, 1 otherwise.
2011-07-17 19:50:07 +10:00
Benjamin-Dobell ed819e2fbe Finally fixed the OS X 64-bit kext issuetest 2011-07-15 05:28:10 +10:00
Benjamin-Dobell a9ba51f99e Altered the user interface slightly to prevent clipping on certain OS. 2011-07-12 02:00:47 +10:00
Benjamin Dobell 06a640fd6c Fixed include directories for MSVC release builds. 2011-07-12 00:57:28 +10:00
Benjamin Dobell 56834b63cc Missed two READMEs, updated now. 2011-07-12 00:00:36 +10:00
Benjamin Dobell a45c90629e Updated Linux documentation for checkinstall. 2011-07-11 23:27:51 +10:00
Benjamin Dobell b72bcd3142 1.3 documentation updates and permission fixes. 2011-07-11 22:53:04 +10:00
Benjamin Dobell bf17bbf573 Version 1.3 (beta) 2011-07-09 17:37:36 +10:00
Benjamin Dobell 70c1e8e5ba 1.3 beta 2011-07-08 23:40:28 +10:00
Benjamin Dobell 5ce92c0786 Version 1.3 beta. 2011-07-08 05:02:18 +10:00
Benjamin Dobell b6ffa766b2 Major 1.3 updates 2011-07-06 02:58:28 +10:00
Benjamin Dobell 35cfa391d1 Merge pull request from alanorth/patch-1
SYSFS is deprecated.  Small change, but probably good for business!
2011-06-17 19:13:55 -07:00
Alan Orth 3fdf78465b SYSFS is deprecated. Small change, but probably good for business! 2011-06-12 14:06:37 -07:00
Benjamin Dobell 7cbd3c0f47 Fixed several bugs related to 'common' arguments. 2011-06-11 16:11:31 +10:00
Benjamin Dobell ab4073bb80 Doh! Fixed the displayed version number. 2011-06-03 12:18:10 +10:00
Benjamin Dobell 7036597401 Updated Linux udev rules for Galaxy S II & Droid Charge 2011-06-02 23:26:00 +10:00
Benjamin-Dobell b4db01d4e1 Updated OS X kext to support Galaxy S II and Droid Charge 2011-06-02 05:47:49 +10:00
Benjamin Dobell 1e2894839a More linux-specific fixes/changes. 2011-06-01 16:41:50 +10:00
Benjamin Dobell da48d031c9 Linux Makefile.am fixes. 2011-06-01 15:34:20 +10:00
Benjamin Dobell 1ef6e97b90 1.2.0b Heimdall command line update. Large update that adds lots of PIT file functionality and better support for more devices. 2011-06-01 07:06:09 +10:00
244 changed files with 14986 additions and 207841 deletions

24
.builds/alpine.yml Normal file
View File

@ -0,0 +1,24 @@
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

20
.builds/archlinux.yml Normal file
View File

@ -0,0 +1,20 @@
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

23
.builds/ubuntu.yml Normal file
View File

@ -0,0 +1,23 @@
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,2 +1,5 @@
.DS_Store
._*
.idea/
/build/
*~

18
CMakeLists.txt Normal file
View File

@ -0,0 +1,18 @@
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,4 +1,4 @@
Copyright (c) 2010 Benjamin Dobell, Glass Echidna
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
@ -16,4 +16,4 @@ 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.
THE SOFTWARE.

View File

@ -1,120 +1,492 @@
Heimdall (c) 2010 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. I am not responsible for the result of your actions.
These instructions are for Linux operating systems.
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 extracted Heimdall to.
3. Then 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 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
Installing Heimdall Frontend from Source (Optional):
1. First make sure you have installed Qt 4.6 or above,
available from http://qt.nokia.com/.
2. Open a terminal and navigate to the directory you extracted Heimdall to.
3. Enter the following commands to compile and install Heimdall Frontend:
cd heimdall-frontend
qmake heimdall-frontend.pro
make
sudo make install
NOTE: You can use "checkinstall" instead of "make install" in order to
generate a redistributable package.
4. Done
Flashing Firmware with Heimdall Frontend:
1. Fully charge your device (use the wall charger as it's faster).
2. Download a decrypted Samsung Galaxy S ROM and extract it to a directory.
3. If the ROM is provided as one of more archives (nested or otherwise),
extract them all to the same location.
NOTE: If you want to use the CSC then extract it last.
3. Open Heimdall Frontend, which can be done by entering the following
command in a terminal:
heimdall-frontend
4. Put your Galaxy S device into download mode.
5. For each file you wish to flash use "Browse" to select the file.
6. Press "Start".
7. Heimdall Frontend will display the progress and inform you when the
flash is complete.
Flashing Firmware from Command Line / Terminal:
1. Fully charge your device (use the wall charger as it's faster).
2. Download a decrypted Samsung Galaxy S ROM and extract it to a directory.
3. If the ROM is provided as one of more archives (nested or otherwise),
extract them all to the same location.
NOTE: If you want to use the CSC then extract it last.
4. Open a terminal and navigate to the directory where you extracted the
ROM files.
5. Type the following to list all the functionality Heimdall supports:
heimdall help
8. 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:
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. Done
Heimdall (c) 2010-2017 Benjamin Dobell, Glass Echidna
https://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 the a terminal and run Heimdall Frontend by typing:
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.
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
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.
1. Fully charge your device (use the wall charger as it's faster).
2. Download a decrypted device 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 the a terminal and run Heimdall Frontend by typing:
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.
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.
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 partitions/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 device 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. 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.
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
9. 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 from 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.
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 a 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 version identifier for your package. Any
valid string will be accepted, although 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
"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
"https://www.glassechidna.com.au/products/heimdall/". It is
important to include "https://" 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 "https://www.glassechidna.com.au/donate/" and
"https://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 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.
- 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 both 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 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.
<?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>https://www.glassechidna.com.au/</url>
<donateurl>https://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 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).
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:
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
make

View File

@ -1,136 +1,491 @@
Heimdall (c) 2010 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.
These instructions are for OS X operating systems.
Installing Heimdall and Heimdall Frontend Binaries:
1. Run "Heimdall Suite.pkg" and follow the instructions.
2. Reboot your system.
3. Done
Installing Heimdall from Source:
1. First make sure you have installed XCode and pkgconfig.
NOTE: There are several different ways you can install pkgconfig, one
option is to use Macports (http://www.macports.org/).
2. Open a terminal and navigate to the directory where you extracted
Heimdall.
3. Then 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 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
Installing Heimdall Frontend from Source (Optional):
1. First make sure you have installed XCode and Qt 4.6 or above,
available from http://qt.nokia.com/.
2. Open a terminal and navigate to the directory where you extracted
Heimdall.
3. Enter the following commands to compile and install Heimdall Frontend:
cd heimdall-frontend
qmake heimdall-frontend.pro
4. This will produce an XCode project called heimdall-frontend.xcodeproj
in the heimdall-frontend folder. Open this file in XCode.
5. From the menu bar select Build -> Build. This outputs heimdall-frontend
to /Applications
6. Done
Flashing Firmware with Heimdall Frontend:
1. Fully charge your device (use the wall charger as it's faster).
2. Download a decrypted Samsung Galaxy S ROM and extract it to a directory.
3. If the ROM is provided as one of more archives (nested or otherwise),
extract them all to the same location.
NOTE: If you want to use the CSC then extract it last.
3. Open Heimdall Frontend.
4. Put your Galaxy S device into download mode.
5. For each file you wish to flash use "Browse" to select the file.
6. Press "Start".
7. Heimdall Frontend will display the progress and inform you when the
flash is complete.
Flashing Firmware from Command Line / Terminal:
1. Fully charge your device (use the wall charger as it's faster).
2. Download a decrypted Samsung Galaxy S ROM and extract it to a directory.
3. If the ROM is provided as one of more archives (nested or otherwise),
extract them all to the same location.
NOTE: If you want to use the CSC then extract it last.
4. Open a terminal and navigate to the directory where you extracted the
ROM files.
5. Type the following to list all the functionality Heimdall supports:
heimdall help
8. 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:
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. Done
Heimdall (c) 2010-2017 Benjamin Dobell, Glass Echidna
https://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 OS X operating systems.
Installing Heimdall and Heimdall Frontend Binaries:
1. Run "Heimdall Suite.pkg" and follow the instructions.
2. Reboot your system.
3. Done
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 the Heimdall Frontend (heimdall-frontend) application.
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.
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 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.
1. Fully charge your device (use the wall charger as it's faster).
2. Download a decrypted device 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.
3. Open the Heimdall Frontend (heimdall-frontend) application.
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.
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 "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"
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 partitions/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 device 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.
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. 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.
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
9. 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 from 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 a 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 version identifier for your package. Any
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 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
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
"https://www.glassechidna.com.au/products/heimdall/". It is
important to include "https://" 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 "https://www.glassechidna.com.au/donate/" and
"https://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 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.
- 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 both 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 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.
<?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>https://www.glassechidna.com.au/</url>
<donateurl>https://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 Suite from Source
1. Open Terminal and install dependencies using Homebrew (https://brew.sh)
brew install libusb qt5 cmake
2. Build Heimdall & Heimdall Frontend
mkdir build
cd build
cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DQt5Widgets_DIR=/usr/local/opt/qt5/lib/cmake/Qt5Widgets ..
make

34
OSX/heimdall.kext/Contents/Info.plist Normal file → Executable file
View File

@ -3,28 +3,50 @@
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key> <string>English</string>
<key>CFBundleGetInfoString</key> <string>Galaxy S Download Mode (Heimdall)</string>
<key>CFBundleIdentifier</key> <string>au.com.glassechidna.heimdall_usb_shield</string>
<key>CFBundleGetInfoString</key> <string>Heimdall Download Mode</string>
<key>CFBundleIdentifier</key> <string>au.com.glassechidna.heimdall.usb_shield</string>
<key>CFBundleInfoDictionaryVersion</key> <string>6.0</string>
<key>CFBundleName</key> <string>Galaxy S Download Mode (Heimdall)</string>
<key>CFBundleName</key> <string>Heimdall Download Mode</string>
<key>CFBundlePackageType</key> <string>KEXT</string>
<key>CFBundleSignature</key> <string>????</string>
<key>CFBundleVersion</key> <string>6.0</string>
<key>IOKitPersonalities</key>
<dict>
<key>GalaxyS</key>
<key>0x6001</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>
<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>
<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>
<key>OSBundleLibraries</key>
<dict>
<key>com.apple.kernel.iokit</key> <string>6.0</string>
<key>com.apple.kpi.iokit</key> <string>8.0.0</string>
</dict>
</dict>
</plist>
</plist>

View File

@ -0,0 +1,105 @@
<?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,8 +1,8 @@
#!/bin/bash
sudo chmod 755 /usr/local/bin/heimdall
echo 'Installing Driver...'
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
echo 'Installation complete. If Heimdall cannot recognise your device a reboot may be required.'
#!/bin/bash
BASEDIR=$(dirname $0)
echo 'Installing Driver...'
sudo cp -R "$BASEDIR/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
echo 'Installation complete. If Heimdall cannot recognise your device a reboot may be required.'

27
README
View File

@ -1,27 +0,0 @@
--------------------------------------------------------------------------------
Heimdall (c) 2010 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

60
README.md Normal file
View File

@ -0,0 +1,60 @@
# 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/).

Binary file not shown.

View File

@ -1,37 +1,26 @@
Heimdall (c) 2010 Benjamin Dobell, Glass Echidna
http://www.glassechidna.com.au/products/heimdall/
Heimdall (c) 2010-2017 Benjamin Dobell, Glass Echidna
https://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. I am not responsible for the result of your actions.
potential to damage (brick) your device if not used carefully. If you're
concerned, don't use this software. Flashing ROMs onto your device may also
void your warranty. Benjamin Dobell and Glass Echidna are not responsible
for the result of your actions.
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. 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:
http://www.microsoft.com/downloads/en/details.aspx?familyid=A7B7A05E-6DE6-4D3A-A423-37BF0912DB84&displaylang=en
These instructions were written for Windows 7 / Vista / Server 2008 however the
procedure should be essentially the same for all supported versions of
Windows (XP onwards).
Driver Installation Instructions:
1. Put your Samsung Galaxy S into download mode and plug it in.
1. Put your device into download mode and plug it in.
2. Run zadig.exe included in the Drivers subdirectory.
2. Download zadig from https://zadig.akeo.ie/downloads/, and run zadig.exe.
3. From the menu chose Options -> List All Devices.
@ -44,9 +33,10 @@ Driver Installation Instructions:
6. Done
Driver Uninstallation Instructions:
1. Put your Samsung Galaxy S into download mode by holding Volume Down + Home + Power.
1. Put your device into download mode by holding Volume Down + Home + Power.
2. Plug your phone into your PC.
@ -66,55 +56,492 @@ Driver Uninstallation Instructions:
Flashing Firmware with Heimdall Frontend:
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. Download a decrypted Samsung Galaxy S ROM and extract it to a directory.
2. Open the Heimdall Frontend (heimdall-frontend) executable.
3. If the ROM is provided as one of more archives (nested or otherwise),
extract them all to the same location.
3. From the "Load Package" tab, under the "Heimdall Firmware Package"
section click the "Browse" button.
NOTE: If you want to use the CSC then extract it last.
4. Use the dialogue that appears to navigate to, and select, the Heimdall
firmware package that you wish to flash.
3. Open Heimdall Frontend.
5. You will see progress bars appear as the package is decompressed and
extracted.
4. Put your Galaxy S device into download mode and plug it in.
When the package has finished being decompressed you should see
information about the particular firmware package that has been
selected.
5. For each file you wish to flash use "Browse" to select the file.
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.
6. Press "Start".
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. Heimdall Frontend will display the progress and inform you when the
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.
Flashing Firmware from Command Prompt:
1. Fully charge your phone (use the wall charger as it's faster).
2. Download a decrypted Samsung Galaxy S ROM and extract it to a directory.
Performing a Custom Flash with Heimdall Frontend:
3. If the ROM is provided as one of more archives (nested or otherwise),
extract them all to the same location.
This is the advanced means of flashing firmware to your device.
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 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.
1. Fully charge your device (use the wall charger as it's faster).
2. Download a decrypted device 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.
3. Open the Heimdall Frontend (heimdall-frontend) executable.
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.
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 "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"
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 partitions/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 device 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.
4. Put your Galaxy S device into download mode and plug it in..
5. Open command prompt and navigate to the directory where you extracted the
ROM files.
5. Open command prompt and navigate to the directory where you installed
heimdall.
NOTE: Adding Heimdall to your PATH variable will allow you to run
Heimdall from any directory.
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.
7. Before flashing, you must first know the names of the partitions you
wish to flash. These can be obtained by executing:
Here is an example that does a full flash and repartition:
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
heimdall print-pit --no-reboot
8. Done
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.
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
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
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 from 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 a 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 version identifier for your package. Any
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 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
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
"https://www.glassechidna.com.au/products/heimdall/". It is
important to include "https://" 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 "https://www.glassechidna.com.au/donate/" and
"https://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 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.
- 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 both 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 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.
<?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>https://www.glassechidna.com.au/</url>
<donateurl>https://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 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++.
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.
1. Setup a MinGW-W64 build environment by utilising MSYS2:
https://msys2.github.io/
2. After installing MSYS2 a command prompt will launch, enter:
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
3. Add the MinGW-W64 binaries to your PATH environment variable:
export PATH="/mingw64/bin:$PATH"
4. Build Heimdall & Heimdall Frontend
mkdir build
cd build
cmake -G "MSYS Makefiles" -DCMAKE_BUILD_TYPE=Release -DQt5Widgets_DIR=/c/msys64/mingw64/qt5-static/lib/cmake/Qt5Widgets ..
make

85
cmake/FindFseeko.cmake Normal file
View File

@ -0,0 +1,85 @@
# 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)

153
cmake/FindLFS.cmake Normal file
View File

@ -0,0 +1,153 @@
# 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)

130
cmake/Findlibusb.cmake Normal file
View File

@ -0,0 +1,130 @@
# 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

@ -0,0 +1,89 @@
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

@ -1,15 +0,0 @@
<?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,742 +0,0 @@
/* Copyright (c) 2010 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 Frontend
#include "mainwindow.h"
// Qt
#include <QCoreApplication>
#include <QDesktopServices>
#include <QDir>
#include <QFileDialog>
#include <QProcess>
#include <QRegExp>
#include <QUrl>
using namespace HeimdallFrontend;
bool MainWindow::IsArchive(QString path)
{
// Not a real check but hopefully it gets the message across, don't flash archives!
return (path.endsWith(".tar", Qt::CaseInsensitive) || path.endsWith(".gz", Qt::CaseInsensitive) || path.endsWith(".zip", Qt::CaseInsensitive)
|| path.endsWith(".bz2", Qt::CaseInsensitive) || path.endsWith(".7z", Qt::CaseInsensitive) || path.endsWith(".rar", Qt::CaseInsensitive));
}
QString MainWindow::PromptFileSelection(void)
{
QString path = QFileDialog::getOpenFileName(this, "Select File", lastDirectory);
if (path != "")
lastDirectory = path.left(path.lastIndexOf('/') + 1);
return (path);
}
void MainWindow::UpdateStartButton(void)
{
if (heimdallRunning)
{
startFlashButton->setEnabled(false);
return;
}
if (repartitionCheckBox->isChecked())
{
if (!IsArchive(pitLineEdit->text()) && factoryfsCheckBox->isChecked() && !IsArchive(factoryfsLineEdit->text()) && kernelCheckBox->isChecked()
&& !IsArchive(kernelLineEdit->text()) && paramCheckBox->isChecked() && !IsArchive(paramLineEdit->text())
&& primaryBootCheckBox->isChecked() && !IsArchive(primaryBootLineEdit->text()) && secondaryBootCheckBox->isChecked()
&& !IsArchive(secondaryBootLineEdit->text()) && modemCheckBox->isChecked() && !IsArchive(modemLineEdit->text()))
{
startFlashButton->setEnabled(true);
}
else
{
startFlashButton->setEnabled(false);
}
}
else
{
bool atLeastOneFile = false;
if (factoryfsCheckBox->isChecked())
{
atLeastOneFile = true;
if (IsArchive(factoryfsLineEdit->text()))
{
startFlashButton->setEnabled(false);
return;
}
}
if (kernelCheckBox->isChecked())
{
atLeastOneFile = true;
if (IsArchive(kernelLineEdit->text()))
{
startFlashButton->setEnabled(false);
return;
}
}
if (paramCheckBox->isChecked())
{
atLeastOneFile = true;
if (IsArchive(paramLineEdit->text()))
{
startFlashButton->setEnabled(false);
return;
}
}
if (primaryBootCheckBox->isChecked())
{
atLeastOneFile = true;
if (IsArchive(primaryBootLineEdit->text()))
{
startFlashButton->setEnabled(false);
return;
}
}
if (secondaryBootCheckBox->isChecked())
{
atLeastOneFile = true;
if (IsArchive(secondaryBootLineEdit->text()))
{
startFlashButton->setEnabled(false);
return;
}
}
if (cacheCheckBox->isChecked())
{
atLeastOneFile = true;
if (IsArchive(cacheLineEdit->text()))
{
startFlashButton->setEnabled(false);
return;
}
}
if (databaseCheckBox->isChecked())
{
atLeastOneFile = true;
if (IsArchive(databaseLineEdit->text()))
{
startFlashButton->setEnabled(false);
return;
}
}
if (modemCheckBox->isChecked())
{
atLeastOneFile = true;
if (IsArchive(modemLineEdit->text()))
{
startFlashButton->setEnabled(false);
return;
}
}
if (recoveryCheckBox->isChecked())
{
atLeastOneFile = true;
if (IsArchive(recoveryLineEdit->text()))
{
startFlashButton->setEnabled(false);
return;
}
}
startFlashButton->setEnabled(atLeastOneFile);
}
}
MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent)
{
setupUi(this);
heimdallRunning = false;
lastDirectory = QDir::toNativeSeparators(QApplication::applicationDirPath());
QObject::connect(actionDonate, SIGNAL(triggered()), this, SLOT(OpenDonationWebpage()));
QObject::connect(actionAboutHeimdall, SIGNAL(triggered()), this, SLOT(ShowAbout()));
QObject::connect(pitBrowseButton, SIGNAL(clicked()), this, SLOT(SelectPit()));
QObject::connect(factoryfsBrowseButton, SIGNAL(clicked()), this, SLOT(SelectFactoryfs()));
QObject::connect(kernelBrowseButton, SIGNAL(clicked()), this, SLOT(SelectKernel()));
QObject::connect(paramBrowseButton, SIGNAL(clicked()), this, SLOT(SelectParam()));
QObject::connect(primaryBootBrowseButton, SIGNAL(clicked()), this, SLOT(SelectPrimaryBootloader()));
QObject::connect(secondaryBootBrowseButton, SIGNAL(clicked()), this, SLOT(SelectSecondaryBootloader()));
QObject::connect(cacheBrowseButton, SIGNAL(clicked()), this, SLOT(SelectCache()));
QObject::connect(databaseBrowseButton, SIGNAL(clicked()), this, SLOT(SelectDatabase()));
QObject::connect(modemBrowseButton, SIGNAL(clicked()), this, SLOT(SelectModem()));
QObject::connect(recoveryBrowseButton, SIGNAL(clicked()), this, SLOT(SelectRecovery()));
QObject::connect(repartitionCheckBox, SIGNAL(stateChanged(int)), this, SLOT(SetRepartionEnabled(int)));
QObject::connect(factoryfsCheckBox, SIGNAL(stateChanged(int)), this, SLOT(SetFactoryfsEnabled(int)));
QObject::connect(kernelCheckBox, SIGNAL(stateChanged(int)), this, SLOT(SetKernelEnabled(int)));
QObject::connect(paramCheckBox, SIGNAL(stateChanged(int)), this, SLOT(SetParamEnabled(int)));
QObject::connect(primaryBootCheckBox, SIGNAL(stateChanged(int)), this, SLOT(SetPrimaryBootloaderEnabled(int)));
QObject::connect(secondaryBootCheckBox, SIGNAL(stateChanged(int)), this, SLOT(SetSecondaryBootloaderEnabled(int)));
QObject::connect(cacheCheckBox, SIGNAL(stateChanged(int)), this, SLOT(SetCacheEnabled(int)));
QObject::connect(databaseCheckBox, SIGNAL(stateChanged(int)), this, SLOT(SetDatabaseEnabled(int)));
QObject::connect(modemCheckBox, SIGNAL(stateChanged(int)), this, SLOT(SetModemEnabled(int)));
QObject::connect(recoveryCheckBox, SIGNAL(stateChanged(int)), this, SLOT(SetRecoveryEnabled(int)));
QObject::connect(startFlashButton, SIGNAL(clicked()), this, SLOT(StartFlash()));
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()
{
}
void MainWindow::OpenDonationWebpage(void)
{
QDesktopServices::openUrl(QUrl("http://www.glassechidna.com.au/donate/", QUrl::StrictMode));
}
void MainWindow::ShowAbout(void)
{
aboutForm.show();
}
void MainWindow::SelectPit(void)
{
QString path = PromptFileSelection();
pitLineEdit->setText(path);
SetRepartionEnabled(path != "");
}
void MainWindow::SelectFactoryfs(void)
{
QString path = PromptFileSelection();
factoryfsLineEdit->setText(path);
SetFactoryfsEnabled(path != "");
}
void MainWindow::SelectKernel(void)
{
QString path = PromptFileSelection();
kernelLineEdit->setText(path);
SetKernelEnabled(path != "");
}
void MainWindow::SelectParam(void)
{
QString path = PromptFileSelection();
paramLineEdit->setText(path);
SetParamEnabled(path != "");
}
void MainWindow::SelectPrimaryBootloader(void)
{
QString path = PromptFileSelection();
primaryBootLineEdit->setText(path);
SetPrimaryBootloaderEnabled(path != "");
}
void MainWindow::SelectSecondaryBootloader(void)
{
QString path = PromptFileSelection();
secondaryBootLineEdit->setText(path);
SetSecondaryBootloaderEnabled(path != "");
}
void MainWindow::SelectCache(void)
{
QString path = PromptFileSelection();
cacheLineEdit->setText(path);
SetCacheEnabled(path != "");
}
void MainWindow::SelectDatabase(void)
{
QString path = PromptFileSelection();
databaseLineEdit->setText(path);
SetDatabaseEnabled(path != "");
}
void MainWindow::SelectModem(void)
{
QString path = PromptFileSelection();
modemLineEdit->setText(path);
SetModemEnabled(path != "");
}
void MainWindow::SelectRecovery(void)
{
QString path = PromptFileSelection();
recoveryLineEdit->setText(path);
SetRecoveryEnabled(path != "");
}
void MainWindow::SetRepartionEnabled(int enabled)
{
if (repartitionCheckBox->isChecked() != (enabled != 0))
repartitionCheckBox->setChecked(enabled);
if (enabled)
{
repartitionCheckBox->setEnabled(true);
pitLineEdit->setEnabled(true);
repartitionCheckBox->setChecked(true);
}
else
{
repartitionCheckBox->setEnabled(pitLineEdit->text() != "");
pitLineEdit->setEnabled(false);
}
UpdateStartButton();
}
void MainWindow::SetFactoryfsEnabled(int enabled)
{
if (factoryfsCheckBox->isChecked() != (enabled != 0))
factoryfsCheckBox->setChecked(enabled);
if (enabled)
{
factoryfsCheckBox->setEnabled(true);
factoryfsLineEdit->setEnabled(true);
factoryfsCheckBox->setChecked(true);
}
else
{
factoryfsCheckBox->setEnabled(factoryfsLineEdit->text() != "");
factoryfsLineEdit->setEnabled(false);
}
UpdateStartButton();
}
void MainWindow::SetKernelEnabled(int enabled)
{
if (kernelCheckBox->isChecked() != (enabled != 0))
kernelCheckBox->setChecked(enabled);
if (enabled)
{
kernelCheckBox->setEnabled(true);
kernelLineEdit->setEnabled(true);
kernelCheckBox->setChecked(true);
}
else
{
kernelCheckBox->setEnabled(kernelLineEdit->text() != "");
kernelLineEdit->setEnabled(false);
}
UpdateStartButton();
}
void MainWindow::SetParamEnabled(int enabled)
{
if (paramCheckBox->isChecked() != (enabled != 0))
paramCheckBox->setChecked(enabled);
if (enabled)
{
paramCheckBox->setEnabled(true);
paramLineEdit->setEnabled(true);
paramCheckBox->setChecked(true);
}
else
{
paramCheckBox->setEnabled(paramLineEdit->text() != "");
paramLineEdit->setEnabled(false);
}
UpdateStartButton();
}
void MainWindow::SetPrimaryBootloaderEnabled(int enabled)
{
if (primaryBootCheckBox->isChecked() != (enabled != 0))
primaryBootCheckBox->setChecked(enabled);
if (enabled)
{
primaryBootCheckBox->setEnabled(true);
primaryBootLineEdit->setEnabled(true);
primaryBootCheckBox->setChecked(true);
}
else
{
primaryBootCheckBox->setEnabled(primaryBootLineEdit->text() != "");
primaryBootLineEdit->setEnabled(false);
}
UpdateStartButton();
}
void MainWindow::SetSecondaryBootloaderEnabled(int enabled)
{
if (secondaryBootCheckBox->isChecked() != (enabled != 0))
secondaryBootCheckBox->setChecked(enabled);
if (enabled)
{
secondaryBootCheckBox->setEnabled(true);
secondaryBootLineEdit->setEnabled(true);
secondaryBootCheckBox->setChecked(true);
}
else
{
secondaryBootCheckBox->setEnabled(secondaryBootLineEdit->text() != "");
secondaryBootLineEdit->setEnabled(false);
}
UpdateStartButton();
}
void MainWindow::SetCacheEnabled(int enabled)
{
if (cacheCheckBox->isChecked() != (enabled != 0))
cacheCheckBox->setChecked(enabled);
if (enabled)
{
cacheCheckBox->setEnabled(true);
cacheLineEdit->setEnabled(true);
cacheCheckBox->setChecked(true);
}
else
{
cacheCheckBox->setEnabled(cacheLineEdit->text() != "");
cacheLineEdit->setEnabled(false);
}
UpdateStartButton();
}
void MainWindow::SetDatabaseEnabled(int enabled)
{
if (databaseCheckBox->isChecked() != (enabled != 0))
databaseCheckBox->setChecked(enabled);
if (enabled)
{
databaseCheckBox->setEnabled(true);
databaseLineEdit->setEnabled(true);
databaseCheckBox->setChecked(true);
}
else
{
databaseCheckBox->setEnabled(databaseLineEdit->text() != "");
databaseLineEdit->setEnabled(false);
}
UpdateStartButton();
}
void MainWindow::SetModemEnabled(int enabled)
{
if (modemCheckBox->isChecked() != (enabled != 0))
modemCheckBox->setChecked(enabled);
if (enabled)
{
modemCheckBox->setEnabled(true);
modemLineEdit->setEnabled(true);
modemCheckBox->setChecked(true);
}
else
{
modemCheckBox->setEnabled(databaseLineEdit->text() != "");
modemLineEdit->setEnabled(false);
}
UpdateStartButton();
}
void MainWindow::SetRecoveryEnabled(int enabled)
{
if (recoveryCheckBox->isChecked() != (enabled != 0))
recoveryCheckBox->setChecked(enabled);
if (enabled)
{
recoveryCheckBox->setEnabled(true);
recoveryLineEdit->setEnabled(true);
recoveryCheckBox->setChecked(true);
}
else
{
recoveryCheckBox->setEnabled(databaseLineEdit->text() != "");
recoveryLineEdit->setEnabled(false);
}
UpdateStartButton();
}
void MainWindow::StartFlash(void)
{
heimdallRunning = true;
heimdallFailed = false;
QStringList arguments;
arguments.append("flash");
if (repartitionCheckBox->isChecked())
{
arguments.append("--pit");
arguments.append(pitLineEdit->text());
}
if (factoryfsCheckBox->isChecked())
{
arguments.append("--factoryfs");
arguments.append(factoryfsLineEdit->text());
}
if (kernelCheckBox->isChecked())
{
arguments.append("--kernel");
arguments.append(kernelLineEdit->text());
}
if (paramCheckBox->isChecked())
{
arguments.append("--param");
arguments.append(paramLineEdit->text());
}
if (primaryBootCheckBox->isChecked())
{
arguments.append("--primary-boot");
arguments.append(primaryBootLineEdit->text());
}
if (secondaryBootCheckBox->isChecked())
{
arguments.append("--secondary-boot");
arguments.append(secondaryBootLineEdit->text());
}
if (cacheCheckBox->isChecked())
{
arguments.append("--cache");
arguments.append(cacheLineEdit->text());
}
if (databaseCheckBox->isChecked())
{
arguments.append("--dbdata");
arguments.append(databaseLineEdit->text());
}
if (modemCheckBox->isChecked())
{
arguments.append("--modem");
arguments.append(modemLineEdit->text());
}
if (recoveryCheckBox->isChecked())
{
arguments.append("--recovery");
arguments.append(recoveryLineEdit->text());
}
if (repartitionCheckBox->isChecked())
{
arguments.append("--repartition");
}
flashProgressBar->setEnabled(true);
UpdateStartButton();
int pathIndex = -1;
process.setReadChannel(QProcess::StandardOutput);
process.start("heimdall", arguments);
process.waitForStarted(1000);
// 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/local/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/local/bin");
break;
}
}
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";
process.start(heimdallPath, arguments);
process.waitForStarted(1000);
}
}
if (heimdallFailed)
{
flashLabel->setText("Failed to start Heimdall!");
heimdallRunning = false;
flashProgressBar->setEnabled(false);
UpdateStartButton();
}
}
}
void MainWindow::HandleHeimdallStdout(void)
{
QString output = process.read(1024);
// 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.
QRegExp uploadingExp("Uploading [^\n]+\n");
if (output.lastIndexOf(uploadingExp) > -1)
flashLabel->setText(uploadingExp.cap().left(uploadingExp.cap().length() - 1));
QRegExp percentExp("[\b\n][0-9]+%");
if (output.lastIndexOf(percentExp) > -1)
{
QString percentString = percentExp.cap();
flashProgressBar->setValue(percentString.mid(1, percentString.length() - 2).toInt());
}
/*// Handle other information
int endOfLastLine = output.length() - 1;
for (; endOfLastLine > -1; endOfLastLine--)
{
if (output[endOfLastLine] != '\n')
break;
}
if (endOfLastLine < 0)
return; // Output was blank or just a bunch of new line characters.
int startOfLastLine = endOfLastLine - 1;
for (; startOfLastLine > -1; startOfLastLine--)
{
if (output[startOfLastLine] == '\n')
break;
}
startOfLastLine++;
// Just look at the last line of the output
output = output.mid(startOfLastLine, endOfLastLine - startOfLastLine + 1); // Work with the last line only
percentExp.setPattern("[0-9]+%");
// If the last line wasn't a uploading message or a percentage transferred then display it.
if (output.lastIndexOf(uploadingExp) < 0 && output.lastIndexOf(percentExp) < 0)
flashLabel->setText(output);*/
}
void MainWindow::HandleHeimdallReturned(int exitCode, QProcess::ExitStatus exitStatus)
{
// This is a work-around for strange issues as a result of a exitCode being cast to
// a unsigned char.
char byteExitCode = exitCode;
heimdallRunning = false;
flashProgressBar->setEnabled(false);
UpdateStartButton();
if (exitStatus == QProcess::NormalExit && byteExitCode >= 0)
{
flashLabel->setText("Flash completed sucessfully!");
}
else
{
QString error = process.readAllStandardError();
int firstNewLineChar = error.indexOf('\n');
if (firstNewLineChar == 0)
error = error.mid(1);
else
error = error.left(firstNewLineChar);
flashLabel->setText(error);
}
}
void MainWindow::HandleHeimdallError(QProcess::ProcessError error)
{
if (error == QProcess::FailedToStart || error == QProcess::Timedout)
{
heimdallFailed = true;
}
else if (error == QProcess::Crashed)
{
flashLabel->setText("Heimdall crashed!");
heimdallRunning = false;
flashProgressBar->setEnabled(false);
UpdateStartButton();
}
else
{
flashLabel->setText("Heimdall reported an unknown error!");
heimdallRunning = false;
flashProgressBar->setEnabled(false);
UpdateStartButton();
}
}

View File

@ -1,93 +0,0 @@
/* Copyright (c) 2010 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 MAINWINDOW_H
#define MAINWINDOW_H
// Heimdall Frontend
#include "aboutform.h"
#include "ui_mainwindow.h"
// Qt
#include <QMainWindow>
#include <QProcess>
namespace HeimdallFrontend
{
class MainWindow : public QMainWindow, public Ui::MainWindow
{
Q_OBJECT
private:
AboutForm aboutForm;
QString lastDirectory;
bool heimdallFailed;
bool heimdallRunning;
QProcess process;
bool IsArchive(QString path);
QString PromptFileSelection(void);
void UpdateStartButton(void);
public:
explicit MainWindow(QWidget *parent = 0);
~MainWindow();
public slots:
void OpenDonationWebpage(void);
void ShowAbout(void);
void SelectPit(void);
void SelectFactoryfs(void);
void SelectKernel(void);
void SelectParam(void);
void SelectPrimaryBootloader(void);
void SelectSecondaryBootloader(void);
void SelectCache(void);
void SelectDatabase(void);
void SelectModem(void);
void SelectRecovery(void);
void SetRepartionEnabled(int enabled);
void SetFactoryfsEnabled(int enabled);
void SetKernelEnabled(int enabled);
void SetParamEnabled(int enabled);
void SetPrimaryBootloaderEnabled(int enabled);
void SetSecondaryBootloaderEnabled(int enabled);
void SetCacheEnabled(int enabled);
void SetDatabaseEnabled(int enabled);
void SetModemEnabled(int enabled);
void SetRecoveryEnabled(int enabled);
void StartFlash(void);
void HandleHeimdallStdout(void);
void HandleHeimdallReturned(int exitCode, QProcess::ExitStatus exitStatus);
void HandleHeimdallError(QProcess::ProcessError error);
};
}
#endif // MAINWINDOW_H

View File

@ -1,348 +1,455 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>AboutForm</class>
<widget class="QWidget" name="AboutForm">
<property name="windowModality">
<enum>Qt::ApplicationModal</enum>
</property>
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>622</width>
<height>561</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>561</width>
<height>551</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>700</width>
<height>600</height>
</size>
</property>
<property name="windowTitle">
<string>About Heimdall Frontend 1.1</string>
</property>
<widget class="QGroupBox" name="groupBox">
<property name="geometry">
<rect>
<x>10</x>
<y>10</y>
<width>601</width>
<height>541</height>
</rect>
</property>
<property name="title">
<string/>
</property>
<widget class="QLabel" name="label">
<property name="geometry">
<rect>
<x>10</x>
<y>190</y>
<width>581</width>
<height>241</height>
</rect>
</property>
<property name="font">
<font>
<pointsize>9</pointsize>
</font>
</property>
<property name="autoFillBackground">
<bool>false</bool>
</property>
<property name="frameShape">
<enum>QFrame::NoFrame</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Plain</enum>
</property>
<property name="text">
<string>Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the &quot;Software&quot;), 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 &quot;AS IS&quot;, 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.</string>
</property>
<property name="textFormat">
<enum>Qt::PlainText</enum>
</property>
<property name="scaledContents">
<bool>true</bool>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
<property name="margin">
<number>0</number>
</property>
<property name="indent">
<number>2</number>
</property>
<property name="openExternalLinks">
<bool>false</bool>
</property>
</widget>
<widget class="QLabel" name="label_2">
<property name="geometry">
<rect>
<x>10</x>
<y>440</y>
<width>581</width>
<height>41</height>
</rect>
</property>
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="frameShape">
<enum>QFrame::NoFrame</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Plain</enum>
</property>
<property name="text">
<string>If you appreciate this software and you would like to support future development please consider donating:</string>
</property>
<property name="textFormat">
<enum>Qt::PlainText</enum>
</property>
<property name="scaledContents">
<bool>true</bool>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
<property name="openExternalLinks">
<bool>false</bool>
</property>
</widget>
<widget class="QPushButton" name="okPushButton">
<property name="geometry">
<rect>
<x>260</x>
<y>510</y>
<width>75</width>
<height>21</height>
</rect>
</property>
<property name="text">
<string>OK</string>
</property>
</widget>
<widget class="QLabel" name="label_3">
<property name="geometry">
<rect>
<x>10</x>
<y>10</y>
<width>581</width>
<height>101</height>
</rect>
</property>
<property name="font">
<font>
<pointsize>9</pointsize>
</font>
</property>
<property name="text">
<string>Heimdall Frontend
Version 1.1.0
Copyright © 2010 Benjamin Dobell, Glass Echidna
Heimdall
Version 1.1.0
Copyright © 2010 Benjamin Dobell, Glass Echidna</string>
</property>
<property name="textFormat">
<enum>Qt::PlainText</enum>
</property>
<property name="scaledContents">
<bool>true</bool>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
</property>
<property name="openExternalLinks">
<bool>false</bool>
</property>
</widget>
<widget class="QLabel" name="label_4">
<property name="geometry">
<rect>
<x>10</x>
<y>118</y>
<width>581</width>
<height>16</height>
</rect>
</property>
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="text">
<string>Heimdall Homepage:</string>
</property>
<property name="textFormat">
<enum>Qt::PlainText</enum>
</property>
<property name="scaledContents">
<bool>true</bool>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
</property>
</widget>
<widget class="QLabel" name="label_5">
<property name="geometry">
<rect>
<x>10</x>
<y>130</y>
<width>581</width>
<height>21</height>
</rect>
</property>
<property name="text">
<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:'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;a href=&quot;http://www.glassechidna.com.au/products/heimdall/&quot;&gt;&lt;span style=&quot; font-family:'MS Shell Dlg 2'; font-size:10pt; text-decoration: underline; color:#0000ff;&quot;&gt;http://www.glassechidna.com.au/products/heimdall/&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="textFormat">
<enum>Qt::RichText</enum>
</property>
<property name="scaledContents">
<bool>true</bool>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
</property>
<property name="openExternalLinks">
<bool>true</bool>
</property>
</widget>
<widget class="QLabel" name="label_6">
<property name="geometry">
<rect>
<x>10</x>
<y>150</y>
<width>581</width>
<height>16</height>
</rect>
</property>
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="text">
<string>Glass Echidna Homepage:</string>
</property>
<property name="textFormat">
<enum>Qt::PlainText</enum>
</property>
<property name="scaledContents">
<bool>true</bool>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
</property>
</widget>
<widget class="QLabel" name="label_7">
<property name="geometry">
<rect>
<x>10</x>
<y>162</y>
<width>581</width>
<height>21</height>
</rect>
</property>
<property name="text">
<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:'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;a href=&quot;http://www.glassechidna.com.au/&quot;&gt;&lt;span style=&quot; font-family:'MS Shell Dlg 2'; font-size:10pt; text-decoration: underline; color:#0000ff;&quot;&gt;http://www.glassechidna.com.au/&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="textFormat">
<enum>Qt::RichText</enum>
</property>
<property name="scaledContents">
<bool>true</bool>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
</property>
<property name="openExternalLinks">
<bool>true</bool>
</property>
</widget>
<widget class="QLabel" name="label_8">
<property name="geometry">
<rect>
<x>10</x>
<y>480</y>
<width>581</width>
<height>21</height>
</rect>
</property>
<property name="text">
<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:'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;a href=&quot;http://www.glassechidna.com.au/donate/&quot;&gt;&lt;span style=&quot; font-family:'MS Shell Dlg 2'; font-size:10pt; text-decoration: underline; color:#0000ff;&quot;&gt;http://www.glassechidna.com.au/donate/&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="textFormat">
<enum>Qt::RichText</enum>
</property>
<property name="scaledContents">
<bool>true</bool>
</property>
<property name="openExternalLinks">
<bool>true</bool>
</property>
</widget>
</widget>
</widget>
<resources/>
<connections>
<connection>
<sender>okPushButton</sender>
<signal>clicked()</signal>
<receiver>AboutForm</receiver>
<slot>close()</slot>
<hints>
<hint type="sourcelabel">
<x>247</x>
<y>520</y>
</hint>
<hint type="destinationlabel">
<x>245</x>
<y>275</y>
</hint>
</hints>
</connection>
</connections>
</ui>
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>AboutForm</class>
<widget class="QWidget" name="AboutForm">
<property name="windowModality">
<enum>Qt::ApplicationModal</enum>
</property>
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>581</width>
<height>491</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>581</width>
<height>491</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>581</width>
<height>491</height>
</size>
</property>
<property name="windowTitle">
<string>About Heimdall Frontend</string>
</property>
<widget class="QPushButton" name="okPushButton">
<property name="geometry">
<rect>
<x>250</x>
<y>460</y>
<width>75</width>
<height>21</height>
</rect>
</property>
<property name="text">
<string>OK</string>
</property>
</widget>
<widget class="QScrollArea" name="scrollArea">
<property name="geometry">
<rect>
<x>10</x>
<y>10</y>
<width>561</width>
<height>441</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="horizontalScrollBarPolicy">
<enum>Qt::ScrollBarAlwaysOff</enum>
</property>
<property name="widgetResizable">
<bool>true</bool>
</property>
<widget class="QWidget" name="scrollAreaWidgetContents">
<property name="geometry">
<rect>
<x>0</x>
<y>-701</y>
<width>542</width>
<height>1140</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>16777215</height>
</size>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<layout class="QVBoxLayout" name="verticalLayout">
<property name="rightMargin">
<number>0</number>
</property>
<item>
<widget class="QLabel" name="versionCopyrightLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="text">
<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: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;-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;-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">
<enum>Qt::RichText</enum>
</property>
<property name="scaledContents">
<bool>true</bool>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
<property name="openExternalLinks">
<bool>false</bool>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_2">
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="frameShape">
<enum>QFrame::NoFrame</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Plain</enum>
</property>
<property name="text">
<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:'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;&quot;&gt;If you appreciate this software and you would like to support future development please consider donating:&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;a href=&quot;http://www.glassechidna.com.au/donate/&quot;&gt;&lt;span style=&quot; font-family:'MS Shell Dlg 2'; font-size:10pt; text-decoration: underline; color:#0000ff;&quot;&gt;http://www.glassechidna.com.au/donate/&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="textFormat">
<enum>Qt::RichText</enum>
</property>
<property name="scaledContents">
<bool>true</bool>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
<property name="openExternalLinks">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<spacer name="verticalSpacer_4">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>15</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="label_6">
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="text">
<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:'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;Glass Echidna Homepage:&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;&lt;a href=&quot;http://www.glassechidna.com.au/&quot;&gt;&lt;span style=&quot; font-family:'MS Shell Dlg 2'; font-size:10pt; text-decoration: underline; color:#0000ff;&quot;&gt;http://www.glassechidna.com.au/&lt;/span&gt;&lt;/a&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; text-decoration: underline; color:#0000ff;&quot;&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="textFormat">
<enum>Qt::RichText</enum>
</property>
<property name="scaledContents">
<bool>true</bool>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
<property name="openExternalLinks">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_4">
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="text">
<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:'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 Homepage:&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;&lt;a href=&quot;http://www.glassechidna.com.au/products/heimdall/&quot;&gt;&lt;span style=&quot; font-family:'MS Shell Dlg 2'; font-size:10pt; text-decoration: underline; color:#0000ff;&quot;&gt;http://www.glassechidna.com.au/products/heimdall/&lt;/span&gt;&lt;/a&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; text-decoration: underline; color:#0000ff;&quot;&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="textFormat">
<enum>Qt::RichText</enum>
</property>
<property name="scaledContents">
<bool>true</bool>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
<property name="openExternalLinks">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label">
<property name="font">
<font>
<pointsize>9</pointsize>
<kerning>true</kerning>
</font>
</property>
<property name="autoFillBackground">
<bool>false</bool>
</property>
<property name="frameShape">
<enum>QFrame::NoFrame</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Plain</enum>
</property>
<property name="text">
<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:'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 and Heimdall Frontend are licensed under the following license:&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;Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the &amp;quot;Software&amp;quot;), 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:&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;The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.&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;THE SOFTWARE IS PROVIDED &amp;quot;AS IS&amp;quot;, 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.&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;/body&gt;&lt;/html&gt;</string>
</property>
<property name="textFormat">
<enum>Qt::RichText</enum>
</property>
<property name="scaledContents">
<bool>true</bool>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
<property name="margin">
<number>0</number>
</property>
<property name="indent">
<number>2</number>
</property>
<property name="openExternalLinks">
<bool>false</bool>
</property>
</widget>
</item>
<item>
<spacer name="verticalSpacer_2">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>15</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="label_5">
<property name="text">
<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:'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 Frontend's user interface is powered by the Qt Framework:&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;Copyright © 2008-2011 Nokia Corporation&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;&lt;span style=&quot; font-family:'MS Shell Dlg 2'; font-size:10pt;&quot;&gt;Qt 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>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
<property name="openExternalLinks">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>15</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="label_7">
<property name="text">
<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:'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 Frontend utilises zlib for package compression:&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;zlib is licensed under the following license:&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;&lt;span style=&quot; font-family:'MS Shell Dlg 2'; font-size:10pt;&quot;&gt;Copyright © 1995-2010 Jean-loup Gailly and Mark Adler&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;This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software.&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;Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions:&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;1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.&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;2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.&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;3. This notice may not be removed or altered from any source distribution.&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="textFormat">
<enum>Qt::RichText</enum>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
<property name="openExternalLinks">
<bool>false</bool>
</property>
</widget>
</item>
<item>
<spacer name="verticalSpacer_3">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>15</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="label_8">
<property name="text">
<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>
</property>
<property name="textFormat">
<enum>Qt::RichText</enum>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
<property name="openExternalLinks">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</widget>
</widget>
<resources/>
<connections>
<connection>
<sender>okPushButton</sender>
<signal>clicked()</signal>
<receiver>AboutForm</receiver>
<slot>close()</slot>
<hints>
<hint type="sourcelabel">
<x>287</x>
<y>470</y>
</hint>
<hint type="destinationlabel">
<x>290</x>
<y>245</y>
</hint>
</hints>
</connection>
</connections>
</ui>

View File

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

View File

@ -1,19 +0,0 @@
Copyright (c) 2010 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.

View File

@ -1,119 +0,0 @@
Heimdall (c) 2010 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. I am not responsible for the result of your actions.
These instructions are for Linux operating systems.
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 extracted Heimdall to.
3. Then 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 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
Installing Heimdall Frontend from Source (Optional):
1. First make sure you have installed Qt 4.6 or above,
available from http://qt.nokia.com/.
2. Open a terminal and navigate to the directory you extracted Heimdall to.
3. Enter the following commands to compile and install Heimdall Frontend:
cd heimdall-frontend
qmake heimdall-frontend.pro
make
NOTE: You can use "checkinstall" instead of "make" in order to generate
a redistributable package.
4. The file output will be placed in the UNIX sub-directory. Move this file
to your preferred location.
5. Done
Flashing Firmware with Heimdall Frontend:
1. Fully charge your device (use the wall charger as it's faster).
2. Download a decrypted Samsung Galaxy S ROM and extract it to a directory.
3. If the ROM is provided as one of more archives (nested or otherwise),
extract them all to the same location.
NOTE: If you want to use the CSC then extract it last.
3. Open Heimdall Frontend.
4. Put your Galaxy S device into download mode.
5. For each file you wish to flash use "Browse" to select the file.
6. Press "Start".
7. Heimdall Frontend will display the progress and inform you when the
flash is complete.
Flashing Firmware from Command Line / Terminal:
1. Fully charge your device (use the wall charger as it's faster).
2. Download a decrypted Samsung Galaxy S ROM and extract it to a directory.
3. If the ROM is provided as one of more archives (nested or otherwise),
extract them all to the same location.
NOTE: If you want to use the CSC then extract it last.
4. Open a terminal and navigate to the directory where you extracted the
ROM files.
5. Type the following to list all the functionality Heimdall supports:
heimdall help
8. 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:
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. Done

View File

@ -1,12 +0,0 @@
# ----------------------------------------------------
# This file is generated by the Qt Visual Studio Add-in.
# ------------------------------------------------------
HEADERS += ./Source/aboutform.h \
./Source/mainwindow.h
SOURCES += ./Source/aboutform.cpp \
./Source/main.cpp \
./Source/mainwindow.cpp
FORMS += ./mainwindow.ui \
./aboutform.ui
RESOURCES += mainwindow.qrc

View File

@ -1,58 +0,0 @@
# ----------------------------------------------------
# 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
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
}
}
QT += core gui
CONFIG += release
DEFINES += QT_LARGEFILE_SUPPORT
INCLUDEPATH += ./GeneratedFiles \
./GeneratedFiles/Release \
.
DEPENDPATH += .
MOC_DIR += ./GeneratedFiles/release
OBJECTS_DIR += release
UI_DIR += ./GeneratedFiles
RCC_DIR += ./GeneratedFiles
include(heimdall-frontend.pri)

View File

@ -1,174 +0,0 @@
<?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'">$(IncludePath)</IncludePath>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
<IncludePath Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IncludePath)</IncludePath>
<LibraryPath Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(LibraryPath)</LibraryPath>
<LibraryPath Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(LibraryPath)</LibraryPath>
</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;.\;%(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;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>qtmaind.lib;QtCored4.lib;QtGuid4.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;.\;%(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;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>false</GenerateDebugInformation>
<AdditionalDependencies>qtmain.lib;QtCore4.lib;QtGui4.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\main.cpp" />
<ClCompile Include="Source\mainwindow.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" />
<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." "-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." "-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

@ -1,78 +0,0 @@
<?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>
</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>
</ItemGroup>
</Project>

View File

@ -1,4 +1,4 @@
<RCC>
<qresource prefix="MainWindow">
</qresource>
</RCC>
<RCC>
<qresource prefix="MainWindow">
</qresource>
</RCC>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,45 @@
/* 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 <QMessageBox>
// Heimdall Frontend
#include "Alerts.h"
using namespace HeimdallFrontend;
void Alerts::DisplayError(const QString& errorMessage)
{
QMessageBox messageBox;
messageBox.setModal(true);
messageBox.setText(errorMessage);
messageBox.setIcon(QMessageBox::Critical);
messageBox.exec();
}
void Alerts::DisplayWarning(const QString& warningMessage)
{
QMessageBox messageBox;
messageBox.setModal(true);
messageBox.setText(warningMessage);
messageBox.setIcon(QMessageBox::Warning);
messageBox.exec();
}

View File

@ -1,35 +1,38 @@
/* Copyright (c) 2010 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 "ui_aboutform.h"
// Qt
#include <QWidget>
namespace HeimdallFrontend
{
class AboutForm : public QWidget, public Ui::AboutForm
{
public:
explicit AboutForm(QWidget *parent = 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 ALERTS_H
#define ALERTS_H
// Qt
#include <QString>
namespace HeimdallFrontend
{
class Alerts
{
public:
static void DisplayError(const QString& errorMessage);
static void DisplayWarning(const QString& warningMessage);
};
}
#endif

View File

@ -0,0 +1,783 @@
/* 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 "QRegExp"
// Heimdall Frontend
#include "Alerts.h"
#include "FirmwareInfo.h"
#include "Packaging.h"
using namespace HeimdallFrontend;
DeviceInfo::DeviceInfo()
{
}
DeviceInfo::DeviceInfo(const QString& manufacturer, const QString& product, const QString& name)
{
this->manufacturer = manufacturer;
this->product = product;
this->name = name;
}
bool DeviceInfo::ParseXml(QXmlStreamReader& xml)
{
bool foundManufacturer = false;
bool foundProduct = false;
bool foundName = false;
while (!xml.atEnd())
{
QXmlStreamReader::TokenType nextToken = xml.readNext();
if (nextToken == QXmlStreamReader::StartElement)
{
if (xml.name() == "manufacturer")
{
if (foundManufacturer)
{
Alerts::DisplayError("Found multiple <manufacturer> elements in <device>.");
return (false);
}
foundManufacturer = true;
manufacturer = xml.readElementText();
}
else if (xml.name() == "product")
{
if (foundProduct)
{
Alerts::DisplayError("Found multiple <product> elements in <device>.");
return (false);
}
foundProduct = true;
product = xml.readElementText();
}
else if (xml.name() == "name")
{
if (foundName)
{
Alerts::DisplayError("Found multiple <name> elements in <device>.");
return (false);
}
foundName = true;
name = xml.readElementText();
}
else
{
Alerts::DisplayError(QString("<%1> is not a valid child of <device>.").arg(xml.name().toString()));
return (false);
}
}
else if (nextToken == QXmlStreamReader::EndElement)
{
if (xml.name() == "device")
{
if (foundManufacturer && foundProduct && foundName)
{
return (true);
}
else
{
Alerts::DisplayError("Required elements are missing from <device>.");
return (false);
}
}
}
else
{
if (!(nextToken == QXmlStreamReader::Characters && xml.isWhitespace()))
{
Alerts::DisplayError("Unexpected token found in <device>.");
return (false);
}
}
}
return (false);
}
void DeviceInfo::WriteXml(QXmlStreamWriter& xml) const
{
xml.writeStartElement("device");
xml.writeStartElement("manufacturer");
xml.writeCharacters(manufacturer);
xml.writeEndElement();
xml.writeStartElement("product");
xml.writeCharacters(product);
xml.writeEndElement();
xml.writeStartElement("name");
xml.writeCharacters(name);
xml.writeEndElement();
xml.writeEndElement();
}
PlatformInfo::PlatformInfo()
{
}
void PlatformInfo::Clear(void)
{
name.clear();
version.clear();
}
bool PlatformInfo::IsCleared(void) const
{
return (name.isEmpty() && version.isEmpty());
}
bool PlatformInfo::ParseXml(QXmlStreamReader& xml)
{
Clear();
bool foundName = false;
bool foundVersion = false;
while (!xml.atEnd())
{
QXmlStreamReader::TokenType nextToken = xml.readNext();
if (nextToken == QXmlStreamReader::StartElement)
{
if (xml.name() == "name")
{
if (foundName)
{
Alerts::DisplayError("Found multiple <name> elements in <platform>.");
return (false);
}
foundName = true;
name = xml.readElementText();
}
else if (xml.name() == "version")
{
if (foundVersion)
{
Alerts::DisplayError("Found multiple <version> elements in <platform>.");
return (false);
}
foundVersion = true;
version = xml.readElementText();
}
else
{
Alerts::DisplayError(QString("<%1> is not a valid child of <platform>.").arg(xml.name().toString()));
return (false);
}
}
else if (nextToken == QXmlStreamReader::EndElement)
{
if (xml.name() == "platform")
{
if (foundName && foundVersion)
{
return (true);
}
else
{
Alerts::DisplayError("Required elements are missing from <platform>.");
return (false);
}
}
}
else
{
if (!(nextToken == QXmlStreamReader::Characters && xml.isWhitespace()))
{
Alerts::DisplayError("Unexpected token found in <platform>.");
return (false);
}
}
}
return (false);
}
void PlatformInfo::WriteXml(QXmlStreamWriter& xml) const
{
xml.writeStartElement("platform");
xml.writeStartElement("name");
xml.writeCharacters(name);
xml.writeEndElement();
xml.writeStartElement("version");
xml.writeCharacters(version);
xml.writeEndElement();
xml.writeEndElement();
}
FileInfo::FileInfo()
{
}
FileInfo::FileInfo(unsigned int partitionId, const QString& filename)
{
this->partitionId = partitionId;
this->filename = filename;
}
bool FileInfo::ParseXml(QXmlStreamReader& xml)
{
bool foundId = false;
bool foundFilename = false;
while (!xml.atEnd())
{
QXmlStreamReader::TokenType nextToken = xml.readNext();
if (nextToken == QXmlStreamReader::StartElement)
{
if (xml.name() == "id")
{
if (foundId)
{
Alerts::DisplayError("Found multiple <id> elements in <file>.");
return (false);
}
foundId = true;
partitionId = xml.readElementText().toInt();
}
else if (xml.name() == "filename")
{
if (foundFilename)
{
Alerts::DisplayError("Found multiple <filename> elements in <file>.");
return (false);
}
foundFilename = true;
filename = xml.readElementText();
}
else
{
Alerts::DisplayError(QString("<%1> is not a valid child of <file>.").arg(xml.name().toString()));
return (false);
}
}
else if (nextToken == QXmlStreamReader::EndElement)
{
if (xml.name() == "file")
{
if (foundId && foundFilename)
{
return (true);
}
else
{
Alerts::DisplayError("Required elements are missing from <file>.");
return (false);
}
}
}
else
{
if (!(nextToken == QXmlStreamReader::Characters && xml.isWhitespace()))
{
Alerts::DisplayError("Unexpected token found in <file>.");
return (false);
}
}
}
return (false);
}
void FileInfo::WriteXml(QXmlStreamWriter& xml, const QString& filename) const
{
xml.writeStartElement("file");
xml.writeStartElement("id");
xml.writeCharacters(QString::number(partitionId));
xml.writeEndElement();
xml.writeStartElement("filename");
xml.writeCharacters(filename);
xml.writeEndElement();
xml.writeEndElement();
}
FirmwareInfo::FirmwareInfo()
{
repartition = false;
noReboot = false;
}
void FirmwareInfo::Clear(void)
{
name = "";
version = "";
platformInfo.Clear();
developers.clear();
url.clear();
donateUrl.clear();
deviceInfos.clear();
pitFilename.clear();
repartition = false;
noReboot = false;
fileInfos.clear();
}
bool FirmwareInfo::IsCleared(void) const
{
return (name.isEmpty() && version.isEmpty() && platformInfo.IsCleared() && developers.isEmpty() && url.isEmpty() && url.isEmpty() && donateUrl.isEmpty()
&& deviceInfos.isEmpty() && pitFilename.isEmpty() && !repartition && !noReboot && fileInfos.isEmpty());
}
bool FirmwareInfo::ParseXml(QXmlStreamReader& xml)
{
Clear();
bool foundName = false;
bool foundVersion = false;
bool foundPlatform = false;
bool foundDevelopers = false;
bool foundUrl = false;
bool foundDonateUrl = false;
bool foundDevices = false;
bool foundPit = false;
bool foundRepartition = false;
bool foundNoReboot = false;
bool foundFiles = false;
if (!xml.readNextStartElement())
{
Alerts::DisplayError("Failed to find <firmware> element.");
return (false);
}
if (xml.name() != "firmware")
{
Alerts::DisplayError(QString("Expected <firmware> element but found <%1>.").arg(xml.name().toString()));
return (false);
}
QString formatVersionString;
formatVersionString += xml.attributes().value("version");
if (formatVersionString.isEmpty())
{
Alerts::DisplayError("<firmware> is missing the version attribute.");
return (false);
}
bool parsedVersion = false;
int formatVersion = formatVersionString.toInt(&parsedVersion);
if (!parsedVersion)
{
Alerts::DisplayError("<firmware> contains a malformed version.");
return (false);
}
if (formatVersion > kVersion)
{
Alerts::DisplayError("Package is for a newer version of Heimdall Frontend.\nPlease download the latest version of Heimdall Frontend.");
return (false);
}
while (!xml.atEnd())
{
QXmlStreamReader::TokenType nextToken = xml.readNext();
if (nextToken == QXmlStreamReader::StartElement)
{
if (xml.name() == "name")
{
if (foundName)
{
Alerts::DisplayError("Found multiple <name> elements in <firmware>.");
return (false);
}
foundName = true;
name = xml.readElementText();
}
else if (xml.name() == "version")
{
if (foundVersion)
{
Alerts::DisplayError("Found multiple <version> elements in <firmware>.");
return (false);
}
foundVersion = true;
version = xml.readElementText();
}
else if (xml.name() == "platform")
{
if (foundPlatform)
{
Alerts::DisplayError("Found multiple <platform> elements in <firmware>.");
return (false);
}
foundPlatform = true;
if (!platformInfo.ParseXml(xml))
return (false);
}
else if (xml.name() == "developers")
{
if (foundDevelopers)
{
Alerts::DisplayError("Found multiple <developers> elements in <firmware>.");
return (false);
}
foundDevelopers = true;
while (!xml.atEnd())
{
nextToken = xml.readNext();
if (nextToken == QXmlStreamReader::StartElement)
{
if (xml.name() == "name")
{
developers.append(xml.readElementText());
}
else
{
Alerts::DisplayError(QString("<%1> is not a valid child of <developers>.").arg(xml.name().toString()));
return (false);
}
}
else if (nextToken == QXmlStreamReader::EndElement)
{
if (xml.name() == "developers")
break;
}
else
{
if (!(nextToken == QXmlStreamReader::Characters && xml.isWhitespace()))
{
Alerts::DisplayError("Unexpected token found in <developers>.");
return (false);
}
}
}
}
else if (xml.name() == "url")
{
if (foundUrl)
{
Alerts::DisplayError("Found multiple <url> elements in <firmware>.");
return (false);
}
foundUrl = true;
url = xml.readElementText();
}
else if (xml.name() == "donateurl")
{
if (foundDonateUrl)
{
Alerts::DisplayError("Found multiple <donateurl> elements in <firmware>.");
return (false);
}
foundDonateUrl = true;
donateUrl = xml.readElementText();
}
else if (xml.name() == "devices")
{
if (foundDevices)
{
Alerts::DisplayError("Found multiple <devices> elements in <firmware>.");
return (false);
}
foundDevices = true;
while (!xml.atEnd())
{
nextToken = xml.readNext();
if (nextToken == QXmlStreamReader::StartElement)
{
if (xml.name() == "device")
{
DeviceInfo deviceInfo;
if (!deviceInfo.ParseXml(xml))
return (false);
deviceInfos.append(deviceInfo);
}
else
{
Alerts::DisplayError(QString("<%1> is not a valid child of <devices>.").arg(xml.name().toString()));
return (false);
}
}
else if (nextToken == QXmlStreamReader::EndElement)
{
if (xml.name() == "devices")
break;
}
else
{
if (!(nextToken == QXmlStreamReader::Characters && xml.isWhitespace()))
{
Alerts::DisplayError("Unexpected token found in <devices>.");
return (false);
}
}
}
}
else if (xml.name() == "pit")
{
if (foundPit)
{
Alerts::DisplayError("Found multiple <pit> elements in <firmware>.");
return (false);
}
foundPit = true;
pitFilename = xml.readElementText();
}
else if (xml.name() == "repartition")
{
if (foundRepartition)
{
Alerts::DisplayError("Found multiple <repartition> elements in <firmware>.");
return (false);
}
foundRepartition = true;
repartition = (xml.readElementText().toInt() != 0);
}
else if (xml.name() == "noreboot")
{
if (foundNoReboot)
{
Alerts::DisplayError("Found multiple <noreboot> elements in <firmware>.");
return (false);
}
foundNoReboot = true;
noReboot = (xml.readElementText().toInt() != 0);
}
else if (xml.name() == "files")
{
if (foundFiles)
{
Alerts::DisplayError("Found multiple <files> elements in <firmware>.");
return (false);
}
foundFiles = true;
while (!xml.atEnd())
{
nextToken = xml.readNext();
if (nextToken == QXmlStreamReader::StartElement)
{
if (xml.name() == "file")
{
FileInfo fileInfo;
if (!fileInfo.ParseXml(xml))
return (false);
fileInfos.append(fileInfo);
}
else
{
Alerts::DisplayError(QString("<%1> is not a valid child of <files>.").arg(xml.name().toString()));
return (false);
}
}
else if (nextToken == QXmlStreamReader::EndElement)
{
if (xml.name() == "files")
break;
}
else
{
if (!(nextToken == QXmlStreamReader::Characters && xml.isWhitespace()))
{
Alerts::DisplayError("Unexpected token found in <devices>.");
return (false);
}
}
}
}
else
{
Alerts::DisplayError(QString("<%1> is not a valid child of <firmware>.").arg(xml.name().toString()));
return (false);
}
}
else if (nextToken == QXmlStreamReader::EndElement)
{
if (xml.name() == "firmware")
{
if (!(foundName && foundVersion && foundPlatform && foundDevelopers && foundDevices && foundPit && foundRepartition && foundNoReboot && foundFiles))
{
Alerts::DisplayError("Required elements are missing from <firmware>.");
return (false);
}
else
{
break;
}
}
}
else
{
if (!(nextToken == QXmlStreamReader::Characters && xml.isWhitespace()))
{
Alerts::DisplayError("Unexpected token found in <firmware>.");
return (false);
}
}
}
// Read whitespaces at the end of the file (if there are any)
xml.readNext();
if (!xml.atEnd())
{
Alerts::DisplayError("Found data after </firmware>.");
return (false);
}
return (true);
}
void FirmwareInfo::WriteXml(QXmlStreamWriter& xml) const
{
xml.writeStartDocument();
xml.writeStartElement("firmware");
xml.writeAttribute("version", QString::number(FirmwareInfo::kVersion));
xml.writeStartElement("name");
xml.writeCharacters(name);
xml.writeEndElement();
xml.writeStartElement("version");
xml.writeCharacters(version);
xml.writeEndElement();
platformInfo.WriteXml(xml);
xml.writeStartElement("developers");
for (int i = 0; i < developers.length(); i++)
{
xml.writeStartElement("name");
xml.writeCharacters(developers[i]);
xml.writeEndElement();
}
xml.writeEndElement();
if (!url.isEmpty())
{
xml.writeStartElement("url");
xml.writeCharacters(url);
xml.writeEndElement();
}
if (!donateUrl.isEmpty())
{
xml.writeStartElement("donateurl");
xml.writeCharacters(donateUrl);
xml.writeEndElement();
}
xml.writeStartElement("devices");
for (int i = 0; i < deviceInfos.length(); i++)
deviceInfos[i].WriteXml(xml);
xml.writeEndElement();
xml.writeStartElement("pit");
int lastSlash = pitFilename.lastIndexOf('/');
if (lastSlash < 0)
lastSlash = pitFilename.lastIndexOf('\\');
xml.writeCharacters(pitFilename.mid(lastSlash + 1));
xml.writeEndElement();
xml.writeStartElement("repartition");
xml.writeCharacters((repartition) ? "1" : "0");
xml.writeEndElement();
xml.writeStartElement("noreboot");
xml.writeCharacters((noReboot) ? "1" : "0");
xml.writeEndElement();
xml.writeStartElement("files");
for (int i = 0; i < fileInfos.length(); i++)
{
fileInfos[i].WriteXml(xml, Packaging::ClashlessFilename(fileInfos, i));
}
xml.writeEndElement();
xml.writeEndElement();
xml.writeEndDocument();
}

View File

@ -0,0 +1,302 @@
/* 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 FIRMWAREINFO_H
#define FIRMWAREINFO_H
// Qt
#include <QFile>
#include <QString>
#include <QXmlStreamReader>
namespace HeimdallFrontend
{
class DeviceInfo
{
private:
QString manufacturer;
QString product;
QString name;
public:
DeviceInfo();
DeviceInfo(const QString& manufacturer, const QString& product, const QString& name);
bool ParseXml(QXmlStreamReader& xml);
void WriteXml(QXmlStreamWriter& xml) const;
const QString& GetManufacturer(void) const
{
return (manufacturer);
}
void SetManufacturer(const QString& manufacturer)
{
this->manufacturer = manufacturer;
}
const QString& GetProduct(void) const
{
return (product);
}
void SetProduct(const QString& product)
{
this->product = product;
}
const QString& GetName(void) const
{
return (name);
}
void SetName(const QString& name)
{
this->name = name;
}
};
class PlatformInfo
{
private:
QString name;
QString version;
public:
PlatformInfo();
void Clear(void);
bool IsCleared(void) const;
bool ParseXml(QXmlStreamReader& xml);
void WriteXml(QXmlStreamWriter& xml) const;
const QString& GetName(void) const
{
return (name);
}
void SetName(const QString& name)
{
this->name = name;
}
const QString& GetVersion(void) const
{
return (version);
}
void SetVersion(const QString& version)
{
this->version = version;
}
};
class FileInfo
{
private:
unsigned int partitionId;
QString filename;
public:
FileInfo();
FileInfo(unsigned int partitionId, const QString& filename);
bool ParseXml(QXmlStreamReader& xml);
void WriteXml(QXmlStreamWriter& xml, const QString& filename) const;
unsigned int GetPartitionId(void) const
{
return (partitionId);
}
void SetPartitionId(unsigned int partitionId)
{
this->partitionId = partitionId;
}
const QString& GetFilename(void) const
{
return (filename);
}
void SetFilename(const QString& filename)
{
this->filename = filename;
}
};
class FirmwareInfo
{
public:
enum
{
kVersion = 1
};
private:
QString name;
QString version;
PlatformInfo platformInfo;
QList<QString> developers;
QString url;
QString donateUrl;
QList<DeviceInfo> deviceInfos;
QString pitFilename;
bool repartition;
bool noReboot;
QList<FileInfo> fileInfos;
public:
FirmwareInfo();
void Clear(void);
bool IsCleared(void) const;
bool ParseXml(QXmlStreamReader& xml);
void WriteXml(QXmlStreamWriter& xml) const;
const QString& GetName(void) const
{
return (name);
}
void SetName(const QString& name)
{
this->name = name;
}
const QString& GetVersion(void) const
{
return (version);
}
void SetVersion(const QString& version)
{
this->version = version;
}
const PlatformInfo& GetPlatformInfo(void) const
{
return (platformInfo);
}
PlatformInfo& GetPlatformInfo(void)
{
return (platformInfo);
}
const QList<QString>& GetDevelopers(void) const
{
return (developers);
}
QList<QString>& GetDevelopers(void)
{
return (developers);
}
const QString& GetUrl(void) const
{
return (url);
}
void SetUrl(const QString& url)
{
this->url = url;
}
const QString& GetDonateUrl(void) const
{
return (donateUrl);
}
void SetDonateUrl(const QString& donateUrl)
{
this->donateUrl = donateUrl;
}
const QList<DeviceInfo>& GetDeviceInfos(void) const
{
return (deviceInfos);
}
QList<DeviceInfo>& GetDeviceInfos(void)
{
return (deviceInfos);
}
const QString& GetPitFilename(void) const
{
return (pitFilename);
}
void SetPitFilename(const QString& pitFilename)
{
this->pitFilename = pitFilename;
}
bool GetRepartition(void) const
{
return (repartition);
}
void SetRepartition(bool repartition)
{
this->repartition = repartition;
}
bool GetNoReboot(void) const
{
return (noReboot);
}
void SetNoReboot(bool noReboot)
{
this->noReboot = noReboot;
}
const QList<FileInfo>& GetFileInfos(void) const
{
return (fileInfos);
}
QList<FileInfo>& GetFileInfos(void)
{
return (fileInfos);
}
};
}
#endif

View File

@ -0,0 +1,66 @@
/* 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 Frontend
#include "Alerts.h"
#include "PackageData.h"
using namespace HeimdallFrontend;
PackageData::PackageData()
{
}
PackageData::~PackageData()
{
for (int i = 0; i < files.length(); i++)
delete files[i];
}
void PackageData::Clear(void)
{
firmwareInfo.Clear();
for (int i = 0; i < files.length(); i++)
delete files[i];
files.clear();
}
bool PackageData::ReadFirmwareInfo(QFile *file)
{
if (!file->open(QFile::ReadOnly))
{
Alerts::DisplayError(QString("Failed to open file: \1%s").arg(file->fileName()));
return (false);
}
QXmlStreamReader xml(file);
bool success = firmwareInfo.ParseXml(xml);
file->close();
return (success);
}
bool PackageData::IsCleared(void) const
{
return (firmwareInfo.IsCleared() && files.isEmpty());
}

View File

@ -0,0 +1,77 @@
/* 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 PACKAGEDATA_H
#define PACKAGEDATA_H
// Qt
#include <QTemporaryFile>
// Heimdall Frontend
#include "FirmwareInfo.h"
namespace HeimdallFrontend
{
class PackageData
{
private:
FirmwareInfo firmwareInfo;
QList<QTemporaryFile *> files;
public:
PackageData();
~PackageData();
void Clear(void);
bool ReadFirmwareInfo(QFile *file);
bool IsCleared(void) const;
const FirmwareInfo& GetFirmwareInfo(void) const
{
return (firmwareInfo);
}
FirmwareInfo& GetFirmwareInfo(void)
{
return (firmwareInfo);
}
const QList<QTemporaryFile *>& GetFiles(void) const
{
return (files);
}
QList<QTemporaryFile *>& GetFiles(void)
{
return (files);
}
// Simply clears the files list, it does delete/close any files.
void RemoveAllFiles(void)
{
files.clear();
}
};
}
#endif

View File

@ -0,0 +1,931 @@
/* 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.*/
#ifdef WIN32
#pragma warning(disable : 4996)
#endif
// C/C++ Standard Library
#include <stdio.h>
// zlib
#include "zlib.h"
// Qt
#include <QDateTime>
#include <QDir>
#include <QProgressDialog>
#include <QRandomGenerator>
// Heimdall Frontend
#include "Alerts.h"
#include "Packaging.h"
using namespace HeimdallFrontend;
const qint64 Packaging::kMaxFileSize = 8589934592ll;
const char *Packaging::ustarMagic = "ustar";
bool Packaging::ExtractTar(QTemporaryFile& tarFile, PackageData *packageData)
{
TarHeader tarHeader;
if (!tarFile.open())
{
Alerts::DisplayError(QString("Error opening temporary TAR archive:\n%1").arg(tarFile.fileName()));
return (false);
}
bool previousEmpty = false;
QProgressDialog progressDialog("Extracting files...", "Cancel", 0, tarFile.size());
progressDialog.setWindowModality(Qt::ApplicationModal);
progressDialog.setWindowTitle("Heimdall Frontend");
while (!tarFile.atEnd())
{
qint64 dataRead = tarFile.read(tarHeader.buffer, TarHeader::kBlockLength);
if (dataRead != TarHeader::kBlockLength)
{
progressDialog.close();
Alerts::DisplayError("Package's TAR archive is malformed.");
tarFile.close();
return (false);
}
progressDialog.setValue(tarFile.pos());
if (progressDialog.wasCanceled())
{
tarFile.close();
progressDialog.close();
return (false);
}
//bool ustarFormat = strcmp(tarHeader.fields.magic, ustarMagic) == 0;
bool empty = true;
for (int i = 0; i < TarHeader::kBlockLength; i++)
{
if (tarHeader.buffer[i] != 0)
{
empty = false;
break;
}
}
if (empty)
{
if (previousEmpty)
{
// Two empty blocks in a row means we've reached the end of the archive.
break;
}
}
else
{
int checksum = 0;
for (char *bufferIndex = tarHeader.buffer; bufferIndex < tarHeader.fields.checksum; bufferIndex++)
checksum += static_cast<unsigned char>(*bufferIndex);
checksum += 8 * ' ';
checksum += static_cast<unsigned char>(tarHeader.fields.typeFlag);
// Both the TAR and USTAR formats have terrible documentation, it's not clear if the following code is required.
/*if (ustarFormat)
{
for (char *bufferIndex = tarHeader.fields.linkName; bufferIndex < tarHeader.fields.prefix + 155; bufferIndex++)
checksum += static_cast<unsigned char>(*bufferIndex);
}*/
bool parsed = false;
// The size field is not always null terminated, so we must create a copy and null terminate it for parsing.
char fileSizeString[13];
memcpy(fileSizeString, tarHeader.fields.size, 12);
fileSizeString[12] = '\0';
qulonglong fileSize = QString(fileSizeString).toULongLong(&parsed, 8);
if (!parsed)
{
progressDialog.close();
Alerts::DisplayError("Tar header contained an invalid file size.");
tarFile.close();
return (false);
}
if (fileSize > 0 && tarHeader.fields.typeFlag == '0')
{
// We're working with a file.
QString filename = QString::fromUtf8(tarHeader.fields.name);
QTemporaryFile *outputFile = new QTemporaryFile("XXXXXX-" + filename);
packageData->GetFiles().append(outputFile);
if (!outputFile->open())
{
progressDialog.close();
Alerts::DisplayError(QString("Failed to open output file: \n%1").arg(outputFile->fileName()));
tarFile.close();
return (false);
}
qulonglong dataRemaining = fileSize;
char readBuffer[TarHeader::kBlockReadCount * TarHeader::kBlockLength];
// Copy the file contents from tarFile to outputFile
while (dataRemaining > 0)
{
qint64 fileDataToRead = (dataRemaining < TarHeader::kBlockReadCount * TarHeader::kBlockLength)
? dataRemaining : TarHeader::kBlockReadCount * TarHeader::kBlockLength;
qint64 dataRead = tarFile.read(readBuffer, fileDataToRead + (TarHeader::kBlockLength - fileDataToRead % TarHeader::kBlockLength) % TarHeader::kBlockLength);
if (dataRead < fileDataToRead || dataRead % TarHeader::kBlockLength != 0)
{
progressDialog.close();
Alerts::DisplayError("Unexpected read error whilst extracting package files.");
tarFile.close();
outputFile->close();
remove(outputFile->fileName().toStdString().c_str());
return (false);
}
outputFile->write(readBuffer, fileDataToRead);
dataRemaining -= fileDataToRead;
progressDialog.setValue(tarFile.pos());
if (progressDialog.wasCanceled())
{
tarFile.close();
outputFile->close();
remove(outputFile->fileName().toStdString().c_str());
progressDialog.close();
return (false);
}
}
outputFile->close();
}
else
{
progressDialog.close();
Alerts::DisplayError("Heimdall packages shouldn't contain links or directories.");
tarFile.close();
return (false);
}
}
previousEmpty = empty;
}
progressDialog.close();
tarFile.close();
return (true);
}
bool Packaging::WriteTarEntry(const QString& filePath, QTemporaryFile *tarFile, const QString& entryFilename)
{
TarHeader tarHeader;
memset(tarHeader.buffer, 0, TarHeader::kBlockLength);
QFile file(filePath);
if (!file.open(QFile::ReadOnly))
{
Alerts::DisplayError(QString("Failed to open file: \n%1").arg(file.fileName()));
return (false);
}
if (file.size() > Packaging::kMaxFileSize)
{
Alerts::DisplayError(QString("File is too large to be packaged:\n%1").arg(file.fileName()));
return (false);
}
QFileInfo qtFileInfo(file);
QByteArray utfFilename;
utfFilename = entryFilename.toUtf8();
if (utfFilename.length() > 100)
{
Alerts::DisplayError(QString("File name is too long:\n%1").arg(qtFileInfo.fileName()));
return (false);
}
strcpy(tarHeader.fields.name, utfFilename.constData());
unsigned int mode = 0;
QFile::Permissions permissions = file.permissions();
// Other
if (permissions.testFlag(QFile::ExeOther))
mode |= TarHeader::kModeOtherExecute;
if (permissions.testFlag(QFile::WriteOther))
mode |= TarHeader::kModeOtherWrite;
if (permissions.testFlag(QFile::ReadOther))
mode |= TarHeader::kModeOtherRead;
// Group
if (permissions.testFlag(QFile::ExeGroup))
mode |= TarHeader::kModeGroupExecute;
if (permissions.testFlag(QFile::WriteGroup))
mode |= TarHeader::kModeGroupWrite;
if (permissions.testFlag(QFile::ReadGroup))
mode |= TarHeader::kModeGroupRead;
// Owner
if (permissions.testFlag(QFile::ExeOwner))
mode |= TarHeader::kModeOwnerExecute;
if (permissions.testFlag(QFile::WriteOwner))
mode |= TarHeader::kModeOwnerWrite;
if (permissions.testFlag(QFile::ReadOwner))
mode |= TarHeader::kModeOwnerRead;
sprintf(tarHeader.fields.mode, "%07o", mode);
// Owner id
uint id = qtFileInfo.ownerId();
if (id < 2097151)
sprintf(tarHeader.fields.userId, "%07o", id);
else
sprintf(tarHeader.fields.userId, "%07o", 0);
// Group id
id = qtFileInfo.groupId();
if (id < 2097151)
sprintf(tarHeader.fields.groupId, "%07o", id);
else
sprintf(tarHeader.fields.groupId, "%07o", 0);
// 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());
// Regular File
tarHeader.fields.typeFlag = '0';
// Calculate checksum
int checksum = 0;
memset(tarHeader.fields.checksum, ' ', 8);
for (int i = 0; i < TarHeader::kTarHeaderLength; i++)
checksum += static_cast<unsigned char>(tarHeader.buffer[i]);
sprintf(tarHeader.fields.checksum, "%07o", checksum);
// Write the header to the TAR file.
tarFile->write(tarHeader.buffer, TarHeader::kBlockLength);
char buffer[TarHeader::kBlockWriteCount * TarHeader::kBlockLength];
qint64 offset = 0;
while (offset < file.size())
{
qint64 dataRead = file.read(buffer, TarHeader::kBlockWriteCount * TarHeader::kBlockLength);
if (tarFile->write(buffer, dataRead) != dataRead)
{
Alerts::DisplayError("Failed to write data to the temporary TAR file.");
return (false);
}
if (dataRead % TarHeader::kBlockLength != 0)
{
int remainingBlockLength = TarHeader::kBlockLength - dataRead % TarHeader::kBlockLength;
memset(buffer, 0, remainingBlockLength);
if (tarFile->write(buffer, remainingBlockLength) != remainingBlockLength)
{
Alerts::DisplayError("Failed to write data to the temporary TAR file.");
return (false);
}
}
offset += dataRead;
}
return (true);
}
bool Packaging::CreateTar(const FirmwareInfo& firmwareInfo, QTemporaryFile *tarFile)
{
const QList<FileInfo>& fileInfos = firmwareInfo.GetFileInfos();
QProgressDialog progressDialog("Packaging files...", "Cancel", 0, fileInfos.length() + 2);
progressDialog.setWindowModality(Qt::ApplicationModal);
progressDialog.setWindowTitle("Heimdall Frontend");
QTemporaryFile firmwareXmlFile("XXXXXX-firmware.xml");
if (!firmwareXmlFile.open())
{
progressDialog.close();
Alerts::DisplayError(QString("Failed to create temporary file: \n%1").arg(firmwareXmlFile.fileName()));
return (false);
}
QXmlStreamWriter xml(&firmwareXmlFile);
firmwareInfo.WriteXml(xml);
firmwareXmlFile.close();
if (!tarFile->open())
{
progressDialog.close();
Alerts::DisplayError(QString("Failed to open file: \n%1").arg(tarFile->fileName()));
return (false);
}
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")
{
Alerts::DisplayError("You cannot name your partition files \"firmware.xml\".\nIt is a reserved name.");
return (false);
}
if (!WriteTarEntry(fileInfos[i].GetFilename(), tarFile, filename))
{
tarFile->resize(0);
tarFile->close();
progressDialog.close();
return (false);
}
progressDialog.setValue(i);
if (progressDialog.wasCanceled())
{
tarFile->resize(0);
tarFile->close();
progressDialog.close();
return (false);
}
}
int lastSlash = firmwareInfo.GetPitFilename().lastIndexOf('/');
if (lastSlash < 0)
lastSlash = firmwareInfo.GetPitFilename().lastIndexOf('\\');
QString pitFilename = ClashlessFilename(fileInfos, firmwareInfo.GetPitFilename().mid(lastSlash + 1));
if (pitFilename == "firmware.xml")
{
Alerts::DisplayError("You cannot name your PIT file \"firmware.xml\".\nIt is a reserved name.");
return (false);
}
if (!WriteTarEntry(firmwareInfo.GetPitFilename(), tarFile, pitFilename))
{
tarFile->resize(0);
tarFile->close();
return (false);
}
progressDialog.setValue(progressDialog.value() + 1);
if (progressDialog.wasCanceled())
{
tarFile->resize(0);
tarFile->close();
progressDialog.close();
return (false);
}
if (!WriteTarEntry(firmwareXmlFile.fileName(), tarFile, "firmware.xml"))
{
tarFile->resize(0);
tarFile->close();
return (false);
}
progressDialog.setValue(progressDialog.value() + 1);
progressDialog.close();
// Write two empty blocks to signify the end of the archive.
char emptyEntry[TarHeader::kBlockLength];
memset(emptyEntry, 0, TarHeader::kBlockLength);
tarFile->write(emptyEntry, TarHeader::kBlockLength);
tarFile->write(emptyEntry, TarHeader::kBlockLength);
tarFile->close();
return (true);
}
bool Packaging::ExtractPackage(const QString& packagePath, PackageData *packageData)
{
FILE *compressedPackageFile = fopen(packagePath.toStdString().c_str(), "rb");
if (!compressedPackageFile)
{
Alerts::DisplayError(QString("Failed to open package:\n%1").arg(packagePath));
return (false);
}
fseek(compressedPackageFile, 0, SEEK_END);
quint64 compressedFileSize = ftell(compressedPackageFile);
rewind(compressedPackageFile);
gzFile packageFile = gzdopen(fileno(compressedPackageFile), "rb");
QTemporaryFile outputTar("XXXXXX.tar");
if (!outputTar.open())
{
Alerts::DisplayError("Failed to open temporary TAR archive.");
gzclose(packageFile);
return (false);
}
char buffer[kExtractBufferLength];
int bytesRead;
quint64 totalBytesRead = 0;
QProgressDialog progressDialog("Decompressing package...", "Cancel", 0, compressedFileSize);
progressDialog.setWindowModality(Qt::ApplicationModal);
progressDialog.setWindowTitle("Heimdall Frontend");
do
{
bytesRead = gzread(packageFile, buffer, kExtractBufferLength);
if (bytesRead == -1)
{
progressDialog.close();
Alerts::DisplayError("Error decompressing archive.");
gzclose(packageFile);
return (false);
}
outputTar.write(buffer, bytesRead);
totalBytesRead += bytesRead;
progressDialog.setValue(totalBytesRead);
if (progressDialog.wasCanceled())
{
gzclose(packageFile);
progressDialog.close();
return (false);
}
} while (bytesRead > 0);
progressDialog.close();
outputTar.close();
gzclose(packageFile); // Closes packageFile and compressedPackageFile
if (!ExtractTar(outputTar, packageData))
return (false);
// Find and read firmware.xml
for (int i = 0; i < packageData->GetFiles().length(); i++)
{
QTemporaryFile *file = packageData->GetFiles()[i];
if (file->fileTemplate() == "XXXXXX-firmware.xml")
{
if (!packageData->ReadFirmwareInfo(file))
{
packageData->Clear();
return (false);
}
return (true);
}
}
Alerts::DisplayError("firmware.xml is missing from the package.");
return (false);
}
bool Packaging::BuildPackage(const QString& packagePath, const FirmwareInfo& firmwareInfo)
{
FILE *compressedPackageFile = fopen(packagePath.toStdString().c_str(), "wb");
if (!compressedPackageFile)
{
Alerts::DisplayError(QString("Failed to create package:\n%1").arg(packagePath));
return (false);
}
QTemporaryFile tar("XXXXXX.tar");
if (!CreateTar(firmwareInfo, &tar))
{
fclose(compressedPackageFile);
remove(packagePath.toStdString().c_str());
return (false);
}
if (!tar.open())
{
Alerts::DisplayError(QString("Failed to open temporary file: \n%1").arg(tar.fileName()));
fclose(compressedPackageFile);
remove(packagePath.toStdString().c_str());
return (false);
}
gzFile packageFile = gzdopen(fileno(compressedPackageFile), "wb");
char buffer[kCompressBufferLength];
qint64 totalBytesRead = 0;
int bytesRead;
QProgressDialog progressDialog("Compressing package...", "Cancel", 0, tar.size());
progressDialog.setWindowModality(Qt::ApplicationModal);
progressDialog.setWindowTitle("Heimdall Frontend");
do
{
bytesRead = tar.read(buffer, kCompressBufferLength);
if (bytesRead == -1)
{
progressDialog.close();
Alerts::DisplayError("Error reading temporary TAR file.");
gzclose(packageFile);
remove(packagePath.toStdString().c_str());
return (false);
}
if (gzwrite(packageFile, buffer, bytesRead) != bytesRead)
{
progressDialog.close();
Alerts::DisplayError("Error compressing package.");
gzclose(packageFile);
remove(packagePath.toStdString().c_str());
return (false);
}
totalBytesRead += bytesRead;
progressDialog.setValue(totalBytesRead);
if (progressDialog.wasCanceled())
{
gzclose(packageFile);
remove(packagePath.toStdString().c_str());
progressDialog.close();
return (false);
}
} while (bytesRead > 0);
progressDialog.close();
gzclose(packageFile); // Closes packageFile and compressedPackageFile
return (true);
}
QString Packaging::ClashlessFilename(const QList<FileInfo>& fileInfos, int fileInfoIndex)
{
int lastSlash = fileInfos[fileInfoIndex].GetFilename().lastIndexOf('/');
if (lastSlash < 0)
lastSlash = fileInfos[fileInfoIndex].GetFilename().lastIndexOf('\\');
QString filename = fileInfos[fileInfoIndex].GetFilename().mid(lastSlash + 1);
unsigned int renameIndex = 0;
// Check for name clashes
for (int i = 0; i < fileInfoIndex; i++)
{
lastSlash = fileInfos[i].GetFilename().lastIndexOf('/');
if (lastSlash < 0)
lastSlash = fileInfos[i].GetFilename().lastIndexOf('\\');
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())
renameIndex++;
}
if (renameIndex <= 0)
{
return (filename);
}
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)
{
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;
}
}
}
}
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);
}
}
}
}
QString Packaging::ClashlessFilename(const QList<FileInfo>& fileInfos, const QString& filename)
{
unsigned int renameIndex = 0;
// Check for name clashes
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 (filename == otherFilename)
renameIndex++;
}
if (renameIndex <= 0)
{
return (filename);
}
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)
{
QString trimmedOtherFilename = otherFilename.left(filename.length());
if (filename == 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;
}
}
}
}
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, 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

@ -0,0 +1,121 @@
/* 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 PACKAGING_H
#define PACKAGING_H
// Qt
#include <QList>
#include <QString>
#include <QTemporaryFile>
// Heimdall Frontend
#include "PackageData.h"
namespace HeimdallFrontend
{
union TarHeader
{
enum
{
kBlockLength = 512,
kBlockReadCount = 8,
kBlockWriteCount = 8,
kTarHeaderLength = 257,
kUstarHeaderLength = 500,
};
enum
{
kModeOtherExecute = 1,
kModeOtherWrite = 1 << 1,
kModeOtherRead = 1 << 2,
kModeGroupExecute = 1 << 3,
kModeGroupWrite = 1 << 4,
kModeGroupRead = 1 << 5,
kModeOwnerExecute = 1 << 6,
kModeOwnerWrite = 1 << 7,
kModeOwnerRead = 1 << 8,
kModeReserved = 2 << 9,
kModeSetGid = 2 << 10,
kModeSetUid = 2 << 11
};
struct
{
char name[100];
char mode[8];
char userId[8];
char groupId[8];
char size[12];
char modifiedTime[12];
char checksum[8];
char typeFlag;
char linkName[100];
char magic[6];
char version[2];
char userName[32];
char groupName[32];
char devMajor[8];
char devMinor[8];
char prefix[155];
} fields;
char buffer[kBlockLength];
};
class Packaging
{
public:
// Would definitely prefer to use an enum but VC++ and GCC give conflicting warnings about C++0x or type overflow.
static const qint64 kMaxFileSize;
private:
enum
{
kExtractBufferLength = 262144,
kCompressBufferLength = 262144
};
// TODO: Add support for sparse files to both methods?
static bool ExtractTar(QTemporaryFile& tarFile, PackageData *packageData);
static bool WriteTarEntry(const QString& filePath, QTemporaryFile *tarFile, const QString& entryFilename);
static bool CreateTar(const FirmwareInfo& firmwareInfo, QTemporaryFile *tarFile); // Uses original TAR format.
public:
static const char *ustarMagic;
static bool ExtractPackage(const QString& packagePath, PackageData *packageData);
static bool BuildPackage(const QString& packagePath, const FirmwareInfo& firmwareInfo);
static QString ClashlessFilename(const QList<FileInfo>& fileInfos, int fileInfoIndex);
static QString ClashlessFilename(const QList<FileInfo>& fileInfos, const QString& filename);
};
}
#endif

View File

@ -0,0 +1,126 @@
/* 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

@ -0,0 +1,58 @@
/* 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

@ -1,37 +1,42 @@
/* Copyright (c) 2010 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 Frontend
#include "mainwindow.h"
// Qt
#include <QtGui/QApplication>
using namespace HeimdallFrontend;
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
MainWindow w;
w.show();
return a.exec();
}
/* 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 <QApplication>
#include <QtPlugin>
// Heimdall Frontend
#include "mainwindow.h"
#if defined(QT_STATIC)
Q_IMPORT_PLUGIN (QWindowsIntegrationPlugin);
#endif
using namespace HeimdallFrontend;
int main(int argc, char *argv[])
{
QApplication application(argc, argv);
MainWindow window;
window.show();
return (application.exec());
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,206 @@
/* 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 MAINWINDOW_H
#define MAINWINDOW_H
// Qt
#include <QList>
#include <QMainWindow>
#include <QProcess>
#include <QTemporaryFile>
// libpit
#include "libpit.h"
// Heimdall Frontend
#include "aboutform.h"
#include "ui_mainwindow.h"
#include "PackageData.h"
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
private:
enum
{
kPrintPitSourceDevice = 0,
kPrintPitSourceLocalFile
};
AboutForm aboutForm;
QString lastDirectory;
int tabIndex;
bool heimdallFailed;
HeimdallState heimdallState;
QProcess heimdallProcess;
PackageData loadedPackageData;
PitData currentPitData;
PackageData workingPackageData;
bool populatingPartitionNames;
QList<unsigned int> unusedPartitionIds;
bool verboseOutput;
bool resume;
void StartHeimdall(const QStringList& arguments);
void UpdateUnusedPartitionIds(void);
bool ReadPit(QFile *file);
void UpdatePackageUserInterface(void);
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);
void UpdatePartitionNamesInterface(void);
public:
explicit MainWindow(QWidget *parent = 0);
~MainWindow();
public slots:
void OpenDonationWebpage(void);
void SetVerboseOutput(bool enabled);
void ShowAbout(void);
void FunctionTabChanged(int index);
// Load Package Tab
void SelectFirmwarePackage(void);
void OpenDeveloperHomepage(void);
void OpenDeveloperDonationWebpage(void);
void LoadFirmwarePackage(void);
// Flash Tab
void SelectPartitionName(int index);
void SelectPartitionFile(void);
void SelectPartition(int row);
void AddPartition(void);
void RemovePartition(void);
void SelectPit(void);
void SetRepartition(int enabled);
void SetNoReboot(int enabled);
void SetResume(bool enabled);
void SetResume(int enabled);
void StartFlash(void);
// Create Package Tab
void FirmwareNameChanged(const QString& text);
void FirmwareVersionChanged(const QString& text);
void PlatformNameChanged(const QString& text);
void PlatformVersionChanged(const QString& text);
void HomepageUrlChanged(const QString& text);
void DonateUrlChanged(const QString& text);
void DeveloperNameChanged(const QString& text);
void SelectDeveloper(int row);
void AddDeveloper(void);
void RemoveDeveloper(void);
void DeviceInfoChanged(const QString& text);
void SelectDevice(int row);
void AddDevice(void);
void RemoveDevice(void);
void BuildPackage(void);
// Utilities Tab
void DetectDevice(void);
void ClosePcScreen(void);
void SelectPitDestination(void);
void DownloadPit(void);
void DevicePrintPitToggled(bool checked);
void LocalFilePrintPitToggled(bool checked);
void SelectPrintPitFile(void);
void PrintPit(void);
// Heimdall Command Line
void HandleHeimdallStdout(void);
void HandleHeimdallReturned(int exitCode, QProcess::ExitStatus exitStatus);
void HandleHeimdallError(QProcess::ProcessError error);
};
}
#endif // MAINWINDOW_H

View File

@ -1,2 +0,0 @@
SUBSYSTEM=="usb", SYSFS{idVendor}=="04e8", SYSFS{idProduct}=="6601", MODE="0666"

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"

80
heimdall/CMakeLists.txt Normal file
View File

@ -0,0 +1,80 @@
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})

View File

@ -1,19 +0,0 @@
Copyright (c) 2010 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.

View File

@ -1,27 +0,0 @@
AUTOMAKE_OPTIONS = subdir-objects
ACLOCAL_AMFLAGS = ${ACLOCAL_FLAGS}
AM_CPPFLAGS = $(DEPS_CFLAGS)
bin_PROGRAMS = heimdall
heimdall_SOURCES = source/BeginDumpPacket.h source/BridgeManager.cpp \
source/BridgeManager.h source/ControlPacket.h source/DeviceInfoPacket.h \
source/DeviceInfoResponse.h source/DumpPartFileTransferPacket.h \
source/DumpPartPitFilePacket.h source/DumpResponse.h source/EndFileTransferPacket.h \
source/EndModemFileTransferPacket.h source/EndPhoneFileTransferPacket.h \
source/FileTransferPacket.h source/FlashPartFileTransferPacket.h \
source/FlashPartPitFilePacket.h source/Heimdall.h \
source/InboundPacket.h source/InterfaceManager.cpp source/InterfaceManager.h \
source/main.cpp source/OutboundPacket.h source/Packet.h source/PitFilePacket.h \
source/PitFileResponse.h source/RebootDevicePacket.h source/ReceiveFilePartPacket.h \
source/ResponsePacket.h source/SendFilePartPacket.h source/SendFilePartResponse.h
heimdall_LDADD = $(DEPS_LIBS)
if LINUXTARGET
udevrulesdir = /lib/udev/rules.d
udevrules_DATA = 60-heimdall-galaxy-s.rules
install-data-hook:
sudo service udev reload
endif
dist_noinst_SCRIPTS = autogen.sh

View File

@ -1,784 +0,0 @@
# 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/InterfaceManager.$(OBJEXT) source/main.$(OBJEXT)
heimdall_OBJECTS = $(am_heimdall_OBJECTS)
am__DEPENDENCIES_1 =
heimdall_DEPENDENCIES = $(am__DEPENDENCIES_1)
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@
AUTOMAKE_OPTIONS = subdir-objects
ACLOCAL_AMFLAGS = ${ACLOCAL_FLAGS}
AM_CPPFLAGS = $(DEPS_CFLAGS)
heimdall_SOURCES = source/BeginDumpPacket.h source/BridgeManager.cpp \
source/BridgeManager.h source/ControlPacket.h source/DeviceInfoPacket.h \
source/DeviceInfoResponse.h source/DumpPartFileTransferPacket.h \
source/DumpPartPitFilePacket.h source/DumpResponse.h source/EndFileTransferPacket.h \
source/EndModemFileTransferPacket.h source/EndPhoneFileTransferPacket.h \
source/FileTransferPacket.h source/FlashPartFileTransferPacket.h \
source/FlashPartPitFilePacket.h source/Heimdall.h \
source/InboundPacket.h source/InterfaceManager.cpp source/InterfaceManager.h \
source/main.cpp source/OutboundPacket.h source/Packet.h source/PitFilePacket.h \
source/PitFileResponse.h source/RebootDevicePacket.h source/ReceiveFilePartPacket.h \
source/ResponsePacket.h source/SendFilePartPacket.h source/SendFilePartResponse.h
heimdall_LDADD = $(DEPS_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/InterfaceManager.$(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/InterfaceManager.$(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)/InterfaceManager.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@ sudo service udev reload
# 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

File diff suppressed because it is too large Load Diff

View File

@ -1,3 +0,0 @@
#!/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

@ -1,280 +0,0 @@
# 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

@ -1,643 +0,0 @@
m4trace:configure.ac:1: -1- AC_INIT([Heimdall], [0.1], [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- AC_CANONICAL_TARGET
m4trace:configure.ac:4: -1- AC_CANONICAL_HOST
m4trace:configure.ac:4: -1- AC_CANONICAL_BUILD
m4trace:configure.ac:4: -1- AC_REQUIRE_AUX_FILE([config.sub])
m4trace:configure.ac:4: -1- AC_REQUIRE_AUX_FILE([config.guess])
m4trace:configure.ac:4: -1- AC_SUBST([build], [$ac_cv_build])
m4trace:configure.ac:4: -1- AC_SUBST_TRACE([build])
m4trace:configure.ac:4: -1- m4_pattern_allow([^build$])
m4trace:configure.ac:4: -1- AC_SUBST([build_cpu], [$[1]])
m4trace:configure.ac:4: -1- AC_SUBST_TRACE([build_cpu])
m4trace:configure.ac:4: -1- m4_pattern_allow([^build_cpu$])
m4trace:configure.ac:4: -1- AC_SUBST([build_vendor], [$[2]])
m4trace:configure.ac:4: -1- AC_SUBST_TRACE([build_vendor])
m4trace:configure.ac:4: -1- m4_pattern_allow([^build_vendor$])
m4trace:configure.ac:4: -1- AC_SUBST([build_os])
m4trace:configure.ac:4: -1- AC_SUBST_TRACE([build_os])
m4trace:configure.ac:4: -1- m4_pattern_allow([^build_os$])
m4trace:configure.ac:4: -1- AC_SUBST([host], [$ac_cv_host])
m4trace:configure.ac:4: -1- AC_SUBST_TRACE([host])
m4trace:configure.ac:4: -1- m4_pattern_allow([^host$])
m4trace:configure.ac:4: -1- AC_SUBST([host_cpu], [$[1]])
m4trace:configure.ac:4: -1- AC_SUBST_TRACE([host_cpu])
m4trace:configure.ac:4: -1- m4_pattern_allow([^host_cpu$])
m4trace:configure.ac:4: -1- AC_SUBST([host_vendor], [$[2]])
m4trace:configure.ac:4: -1- AC_SUBST_TRACE([host_vendor])
m4trace:configure.ac:4: -1- m4_pattern_allow([^host_vendor$])
m4trace:configure.ac:4: -1- AC_SUBST([host_os])
m4trace:configure.ac:4: -1- AC_SUBST_TRACE([host_os])
m4trace:configure.ac:4: -1- m4_pattern_allow([^host_os$])
m4trace:configure.ac:4: -1- AC_SUBST([target], [$ac_cv_target])
m4trace:configure.ac:4: -1- AC_SUBST_TRACE([target])
m4trace:configure.ac:4: -1- m4_pattern_allow([^target$])
m4trace:configure.ac:4: -1- AC_SUBST([target_cpu], [$[1]])
m4trace:configure.ac:4: -1- AC_SUBST_TRACE([target_cpu])
m4trace:configure.ac:4: -1- m4_pattern_allow([^target_cpu$])
m4trace:configure.ac:4: -1- AC_SUBST([target_vendor], [$[2]])
m4trace:configure.ac:4: -1- AC_SUBST_TRACE([target_vendor])
m4trace:configure.ac:4: -1- m4_pattern_allow([^target_vendor$])
m4trace:configure.ac:4: -1- AC_SUBST([target_os])
m4trace:configure.ac:4: -1- AC_SUBST_TRACE([target_os])
m4trace:configure.ac:4: -1- m4_pattern_allow([^target_os$])
m4trace:configure.ac:5: -1- AM_INIT_AUTOMAKE([1.10 -Wall no-define foreign])
m4trace:configure.ac:5: -1- m4_pattern_allow([^AM_[A-Z]+FLAGS$])
m4trace:configure.ac:5: -1- AM_AUTOMAKE_VERSION([1.11.1])
m4trace:configure.ac:5: -1- AC_REQUIRE_AUX_FILE([install-sh])
m4trace:configure.ac:5: -1- AC_SUBST([INSTALL_PROGRAM])
m4trace:configure.ac:5: -1- AC_SUBST_TRACE([INSTALL_PROGRAM])
m4trace:configure.ac:5: -1- m4_pattern_allow([^INSTALL_PROGRAM$])
m4trace:configure.ac:5: -1- AC_SUBST([INSTALL_SCRIPT])
m4trace:configure.ac:5: -1- AC_SUBST_TRACE([INSTALL_SCRIPT])
m4trace:configure.ac:5: -1- m4_pattern_allow([^INSTALL_SCRIPT$])
m4trace:configure.ac:5: -1- AC_SUBST([INSTALL_DATA])
m4trace:configure.ac:5: -1- AC_SUBST_TRACE([INSTALL_DATA])
m4trace:configure.ac:5: -1- m4_pattern_allow([^INSTALL_DATA$])
m4trace:configure.ac:5: -1- AC_SUBST([am__isrc], [' -I$(srcdir)'])
m4trace:configure.ac:5: -1- AC_SUBST_TRACE([am__isrc])
m4trace:configure.ac:5: -1- m4_pattern_allow([^am__isrc$])
m4trace:configure.ac:5: -1- _AM_SUBST_NOTMAKE([am__isrc])
m4trace:configure.ac:5: -1- AC_SUBST([CYGPATH_W])
m4trace:configure.ac:5: -1- AC_SUBST_TRACE([CYGPATH_W])
m4trace:configure.ac:5: -1- m4_pattern_allow([^CYGPATH_W$])
m4trace:configure.ac:5: -1- AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])
m4trace:configure.ac:5: -1- AC_SUBST_TRACE([PACKAGE])
m4trace:configure.ac:5: -1- m4_pattern_allow([^PACKAGE$])
m4trace:configure.ac:5: -1- AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])
m4trace:configure.ac:5: -1- AC_SUBST_TRACE([VERSION])
m4trace:configure.ac:5: -1- m4_pattern_allow([^VERSION$])
m4trace:configure.ac:5: -1- AC_REQUIRE_AUX_FILE([missing])
m4trace:configure.ac:5: -1- AC_SUBST([ACLOCAL])
m4trace:configure.ac:5: -1- AC_SUBST_TRACE([ACLOCAL])
m4trace:configure.ac:5: -1- m4_pattern_allow([^ACLOCAL$])
m4trace:configure.ac:5: -1- AC_SUBST([AUTOCONF])
m4trace:configure.ac:5: -1- AC_SUBST_TRACE([AUTOCONF])
m4trace:configure.ac:5: -1- m4_pattern_allow([^AUTOCONF$])
m4trace:configure.ac:5: -1- AC_SUBST([AUTOMAKE])
m4trace:configure.ac:5: -1- AC_SUBST_TRACE([AUTOMAKE])
m4trace:configure.ac:5: -1- m4_pattern_allow([^AUTOMAKE$])
m4trace:configure.ac:5: -1- AC_SUBST([AUTOHEADER])
m4trace:configure.ac:5: -1- AC_SUBST_TRACE([AUTOHEADER])
m4trace:configure.ac:5: -1- m4_pattern_allow([^AUTOHEADER$])
m4trace:configure.ac:5: -1- AC_SUBST([MAKEINFO])
m4trace:configure.ac:5: -1- AC_SUBST_TRACE([MAKEINFO])
m4trace:configure.ac:5: -1- m4_pattern_allow([^MAKEINFO$])
m4trace:configure.ac:5: -1- AC_SUBST([install_sh])
m4trace:configure.ac:5: -1- AC_SUBST_TRACE([install_sh])
m4trace:configure.ac:5: -1- m4_pattern_allow([^install_sh$])
m4trace:configure.ac:5: -1- AC_SUBST([STRIP])
m4trace:configure.ac:5: -1- AC_SUBST_TRACE([STRIP])
m4trace:configure.ac:5: -1- m4_pattern_allow([^STRIP$])
m4trace:configure.ac:5: -1- AC_SUBST([INSTALL_STRIP_PROGRAM])
m4trace:configure.ac:5: -1- AC_SUBST_TRACE([INSTALL_STRIP_PROGRAM])
m4trace:configure.ac:5: -1- m4_pattern_allow([^INSTALL_STRIP_PROGRAM$])
m4trace:configure.ac:5: -1- AC_REQUIRE_AUX_FILE([install-sh])
m4trace:configure.ac:5: -1- AC_SUBST([MKDIR_P])
m4trace:configure.ac:5: -1- AC_SUBST_TRACE([MKDIR_P])
m4trace:configure.ac:5: -1- m4_pattern_allow([^MKDIR_P$])
m4trace:configure.ac:5: -1- AC_SUBST([mkdir_p], ["$MKDIR_P"])
m4trace:configure.ac:5: -1- AC_SUBST_TRACE([mkdir_p])
m4trace:configure.ac:5: -1- m4_pattern_allow([^mkdir_p$])
m4trace:configure.ac:5: -1- AC_SUBST([AWK])
m4trace:configure.ac:5: -1- AC_SUBST_TRACE([AWK])
m4trace:configure.ac:5: -1- m4_pattern_allow([^AWK$])
m4trace:configure.ac:5: -1- AC_SUBST([SET_MAKE])
m4trace:configure.ac:5: -1- AC_SUBST_TRACE([SET_MAKE])
m4trace:configure.ac:5: -1- m4_pattern_allow([^SET_MAKE$])
m4trace:configure.ac:5: -1- AC_SUBST([am__leading_dot])
m4trace:configure.ac:5: -1- AC_SUBST_TRACE([am__leading_dot])
m4trace:configure.ac:5: -1- m4_pattern_allow([^am__leading_dot$])
m4trace:configure.ac:5: -1- AC_SUBST([AMTAR])
m4trace:configure.ac:5: -1- AC_SUBST_TRACE([AMTAR])
m4trace:configure.ac:5: -1- m4_pattern_allow([^AMTAR$])
m4trace:configure.ac:5: -1- AC_SUBST([am__tar])
m4trace:configure.ac:5: -1- AC_SUBST_TRACE([am__tar])
m4trace:configure.ac:5: -1- m4_pattern_allow([^am__tar$])
m4trace:configure.ac:5: -1- AC_SUBST([am__untar])
m4trace:configure.ac:5: -1- AC_SUBST_TRACE([am__untar])
m4trace:configure.ac:5: -1- m4_pattern_allow([^am__untar$])
m4trace:configure.ac:7: -1- AC_CONFIG_HEADERS([config.h])
m4trace:configure.ac:8: -1- AC_SUBST([CXX])
m4trace:configure.ac:8: -1- AC_SUBST_TRACE([CXX])
m4trace:configure.ac:8: -1- m4_pattern_allow([^CXX$])
m4trace:configure.ac:8: -1- AC_SUBST([CXXFLAGS])
m4trace:configure.ac:8: -1- AC_SUBST_TRACE([CXXFLAGS])
m4trace:configure.ac:8: -1- m4_pattern_allow([^CXXFLAGS$])
m4trace:configure.ac:8: -1- AC_SUBST([LDFLAGS])
m4trace:configure.ac:8: -1- AC_SUBST_TRACE([LDFLAGS])
m4trace:configure.ac:8: -1- m4_pattern_allow([^LDFLAGS$])
m4trace:configure.ac:8: -1- AC_SUBST([LIBS])
m4trace:configure.ac:8: -1- AC_SUBST_TRACE([LIBS])
m4trace:configure.ac:8: -1- m4_pattern_allow([^LIBS$])
m4trace:configure.ac:8: -1- AC_SUBST([CPPFLAGS])
m4trace:configure.ac:8: -1- AC_SUBST_TRACE([CPPFLAGS])
m4trace:configure.ac:8: -1- m4_pattern_allow([^CPPFLAGS$])
m4trace:configure.ac:8: -1- AC_SUBST([CXX])
m4trace:configure.ac:8: -1- AC_SUBST_TRACE([CXX])
m4trace:configure.ac:8: -1- m4_pattern_allow([^CXX$])
m4trace:configure.ac:8: -1- AC_SUBST([ac_ct_CXX])
m4trace:configure.ac:8: -1- AC_SUBST_TRACE([ac_ct_CXX])
m4trace:configure.ac:8: -1- m4_pattern_allow([^ac_ct_CXX$])
m4trace:configure.ac:8: -1- AC_SUBST([EXEEXT], [$ac_cv_exeext])
m4trace:configure.ac:8: -1- AC_SUBST_TRACE([EXEEXT])
m4trace:configure.ac:8: -1- m4_pattern_allow([^EXEEXT$])
m4trace:configure.ac:8: -1- AC_SUBST([OBJEXT], [$ac_cv_objext])
m4trace:configure.ac:8: -1- AC_SUBST_TRACE([OBJEXT])
m4trace:configure.ac:8: -1- m4_pattern_allow([^OBJEXT$])
m4trace:configure.ac:8: -1- AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])
m4trace:configure.ac:8: -1- AC_SUBST_TRACE([DEPDIR])
m4trace:configure.ac:8: -1- m4_pattern_allow([^DEPDIR$])
m4trace:configure.ac:8: -1- AC_SUBST([am__include])
m4trace:configure.ac:8: -1- AC_SUBST_TRACE([am__include])
m4trace:configure.ac:8: -1- m4_pattern_allow([^am__include$])
m4trace:configure.ac:8: -1- AC_SUBST([am__quote])
m4trace:configure.ac:8: -1- AC_SUBST_TRACE([am__quote])
m4trace:configure.ac:8: -1- m4_pattern_allow([^am__quote$])
m4trace:configure.ac:8: -1- AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
m4trace:configure.ac:8: -1- AC_SUBST([AMDEP_TRUE])
m4trace:configure.ac:8: -1- AC_SUBST_TRACE([AMDEP_TRUE])
m4trace:configure.ac:8: -1- m4_pattern_allow([^AMDEP_TRUE$])
m4trace:configure.ac:8: -1- AC_SUBST([AMDEP_FALSE])
m4trace:configure.ac:8: -1- AC_SUBST_TRACE([AMDEP_FALSE])
m4trace:configure.ac:8: -1- m4_pattern_allow([^AMDEP_FALSE$])
m4trace:configure.ac:8: -1- _AM_SUBST_NOTMAKE([AMDEP_TRUE])
m4trace:configure.ac:8: -1- _AM_SUBST_NOTMAKE([AMDEP_FALSE])
m4trace:configure.ac:8: -1- AC_SUBST([AMDEPBACKSLASH])
m4trace:configure.ac:8: -1- AC_SUBST_TRACE([AMDEPBACKSLASH])
m4trace:configure.ac:8: -1- m4_pattern_allow([^AMDEPBACKSLASH$])
m4trace:configure.ac:8: -1- _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])
m4trace:configure.ac:8: -1- AC_SUBST([CXXDEPMODE], [depmode=$am_cv_CXX_dependencies_compiler_type])
m4trace:configure.ac:8: -1- AC_SUBST_TRACE([CXXDEPMODE])
m4trace:configure.ac:8: -1- m4_pattern_allow([^CXXDEPMODE$])
m4trace:configure.ac:8: -1- AM_CONDITIONAL([am__fastdepCXX], [
test "x$enable_dependency_tracking" != xno \
&& test "$am_cv_CXX_dependencies_compiler_type" = gcc3])
m4trace:configure.ac:8: -1- AC_SUBST([am__fastdepCXX_TRUE])
m4trace:configure.ac:8: -1- AC_SUBST_TRACE([am__fastdepCXX_TRUE])
m4trace:configure.ac:8: -1- m4_pattern_allow([^am__fastdepCXX_TRUE$])
m4trace:configure.ac:8: -1- AC_SUBST([am__fastdepCXX_FALSE])
m4trace:configure.ac:8: -1- AC_SUBST_TRACE([am__fastdepCXX_FALSE])
m4trace:configure.ac:8: -1- m4_pattern_allow([^am__fastdepCXX_FALSE$])
m4trace:configure.ac:8: -1- _AM_SUBST_NOTMAKE([am__fastdepCXX_TRUE])
m4trace:configure.ac:8: -1- _AM_SUBST_NOTMAKE([am__fastdepCXX_FALSE])
m4trace:configure.ac:9: -1- AC_PROG_LIBTOOL
m4trace:configure.ac:9: -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:9: the top level])
m4trace:configure.ac:9: -1- LT_INIT
m4trace:configure.ac:9: -1- m4_pattern_forbid([^_?LT_[A-Z_]+$])
m4trace:configure.ac:9: -1- m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])
m4trace:configure.ac:9: -1- AC_REQUIRE_AUX_FILE([ltmain.sh])
m4trace:configure.ac:9: -1- AC_SUBST([LIBTOOL])
m4trace:configure.ac:9: -1- AC_SUBST_TRACE([LIBTOOL])
m4trace:configure.ac:9: -1- m4_pattern_allow([^LIBTOOL$])
m4trace:configure.ac:9: -1- AC_SUBST([CC])
m4trace:configure.ac:9: -1- AC_SUBST_TRACE([CC])
m4trace:configure.ac:9: -1- m4_pattern_allow([^CC$])
m4trace:configure.ac:9: -1- AC_SUBST([CFLAGS])
m4trace:configure.ac:9: -1- AC_SUBST_TRACE([CFLAGS])
m4trace:configure.ac:9: -1- m4_pattern_allow([^CFLAGS$])
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([CC])
m4trace:configure.ac:9: -1- AC_SUBST_TRACE([CC])
m4trace:configure.ac:9: -1- m4_pattern_allow([^CC$])
m4trace:configure.ac:9: -1- AC_SUBST([CC])
m4trace:configure.ac:9: -1- AC_SUBST_TRACE([CC])
m4trace:configure.ac:9: -1- m4_pattern_allow([^CC$])
m4trace:configure.ac:9: -1- AC_SUBST([CC])
m4trace:configure.ac:9: -1- AC_SUBST_TRACE([CC])
m4trace:configure.ac:9: -1- m4_pattern_allow([^CC$])
m4trace:configure.ac:9: -1- AC_SUBST([CC])
m4trace:configure.ac:9: -1- AC_SUBST_TRACE([CC])
m4trace:configure.ac:9: -1- m4_pattern_allow([^CC$])
m4trace:configure.ac:9: -1- AC_SUBST([ac_ct_CC])
m4trace:configure.ac:9: -1- AC_SUBST_TRACE([ac_ct_CC])
m4trace:configure.ac:9: -1- m4_pattern_allow([^ac_ct_CC$])
m4trace:configure.ac:9: -1- AC_SUBST([CCDEPMODE], [depmode=$am_cv_CC_dependencies_compiler_type])
m4trace:configure.ac:9: -1- AC_SUBST_TRACE([CCDEPMODE])
m4trace:configure.ac:9: -1- m4_pattern_allow([^CCDEPMODE$])
m4trace:configure.ac:9: -1- AM_CONDITIONAL([am__fastdepCC], [
test "x$enable_dependency_tracking" != xno \
&& test "$am_cv_CC_dependencies_compiler_type" = gcc3])
m4trace:configure.ac:9: -1- AC_SUBST([am__fastdepCC_TRUE])
m4trace:configure.ac:9: -1- AC_SUBST_TRACE([am__fastdepCC_TRUE])
m4trace:configure.ac:9: -1- m4_pattern_allow([^am__fastdepCC_TRUE$])
m4trace:configure.ac:9: -1- AC_SUBST([am__fastdepCC_FALSE])
m4trace:configure.ac:9: -1- AC_SUBST_TRACE([am__fastdepCC_FALSE])
m4trace:configure.ac:9: -1- m4_pattern_allow([^am__fastdepCC_FALSE$])
m4trace:configure.ac:9: -1- _AM_SUBST_NOTMAKE([am__fastdepCC_TRUE])
m4trace:configure.ac:9: -1- _AM_SUBST_NOTMAKE([am__fastdepCC_FALSE])
m4trace:configure.ac:9: -1- AC_SUBST([SED])
m4trace:configure.ac:9: -1- AC_SUBST_TRACE([SED])
m4trace:configure.ac:9: -1- m4_pattern_allow([^SED$])
m4trace:configure.ac:9: -1- AC_SUBST([GREP])
m4trace:configure.ac:9: -1- AC_SUBST_TRACE([GREP])
m4trace:configure.ac:9: -1- m4_pattern_allow([^GREP$])
m4trace:configure.ac:9: -1- AC_SUBST([EGREP])
m4trace:configure.ac:9: -1- AC_SUBST_TRACE([EGREP])
m4trace:configure.ac:9: -1- m4_pattern_allow([^EGREP$])
m4trace:configure.ac:9: -1- AC_SUBST([FGREP])
m4trace:configure.ac:9: -1- AC_SUBST_TRACE([FGREP])
m4trace:configure.ac:9: -1- m4_pattern_allow([^FGREP$])
m4trace:configure.ac:9: -1- AC_SUBST([GREP])
m4trace:configure.ac:9: -1- AC_SUBST_TRACE([GREP])
m4trace:configure.ac:9: -1- m4_pattern_allow([^GREP$])
m4trace:configure.ac:9: -1- AC_SUBST([LD])
m4trace:configure.ac:9: -1- AC_SUBST_TRACE([LD])
m4trace:configure.ac:9: -1- m4_pattern_allow([^LD$])
m4trace:configure.ac:9: -1- AC_SUBST([DUMPBIN])
m4trace:configure.ac:9: -1- AC_SUBST_TRACE([DUMPBIN])
m4trace:configure.ac:9: -1- m4_pattern_allow([^DUMPBIN$])
m4trace:configure.ac:9: -1- AC_SUBST([ac_ct_DUMPBIN])
m4trace:configure.ac:9: -1- AC_SUBST_TRACE([ac_ct_DUMPBIN])
m4trace:configure.ac:9: -1- m4_pattern_allow([^ac_ct_DUMPBIN$])
m4trace:configure.ac:9: -1- AC_SUBST([DUMPBIN])
m4trace:configure.ac:9: -1- AC_SUBST_TRACE([DUMPBIN])
m4trace:configure.ac:9: -1- m4_pattern_allow([^DUMPBIN$])
m4trace:configure.ac:9: -1- AC_SUBST([NM])
m4trace:configure.ac:9: -1- AC_SUBST_TRACE([NM])
m4trace:configure.ac:9: -1- m4_pattern_allow([^NM$])
m4trace:configure.ac:9: -1- AC_SUBST([LN_S], [$as_ln_s])
m4trace:configure.ac:9: -1- AC_SUBST_TRACE([LN_S])
m4trace:configure.ac:9: -1- m4_pattern_allow([^LN_S$])
m4trace:configure.ac:9: -1- AC_SUBST([OBJDUMP])
m4trace:configure.ac:9: -1- AC_SUBST_TRACE([OBJDUMP])
m4trace:configure.ac:9: -1- m4_pattern_allow([^OBJDUMP$])
m4trace:configure.ac:9: -1- AC_SUBST([OBJDUMP])
m4trace:configure.ac:9: -1- AC_SUBST_TRACE([OBJDUMP])
m4trace:configure.ac:9: -1- m4_pattern_allow([^OBJDUMP$])
m4trace:configure.ac:9: -1- AC_SUBST([AR])
m4trace:configure.ac:9: -1- AC_SUBST_TRACE([AR])
m4trace:configure.ac:9: -1- m4_pattern_allow([^AR$])
m4trace:configure.ac:9: -1- AC_SUBST([STRIP])
m4trace:configure.ac:9: -1- AC_SUBST_TRACE([STRIP])
m4trace:configure.ac:9: -1- m4_pattern_allow([^STRIP$])
m4trace:configure.ac:9: -1- AC_SUBST([RANLIB])
m4trace:configure.ac:9: -1- AC_SUBST_TRACE([RANLIB])
m4trace:configure.ac:9: -1- m4_pattern_allow([^RANLIB$])
m4trace:configure.ac:9: -1- m4_pattern_allow([LT_OBJDIR])
m4trace:configure.ac:9: -1- AC_DEFINE_TRACE_LITERAL([LT_OBJDIR])
m4trace:configure.ac:9: -1- m4_pattern_allow([^LT_OBJDIR$])
m4trace:configure.ac:9: -1- AH_OUTPUT([LT_OBJDIR], [/* Define to the sub-directory in which libtool stores uninstalled libraries.
*/
@%:@undef LT_OBJDIR])
m4trace:configure.ac:9: -1- AC_SUBST([lt_ECHO])
m4trace:configure.ac:9: -1- AC_SUBST_TRACE([lt_ECHO])
m4trace:configure.ac:9: -1- m4_pattern_allow([^lt_ECHO$])
m4trace:configure.ac:9: -1- LT_SUPPORTED_TAG([CC])
m4trace:configure.ac:9: -1- AC_SUBST([DSYMUTIL])
m4trace:configure.ac:9: -1- AC_SUBST_TRACE([DSYMUTIL])
m4trace:configure.ac:9: -1- m4_pattern_allow([^DSYMUTIL$])
m4trace:configure.ac:9: -1- AC_SUBST([NMEDIT])
m4trace:configure.ac:9: -1- AC_SUBST_TRACE([NMEDIT])
m4trace:configure.ac:9: -1- m4_pattern_allow([^NMEDIT$])
m4trace:configure.ac:9: -1- AC_SUBST([LIPO])
m4trace:configure.ac:9: -1- AC_SUBST_TRACE([LIPO])
m4trace:configure.ac:9: -1- m4_pattern_allow([^LIPO$])
m4trace:configure.ac:9: -1- AC_SUBST([OTOOL])
m4trace:configure.ac:9: -1- AC_SUBST_TRACE([OTOOL])
m4trace:configure.ac:9: -1- m4_pattern_allow([^OTOOL$])
m4trace:configure.ac:9: -1- AC_SUBST([OTOOL64])
m4trace:configure.ac:9: -1- AC_SUBST_TRACE([OTOOL64])
m4trace:configure.ac:9: -1- m4_pattern_allow([^OTOOL64$])
m4trace:configure.ac:9: -1- AH_OUTPUT([HAVE_DLFCN_H], [/* Define to 1 if you have the <dlfcn.h> header file. */
@%:@undef HAVE_DLFCN_H])
m4trace:configure.ac:9: -1- AC_SUBST([CPP])
m4trace:configure.ac:9: -1- AC_SUBST_TRACE([CPP])
m4trace:configure.ac:9: -1- m4_pattern_allow([^CPP$])
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([CPP])
m4trace:configure.ac:9: -1- AC_SUBST_TRACE([CPP])
m4trace:configure.ac:9: -1- m4_pattern_allow([^CPP$])
m4trace:configure.ac:9: -1- AC_DEFINE_TRACE_LITERAL([STDC_HEADERS])
m4trace:configure.ac:9: -1- m4_pattern_allow([^STDC_HEADERS$])
m4trace:configure.ac:9: -1- AH_OUTPUT([STDC_HEADERS], [/* Define to 1 if you have the ANSI C header files. */
@%:@undef STDC_HEADERS])
m4trace:configure.ac:9: -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:9: -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:9: -1- AH_OUTPUT([HAVE_STDLIB_H], [/* Define to 1 if you have the <stdlib.h> header file. */
@%:@undef HAVE_STDLIB_H])
m4trace:configure.ac:9: -1- AH_OUTPUT([HAVE_STRING_H], [/* Define to 1 if you have the <string.h> header file. */
@%:@undef HAVE_STRING_H])
m4trace:configure.ac:9: -1- AH_OUTPUT([HAVE_MEMORY_H], [/* Define to 1 if you have the <memory.h> header file. */
@%:@undef HAVE_MEMORY_H])
m4trace:configure.ac:9: -1- AH_OUTPUT([HAVE_STRINGS_H], [/* Define to 1 if you have the <strings.h> header file. */
@%:@undef HAVE_STRINGS_H])
m4trace:configure.ac:9: -1- AH_OUTPUT([HAVE_INTTYPES_H], [/* Define to 1 if you have the <inttypes.h> header file. */
@%:@undef HAVE_INTTYPES_H])
m4trace:configure.ac:9: -1- AH_OUTPUT([HAVE_STDINT_H], [/* Define to 1 if you have the <stdint.h> header file. */
@%:@undef HAVE_STDINT_H])
m4trace:configure.ac:9: -1- AH_OUTPUT([HAVE_UNISTD_H], [/* Define to 1 if you have the <unistd.h> header file. */
@%:@undef HAVE_UNISTD_H])
m4trace:configure.ac:9: -1- AC_DEFINE_TRACE_LITERAL([HAVE_DLFCN_H])
m4trace:configure.ac:9: -1- m4_pattern_allow([^HAVE_DLFCN_H$])
m4trace:configure.ac:9: -1- LT_SUPPORTED_TAG([CXX])
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([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:9: -1- AC_SUBST([CXXCPP])
m4trace:configure.ac:9: -1- AC_SUBST_TRACE([CXXCPP])
m4trace:configure.ac:9: -1- m4_pattern_allow([^CXXCPP$])
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([CXXCPP])
m4trace:configure.ac:9: -1- AC_SUBST_TRACE([CXXCPP])
m4trace:configure.ac:9: -1- m4_pattern_allow([^CXXCPP$])
m4trace:configure.ac:9: -1- AC_SUBST([LD])
m4trace:configure.ac:9: -1- AC_SUBST_TRACE([LD])
m4trace:configure.ac:9: -1- m4_pattern_allow([^LD$])
m4trace:configure.ac:10: -1- AC_CONFIG_FILES([Makefile])
m4trace:configure.ac:12: -1- AM_MAINTAINER_MODE
m4trace:configure.ac:12: -1- AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
m4trace:configure.ac:12: -1- AC_SUBST([MAINTAINER_MODE_TRUE])
m4trace:configure.ac:12: -1- AC_SUBST_TRACE([MAINTAINER_MODE_TRUE])
m4trace:configure.ac:12: -1- m4_pattern_allow([^MAINTAINER_MODE_TRUE$])
m4trace:configure.ac:12: -1- AC_SUBST([MAINTAINER_MODE_FALSE])
m4trace:configure.ac:12: -1- AC_SUBST_TRACE([MAINTAINER_MODE_FALSE])
m4trace:configure.ac:12: -1- m4_pattern_allow([^MAINTAINER_MODE_FALSE$])
m4trace:configure.ac:12: -1- _AM_SUBST_NOTMAKE([MAINTAINER_MODE_TRUE])
m4trace:configure.ac:12: -1- _AM_SUBST_NOTMAKE([MAINTAINER_MODE_FALSE])
m4trace:configure.ac:12: -1- AC_SUBST([MAINT])
m4trace:configure.ac:12: -1- AC_SUBST_TRACE([MAINT])
m4trace:configure.ac:12: -1- m4_pattern_allow([^MAINT$])
m4trace:configure.ac:17: -1- AC_DEFINE_TRACE_LITERAL([OS_LINUX])
m4trace:configure.ac:17: -1- m4_pattern_allow([^OS_LINUX$])
m4trace:configure.ac:17: -1- AH_OUTPUT([OS_LINUX], [/* Linux backend */
@%:@undef OS_LINUX])
m4trace:configure.ac:22: -1- AC_DEFINE_TRACE_LITERAL([OS_DARWIN])
m4trace:configure.ac:22: -1- m4_pattern_allow([^OS_DARWIN$])
m4trace:configure.ac:22: -1- AH_OUTPUT([OS_DARWIN], [/* Darwin backend */
@%:@undef OS_DARWIN])
m4trace:configure.ac:27: -1- AC_DEFINE_TRACE_LITERAL([OS_WINDOWS])
m4trace:configure.ac:27: -1- m4_pattern_allow([^OS_WINDOWS$])
m4trace:configure.ac:27: -1- AH_OUTPUT([OS_WINDOWS], [/* Windows backend */
@%:@undef OS_WINDOWS])
m4trace:configure.ac:32: -1- AC_DEFINE_TRACE_LITERAL([OS_WINDOWS])
m4trace:configure.ac:32: -1- m4_pattern_allow([^OS_WINDOWS$])
m4trace:configure.ac:32: -1- AH_OUTPUT([OS_WINDOWS], [/* Windows backend */
@%:@undef OS_WINDOWS])
m4trace:configure.ac:40: -1- AM_CONDITIONAL([LINUXTARGET], [test x$linuxtarget = xtrue])
m4trace:configure.ac:40: -1- AC_SUBST([LINUXTARGET_TRUE])
m4trace:configure.ac:40: -1- AC_SUBST_TRACE([LINUXTARGET_TRUE])
m4trace:configure.ac:40: -1- m4_pattern_allow([^LINUXTARGET_TRUE$])
m4trace:configure.ac:40: -1- AC_SUBST([LINUXTARGET_FALSE])
m4trace:configure.ac:40: -1- AC_SUBST_TRACE([LINUXTARGET_FALSE])
m4trace:configure.ac:40: -1- m4_pattern_allow([^LINUXTARGET_FALSE$])
m4trace:configure.ac:40: -1- _AM_SUBST_NOTMAKE([LINUXTARGET_TRUE])
m4trace:configure.ac:40: -1- _AM_SUBST_NOTMAKE([LINUXTARGET_FALSE])
m4trace:configure.ac:42: -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:42: -1- AC_DEFINE_TRACE_LITERAL([WORDS_BIGENDIAN])
m4trace:configure.ac:42: -1- m4_pattern_allow([^WORDS_BIGENDIAN$])
m4trace:configure.ac:42: -1- AC_DEFINE_TRACE_LITERAL([AC_APPLE_UNIVERSAL_BUILD])
m4trace:configure.ac:42: -1- m4_pattern_allow([^AC_APPLE_UNIVERSAL_BUILD$])
m4trace:configure.ac:42: -1- AH_OUTPUT([AC_APPLE_UNIVERSAL_BUILD], [/* Define if building universal (internal helper macro) */
@%:@undef AC_APPLE_UNIVERSAL_BUILD])
m4trace:configure.ac:44: -1- AC_SUBST([LIB@&t@OBJS], [$ac_libobjs])
m4trace:configure.ac:44: -1- AC_SUBST_TRACE([LIB@&t@OBJS])
m4trace:configure.ac:44: -1- m4_pattern_allow([^LIB@&t@OBJS$])
m4trace:configure.ac:44: -1- AC_SUBST([LTLIBOBJS], [$ac_ltlibobjs])
m4trace:configure.ac:44: -1- AC_SUBST_TRACE([LTLIBOBJS])
m4trace:configure.ac:44: -1- m4_pattern_allow([^LTLIBOBJS$])
m4trace:configure.ac:44: -1- AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])
m4trace:configure.ac:44: -1- AC_SUBST([am__EXEEXT_TRUE])
m4trace:configure.ac:44: -1- AC_SUBST_TRACE([am__EXEEXT_TRUE])
m4trace:configure.ac:44: -1- m4_pattern_allow([^am__EXEEXT_TRUE$])
m4trace:configure.ac:44: -1- AC_SUBST([am__EXEEXT_FALSE])
m4trace:configure.ac:44: -1- AC_SUBST_TRACE([am__EXEEXT_FALSE])
m4trace:configure.ac:44: -1- m4_pattern_allow([^am__EXEEXT_FALSE$])
m4trace:configure.ac:44: -1- _AM_SUBST_NOTMAKE([am__EXEEXT_TRUE])
m4trace:configure.ac:44: -1- _AM_SUBST_NOTMAKE([am__EXEEXT_FALSE])
m4trace:configure.ac:44: -1- AC_SUBST_TRACE([top_builddir])
m4trace:configure.ac:44: -1- AC_SUBST_TRACE([top_build_prefix])
m4trace:configure.ac:44: -1- AC_SUBST_TRACE([srcdir])
m4trace:configure.ac:44: -1- AC_SUBST_TRACE([abs_srcdir])
m4trace:configure.ac:44: -1- AC_SUBST_TRACE([top_srcdir])
m4trace:configure.ac:44: -1- AC_SUBST_TRACE([abs_top_srcdir])
m4trace:configure.ac:44: -1- AC_SUBST_TRACE([builddir])
m4trace:configure.ac:44: -1- AC_SUBST_TRACE([abs_builddir])
m4trace:configure.ac:44: -1- AC_SUBST_TRACE([abs_top_builddir])
m4trace:configure.ac:44: -1- AC_SUBST_TRACE([INSTALL])
m4trace:configure.ac:44: -1- AC_SUBST_TRACE([MKDIR_P])
m4trace:configure.ac:44: -1- AC_REQUIRE_AUX_FILE([ltmain.sh])

1502
heimdall/config.guess vendored

File diff suppressed because it is too large Load Diff

View File

@ -1,80 +0,0 @@
/* 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

View File

@ -1,80 +0,0 @@
/* 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

File diff suppressed because it is too large Load Diff

17402
heimdall/configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -1,44 +0,0 @@
AC_INIT([Heimdall], [0.1], [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_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])
AC_C_BIGENDIAN
AC_OUTPUT

View File

@ -1,630 +0,0 @@
#! /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:

View File

@ -1 +0,0 @@
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.

View File

@ -1,115 +0,0 @@
Heimdall (c) 2010 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.
These instructions are for Linux operating systems.
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 extracted Heimdall to.
3. Then 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 and install Heimdall:
cd heimdall
./configure
make
sudo make install
cd ..
5. Done
Installing Heimdall Frontend from Source (Optional):
1. First make sure you have installed Qt 4.6 or above,
available from http://qt.nokia.com/.
2. Open a terminal and navigate to the directory you extracted Heimdall to.
3. Enter the following commands to compile and install Heimdall Frontend:
cd heimdall-frontend
qmake heimdall-frontend.pro
make
sudo make install
4. The file output will be placed in the UNIX sub-directory whenever you
extracted Heimdall's source. Move this file to your preferred location.
5. Done
Flashing Firmware with Heimdall Frontend:
1. Fully charge your device (use the wall charger as it's faster).
2. Download a decrypted Samsung Galaxy S ROM and extract it to a directory.
3. If the ROM is provided as one of more archives (nested or otherwise),
extract them all to the same location.
NOTE: If you want to use the CSC then extract it last.
3. Open Heimdall Frontend.
4. Put your Galaxy S device into download mode.
5. For each file you wish to flash use "Browse" to select the file.
6. Press "Start".
7. Heimdall Frontend will display the progress and inform you when the
flash is complete.
Flashing Firmware from Command Line / Terminal:
1. Fully charge your device (use the wall charger as it's faster).
2. Download a decrypted Samsung Galaxy S ROM and extract it to a directory.
3. If the ROM is provided as one of more archives (nested or otherwise),
extract them all to the same location.
NOTE: If you want to use the CSC then extract it last.
4. Open a terminal and navigate to the directory where you extracted the
ROM files.
5. Type the following to list all the functionality Heimdall supports:
heimdall help
8. 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:
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. Done

View File

@ -1,132 +0,0 @@
<?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>$(IncludePath)</IncludePath>
<LibraryPath>$(LibraryPath)</LibraryPath>
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
<IncludePath>$(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\libusb</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>libusb-1.0.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>$(SolutionDir)$(Platform)\$(Configuration)\lib\</AdditionalLibraryDirectories>
</Link>
</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\libusb</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<AdditionalDependencies>libusb-1.0.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>$(SolutionDir)$(Platform)\$(Configuration)\lib\</AdditionalLibraryDirectories>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClInclude Include="source\BeginDumpPacket.h" />
<ClInclude Include="source\BridgeManager.h" />
<ClInclude Include="source\ControlPacket.h" />
<ClInclude Include="source\DeviceInfoPacket.h" />
<ClInclude Include="source\DeviceInfoResponse.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\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\InterfaceManager.h" />
<ClInclude Include="source\OutboundPacket.h" />
<ClInclude Include="source\Packet.h" />
<ClInclude Include="source\PitFilePacket.h" />
<ClInclude Include="source\PitFileResponse.h" />
<ClInclude Include="source\RebootDevicePacket.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\InterfaceManager.cpp" />
<ClCompile Include="source\main.cpp" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -1,100 +0,0 @@
<?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\DeviceInfoPacket.h">
<Filter>Source</Filter>
</ClInclude>
<ClInclude Include="source\DeviceInfoResponse.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\RebootDevicePacket.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\InterfaceManager.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\InterfaceManager.cpp">
<Filter>Source</Filter>
</ClCompile>
</ItemGroup>
</Project>

View File

@ -1,520 +0,0 @@
#!/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:

File diff suppressed because it is too large Load Diff

7377
heimdall/m4/libtool.m4 vendored

File diff suppressed because it is too large Load Diff

View File

@ -1,368 +0,0 @@
# 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
View File

@ -1,123 +0,0 @@
# 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
])

View File

@ -1,23 +0,0 @@
# 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)
])

View File

@ -1,92 +0,0 @@
# 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])])

View File

@ -1,376 +0,0 @@
#! /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:

View File

@ -1,5 +0,0 @@
#!/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

View File

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

View File

@ -0,0 +1,215 @@
/* 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);
}

168
heimdall/source/Arguments.h Normal file
View File

@ -0,0 +1,168 @@
/* 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,72 +1,72 @@
/* Copyright (c) 2010 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 BEGINDUMPPACKET_H
#define BEGINDUMPPACKET_H
// Heimdall
#include "FileTransferPacket.h"
namespace Heimdall
{
class BeginDumpPacket : public FileTransferPacket
{
public:
enum
{
kChipTypeRam = 0,
kChipTypeNand = 1
};
private:
unsigned int chipType;
unsigned int chipId;
public:
BeginDumpPacket(unsigned int chipType, unsigned int chipId) : FileTransferPacket(FileTransferPacket::kRequestDump)
{
this->chipType = chipType;
this->chipId = chipId;
}
unsigned int GetChipType(void) const
{
return (chipType);
}
unsigned int GetChipId(void) const
{
return (chipId);
}
virtual void Pack(void)
{
FileTransferPacket::Pack();
PackInteger(FileTransferPacket::kDataSize, chipType);
PackInteger(FileTransferPacket::kDataSize + 4, chipId);
}
};
}
#endif
/* 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 BEGINDUMPPACKET_H
#define BEGINDUMPPACKET_H
// Heimdall
#include "FileTransferPacket.h"
namespace Heimdall
{
class BeginDumpPacket : public FileTransferPacket
{
public:
enum
{
kChipTypeRam = 0,
kChipTypeNand = 1
};
private:
unsigned int chipType;
unsigned int chipId;
public:
BeginDumpPacket(unsigned int chipType, unsigned int chipId) : FileTransferPacket(FileTransferPacket::kRequestDump)
{
this->chipType = chipType;
this->chipId = chipId;
}
unsigned int GetChipType(void) const
{
return (chipType);
}
unsigned int GetChipId(void) const
{
return (chipId);
}
virtual void Pack(void)
{
FileTransferPacket::Pack();
PackInteger(FileTransferPacket::kDataSize, chipType);
PackInteger(FileTransferPacket::kDataSize + 4, chipId);
}
};
}
#endif

View File

@ -0,0 +1,54 @@
/* 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,124 +1,184 @@
/* Copyright (c) 2010 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 BRIDGEMANAGER_H
#define BRIDGEMANAGER_H
// Heimdall
#include "Heimdall.h"
struct libusb_context;
struct libusb_device;
struct libusb_device_handle;
namespace Heimdall
{
class InboundPacket;
class OutboundPacket;
class DeviceIdentifier
{
public:
const int vendorId;
const int productId;
DeviceIdentifier(int vid, int pid) :
vendorId(vid),
productId(pid)
{
}
};
class BridgeManager
{
public:
enum
{
kSupportedDeviceCount = 1,
kCommunicationDelayDefault = 0,
kDumpBufferSize = 4096
};
enum
{
kVidSamsung = 0x04E8
};
enum
{
kPidGalaxySDownloadMode = 0x6601/*,
kPidGalaxySInternational = 0x681C,
kPidGalaxySNewInternational = 0x681D,
kPidVibrantCanadaBell = 0x6877*/
};
private:
static const DeviceIdentifier supportedDevices[kSupportedDeviceCount];
bool verbose;
libusb_context *libusbContext;
libusb_device_handle *deviceHandle;
libusb_device *heimdallDevice;
int interfaceIndex;
int inEndpoint;
int outEndpoint;
int communicationDelay;
#ifdef OS_LINUX
bool detachedDriver;
#endif
public:
BridgeManager(bool verbose, int communicationDelay);
~BridgeManager();
bool Initialise(void);
bool BeginSession(void) const;
bool EndSession(void) const;
bool SendPacket(OutboundPacket *packet, int timeout = 3000) const;
bool ReceivePacket(InboundPacket *packet, int timeout = 3000) const;
/* 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.*/
bool SendPitFile(FILE *file) const;
int ReceivePitFile(unsigned char **pitBuffer) const;
bool SendFile(FILE *file, int destination, int fileIdentifier = -1) const;
bool ReceiveDump(int chipType, int chipId, FILE *file) const;
bool RebootDevice(void) const;
bool IsVerbose(void) const
{
return (verbose);
}
};
}
#endif
#ifndef BRIDGEMANAGER_H
#define BRIDGEMANAGER_H
// libpit
#include "libpit.h"
// Heimdall
#include "Heimdall.h"
struct libusb_context;
struct libusb_device;
struct libusb_device_handle;
namespace Heimdall
{
class InboundPacket;
class OutboundPacket;
class DeviceIdentifier
{
public:
const int vendorId;
const int productId;
DeviceIdentifier(int vid, int pid) :
vendorId(vid),
productId(pid)
{
}
};
class BridgeManager
{
public:
enum
{
kSupportedDeviceCount = 3
};
enum
{
kInitialiseSucceeded = 0,
kInitialiseFailed,
kInitialiseDeviceNotDetected
};
enum
{
kVidSamsung = 0x04E8
};
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
};
private:
static const DeviceIdentifier supportedDevices[kSupportedDeviceCount];
bool verbose;
libusb_context *libusbContext;
libusb_device_handle *deviceHandle;
libusb_device *heimdallDevice;
int interfaceIndex;
int altSettingIndex;
int inEndpoint;
int outEndpoint;
bool interfaceClaimed;
#ifdef OS_LINUX
bool detachedDriver;
#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;
public:
BridgeManager(bool verbose);
~BridgeManager();
bool DetectDevice(void);
int Initialise(bool resume);
bool BeginSession(void);
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 RequestDeviceType(unsigned int request, int *result) const;
bool SendPitData(const libpit::PitData *pitData) 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 IsVerbose(void) const
{
return (verbose);
}
};
}
#endif

View File

@ -0,0 +1,130 @@
/* 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

@ -0,0 +1,34 @@
/* 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,71 +1,71 @@
/* Copyright (c) 2010 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 CONTROLPACKET_H
#define CONTROLPACKET_H
// Heimdall
#include "OutboundPacket.h"
namespace Heimdall
{
class ControlPacket : public OutboundPacket
{
public:
enum
{
kControlTypeDeviceInfo = 0x64,
kControlTypePitFile = 0x65,
kControlTypeFileTransfer = 0x66,
kControlTypeRebootDevice = 0x67
};
protected:
enum
{
kDataSize = 4
};
private:
unsigned int controlType;
public:
ControlPacket(unsigned int controlType) : OutboundPacket(1024)
{
this->controlType = controlType;
}
unsigned int GetControlType(void) const
{
return (controlType);
}
virtual void Pack(void)
{
PackInteger(0, controlType);
}
};
}
#endif
/* 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 CONTROLPACKET_H
#define CONTROLPACKET_H
// Heimdall
#include "OutboundPacket.h"
namespace Heimdall
{
class ControlPacket : public OutboundPacket
{
public:
enum
{
kControlTypeSession = 0x64,
kControlTypePitFile = 0x65,
kControlTypeFileTransfer = 0x66,
kControlTypeEndSession = 0x67
};
protected:
enum
{
kDataSize = 4
};
private:
unsigned int controlType;
public:
ControlPacket(unsigned int controlType) : OutboundPacket(1024)
{
this->controlType = controlType;
}
unsigned int GetControlType(void) const
{
return (controlType);
}
virtual void Pack(void)
{
PackInteger(0, controlType);
}
};
}
#endif

View File

@ -0,0 +1,104 @@
/* 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

@ -0,0 +1,34 @@
/* 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 DETECTACTION_H
#define DETECTACTION_H
namespace Heimdall
{
namespace DetectAction
{
extern const char *usage;
int Execute(int argc, char **argv);
}
}
#endif

View File

@ -0,0 +1,39 @@
/* 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

@ -0,0 +1,171 @@
/* 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

@ -0,0 +1,34 @@
/* 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,56 +1,56 @@
/* Copyright (c) 2010 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 DUMPPARTFILETRANSFERPACKET_H
#define DUMPPARTFILETRANSFERPACKET_H
// Heimdall
#include "FileTransferPacket.h"
namespace Heimdall
{
class DumpPartFileTransferPacket : public FileTransferPacket
{
private:
unsigned int partIndex;
public:
DumpPartFileTransferPacket(unsigned int partIndex) : FileTransferPacket(FileTransferPacket::kRequestPart)
{
this->partIndex = partIndex;
}
unsigned int GetPartIndex(void) const
{
return (partIndex);
}
virtual void Pack(void)
{
FileTransferPacket::Pack();
PackInteger(FileTransferPacket::kDataSize, partIndex);
}
};
}
#endif
/* 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 DUMPPARTFILETRANSFERPACKET_H
#define DUMPPARTFILETRANSFERPACKET_H
// Heimdall
#include "FileTransferPacket.h"
namespace Heimdall
{
class DumpPartFileTransferPacket : public FileTransferPacket
{
private:
unsigned int partIndex;
public:
DumpPartFileTransferPacket(unsigned int partIndex) : FileTransferPacket(FileTransferPacket::kRequestPart)
{
this->partIndex = partIndex;
}
unsigned int GetPartIndex(void) const
{
return (partIndex);
}
virtual void Pack(void)
{
FileTransferPacket::Pack();
PackInteger(FileTransferPacket::kDataSize, partIndex);
}
};
}
#endif

View File

@ -1,56 +1,56 @@
/* Copyright (c) 2010 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 DUMPPARTPITFILEPACKET_H
#define DUMPPARTPITFILEPACKET_H
// Heimdall
#include "PitFilePacket.h"
namespace Heimdall
{
class DumpPartPitFilePacket : public PitFilePacket
{
private:
unsigned int partIndex;
public:
DumpPartPitFilePacket(unsigned int partIndex) : PitFilePacket(PitFilePacket::kRequestPart)
{
this->partIndex = partIndex;
}
unsigned int GetPartIndex(void) const
{
return (partIndex);
}
void Pack(void)
{
PitFilePacket::Pack();
PackInteger(PitFilePacket::kDataSize, partIndex);
}
};
}
#endif
/* 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 DUMPPARTPITFILEPACKET_H
#define DUMPPARTPITFILEPACKET_H
// Heimdall
#include "PitFilePacket.h"
namespace Heimdall
{
class DumpPartPitFilePacket : public PitFilePacket
{
private:
unsigned int partIndex;
public:
DumpPartPitFilePacket(unsigned int partIndex) : PitFilePacket(PitFilePacket::kRequestPart)
{
this->partIndex = partIndex;
}
unsigned int GetPartIndex(void) const
{
return (partIndex);
}
void Pack(void)
{
PitFilePacket::Pack();
PackInteger(PitFilePacket::kDataSize, partIndex);
}
};
}
#endif

View File

@ -1,58 +1,58 @@
/* Copyright (c) 2010 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 DUMPRESPONSE_H
#define DUMPRESPONSE_H
// Heimdall
#include "ResponsePacket.h"
namespace Heimdall
{
class DumpResponse : public ResponsePacket
{
private:
unsigned int dumpSize;
public:
DumpResponse() : ResponsePacket(kResponseTypeFileTransfer)
{
}
unsigned int GetDumpSize(void) const
{
return (dumpSize);
}
bool Unpack(void)
{
if (!ResponsePacket::Unpack())
return (false);
dumpSize = UnpackInteger(ResponsePacket::kDataSize);
return (true);
}
};
}
#endif
/* 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 DUMPRESPONSE_H
#define DUMPRESPONSE_H
// Heimdall
#include "ResponsePacket.h"
namespace Heimdall
{
class DumpResponse : public ResponsePacket
{
private:
unsigned int dumpSize;
public:
DumpResponse() : ResponsePacket(kResponseTypeFileTransfer)
{
}
unsigned int GetDumpSize(void) const
{
return (dumpSize);
}
bool Unpack(void)
{
if (!ResponsePacket::Unpack())
return (false);
dumpSize = UnpackInteger(ResponsePacket::kDataSize);
return (true);
}
};
}
#endif

View File

@ -0,0 +1,39 @@
/* 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 ENABLETFLASHPACKET_H
#define ENABLETFLASHPACKET_H
// Heimdall
#include "SessionSetupPacket.h"
namespace Heimdall
{
class EnableTFlashPacket : public SessionSetupPacket
{
public:
EnableTFlashPacket() : SessionSetupPacket(SessionSetupPacket::kEnableTFlash)
{
}
};
}
#endif

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