From 8fa461d076ee97918b2541f12800cae97e416ef5 Mon Sep 17 00:00:00 2001 From: Shivamurthy Shastri Date: Tue, 8 Dec 2015 07:49:44 +0530 Subject: [PATCH 1/2] EmbeddedPkg/AndroidFastbootTransportTcpDxe: Resolved compiler and build warnings Resolved below errors: 1. Variable 'gEfiHostnameVariableGuid' used, but not defined GUID. 2. File 'Hostname.h' is included, but it is not available in source. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Shivamurthy Shastri --- .../FastbootTransportTcp.c | 21 +++++++++---------- EmbeddedPkg/EmbeddedPkg.dec | 4 +++- EmbeddedPkg/Include/Guid/Hostname.h | 20 ++++++++++++++++++ 3 files changed, 33 insertions(+), 12 deletions(-) create mode 100644 EmbeddedPkg/Include/Guid/Hostname.h diff --git a/EmbeddedPkg/Drivers/AndroidFastbootTransportTcpDxe/FastbootTransportTcp.c b/EmbeddedPkg/Drivers/AndroidFastbootTransportTcpDxe/FastbootTransportTcp.c index 8ec78aeb534e..33a4747af6ac 100644 --- a/EmbeddedPkg/Drivers/AndroidFastbootTransportTcpDxe/FastbootTransportTcp.c +++ b/EmbeddedPkg/Drivers/AndroidFastbootTransportTcpDxe/FastbootTransportTcp.c @@ -328,6 +328,16 @@ TcpFastbootTransportStart ( NULL // Default advanced TCP options }; + Status = gBS->LocateProtocol( + &gEfiSimpleTextOutProtocolGuid, + NULL, + (VOID **) &mTextOut + ); + if (EFI_ERROR (Status)) { + DEBUG ((EFI_D_ERROR, "Fastboot: Open Text Output Protocol: %r\n", Status)); + return Status; + } + mReceiveEvent = ReceiveEvent; InitializeListHead (&mPacketListHead); @@ -663,17 +673,6 @@ TcpFastbootTransportEntryPoint ( { EFI_STATUS Status; - - Status = gBS->LocateProtocol( - &gEfiSimpleTextOutProtocolGuid, - NULL, - (VOID **) &mTextOut - ); - if (EFI_ERROR (Status)) { - DEBUG ((EFI_D_ERROR, "Fastboot: Open Text Output Protocol: %r\n", Status)); - return Status; - } - Status = gBS->InstallProtocolInterface ( &ImageHandle, &gAndroidFastbootTransportProtocolGuid, diff --git a/EmbeddedPkg/EmbeddedPkg.dec b/EmbeddedPkg/EmbeddedPkg.dec index bd3e30189db5..d0def3e51a5a 100644 --- a/EmbeddedPkg/EmbeddedPkg.dec +++ b/EmbeddedPkg/EmbeddedPkg.dec @@ -51,7 +51,9 @@ ## FDT Configuration Table # Include/Guid/Fdt.h - gFdtTableGuid = { 0xb1b621d5, 0xf19c, 0x41a5, { 0x83, 0x0b, 0xd9, 0x15, 0x2c, 0x69, 0xaa, 0xe0 } } + gFdtTableGuid = { 0xb1b621d5, 0xf19c, 0x41a5, { 0x83, 0x0b, 0xd9, 0x15, 0x2c, 0x69, 0xaa, 0xe0 } } + + gEfiHostnameVariableGuid = { 0xf1851fe8, 0x7d79, 0x43fb, { 0xae, 0x4c, 0x65, 0x7d, 0xd8, 0xd3, 0xc8, 0x80 } } [Protocols.common] gHardwareInterruptProtocolGuid = { 0x2890B3EA, 0x053D, 0x1643, { 0xAD, 0x0C, 0xD6, 0x48, 0x08, 0xDA, 0x3F, 0xF1 } } diff --git a/EmbeddedPkg/Include/Guid/Hostname.h b/EmbeddedPkg/Include/Guid/Hostname.h new file mode 100644 index 000000000000..6789d89bc0dc --- /dev/null +++ b/EmbeddedPkg/Include/Guid/Hostname.h @@ -0,0 +1,20 @@ +/** @file +* +* Copyright (c) 2015, Linaro Limited. All rights reserved. +* +* This program and the accompanying materials +* are licensed and made available under the terms and conditions of the BSD License +* which accompanies this distribution. The full text of the license may be found at +* http://opensource.org/licenses/bsd-license.php +* +* THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +* WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +* +**/ + +#ifndef __HOSTNAME_H__ +#define __HOSTNAME_H__ + +extern EFI_GUID gEfiHostnameVariableGuid; + +#endif /* __HOSTNAME_H__ */ From 46065621737a7b0a7ff1af79bd1614592b8e7dcb Mon Sep 17 00:00:00 2001 From: Shivamurthy Shastri Date: Thu, 7 Jan 2016 11:24:12 +0530 Subject: [PATCH 2/2] HisiPkg/HiKeyPkg: Enabled support for AndroidFastbootTransportTcpDxe Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Shivamurthy Shastri --- HisiPkg/HiKeyPkg/HiKey.dsc | 7 +++++-- HisiPkg/HiKeyPkg/HiKey.fdf | 7 ++++++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/HisiPkg/HiKeyPkg/HiKey.dsc b/HisiPkg/HiKeyPkg/HiKey.dsc index b39614857d7d..1e34a3f62dfc 100644 --- a/HisiPkg/HiKeyPkg/HiKey.dsc +++ b/HisiPkg/HiKeyPkg/HiKey.dsc @@ -98,6 +98,7 @@ [LibraryClasses.AARCH64] ArmLib|ArmPkg/Library/ArmLib/AArch64/AArch64Lib.inf + NULL|ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf [LibraryClasses.common.SEC] PrePiLib|EmbeddedPkg/Library/PrePiLib/PrePiLib.inf @@ -415,13 +416,15 @@ # USB # EmbeddedPkg/Drivers/DwUsbDxe/DwUsbDxe.inf - EmbeddedPkg/Drivers/AndroidFastbootTransportUsbDxe/FastbootTransportUsbDxe.inf # - # Fastboot + # Fastboot Support # EmbeddedPkg/Application/AndroidFastboot/AndroidFastbootApp.inf HisiPkg/HiKeyPkg/Drivers/HiKeyFastbootDxe/HiKeyFastbootDxe.inf + #EmbeddedPkg/Drivers/AndroidFastbootTransportUsbDxe/FastbootTransportUsbDxe.inf + EmbeddedPkg/Drivers/AndroidFastbootTransportTcpDxe/FastbootTransportTcpDxe.inf + # # FAT filesystem + GPT/MBR partitioning diff --git a/HisiPkg/HiKeyPkg/HiKey.fdf b/HisiPkg/HiKeyPkg/HiKey.fdf index 91eb9ba79eb6..c61f0959dfc6 100644 --- a/HisiPkg/HiKeyPkg/HiKey.fdf +++ b/HisiPkg/HiKeyPkg/HiKey.fdf @@ -130,7 +130,12 @@ READ_LOCK_STATUS = TRUE # USB # INF EmbeddedPkg/Drivers/DwUsbDxe/DwUsbDxe.inf - INF EmbeddedPkg/Drivers/AndroidFastbootTransportUsbDxe/FastbootTransportUsbDxe.inf + + # + # Fastboot Support + # + #INF EmbeddedPkg/Drivers/AndroidFastbootTransportUsbDxe/FastbootTransportUsbDxe.inf + INF EmbeddedPkg/Drivers/AndroidFastbootTransportTcpDxe/FastbootTransportTcpDxe.inf # # FASTBOOT_PLATFORM_PROTOCOL