Skip to content
This repository has been archived by the owner on Aug 24, 2022. It is now read-only.

Commit

Permalink
new compile option KERNELFLINGER_NO_XDCI
Browse files Browse the repository at this point in the history
For CiV project, there is xDCI hardware.
Disable code for xDCI to suppress unnecessary error message

Signed-off-by: JianFeng,Zhou <[email protected]>
  • Loading branch information
zhouji3x committed Jan 18, 2021
1 parent 6848559 commit 7dd9451
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 1 deletion.
6 changes: 5 additions & 1 deletion libadb/Android.mk
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)

LOCAL_MODULE := libadb-$(TARGET_BUILD_VARIANT)
LOCAL_CFLAGS := $(KERNELFLINGER_CFLAGS)

ifeq ($(KERNELFLINGER_NO_XDCI),true)
LOCAL_CFLAGS += -DKERNELFLINGER_NO_XDCI
endif

LOCAL_STATIC_LIBRARIES := \
$(KERNELFLINGER_STATIC_LIBRARIES) \
libefiusb-$(TARGET_BUILD_VARIANT) \
Expand Down
2 changes: 2 additions & 0 deletions libadb/adb.c
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,7 @@ static EFI_STATUS adb_tcp_start(start_callback_t start_cb,
}

static transport_t ADB_TRANSPORT[] = {
#ifndef KERNELFLINGER_NO_XDCI
{
.name = "USB for adb",
.start = adb_usb_start,
Expand All @@ -394,6 +395,7 @@ static transport_t ADB_TRANSPORT[] = {
.read = usb_read,
.write = usb_write
},
#endif
{
.name = "TCP for adb",
.start = adb_tcp_start,
Expand Down
4 changes: 4 additions & 0 deletions libfastboot/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ SHARED_CFLAGS := \
$(KERNELFLINGER_CFLAGS) \
-DTARGET_BOOTLOADER_BOARD_NAME=\"$(TARGET_BOOTLOADER_BOARD_NAME)\"

ifeq ($(KERNELFLINGER_NO_XDCI),true)
SHARED_CFLAGS += -DKERNELFLINGER_NO_XDCI
endif

SHARED_C_INCLUDES := $(LOCAL_PATH)/../include \
$(KERNELFLINGER_LOCAL_PATH)/avb
SHARED_STATIC_LIBRARIES := \
Expand Down
2 changes: 2 additions & 0 deletions libfastboot/fastboot_transport.c
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,7 @@ EFI_STATUS fastboot_tcp_read(void *buf, UINT32 size)

/* Transport */
static transport_t FASTBOOT_TRANSPORT[] = {
#ifndef KERNELFLINGER_NO_XDCI
{
.name = "USB for fastboot",
.start = fastboot_usb_start,
Expand All @@ -258,6 +259,7 @@ static transport_t FASTBOOT_TRANSPORT[] = {
.read = fastboot_usb_read,
.write = usb_write
},
#endif
{
.name = "TCP for fastboot",
.start = fastboot_tcp_start,
Expand Down

0 comments on commit 7dd9451

Please sign in to comment.