CYGWIN is not supported, USE_MINGW and HOST_OS==windows are being
replaced with LOCAL_..._windows variables.
Bug: 23566667
Change-Id: I3e4a1e4097dc994cf5abdce6939e83a91758fd75
Also add -Wunreachable-code to the set of compiler flags, otherwise
noreturn becomes considerably less useful.
bug: https://code.google.com/p/android/issues/detail?id=171099
Change-Id: I9a95d45633c731c7046d4e4a39844d9cebfd1718
(cherrypick of 241bcf05e0e394bbf2681f359f52646dd6c707f6.)
We're already linking against libbase but we'll have to add
a libbase dependency to every target that includes libziparchive
as a STATIC_LIBRARY dependency, given that there's no way to
express that what we want (except by adding a LOCAL_WHOLE_STATIC_LIBRARY
dependency on libbase to libziparchive but that seems bad too)
Change-Id: I294ad389a9c61a1134a7bc323da25b0004a8f1e0
libc++.so is not widely available on the host, so we compile against
one built as part of the platform. This causes problems for adb and
fastboot, which are distributed through a number of channels - the
sdk, distro packages, downloaded from the build server, or manually
copied. Instead of forcing all users to handle libc++.so too,
statically link against libc++.
Change-Id: I51b75258653a23558c8b598802005f6c1166a439
Bug: 14416410
1. The new mingw-w64 toolchain x86_64-w64-mingw32-4.8 has ddk
in x86_64-w64-mingw32/include/ddk
2. Add -Wno-error=cpp to suppress a warning that turns into error
thanks to -Werror:
Please include winsock2.h before windows.h
3. Cast GetLastError() return type DWORD to "int"
4. Include direct.h for _mkdir
5. Include stdint.h for uint8_t on Windows
Change-Id: I4bec0587f6573692f08c760da6c98ae551b8b5eb
Currently the default rpath includes $ORIGIN/../lib
So we throw in '.' which should help distributions of fastboot.
readelf -d $(which fastboot)|grep RPATH
0x0000000f (RPATH) Library rpath: [$ORIGIN/../lib:.]
Bug: 15731906
Change-Id: I2f4345d178e5b3c87f6f159faf105ae30f3b52eb
Signed-off-by: JP Abgrall <jpa@google.com>
In the past it would incorrectly also link against the dlopen()'d lib.
Now it clearly does not care about it.
ldd $(which fastboot)
linux-gate.so.1 => (0xf7735000)
libdl.so.2 => /lib/i386-linux-gnu/libdl.so.2 (0xf76d9000)
libstdc++.so.6 => /usr/lib/i386-linux-gnu/libstdc++.so.6 (0xf75f4000)
libm.so.6 => /lib/i386-linux-gnu/libm.so.6 (0xf75c7000)
libgcc_s.so.1 => /lib/i386-linux-gnu/libgcc_s.so.1 (0xf75a9000)
libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0xf73ff000)
/lib/ld-linux.so.2 (0xf7736000)
Bug: 15717498
Change-Id: I5465e97a445b17f5493a1f590e181ef98a382451
Signed-off-by: JP Abgrall <jpa@google.com>
F2FS was already disabled on windows, but the library doesn't build for
mac either, so only try and use it on Linux hosts.
Change-Id: I8bacfa4c01c9ee13123aef6d05d17b3f9094c765
Only do f2fs dynamic loading on linux.
Adds a stub for windows builds.
Change-Id: I7bbaaa1b2ff5992709d904b7ace40ae263d32922
Signed-off-by: JP Abgrall <jpa@google.com>
- Enables fsck.f2fs for partitions with type F2FS.
- Adds support for f2fs as format fs-type.
- f2fs is optional and support is dlopen()d when needed.
Needs changes in
system/extras/f2fs_utils
external/f2fs-tools
Change-Id: I8d141a0d4d14df9fe84d3b131484e9696fcd8870
Signed-off-by: JP Abgrall <jpa@google.com>
- Deal with a missing initializer issue
- Deal with some -Wunused issues
- Deal with some signed/unsigned issues
- switch to usleep from sleep to facilitate win_sdk compile
Change-Id: I64e32a5b0782aeed9582f489e866173c4df1afbf
Formatting large partitions on devices with small transfer buffers did
not work before since format used a strange path through the code to
send data. It now uses the normal path. Also cleaned up a bit. FS
code now lives in a separate file and the custom path for format is
gone.
Change-Id: If4e01cabc2e250b7c02ca7ce8c268e51d49e1529
(Linux only for now) With fastboot reading serial numbers from sysfs, it had
become possible for a fastboot command issued immediately after rebooting
the bootloader to fail, because sysfs still thought the device was online.
To prevent this, after reboot-bootloader we wait for the device to disconnect.
Also made usb_read and usb_write fail immediately if the descriptor has been
closed; this prevents an incorrect error message ("Bad file descriptor")
when errors from fb_getvar are ignored (e.g., by fb_format_supported).
Also removed unused fd param from filter_usb_device, and simplified logic
in usb_write by using do/while instead of a special case for len == 0.
Change-Id: I799b857eab411fd8ad25f5777fc61c685152ea86
Add support to fastboot for automatically using libsparse to break large
files, whether they are in sparse or normal format, into multiple sparse
files that can each fit into the target's memory. Allows flashing
images that are larger than the size of the available memory on the
target.
By default, any file over 512MB will be sparsed into 512MB chunks. The
limit can be modified with the -m argument, or sparsing can be forced
with -S or avoided with -N. If -m is not specified, the target can
override the default by implementing getvar:max-download-size
Change-Id: I6c59381c3d24475c4f2587ea877200b96971cbd7
Some filesystems (e.g. ext4) require flushing an initial
fs image, right after erasing it the partition is unusable.
Doing erase,flush emptyfs is a little bit scaring so we have a
separate command that performs it as atomic step:
- get size of partition
- create an empty filesystem image
- erase the partition
- flush empty fs to the partition
This command applicable only for ext4 filesystem and checks the
partition type before formatting it.
Change-Id: I8529bc3485739487f0d91312f7c0ab1a6e5d8b44
Some filesystems (e.g. ext4) require flushing an initial
fs image, right after erasing it the partition is unusable.
Doing erase,flush emptyfs is a little bit scaring so we have a
separate command that performs it as atomic step:
- get size of partition
- create an empty filesystem image
- erase the partition
- flush empty fs to the partition
This command applicable only for ext4 filesystem and checks the
partition type before formatting it.
Change-Id: Ifa42deaa66c3cb96ff786a73c3fadad92658f395
Some filesystems (e.g. ext4) require flushing an initial
fs image, right after erasing it the partition is unusable.
Doing erase,flush emptyfs is a little bit scaring so we have a
separate command that performs it as atomic step:
- get size of partition
- create an empty filesystem image
- erase the partition
- flush empty fs to the partition
This command applicable only for ext4 filesystem and checks the
partition type before formatting it.
Change-Id: I8529bc1dc64237f1f0d91312f7c0ab1a6e5d8b44
Some filesystems (e.g. ext4) require flushing an initial
fs image, right after erasing it the partition is unusable.
Doing erase,flush emptyfs is a little bit scaring so we have a
separate command that performs it as atomic step:
- get size of partition
- create an empty filesystem image
- erase the partition
- flush empty fs to the partition
This command applicable only for ext4 filesystem and checks the
partition type before formatting it.
Change-Id: I8529bc1dc64698f1f0d91312f7c0ab1a6e5d8b44