Go to previous topic
Go to next topic
Last Post 12 Mar 2008 03:18 PM by  lilja.magnus@gmail.com
yet another linux thread
 5 Replies
Author Messages
tombrus
New Member
New Member
Posts:


--
11 Mar 2008 07:18 AM
    Hi,

    I am tying to get linux to run on my LITEKIT. I read a lot of posts here and tried to mimic the steps (I followed the steps of randyc in thread http://tdg.logicpd.com/viewtopic.php?f=29&t=1074, thanks randyc!). Alas no success yet. Maybe some more experienced people can give some tips.

    - I downloaded BSP imx31_ads_20071008-rel5b-ltib.iso from freescale; it contains linux-2.6.22
    - on the forum everybody is talking about linux-2.6.19.2, is 2.6.22 still uncharted territory?
    - if yes, what should I do to use 2.6.19.2? Get another BSP version? Get 2.6.19.2 (from http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.19.2.tar.bz2?) and put it somewhere in the tree? Where?
    - I used the patches from http://www.lysator.liu.se...lja/linux/2007-10-19
    - they seem to patch fine
    - still I get errors:
    Quote:
    CHK include/linux/compile.h
    dnsdomainname: Unknown host
    UPD include/linux/compile.h
    CC init/version.o
    LD init/built-in.o
    LD .tmp_vmlinux1
    drivers/built-in.o: In function `write_irq':
    hid-input.c:(.text+0x37ba8): undefined reference to `cs8900_irq_map'
    drivers/built-in.o: In function `cs89x0_probe1':
    hid-input.c:(.init.text+0x2d5c): undefined reference to `cs8900_irq_map'
    drivers/built-in.o: In function `cs89x0_probe':
    hid-input.c:(.init.text+0x2e8c): undefined reference to `netcard_portlist'
    make: *** [.tmp_vmlinux1] Error 1
    All help is appreciated. I will start digging around the code in the mean time...

    -Tom
    Badguy
    New Member
    New Member
    Posts:


    --
    11 Mar 2008 12:09 PM
    I have not seen this exact problem.

    but I am guessing you have something enabled in your .config that you do not want.

    to put the 2.6.19.2 kernel in place:

    ../ltib/rpm/BUILD/

    place your kernel there. update your ltib config to reflect the kernel of your choice.

    hope this helps.
    tombrus
    New Member
    New Member
    Posts:


    --
    11 Mar 2008 01:59 PM
    Thanks for the reply Badguy. I will try replacing my linux sources with the old ones asap (I'll keep you all posted about the results)

    What I found stumbling the code was that the config contains CONFIG_CS89x0 as 'yes' and that the mx31ads.c file contains code for that device but the mx31lite.c does not. I think the LITEKIT hardware does not contain that network chip so I tried to switch that CONFIG off but somehow I can not get that accomplished . Any tips?

    Has anyone got that 2.6.22 version of Linux working (or even compiled) for the LITEKIT?

    If yes: How? If no: anybody trying it?

    -Tom
    Badguy
    New Member
    New Member
    Posts:


    --
    11 Mar 2008 02:40 PM
    yea I would use
    cd $LTIBPATH/
    ./ltib -c
    and select configure kernel and keep sources

    then in the kernel config menu I would browse to network and disable that driver.

    for the litekit we use:
    <*> SMSC LAN911x/LAN921x families embedded ethernet support

    hope this helps.

    Edit:
    I plan to look into that kernel, but I have not made it that far yet.
    too busy working on stuff
    tombrus
    New Member
    New Member
    Posts:


    --
    12 Mar 2008 08:34 AM
    Thanks Badguy, I found the options to switch net drivers in the plethora of menus . Now the 22 build gets a bit further but tips over with:
    Quote:
    ERROR: "gpio_firi_init" [drivers/net/irda/mxc_ir.ko] undefined!
    ERROR: "gpio_firi_active" [drivers/net/irda/mxc_ir.ko] undefined!
    ERROR: "gpio_firi_inactive" [drivers/net/irda/mxc_ir.ko] undefined!
    As a shortcut I added empty functions with these names to arch/arm/mach-mx3/mx31lite_gpio.c. Now I get a Build Succeeded!

    I seem to have an image now. Lets see if it boots...
    lilja.magnus@gmail.com
    New Member
    New Member
    Posts:


    --
    12 Mar 2008 03:18 PM
    Personally I don't use ltib to build my Litekit kernels. I use ltib to populate the root file system.

    Instead I build the kernel in a separate directory (outside ltib) and install the modules manually in the root file system.

    To build a Litekit kernel:
    fetch linux-2.6.22.6.tar.bz2
    fetch the files at http://www.lysator.liu.se...ja/linux/2007-10-19/
    (note that I added a "series" file a couple of minutes ago)
    make sure you have quilt installed
    run ltib once to get everything installed.


    export PATH=$PATH:/opt/freescale/usr/local/gcc-4.1.2-glibc-2.5-nptl-3/arm-none-linux-gnueabi/bin
    mkdir <somepath>
    cd <somepath>
    tar jxf linux-2.6.22.6.tar.bz2
    cd linux-2.6.22.6
    mkdir patches
    cd patches
    cp /opt/freescale/pkgs/linux-2.6.22*.patch .
    copy the smsc_911x_vendor_driver.patch, iMX31_litekit_support.patch and iMX31_litekit_disable_usb.patch to the patches directory
    cd ..
    (current directory shall now be linux-2.6.22.6)
    quilt push -a
    cp litekit.config to .config
    make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- zImage
    make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- modules
    make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- INSTALL_MOD_PATH=<somewhere> modules_install

    Your image is now at arch/arm/boot/zImage


    ---