This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

am335x_evm and sdk ver 07.00 having problems

Hi,

I am new to the embedded linux environment. Please help in solving the following issue.

I am working on am335x_evm and ti-sdk-am335x-evm-07.00.00.00-Linux-x86-Install. When I am trying to create sd card images using the script only MLO and u-boot.img are being copied into boot partition. And the board is being stopped at Uboot as there is no kernal image. The log while creating the sd card image is as follows. Even with sdk version 06.00 the same problem is existing. My requirement is now I have to edit the dts file for other serial ports enabling(other than console) and compile the kernel and use the serial port from  user interface application. Even Im copying the uImage, dtb files manually its not working. And I have doubts on uEnv.txt file also. Uboot is searching for this file if its not existing then stops booting kernel. I tried to keep a file just the name uEnv.txt then the uImage is being copied but stopped at Starting kernal..... log. Pleas hlep me in solving these issues. Please give details for each query. Thanks in anticipation. 

Log for sd card script:

   Device Boot Start     End   #cyls    #blocks   Id  System
/dev/sdb1   *      0+      8       9-     72261    c  W95 FAT32 (LBA)
/dev/sdb2         10     239     230    1847475   83  Linux
/dev/sdb3          0       -       0          0    0  Empty
/dev/sdb4          0       -       0          0    0  Empty
Successfully wrote the new partition table

Re-reading the partition table ...

If you created or changed a DOS partition, /dev/foo7, say, then use dd(1)
to zero the first 512 bytes:  dd if=/dev/zero of=/dev/foo7 bs=512 count=1
(See fdisk(8).)

################################################################################

        Partitioning Boot

################################################################################
mkfs.vfat 3.0.12 (29 Oct 2011)

################################################################################

        Partitioning rootfs

################################################################################
mke2fs 1.42 (29-Nov-2011)
Filesystem label=rootfs
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
115680 inodes, 461868 blocks
23093 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=473956352
15 block groups
32768 blocks per group, 32768 fragments per group
7712 inodes per group
Superblock backups stored on blocks:
    32768, 98304, 163840, 229376, 294912

Allocating group tables: done                            
Writing inode tables: done                            
Creating journal (8192 blocks): done
Writing superblocks and filesystem accounting information: done



################################################################################

   Partitioning is now done
   Continue to install filesystem or select 'n' to safe exit

   **Warning** Continuing will erase files any files in the partitions

################################################################################


Would you like to continue? [y/n] : y

 
 
Mount the partitions
 
Emptying partitions
 

Syncing....

################################################################################

    Choose file path to install from

    1 ) Install pre-built images from SDK
    2 ) Enter in custom boot and rootfs file paths

################################################################################

Choose now [1/2] : 1

 
Will now install from SDK pre-built images
now installing:  ti-sdk-am335x-evm-07.00.00.00
################################################################################

    Copying files now... will take minutes

################################################################################

Copying boot partition

MLO copied


u-boot.img copied


Copying rootfs System partition
Written 100%  

Syncing...
 
Un-mount the partitions
 
Remove created temp directories
 
Operation Finished

Regards,

Vijaykumar Ponugoti
 

  • Vijaykumar,

    TI-RTOS is the TI real time operating system, so that forum is not appropriate for your question. I have moved this thread over to the Linux forum in hopes that it will get a faster response there.
  • Hi Vijaykumar,

    To make a sd-card you have to use script from sdk 7. The script is located in:
    ~/ti-sdk-am335x-evm-07.00.00.00/bin$
    sudo ./create-sdcard.sh

    The script will make all, but for your information in this skd uImage is not used. Here is used zImage and its located in a rootfs/boot directory. There are also xxxboard.dtb file.

    BR
    Ivan
  • Hi Ivan Matrakov ,
    Thanking for your respnse.
    Yes. Iam using the sdk 7. And im preparing the sd card image with the same script. Yes I found the uImage and .dtb files in the rootfs/boot folder. But When Im trying to boot from sd card its searching for uEnv.txt file and as it not there in boot partition the control stops at Uboot. I do not know how the uEnv.txt to write and pass the arguments so that the images from rootfs/boot folder will be executed.
    Please help me.
    Rgds,
    Vijaykumar
  • Hi Vijaykumar,

    The issue is not in a uEnv.txt file. On my sd-card this file also missing, and the system is booting well. Please see if your sd-card is not damage. If you changed the output to other serial port you have to change the boot parameters from the u-boot: <>/ti-sdk-am335x-evm-07.00.00.00/board-support/u-boot-2013.10-ti2013.12.01/include/configs/am335x_evm.h . Here you can change ttyO0 with ttyOx, where the x is a used uart. Or you can change this parameter from u-boot with setenv.

    BR
    Ivan
  • Hi Ivan Matrakov ,
    Thank you so much for bearing me patiently.
    Yes. As you said, it seems uEnv.txt is not required. Seems it is directly taken care by bootargs present in am335x_evm.h file. Am i correct.? When I observed in the /rootfs/boot folder zImage is present where are as uboot is searching for uImage. Even Iam using pre-built Images why this zImage is copied into the folder?
    Please let me know what am I supposed to do now.? I have tried with, converting the zImage available in the boot folder to uImage with mkimage command and tried to boot the board. But it got stopped as usual at "starting Kernel.......".
    And one more thing is that so far I did not change any code in the sdk. I am simply using it to make sd card images. In that case how that other serial port got routed to terminal.?

    Please give me details for how the zImage is replaced with zImage.? and if the terminal board routed to other serial port how this can be changed to normal one?(I am using default configs from TI.)
    How your board is working with prebuilt images directly while mine is not.?

    Here is the log while executing the script.

    root@C528-OptiPlex-960:/home/intuser/ti-sdk-am335x-evm-07.00.00.00# ./bin/create-sdcard.sh


    ################################################################################

    This script will create a bootable SD card from custom or pre-built binaries.

    The script must be run with root permissions and from the bin directory of
    the SDK

    Example:
    $ sudo ./create-sdcard.sh

    Formatting can be skipped if the SD card is already formatted and
    partitioned properly.

    ################################################################################


    Availible Drives to write images to:

    # major minor size name
    1: 8 16 1931264 sdb

    Enter Device Number or n to exit: 1

    sdb was selected

    /dev/sdb is an sdx device
    Unmounting the sdb drives
    unmounted /dev/sdb1
    Current size of sdb1 1930240 bytes
    SD Card is not correctly partitioned

    ################################################################################

    Select 2 partitions if only need boot and rootfs (most users)
    Select 3 partitions if need SDK & CCS on SD card. This is usually used
    by device manufacturers with access to partition tarballs.

    ****WARNING**** continuing will erase all data on sdb

    ################################################################################

    Number of partitions needed [2/3] : 2


    Now partitioning sdb with 2 partitions...


    ################################################################################

    Now making 2 partitions

    ################################################################################

    1024+0 records in
    1024+0 records out
    1048576 bytes (1.0 MB) copied, 0.235235 s, 4.5 MB/s
    Disk /dev/sdb doesn't contain a valid partition table
    DISK SIZE - 1977614336 bytes
    Checking that no-one is using this disk right now ...
    OK

    Disk /dev/sdb: 240 cylinders, 255 heads, 63 sectors/track

    sfdisk: ERROR: sector 0 does not have an msdos signature
    /dev/sdb: unrecognized partition table type
    Old situation:
    No partitions found
    New situation:
    Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0

    Device Boot Start End #cyls #blocks Id System
    /dev/sdb1 * 0+ 8 9- 72261 c W95 FAT32 (LBA)
    /dev/sdb2 10 239 230 1847475 83 Linux
    /dev/sdb3 0 - 0 0 0 Empty
    /dev/sdb4 0 - 0 0 0 Empty
    Successfully wrote the new partition table

    Re-reading the partition table ...

    If you created or changed a DOS partition, /dev/foo7, say, then use dd(1)
    to zero the first 512 bytes: dd if=/dev/zero of=/dev/foo7 bs=512 count=1
    (See fdisk(8).)

    ################################################################################

    Partitioning Boot

    ################################################################################
    mkfs.vfat 3.0.12 (29 Oct 2011)

    ################################################################################

    Partitioning rootfs

    ################################################################################
    mke2fs 1.42 (29-Nov-2011)
    Filesystem label=rootfs
    OS type: Linux
    Block size=4096 (log=2)
    Fragment size=4096 (log=2)
    Stride=0 blocks, Stripe width=0 blocks
    115680 inodes, 461868 blocks
    23093 blocks (5.00%) reserved for the super user
    First data block=0
    Maximum filesystem blocks=473956352
    15 block groups
    32768 blocks per group, 32768 fragments per group
    7712 inodes per group
    Superblock backups stored on blocks:
    32768, 98304, 163840, 229376, 294912

    Allocating group tables: done
    Writing inode tables: done
    Creating journal (8192 blocks): done
    Writing superblocks and filesystem accounting information: done



    ################################################################################

    Partitioning is now done
    Continue to install filesystem or select 'n' to safe exit

    **Warning** Continuing will erase files any files in the partitions

    ################################################################################


    Would you like to continue? [y/n] : y



    Mount the partitions

    Emptying partitions


    Syncing....

    ################################################################################

    Choose file path to install from

    1 ) Install pre-built images from SDK
    2 ) Enter in custom boot and rootfs file paths

    ################################################################################

    Choose now [1/2] : 1


    Will now install from SDK pre-built images
    now installing: ti-sdk-am335x-evm-07.00.00.00
    ################################################################################

    Copying files now... will take minutes

    ################################################################################

    Copying boot partition

    MLO copied


    u-boot.img copied


    Copying rootfs System partition
    Written 100%

    Syncing...

    Un-mount the partitions

    Remove created temp directories

    Operation Finished

    root@C528-OptiPlex-960:/home/intuser/ti-sdk-am335x-evm-07.00.00.00#


    Rgds,
    Vijaykumar P
  • Hi Ivan Matrakov ,

    In continuation to the above mail,

    in uboot include/configs/am335x_evm.h contains

    #define CONFIG_EXTRA_ENV_SETTINGS \

           "loadaddr=0x80200000\0" \

           "fdtaddr=0x80F80000\0" \

           "fdt_high=0xa0000000\0" \

           "boot_fdt=try\0" \

           "rdaddr=0x81000000\0" \

           "bootpart=0:2\0" \

           "bootdir=/boot\0" \

           "bootfile=zImage\0" \

           "fdtfile=undefined\0" \

           "console=ttyO0,115200n8\0" \

           "partitions=" \

                   "uuid_disk=${uuid_gpt_disk};" \

                   "name=rootfs,start=2MiB,size=-,uuid=${uuid_gpt_rootfs}\0" \

           "optargs=\0" \

           "dfu_alt_info_mmc=" DFU_ALT_INFO_MMC "\0" \

           "dfu_alt_info_emmc=rawemmc mmc 0 3751936\0" \

           "mmcdev=0\0" \

           "mmcroot=/dev/mmcblk0p2 ro\0" \

           "mmcrootfstype=ext4 rootwait\0" \

           "usbroot=/dev/sda2 rw\0" \

    Please look at the text red in color(I did not make any changes.). I have tried to build the uboot with this config and boot with this. Still it is searching for uImage.

    Then I tried to build linux kernal with

     make tisdk_am335x-evm_defconfig

    make uImage


    Then I copied this image to rootfs/boot folder. Then the log I am seeing is given below.

    U-Boot 2013.01.01 (Jul 30 2014 - 11:44:36)                                                              

    I2C:   ready                                                                                            

    DRAM:  512 MiB                                                                                          

    WARNING: Caches not enabled                                                                            

    NAND:  256 MiB                                                                                          

    MMC:   OMAP SD/MMC: 0, OMAP SD/MMC: 1                                                                  

    musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, bulk combine, bulk split, HB-ISO Rx, HB-ISO Tx, SoftConn)

    musb-hdrc: MHDRC RTL version 2.0                                                                        

    musb-hdrc: setup fifo_mode 4                                                                            

    musb-hdrc: 28/31 max ep, 16384/16384 memory                                                            

    USB Peripheral mode controller at 47401000 using PIO, IRQ 0                                            

    musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, bulk combine, bulk split, HB-ISO Rx, HB-ISO Tx, SoftConn)

    musb-hdrc: MHDRC RTL version 2.0                                                                        

    musb-hdrc: setup fifo_mode 4                                                                            

    musb-hdrc: 28/31 max ep, 16384/16384 memory                                                            

    USB Host mode controller at 47401800 using PIO, IRQ 0                                                  

    Net:   cpsw, usb_ether                                                                                  

    Hit any key to stop autoboot:  0                                                                        

    mmc0 is current device                                                                                  

    SD/MMC found on device 0                                                                                

    reading uEnv.txt                                                                                        

    ** Unable to read file uEnv.txt **                                                                      

    reading uImage                                                                                          

    ** Unable to read file uImage **                                                                        

    4103112 bytes read in 470 ms (8.3 MiB/s)                                                                

    Booting from mmc ...                                                                                    

    ## Booting kernel from Legacy Image at 80007fc0 ...                                                    

      Image Name:   Linux-3.12.10-ti2013.12.01                                                            

      Image Type:   ARM Linux Kernel Image (uncompressed)                                                  

      Data Size:    4103048 Bytes = 3.9 MiB                                                                

      Load Address: 80008000                                                                              

      Entry Point:  80008000                                                                              

      Verifying Checksum ... OK                                                                            

      XIP Kernel Image ... OK                                                                              

    OK                                                                                                      

    Starting kernel ...          

    Thats it. Here it gets Halted it seems.

    Please help me.

    Thanks in anticipation.

    Rgds,

    Vijaykumar P                                                                        

  • Hi Vijaykumar,

    This log is for SDK 6 NOT for SDK 7. The contents of sd-card for sdk6 is differen from this for sdk7. If you want to use sdk6 as I see you have to copy on a boot partition MLO, u-boot.img and uImage. On the partition rootfs you have to copy file systems. I type my log on the sdk6 to see that the system is booting without any problem.


    U-Boot 2013.01.01 (Jun 25 2013 - 16:42:52)

    I2C: ready
    DRAM: 512 MiB
    WARNING: Caches not enabled
    NAND: 256 MiB
    MMC: OMAP SD/MMC: 0, OMAP SD/MMC: 1
    musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, bulk combine, bulk split, HB-ISO Rx, HB-ISO Tx, SoftConn)
    musb-hdrc: MHDRC RTL version 2.0
    musb-hdrc: setup fifo_mode 4
    musb-hdrc: 28/31 max ep, 16384/16384 memory
    USB Peripheral mode controller at 47401000 using PIO, IRQ 0
    musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, bulk combine, bulk split, HB-ISO Rx, HB-ISO Tx, SoftConn)
    musb-hdrc: MHDRC RTL version 2.0
    musb-hdrc: setup fifo_mode 4
    musb-hdrc: 28/31 max ep, 16384/16384 memory
    USB Host mode controller at 47401800 using PIO, IRQ 0
    Net: cpsw, usb_ether
    Hit any key to stop autoboot: 0
    mmc0 is current device
    SD/MMC found on device 0
    reading uEnv.txt
    ** Unable to read file uEnv.txt **
    reading uImage
    3194336 bytes read in 356 ms (8.6 MiB/s)
    Booting from mmc ...
    ## Booting kernel from Legacy Image at 80007fc0 ...
    Image Name: Linux-3.2.0
    Image Type: ARM Linux Kernel Image (uncompressed)
    Data Size: 3194272 Bytes = 3 MiB
    Load Address: 80008000
    Entry Point: 80008000
    Verifying Checksum ... OK
    XIP Kernel Image ... OK
    OK

    Starting kernel ...

    Uncompressing Linux... done, booting the kernel.
    ...
    ...

    BR
    Ivan
  • Hi Ivan,
    ti-sdk-am335x-evm-07.00.00.00-Linux-x86-Install.bin this is the image I ve downloaded for TI website 4days back.
    ti-sdk-am335x-evm-07.00.00.00 This is the folder I ve got on my PC in {HOME} path once installed the above bin file.
    The logs which I ve shared with you are when I boot the board with this sdk only.
    My boot partition contains only MLO,u-boot.img.
    rootfs/boot folder contains zImage. I tried to copy uImage into this folder. Not to boot PARTITION. This is case where I got the log which I shared to you. If I just booted with the sd card without copying this then it is showing
    ** Could not find uImage **
    ** Unable to read the file uImage **
    Uboot #

    Few days back I worked on sdk 6 also. Still it was same problem. It copies only MLO and u-boot.img files to boot PARTITION.

    Are you working on pre built images? Are you using AM335x_evm board only? Is it working for you without a single change in your code or configuration? Please let me know if you made any changes to ur code or configuration.
    And ofcourse there are changes in sdk6 to sdk7(one of them is adding dtb files). But ultimately the both of the sdks should work as per their type of configuration. Isn't it.?
    Please look into this.

    Rgds,
    Vijaykumar P
  • Hi Vijaykumar,

    This u-boot is from sdk6. Please check if the board not booting from eMMC or NAND memory where the sd6 is written. U-boot from sdk7 is reading and xxx.dtb file. You have to make goot sd-card with sdk7.

    BR
    Ivan
  • Hi Ivan,

    Yes. I agree too. In fact I wondered why the .dtb file is not being loaded. That is one of the doubts I thought of asking you. 

    Can you please share your include/configs/am335x_evm.h config file.

    Ok. I'll try with another memory card and let you know the result. Please share the am335x_evm.h file meanwhile.

    Thank u for your patience. :)

    Regards,

    Vijaykumar.

  • Hi Vijaykumar,

    Your u-boot is from sdk6. Please see your boot order to be sure that you are booting from sd-card.

    BR
    Ivan

    1055.am335x_evm.h

  • Hi Ivan,
    Thanks for your support.
    Yes. Finally my board has got up.
    The issue was bootmode selection on sysboot switch. But I feel, the response from board misled me when I insert sd card in NAND boot mode.
    Can you please do this let me know the status.? Please keep your board sysboot pins in NAND boot mode.Nand boot corresponds to(SW3 5:1) 10010 . And Keep the SD card in its slot (on the base board) with image (and once without image also) and power on the board. Please let me know what is the status.
    Thanks in anticipation.

    Rgds,
    Vijaykumar P
  • Hi Ivan,
    Can You tell me a serial port that is readily available on am335x_evm to use from user application interface without modifying any kernel or dtb files and also without making any hardware changes such as keeping and removing some resisters(other than terminal). If I need to change tell me the case where it is possible with minimal changes. There are lot of profiles available on the board but need changes to h/w to access serial ports as per my observation.
    Rgds,
    Vijaykumar P
  • Hi,

    Yes, if some other UART different than uart0 is configured you can test it as start from PC terminal program as microcom by:
    ubuntu-pc $ microcom -p /dev/ttyO1
    and from board type following commands for writing and reading to/from uart1 (of course you have to connect the PC and board with serial cable)
    adb-shell-1 $ echo "Hello" > /dev/ttyO1
    adb-shell-1 $ cat /dev/ttyO1

    BR
    Ivan
  • Hi,
    It is given in the pin mux sheet of am335x_evm "am335x_gpevm_pinuse.xlsx" uart1 is for some BTUART(I think Blue-tooth??) and when Im trying work on it and use it as RS232 it is not responding. And I have seen the same in our forum that it will not work as RS232. Can you please tell me the changes required to be done on s/w or h/w to access any of the UART available on am335x_evm.

    Rgds,
    Vijay