From: Donghoon Shin Date: Tue, 27 Sep 2016 02:24:39 +0000 (+0900) Subject: Fix build errors X-Git-Tag: accepted/tizen/devbase/tools/20190927.044948^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fheads%2Frelease-20160930;p=tools%2Fheimdall.git Fix build errors Change-Id: I149c9e12b373fe5b8c888ef3c73e2d38985f49ee --- diff --git a/debian/patches/Add-options-for-simultaneous-flashing-on-multiple-devices b/debian/patches/Add-options-for-simultaneous-flashing-on-multiple-devices deleted file mode 100644 index 9ed9188..0000000 --- a/debian/patches/Add-options-for-simultaneous-flashing-on-multiple-devices +++ /dev/null @@ -1,144 +0,0 @@ -Description: - TODO: Put a short summary on the line above and replace this paragraph - with a longer explanation of this change. Complete the meta-information - with other relevant fields (see below for details). To make it easier, the - information below has been extracted from the changelog. Adjust it or drop - it. - . - heimdall-flash (1.4.1-2) unstable; urgency=medium - . - * Add options for simultaneous flashing on multiple devices -Author: Donghoon Shin - ---- -The information above should follow the Patch Tagging Guidelines, please -checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here -are templates for supplementary fields that you might want to add: - -Origin: , -Bug: -Bug-Debian: http://bugs.debian.org/ -Bug-Ubuntu: https://launchpad.net/bugs/ -Forwarded: -Reviewed-By: -Last-Update: - ---- heimdall-flash-1.4.1.orig/heimdall/source/BridgeManager.cpp -+++ heimdall-flash-1.4.1/heimdall/source/BridgeManager.cpp -@@ -88,6 +88,16 @@ enum - kPitSizeMultiplicand = 4096 - }; - -+void BridgeManager::SetUsbBus(int usbbus) -+{ -+ this->usbbus = usbbus; -+} -+ -+void BridgeManager::SetUsbDevAddr(int usbdevaddr) -+{ -+ this->usbdevaddr = usbdevaddr; -+} -+ - int BridgeManager::FindDeviceInterface(void) - { - Interface::Print("Detecting device...\n"); -@@ -98,15 +108,21 @@ int BridgeManager::FindDeviceInterface(v - for (int deviceIndex = 0; deviceIndex < deviceCount; deviceIndex++) - { - libusb_device_descriptor descriptor; -+ uint8_t bus_num, device_address; - libusb_get_device_descriptor(devices[deviceIndex], &descriptor); -+ bus_num = libusb_get_bus_number(devices[deviceIndex]); -+ device_address = libusb_get_device_address(devices[deviceIndex]); - - for (int i = 0; i < BridgeManager::kSupportedDeviceCount; i++) - { - if (descriptor.idVendor == supportedDevices[i].vendorId && descriptor.idProduct == supportedDevices[i].productId) - { -- heimdallDevice = devices[deviceIndex]; -- libusb_ref_device(heimdallDevice); -- break; -+ if (this->usbbus == -1 || this->usbdevaddr == -1 || (this->usbbus == bus_num && this->usbdevaddr == device_address)) -+ { -+ heimdallDevice = devices[deviceIndex]; -+ libusb_ref_device(heimdallDevice); -+ break; -+ } - } - } - -@@ -357,6 +373,8 @@ bool BridgeManager::InitialiseProtocol(v - BridgeManager::BridgeManager(bool verbose) - { - this->verbose = verbose; -+ this->usbbus = -1; -+ this->usbdevaddr = -1; - - libusbContext = nullptr; - deviceHandle = nullptr; ---- heimdall-flash-1.4.1.orig/heimdall/source/BridgeManager.h -+++ heimdall-flash-1.4.1/heimdall/source/BridgeManager.h -@@ -109,6 +109,8 @@ namespace Heimdall - static const DeviceIdentifier supportedDevices[kSupportedDeviceCount]; - - bool verbose; -+ int usbbus; -+ int usbdevaddr; - - libusb_context *libusbContext; - libusb_device_handle *deviceHandle; -@@ -175,6 +177,8 @@ namespace Heimdall - { - return (verbose); - } -+ void SetUsbBus(int); -+ void SetUsbDevAddr(int); - }; - } - ---- heimdall-flash-1.4.1.orig/heimdall/source/FlashAction.cpp -+++ heimdall-flash-1.4.1/heimdall/source/FlashAction.cpp -@@ -43,10 +43,12 @@ Arguments:\n\ - [-- ...]\n\ - [--pit ] [--verbose] [--no-reboot] [--resume] [--stdout-errors]\n\ - [--usb-log-level ]\n\ -+ [--usbbus ] [--usbdevaddr ]\n\ - or:\n\ - --repartition --pit [-- ...]\n\ - [-- ...] [--verbose] [--no-reboot]\n\ - [--resume] [--stdout-errors] [--usb-log-level ]\n\ -+ [--usbbus ] [--usbdevaddr ]\n\ - Description: Flashes one or more firmware files to your phone. Partition names\n\ - (or identifiers) can be obtained by executing the print-pit action.\n\ - Note: --no-reboot causes the device to remain in download mode after the action\n\ -@@ -393,6 +395,8 @@ int FlashAction::Execute(int argc, char - argumentTypes["verbose"] = kArgumentTypeFlag; - argumentTypes["stdout-errors"] = kArgumentTypeFlag; - argumentTypes["usb-log-level"] = kArgumentTypeString; -+ argumentTypes["usbbus"] = kArgumentTypeString; -+ argumentTypes["usbdevaddr"] = kArgumentTypeString; - - argumentTypes["pit"] = kArgumentTypeString; - shortArgumentAliases["pit"] = "pit"; -@@ -498,6 +502,21 @@ int FlashAction::Execute(int argc, char - BridgeManager *bridgeManager = new BridgeManager(verbose); - bridgeManager->SetUsbLogLevel(usbLogLevel); - -+ const StringArgument *usbBus = static_cast(arguments.GetArgument("usbbus")); -+ const StringArgument *usbDevAddr = static_cast(arguments.GetArgument("usbdevaddr")); -+ -+ if (usbBus) -+ { -+ const string& usbBusString = usbBus->GetValue(); -+ bridgeManager->SetUsbBus(stoi(usbBusString)); -+ } -+ -+ if (usbDevAddr) -+ { -+ const string& usbDevAddrString = usbDevAddr->GetValue(); -+ bridgeManager->SetUsbDevAddr(stoi(usbDevAddrString)); -+ } -+ - if (bridgeManager->Initialise(resume) != BridgeManager::kInitialiseSucceeded || !bridgeManager->BeginSession()) - { - closeFiles(partitionFiles, pitFile); diff --git a/debian/patches/remove-largefile-define.diff b/debian/patches/remove-largefile-define.diff deleted file mode 100644 index 15dea4c..0000000 --- a/debian/patches/remove-largefile-define.diff +++ /dev/null @@ -1,22 +0,0 @@ -Author: Marcin Juszkiewicz -Forwarded: not-needed -Last-Update: 2012-09-06 -Description: Remove QT_LARGEFILE_SUPPORT as it is defined in Debian - There is no use to send it to upstream as other Linux/Unix system may not - define QT_LARGEFILE_SUPPORT so will need that. There is no way (as far as I - know) to make distro check in .pro file. - ---- - -Index: trunk/heimdall-frontend/heimdall-frontend.pro -=================================================================== ---- trunk.orig/heimdall-frontend/heimdall-frontend.pro -+++ trunk/heimdall-frontend/heimdall-frontend.pro -@@ -95,7 +95,6 @@ - - QT += core gui xml - CONFIG += release --DEFINES += QT_LARGEFILE_SUPPORT - INCLUDEPATH += ./GeneratedFiles \ - ./GeneratedFiles/Release \ - ../libpit/Source \ diff --git a/debian/patches/series b/debian/patches/series deleted file mode 100644 index 85890bc..0000000 --- a/debian/patches/series +++ /dev/null @@ -1,2 +0,0 @@ -remove-largefile-define.diff -Add-options-for-simultaneous-flashing-on-multiple-devices