Pali Rohár
52793b733d
disk: Check if reading from block device failed
2019-09-30 17:42:16 +02:00
Pali Rohár
b87411c02f
Release version 0.8
2018-07-08 12:22:33 +02:00
Pali Rohár
9e5646d30e
travis: Do not run Coverity Scan jobs on non-master branches and in pull requests
2018-02-26 13:10:35 +01:00
Pali Rohár
33442482c6
disk: Fix detection of busnum
...
Unpatched version of libusb on linux platform does not set location, but
Debian's version of libusb has a patch which set it. For compatibility with
other systems without unpatched libusb version, read busnum from dirname
which seems to be always set.
Fixes: https://github.com/pali/0xFFFF/issues/5
2018-02-08 23:20:14 +01:00
Pali Rohár
e987dcd948
disk: Remove remaining ENOMEDIUM
2018-02-08 20:35:12 +01:00
Pali Rohár
2fd11378c8
disk: Fix swapping maj1:min1 and maj2:min2
2018-02-08 20:28:31 +01:00
Pali Rohár
808ce724ee
main: Print message after dumping finish
2018-02-08 19:49:54 +01:00
Pali Rohár
ca1db96690
disk: Fix compile warning: comparison between signed and unsigned integer expressions
2018-02-08 19:49:13 +01:00
Pali Rohár
a6c20b5ee4
disk: Open whole block device with O_NONBLOCK
...
This would simplify handling of ENOMEDIUM error.
2018-02-08 19:48:34 +01:00
Pali Rohár
e685787e67
disk: Ensure that maj1:min1 is first device and maj2:min2 is second device
2018-02-08 19:24:11 +01:00
Pali Rohár
559fe2a3bd
disk: After opening blkdev, check that it is really block device
2017-07-09 17:26:13 +02:00
Pali Rohár
ccec7a182f
disk: Close device file handle when freeing structures
2017-07-09 14:57:41 +02:00
Pali Rohár
31569c169a
disk: Fix detection of correct device in disk_open_dev()
2017-07-09 14:56:30 +02:00
Pali Rohár
27a55c3367
disk: Choose correct partition in disk_open_dev()
2017-07-06 20:55:41 +02:00
Pali Rohár
cda5dc6116
main: Use image_alloc_from_fd() to fix race condition between calling stat and opening file
2017-06-17 23:48:01 +02:00
Pali Rohár
5cbd5e92b8
image: Add new function image_alloc_from_fd()
2017-06-17 23:47:10 +02:00
Pali Rohár
1ec3777cb8
image: Call image_free() when image_append() is failing
2017-06-17 23:46:50 +02:00
Pali Rohár
897919a70f
main: Fix race condition between calling stat and rename
2017-06-17 23:10:36 +02:00
Pali Rohár
76b18b9d39
travis: Fix coverity job
2017-03-03 18:44:29 +01:00
Pali Rohár
ffcc10f689
travis: Simplify configuration, move coverity_scan to matrix
2017-02-26 17:00:07 +01:00
Pali Rohár
16cdf3e776
travis: Run on container-based infrastructure
2017-02-26 16:19:42 +01:00
Pali Rohár
dc81ebb855
travis: Use apt addon instead sudo
2017-02-26 16:09:52 +01:00
Pali Rohár
66ecce9a3d
disk: Remove check which is always false
...
Type unsigned long long int according to C99 can store at least 2^64-1.
2017-01-09 22:56:33 +01:00
Pali Rohár
87867a5904
cal: Fix race condition between calling stat and opening file
2017-01-08 14:33:08 +01:00
Pali Rohár
f0b8ee117b
Makefile: Fix setting compiler
2017-01-08 03:42:34 +01:00
Pali Rohár
4c8206b44f
travis: Enable clang and use separate job for Coverity
2017-01-08 03:33:39 +01:00
Pali Rohár
9bf886c041
Release version 0.7
2016-12-25 11:46:12 +01:00
Pali Rohár
955ee1bd1e
TODO: Update state
2016-12-24 18:23:43 +01:00
Pali Rohár
b4314bce15
cal: Fix pointer check
2016-12-24 18:22:02 +01:00
Pali Rohár
117d0bb2d0
cal: cal_read_block allocate memory
2016-12-24 18:06:57 +01:00
Pali Rohár
f7bad18a56
disk: Fix for RM-680
2016-12-23 10:13:42 +01:00
Pali Rohár
82de19bee1
disk: Check for ENOMEDIUM when partition is required
2016-12-23 10:13:23 +01:00
Pali Rohár
b7c28b2c1b
cal: SSIZE_MAX is not required to be defined
2016-12-23 10:13:07 +01:00
Pali Rohár
0a1ac25219
cal: Move sys/ioctl.h to __linux__
2016-12-23 10:12:27 +01:00
Pali Rohár
bd59c47ec3
usb-device: Detect Nokia N950 in disk mode
2016-12-21 18:25:25 +01:00
Pali Rohár
645e280d69
cal: Fix memory leak
2016-12-17 18:00:07 +01:00
Pali Rohár
bc0f663e92
cal: Fix check for lseek errors
2016-12-17 03:00:12 +01:00
Pali Rohár
b8fb95b2aa
all: Enable Large File Support
2016-12-17 01:53:16 +01:00
Pali Rohár
e36423e8c2
all: Fix printing fsblkcnt_t and off_t types
2016-12-17 01:52:50 +01:00
Pali Rohár
430930537c
all: Use #include <sys/sysmacros.h> for major() instead #define _BSD_SOURCE
2016-12-17 01:51:33 +01:00
Pali Rohár
7522a9fbc7
all: Fix compilation when u_int*_t are not defined and used by usb.h
2016-12-16 15:39:46 +01:00
Pali Rohár
6ec64f4992
operations: Fix NULL pointer dereference in dev_boot_device
...
This will fix a crash when calling "0xFFFF -b" from Mk II Update mode.
2016-12-10 14:13:41 +01:00
Pali Rohár
8f57f7ef61
mkii: Fix detection of Update mode
2016-12-10 14:13:14 +01:00
Pali Rohár
3d71caab8f
usb-device: Do not reattach kernel driver after closing cold flash mode
2016-12-07 11:56:37 +01:00
Pali Rohár
4ccf8fb369
usb-device: Do not print verbose message "Reattach kernel driver to USB interface..."
2016-12-07 11:55:54 +01:00
Pali Rohár
188fa70c80
cold-flash: Increase timeout after leaving cold flash mode
...
Switching to NOLO takes about one second and NOLO itself wait another second. So it should be OK.
2016-12-07 11:55:26 +01:00
Pali Rohár
f2a51b5041
disk: Do not fail when empty block device is exported
2016-12-07 11:38:07 +01:00
Pali Rohár
19e2b22193
image: Remove dead code in image_align()
2016-12-07 00:39:36 +01:00
Pali Rohár
15dbd14d7a
doc: Update fiasco documentation
2016-12-06 23:42:41 +01:00
Pali Rohár
0650cdf51f
cold-flash: Show OMAP chip revision
2016-12-06 23:13:48 +01:00
Pali Rohár
9ea8f2bb38
cal: Style fix
2016-12-06 23:13:12 +01:00
Pali Rohár
9a5f940046
usb-device: Check that we are not using broken libusb-1.0 library
2016-12-06 23:11:47 +01:00
Pali Rohár
5e79d651ca
all: Compile globally without _GNU_SOURCE, define _BSD_SOURCE or _GNU_SOURCE where needed
2016-12-06 23:10:58 +01:00
Pali Rohár
676da47751
all: Revert libusb-1.0 support
...
Listing of usb devices with libusb-1.0 is too slow and not usable for
flashing or cold-flashing Nokia N900.
Old libusb (0.1) does not have this problem and works perfectly.
Problem for libusb-1.0 was reported at least two times into libusb-devel
mailing list, but upstream developers are totally ignore it. One message is
in archive: https://sourceforge.net/p/libusb/mailman/message/34985373/
Because of that there is just one option: use tested and working libusb 0.1
library instead some experimental and non-working libusb-1.0.
2016-12-06 22:39:44 +01:00
Pali Rohár
ea7f2a441a
all: Add support for Nokia N950 (RM-680)
2016-06-27 17:24:51 +02:00
Pali Rohár
61d77eed68
mkii: Call /version/sw_release only for protocol version 2
...
Looks like command /version/sw_release is supported only by protocol version 2.
2016-06-27 17:24:05 +02:00
Pali Rohár
8a433f2d7a
usb-device: Do not reattach kernel driver if USB interface is not used
2016-05-12 00:18:02 +02:00
Pali Rohár
cf95375177
disk: Fix detection of MyDocs partition in DISK RAW mode for non RX-51 devices
2016-05-12 00:12:55 +02:00
Pali Rohár
d2e7b3d242
mkii: Implement rebooting to Update mode
2016-03-12 12:47:41 +01:00
Pali Rohár
54805eb040
mkii: Define MKII_UPDATE_MODE instead hardcoded constant
2016-03-12 12:01:27 +01:00
Pali Rohár
7b3e9bcf00
mkii: Use libusb_get_active_config_descriptor() instead libusb_get_config_descriptor()
...
This will fix problem that it was used incorrect config index
2016-03-12 11:38:00 +01:00
Pali Rohár
96e4fa5995
mkii: Fix memory leak, call libusb_free_config_descriptor()
2016-03-12 11:36:50 +01:00
Pali Rohár
c560f3642c
usb-device: Finish usb device detection based on product strings
2016-03-09 00:15:59 +01:00
Pali Rohár
98451c5851
usb-device: Add FLASH_DISK usb ids for all supported devices
2016-03-09 00:15:25 +01:00
Pali Rohár
a1623bcb7e
image: Fix detection of jffs2 initfs images
...
Looks like that some official initfs images are bigger then 3MB, so set limit to 10MB
2016-03-09 00:07:52 +01:00
Pali Rohár
c90c6319fe
main: Initialize buf before calling dev_get_rd_flags()
2016-02-23 18:38:48 +01:00
Pali Rohár
aeb9e897db
usb-device: Autodetect Nokia 770 device from product string
2016-02-23 18:23:04 +01:00
Pali Rohár
6952d73082
libusb-sniff: Fix libusb_control_transfer function
2016-02-23 18:15:55 +01:00
Pali Rohár
bc7894b99d
all: Fix usb endpoints after conversion to libusb 1.0
...
Endpoint in nolo.c for libusb_bulk_transfer must be 0x02, not 0x01.
2016-02-21 20:52:21 +01:00
Pali Rohár
abcf256268
disk: Use correct libusb function which returns Linux devnum value
...
It is libusb_get_device_address() and not libusb_get_port_number()
2016-02-12 22:27:35 +01:00
Pali Rohár
09920cf8ab
config.mk: Version is from git
2016-01-23 16:46:05 +01:00
Pali Rohár
96de6a6215
usb-device: Fix memory leak when listing devices
2016-01-23 16:38:17 +01:00
Pali Rohár
2504f9e553
travis: Update travis script for clang and libusb-1.0
2016-01-23 16:27:35 +01:00
Pali Rohár
2e9748e6a5
cold-flash: Comment unused omap variables
2016-01-23 16:26:40 +01:00
Pali Rohár
fc987674dd
all: Code style fixes
2016-01-23 16:07:02 +01:00
Pali Rohár
62fa041f86
all: Rename variable readed to sent
2016-01-23 16:06:51 +01:00
Pali Rohár
6482e4d2b7
libusb-sniff: Use POSIX.1-2003 workaround for dlsym() assignment which is compatible with C99
2016-01-23 16:03:01 +01:00
Pali Rohár
5f0897d372
doc: Remove nanddump param -i also from doc
2016-01-13 22:28:36 +01:00
Pali Rohár
f36a762168
fiasco: Fix code for append device & hwrevs subsection
...
Fix possible use-after-free in WRITE_OR_FAIL_FREE() macro
2016-01-10 17:26:23 +01:00
Pali Rohár
c258289b74
image: Check for return value fo image_read() in image_type_from_data()
2016-01-10 14:33:30 +01:00
Pali Rohár
3c1ab9934d
main: Check for SW rel version length
2016-01-10 14:32:43 +01:00
Pali Rohár
b48b9b558c
fiasco: Remove wrong checks for 'name' and 'swver'
...
Members 'name' and 'swver' of fiasco are arrays, not pointers
2016-01-10 14:31:28 +01:00
Pali Rohár
b7f80de25d
all: Check for return value of lseek
2016-01-10 14:29:18 +01:00
Pali Rohár
1ee86c05f4
fiasco: Fix memory leak for device_hwrevs_bufs variable
2016-01-10 13:29:28 +01:00
Pali Rohár
79af7395bf
fiasco: In simulate mode do not close invalid not open fd
2016-01-10 13:27:17 +01:00
Pali Rohár
ccef3c6daa
README: Update 0xFFFF website
2016-01-10 12:53:57 +01:00
Pali Rohár
05f7048580
local: Call nanddump without -i param
...
Param -i was removed in recent versions of mtd-utils.
And in older versions it did nothing.
2016-01-10 12:33:22 +01:00
Pali Rohár
75ea4bfbd8
image: Fix condition for detecting device
2015-06-24 19:09:34 +02:00
Pali Rohár
3f406cc9ad
fiasco: Fix checking for header of next image
2015-06-24 18:30:07 +02:00
Pali Rohár
289d2f22b2
image: Fix detecting new ARM U-Boot images
2015-01-15 09:42:40 +01:00
Pali Rohár
f965980e2b
all: Fix MEMMEM implementation
2015-01-15 09:42:01 +01:00
Pali Rohár
ef678ecf6c
fiasco: Remove not reached code
2014-11-26 17:00:10 +01:00
Pali Rohár
33f1dc8b55
local: Fix argument for mmap/munmap
2014-11-26 16:53:08 +01:00
Pali Rohár
bb90caec1b
all: Fix overflow in shift operators
2014-11-26 16:49:39 +01:00
Pali Rohár
c86e130ab1
Makefile: Now 0xFFFF is Posix compatible, enable -D_POSIX_C_SOURCE=200809L
2014-11-26 16:35:01 +01:00
Pali Rohár
448365b588
cal: Enable Linux code only on Linux
2014-11-26 16:33:21 +01:00
Pali Rohár
ef1960cc32
disk: Enable Linux code only on Linux
2014-11-26 16:33:07 +01:00
Pali Rohár
5633a06710
local: Enable N900 code only for ARM and enable Linux code only on Linux
2014-11-26 16:32:36 +01:00
Pali Rohár
d61815f40e
mkii: Fix argument for usb_bulk_write
2014-11-26 16:30:54 +01:00
Pali Rohár
15219cb99c
main: Add missing extern variables for getopt
2014-11-26 16:30:32 +01:00