FORUMS
Remove All Ads from XDA

Adb for Raspberry pi

5,225 posts
Thanks Meter: 9,876
 
Post Reply Email Thread
7th October 2012, 05:11 PM |#11  
Quote:
Originally Posted by E:V:A

Looks to me as you forgot to add your /usr/bin to your PATH variable (which also need to be exported to shell.)
Until you do that you need to use the source operator ".":

Code:
$ ./usr/bin/adb

good thinking.. but it didn't work.. cannot execute binary file.
Code:
pi@raspberrypi ~ $ export PATH=/usr/bin:$PATH
pi@raspberrypi ~ $ adb
bash: /usr/bin/adb: No such file or directory
pi@raspberrypi ~ $ /usr/bin/adb
bash: /usr/bin/adb: No such file or directory
pi@raspberrypi ~ $ . /usr/bin/adb
bash: .: /usr/bin/adb: cannot execute binary file
pi@raspberrypi ~ $
I have an older copy of ADB 1.0.26, but I need 1.0.28. What is the difference here aside from the shared objects which I've already put into /usr/lib.
Code:
pi@raspberrypi ~ $ file /usr/bin/adb #new version
/usr/bin/adb: setuid setgid ELF 32-bit LSB executable, ARM, version 1 (SYSV), dynamically linked (uses shared libs), stripped
pi@raspberrypi ~ $ file /bin/adb  #old version
/bin/adb: setuid setgid ELF 32-bit LSB executable, ARM, version 1 (SYSV), statically linked, for GNU/Linux 2.6.26, BuildID[sha1]=0x8ffd8c80a0705dc113149612e3067931208bfd70, not stripped
The Following User Says Thank You to AdamOutler For This Useful Post: [ View ]
 
 
7th October 2012, 06:57 PM |#12  
Quote:
Originally Posted by bhundven

It was my assumption from the original link you posted that this was being built on the r-pi.

Without the prebuilts being part of the environment, linux-x86 directory would be the host gcc. In this case on r-pi debian, arm gcc.

Edit: From the original build you had a problem with -m32 not being a valid argument.
You could comment out lines 48 and 49 of: build/core/combo/HOST_linux-x86.mk
and see what happens.

irc?

I did this. I got most of the way through compiling.

Code:
pi@raspberrypi ~/adb $ make out/host/linux-x86/bin/adb
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=4.0.4
TARGET_PRODUCT=full
TARGET_BUILD_VARIANT=eng
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a
HOST_ARCH=x86
HOST_OS=linux
HOST_BUILD_TYPE=release
BUILD_ID=IMM76L
============================================
build/core/tasks/kernel.mk:68: **********************************************************
build/core/tasks/kernel.mk:69: * Kernel source found, but no configuration was defined  *
build/core/tasks/kernel.mk:70: * Please add the TARGET_KERNEL_CONFIG variable to your   *
build/core/tasks/kernel.mk:71: * BoardConfig.mk file                                    *
build/core/tasks/kernel.mk:72: **********************************************************
host C: adb <= system/core/adb/adb.c
system/core/adb/adb.c: In function ‘connect_device’:
system/core/adb/adb.c:998:28: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
host C: adb <= system/core/adb/console.c
host C: adb <= system/core/adb/transport.c
host C: adb <= system/core/adb/transport_local.c
system/core/adb/transport_local.c: In function ‘local_init’:
system/core/adb/transport_local.c:321:8: warning: extra tokens at end of #endif directive [enabled by default]
host C: adb <= system/core/adb/transport_usb.c
host C: adb <= system/core/adb/commandline.c
host C: adb <= system/core/adb/adb_client.c
host C: adb <= system/core/adb/sockets.c
host C: adb <= system/core/adb/services.c
host C: adb <= system/core/adb/file_sync_client.c
host C: adb <= system/core/adb/get_my_path_linux.c
host C: adb <= system/core/adb/usb_linux.c
host C: adb <= system/core/adb/utils.c
host C: adb <= system/core/adb/usb_vendors.c
host C: adb <= system/core/adb/fdevent.c
host C: libzipfile <= system/core/libzipfile/centraldir.c
host C: libzipfile <= system/core/libzipfile/zipfile.c
host StaticLib: libzipfile (out/host/linux-x86/obj/STATIC_LIBRARIES/libzipfile_intermediates/libzipfile.a)
host C: libunz <= external/zlib/adler32.c
host C: libunz <= external/zlib/crc32.c
host C: libunz <= external/zlib/zutil.c
host C: libunz <= external/zlib/inflate.c
host C: libunz <= external/zlib/inftrees.c
host C: libunz <= external/zlib/inffast.c
host StaticLib: libunz (out/host/linux-x86/obj/STATIC_LIBRARIES/libunz_intermediates/libunz.a)
host C: liblog <= system/core/liblog/logd_write.c
system/core/liblog/logd_write.c: In function ‘__write_to_log_kernel’:
system/core/liblog/logd_write.c:90:9: warning: implicit declaration of function ‘fakeLogWritev’ [-Wimplicit-function-declaration]
system/core/liblog/logd_write.c: In function ‘__write_to_log_init’:
system/core/liblog/logd_write.c:103:9: warning: implicit declaration of function ‘fakeLogOpen’ [-Wimplicit-function-declaration]
system/core/liblog/logd_write.c:112:13: warning: implicit declaration of function ‘fakeLogClose’ [-Wimplicit-function-declaration]
host C: liblog <= system/core/liblog/logprint.c
host C: liblog <= system/core/liblog/event_tag_map.c
host C: liblog <= system/core/liblog/fake_log_device.c
host StaticLib: liblog (out/host/linux-x86/obj/STATIC_LIBRARIES/liblog_intermediates/liblog.a)
host C: libcutils <= system/core/libcutils/atomic.c
In file included from system/core/include/cutils/atomic-inline.h:47:0,
                 from system/core/libcutils/atomic.c:19:
system/core/include/cutils/atomic-arm.h:21:34: fatal error: machine/cpu-features.h: No such file or directory
compilation terminated.
make: *** [out/host/linux-x86/obj/STATIC_LIBRARIES/libcutils_intermediates/atomic.o] Error 1
pi@raspberrypi ~/adb $
Not sure what I need to do to fix system/core/libcutils/atomic.c Maybe I need to get the machine/ repo.
The Following User Says Thank You to AdamOutler For This Useful Post: [ View ]
7th October 2012, 07:26 PM |#13  
I was able to link some libraries around and ended up here..
Code:
pi@raspberrypi ~/adb $ make out/host/linux-x86/bin/adb
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=4.0.4
TARGET_PRODUCT=full
TARGET_BUILD_VARIANT=eng
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a
HOST_ARCH=x86
HOST_OS=linux
HOST_BUILD_TYPE=release
BUILD_ID=IMM76L
============================================
build/core/tasks/kernel.mk:68: **********************************************************
build/core/tasks/kernel.mk:69: * Kernel source found, but no configuration was defined  *
build/core/tasks/kernel.mk:70: * Please add the TARGET_KERNEL_CONFIG variable to your   *
build/core/tasks/kernel.mk:71: * BoardConfig.mk file                                    *
build/core/tasks/kernel.mk:72: **********************************************************
host C: libcutils <= system/core/libcutils/atomic.c
host C: libcutils <= system/core/libcutils/array.c
host C: libcutils <= system/core/libcutils/hashmap.c
host C: libcutils <= system/core/libcutils/native_handle.c
host C: libcutils <= system/core/libcutils/buffer.c
host C: libcutils <= system/core/libcutils/socket_inaddr_any_server.c
host C: libcutils <= system/core/libcutils/socket_local_client.c
host C: libcutils <= system/core/libcutils/socket_local_server.c
host C: libcutils <= system/core/libcutils/socket_loopback_client.c
host C: libcutils <= system/core/libcutils/socket_loopback_server.c
host C: libcutils <= system/core/libcutils/socket_network_client.c
host C: libcutils <= system/core/libcutils/sockets.c
host C: libcutils <= system/core/libcutils/config_utils.c
host C: libcutils <= system/core/libcutils/cpu_info.c
host C: libcutils <= system/core/libcutils/load_file.c
host C: libcutils <= system/core/libcutils/list.c
host C: libcutils <= system/core/libcutils/open_memstream.c
host C: libcutils <= system/core/libcutils/strdup16to8.c
host C: libcutils <= system/core/libcutils/strdup8to16.c
host C: libcutils <= system/core/libcutils/record_stream.c
host C: libcutils <= system/core/libcutils/process_name.c
host C: libcutils <= system/core/libcutils/properties.c
host C: libcutils <= system/core/libcutils/threads.c
host C: libcutils <= system/core/libcutils/sched_policy.c
host C: libcutils <= system/core/libcutils/iosched_policy.c
host C: libcutils <= system/core/libcutils/str_parms.c
host C: libcutils <= system/core/libcutils/abort_socket.c
host C: libcutils <= system/core/libcutils/mspace.c
host C: libcutils <= system/core/libcutils/selector.c
host C: libcutils <= system/core/libcutils/tztime.c
system/core/libcutils/tztime.c: In function ‘differ_by_repeat’:
system/core/libcutils/tztime.c:303:2: warning: comparison is always false due to limited range of data type [-Wtype-limits]
system/core/libcutils/tztime.c: In function ‘localsub’:
system/core/libcutils/tztime.c:1267:24: warning: assignment discards ‘const’ qualifier from pointer target type [enabled by default]
host C: libcutils <= system/core/libcutils/zygote.c
host C: libcutils <= system/core/libcutils/ashmem-host.c
host C: libcutils <= system/core/libcutils/tzstrftime.c
system/core/libcutils/tzstrftime.c: In function ‘_fmt’:
system/core/libcutils/tzstrftime.c:360:7: warning: implicit declaration of function ‘sprintf’ [-Wimplicit-function-declaration]
system/core/libcutils/tzstrftime.c:360:14: warning: incompatible implicit declaration of built-in function ‘sprintf’ [enabled by default]
system/core/libcutils/tzstrftime.c: In function ‘_conv’:
system/core/libcutils/tzstrftime.c:628:9: warning: incompatible implicit declaration of built-in function ‘sprintf’ [enabled by default]
host C: libcutils <= system/core/libcutils/dlmalloc_stubs.c
host StaticLib: libcutils (out/host/linux-x86/obj/STATIC_LIBRARIES/libcutils_intermediates/libcutils.a)
host Executable: adb (out/host/linux-x86/obj/EXECUTABLES/adb_intermediates/adb)
true
host C: acp <= build/tools/acp/acp.c
host C++: libhost <= build/libs/host/pseudolocalize.cpp
host C: libhost <= build/libs/host/CopyFile.c
host StaticLib: libhost (out/host/linux-x86/obj/STATIC_LIBRARIES/libhost_intermediates/libhost.a)
host Executable: acp (out/host/linux-x86/obj/EXECUTABLES/acp_intermediates/acp)
true
Install: out/host/linux-x86/bin/acp
Notice file: system/core/adb/NOTICE -- out/host/linux-x86/obj/NOTICE_FILES/src//bin/adb.txt
Notice file: system/core/libzipfile/NOTICE -- out/host/linux-x86/obj/NOTICE_FILES/src//lib/libzipfile.a.txt
Notice file: system/core/liblog/NOTICE -- out/host/linux-x86/obj/NOTICE_FILES/src//lib/liblog.a.txt
Notice file: system/core/libcutils/NOTICE -- out/host/linux-x86/obj/NOTICE_FILES/src//lib/libcutils.a.txt
target arm C: libc <= bionic/libc/bionic/pthread.c
target thumb C: libc <= bionic/libc/arch-arm/bionic/exidx_dynamic.c
target thumb C: libc <= bionic/libc/unistd/sysconf.c
target thumb C: libc <= bionic/libc/bionic/__errno.c
target thumb C: libc <= bionic/libc/bionic/dlmalloc.c
target thumb C: libc <= bionic/libc/bionic/malloc_debug_common.c
target thumb C: libc <= bionic/libc/bionic/libc_init_dynamic.c
target thumb C: libdl <= bionic/libdl/libdl.c
cc -mthumb-interwork -Ibionic/libc/private -DCRT_LEGACY_WORKAROUND -o out/target/product/generic/obj/lib/crtbegin_so.o -c bionic/libc/arch-arm/bionic/crtbegin_so.S
cc -mthumb-interwork -Ibionic/libc/private -DCRT_LEGACY_WORKAROUND -o out/target/product/generic/obj/lib/crtend_so.o -c bionic/libc/arch-arm/bionic/crtend_so.S
target SharedLib: libdl (out/target/product/generic/obj/SHARED_LIBRARIES/libdl_intermediates/LINKED/libdl.so)
/usr/bin/ld: unrecognized option '--icf=safe'
/usr/bin/ld: use the --help option for usage information
collect2: ld returned 1 exit status
make: *** [out/target/product/generic/obj/SHARED_LIBRARIES/libdl_intermediates/LINKED/libdl.so] Error 1
so I did a
Code:
pi@raspberrypi ~/adb $ grep -r 'icf=safe' ./*
./build/core/combo/TARGET_linux-arm.mk:			-Wl,--icf=safe \
and I removed that icf parameter.
The Following User Says Thank You to AdamOutler For This Useful Post: [ View ]
7th October 2012, 07:52 PM |#14  
ok, so i've been hacking around on this quite a bit... I don't know how to work through this final linking part. here's a pastebin...

http://pastebin.com/pb8F7raB


how do i fix undefined references? I've been hacking it up by linking files where they should be linkd. I don't know how to fix this. Like I said before... I don't work at this level usually. I work on Java, shell, and hardware. C and middle-ware is not my thing.
The Following User Says Thank You to AdamOutler For This Useful Post: [ View ]
7th October 2012, 07:58 PM |#15  
bhundven's Avatar
Recognized Developer
Flag Seattle, WA
Thanks Meter: 4,535
 
Donate to Me
More
Quote:
Originally Posted by AdamOutler

ok, so i've been hacking around on this quite a bit... I don't know how to work through this final linking part. here's a pastebin...

http://pastebin.com/pb8F7raB


how do i fix undefined references? I've been hacking it up by linking files where they should be linkd. I don't know how to fix this. Like I said before... I don't work at this level usually. I work on Java, shell, and hardware. C and middle-ware is not my thing.

Try adding:
Code:
--with-float=soft
to LOCAL_CFLAGS

EDIT: You might also need to add
Code:
-lgcc
to the LOCAL_LDFLAGS
7th October 2012, 08:22 PM |#16  
Quote:
Originally Posted by bhundven

Try adding:

Code:
--with-float=soft
to LOCAL_CFLAGS

EDIT: You might also need to add
Code:
-lgcc
to the LOCAL_LDFLAGS

Thanks. I'm not sure where to add it though
Code:
pi@raspberrypi ~/adb $ grep -R  LOCAL_CFLAGS ./*
./bionic/libc/Android.mk:LOCAL_CFLAGS := $(libc_common_cflags)
./bionic/libc/Android.mk:LOCAL_CFLAGS+= \
./bionic/libc/Android.mk:LOCAL_CFLAGS += -DCRT_LEGACY_WORKAROUND
./bionic/libc/Android.mk:LOCAL_CFLAGS := $(libc_common_cflags) \
./bionic/libc/Android.mk:LOCAL_CFLAGS := $(libc_common_cflags) \
./bionic/libc/Android.mk:LOCAL_CFLAGS := $(libc_common_cflags)
./bionic/libc/Android.mk:LOCAL_CFLAGS := \
./bionic/libc/Android.mk:LOCAL_CFLAGS := \
./bionic/libc/Jamfile:        local LOCAL_CFLAGS LOCAL_DEFINES LOCAL_INCLUDES LOCAL_SRC NO_LOCAL_SRC ;
./bionic/libc/Jamfile:        CFLAGS   += $(LOCAL_CFLAGS) ;
./bionic/linker/Android.mk:LOCAL_CFLAGS += -DVM_SPLIT_2G
./bionic/linker/Android.mk:LOCAL_CFLAGS += -DPRELINK
./bionic/linker/Android.mk:LOCAL_CFLAGS += -DLINKER_TEXT_BASE=$(LINKER_TEXT_BASE)
./bionic/linker/Android.mk:LOCAL_CFLAGS += -DLINKER_AREA_SIZE=$(LINKER_AREA_SIZE)
./bionic/linker/Android.mk:LOCAL_CFLAGS += -DLINKER_DEBUG=0
./bionic/linker/Android.mk:    LOCAL_CFLAGS += -DHAVE_ARM_TLS_REGISTER
./bionic/linker/Android.mk:    LOCAL_CFLAGS += -DHAVE_TEGRA_ERRATA_657451
./bionic/linker/Android.mk:    LOCAL_CFLAGS += -DHAVE_TEGRA_ERRATA_657451
./bionic/linker/Android.mk:LOCAL_CFLAGS += -I$(LOCAL_PATH)/../libc/private
./bionic/linker/Android.mk:LOCAL_CFLAGS += -DANDROID_ARM_LINKER
./bionic/linker/Android.mk:    LOCAL_CFLAGS += -DANDROID_X86_LINKER
./bionic/linker/Android.mk:    LOCAL_CFLAGS += -I$(LOCAL_PATH)/../libc/arch-x86/bionic
./bionic/linker/Android.mk:      LOCAL_CFLAGS += -DANDROID_SH_LINKER
./bionic/linker/README.TXT:    LOCAL_CFLAGS += -DLINKER_DEBUG=0
./bionic/linker/README.TXT:    LOCAL_CFLAGS += -DLINKER_DEBUG=1
./bionic/libstdc++/Android.mk:LOCAL_CFLAGS := $(libstdc++_cflags)
./bionic/libstdc++/Android.mk:LOCAL_CFLAGS := $(libstdc++_cflags)
./build/tools/acp/Android.mk:LOCAL_CFLAGS += -DWIN32_EXE
./build/tools/acp/Android.mk:LOCAL_CFLAGS += -DMACOSX_RSRC
./build/tools/rgb2565/Android.mk:LOCAL_CFLAGS += -O2 -Wall -Wno-unused-parameter
./build/buildspec.mk.default:# will be added to LOCAL_CFLAGS when building the module.
./build/core/clear_vars.mk:LOCAL_CFLAGS:=
./build/core/build-system.html:LOCAL_CFLAGS += -DNDEBUG=1
./build/core/build-system.html:<h4>LOCAL_CFLAGS</h4>
./build/core/build-system.html:<p><code>LOCAL_CFLAGS += -DLIBUTILS_NATIVE=1</code></p>
./build/core/build-system.html:<code>LOCAL_CPPFLAGS</code> is guaranteed to be after <code>LOCAL_CFLAGS</code>
./build/core/build-system.html:<code>LOCAL_CFLAGS</code>.
./build/core/build-system.html:<code>LOCAL_C_INCLUDES</code>, <code>LOCAL_CFLAGS</code>, and
./build/core/native_test.mk:LOCAL_CFLAGS += -DGTEST_OS_LINUX -DGTEST_HAS_STD_STRING
./build/core/host_native_test.mk:LOCAL_CFLAGS += -DGTEST_OS_LINUX -DGTEST_HAS_STD_STRING -O0 -g
./build/core/binary.mk:  LOCAL_CFLAGS += $(TARGET_FDO_CFLAGS)
./build/core/binary.mk:LOCAL_CFLAGS += -DGOOGLE_PROTOBUF_NO_RTTI
./build/core/binary.mk:$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_CFLAGS := $(LOCAL_CFLAGS)
./build/libs/host/Android.mk:LOCAL_CFLAGS += -DWIN32_EXE
./build/libs/host/Android.mk:LOCAL_CFLAGS += -DMACOSX_RSRC
./external/zlib/Android.mk:LOCAL_CFLAGS += -O3 -DUSE_MMAP $(zlib_arm_flags)
./external/zlib/Android.mk:LOCAL_CFLAGS += -O3 -DUSE_MMAP $(zlib_arm_flags)
./external/zlib/Android.mk:LOCAL_CFLAGS += -O3 -DUSE_MMAP
./system/core/libsysutils/Android.mk:LOCAL_CFLAGS := 
./system/core/charger/Android.mk:LOCAL_CFLAGS += -DBATTERY_DEVICE_NAME=\"$(BOARD_BATTERY_DEVICE_NAME)\"
./system/core/libcutils/Android.mk:LOCAL_CFLAGS += $(hostSmpFlag)
./system/core/libcutils/Android.mk:LOCAL_CFLAGS += -DHAVE_MEMSET16 -DHAVE_MEMSET32
./system/core/libcutils/Android.mk:    LOCAL_CFLAGS += -DRECOVERY_PRE_COMMAND='$(TARGET_RECOVERY_PRE_COMMAND)'
./system/core/libcutils/Android.mk:    LOCAL_CFLAGS += -DRECOVERY_PRE_COMMAND_CLEAR_REASON
./system/core/libcutils/Android.mk:LOCAL_CFLAGS += $(targetSmpFlag)
./system/core/libcutils/Android.mk:LOCAL_CFLAGS += $(targetSmpFlag)
./system/core/libcutils/Android.mk:LOCAL_CFLAGS += -DTEST_STR_PARMS
./system/core/libusbhost/Android.mk:LOCAL_CFLAGS := -g -DUSE_LIBLOG
./system/core/sh/Android.mk:LOCAL_CFLAGS += -DSHELL -DWITH_LINENOISE
./system/core/sh/Android.mk:make_ash_files: PRIVATE_CFLAGS := $(LOCAL_CFLAGS)
./system/core/libdiskconfig/Android.mk:LOCAL_CFLAGS := -O2 -g -W -Wall -Werror -D_LARGEFILE64_SOURCE
./system/core/debuggerd/Android.mk:LOCAL_CFLAGS := -Wall
./system/core/debuggerd/Android.mk:LOCAL_CFLAGS += -DWITH_VFP
./system/core/debuggerd/Android.mk:LOCAL_CFLAGS += -DWITH_VFP_D32
./system/core/debuggerd/Android.mk:LOCAL_CFLAGS += -DWITH_VFP
./system/core/debuggerd/Android.mk:LOCAL_CFLAGS += -DWITH_VFP_D32
./system/core/adb/Android.mk:LOCAL_CFLAGS += -g -DADB_HOST=1  -Wall -Wno-unused-parameter
./system/core/adb/Android.mk:LOCAL_CFLAGS += -O2
./system/core/adb/Android.mk:LOCAL_CFLAGS += -O2
./system/core/adb/Android.mk:LOCAL_CFLAGS += -D_XOPEN_SOURCE -D_GNU_SOURCE
./system/core/adb/Android.mk:LOCAL_CFLAGS := -g -DADB_HOST=0 -Wall -Wno-unused-parameter
./system/core/adb/Android.mk:LOCAL_CFLAGS += -O2
./system/core/adb/Android.mk:LOCAL_CFLAGS += -O2
./system/core/adb/Android.mk:LOCAL_CFLAGS += -D_XOPEN_SOURCE -D_GNU_SOURCE
./system/core/adb/Android.mk:LOCAL_CFLAGS += -DANDROID_GADGET=1
./system/core/adb/Android.mk:	LOCAL_CFLAGS += -DBOARD_ALWAYS_INSECURE
./system/core/adb/Android.mk:LOCAL_CFLAGS := \
./system/core/adb/Android.mk:LOCAL_CFLAGS += -O2
./system/core/adb/Android.mk:LOCAL_CFLAGS += -O2
./system/core/nexus/Android.mk:LOCAL_CFLAGS := 
./system/core/nexus/Android.mk:LOCAL_CFLAGS := 
./system/core/libpixelflinger/Android.mk:LOCAL_CFLAGS := $(PIXELFLINGER_CFLAGS)
./system/core/libpixelflinger/Android.mk:LOCAL_CFLAGS += -DWITH_LIB_HARDWARE
./system/core/libpixelflinger/Android.mk:LOCAL_CFLAGS := $(PIXELFLINGER_CFLAGS) 
./system/core/liblog/Android.mk:LOCAL_CFLAGS := -DFAKE_LOG_DEVICE=1
./system/core/init/Android.mk:LOCAL_CFLAGS    += -DBOOTCHART=1
./system/core/init/Android.mk:LOCAL_CFLAGS += -DNO_INITLOGO
./system/core/init/Android.mk:    $(eval LOCAL_CFLAGS += -D$(system_core_init_define)=\"$($(system_core_init_define))\") \
pi@raspberrypi ~/adb $
This is all very confusing.

I pushed my source to dev host for anyone interested. http://d-h.st/wmN

I will make sure to hit that thanks button once I get to a desktop. This RPI takes too long to scroll and I'm using the web from it.
The Following User Says Thank You to AdamOutler For This Useful Post: [ View ]
7th October 2012, 08:36 PM |#17  
bhundven's Avatar
Recognized Developer
Flag Seattle, WA
Thanks Meter: 4,535
 
Donate to Me
More
Quote:
Originally Posted by AdamOutler

Thanks. I'm not sure where to add it though

Code:
pi@raspberrypi ~/adb $ grep -R  LOCAL_CFLAGS ./*
./bionic/libc/Android.mk:LOCAL_CFLAGS := $(libc_common_cflags)
./bionic/libc/Android.mk:LOCAL_CFLAGS+= \
./bionic/libc/Android.mk:LOCAL_CFLAGS += -DCRT_LEGACY_WORKAROUND
./bionic/libc/Android.mk:LOCAL_CFLAGS := $(libc_common_cflags) \
./bionic/libc/Android.mk:LOCAL_CFLAGS := $(libc_common_cflags) \
./bionic/libc/Android.mk:LOCAL_CFLAGS := $(libc_common_cflags)
./bionic/libc/Android.mk:LOCAL_CFLAGS := \
./bionic/libc/Android.mk:LOCAL_CFLAGS := \
./bionic/libc/Jamfile:        local LOCAL_CFLAGS LOCAL_DEFINES LOCAL_INCLUDES LOCAL_SRC NO_LOCAL_SRC ;
./bionic/libc/Jamfile:        CFLAGS   += $(LOCAL_CFLAGS) ;
./bionic/linker/Android.mk:LOCAL_CFLAGS += -DVM_SPLIT_2G
./bionic/linker/Android.mk:LOCAL_CFLAGS += -DPRELINK
./bionic/linker/Android.mk:LOCAL_CFLAGS += -DLINKER_TEXT_BASE=$(LINKER_TEXT_BASE)
./bionic/linker/Android.mk:LOCAL_CFLAGS += -DLINKER_AREA_SIZE=$(LINKER_AREA_SIZE)
./bionic/linker/Android.mk:LOCAL_CFLAGS += -DLINKER_DEBUG=0
./bionic/linker/Android.mk:    LOCAL_CFLAGS += -DHAVE_ARM_TLS_REGISTER
./bionic/linker/Android.mk:    LOCAL_CFLAGS += -DHAVE_TEGRA_ERRATA_657451
./bionic/linker/Android.mk:    LOCAL_CFLAGS += -DHAVE_TEGRA_ERRATA_657451
./bionic/linker/Android.mk:LOCAL_CFLAGS += -I$(LOCAL_PATH)/../libc/private
./bionic/linker/Android.mk:LOCAL_CFLAGS += -DANDROID_ARM_LINKER
./bionic/linker/Android.mk:    LOCAL_CFLAGS += -DANDROID_X86_LINKER
./bionic/linker/Android.mk:    LOCAL_CFLAGS += -I$(LOCAL_PATH)/../libc/arch-x86/bionic
./bionic/linker/Android.mk:      LOCAL_CFLAGS += -DANDROID_SH_LINKER
./bionic/linker/README.TXT:    LOCAL_CFLAGS += -DLINKER_DEBUG=0
./bionic/linker/README.TXT:    LOCAL_CFLAGS += -DLINKER_DEBUG=1
./bionic/libstdc++/Android.mk:LOCAL_CFLAGS := $(libstdc++_cflags)
./bionic/libstdc++/Android.mk:LOCAL_CFLAGS := $(libstdc++_cflags)
./build/tools/acp/Android.mk:LOCAL_CFLAGS += -DWIN32_EXE
./build/tools/acp/Android.mk:LOCAL_CFLAGS += -DMACOSX_RSRC
./build/tools/rgb2565/Android.mk:LOCAL_CFLAGS += -O2 -Wall -Wno-unused-parameter
./build/buildspec.mk.default:# will be added to LOCAL_CFLAGS when building the module.
./build/core/clear_vars.mk:LOCAL_CFLAGS:=
./build/core/build-system.html:LOCAL_CFLAGS += -DNDEBUG=1
./build/core/build-system.html:<h4>LOCAL_CFLAGS</h4>
./build/core/build-system.html:<p><code>LOCAL_CFLAGS += -DLIBUTILS_NATIVE=1</code></p>
./build/core/build-system.html:<code>LOCAL_CPPFLAGS</code> is guaranteed to be after <code>LOCAL_CFLAGS</code>
./build/core/build-system.html:<code>LOCAL_CFLAGS</code>.
./build/core/build-system.html:<code>LOCAL_C_INCLUDES</code>, <code>LOCAL_CFLAGS</code>, and
./build/core/native_test.mk:LOCAL_CFLAGS += -DGTEST_OS_LINUX -DGTEST_HAS_STD_STRING
./build/core/host_native_test.mk:LOCAL_CFLAGS += -DGTEST_OS_LINUX -DGTEST_HAS_STD_STRING -O0 -g
./build/core/binary.mk:  LOCAL_CFLAGS += $(TARGET_FDO_CFLAGS)
./build/core/binary.mk:LOCAL_CFLAGS += -DGOOGLE_PROTOBUF_NO_RTTI
./build/core/binary.mk:$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_CFLAGS := $(LOCAL_CFLAGS)
./build/libs/host/Android.mk:LOCAL_CFLAGS += -DWIN32_EXE
./build/libs/host/Android.mk:LOCAL_CFLAGS += -DMACOSX_RSRC
./external/zlib/Android.mk:LOCAL_CFLAGS += -O3 -DUSE_MMAP $(zlib_arm_flags)
./external/zlib/Android.mk:LOCAL_CFLAGS += -O3 -DUSE_MMAP $(zlib_arm_flags)
./external/zlib/Android.mk:LOCAL_CFLAGS += -O3 -DUSE_MMAP
./system/core/libsysutils/Android.mk:LOCAL_CFLAGS := 
./system/core/charger/Android.mk:LOCAL_CFLAGS += -DBATTERY_DEVICE_NAME=\"$(BOARD_BATTERY_DEVICE_NAME)\"
./system/core/libcutils/Android.mk:LOCAL_CFLAGS += $(hostSmpFlag)
./system/core/libcutils/Android.mk:LOCAL_CFLAGS += -DHAVE_MEMSET16 -DHAVE_MEMSET32
./system/core/libcutils/Android.mk:    LOCAL_CFLAGS += -DRECOVERY_PRE_COMMAND='$(TARGET_RECOVERY_PRE_COMMAND)'
./system/core/libcutils/Android.mk:    LOCAL_CFLAGS += -DRECOVERY_PRE_COMMAND_CLEAR_REASON
./system/core/libcutils/Android.mk:LOCAL_CFLAGS += $(targetSmpFlag)
./system/core/libcutils/Android.mk:LOCAL_CFLAGS += $(targetSmpFlag)
./system/core/libcutils/Android.mk:LOCAL_CFLAGS += -DTEST_STR_PARMS
./system/core/libusbhost/Android.mk:LOCAL_CFLAGS := -g -DUSE_LIBLOG
./system/core/sh/Android.mk:LOCAL_CFLAGS += -DSHELL -DWITH_LINENOISE
./system/core/sh/Android.mk:make_ash_files: PRIVATE_CFLAGS := $(LOCAL_CFLAGS)
./system/core/libdiskconfig/Android.mk:LOCAL_CFLAGS := -O2 -g -W -Wall -Werror -D_LARGEFILE64_SOURCE
./system/core/debuggerd/Android.mk:LOCAL_CFLAGS := -Wall
./system/core/debuggerd/Android.mk:LOCAL_CFLAGS += -DWITH_VFP
./system/core/debuggerd/Android.mk:LOCAL_CFLAGS += -DWITH_VFP_D32
./system/core/debuggerd/Android.mk:LOCAL_CFLAGS += -DWITH_VFP
./system/core/debuggerd/Android.mk:LOCAL_CFLAGS += -DWITH_VFP_D32
./system/core/adb/Android.mk:LOCAL_CFLAGS += -g -DADB_HOST=1  -Wall -Wno-unused-parameter
./system/core/adb/Android.mk:LOCAL_CFLAGS += -O2
./system/core/adb/Android.mk:LOCAL_CFLAGS += -O2
./system/core/adb/Android.mk:LOCAL_CFLAGS += -D_XOPEN_SOURCE -D_GNU_SOURCE
./system/core/adb/Android.mk:LOCAL_CFLAGS := -g -DADB_HOST=0 -Wall -Wno-unused-parameter
./system/core/adb/Android.mk:LOCAL_CFLAGS += -O2
./system/core/adb/Android.mk:LOCAL_CFLAGS += -O2
./system/core/adb/Android.mk:LOCAL_CFLAGS += -D_XOPEN_SOURCE -D_GNU_SOURCE
./system/core/adb/Android.mk:LOCAL_CFLAGS += -DANDROID_GADGET=1
./system/core/adb/Android.mk:	LOCAL_CFLAGS += -DBOARD_ALWAYS_INSECURE
./system/core/adb/Android.mk:LOCAL_CFLAGS := \
./system/core/adb/Android.mk:LOCAL_CFLAGS += -O2
./system/core/adb/Android.mk:LOCAL_CFLAGS += -O2
./system/core/nexus/Android.mk:LOCAL_CFLAGS := 
./system/core/nexus/Android.mk:LOCAL_CFLAGS := 
./system/core/libpixelflinger/Android.mk:LOCAL_CFLAGS := $(PIXELFLINGER_CFLAGS)
./system/core/libpixelflinger/Android.mk:LOCAL_CFLAGS += -DWITH_LIB_HARDWARE
./system/core/libpixelflinger/Android.mk:LOCAL_CFLAGS := $(PIXELFLINGER_CFLAGS) 
./system/core/liblog/Android.mk:LOCAL_CFLAGS := -DFAKE_LOG_DEVICE=1
./system/core/init/Android.mk:LOCAL_CFLAGS    += -DBOOTCHART=1
./system/core/init/Android.mk:LOCAL_CFLAGS += -DNO_INITLOGO
./system/core/init/Android.mk:    $(eval LOCAL_CFLAGS += -D$(system_core_init_define)=\"$($(system_core_init_define))\") \
pi@raspberrypi ~/adb $
This is all very confusing.

I pushed my source to dev host for anyone interested. http://d-h.st/wmN

I will make sure to hit that thanks button once I get to a desktop. This RPI takes too long to scroll and I'm using the web from it.

Try build/core/combo/TARGET_linux-arm.mk
The Following User Says Thank You to bhundven For This Useful Post: [ View ]
7th October 2012, 08:55 PM |#18  
Quote:
Originally Posted by bhundven

Try build/core/combo/TARGET_linux-arm.mk

I added
Code:
LOCAL_CFLAGS += --with-float=soft
LOCAL_LDFLAGS += -lgcc
to both the TARGET you suggested and HOST_linux_x86. I got the same error.

I'm compiling this on the Raspberry Pi itself because i need the statically linked host binary. I'm using the x86 host because there is no arm host available. this should be irrelevant because i'm using the native build tools. Anyway.. I convinced it to use x86 and now the linking seems to be the final challenge.
8th October 2012, 03:06 AM |#20  
Rebellos did some work and posted his source here. I modified it to link to my own source and compile directly on the device without a cross-compiler. He got farther than I did. His actually searches for a device, but there is no real server output and its not sending commands to the device.

http://dl.dropbox.com/u/32145655/adb_armv6_src.zip
8th October 2012, 06:40 AM |#21  
Hi Adam.


I've built you a adb, version 1.0.29 which is based off the linaro Jellybean 4.1.1 JRO03R sources, It is a totally self contained statically linked binary which has a target arch of armv5te, which should be just fine. I don't have a PI to test it on but I did the next best thing [ link: qemu-emulating-raspberry-pi-the-easy-way ] It seems to function OK but the proof will be in the testing. If it has trouble listing devices or making connection then run the following command line to give an idea of what's going wrong.
Code:
ADB_TRACE=all ./adb
Hope That Helps!
Trev
Attached Files
File Type: 7z adb-armv5te-static.7z - [Click for QR Code] (151.6 KB, 243 views)
The Following 6 Users Say Thank You to trevd For This Useful Post: [ View ] Gift trevd Ad-Free
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes