2009-05-19 13:55:15 user/mtd-utils/mkfs.jffs2 compile error
Steven Vacca (UNITED STATES)
Message: 74277
I am getting an error when the make is executing mkfs.jffs2 in the
following output, which is almost at the very end of the entire make session.
.
.
.
/home/smv/blackfin/uClinux/user/mtd-utils/mkfs.jffs2 -l -p -d /home/smv/blackfin/uClinux/romfs -D device_table-min.txt
-o /home/smv/blackfin/uClinux/images/rootfs.jffs2
/home/smv/blackfin/uClinux/user/mtd-utils/mkfs.jffs2: 1: Syntax error: word unexpected (expecting ")")
make[3]: *** [image.rootfs.jffs2.force] Error 2
My Linux ver is 2.6.28.10-ADI-2009R1-pre-svn6346.
I get the same Syntax error msg even if I truncate the line to:
/home/smv/blackfin/uClinux/user/mtd-utils/mkfs.jffs2
I had no problems when using the previous Linux version, 2.6.22.19-ADI-2008R1.5-svn
Thanks,
Steven
QuoteReplyEditDelete
2009-05-19 15:04:55 Re: user/mtd-utils/mkfs.jffs2 compile error
Steven Vacca (UNITED STATES)
Message: 74283
Also,
The ToolChain and the uClinux-dist were both downloaded from the trunk at the same time, so they should be the most recent.
Steven
QuoteReplyEditDelete
2009-05-19 18:15:25 Re: user/mtd-utils/mkfs.jffs2 compile error
Mike Frysinger (UNITED STATES)
Message: 74289
that indicates the file is corrupt
try running:
make user/mtd-utils_{clean,only}
QuoteReplyEditDelete
2009-05-21 10:15:04 Re: user/mtd-utils/mkfs.jffs2 compile error
Steven Vacca (UNITED STATES)
Message: 74413
I re-made user/mtd-utils and still got exactly the same error.
So, I re-downloaded the latest trunk svn toolchain (rev 3393) and uclinux-dist (rev 6427).
I then built the toolchain.
Then, I only changed (1) the default menuconfig by changing the Product to
BF537-STAMP in the Vendor/Product Selection section, then, (2) in the Linux Kernel
Configuration|File systems|Miscellaneous filesystems, I enabled changed
Journalling Flash File System v2 (JFFS2) support from <M> to <*>.
Then I compiled uclinux-dist. Still get the same error.
BTW, my Host dev Linux is Ubuntu, if that makes any difference.
Steven
QuoteReplyEditDelete
2009-05-21 10:32:13 Re: user/mtd-utils/mkfs.jffs2 compile error
Steven Vacca (UNITED STATES)
Message: 74414
Could the latest toolchain and uclinux-dist be slightly imcompatible in the trunk?
QuoteReplyEditDelete
2009-05-21 13:52:03 Re: user/mtd-utils/mkfs.jffs2 compile error
Mike Frysinger (UNITED STATES)
Message: 74424
the mkfs.jffs2 in user/mtd-utils/ is compiled by your host toolchain. the Blackfin toolchain in use doesnt matter.
QuoteReplyEditDelete
2009-05-21 13:52:36 Re: user/mtd-utils/mkfs.jffs2 compile error
Mike Frysinger (UNITED STATES)
Message: 74425
so run `file -L user/mtd-utils/mkfs.jffs2` and see what it shows
also, you can try `strace ./user/mtd-utils/mkfs.jffs2`
QuoteReplyEditDelete
2009-05-21 14:34:54 Re: user/mtd-utils/mkfs.jffs2 compile error
Steven Vacca (UNITED STATES)
Message: 74427
The output for both the "file -L" and "strace" are:
~/blackfin-sources/uclinux-dist$ file -L user/mtd-utils/mkfs.jffs2
user/mtd-utils/mkfs.jffs2: BFLT executable - version 4 ram
~/blackfin-sources/uclinux-dist$ strace ./user/mtd-utils/mkfs.jffs2
execve("./user/mtd-utils/mkfs.jffs2", ["./user/mtd-utils/mkfs.jffs2"], [/* 35 vars */]) = -1 ENOEXEC (Exec format error)
dup(2) = 3
fcntl64(3, F_GETFL) = 0x2 (flags O_RDWR)
fstat64(3, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7f8f000
_llseek(3, 0, 0xbfb1a8f8, SEEK_CUR) = -1 ESPIPE (Illegal seek)
write(3, "strace: exec: Exec format error\n", 32strace: exec: Exec format error
) = 32
close(3) = 0
munmap(0xb7f8f000, 4096) = 0
exit_group(1) = ?
Process 912 detached
QuoteReplyEditDelete
2009-05-21 14:37:50 Re: user/mtd-utils/mkfs.jffs2 compile error
Mike Frysinger (UNITED STATES)
Message: 74428
your toolchain/environment is screwed up. run `make user/mtd-utils_clean` and then run `make user/mtd-utils_only >& log` and post the log file as an attachment.
QuoteReplyEditDelete
2009-05-21 14:59:02 Re: user/mtd-utils/mkfs.jffs2 compile error
Steven Vacca (UNITED STATES)
Message: 74429
Attached is my log output.
log
QuoteReplyEditDelete
2009-05-21 17:54:53 Re: user/mtd-utils/mkfs.jffs2 compile error
Mike Frysinger (UNITED STATES)
Message: 74430
the log says it should have worked fine:
gcc -O2 -g -Wall -Wextra -Wwrite-strings -Wno-sign-compare -g -o /home/smv/blackfin-sources/uclinux-dist/user/mtd-utils/build-606f38a2221648ca5c5fa292c9f71d2ddd59fa66-host/mkfs.jffs2 /home/smv/blackfin-sources/uclinux-dist/user/mtd-utils/build-606f38a2221648ca5c5fa292c9f71d2ddd59fa66-host/mkfs.jffs2.o /home/smv/blackfin-sources/uclinux-dist/user/mtd-utils/build-606f38a2221648ca5c5fa292c9f71d2ddd59fa66-host/crc32.o /home/smv/blackfin-sources/uclinux-dist/user/mtd-utils/build-606f38a2221648ca5c5fa292c9f71d2ddd59fa66-host/compr_rtime.o /home/smv/blackfin-sources/uclinux-dist/user/mtd-utils/build-606f38a2221648ca5c5fa292c9f71d2ddd59fa66-host/compr_zlib.o /home/smv/blackfin-sources/uclinux-dist/user/mtd-utils/build-606f38a2221648ca5c5fa292c9f71d2ddd59fa66-host/compr_lzo.o /home/smv/blackfin-sources/uclinux-dist/user/mtd-utils/build-606f38a2221648ca5c5fa292c9f71d2ddd59fa66-host/compr.o /home/smv/blackfin-sources/uclinux-dist/user/mtd-utils/build-606f38a2221648ca5c5fa292c9f71d2ddd59fa66-host/rbtree.o -lz -llzo2
make[3]: Leaving directory `/home/smv/blackfin-sources/uclinux-dist/user/mtd-utils/606f38a2221648ca5c5fa292c9f71d2ddd59fa66'
for f in mkfs.jffs2 ; do ln -sf build-606f38a2221648ca5c5fa292c9f71d2ddd59fa66-host//$f $f ; done
what does this output:
ls tools/
file -L user/mtd-utils/*/mkfs.jffs2
QuoteReplyEditDelete
2009-05-22 09:59:10 Re: user/mtd-utils/mkfs.jffs2 compile error
Steven Vacca (UNITED STATES)
Message: 74452
The outputs are:
~/blackfin-sources/uclinux-dist$ ls tools/
autobuild.sh bfin-uclinux-pkg-config dev-table-to-cpio.awk sg-cksum
autotools.mk bin download.mk soapcpp2
bfin-uclinux-cpp cksum finddup sstrip
bfin-uclinux-g++ config.guess findstrip sstrip.c
bfin-uclinux-gcc config.sub misc staging-compiler
bfin-uclinux-ld cross-fix-root mkdevdir-genromfs.sh ucfront
bfin-uclinux-libpng12-config cross-pkg-config modules-alias.sh update-config-files.sh
bfin-uclinux-libpng-config crypt.pl README
bfin-uclinux-ncurses5-config decodecore romfs-inst.sh
--------------------------------------------
~/blackfin-sources/uclinux-dist$ file -L user/mtd-utils/*/mkfs.jffs2
user/mtd-utils/build-606f38a2221648ca5c5fa292c9f71d2ddd59fa66-host/mkfs.jffs2: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.6.8, dynamically linked (uses shared libs), not stripped
user/mtd-utils/build-606f38a2221648ca5c5fa292c9f71d2ddd59fa66/mkfs.jffs2: BFLT executable - version 4 ram
Steven
QuoteReplyEditDelete
2009-05-23 16:30:00 Re: user/mtd-utils/mkfs.jffs2 compile error
Mike Frysinger (UNITED STATES)
Message: 74477
user/mtd-utils/mkfs.jffs2 should be a symlink to the build-...-host/ dir, not the build-.../ dir
can you run `ls -l user/mtd-utils/mkfs.jffs2` and make sure it's pointing to the right place
QuoteReplyEditDelete
2009-05-27 09:41:17 Re: user/mtd-utils/mkfs.jffs2 compile error
Steven Vacca (UNITED STATES)
Message: 74649
Here is the result:
(1)
ls -l user/mtd-utils/mkfs.jffs2
lrwxrwxrwx 1 smv smv 63 2009-05-20 10:14 user/mtd-utils/mkfs.jffs2 -> build-606f38a2221648ca5c5fa292c9f71d2ddd59fa66-host//mkfs.jffs2
(2)
Also, checking the properties of user/mtd-utils/mkfs.jffs2:
build-606f38a2221648ca5c5fa292c9f71d2ddd59fa66-host//mkfs.jffs2
QuoteReplyEditDelete
2009-05-27 14:31:36 Re: user/mtd-utils/mkfs.jffs2 compile error
Mike Frysinger (UNITED STATES)
Message: 74659
so how can `file -L user/mtd-utils/mkfs.jffs2` show a Blackfin object when the previous `file` commands did not ? are you saying you can execute that mkfs.jffs2 now ?
QuoteReplyEditDelete
2009-05-27 14:47:05 Re: user/mtd-utils/mkfs.jffs2 compile error
Steven Vacca (UNITED STATES)
Message: 74661
I have found a way to get the mkfs.jffs2 to work properly, but it's
bizarre. I think the problem has to do with the make clean of the uclinux-dist.
If I execute the sequence:
(1) make clean
(2) make CROSS=bfin-uclinux- -Wl,-elft2flt
**** Get error at end of session when using mkfs.jffs2 on romfs ****
--------------------------------------
But, if I execute this sequence:
(1) make clean
(2) make CROSS=bfin-uclinux- -Wl,-elft2flt
**** Get error at end of session when using mkfs.jffs2 on romfs ****
(3) make user/mtd-utils_clean
(4) make user/mtd-utils_only
(5) make CROSS=bfin-uclinux- -Wl,-elft2flt
**** COMPILES SUCCESSFULLY! All subsequent compiles are fine without the ****
**** make _clean and _only. ****
It appears that the make clean of the uclinux-dist causes some issue with the generation of the
mkfs.jffs2 app.
--------------------------------------
If I execute this sequence:
(1) make clean
(2) make user/mtd-utils_clean
(3) make user/mtd-utils_only
**** Get error with the make _only, not sure what to make of this ****
---------------------------------------
The make clean seems to cause the problem in some way.
It appears that after doing make clean, the make CROSS= needs to compile up
until it gets the error at the end, then the mkfs.jffs2 needs it's make _clean
and make _only. Then the make CROSS= compiles fine.
I never had this problem with the 2008R1.5, only with this trunk
ver, 2.6.28.10-ADI-2009R1-pre-svn6346.
ShutEyeThinkin
QuoteReplyEditDelete
2009-05-27 15:00:27 Re: user/mtd-utils/mkfs.jffs2 compile error
Steven Vacca (UNITED STATES)
Message: 74663
Not sure how to answer your last question:
"so how can `file -L user/mtd-utils/mkfs.jffs2` show a Blackfin object when
the previous `file` commands did not ? are you saying you can execute
that mkfs.jffs2 now ?"
I've always had a mkfs.jffs2 target for the mkfs.jffs2 symlinks, but it
appears that after a make clean, then a make CROSS= causes the new mkfs.jffs2
to be built improperly, requiring a make _clean and make _only. Then the new
mkfs.jffs2 operates properly for subsequent make CROSS= compiles.
QuoteReplyEditDelete
2009-05-27 19:37:34 Re: user/mtd-utils/mkfs.jffs2 compile error
Mike Frysinger (UNITED STATES)
Message: 74680
why are you executing `make CROSS=bfin-uclinux- -Wl,-elft2flt` ? you should not be setting any env vars at all when running `make`.
QuoteReplyEditDelete
2009-05-28 09:46:00 Re: user/mtd-utils/mkfs.jffs2 compile error
Steven Vacca (UNITED STATES)
Message: 74708
I use "make CROSS=bfin-uclinux- -Wl,-elf2flt" to make sure bfin-uclinux-gcc is used instead of bfin-linux-uclibc-gcc. Is that not correct? I want to make sure I'm compiling for the Flat File format. I'll try just using make and see if that helps.
QuoteReplyEditDelete
2009-05-28 12:27:42 Re: user/mtd-utils/mkfs.jffs2 compile error
Mike Frysinger (UNITED STATES)
Message: 74718
no, that is not correct at all
please read the documentation:
docs.blackfin.uclinux.org/doku.php?id=toolchain:executable_file_formats
QuoteReplyEditDelete
2009-05-28 14:08:27 Re: user/mtd-utils/mkfs.jffs2 compile error
Steven Vacca (UNITED STATES)
Message: 74721
Using just 'make', instead of 'make CROSS=bfin-uclinux- -Wl,-elf2flt', works fine. So, I've been using 'make' in the wrong way. For some reason it worked on the last linux ver, but this one. OOOOPS! Now I know. I had read that doc in your previous reply a long time ago and misconstrued it.
Mike, thanks for your help and patience.
Steven