Commit Graph

44 Commits

Author SHA1 Message Date
liuyi
081d237ad5 rkdeveloptool: v1.3
1.add LD to list devices
2.add PRM to write parameter
3.change PGPT to PPT to support print parameter and GPT

Signed-off-by: liuyi <liuyi@rock-chips.com>
2018-03-28 09:22:40 +08:00
Open Source Software for Rockchip SoCs(moved to https://github.com/rockchip-linux/)
797356f45a
Merge pull request #21 from owenchenww/master
rk3229: add 99-rk-rockusb.rules to run tool without sudo
2018-01-30 17:08:11 +08:00
Weiwen Chen
ed570a73cd rk3229: add 99-rk-rockusb.rules to run tool without sudo
Signed-off-by: Weiwen Chen <cww@rock-chips.com>
2018-01-30 16:43:13 +08:00
陈豪 | Jacob Chen
5b7445d109
Merge pull request #16 from kgoger/buildfixes
macos/openbsd fixes
2017-11-28 15:42:20 +08:00
liuyi
b5200da53d fill cbwTransferLenght field with value during creating cbw
Signed-off-by: liuyi <liuyi@rock-chips.com>
2017-11-16 14:37:55 +08:00
liuyi
ae4252f085 wl to support sparse image
Signed-off-by: liuyi <liuyi@rock-chips.com>
2017-11-15 12:01:30 +08:00
Caesar Wang
1eeab6be5a rk303x: dd 99-rk-rockusb.rules to run tool without sudo
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
2017-11-06 11:06:27 +08:00
Klaus Goger
06ea143e09 cast emUsbType to uint when compared with uint
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>
2017-10-10 17:05:15 +02:00
Klaus Goger
35a265bc44 use rm instead of $(RM) for clean targets
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>
2017-10-10 17:05:15 +02:00
Klaus Goger
a39ebdde05 Set CPPFLAGS and LDFLAGS for OpenBSD
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>
2017-10-10 15:23:04 +02:00
Klaus Goger
288c61aa08 Search for iconv in configure script
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
2017-09-18 21:33:34 +02:00
Klaus Goger
08c0d21888 use strncmp to compare string literal
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>
2017-09-18 21:33:34 +02:00
Hans Yang
370700b5d3 Readme.txt: update the compile error help
Signed-off-by: Hans Yang <yhx@rock-chips.com>
2017-08-30 15:55:46 +08:00
liuyi
3dc7e3ce82 add pgpt command to list gpt info
Signed-off-by: liuyi <liuyi@rock-chips.com>
2017-08-08 09:09:09 +08:00
liuyi
6502326d4d solve the issue that erase flash doesn't work
Signed-off-by: liuyi <liuyi@rock-chips.com>
2017-08-07 17:43:59 +08:00
liuyi
6ae612bebc 1.add "wlx" command support flash image by name
2.flash sparse image by wlx command

Signed-off-by: liuyi <liuyi@rock-chips.com>
2017-08-07 14:39:06 +08:00
liuyi
c29e5f0fb3 1.correct grow partition size error
2.correct backup gpt error
3.add set fixed partition uuid function with parameter_gpt.txt

Signed-off-by: liuyi <liuyi@rock-chips.com>
2017-08-04 16:34:22 +08:00
liuyi
bc45532649 add 99-rk-rockusb.rules to run tool without sudo
Signed-off-by: liuyi <liuyi@rock-chips.com>
2017-08-02 14:52:40 +08:00
liuyi
b38fe5fc11 1. idblock support rc4flag in ul handler
2. cut off reset device in ul handler

Signed-off-by: liuyi <liuyi@rock-chips.com>
2017-08-02 10:06:45 +08:00
Eddie Cai
2404a38a33 Merge pull request #11 from afaerber/normal-color
Fix NORMAL_COLOR_ATTR definition
2017-05-16 09:09:56 +08:00
Eddie Cai
2b17a44a65 Merge pull request #12 from afaerber/error-msg
Prettify text output
2017-05-16 09:06:49 +08:00
Andreas Färber
9bc231bd38 Show usage on invalid command
Instead of instructing to re-run with -h, just show the usage help.

Signed-off-by: Andreas Färber <afaerber@suse.de>
2017-05-14 19:51:28 +02:00
Andreas Färber
32268622d4 Tweak text output
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>
2017-05-14 19:51:14 +02:00
Andreas Färber
3601cc0888 Fix NORMAL_COLOR_ATTR definition
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>
2017-05-14 18:11:47 +02:00
liuyi
e5ee8cc01e main: fix print 'failed to stat config.ini'error
Signed-off-by: liuyi <liuyi@rock-chips.com>
2017-04-25 09:20:40 +08:00
Eddie Cai
d71e8c2048 main: add tag u-boot spl command
Signed-off-by: Eddie Cai <eddie.cai.linux@gmail.com>
2017-04-18 11:12:05 +08:00
Kever Yang
055958c9e7 main: Do not reset device after ul command success
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
2017-04-18 10:25:58 +08:00
Eddie Cai
641cfa16d6 main: pack command support relative path
Signed-off-by: Eddie Cai <eddie.cai.linux@gmail.com>
2017-04-18 10:15:19 +08:00
Eddie Cai
bfb8da1907 RKLog: disable record log by default
Signed-off-by: Eddie Cai <eddie.cai.linux@gmail.com>
2017-04-18 10:13:25 +08:00
Eddie Cai
5823461aa3 boot_merger: modify default config file for boot merger
Signed-off-by: Eddie Cai <eddie.cai.linux@gmail.com>
2017-04-18 10:08:50 +08:00
Eddie Cai
78884ef4ba main: add pack and unpack boot loader support
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>
2017-04-17 18:42:08 +08:00
Eddie Cai
26edf85601 RKLog: print recorded log
print recorded log to make it easy to debug

Signed-off-by: Eddie Cai <eddie.cai.linux@gmail.com>
2017-04-17 08:37:26 +08:00
Eddie Cai
154ee062ef main: modify usage
modify usage to make it more readable

Signed-off-by: Eddie Cai <eddie.cai.linux@gmail.com>
2017-04-16 21:42:59 +08:00
Eddie Cai
8df2d64a80 main: support lower case command
people use lower case more than upper case. so we should support
lower case command

Signed-off-by: Eddie Cai <eddie.cai.linux@gmail.com>
2017-04-16 21:39:58 +08:00
Kever Yang
a8d2345885 gpt: add parameter sample file for gpt cmd
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>
2017-04-11 18:34:07 +08:00
Kever Yang
c30d921c26 main: update to version 1.2
- 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>
2017-04-11 18:21:54 +08:00
Eddie Cai
7a9a9fd691 readme: add dh-autoreconf to build environment
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>
2017-04-02 20:42:01 +08:00
Eddie Cai
24ffa9195c Merge pull request #5 from twoerner/contrib/twoerner/autotools-2
Contrib/twoerner/autotools 2
2017-04-02 20:39:57 +08:00
Trevor Woerner
3af06dfb26 main.cpp: take version information from autotool configuration
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>
2017-03-24 11:00:36 -04:00
Trevor Woerner
5b7562f2de update the build system to use autotools
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>
2017-03-24 11:00:36 -04:00
Eddie Cai
9908df895e main: fix write_lba fail
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>
2017-03-15 10:12:30 +08:00
Eddie Cai
92fb760b97 Readme: update readme file to meet the build process
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>
2017-03-09 15:30:37 +08:00
Eddie Cai
fd2aa7070a Makefile: fix build error when use preinstalled libusb and libudev
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>
2017-03-09 15:21:45 +08:00
liuyi
76af099afc rkDevelopTool: initial commit
Signed-off-by: liuyi <liuyi@rock-chips.com>
2017-03-07 16:12:52 +08:00