Search

Technical Discussion Group Forum

This forum is provided for user discussion. While Beacon EmbeddedWorks support staff and engineers participate, Beacon EmbeddedWorks does not guarantee the accuracy of all information within in the Technical Discussion Group (TDG).

The "Articles" forums provide brief Articles written by Beacon EmbeddedWorks engineers that address the most frequently asked technical questions.

To receive email notifications when updates are posted for a Beacon EmbeddedWorks product download, please subscribe to the TDG Forum of interest.

TDG Forum

PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 20 Oct 2005 10:52 PM by  peter.barada@logicpd.com
Can't build the Metrowerks BSP kernel
 9 Replies
Sort:
You are not authorized to post a reply.
Author Messages
latiger661
New Member
New Member
Posts:


--
20 Oct 2005 11:56 AM
    I am trying to build the Metrowerks MCF547x 2.4 kernel (non pcs) under cygwin running under Windows XP. The first 2 steps seems to go ok ("make fresh", "make config-m547xlite"). The third step ("make dep") runs for about 2 minutes and crashes with a "too many arguements" error. Does anyone have any experience with this BSP version? Please don't answer with a lot on UNIX techno-babble. I have never seen UNIX before, so all this is brand new to me.
    peter.barada@logicpd.com
    New Member
    New Member
    Posts:72


    --
    20 Oct 2005 12:39 PM
    Hmm,
    I've never tried to build the BSP using Cygwin, so I'm not too sure, but I have a question for you:

    How long is the path that you've placed the BSP in? If its pretty long then some of the compiliation command lines may overflow the maximum length of what can be passed to a sub-process(yeah, its some unix-babble, but I gotta try to explain it).

    Could you put the BSP in a top-level directory like "\LinuxBSP" and try again?

    Also if you could, send me a trimmed down verison of the output that shows the first error? By trimmed, I'd like to see from the last make message that indicates "make[xxx]: Entering `/some/directory/in/the/BSP'", up to and including the first error where you see the "too many arguments". This will help me to try to discern what's going on...
    latiger661
    New Member
    New Member
    Posts:


    --
    20 Oct 2005 01:14 PM
    the physical directory is C:\linuxbsp. However, it is seen by cigwin as /cygdrive/c/linuxbsp. Here is the last part of "make dep" where it aborts



    /cygdrive/c/linuxbsp/linux-2.4.26/scripts/mkdep -D__KERNEL__ -I/cygdrive/c/linux
    bsp/linux-2.4.26/include -Wall -Wstrict-prototypes -Wno-trigraphs -O1 -fno-stric
    t-aliasing -fno-common -pipe -fno-strength-reduce -ffixed-a2 -mcfv4e -fno-buil
    tin -D__mcfire__ -g -ggdb -I /cygdrive/c/linuxbsp/linux-2.4.26/lib/zlib_deflate
    -nostdinc -iwithprefix include -- deflate.c deflate_syms.c deftree.c defutil.h >
    .depend
    make[5]: Leaving directory `/cygdrive/c/linuxbsp/linux-2.4.26/lib/zlib_deflate'
    make -C zlib_inflate fastdep
    make[5]: Entering directory `/cygdrive/c/linuxbsp/linux-2.4.26/lib/zlib_inflate'

    /cygdrive/c/linuxbsp/linux-2.4.26/scripts/mkdep -D__KERNEL__ -I/cygdrive/c/linux
    bsp/linux-2.4.26/include -Wall -Wstrict-prototypes -Wno-trigraphs -O1 -fno-stric
    t-aliasing -fno-common -pipe -fno-strength-reduce -ffixed-a2 -mcfv4e -fno-buil
    tin -D__mcfire__ -g -ggdb -I /cygdrive/c/linuxbsp/linux-2.4.26/lib/zlib_inflate
    -nostdinc -iwithprefix include -- infblock.c infblock.h infcodes.c infcodes.h in
    ffast.c inffast.h inffixed.h inflate.c inflate_syms.c inftrees.c inftrees.h infu
    til.c infutil.h > .depend
    make[5]: Leaving directory `/cygdrive/c/linuxbsp/linux-2.4.26/lib/zlib_inflate'
    make[4]: Leaving directory `/cygdrive/c/linuxbsp/linux-2.4.26/lib'
    make[3]: Leaving directory `/cygdrive/c/linuxbsp/linux-2.4.26/lib'
    make -C crypto fastdep
    make[3]: Entering directory `/cygdrive/c/linuxbsp/linux-2.4.26/crypto'
    /cygdrive/c/linuxbsp/linux-2.4.26/scripts/mkdep -D__KERNEL__ -I/cygdrive/c/linux
    bsp/linux-2.4.26/include -Wall -Wstrict-prototypes -Wno-trigraphs -O1 -fno-stric
    t-aliasing -fno-common -pipe -fno-strength-reduce -ffixed-a2 -mcfv4e -fno-buil
    tin -D__mcfire__ -g -ggdb -nostdinc -iwithprefix include -- aes.c api.c arc4.c
    autoload.c blowfish.c cast5.c cast6.c cipher.c compress.c crypto_null.c deflate.
    c des.c digest.c hmac.c internal.h md4.c md5.c proc.c scatterwalk.c scatterwalk.
    h serpent.c sha1.c sha256.c sha512.c tcrypt.c tcrypt.h twofish.c > .depend
    make[3]: Leaving directory `/cygdrive/c/linuxbsp/linux-2.4.26/crypto'
    make -C arch/m68k/kernel fastdep
    make[3]: Entering directory `/cygdrive/c/linuxbsp/linux-2.4.26/arch/m68k/kernel'

    /cygdrive/c/linuxbsp/linux-2.4.26/scripts/mkdep -D__KERNEL__ -I/cygdrive/c/linux
    bsp/linux-2.4.26/include -Wall -Wstrict-prototypes -Wno-trigraphs -O1 -fno-stric
    t-aliasing -fno-common -pipe -fno-strength-reduce -ffixed-a2 -mcfv4e -fno-buil
    tin -D__mcfire__ -g -ggdb -nostdinc -iwithprefix include -- bios32.c entry.S he
    ad.S ints.c m68k_defs.c m68k_ksyms.c process.c ptrace.c semaphore.c setup.c sign
    al.c sun3-head.S sys_m68k.c time.c traps.c > .depend
    make[3]: Leaving directory `/cygdrive/c/linuxbsp/linux-2.4.26/arch/m68k/kernel'
    make -C arch/m68k/mm fastdep
    make[3]: Entering directory `/cygdrive/c/linuxbsp/linux-2.4.26/arch/m68k/mm'
    /cygdrive/c/linuxbsp/linux-2.4.26/scripts/mkdep -D__KERNEL__ -I/cygdrive/c/linux
    bsp/linux-2.4.26/include -Wall -Wstrict-prototypes -Wno-trigraphs -O1 -fno-stric
    t-aliasing -fno-common -pipe -fno-strength-reduce -ffixed-a2 -mcfv4e -fno-buil
    tin -D__mcfire__ -g -ggdb -nostdinc -iwithprefix include -- extable.c fault.c h
    wtest.c init.c kmap.c mcfmmu.c memory.c motorola.c sun3kmap.c sun3mmu.c > .depen
    d
    make[3]: Leaving directory `/cygdrive/c/linuxbsp/linux-2.4.26/arch/m68k/mm'
    make -C arch/m68k/lib fastdep
    make[3]: Entering directory `/cygdrive/c/linuxbsp/linux-2.4.26/arch/m68k/lib'
    /cygdrive/c/linuxbsp/linux-2.4.26/scripts/mkdep -D__KERNEL__ -I/cygdrive/c/linux
    bsp/linux-2.4.26/include -Wall -Wstrict-prototypes -Wno-trigraphs -O1 -fno-stric
    t-aliasing -fno-common -pipe -fno-strength-reduce -ffixed-a2 -mcfv4e -fno-buil
    tin -D__mcfire__ -g -ggdb -nostdinc -iwithprefix include -- ashldi3.c ashrdi3.c
    checksum.c lshrdi3.c memcmp.c memcpy.c memset.c muldi3.S semaphore.S > .depend
    make[3]: Leaving directory `/cygdrive/c/linuxbsp/linux-2.4.26/arch/m68k/lib'
    make -C arch/m68k/coldfire fastdep
    make[3]: Entering directory `/cygdrive/c/linuxbsp/linux-2.4.26/arch/m68k/coldfir
    e'
    /cygdrive/c/linuxbsp/linux-2.4.26/scripts/mkdep -D__KERNEL__ -I/cygdrive/c/linux
    bsp/linux-2.4.26/include -Wall -Wstrict-prototypes -Wno-trigraphs -O1 -fno-stric
    t-aliasing -fno-common -pipe -fno-strength-reduce -ffixed-a2 -mcfv4e -fno-buil
    tin -D__mcfire__ -g -ggdb -nostdinc -iwithprefix include -- cache.c config.c dm
    a.c entry.S head.S ints.c pci.c > .depend
    make[3]: Leaving directory `/cygdrive/c/linuxbsp/linux-2.4.26/arch/m68k/coldfire
    '
    make[2]: Leaving directory `/cygdrive/c/linuxbsp/linux-2.4.26'
    scripts/mkdep -- `find /cygdrive/c/linuxbsp/linux-2.4.26/include/asm /cygdrive/c
    /linuxbsp/linux-2.4.26/include/linux /cygdrive/c/linuxbsp/linux-2.4.26/include/s
    csi /cygdrive/c/linuxbsp/linux-2.4.26/include/net /cygdrive/c/linuxbsp/linux-2.4
    .26/include/math-emu \( -name SCCS -o -name .svn \) -prune -o -follow -name \*.h
    ! -name modversions.h -print` > .hdepend
    scripts/mkdep: argument list too long
    make[1]: *** [dep-files] Error 2
    make[1]: Leaving directory `/cygdrive/c/linuxbsp/linux-2.4.26'
    make: *** [dep] Error 2

    rnotari@ENG73 /cygdrive/c/linuxbsp
    $
    peter.barada@logicpd.com
    New Member
    New Member
    Posts:72


    --
    20 Oct 2005 01:26 PM
    Ok, it soulds like the ouptut from 'mkdepend' is too large due to the length of the path.

    Could you execute the following:

    $ /cygdrive/c/linuxbsp/linux-2.4.26
    $ find /cygdrive/c/linuxbsp/linux-2.4.26/include/asm /cygdrive/c
    /linuxbsp/linux-2.4.26/include/linux /cygdrive/c/linuxbsp/linux-2.4.26/include/s
    csi /cygdrive/c/linuxbsp/linux-2.4.26/include/net /cygdrive/c/linuxbsp/linux-2.4
    .26/include/math-emu \( -name SCCS -o -name .svn \) -prune -o -follow -name \*.h
    ! -name modversions.h -print | wc

    So I can see the amount of data that the 'find' produces? I'll bet you this is the problem...
    I.E. the output of the command between the "`"s that is passed to scripts/mkdep on the command line...
    peter.barada@logicpd.com
    New Member
    New Member
    Posts:72


    --
    20 Oct 2005 01:41 PM
    I've looked through the BSP that I'm working with, and I ran into a similar problem.

    I chose to modify inux-2.4.26/scripts/mkdep.c to allow for a '-file' arg to take the contents of a file as the list of files to generate the depdendies from instead of getting the list on the command line, and then modified linux-2.4.26/Makefile to break that command into two parts, the first part to do the 'find' and save the results in .hdepend-list, then the 2nd command to call scripts/mkdep with '-file .hdepend-list'.

    I believe it is possibel to modify linux-2.4.26/Makefile to take the output of the find, place it into a file, and then split the file up into bite-sized chunks and create the dependecies from that instead of trying to swallow the entire list of files.

    I'll look at this possibility and get back to you. You should send a note to Freescale pointing out this problem...
    peter.barada@logicpd.com
    New Member
    New Member
    Posts:72


    --
    20 Oct 2005 01:58 PM
    Well that didn't work very well.

    scripts/mkdep needs the shole list so it can generate the topological graph of dependencies, and splitting it up creates a *huge* amount of dependencies.

    Send me your email address, I need to send you new source for scripts/mkdep.c and a fragment in the linux-2.4.26/Makefile to use the new '-file' arg to scripts/mkdep which will get around this problem.
    latiger661
    New Member
    New Member
    Posts:


    --
    20 Oct 2005 02:09 PM
    I had to preface your first line with a "cd ". It is needed to change a directory. The second part found every file on the hard drive. Here is how it ended. I think you need to add a "cd " anyplace you want to change a directory.




    rnotari@ENG73 /cygdrive/c/linuxbsp/linux-2.4.26
    $ /linuxbsp/linux-2.4.26/include/linux /cygdrive/c/linuxbsp/linux-2.4.26/include/s
    bash: /linuxbsp/linux-2.4.26/include/linux: is a directory

    rnotari@ENG73 /cygdrive/c/linuxbsp/linux-2.4.26
    $ csi /cygdrive/c/linuxbsp/linux-2.4.26/include/net /cygdrive/c/linuxbsp/linux-
    2.4
    bash: csi: command not found

    rnotari@ENG73 /cygdrive/c/linuxbsp/linux-2.4.26
    $ .26/include/math-emu \( -name SCCS -o -name .svn \) -prune -o -follow -name \
    *.h
    bash: .26/include/math-emu: No such file or directory

    rnotari@ENG73 /cygdrive/c/linuxbsp/linux-2.4.26
    $ ! -name modversions.h -print | wc
    bash: -name: command not found
    0 0 0

    rnotari@ENG73 /cygdrive/c/linuxbsp/linux-2.4.26
    $
    latiger661
    New Member
    New Member
    Posts:


    --
    20 Oct 2005 02:15 PM
    The cigwin bash interface has an 'alias' command. I wonder if that would help things. If i could alias the drive/directory down to 3-4 letters, maybe that would be enough. My email here is rnotari@curtisswright.com.
    latiger661
    New Member
    New Member
    Posts:


    --
    20 Oct 2005 04:27 PM
    I managed to get the prefix down to "c\linuxbsp\" using the "mount -c" command (did a lot of playing around), but it didn't help, so it looks like it is the number of arguements that is the problem, not the length of the list.
    peter.barada@logicpd.com
    New Member
    New Member
    Posts:72


    --
    20 Oct 2005 10:52 PM
    Unfortunatley I can't email you at curtisswright.com, your mailer says that I don't have permission to email you. My mail setup is a bit funky(I don't use logicpd.com to send out emails), so the first email complained about a relay message(which I can understand), so when I tried from my personal domain it was rejected.

    Do you have another email address outside of curtiswright.com that I can email you the fix?
    You are not authorized to post a reply.