Issue with tar (Busybox 1.20.2): unknown file type
piquemal michel
michel_piquemal at yahoo.fr
Tue Jun 11 20:45:44 UTC 2013
Hi,
I'm building several different busybox 1.20.2 binaries with various applets, to be run onto a tiny MIPS embedded system.
(I'm cross compiling with aboriginal system images and assorted cross tools).
Busybox utils I build are setup from makeallnoconfig and then adding applets I want: they are therefore dynamically linked.
Applets I built so far are things like gzip, wget, find, cat, echo, du, ...
They all work as expected on my target.
I decided to do tar applet, with all its options.
It compiles, and work on my aboriginal system image, but fails on target with message "unknown file type".
I tried with tar options off: same issue.
I tried same config but static build: it works!
However I find the error message strange would my target really miss a library...
How to find which eventual one?
Would adding another magic applet/option solve the issue?
Any hint, suggestion to fix this, or alternative?
As my embedded system is really constrained in storage, I'd rather use dynamically linked version obviously.
I could not find a smaller option than tar/gzip under busybox to compress/expand directories and files.
I enclose strace output on the unstripped dynamically-linked binary.
Thanks!!
execve("/bin/busybox_unstripped", ["busybox_unstripped", "tar", "-cf", "toto.tar", "toto"], [/* 7 vars */]) = 0
old_mmap(NULL, 20, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2b0bd000
stat("/home/pp/5350-2.6.36/RT288x_SDK/source/romfs/etc/ld.so.cache", 0x7f8a8d90) = -1 ENOENT (No such file or directory)
open("/lib/libc.so.0", O_RDONLY) = 11
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2b0be000
read(11, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\10\0\1\0\0\0`\264\0\0004\0\0\0"..., 4096) = 4096
old_mmap(NULL, 655360, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2b0fe000
old_mmap(0x2b0fe000, 368148, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 11, 0) = 0x2b0fe000
old_mmap(0x2b197000, 7952, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 11, 0x59000) = 0x2b197000
old_mmap(0x2b199000, 17224, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x2b199000
close(11) = 0
munmap(0x2b0be000, 4096) = 0
mprotect(0x2b197000, 4096, PROT_READ) = 0
mprotect(0x2b0fc000, 4096, PROT_READ) = 0
ioctl(0, TIOCNXCL, {B38400 opost isig icanon echo ...}) = 0
ioctl(1, TIOCNXCL, 0x7f8a8d70) = -1 ENOTTY (Inappropriate ioctl for device)
brk(0) = 0x450000
brk(0x451000) = 0x451000
getuid() = 0
open("toto.tar", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 11
fstat(11, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
lstat("toto", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
open("/etc/passwd", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/etc/group", O_RDONLY) = -1 ENOENT (No such file or directory)
write(2, "tar: toto: unknown file type\n", 29tar: toto: unknown file type
) = 29
write(11, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 1024) = 1024
close(11) = 0
write(2, "tar: error exit delayed from pre"..., 45tar: error exit delayed from previous errors
) = 45
exit(1) = ?
+++ exited with 1 +++
More information about the busybox
mailing list