Go to previous topic
Go to next topic
Last Post 24 Sep 2013 11:59 AM by  steven.eckhoff
ICS 4.0.4 source on Torpedo DM3730 not working
 18 Replies
Author Messages
will
New Member
New Member
Posts:9


--
11 Sep 2013 10:58 AM
    I've been trying to build ICS 4.0.4 from source following all steps and instructions found in the" Torpedo_DM3730_Android_ICS_4-0-4_BSP_Userguide" document. The build process does not show any errors and runs to completion. I copy the files to the SD card that came with the DM3730 Torpedo Dev Kit using the build scripts. When I start the system up Uboot finds the OS image and pulls it from the SD card. It uncompresses the Linux kernel but when it is time to boot it just hangs. The last message I see is "Uncompressing Linux... done, booting the kernel.".

    When I use the pre-compiled binaries for ICS 4.0.4 the OS boots fine and I can get into Android.

    Is there a missing step from the build process that should be document in the user guide?
    steven.eckhoff
    Basic Member
    Basic Member
    Posts:192


    --
    11 Sep 2013 11:36 AM
    Will,

    The first thing that comes to mind is that the U-Boot environment variables were set previously to boot the new Android Image. Go ahead and reset them by doing the following:

    1. Boot to the U-Boot prompt
    2. Then enter these commands:
    env -f default
    saveenv
    reset
    3. Now let the board boot
    will
    New Member
    New Member
    Posts:9


    --
    11 Sep 2013 12:38 PM
    Thanks Steven, but that did not work either. Still getting the same behavior.
    steven.eckhoff
    Basic Member
    Basic Member
    Posts:192


    --
    11 Sep 2013 01:28 PM
    Will,

    I have a couple questions:

    1. Are you interfacing to the board with an RS232 cable or are you using the UART DEBUG on J42?
    2. Will you also post the output from the printenv U-Boot command?
    will
    New Member
    New Member
    Posts:9


    --
    11 Sep 2013 01:47 PM

    1. Im using RS232 cable to interface to the dev kit board.

    2. The printenv output is below:

    OMAP Logic # printenv
    _addmtdparts=setenv bootargs ${bootargs} ${mtdparts}
    _autoboot=echo "\
    == Checking mmc1 for alternate boot script boot.scr ==";         if mmc init; then \
                 if run _loadbootscript; then \
                     echo ""; \
                     echo "== Found script on mmc 1, starting =="; \
                     run bootscript; \
                 else \
                     echo ""; \
                     echo "== Script not found on mmc 1, proceeding with defaultboot =="; \
                     run _defaultboot;\
                 fi; \
             else run _defaultboot; fi
    _burncommon=if test $error = '';then;else\
                       arg_filename=${xloadimage};run _checkmmcfile;\
                       arg_filename=${ubootimage};run _checkmmcfile;\
                       arg_filename=${kernelimage};run _checkmmcfile;\
                       arg_filename=${xloadimage};arg_partition=${xloader_partition};run _burnfile;\
                       arg_filename=${ubootimage};arg_partition=${uboot_partition};run _burnfile;\
                       arg_filename=${kernelimage};arg_partition=${kernel_partition};run _burnfile;\
                fi
    _burnfile=if test $error = '';then;else\
                    echo "== Loading ${arg_filename} =="\
                    echo_lcd /pAA/kPartition ${arg_partition}:\
                    echo_lcd /pBA/kLoading ${arg_filename}/aC;lcd_percent "/gC/k /P%..."\
                    if ${arg_loadcmd} ${loadaddr} ${arg_filename};then;\
                         echo "== Burning ${arg_partition} =="\
                         lcd_percent "/pBA/kErasing Partition /P%..."\
                         nand erase.part ${arg_partition}\
                         echo_lcd /pBA/kWriting ${arg_filename} to Partition/aC;lcd_percent "/gC/k /P%..."\
                         nand write.auto ${loadaddr} ${arg_partition} ${filesize}\
                         lcd_percent ""\
                         echo_lcd /pAA/k/pAB/k\
                    else\
                         setenv error "Unable to load ${arg_filename}"\
                    fi\
                fi
    _checkerror=if test $error = '';\
               then\
                   echo ${error}\
                   echo_lcd /pAA/k${error}\
               else\
                   echo Done!\
                   echo_lcd /pAA/kCompleted burning sucessfully./n\
                   echo_lcd /kIt is safe to remove the SD card/n\
                   echo_lcd /kand restart the devkit./n\
               fi
    _checkmmcfile=if test $error = '';then;else\
                     if fatload mmc 1 ${loadaddr} ${arg_filename} 1;then;else;\
                         setenv error "Unable to load ${arg_filename}";\
                     fi\
                 fi
    _common_bootargs=if true;then;\
                        setenv bootargs ${bootargs} display=${display} ${otherbootargs};\
                        run androidbootargs;\
                        run _addmtdparts;\
                        run _vrfb_arg;\
                    fi
    _defaultboot=if true;then\
                     run _dump_boot_sources;\
                     run setconsole; setenv bootargs console=${console};\
                     run _common_bootargs;\
                     run _load_kernel;\
                     run _load_rootfs;\
                     run _set_rootfs_type;\
                     run dump_bootargs;\
                     run _dump_run_bootm;\
                 fi
    _dump_boot_sources=echo "kernel_location: $kernel_location, rootfs_location: $rootfs_location, rootfs_type: $rootfs_type"; echo "";
    _dump_run_bootm=if true;then\
                       echo "bootm $bootm_arg1 $bootm_arg2";\
                       echo "";\
                       bootm $bootm_arg1 $bootm_arg2\
                   fi
    _initmmc=if test $error = '';then;else\
                if mmc init;then;else;\
                    setenv error "Failed to initialize MMC"\
                fi\
            fi
    _load_kernel=setenv bootm_arg1;if run _load_kernel_$kernel_location; then;else \
                    echo "== kernel_location must be set to ram, nand, mmc, or tftp!! =="; \
                    echo ""; \
                fi\
    
    _load_kernel_mmc=if true;then;\
                         echo "== Loading kernel file $kernelimage to $loadaddr =="; \
                         mmc init; \
                         fatload mmc 1 $loadaddr $kernelimage; \
                         echo ""; \
                         setenv bootm_arg1 ${loadaddr};\
                     fi
    _load_kernel_nand=if true;then;\
                       echo "== Loading kernel from nand to $loadaddr =="; \
                       nand read.i $loadaddr $kernel_partition; \
                       echo ""; \
                       setenv bootm_arg1 ${loadaddr};\
                     fi
    _load_kernel_nand-part=if true;then;\
                            echo "== Loading kernel from nand partition $kernel_partition to $loadaddr =="; \
                            nboot $loadaddr $kernel_partition; \
                            echo ""; \
                            setenv bootm_arg1 ${loadaddr};\
                          fi
    _load_kernel_ram=if true;then;\
                      echo "== kernel located at $Loadaddr ==\
    "\
                      setenv bootm_arg1 ${loadaddr}\
                    fi
    _load_kernel_tftp=if true;then;\
                         echo "== Loading kernel file $tftpdir$kernelimage to $loadaddr =="; \
                         tftpboot $loadaddr $tftpdir$kernelimage; \
                         echo ""; \
                         setenv bootm_arg1 ${loadaddr};\
                     fi
    _load_rootfs=setenv bootm_arg2;if run _load_rootfs_$rootfs_location; then;else \
                    echo "== rootfs_location must be set to ram, tftp, /dev, nfs, mmc, nand-part or nand!! == "; \
                    echo ""; \
                fi\
    
    _load_rootfs_/dev=if true;then;\
                         echo "== rootfs located in $rootfs_device =="; \
                         echo ""; \
                         setenv bootargs ${bootargs} root=${rootfs_device}; \
                     fi
    _load_rootfs_mmc=if true;then;\
                        echo "== Loading rootfs file $ramdiskimage to $ramdiskaddr =="; \
                        fatload mmc 1 ${ramdiskaddr} ${ramdiskimage}; \
                        setenv bootm_arg2 ${ramdiskaddr}; \
                    fi
    _load_rootfs_nand=if true;then;\
                         echo "== Loading rootfs from nand to $ramdiskaddr =="; \
                         nand read.i $ramdiskaddr $ramdisk_partition; \
                         setenv bootm_arg2 ${ramdiskaddr}; \
                     fi
    _load_rootfs_nand-part=if true;then;\
                              echo "== Loading rootfs from nand partition $ramdisk_partition to $ramdiskaddr =="; \
                              nand read.i $ramdiskaddr $ramdisk_partition; \
                              setenv bootm_arg2 ${ramdiskaddr}; \
                          fi
    _load_rootfs_nfs=if true;then;\
                        echo "== rootfs located at $nfsrootpath on server $serverip =="; \
                        echo ""; \
                        setenv bootargs ${bootargs} root=/dev/nfs; \
                    fi
    _load_rootfs_ram=if true;then;\
                        echo "== rootfs located at $ramdiskaddr =="; \
                        echo ""; \
                        setenv bootm_arg2 ${ramdiskaddr}; \
                    fi
    _load_rootfs_tftp=if true;then;\
                         echo "== Loading rootfs file $tftpdir$ramdiskimage to $ramdiskaddr =="; \
                         tftpboot $ramdiskaddr $tftpdir$ramdiskimage;\
                         echo ""; \
                         setenv bootm_arg2 ${ramdiskaddr}; \
                     fi
    _loadbootscript=fatload mmc 1 $mmc_bootscript_addr boot.scr
    _makeandroidboot=if true;then;\
                     setenv error;\
                     run _initmmc;\
                     arg_filename=system.img;run _checkmmcfile;\
                     arg_filename=userdata.img;run _checkmmcfile;\
                     run _burncommon;\
                     arg_filename=system.img;arg_partition=system;run _burnfile\
                     arg_filename=userdata.img;arg_partition=userdata;run _burnfile\
                     if test $error = '';then;else\
                         nand erase.part cache\
                         setenv kernel_location nand-part\
                         setenv rootfs_location /dev\
                         setenv rootfs_type yaffs\
                         setenv rootfs_device /dev/mtdblock5\
                         saveenv\
                     fi\
                     run _checkerror;\
                 fi
    _makenandboot=if true;then;\
                     setenv error;\
                     run _initmmc;\
                     arg_filename=${ramdiskimage};run _checkmmcfile;\
                     run _burncommon;\
                     arg_filename=${ramdiskimage};arg_partition=${ramdisk_partition};run _burnfile;\
                     if test $error = '';then;else\
                         setenv kernel_location nand-part\
                         setenv rootfs_location nand-part\
                         setenv rootfs_type ramdisk\
                         saveenv\
                     fi\
                     run _checkerror;\
                 fi
    _makeyaffsboot=if true;then;\
                     setenv error;\
                     run _initmmc;\
                     arg_filename=${yaffsimage};run _checkmmcfile;\
                     run _burncommon;\
                     arg_filename=${yaffsimage};arg_partition=${yaffs_partition};run _burnfile\
                     if test $error = '';then;else\
                         setenv kernel_location nand-part\
                         setenv rootfs_location /dev\
                         setenv rootfs_type yaffs\
                         setenv rootfs_device /dev/mtdblock5\
                         saveenv\
                     fi\
                     run _checkerror;\
                 fi
    _set_rootfs_type=if run _set_rootfs_type_${rootfs_type}; then;else \
                        echo "== $rootfs_type must be set to ramdisk, jffs, yaffs, ext3, or nfs =="; \
                        echo ""; \
                    fi
    _set_rootfs_type_ext3=setenv bootargs ${bootargs} rw rootfstype=ext3 rootwait
    _set_rootfs_type_jffs=setenv bootargs ${bootargs} rw rootfstype=jffs2
    _set_rootfs_type_nfs=setenv bootargs ${bootargs} rw nfsroot=${serverip}:${nfsrootpath}${nfsoptions} ip=dhcp
    _set_rootfs_type_ramdisk=setenv bootargs ${bootargs} root=/dev/ram rw ramdisk_size=${ramdisksize}
    _set_rootfs_type_yaffs=setenv bootargs ${bootargs} rw rootfstype=yaffs2
    _vrfb_arg=if itest ${rotation} -ne 0; then \
                  setenv bootargs ${bootargs} omapfb.vrfb=y omapfb.rotate=${rotation}; \
              fi
    androidbootargs=setenv bootargs ${bootargs} omap_vout.vid1_static_vrfb_alloc=y vram=32M omapfb.vram=0:16M androidboot.console=${consoledevice} androidboot.serialno=${logic_serial} androidboot.charger=true
    arg_loadcmd=fatload mmc 1
    autoboot=run _autoboot
    autoload=no
    baudrate=115200
    bootcmd=run check_rebootreason;run autoboot;fastboot
    bootdelay=3
    bootfile=uImage
    bootscript=source ${mmc_bootscript_addr}
    check_rebootreason=mw ${loadaddr} 0x424d0062;if cmp ${loadaddr} 0x48002914 1;then mw 0x48002914 0;fastboot;fi;mw 0x48002914 0
    consoledevice=ttyO0
    defaultboot=run _defaultboot
    defaultecc=chip
    dieid#=203600029ff80000016830101801100f
    disablecharging=no
    display=28
    dump_bootargs=echo ""; echo "== Kernel bootargs =="; echo $bootargs; echo "";
    ethact=smc911x-0
    kernel_location=mmc
    kernel_partition=boot
    kernelimage=boot.img
    loadaddr=0x81000000
    logic_serial=2712M00266
    makeandroidboot=run _makeandroidboot
    makenandboot=run _makenandboot
    makeyaffsboot=run _makeyaffsboot
    mmc_bootscript_addr=0x80FF0000
    mtdflags=default=ecc_chip;x-loader=ecc_hw,repeat;system=yaffs;userdata=yaffs;cache=yaffs
    mtdids=nand0=omap2-nand.0
    mtdparts=mtdparts=omap2-nand.0:512k(x-loader),1664k(u-boot),384k(u-boot-env),10240k(boot),128000k(system),128000k(userdata),255488k(cache)
    nfsboot=if true;then\
                setenv kernel_location tftp\
                setenv rootfs_location nfs\
                setenv rootfs_type nfs\
                run defaultboot\
            fi
    nfsoptions=,wsize=1500,rsize=1500
    nfsrootpath=/opt/nfs-exports/ltib-omap
    otherbootargs=
    ramboot=if true;then\
                setenv kernel_location tftp\
                setenv rootfs_location tftp\
                setenv rootfs_type ramdisk\
                run defaultboot\
            fi
    ramdisk_partition=ramdisk
    ramdiskaddr=0x82000000
    ramdiskimage=rootfs.ext2.gz.uboot
    ramdisksize=64000
    rootfs_device=/dev/mtdblock5
    rootfs_location=blah
    rootfs_type=ramdisk
    rotation=0
    serverip=192.168.3.10
    setconsole=setenv console ${consoledevice},${baudrate}n8
    splashimage=0x8F863918
    splashpos=m,m
    stderr=serial
    stdin=serial
    stdout=serial
    uboot_partition=u-boot
    ubootimage=u-boot.bin.ift
    xloader_partition=x-loader
    xloadimage=mlo
    yaffs_partition=fs
    yaffsimage=rootfs.yaffs2 
    steven.eckhoff
    Basic Member
    Basic Member
    Posts:192


    --
    11 Sep 2013 04:10 PM
    Will,

    I believe that is all fine. I usually see this behavior when the consoledevice is set wrong. U-Boot hands off to the kernel and the kernel outputs to something other than the device connected with the RS232 port. Unfortunately, I am not sure yet about what is causing this behavior. Will you also send me a log of the terminal output when you boot?
    will
    New Member
    New Member
    Posts:9


    --
    11 Sep 2013 06:06 PM
    Sure. Here is the terminal output.

    Texas Instruments X-Loader 1.42  for dm3730logic (2013-09-10 14:03:12)
    DRAM: 256MB (ProductID defined)
    Starting U-boot on MMC
    Reading boot sector
    443220 bytes read from MMC to 80400000
    
    
    U-Boot 2011.06  (Sep 10 2013 - 14:03:17)
    
    OMAP3630/3730-GP ES2.1, CPU-OPP2, L3-200MHz, Max CPU Clock 1 Ghz
    Logic DM37x/OMAP35x reference board + LPDDR/NAND
    I2C:   ready
    DRAM:  256 MiB
    Board: DM37xx Torpedo
    Enable battery backup charger (BB_CFG = 0x1c)
    NAND:  512 MiB
    NAND: Internal to NAND ECC selected
    Found '28' display panel
    In:    serial
    Out:   serial
    Err:   serial
    Product ID data cached to: 40200000
    Die ID #203600029ff80000016830101801100f
    OTG_SYSCONFIG: 00001008 - needs to be 00002001
    
    ID data ROM  : Gen 2
    Model        : dm3730 Torpedo
    Version Code : -30
    Temp Grade   : Commercial
    Max Speed    : 1000MHz
    Part Number  : 1021711
    Model Name   : SOMDM3730-30-2780AKCR-A
    Serial Number: 2712M00266
    
    Data (writethrough) Cache is ON
    Net:   smc911x-0
    
    =================================== NOTICE ===================================
    The U-Boot environment was not found. If the display is not set properly
    linux will not have video support.
    
    Valid display options are:
      2 == LQ121S1DG31     TFT SVGA    (12.1)  Sharp
      3 == LQ036Q1DA01     TFT QVGA    (3.6)   Sharp w/ASIC
      5 == LQ064D343       TFT VGA     (6.4)   Sharp
      7 == LQ10D368        TFT VGA     (10.4)  Sharp
     15 == LQ043T1DG01     TFT WQVGA   (4.3)   Sharp
     28 == LQ043T1DG28     TFT WQVGA   (4.3)   Sharp (DEFAULT)
     vga[-16 OR -24]       LCD VGA     640x480
     svga[-16 OR -24]      LCD SVGA    800x600
     xga[-16 OR -24]       LCD XGA     1024x768
     720p[-16 OR -24]      LCD 720P    1280x720
     sxga[-16 OR -24]      LCD SXGA    1280x1024
     uxga[-16 OR -24]      LCD UXGA    1600x1200
    
    Default `display` environment variable is now being set to: 28
    
    At the U-Boot prompt type commands: `setenv display `, then type
    `saveenv` to save the environment to NAND flash.  This will avoid seeing
    this notice on future boots
    =================================== NOTICE ===================================
    
    Hit any key to stop autoboot:  0
    word at 0x81000000 (0x424d0062) != word at 0x48002914 (0x72b6474d)
    Total of 0 words were the same
    
    == Checking mmc1 for alternate boot script boot.scr ==
    mmc1 is available
    reading boot.scr
    
    798 bytes read
    
    == Found script on mmc 1, starting ==
    ## Executing script at 80ff0000
    mmc1 is available
    Booting Android...
    Loading uImage from mmc to 0x81000000]...
    bootargs=console=ttyO0,115200 display=28 root=/dev/mmcblk0p2 rw rootwait init=/init androidboot.console=ttyO0 omap_vout.vid1_static_vrfb_alloc=y vram=32M omapfb.vram=0:16M
    reading uImage
    
    4248848 bytes read
    ## Booting kernel from Legacy Image at 81000000 ...
       Image Name:   Linux-3.0.8-g665cfc8
       Image Type:   ARM Linux Kernel Image (uncompressed)
       Data Size:    4248784 Bytes = 4.1 MiB
       Load Address: 80008000
       Entry Point:  80008000
       Verifying Checksum ... OK
       Loading Kernel Image ... OK
    OK
    
    Starting kernel ...
    
    Uncompressing Linux... done, booting the kernel. 
    steven.eckhoff
    Basic Member
    Basic Member
    Posts:192


    --
    12 Sep 2013 10:26 AM
    Will,

    I don't see anything wrong in this output. I reviewed the ICS UG document and I am using the same build. It is possible that something was changed from then. I am going to pull and build the source as described in the document to attempt to duplicate this issue. This will take some time, but I will get back to you as soon as I have the board booting.
    will
    New Member
    New Member
    Posts:9


    --
    12 Sep 2013 10:29 AM
    Thank you Steven. I will standby.
    steven.eckhoff
    Basic Member
    Basic Member
    Posts:192


    --
    13 Sep 2013 10:20 AM
    Will,

    I pulled a fresh BSP and rebuilt it and everything worked correctly. I simple did ./build.sh -AFS which built, formatted and deployed the images onto the SD card. Maybe there was something that went wrong on this step. Will you also try the same command sequence and post the output form the script here?
    will
    New Member
    New Member
    Posts:9


    --
    13 Sep 2013 03:22 PM
    Steven,

    I just tried the ./build.sh -AFS but Linux still does not boot. Here is the output from the terminal during the build process:


    student@marakana-ubuntu-10:dm3730logic-icecreamsandwich_copy2$./build.sh -AFS
    Building xloader         - took 1.009 seconds to build.
    Building uboot_no_env    - took 0.000 seconds to build.
    Building uboot_fastboot  - took 0.000 seconds to build.
    Building uboot           - took 10.877 seconds to build.
    Building kernel          - took 110.841 seconds to build.
    Building android         - took 258.126 seconds to build.
    Building sgx_modules     - took 10.748 seconds to build.
    Building images          - took 192.241 seconds to build.
    Devices available:
      sdb is    3.7GB - Card  Reader    
    Enter device: sdb
    Enter student's password, for SD manipulation permissions: 
    
    Unmounting /media/boot
    Unmounting /media/rootfs
    About to erase and format sdb (   3.7GB - Card  Reader    )
    Do you wish to continue? (y/N) y
    Partitioning sdb.
    [sudo] password for student: 
    Formatting SD card.
    Deploying to sd
    Mounting bootloader partition
    Mounting root partition
    Extracting root tarball
    Extracting system tarball
    Extracting userdata tarball
    Filtering init.rc for mtd mount commands
    Flushing data to SD card
    Unmounting bootloader partition
    Unmounting root partition
    Image deployed. SD card can be removed.
    student@marakana-ubuntu-10:dm3730logic-icecreamsandwich_copy2$ 
    steven.eckhoff
    Basic Member
    Basic Member
    Posts:192


    --
    17 Sep 2013 11:58 AM
    • Accepted Answer
    Will,

    Which OS and version are you using? The user's guide says to use Ubuntu 10.04. If you want to, you can use one of the VMs [1] that we have set up for the Linux BSP.

    [1] http://support.logicpd.co...M3703TorpedoSOM.aspx
    will
    New Member
    New Member
    Posts:9


    --
    17 Sep 2013 12:05 PM
    I'm using Ubuntu 10.10, maverick, running as a VM (VMware) on a Windows 7 computer.

    I tried the link to the VM you posted but I got:
    404 - File or directory not found. 
    The resource you are looking for might have been removed, had its name changed, or is temporarily unavailable.


    Is there another link to the VM? I would be interested in trying that.
    steven.eckhoff
    Basic Member
    Basic Member
    Posts:192


    --
    17 Sep 2013 12:42 PM
    Will,

    You need to sign in to be able to access the links. I have updated the link to point to the downloads page. You will need to sign in and then scroll down until you see the link to the Linux VM.
    steven.eckhoff
    Basic Member
    Basic Member
    Posts:192


    --
    20 Sep 2013 12:29 PM
    Will,

    Did you get this issue resolved?
    will
    New Member
    New Member
    Posts:9


    --
    20 Sep 2013 04:08 PM
    Hi Steven,

    I tried getting the LogicPD VM up and running but ran into several issues. I decided to create a VM based on Ubuntu 10.04 on my own. I'm currently repeating the steps from the ICS User Guide on this new VM. I will let you know of the outcome.
    steven.eckhoff
    Basic Member
    Basic Member
    Posts:192


    --
    24 Sep 2013 10:07 AM
    Will,

    Have you had any success in setting up your VM?
    will
    New Member
    New Member
    Posts:9


    --
    24 Sep 2013 10:12 AM
    Hi Steven,

    I just got Android working and was about to write to you. My problem was that I was using Ubuntu 10.10. Using 10.04 solved the problem.

    Thank you for all your help.
    steven.eckhoff
    Basic Member
    Basic Member
    Posts:192


    --
    24 Sep 2013 11:59 AM
    Will,

    That is great to hear. I am glad you resolved the issue. Currently, I would only recommend using 10.04.


    ---