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 08 Aug 2008 08:32 AM by  embedded@ferrin.org
A script to do the whole linux caboodle
 16 Replies
Sort:
You are not authorized to post a reply.
Author Messages
tombrus
New Member
New Member
Posts:


--
20 Mar 2008 10:23 AM
    While I was trying to get linux on my LITEKIT I developed the script below. You will need bash to run it.



    • Put it in a dir of its own and run it.
    • It will first help you to download the BSP from Freescale (I could not find a method to do that automatically )
    • it will download the other things
    • build and patch whatever is needed
    • setup tftp and nfs shares
    • send the commands to the LITEKIT (/dev/ttyS0)




    In the first few lines you can tune network stuff and some names. The DO_DOWNLOADS can be set to 'yes' if you want fresh downloads, setting it to 'no' will do an initial download and then use that when re-invoking the script. (maybe "FRESH_DOWNLOADS" would be a better name )



    This is in no way meant to be a fail safe script. It is merely a way for me to get a reproduceable and formal way of bringing up linux. I thought I'd share it with you. Any improvements/corrections/comments are welcome.



    As you may have read in an earlier post, my LITEKIT is still stuck with a irq-90 problem.



    No guarantees in any way, use it on your own risk.



    Have fun,

    Tom

    BASE=$(cd "$(dirname `echo $0`)";pwd)



    DO_DOWNLOADS=no

    MY_IP=`ifconfig eth0|sed -n -e 's/.*inet addr:\([^ ]*\).*/\1/p'`

    THE_MASK=`ifconfig eth0|sed -n -e 's/.*Mask:\([^ ]*\).*/\1/p'`

    THE_BROADCAST=`ifconfig eth0|sed -n -e 's/.*Bcast:\([^ ]*\).*/\1/p'`

    THE_IP=192.168.3.250

    THE_GATEWAY=192.168.3.1

    THE_NAMESERVER=192.168.1.1

    THE_TTY=/dev/ttyS0



    LTIB_ISO=imx31_ads_20071008-rel5b-ltib.iso

    ARM_BIN=/opt/freescale/usr/local/gcc-4.1.2-glibc-2.5-nptl-3/arm-none-linux-gnueabi/bin



    LTIB=$BASE/ltib-imx31ads-20071008

    DOWN=$BASE/downloads

    LOG=$BASE/log

    MNT=$BASE/mnt

    ROOT=$BASE/tftpboot



    echo "$(date +'%H:%M:%S') ==== building in $BASE ===="

    cd "$BASE"



    echo "$(date +'%H:%M:%S') ==== sudo needed for subsequent actions ===="

    sudo -v



    echo "$(date +'%H:%M:%S') ==== removing previous left-overs ===="

    if [ "`df|grep $MNT`" ]; then

    sudo umount mnt

    if [ "`df|grep $MNT`" ]; then

    echo ERROR: could not unmount $MNT

    exit

    fi

    fi

    rm -rf $LOG

    rm -rf $ROOT

    rm -rf bootloader

    rm -rf exports-backup

    rm -rf .*.swp

    rm -rf kick.sh

    rmdir $MNT 2> /dev/null

    sudo rm -rf $LTIB

    sudo rm -rf /opt/freescale/pkgs

    sudo rm -rf /opt/freescale/ltib

    sudo rm -rf /opt/freescale/usr

    if [ "$DO_DOWNLOADS" == yes ]; then

    echo "$(date +'%H:%M:%S') ==== removing downloaded files ===="

    rm -rf "$DOWN"

    fi

    echo "Hit ^C within one second to stop with a clean directory..."

    sleep 1

    mkdir -p $MNT

    mkdir -p $LOG

    mkdir -p $DOWN

    mkdir -p $ROOT



    if [ ! -f $LTIB_ISO ]; then

    cat <
    $(date +'%H:%M:%S') =========================================================

    Download of Board Support Package from FreeScale needed.

    ==================================================================

    There are two ways to get the BSP from FreeScale:

    1. The Royal way:

    - Goto http://www.freescale.com/"

    - Login with the 'login' link at the top right (go through registration when new here).

    - Click the 'Support' tab in the menu bar.

    - Click the 'Linux Board Support Packages' link at the right.

    - Click the 'BSPs for ARM Architectures' link at the bottom.

    - Click the 'download' link of 'Linux BSP for Freescale i.MX31ADS' in the list.

    - Save the file (called $LTIB_ISO) in $BASE

    2. The Shortcut:

    - Goto https://www.freescale.com/webapp/Download?colCode=CWF-IMX31ADSLTIB&nodeId=0127260061033202A7&location=overview

    - Login to the presented login screen (go through registration when new here)

    - Save the file (called $LTIB_ISO) in $BASE

    ==================================================================

    EOF

    read -p "Hit return when done: "

    while [ ! -f $LTIB_ISO ]; do

    read -p "Sorry, BSP file not found, try again. Hit return when done: "

    done

    fi



    echo "$(date +'%H:%M:%S') ==== downloading bits and pieces ===="

    for i in \

    "(bootloader.tar.gz http://mx31.lbox.ca/download/bootloader.tar.gz '157877857 3217' )" \

    "(mach-types http://www.arm.linux.org....achines/download.php '1875853266 65031' )" \

    "(litekit.config http://www.lysator.liu.se...10-19/litekit.config '3844885236 33173' )" \

    "(iMX31_litekit_disable_usb.patch http://www.lysator.liu.se...it_disable_usb.patch '2735393505 495' )" \

    "(iMX31_litekit_support.patch http://www.lysator.liu.se...itekit_support.patch '3064199057 76350' )" \

    "(smsc_911x_vendor_driver.patch http://www.lysator.liu.se..._vendor_driver.patch '3850927224 76198' )" \

    "(linux-2.6.22.6.tar.bz2 http://www.kernel.org/pub...nux-2.6.22.6.tar.bz2 '1275820199 45109498' )" \

    "(linux-2.6.19.2.tar.bz2 http://www.kernel.org/pub...nux-2.6.19.2.tar.bz2 '2180975117 42729366' )" \

    ; do

    eval i=$i

    name=${i[0]}

    url=${i[1]}

    crc=${i[2]}

    if [ ! -f $DOWN/$name ]; then

    wget -a $LOG/wget.log -O $DOWN/$name $url

    fi

    if [ ! -f $DOWN/$name ]; then

    echo "ERROR: could not download $name from $url"

    exit 999

    fi

    sum=`cat $DOWN/$name|cksum`

    if [ "$crc" != "$sum" ]; then

    #echo " \"($name $url '$sum')\" \\"

    echo "WARNING: downloaded file is different from expected: $url"

    echo " cksum='$sum' expected='$crc'"

    fi

    done



    echo "$(date +'%H:%M:%S') ==== installing the BSP ===="

    sudo mount -o loop -t iso9660 -o ro $LTIB_ISO $MNT

    $MNT/install > $LOG/install.log <
    y

    yes



    EOF

    if [ ! -d $LTIB ]; then

    echo ERROR: the BSP should have been installed in $LTIB, but it did not.

    exit -99

    fi

    ( cd $LTIB/config/platform/imx31ads

    cp defconfig tom-defconfig

    patch -s tom-defconfig <
    --- defconfig 2007-09-27 17:18:58.000000000 +0000

    +++ defconfig.dev 2008-03-19 13:21:18.000000000 +0000

    @@ -56,10 +56,10 @@

    # CONFIG_KERNEL_DIR_BUILD is not set

    # CONFIG_KERNEL_NONE is not set

    CONFIG_PKG_KERNEL="kernel-2.6.22-mx"

    -CONFIG_PKG_KERNEL_PRECONFIG="linux-2.6.22-mx31ads.config"

    +CONFIG_PKG_KERNEL_PRECONFIG="linux-2.6.22-mx31ads.config"

    # CONFIG_PKG_KERNEL_WANT_HEADERS is not set

    # CONFIG_PKG_KERNEL_WANT_CF is not set

    -# CONFIG_PKG_KERNEL_LEAVESRC is not set

    +CONFIG_PKG_KERNEL_LEAVESRC=y

    CONFIG_DEPLOYMENT_ERASE_BLOCK_SIZE="128"

    CONFIG_DISTRO="dist/lfs-5.1"



    @@ -298,11 +298,11 @@

    CONFIG_SYSCFG_IFACE0=y

    CONFIG_SYSCFG_NET_INTERFACE0="eth0"

    # CONFIG_SYSCFG_DHCPC0 is not set

    -CONFIG_SYSCFG_IPADDR0="172.27.161.13"

    -CONFIG_SYSCFG_NET_MASK0="255.255.0.0"

    -CONFIG_SYSCFG_NET_BROADCAST0="172.27.255.255"

    -CONFIG_SYSCFG_NET_GATEWAY0="172.27.255.254"

    -CONFIG_SYSCFG_NAMESERVER0="172.27.0.1"

    +CONFIG_SYSCFG_IPADDR0="192.168.3.250"

    +CONFIG_SYSCFG_NET_MASK0="255.255.255.0"

    +CONFIG_SYSCFG_NET_BROADCAST0="192.168.3.255"

    +CONFIG_SYSCFG_NET_GATEWAY0="192.168.3.1"

    +CONFIG_SYSCFG_NAMESERVER0="192.168.1.1"



    #

    #

    EOF

    )



    echo "$(date +'%H:%M:%S') ==== Doing ltib ===="

    if [ $EXPLAIN ]; then

    echo " - in dialog:"

    echo " - [*] Leave sources after building"

    echo "$(date +'%H:%M:%S') =========================================================="

    fi

    (cd $LTIB;./ltib -b --preconfig $LTIB/config/platform/imx31ads/tom-defconfig > $LOG/ltib-pass1.log 2>&1)

    if [ ! "`tail $LOG/ltib-pass1.log|fgrep 'Build Succeeded'`" ]; then

    echo "ERROR: ltib build did not succeed. (see $LOG/ltib-pass1.log)"

    exit -99

    fi



    echo "$(date +'%H:%M:%S') ==== Patching for LiteKit ===="

    ( cd $LTIB/rpm/BUILD/linux

    patch -s -p1 < $DOWN/iMX31_litekit_disable_usb.patch

    patch -s -p1 < $DOWN/iMX31_litekit_support.patch

    patch -s -p1 < $DOWN/smsc_911x_vendor_driver.patch



    cp .config .config-orig

    cp $DOWN/litekit.config .config



    cp arch/arm/tools/mach-types arch/arm/tools/mach-types-orig

    cp $DOWN/mach-types arch/arm/tools

    )

    ( cd $LTIB/config/platform/imx31ads

    cp defconfig tom-defconfig

    cp linux-2.6.22-mx31ads.config tom-linux-2.6.22-mx31ads.config

    patch -s tom-defconfig <
    --- defconfig 2007-09-27 17:18:58.000000000 +0000

    +++ defconfig.dev 2008-03-19 13:21:18.000000000 +0000

    @@ -56,10 +56,10 @@

    # CONFIG_KERNEL_DIR_BUILD is not set

    # CONFIG_KERNEL_NONE is not set

    CONFIG_PKG_KERNEL="kernel-2.6.22-mx"

    -CONFIG_PKG_KERNEL_PRECONFIG="linux-2.6.22-mx31ads.config"

    +CONFIG_PKG_KERNEL_PRECONFIG="tom-linux-2.6.22-mx31ads.config"

    # CONFIG_PKG_KERNEL_WANT_HEADERS is not set

    # CONFIG_PKG_KERNEL_WANT_CF is not set

    -# CONFIG_PKG_KERNEL_LEAVESRC is not set

    +CONFIG_PKG_KERNEL_LEAVESRC=y

    CONFIG_DEPLOYMENT_ERASE_BLOCK_SIZE="128"

    CONFIG_DISTRO="dist/lfs-5.1"



    @@ -298,11 +298,11 @@

    CONFIG_SYSCFG_IFACE0=y

    CONFIG_SYSCFG_NET_INTERFACE0="eth0"

    # CONFIG_SYSCFG_DHCPC0 is not set

    -CONFIG_SYSCFG_IPADDR0="172.27.161.13"

    -CONFIG_SYSCFG_NET_MASK0="255.255.0.0"

    -CONFIG_SYSCFG_NET_BROADCAST0="172.27.255.255"

    -CONFIG_SYSCFG_NET_GATEWAY0="172.27.255.254"

    -CONFIG_SYSCFG_NAMESERVER0="172.27.0.1"

    +CONFIG_SYSCFG_IPADDR0="192.168.3.250"

    +CONFIG_SYSCFG_NET_MASK0="255.255.255.0"

    +CONFIG_SYSCFG_NET_BROADCAST0="192.168.3.255"

    +CONFIG_SYSCFG_NET_GATEWAY0="192.168.3.1"

    +CONFIG_SYSCFG_NAMESERVER0="192.168.1.1"



    #

    #

    EOF

    patch -s tom-linux-2.6.22-mx31ads.config <
    --- linux-2.6.22-mx31ads.config 2007-09-28 22:55:35.000000000 +0000

    +++ linux-2.6.22-mx31ads.config.dev 2008-03-19 10:46:02.000000000 +0000

    @@ -160,7 +160,8 @@

    #

    # MX3 Options

    #

    -CONFIG_MACH_MX31ADS=y

    +CONFIG_MACH_MX31LITE=y

    +# CONFIG_MACH_MX31ADS is not set

    # CONFIG_MX3_DOZE_DURING_IDLE is not set

    CONFIG_MXC_SDMA_API=y

    CONFIG_ARCH_MXC_HAS_NFC_V2=y

    @@ -342,54 +343,7 @@

    #

    # CONFIG_NET_PKTGEN is not set

    # CONFIG_HAMRADIO is not set

    -CONFIG_IRDA=m

    -

    -#

    -# IrDA protocols

    -#

    -CONFIG_IRLAN=m

    -CONFIG_IRNET=m

    -CONFIG_IRCOMM=m

    -# CONFIG_IRDA_ULTRA is not set

    -

    -#

    -# IrDA options

    -#

    -CONFIG_IRDA_CACHE_LAST_LSAP=y

    -CONFIG_IRDA_FAST_RR=y

    -# CONFIG_IRDA_DEBUG is not set

    -

    -#

    -# Infrared-port device drivers

    -#

    -

    -#

    -# SIR device drivers

    -#

    -CONFIG_IRTTY_SIR=m

    -

    -#

    -# Dongle support

    -#

    -# CONFIG_DONGLE is not set

    -# CONFIG_KINGSUN_DONGLE is not set

    -

    -#

    -# Old SIR device drivers

    -#

    -# CONFIG_IRPORT_SIR is not set

    -

    -#

    -# Old Serial dongle support

    -#

    -

    -#

    -# FIR device drivers

    -#

    -# CONFIG_USB_IRDA is not set

    -# CONFIG_SIGMATEL_FIR is not set

    -# CONFIG_MCS_FIR is not set

    -CONFIG_MXC_FIR=m

    +# CONFIG_IRDA is not set

    # CONFIG_BT is not set

    # CONFIG_AF_RXRPC is not set



    @@ -658,6 +612,7 @@

    # CONFIG_NET_VENDOR_3COM is not set

    # CONFIG_NET_VENDOR_SMC is not set

    # CONFIG_SMC91X is not set

    +CONFIG_SMSC911X=y

    # CONFIG_DM9000 is not set

    # CONFIG_NET_VENDOR_RACAL is not set

    # CONFIG_AT1700 is not set

    @@ -667,7 +622,7 @@

    CONFIG_NET_PCI=y

    # CONFIG_AC3200 is not set

    # CONFIG_APRICOT is not set

    -CONFIG_CS89x0=y

    +# CONFIG_CS89x0 is not set

    # CONFIG_NETDEV_1000 is not set

    # CONFIG_NETDEV_10000 is not set

    # CONFIG_TR is not set

    @@ -1034,8 +989,6 @@

    # CONFIG_LOGO_LINUX_MONO is not set

    # CONFIG_LOGO_LINUX_VGA16 is not set

    CONFIG_LOGO_LINUX_CLUT224=y

    -CONFIG_LOGO_MX31ADS_CLUT224=y

    -# CONFIG_LOGO_MX32ADS_CLUT224 is not set



    #

    # Sound

    EOF

    )



    echo "$(date +'%H:%M:%S') ==== Doing ltib again (on patched sources) ===="

    if [ $EXPLAIN ]; then

    echo " - in first dialog: "

    echo " - [*] Configure the kernel"

    echo " - [*] Leave sources after building"

    echo " - Target System Configuration"

    echo " Options --->"

    echo " Network setup --->"

    echo " ($THE_IP) IP address"

    echo " ($THE_MASK) netmask"

    echo " ($THE_BROADCAST) broadcast address"

    echo " ($THE_GATEWAY) gateway address"

    echo " ($THE_NAMESERVER) nameserver IP address"

    echo " - in second dialog: "

    echo " - System Type --->"

    echo " Freescale MXC Implementations --->"

    echo " MX3 Options --->"

    echo " [*] Support MX31LITE platforms"

    echo " [ ] Support MX31ADS platforms"

    echo " - Device Drivers ---> "

    echo " Network device support --->"

    echo " Ethernet (10 or 100Mbit) --->"

    echo " <*> SMSC LAN911x/LAN921x families embedded ethernet support"

    echo " < > CS89x0 support"

    echo " - Networking --->"

    echo " < > IrDA (infrared) subsystem support --->"

    echo "$(date +'%H:%M:%S') =========================================================="

    fi

    (cd $LTIB;./ltib -b --preconfig $LTIB/config/platform/imx31ads/tom-defconfig > $LOG/ltib-pass2.log 2>&1)

    if [ ! "`tail $LOG/ltib-pass1.log|fgrep 'Build Succeeded'`" ]; then

    echo "ERROR: ltib build did not succeed. (see $LOG/ltib-pass2.log)"

    exit -99

    fi



    echo "$(date +'%H:%M:%S') ==== Making Second Stage Bootloader ===="

    tar -xf $DOWN/bootloader.tar.gz

    ( cd bootloader

    cp Makefile Makefile.orig

    cp bootloaderstg2.c bootloaderstg2.c.orig

    sed -i -e 's+^CC=+CC='"$ARM_BIN"'/+' Makefile

    sed -i -e 's+^LD=+LD='"$ARM_BIN"'/+' Makefile

    sed -i -e 's+^AS=+AS='"$ARM_BIN"'/+' Makefile

    sed -i -e 's+^LIBGCC=.*+LIBGCC=/opt/freescale/usr/local/gcc-4.1.2-glibc-2.5-nptl-3/arm-none-linux-gnueabi/arm-none-linux-gnueabi/sysroot/usr/lib+' Makefile

    sed -i -e 's+#define COMMAND_LINE[^_].*+#define COMMAND_LINE "console=ttymxc0 root=/dev/nfs nfsroot='"$MY_IP:$ROOT"'/rootfs rw init=/linuxrc ip='"$THE_IP::$THE_GATEWAY:$THE_MASK"' noalign"+' bootloaderstg2.c

    make loader > $LOG/make-bootloader.log 2>&1

    )



    echo "$(date +'%H:%M:%S') ==== Preparing network publish ===="

    sudo apt-get install tftp-hpa tftpd-hpa > /dev/null

    ln -s $BASE/bootloader/loader $ROOT/loader

    ln -s $LTIB/rootfs $ROOT/rootfs

    ( cd "$LTIB/rootfs/boot"

    for i in *; do

    ln -s "$LTIB/rootfs/boot/$i" "$ROOT/$i"

    done

    )

    cp /etc/exports exports-backup

    sudo sed -i -e '\+$ROOT+d' /etc/exports

    sudo sed -i -e '$a'"$ROOT"'/rootfs '"$THE_IP"'(rw,no_root_squash,async)' /etc/exports



    if [ -f /etc/xinetd.d/tftp ]; then

    if [ "`fgrep 'service' /etc/xinetd.d/tftp|wc -l`" -ge 2 ]; then

    echo ERROR: /etc/xinetd.d/tftp contains more then one service

    exit 999

    elif [ "`fgrep 'server_args' /etc/xinetd.d/tftp`" != "server_args = $ROOT" ]; then

    echo ERROR: /etc/xinetd.d/tftp contains another service

    exit 999

    else

    sudo rm /etc/xinetd.d/tftp

    fi

    fi

    sudo -s <
    cat >> /etc/xinetd.d/tftp <
    service tftp

    {

    disable = no

    socket_type = dgram

    protocol = udp

    wait = yes

    user = root

    server = /usr/sbin/in.tftpd

    server_args = $ROOT

    }

    EOF2

    EOF

    sudo /etc/init.d/xinetd restart

    sudo /usr/sbin/exportfs -a



    echo "$(date +'%H:%M:%S') ==== Preparing LITEKIT board ===="

    echo "=================================================================="

    echo " Connect the LITEKIT board to $THE_TTY"

    echo "=================================================================="

    read -p "Hit return when ready: "

    echo "=================================================================="



    cat > kick.sh <
    KICK=\`$ARM_BIN/arm-none-linux-gnueabi-objdump -t bootloader/loader|sed -n -e 's/\([0-9a-f]*\).* main/\1/p'\`

    START_Z=0x81000000

    LEN=\`cat $LTIB/rootfs/boot/zImage|wc -c\`



    for i in \\

    "('ifconfig sm0 $THE_IP $THE_MASK $THE_GATEWAY' 12)" \\

    "('load elf /tftp/$MY_IP:$ROOT/loader' 3)" \\

    "('load raw \$START_Z \$LEN /tftp/$MY_IP:$ROOT/zImage' 5)" \\

    "('exec 0x\$KICK -' 0)" \\

    ; do

    eval "i=\$i"

    cmd="\${i[0]}"

    slp="\${i[1]}"

    echo "\$cmd"

    echo "\$cmd" > $THE_TTY

    sleep \$slp

    done

    EOF

    chmod +x kick.sh

    ./kick.sh



    echo "possibly zap the root password from rootfs/etc/shadow"

    macneibfallon
    New Member
    New Member
    Posts:


    --
    20 Mar 2008 11:25 AM
    Wow, thanks, great job! I think a lot of people could find this useful!

    Which distro are you using for your host system?

    Regards,
    Blair
    tombrus
    New Member
    New Member
    Posts:


    --
    20 Mar 2008 12:03 PM
    ubuntu gutsy
    ecastelo
    New Member
    New Member
    Posts:


    --
    20 Mar 2008 12:33 PM
    In your script, it will complain about a couple of patches, do i skip these patches or how do i fix them?
    tombrus
    New Member
    New Member
    Posts:


    --
    20 Mar 2008 12:43 PM
    depends on which patches fail...
    can you post a log?
    ecastelo
    New Member
    New Member
    Posts:


    --
    20 Mar 2008 12:53 PM
    This is the first patch that pauses the script. Not sure what i am suppose to do here.


    Thanks

    11:35:54 ==== Doing ltib ====
    11:45:59 ==== Patching for LiteKit ====
    ./linux-2.6.22.6_Script.sh: line 175: cd: /home/ecastelo/LogicPD/kernel/ltib/ltib-imx31ads-20071008/rpm/BUILD/linux: No such file or directory
    The text leading up to this was:
    --------------------------
    |---
    | arch/arm/mach-mx3/usb.c | 2 +-
    | 1 file changed, 1 insertion(+), 1 deletion(-)
    |
    |Index: linux-2.6.22/arch/arm/mach-mx3/usb.c
    |===================================================================
    |--- linux-2.6.22.orig/arch/arm/mach-mx3/usb.c 2007-10-12 23:26:12.000000000 +0200
    |+++ linux-2.6.22/arch/arm/mach-mx3/usb.c 2007-10-18 21:51:44.000000000 +0200
    --------------------------
    File to patch:
    tombrus
    New Member
    New Member
    Posts:


    --
    20 Mar 2008 03:35 PM
    I think it is not the patch that is the problem, something went wrong at an earlier stage. the dir ltib-imx31ads-20071008/rpm/BUILD/linux should have been made in /home/ecastelo/LogicPD/kernel/ltib (the dir you run the script in). This dir should contain the linux tree. It is made by the ltib build. Check the log dir why it failed, it contains an ltib-1.log.
    ecastelo
    New Member
    New Member
    Posts:


    --
    20 Mar 2008 09:16 PM
    What does the -b option do for LTIB. Seems like LTIB is not building the kernel.

    From your script:
    (cd $LTIB;./ltib -b --preconfig $LTIB/config/platform/imx31ads/tom-defconfig > $LOG/ltib-pass2.log 2>&1)


    I changed the -b to a -c but not it seems like LTIB has hung on the ===== Doing ltib ===== step.
    tombrus
    New Member
    New Member
    Posts:


    --
    21 Mar 2008 12:09 AM
    -b is for batch, I redirect the output in a file. With -c you get the dialog, ehmmm in the output file, it is not hung, you just have to control the dialog in the blind... or just remove the output redirect.



    I am curious why it does not build for you.



    -Tom
    ewzoom
    New Member
    New Member
    Posts:


    --
    29 Mar 2008 01:49 PM
    I found the three inline patches in the script don't work on Ubuntu (7.10 32-bit) for me. Patch thinks they're corrupt and dies. Once I fixed them, the build went fine.
    tombrus
    New Member
    New Member
    Posts:


    --
    29 Mar 2008 02:20 PM
    Sad to hear, I'm on Ubuntu gutsy as well so probably some downloaded files changed in the mean time, I'll look into it next week.

    I have some updates to the script in the mean time as well, so I'll try to fix things and send an update asap.

    -Tom
    dsanders16@gmail.com
    New Member
    New Member
    Posts:


    --
    27 Apr 2008 05:19 PM
    I run into a failed patch, and then ltib build fails:

    18:13:33 ==== installing the BSP ====
    patch: **** malformed patch at line 6: CONFIG_PKG_KERNEL="kernel-2.6.22-mx"


    I also seem to be having a failed build on the ltib like the user before. But, I don't understand it, i suspect the error stems from here:


    Processing platform: host support
    ===================================
    using

    Processing: rpm-fs
    ====================
    sudo rpm --dbpath /tmp/rpm-derek/rpmdb -e --allmatches --nodeps rpm-fs 2>/dev/null
    sudo rpm --dbpath /tmp/rpm-derek/rpmdb --ignorearch -ivh --force --nodeps --excludedocs /tmp/rpm-derek/RPMS/x86_64/rpm-fs-4.0.4-1.x86_64.rpm
    ERROR: /tmp/rpm-derek/RPMS/x86_64/rpm-fs-4.0.4-1.x86_64.rpm
    would clobber reescale/ltib

    Started: Sun Apr 27 22:03:12 2008
    Ended: Sun Apr 27 22:03:12 2008
    Elapsed: 0 seconds

    Build Failed


    I dont know what the deal is here, its telling me it would clobber something that it wouldnt, so I have no clue.

    I also noticed that when it finally got to applying the patches, it would prompt me for the file I want to patch?
    dsanders16@gmail.com
    New Member
    New Member
    Posts:


    --
    28 Apr 2008 02:27 PM
    Well, I cannot get it to compile using the freescale supplied toolchain, it just refuses to do it. I am not sure what is happening, but even if I do ./ltib c and custom set the path to their toolchain it just complains. I compiled my own, and it compiles everything until it gets to busybox and fails.
    chrisw
    New Member
    New Member
    Posts:


    --
    27 Jun 2008 02:58 PM
    Thanks for the script tom! I couldn't actually run it all the way through without errors (w/ Debian), but I followed the procedure by hand and almost successfully ltib'd something... now I'm stuck at the same IRQ-90 message, and the board hangs. Were you able to find a solution?

    -chris
    rajani@mfintel.com
    New Member
    New Member
    Posts:


    --
    30 Jun 2008 06:58 AM
    Hi,

    I have seen this irq90 problem. I generally restart my dhcp server, I am hoping you configure dhcp services fine. I am using debian as well and here is how I do it:

    to setup:
    edit /etc/dhcp.conf file
    ddns-update-style ad-hoc;
    subnet 10.0.0.0 netmask 255.0.0.0 {
    host <name> {
    hardware ethernet 00:20:0c:10:75:0d;
    fixed-address 10.0.0.10;
    option root-path "/opt/...../linux/6.2/armv6j-std/rfs/";
    }
    }
    to just stop and start. there is also a restart that can be used:
    /etc/init.d/dhcp3-server stop
    /etc/init.d/dhcp3-server start

    Hope it helps, Rajani
    chrisw
    New Member
    New Member
    Posts:


    --
    30 Jun 2008 11:29 AM
    It boots ^_^ ! Rajani - you were right, my dhcpd.conf settings were incorrect, fixing these solved the IRQ-90 issue. Thank you!!
    embedded@ferrin.org
    New Member
    New Member
    Posts:


    --
    08 Aug 2008 08:32 AM
    I had some issue with ethernet / irq 90 on boot-up, and a line advising me to boot with "irqpoll" in the command line. Did so and it goes fine now.
    You are not authorized to post a reply.