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 15 Feb 2008 08:37 AM by  olco
Linux 2.6.19.2
 73 Replies
Sort:
You are not authorized to post a reply.
Page 1 of 41234 > >>
Author Messages
zonque
New Member
New Member
Posts:


--
31 May 2007 06:00 PM
    Hi everyone,

    just wanted to let you know that I got a Linux installation ready which supports many (almost all) features of the LITEKIT. Here is the list of peripherals I've successfully tested simultaniously:

    * USB HS host
    * USB OTG host
    * IDE in UDMA mode
    * PCMCIA
    * Ethernet SMSC9117
    * MMC

    In the first place, I followed the instructions from http://www.logicpd.com/su...iewtopic.php?t=1074, but there was still some code missing here and there. I patched around for a couple of days and would like to share what I got. Since it would be too complicated to give out a patch against a heavily patched kernel tree, I created a new patch which should cleanly apply to a fresh linux-2.6.19.2 and put it online:

    http://caiaq.org/download...9.2-mx3lite.patch.gz (~1.1MB)

    Ugly enough, it's one big patch, I didn't take the time to split it up to multiple smaller, nicer ones.

    Does anyone at LogicPD feel responsible to merge such things upstream to the Linux git repository? I'm not sure wheter anyone who is not the copyright holder can actually put a "Signed-off-by:" line under the code.

    Greets,
    Daniel
    macneib@gmail.com
    New Member
    New Member
    Posts:


    --
    31 May 2007 06:35 PM
    Hi Daniel,
    Great Work! I'm just setting up now to test it out.
    zonque
    New Member
    New Member
    Posts:


    --
    31 May 2007 06:49 PM
    Posted By zonque on 12 Nov 2007 4:56 PM
    http://caiaq.org/download...9.2-mx3lite.patch.gz (~1.1MB)




    I forgot to post the link to the corresponding .config file. Here you go:

    http://caiaq.de/download/...9.2-imx31lite.config

    Daniel
    thehexa@gmail.com
    New Member
    New Member
    Posts:


    --
    31 May 2007 07:21 PM
    I will test this right away!

    Thanks for the effort, I will get back to this thread with my results.

    cheers!
    randyc
    New Member
    New Member
    Posts:


    --
    31 May 2007 08:56 PM
    Yee-haw, I can't wait to try it out!

    Randy
    randyc
    New Member
    New Member
    Posts:


    --
    01 Jun 2007 09:58 AM
    Well, I tried it with the LTIB image (which is pre-patched) from freescale and I tried it with the unpatched 2.6.19.2.bgz image w/o patches.

    The latter one patched just fine, although when I did the make I had to remove some # characters from vmlinux.lds

    Once I built the image, I was not sure what I should be doing next!
    I tried the old loader, I also tried booting the vmlinux image, etc.

    I guess I'll wait to see how hexa does and get the "linux for dummies" steps from him or any other kind soul who posts some help on here.

    Randy
    zonque
    New Member
    New Member
    Posts:


    --
    01 Jun 2007 11:49 AM
    Posted By randyc on 1 Jun 2007 9:58 AM
    Well, I tried it with the LTIB image (which is pre-patched) from freescale and I tried it with the unpatched 2.6.19.2.bgz image w/o patches.

    The latter one patched just fine, although when I did the make I had to remove some # characters from vmlinux.lds




    Ooops, then I forgot to fix that. Just remove the lines the compiler complains about.

    Posted By randyc on 1 Jun 2007 9:58 AM

    Once I built the image, I was not sure what I should be doing next!
    I tried the old loader, I also tried booting the vmlinux image, etc.




    Type "make zImage". Next, please follow the instructions from http://www.logicpd.com/su...iewtopic.php?t=1074. The basic steps are to setup TFTP and NFS environment and to build the second stage bootloader. The other posting described that very well and detailed.

    Daniel
    randyc
    New Member
    New Member
    Posts:


    --
    01 Jun 2007 01:00 PM
    Yeah, I'm familiar with the ftfp and nfs setup, seeing as I was the one that posted the instrucitons.

    What I was unclear about was where is rootfs? I see vmlinux in the top dir, and I see zImage way down buried in a boot dir, but I was looking for the part that I should nfs mount.

    When I boot the zImage that gets created with this build, it blitzes along and spits out status #'s I guess this is for debugging. When I get to 51.91 it complains about the clock speed and that's the end, it stops booting.

    this is right after 52.9, where it complains about something to do with usb. the last successful thing that happens is that the two nand partitions are created successfully.

    So I was left wondering if it was looking for rootfs, or what? It just hangs right there.

    Randy
    zonque
    New Member
    New Member
    Posts:


    --
    01 Jun 2007 01:17 PM
    Posted By randyc on 1 Jun 2007 1:0 PM

    What I was unclear about was where is rootfs? I see vmlinux in the top dir, and I see zImage way down buried in a boot dir, but I was looking for the part that I should nfs mount.




    Might be that you got a different hardware revision which has some differences regarding the electronic design around the USB PHY chips (see another thread in this forum for that). If that's the reason, you maybe have to disable the ARC USB support entirely in the kernel config.

    The NFS root issue works just as described in your posting, I didn't change anything there. Just put the right value to the second stage loader's CMDLINE variable or just leave it the was if you didn't change anything in your environment.

    The whole difference between the linux source tree you get when using my patch compared to the one you got with the ADS system is that I did some modifications in the GPIO settings, made some modules work for the LITE kit as well and fixed some bugs causing Ooopses.

    Greets,
    Daniel
    randyc
    New Member
    New Member
    Posts:


    --
    04 Jun 2007 08:55 AM
    OK, now I get it.

    I used the rootfs from the other workspace, the one I sent in the long instructions for. I only build what you are suggesting so I can get a good, stable kernel (zImage) but everything else is pretty much as I described it. this is now working for me (finally!)

    Now if I only knew how to run a command that is NOT listed in the busybox set! I have a .c file that I compiled and want to run but don't know how to. I can more it, grep it, file it, etc but not execute it. I know this is a rookie thing, can anyone take pity on me and tell me how to do it?

    Randy
    KoryHerzinger
    New Member
    New Member
    Posts:


    --
    04 Jun 2007 10:51 AM
    Posted By randyc on 4 Jun 2007 8:55 AM
    this is now working for me (finally!)




    Congratulations! I got a stable system this weekend as well. BTW, thanks to all who put in some effort to get this thing working, esp. Randy and Daniel.

    Posted By randyc on 4 Jun 2007 8:55 AM
    I know this is a rookie thing, can anyone take pity on me and tell me how to do it?




    Are execute permissions set on the file? If not, set them using chmod. Also, if the executable is not in a directory in your path, run it like this:

    mx31# ./foo


    - Kory
    thehexa@gmail.com
    New Member
    New Member
    Posts:


    --
    04 Jun 2007 11:38 AM
    Posted By randyc on 4 Jun 2007 8:55 AM
    OK, now I get it.

    I used the rootfs from the other workspace, the one I sent in the long instructions for. I only build what you are suggesting so I can get a good, stable kernel (zImage) but everything else is pretty much as I described it. this is now working for me (finally!)

    Now if I only knew how to run a command that is NOT listed in the busybox set! I have a .c file that I compiled and want to run but don''t know how to. I can more it, grep it, file it, etc but not execute it. I know this is a rookie thing, can anyone take pity on me and tell me how to do it?

    Randy




    as Kory noted, you probably should make the file executable: chmod +x <compiled binary>

    For the new kernel, i downloaded the vanilla kernel from kernel.org, patched it with daniel's mega patch, then i removed completely the ltibdir/rpm/BUILD/linux-2.6.19.2 and moved the new patched source to the same location, that way i can still use ltib to compile it

    on another note, is anyone able to compile the MPEG4 encorder module?

    regards
    randyc
    New Member
    New Member
    Posts:


    --
    04 Jun 2007 12:51 PM
    ha ha. Yeah, I think I know *how* to run it, but it doesn't work.
    I have several binary files that I can't run. here's an example:

    mx31# ls
    endian endian.c
    mx31# ls endian
    endian
    mx31# ls -al endian
    -rwxrwxrwx 1 root wheel 12938 Jun 4 14:16 endian
    mx31# endian
    -sh: endian: command not found
    mx31# ./endian
    -sh: ./endian: No such file or directory
    mx31#

    this is a compiled arm binary, which runs fine on other arm systems I have here. Just not this one. I can see it, I can more it, etc but it won't run. I just figured it was some trick that I didn't know about.

    Randy
    zonque
    New Member
    New Member
    Posts:


    --
    04 Jun 2007 01:24 PM
    Posted By randyc on 4 Jun 2007 0:51 PM
    ha ha. Yeah, I think I know *how* to run it, but it doesn''t work.
    I have several binary files that I can''t run. here''s an example:

    mx31# ls
    endian endian.c
    mx31# ls endian
    endian
    mx31# ls -al endian
    -rwxrwxrwx 1 root wheel 12938 Jun 4 14:16 endian
    mx31# endian
    -sh: endian: command not found
    mx31# ./endian
    -sh: ./endian: No such file or directory
    mx31#

    this is a compiled arm binary, which runs fine on other arm systems I have here. Just not this one. I can see it, I can more it, etc but it won''t run. I just figured it was some trick that I didn''t know about.




    You have to compile it with the same compiler you used for you toolchain. To be more precise, your binary will only run if you used a compiler which outputs an EABI binary.

    Daniel
    KoryHerzinger
    New Member
    New Member
    Posts:


    --
    04 Jun 2007 02:50 PM
    Quote:
    ha ha. Yeah, I think I know *how* to run it, but it doesn't work.
    I have several binary files that I can't run.


    Sorry, didn't know how "rookie" you meant

    Dan's right, build with the same toolchain if you're not already, but I'm not sure if that's the issue here. If you had built with the wrong toolchain and that was the issue, I would expect to see a different error (ld may crap out, or some nasty message from the loader about the ELF headers). 'No such file or directory' implies the shell can't even locate the resource to load. The fact that 'ls' can see it threw me off, but 'ls' interfaces to the file system on its own... its not a function of the shell but a standalone executable. Have you tried dropping your executable in /usr/bin?

    Anyway, it sounds like an issue with the shell, or maybe your NFS setup. I haven't tried building an executable to test yet, but I'll give it a shot tonight and see if I can replicate your problem.
    randyc
    New Member
    New Member
    Posts:


    --
    04 Jun 2007 08:32 PM
    No, the advice was right on. Apparently there is an old EABI and a newer one. My other box, an arm9 box, has a more mature linux but uses the old EABI.

    When you run an executable compiled on this arm9 box on arm11, it says "file not found". Vise-versa is the same. yeah, I would have expected some kind of elf message, that's why I was so puzzled. I used the "file" command and it said it was an ARM executable either way. So it sees it as an executable but when you run it, it can't so lies and says file not found. Duh error message.

    anywho, when I recompiled it with the arm11 cross compiler on x86 it ran like a champ and said "Little endian" which is what I wanted to see. Now if I can just get that crazy logic 12" video touchscreen thing to work with Linux I'll be all set!

    Randy
    KoryHerzinger
    New Member
    New Member
    Posts:


    --
    04 Jun 2007 10:27 PM
    Randy: Yeah, found that out too when I built my first app and it ran fine. I had seen some issues earlier with not being able to touch files in certain directories, even though the rootfs was mounted as RW. It turned out to be a problem with my NFS config on my host.

    Anyway, gotta love it when error messages lie.
    zonque
    New Member
    New Member
    Posts:


    --
    05 Jun 2007 06:47 PM
    Regarding the patchset found at the ADS kit and slightly modified by me, I'd like to know whether LogicPD currently takes care about the merge upstream to the Linux kernel. The longer it takes to do that, the harder it will be since the kernel APIs are constantly changing. Is there a contact from LogicPD to the Freescale developers who did the patchset against 2.6.19.2?

    Thanks for shedding some light on that

    Daniel
    jesus.ruizdeinfante@hale.at
    New Member
    New Member
    Posts:


    --
    06 Jun 2007 01:27 AM
    Hi!

    Thanks to zonque, randyc, hhyilmaz and everyone involved on getting Linux up and running on the LITEKIT.

    It runs just fine here but I keep seeing a warning on the console
    every time I run top. It says
    "Unkown Hz value (88) Assume 100".
    If I run top again, the reported value keeps growing with the time till it eventually reaches 100 and then the warning disappears. Does anyone know what does that mean?
    JimmBurk
    New Member
    New Member
    Posts:


    --
    07 Jun 2007 04:27 PM
    Just wondering if anybody out there are has already patched the kernel to use KDB? Interested?

    The common patch cleanly installed after Daniel's new patch so the only work left is the ARM specific patches.

    If it is already done THANKS in advance if not I will post the patches as soon as I verify it really works as advertised.

    Jimm
    You are not authorized to post a reply.
    Page 1 of 41234 > >>