-
-
使用firmware-mod-kit的一个问题
-
发表于: 2018-10-18 20:43 6862
-
root@richard-virtual-machine:~/firmware-mod-kit# cd ..
root@richard-virtual-machine:~# /firmware-mod-kit/extract-firmware.sh dir300.binbash: /firmware-mod-kit/extract-firmware.sh: 没有那个文件或目录
root@richard-virtual-machine:~# ~/firmware-mod-kit/extract-firmware.sh dir300.bin
Firmware Mod Kit (extract) 0.99, (c)2011-2013 Craig Heffner, Jeremy Collake
Preparing tools ...
bff_huffman_decompress.c: In function ‘unpack_parse_header’:
bff_huffman_decompress.c:167:14: warning: implicit declaration of function ‘read’ [-Wimplicit-function-declaration]
bytesread = read(in, hdr + prelen, PACK_HEADER_LENGTH - prelen);
^
bff_huffman_decompress.c: In function ‘unpack’:
bff_huffman_decompress.c:318:22: warning: implicit declaration of function ‘dup’ [-Wimplicit-function-declaration]
unpack_parse_header(dup(in), dup(out), pre, prelen, bytes_in, &unpackd);
^
uncramfs.c: In function ‘usage’:
uncramfs.c:72:4: warning: implicit declaration of function ‘exit’ [-Wimplicit-function-declaration]
exit(1);
^
uncramfs.c:72:4: warning: incompatible implicit declaration of built-in function ‘exit’
uncramfs.c:72:4: note: include ‘<stdlib.h>’ or provide a declaration of ‘exit’
uncramfs.c: In function ‘do_file’:
uncramfs.c:231:28: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
srcdata=(const u8)(((u32)(base+offset)+blksize-1) & ~(blksize-1));
^
uncramfs.c:231:15: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
srcdata=(const u8)(((u32)(base+offset)+blksize-1) & ~(blksize-1));
^
uncramfs.c: In function ‘do_symlink’:
uncramfs.c:315:7: warning: incompatible implicit declaration of built-in function ‘exit’
exit(1);
^
uncramfs.c:315:7: note: include ‘<stdlib.h>’ or provide a declaration of ‘exit’
uncramfs.c: In function ‘main’:
uncramfs.c:696:3: warning: incompatible implicit declaration of built-in function ‘exit’
exit(1);
^
uncramfs.c:696:3: note: include ‘<stdlib.h>’ or provide a declaration of ‘exit’
uncramfs.c:703:7: warning: incompatible implicit declaration of built-in function ‘exit’
exit(1);
^
uncramfs.c:703:7: note: include ‘<stdlib.h>’ or provide a declaration of ‘exit’
uncramfs.c:712:7: warning: incompatible implicit declaration of built-in function ‘exit’
exit(1);
^
uncramfs.c:712:7: note: include ‘<stdlib.h>’ or provide a declaration of ‘exit’
uncramfs.c:720:7: warning: incompatible implicit declaration of built-in function ‘exit’
exit(1);
^
uncramfs.c:720:7: note: include ‘<stdlib.h>’ or provide a declaration of ‘exit’
uncramfs.c:727:11: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 2 has type ‘size_t {aka long unsigned int}’ [-Wformat=]
printf("[Volume size: 0x%x]\n", fslen_ub);
^
LzmaTest.c: In function ‘main’:
LzmaTest.c:238:10: warning: format not a string literal and no format arguments [-Wformat-security]
printf(sz);
^
decode.c: In function ‘lzma_decode’:
decode.c:127:41: warning: pointer targets in passing argument 10 of ‘LzmaDecode’ differ in signedness [-Wpointer-sign]
(u8 )src, srclen, (u8 )dst, out_len, &dstlen);
^
In file included from decode.c:51:0:
LzmaDecode.h:86:5: note: expected ‘unsigned int ’ but argument is of type ‘int ’
int LzmaDecode(
^
mkcramfs.c: In function ‘parse_directory’:
mkcramfs.c:245:40: warning: passing argument 4 of ‘scandir’ from incompatible pointer type [-Wincompatible-pointer-types]
dircount = scandir(name, &dirlist, 0, cramsort);
^
In file included from mkcramfs.c:31:0:
/usr/include/dirent.h:254:12: note: expected ‘int ()(const struct dirent , const struct dirent )’ but argument is of type ‘int ()(const void , const void )’
extern int scandir (const char restrict dir,
^
mkcramfs.c:287:15: warning: pointer targets in assignment differ in signedness [-Wpointer-sign]
entry->name = strdup(dirent->d_name);
^
mkcramfs.c: In function ‘write_superblock’:
mkcramfs.c:399:11: warning: pointer targets in passing argument 1 of ‘strncpy’ differ in signedness [-Wpointer-sign]
strncpy(super->name, opt_name, sizeof(super->name));
^
In file included from /usr/include/features.h:364:0,
from /usr/include/x86_64-linux-gnu/sys/types.h:25,
from mkcramfs.c:25:
/usr/include/x86_64-linux-gnu/bits/string3.h:123:1: note: expected ‘char restrict’ but argument is of type ‘u8 {aka unsigned char }’
NTH (strncpy (char *restrict dest, const char *restrict src,
^
mkcramfs.c:401:11: warning: pointer targets in passing argument 1 of ‘strncpy’ differ in signedness [-Wpointer-sign]
strncpy(super->name, "Compressed", sizeof(super->name));
^
In file included from /usr/include/features.h:364:0,
from /usr/include/x86_64-linux-gnu/sys/types.h:25,
from mkcramfs.c:25:
/usr/include/x86_64-linux-gnu/bits/string3.h:123:1: note: expected ‘char restrict’ but argument is of type ‘u8 {aka unsigned char *}’
NTH (strncpy (char restrict dest, const char restrict src,
^
mkcramfs.c: In function ‘write_directory_structure’:
mkcramfs.c:480:24: warning: pointer targets in passing argument 1 of ‘strlen’ differ in signedness [-Wpointer-sign]
size_t len = strlen(entry->name);
^
In file included from mkcramfs.c:34:0:
/usr/include/string.h:398:15: note: expected ‘const char ’ but argument is of type ‘unsigned char ’
extern size_t strlen (const char __s)
^
mkcramfs.c: In function ‘do_compress’:
mkcramfs.c:598:20: warning: pointer targets in passing argument 1 of ‘compress2’ differ in signedness [-Wpointer-sign]
err = compress2(base + curr, &len, uncompressed, input, Z_BEST_COMPRESSION);
^
In file included from mkcramfs.c:37:0:
/usr/include/zlib.h:1174:21: note: expected ‘Bytef {aka unsigned char }’ but argument is of type ‘char ’
ZEXTERN int ZEXPORT compress2 OF((Bytef dest, uLongf destLen,
^
mkcramfs.c:598:39: warning: pointer targets in passing argument 3 of ‘compress2’ differ in signedness [-Wpointer-sign]
err = compress2(base + curr, &len, uncompressed, input, Z_BEST_COMPRESSION);
^
In file included from mkcramfs.c:37:0:
/usr/include/zlib.h:1174:21: note: expected ‘const Bytef {aka const unsigned char }’ but argument is of type ‘char ’
ZEXTERN int ZEXPORT compress2 OF((Bytef dest, uLongf destLen,
^
mkcramfs.c: In function ‘write_data’:
mkcramfs.c:647:40: warning: pointer targets in passing argument 3 of ‘do_compress’ differ in signedness [-Wpointer-sign]
offset = do_compress(base, offset, entry->name, entry->uncompressed, entry-
^
mkcramfs.c:578:21: note: expected ‘const char ’ but argument is of type ‘unsigned char ’
static unsigned int do_compress(char base, unsigned int offset, char const na
^
mkcramfs.c: In function ‘main’:
mkcramfs.c:771:4: warning: format ‘%Ld’ expects argument of type ‘long long int’, but argument 3 has type ‘loff_t {aka long int}’ [-Wformat=]
"warning: estimate of required size (upper bound) is %LdMB, but maximum imag
^
mkcramfs.c:810:9: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘ssize_t {aka long int}’ [-Wformat=]
printf("Directory data: %d bytes\n", offset);
^
mkcramfs.c:817:9: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘ssize_t {aka long int}’ [-Wformat=]
printf("Everything: %d kilobytes\n", offset >> 10);
^
mkcramfs.c:821:9: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘long unsigned int’ [-Wformat=]
printf("Super block: %d bytes\n", sizeof(struct cramfs_super));
^
mkcramfs.c:825:19: warning: pointer targets in passing argument 2 of ‘crc32’ differ in signedness [-Wpointer-sign]
crc = crc32(crc, (rom_image+opt_pad), (offset-opt_pad));
^
In file included from mkcramfs.c:37:0:
/usr/include/zlib.h:1600:23: note: expected ‘const Bytef {aka const unsigned char }’ but argument is of type ‘char ’
ZEXTERN uLong ZEXPORT crc32 OF((uLong crc, const Bytef buf, uInt len));
^
cramfsck.c: In function ‘test_crc’:
cramfsck.c:224:4: warning: ignoring return value of ‘read’, declared with attribute warn_unused_result [-Wunused-result]
read(fd, buf, super.size);
^
cramfsck.c: In function ‘romfs_read’:
cramfsck.c:294:3: warning: ignoring return value of ‘read’, declared with attribute warn_unused_result [-Wunused-result]
read(fd, read_buffer, ROMBUFFERSIZE 2);
^
cramfsck.c: In function ‘do_symlink’:
cramfsck.c:553:3: warning: ignoring return value of ‘asprintf’, declared with attribute warn_unused_result [-Wunused-result]
asprintf(&str, "%s -> %s", path, outbuffer);
^
cramfsswap.c: In function ‘main’:
cramfsswap.c:112:3: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
write(outfile, &superblock_out, sizeof(superblock_out));
^
cramfsswap.c:242:5: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
write(outfile, &inode_out, sizeof(inode_out));
^
cramfsswap.c:250:5: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
write(outfile, &buffer, inode.namelen<<2);
^
cramfsswap.c:302:7: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
write(outfile, &blockpointer_out, 4);
^
cramfsswap.c:328:7: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
write(outfile, &buffer, readbytes);
^
cramfsswap.c:341:5: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
write(outfile, &buffer, readbytes);
^
mksquashfs.c: In function ‘dir_scan’:
mksquashfs.c:51:51: warning: format ‘%Ld’ expects argument of type ‘long long int’, but argument 3 has type ‘__off_t {aka long int}’ [-Wformat=]
#define INFO(s, args...) do { if(!silent) printf("mksquashfs: "s, ## args); }
^
mksquashfs.c:1444:6: note: in expansion of macro ‘INFO’
INFO("file %s, uncompressed size %Ld bytes, %s\n", filename, buf.st_size,
^
mksquashfs.c: In function ‘write_file’:
mksquashfs.c:1170:5: warning: ignoring return value of ‘ftruncate’, declared with attribute warn_unused_result [-Wunused-result]
ftruncate(fd, bytes);
^
../LZMA/LZMADecoder.cpp: In member function ‘virtual LONG NCompress::NLZMA::CDecoder::SetOutStreamSize(const UInt64)’:
../LZMA/LZMADecoder.cpp:317:42: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
if (_outSizeDefined = (outSize != NULL))
^
../LZMA/LZMAEncoder.cpp: In member function ‘LONG NCompress::NLZMA::CEncoder::GetOptimumFast(UInt32, UInt32&, UInt32&)’:
../LZMA/LZMAEncoder.cpp:1139:45: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses]
repLens[repMaxIndex] + 2 >= lenMain && (backMain > (1<<12)))
^
../LZMA/LZMAEncoder.cpp:1154:44: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses]
_longestMatchLength == lenMain + 1 &&
^
../LZMA/LZMAEncoder.cpp:1157:60: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses]
_longestMatchLength + 1 >= lenMain && lenMain >= 3 &&
^
ar: 正在创建 liblzma.a
unsquashfs.c: In function ‘create_inode’:
unsquashfs.c:559:11: warning: too many arguments for format [-Wformat-extra-args]
ERROR("create_inode: could not create %s device %s, because you're not supe
^
unsquashfs.c:62:23: note: in definition of macro ‘ERROR’
fprintf(stderr, s, ## args); \
^
unsquashfs.c: In function ‘create_inode’:
unsquashfs.c:560:11: warning: too many arguments for format [-Wformat-extra-args]
ERROR("create_inode: could not create %s device %s, because you're not supe
^
unsquashfs.c:62:23: note: in definition of macro ‘ERROR’
fprintf(stderr, s, ## args); \
^
mksquashfs.c: In function ‘write_file’:
mksquashfs.c:111:22: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 3 has type ‘int’ [-Wformat=]
fprintf(stderr, "FATAL ERROR:" s, ##args);\
^
mksquashfs.c:1232:5: note: in expansion of macro ‘BAD_ERROR’
BAD_ERROR("Out of memory allocating write_file buffer, could not allocate %
^
mksquashfs.c: In function ‘dir_scan’:
mksquashfs.c:1590:2: warning: implicit declaration of function ‘dir_scan2’ [-Wimplicit-function-declaration]
dir_scan2(inode, dir_info);
^
mksquashfs.c: In function ‘dir_scan2’:
mksquashfs.c:98:14: warning: format ‘%lld’ expects argument of type ‘long long int’, but argument 3 has type ‘off_t {aka long int}’ [-Wformat=]
printf("mksquashfs: "s, ## args);\
^
mksquashfs.c:1660:6: note: in expansion of macro ‘INFO’
INFO("file %s, uncompressed size %lld bytes %s\n", filename, buf->st_size,
^
mksquashfs.c:98:14: warning: format ‘%lld’ expects argument of type ‘long long int’, but argument 3 has type ‘off_t {aka long int}’ [-Wformat=]
printf("mksquashfs: "s, ## args);\
^
mksquashfs.c:1716:7: note: in expansion of macro ‘INFO’
INFO("file %s, uncompressed size %lld bytes LINK\n", filename, buf->st_si
^
mksquashfs.c: In function ‘write_file’:
mksquashfs.c:1270:5: warning: ignoring return value of ‘ftruncate’, declared with attribute warn_unused_result [-Wunused-result]
ftruncate(fd, bytes);
^
sort.c: In function ‘sort_files_and_write’:
sort.c:50:26: warning: format ‘%lld’ expects argument of type ‘long long int’, but argument 3 has type ‘off_t {aka long int}’ [-Wformat=]
if(!silent) printf("mksquashfs: "s, ## args); \
^
sort.c:246:6: note: in expansion of macro ‘INFO’
INFO("file %s, uncompressed size %lld bytes %s\n",
^
sort.c:50:26: warning: format ‘%lld’ expects argument of type ‘long long int’, but argument 3 has type ‘off_t {aka long int}’ [-Wformat=]
if(!silent) printf("mksquashfs: "s, ## args); \
^
sort.c:254:5: note: in expansion of macro ‘INFO’
INFO("file %s, uncompressed size %lld bytes LINK\n",
^
ZLib.cpp: In function ‘void brute(void)’:
ZLib.cpp:334:5: warning: unused variable ‘ret’ [-Wunused-variable]
int ret = compress2_lzma_test(test2,&test3len,testsource,testsourcelen,testlev
^
../LZMA/LZMADecoder.cpp: In member function ‘virtual LONG NCompress::NLZMA::CDecoder::SetOutStreamSize(const UInt64)’:
../LZMA/LZMADecoder.cpp:317:42: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
if (_outSizeDefined = (outSize != NULL))
^
../LZMA/LZMAEncoder.cpp: In member function ‘LONG NCompress::NLZMA::CEncoder::GetOptimumFast(UInt32, UInt32&, UInt32&)’:
../LZMA/LZMAEncoder.cpp:1141:45: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses]
repLens[repMaxIndex] + 2 >= lenMain && (backMain > (1<<12)))
^
../LZMA/LZMAEncoder.cpp:1156:44: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses]
_longestMatchLength == lenMain + 1 &&
^
../LZMA/LZMAEncoder.cpp:1159:60: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses]
_longestMatchLength + 1 >= lenMain && lenMain >= 3 &&
^
ar: 正在创建 liblzma.a
wrt54gv5_img.cpp:76:1: warning: deprecated conversion from string constant to ‘char’ [-Wwrite-strings]
};
^
wrt54gv5_img.cpp:76:1: warning: deprecated conversion from string constant to ‘char’ [-Wwrite-strings]
wrt54gv5_img.cpp:76:1: warning: deprecated conversion from string constant to ‘char’ [-Wwrite-strings]
wrt54gv5_img.cpp:83:1: warning: deprecated conversion from string constant to ‘char’ [-Wwrite-strings]
};
^
wrt54gv5_img.cpp:83:1: warning: deprecated conversion from string constant to ‘char’ [-Wwrite-strings]
wrt54gv5_img.cpp:83:1: warning: deprecated conversion from string constant to ‘char’ [-Wwrite-strings]
wrt54gv5_img.cpp:90:1: warning: deprecated conversion from string constant to ‘char’ [-Wwrite-strings]
};
^
wrt54gv5_img.cpp:90:1: warning: deprecated conversion from string constant to ‘char’ [-Wwrite-strings]
wrt54gv5_img.cpp:90:1: warning: deprecated conversion from string constant to ‘char’ [-Wwrite-strings]
wrt54gv5_img.cpp:97:1: warning: deprecated conversion from string constant to ‘char’ [-Wwrite-strings]
};
^
wrt54gv5_img.cpp:97:1: warning: deprecated conversion from string constant to ‘char’ [-Wwrite-strings]
wrt54gv5_img.cpp:97:1: warning: deprecated conversion from string constant to ‘char’ [-Wwrite-strings]
wrt54gv5_img.cpp: In function ‘bool SanityChecks()’:
wrt54gv5_img.cpp:176:113: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘long unsigned int’ [-Wformat=]
tion is incorrect .. %d (%X)",sizeof(VxLinksysHeader),sizeof(VxLinksysHeader));
^
wrt54gv5_img.cpp:176:113: warning: format ‘%X’ expects argument of type ‘unsigned int’, but argument 3 has type ‘long unsigned int’ [-Wformat=]
wrt54gv5_img.cpp: In function ‘int BuildImage(std::vector<std::__cxx11::basic_string<char> >&, const char, char, char, char)’:
wrt54gv5_img.cpp:304:72: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘long unsigned int’ [-Wformat=]
printf("\n + Size of %s is %d bytes.", vInputFiles[nI].c_str(), nSize);
^
wrt54gv5_img.cpp:311:66: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘long unsigned int’ [-Wformat=]
printf("\n Padding will be %d bytes in length.", nDifference);
^
wrt54gv5_img.cpp:404:65: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘long unsigned int’ [-Wformat=]
printf("\n + Padding bootrom.bin with %d bytes", nDifference);
^
wrt54gv5_img.cpp:417:100: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘long unsigned int’ [-Wformat=]
with file type %d (%s)", big_endian_l(pFileDescriptor->nFileId_BigEnd),szName);
^
wrt54gv5_img.cpp:431:72: warning: format ‘%X’ expects argument of type ‘unsigned int’, but argument 2 has type ‘long unsigned int’ [-Wformat=]
printf("\n + Checksum is %08X", big_endian_l(pHeader->nChecksumBigEnd));
^
wrt54gv5_img.cpp:440:55: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘long unsigned int’ [-Wformat=]
printf("\n Firmware size is %d bytes.", nFirmwareSize);
^
wrt54gv5_img.cpp: In function ‘int ExtractImage(const char, const char, bool)’:
wrt54gv5_img.cpp:496:54: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘long int’ [-Wformat=]
printf("\n Firmare file size is %d bytes", nFilesize);
^
wrt54gv5_img.cpp:542:55: warning: format ‘%X’ expects argument of type ‘unsigned int’, but argument 8 has type ‘long unsigned int’ [-Wformat=]
nChecksum==nCalculatedChecksum?"CORRECT":"INCORRECT");
^
wrt54gv5_img.cpp:542:55: warning: format ‘%X’ expects argument of type ‘unsigned int’, but argument 9 has type ‘long unsigned int’ [-Wformat=]
wrt54gv5_img.cpp:561:17: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘long unsigned int’ [-Wformat=]
nIntFilesize);
^
wrt54gv5_img.cpp:561:17: warning: format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘long unsigned int’ [-Wformat=]
wrt54gv5_img.cpp:597:16: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘long unsigned int’ [-Wformat=]
nIntFilesize);
^
wrt54gv5_img.cpp:597:16: warning: format ‘%d’ expects argument of type ‘int’, but argument 5 has type ‘long unsigned int’ [-Wformat=]
wrt54gv5_img.cpp: In function ‘int FixImage(const char)’:
wrt54gv5_img.cpp:653:82: warning: format ‘%X’ expects argument of type ‘unsigned int’, but argument 2 has type ‘long unsigned int’ [-Wformat=]
ntf("\n Original checksum was 0x%08X", big_endian_l(pHeader->nChecksumBigEnd));
^
wrt54gv5_img.cpp:658:82: warning: format ‘%X’ expects argument of type ‘unsigned int’, but argument 2 has type ‘long unsigned int’ [-Wformat=]
ntf("\n New checksum is 0x%08X", big_endian_l(pHeader->nChecksumBigEnd));
^
wrt54gv5_img.cpp: In function ‘int ExtractImage(const char, const char, bool)’:
wrt54gv5_img.cpp:499:43: warning: ignoring return value of ‘size_t fread(void, size_t, size_t, FILE)’, declared with attribute warn_unused_result [-Wunused-result]
fread((void )&buffer[0],1,nFilesize,fIn);
^
In file included from /usr/include/string.h:639:0,
from /usr/include/c++/5/cstring:42,
from wrt54gv5_img.cpp:42:
In function ‘char strcpy(char, const char)’,
inlined from ‘int BuildImage(std::vector<std::__cxx11::basic_string<char> >&, const char, char, char, char)’ at wrt54gv5_img.cpp:334:54:
/usr/include/x86_64-linux-gnu/bits/string3.h:110:63: warning: call to void builtin_memcpy_chk(void, const void, long unsigned int, long unsigned int) will always overflow destination buffer
return builtin_strcpy_chk (dest, src, bos (dest));
^
mksquashfs.c: In function ‘dir_scan’:
mksquashfs.c:63:51: warning: format ‘%lld’ expects argument of type ‘long long int’, but argument 3 has type ‘__off_t {aka long int}’ [-Wformat=]
#define INFO(s, args...) do { if(!silent) printf("mksquashfs: "s, ## args); }
^
mksquashfs.c:1532:6: note: in expansion of macro ‘INFO’
INFO("file %s, uncompressed size %lld bytes, %s\n", filename, buf.st_size,
^
ar: 正在创建 liblzma.a
mksquashfs.o:在函数‘linux_opendir’中:
/root/firmware-mod-kit/src/others/squashfs-2.2-r2-7z/mksquashfs.c:1384:对‘add_dir_entry’未定义的引用
mksquashfs.o:在函数‘encomp_opendir’中:
/root/firmware-mod-kit/src/others/squashfs-2.2-r2-7z/mksquashfs.c:1399:对‘add_dir_entry’未定义的引用
/root/firmware-mod-kit/src/others/squashfs-2.2-r2-7z/mksquashfs.c:1416:对‘add_dir_entry’未定义的引用
mksquashfs.o:在函数‘single_opendir’中:
/root/firmware-mod-kit/src/others/squashfs-2.2-r2-7z/mksquashfs.c:1431:对‘add_dir_entry’未定义的引用
/root/firmware-mod-kit/src/others/squashfs-2.2-r2-7z/mksquashfs.c:1451:对‘add_dir_entry’未定义的引用
collect2: error: ld returned 1 exit status
Makefile:18: recipe for target 'mksquashfs' failed
make[2]: [mksquashfs] Error 1
Makefile:2: recipe for target 'all' failed
make[1]: [all] Error 2
Makefile:7: recipe for target 'all' failed
make: * [all] Error 2
Tools build failed! Check pre-requisites. Quitting..
如上所示,在使用firmware-mod-kit的过程中碰到这么一个问题,不知道有没有人也遇到过类似问题,怎么解决的(注:我已经在网上查了,貌似没有发现比较好的解决办法)
makefile文件如下:
root@richard-virtual-machine:~/firmware-mod-kit/src/others# cat Makefile
all:
make -C ./squashfs-2.2-r2-7z
make -C ./squashfs-3.0-e2100
make -C ./squashfs-3.2-r2
make -C ./squashfs-3.2-r2-lzma
make -C ./squashfs-3.2-r2-hg612-lzma
make -C ./squashfs-3.2-r2-wnr1000
make -C ./squashfs-3.2-r2-rtn12
make -C ./squashfs-3.3
make -C ./squashfs-3.3-lzma
make -C ./squashfs-3.3-grml-lzma
make -C ./squashfs-3.4-cisco
make -C ./squashfs-3.4-nb4
make -C ./squashfs-4.0-lzma
make -C ./squashfs-4.0-realtek
make -C ./squashfs-2.0-nb4
make -C ./squashfs-4.2
make -C ./squashfs-4.2-official
make -C ./squashfs-4.3
clean:
make -C ./squashfs-2.2-r2-7z
make -C ./squashfs-3.0-e2100 clean
make -C ./squashfs-3.2-r2 clean
make -C ./squashfs-3.2-r2-lzma clean
make -C ./squashfs-3.2-r2-hg612-lzma clean
make -C ./squashfs-3.2-r2-wnr1000 clean
make -C ./squashfs-3.2-r2-rtn12 clean
make -C ./squashfs-3.3 clean
make -C ./squashfs-3.3-lzma clean
make -C ./squashfs-3.3-grml-lzma clean
make -C ./squashfs-3.4-cisco clean
make -C ./squashfs-3.4-nb4 clean
make -C ./squashfs-4.0-lzma clean
make -C ./squashfs-4.0-realtek clean
make -C ./squashfs-2.0-nb4 clean
make -C ./squashfs-4.2 clean
make -C ./squashfs-4.2-official clean
[注意]传递专业知识、拓宽行业人脉——看雪讲师团队等你加入!