設置 | 登錄 | 註冊

目前共有13篇帖子。

xp系统下在cygwin中编译瑞芯微rkdeveloptool

1樓 巨大八爪鱼 2025-4-18 18:34
Oct1158@xpsp3-bh8f7e0 /cygdrive/f/Projects/rkdeveloptool
$ aclocal

Oct1158@xpsp3-bh8f7e0 /cygdrive/f/Projects/rkdeveloptool
$ autoreconf -i
Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/\${ <-- HERE ([^ \t=:+{}]+)}/ at /usr/bin/automake-1.14 line 3930.
configure.ac:12: installing 'cfg/compile'
configure.ac:19: installing 'cfg/config.guess'
configure.ac:19: installing 'cfg/config.sub'
configure.ac:7: installing 'cfg/install-sh'
configure.ac:7: installing 'cfg/missing'
Makefile.am: installing 'cfg/depcomp'

Oct1158@xpsp3-bh8f7e0 /cygdrive/f/Projects/rkdeveloptool
$ autoheader

Oct1158@xpsp3-bh8f7e0 /cygdrive/f/Projects/rkdeveloptool
$ automake --add-missing
Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/\${ <-- HERE ([^ \t=:+{}]+)}/ at /usr/bin/automake-1.14 line 3930.

Oct1158@xpsp3-bh8f7e0 /cygdrive/f/Projects/rkdeveloptool
$ ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for style of include used by make... GNU
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.exe
checking for suffix of executables... .exe
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking dependency style of gcc... gcc3
checking how to run the C preprocessor... gcc -E
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking how to run the C++ preprocessor... g++ -E
checking whether make sets $(MAKE)... (cached) yes
checking whether ln -s works... yes
checking build system type... i686-pc-cygwin
checking host system type... i686-pc-cygwin
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for LIBUSB1... yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating cfg/config.h
config.status: executing depfiles commands

Oct1158@xpsp3-bh8f7e0 /cygdrive/f/Projects/rkdeveloptool
$

2樓 巨大八爪鱼 2025-4-18 18:35
3樓 巨大八爪鱼 2025-4-18 18:39
修改文件:
RKDevice.h
注释掉
//#define PAGE_SIZE 2048

DefineHeader.h
注释掉
/*#ifndef __MINGW32__
typedef unsigned char BYTE, *PBYTE;
typedef unsigned char UCHAR;
typedef unsigned short WCHAR;
typedef unsigned short USHORT;
typedef unsigned int    UINT;
typedef unsigned int    DWORD;
#endif*/
巨大八爪鱼直接注释掉#define PAGE_SIZE 2048感觉不太好,取消注释并在前面加上#undef PAGE_SIZE更好。
4樓 巨大八爪鱼 2025-4-18 18:40
Oct1158@xpsp3-bh8f7e0 /cygdrive/f/Projects/rkdeveloptool
$ make
make[1]: 进入目录“/cygdrive/f/Projects/rkdeveloptool”
g++ -DHAVE_CONFIG_H -I. -I./cfg  -Wall -Werror -Wextra -Wreturn-type -fno-strict-aliasing -D_FILE_OFFSET_BITS=64 -D_LARGE_FILE -I/usr/include/libusb-1.0   -g -O2 -MT main.o -MD -MP -MF .deps/main.Tpo -c -o main.o main.cpp
mv -f .deps/main.Tpo .deps/main.Po
g++ -DHAVE_CONFIG_H -I. -I./cfg  -Wall -Werror -Wextra -Wreturn-type -fno-strict-aliasing -D_FILE_OFFSET_BITS=64 -D_LARGE_FILE -I/usr/include/libusb-1.0   -g -O2 -MT crc.o -MD -MP -MF .deps/crc.Tpo -c -o crc.o crc.cpp
mv -f .deps/crc.Tpo .deps/crc.Po
g++ -DHAVE_CONFIG_H -I. -I./cfg  -Wall -Werror -Wextra -Wreturn-type -fno-strict-aliasing -D_FILE_OFFSET_BITS=64 -D_LARGE_FILE -I/usr/include/libusb-1.0   -g -O2 -MT RKBoot.o -MD -MP -MF .deps/RKBoot.Tpo -c -o RKBoot.o RKBoot.cpp
mv -f .deps/RKBoot.Tpo .deps/RKBoot.Po
g++ -DHAVE_CONFIG_H -I. -I./cfg  -Wall -Werror -Wextra -Wreturn-type -fno-strict-aliasing -D_FILE_OFFSET_BITS=64 -D_LARGE_FILE -I/usr/include/libusb-1.0   -g -O2 -MT RKComm.o -MD -MP -MF .deps/RKComm.Tpo -c -o RKComm.o RKComm.cpp
mv -f .deps/RKComm.Tpo .deps/RKComm.Po
g++ -DHAVE_CONFIG_H -I. -I./cfg  -Wall -Werror -Wextra -Wreturn-type -fno-strict-aliasing -D_FILE_OFFSET_BITS=64 -D_LARGE_FILE -I/usr/include/libusb-1.0   -g -O2 -MT RKDevice.o -MD -MP -MF .deps/RKDevice.Tpo -c -o RKDevice.o RKDevice.cpp
mv -f .deps/RKDevice.Tpo .deps/RKDevice.Po
g++ -DHAVE_CONFIG_H -I. -I./cfg  -Wall -Werror -Wextra -Wreturn-type -fno-strict-aliasing -D_FILE_OFFSET_BITS=64 -D_LARGE_FILE -I/usr/include/libusb-1.0   -g -O2 -MT RKImage.o -MD -MP -MF .deps/RKImage.Tpo -c -o RKImage.o RKImage.cpp
mv -f .deps/RKImage.Tpo .deps/RKImage.Po
g++ -DHAVE_CONFIG_H -I. -I./cfg  -Wall -Werror -Wextra -Wreturn-type -fno-strict-aliasing -D_FILE_OFFSET_BITS=64 -D_LARGE_FILE -I/usr/include/libusb-1.0   -g -O2 -MT RKLog.o -MD -MP -MF .deps/RKLog.Tpo -c -o RKLog.o RKLog.cpp
mv -f .deps/RKLog.Tpo .deps/RKLog.Po
g++ -DHAVE_CONFIG_H -I. -I./cfg  -Wall -Werror -Wextra -Wreturn-type -fno-strict-aliasing -D_FILE_OFFSET_BITS=64 -D_LARGE_FILE -I/usr/include/libusb-1.0   -g -O2 -MT RKScan.o -MD -MP -MF .deps/RKScan.Tpo -c -o RKScan.o RKScan.cpp
mv -f .deps/RKScan.Tpo .deps/RKScan.Po
g++  -g -O2   -o rkdeveloptool.exe main.o crc.o RKBoot.o RKComm.o RKDevice.o RKImage.o RKLog.o RKScan.o -lusb-1.0
make[1]: 离开目录“/cygdrive/f/Projects/rkdeveloptool”

Oct1158@xpsp3-bh8f7e0 /cygdrive/f/Projects/rkdeveloptool
$

可以make成功。
5樓 巨大八爪鱼 2025-4-18 18:40
编译出来了rkdeveloptool.exe。
6樓 巨大八爪鱼 2025-4-18 18:46
把C:\cygwin\bin里面的
cyggcc_s-1.dll
cygstdc++-6.dll
cygusb-1.0.dll
cygwin1.dll
复制到rkdeveloptool.exe所在目录,就可以成功运行编译出来的rkdeveloptool.exe了。
7樓 巨大八爪鱼 2025-4-18 18:47
8樓 巨大八爪鱼 2025-4-18 18:50
版本信息:
commit 304f073752fd25c854e1bcf05d8e7f925b1f4e14
Merge: 87d4df5 554066a
Author: shineseth-rk <yi.liu@rock-chips.com>
Date:   Fri Mar 7 15:34:30 2025 +0800

    Merge pull request #106 from amouiche/master

    Add the capability to change the storage (eMMC, SD, SPINOR...).
9樓 巨大八爪鱼 2025-4-18 18:50
10樓 巨大八爪鱼 2025-4-18 19:02

內容轉換:

回覆帖子
內容:
用戶名: 您目前是匿名發表。
驗證碼:
看不清?換一張
©2010-2025 Purasbar Ver3.0 [手機版] [桌面版]
除非另有聲明,本站採用知識共享署名-相同方式共享 3.0 Unported許可協議進行許可。