uiSupportType is type uint. emUsbType defaults to int.
A logical OR will result in a uint. Therefore cast emUsbType
to uint to prevent following error with clang on OpenBSD
cc1plus: warnings being treated as errors
main.cpp: In function 'bool check_device_type(STRUCT_RKDEVICE_DESC&, UINT)':
main.cpp:835: warning: comparison between signed and unsigned integer expressions
*** Error 1 in . (Makefile:461 'main.o')
*** Error 1 in /root/rkdeveloptool (Makefile:506 'all-recursive')
Signed-off-by: Klaus Goger <klaus.goger@theobroma-systems.com>
OpenBSD bsdmake does not define $(RM) like GNU Make.
As it's highly unlikely that anyone will ever want to override rm or has
as system where rm is not in the path, let us just use the command
directly for the sake of simplicity.
Signed-off-by: Klaus Goger <klaus.goger@theobroma-systems.com>
On OpenBSD iconv headers were not found:
from gcc-local(1) on OpenBSD
gcc does not search under /usr/local for include files nor for
libraries: as a system compiler, it only searches the system paths by
default.
Set CPPFLAGS and LDFLAGS based on os_host set by AC_CANONICAL_HOST.
Signed-off-by: Klaus Goger <klaus.goger@theobroma-systems.com>
macOS requires -liconv in the LDFLAGS to link correctly. So add a
search macro to the configure script to prevent following error:
g++ -g -O2 -o rkdeveloptool main.o crc.o RKBoot.o RKComm.o RKDevice.o
RKImage.o RKLog.o RKScan.o -L/usr/local/Cellar/libusb/1.0.21/lib -lusb-1.0
Undefined symbols for architecture x86_64:
"_iconv", referenced from:
StringToWideString(char*, wchar_t*&) in main.o
WideStringToString(wchar_t*, char*&) in main.o
"_iconv_close", referenced from:
StringToWideString(char*, wchar_t*&) in main.o
WideStringToString(wchar_t*, char*&) in main.o
"_iconv_open", referenced from:
StringToWideString(char*, wchar_t*&) in main.o
WideStringToString(wchar_t*, char*&) in main.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [rkdeveloptool] Error 1
Fixes build error with Apple LLVM version 8.1.0 (clang-802.0.42)
main.cpp:1160:18: error: result of comparison against a string literal
is unspecified (use strncmp instead) [-Werror,-Wstring-compare]
if (configPath == (char*)DEF_CONFIG_FILE) {
^~~~~~~~~~~~~~~~~~~~~
Signed-off-by: Klaus Goger <klaus.goger@theobroma-systems.com>
Add space after comma or colon and before parenthesis and collapse
duplicate space. Don't use parenthesis for progress messages.
Use progressive forms of verbs where suitable.
While at it, replace repetition of function names with macro and rename
one variable.
Signed-off-by: Andreas Färber <afaerber@suse.de>
NORMAL_COLOR_ATTR hardcoded white-on-black text. Fix this to reset to
the actual user-controlled defaults.
This resolves white-on-black text after errors on a black-on-white
terminal (issue #10).
Signed-off-by: Andreas Färber <afaerber@suse.de>
pack and unpack boot loader is very helpful when debug boot loader.
we should support it in rkdeveloptool.
Signed-off-by: Eddie Cai <eddie.cai.linux@gmail.com>
Ind order to compatible with rockchip legacy tool(for Android),
we use a parameter file to generate a partition table.
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
- add gpt command to write gpt table
- add ul command, need run db first
Signed-off-by: Liu Yi <liuyi@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Tested-by: Kever Yang <kever.yang@rock-chips.com>
as we are using autotools to build rkdevelop. we need to install dh-autoreconf
when setting up build environment.
Signed-off-by: Eddie Cai <eddie.cai.linux@gmail.com>
The autotool configuration needs to know the version of the project, so
instead of forcing the developer to maintain two version strings and keep them
synchronized, allow the code to take the version string from the autotool
configuration automatically. Hence, only one version needs to be maintained
which is shared between the autotool configuration and the code.
Signed-off-by: Trevor Woerner <twoerner@gmail.com>
The autotool system provides a high-level way of specifying what to build,
and then generates Makefile templates based on these requirements as well
as a way of generating Makefiles at build time based on what it finds at
build time (i.e. specifics about the system on which it is being built),
and configuration options set by the user at build time. The nice thing
about autotools is that it better encapsulates distro-specific "gotchas"
that make it hard to create a Makefile by hand which will work on a wide
range of different versions of various UNIX distributions. It also includes
built-in support for out-of-tree build (VPATH), cross-development, and DESTDIR
installs.
These generated Makefiles automatically include support for a wide
range of 'make' targets such as: make, make clean, make install, make
uninstall, make check, make distclean, make dist, make strip, make
distcheck, etc. These targets make it easier to follow the "Makefile
Conventions" of "The Release Process" from the "GNU Coding Standards"
(https://www.gnu.org/prep/standards/html_node/Makefile-Conventions.html).
Signed-off-by: Trevor Woerner <twoerner@gmail.com>
the input file of write lba command may not 128 aligned. that may cause write
lba command fail. remove the judge to fix this issue.
Signed-off-by: Eddie Cai <eddie.cai.linux@gmail.com>
now we use preinstalled libusb and libudev when build rkdeveloptool. update
readme file to meet it.
Signed-off-by: Eddie Cai <eddie.cai.linux@gmail.com>
most people don't want to build other when build this simple rkdeveloptool. so
we should use preinstalled libusb and libudev by default.
now we can install libusb and libudev with below command.
sudo apt-get install libudev-dev libusb-1.0-0-dev
then make. you will get rkdevelop.
Signed-off-by: Eddie Cai <eddie.cai.linux@gmail.com>