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.

Linux Kernel

Hi,

I am working on TMS320C6A8167 ARM Cortex A8 processor. I have booted the processor with the Linux Kernel and want to know if I can display the kernel on my PC running Ubuntu 14.04. If so, how to do it?

Working on CCSv5.5.

Thanks

  • Moving this to the C6A forum.
  • Hi Raunak,

    Have you ever established UART/console communication between your C6A board and Ubuntu PC? Are you using EZSDK, how exactly you are loading linux kernel in the C6A device?

    Regards,
    Pavel
  • Hi,

    I got the board with Linux already loaded in the ARM processor. Using CCS I have been able to run some basic codes on the board. I am an absolute beginner and have no prior knowledge of the software hence I don't know what EZSDK is and how to use it. It would be really helpful if you could give the steps to display the Linux kernel.

    Thank You
    Raunak
  • Raunak,

    From what I understand you need to view and interact with the linux kernel from UART console connected to your PC. I would recommend you to start exploring our EZSDK, it is free for download. If you need DVR RDK, you should acquire it through your local TI FAE.

    www.ti.com/.../LINUXEZSDK-C6INTEGRA

    software-dl.ti.com/.../index_FDS.html

    After successful install, refer to the below documents:

    ti-ezsdk_dm816x-evm_5_05_02_00/docs/DM816x_C6A816x_AM389x_EVM_Quick_start_guide.pdf
    ti-ezsdk_dm816x-evm_5_05_02_00/docs/DM816x_EZ_Software_Developers_Guide.pdf

    See also the below wiki page:
    processors.wiki.ti.com/.../Sitara_Linux_SDK_Training - UBoot and Linux Kernel Debug using CCSv5 power point presentation

    processors.wiki.ti.com/.../Sitara_Linux_Training:_uboot_linux_debug_with_ccsv5

    BR
    Pavel
  • The software support only Ubuntu 10.04 and 11.10 will I be able to run it on my Ubuntu 14.04 - 64 bit PC?

    Thanks
  • Raunak,

    I have Ubuntu 10.04 LTS 64-bit PC, and it is running fine. This EZSDK is validated only with these two versions of Ubuntu - 10 and 11. This EZSDK might also works fine with Ubuntu 14, but you should validate this yourself and also change setup scripts, libraries, dependencies, etc. See the below links for more info:

    processors.wiki.ti.com/.../Sitara_Linux_SDK_64_Bit_Ubuntu_Support
    processors.wiki.ti.com/index.php
    processors.wiki.ti.com/.../Processor_SDK_Linux_Setup_Script
    processors.wiki.ti.com/.../Processor_SDK_Linux_Getting_Started_Guide

    e2e.ti.com/.../391653
    e2e.ti.com/.../352437
    e2e.ti.com/.../404150

    Regards,
    Pavel
  • One thing you should modify for sure is the ti-ezsdk_dm816x-evm_5_05_02_00/bin/setup-host-check.sh script, called from the ti-ezsdk_dm816x-evm_5_05_02_00/setup.sh script.

    In the setup-host-check.sh script, only Ubuntu 10.04 LTS, Ubuntu 11.10 and Ubuntu 12.04 is supported. You should add Ubuntu 14 support there, if not the setup.sh script will fail.

    Regards,
    Pavel

  • Hi,

    I downloaded the EZSDK but it requires a CodeSourcery Toolchain, but what I get from the site given is CodeSourcery Codebench which doesnot have the arm-none-linux-gnueabi-gcc which is required by the EZSDK to install. Please suggest the workaround.

    Thanks
    Raunak
  • Hi,

    Sorry to bother again but I installed the EZSDK

    Ran the setup.sh

    Started minicom and loaded the script that was made by setup.sh (setup_uimage-tftp_fs-nfs.minicom)

    I have connected the board with a USB as well as UART cable but I do not see anything happening i.e. no linux bootup or matrix load.

    What am I doing wrong?

    Thanks

    Raunak

  • Raunak Kalani said:
    and loaded the script that was made by setup.sh (setup_uimage-tftp_fs-nfs.minicom)

    I am using picocom, and I am not using this script (made by the setup.sh).

    host$ sudo picocom -b 115200 /dev/ttyUSB0 --send-cmd "sx -vv"

    picocom v1.4

    port is        : /dev/ttyUSB0
    flowcontrol    : none
    baudrate is    : 115200
    parity is      : none
    databits are   : 8
    escape is      : C-a
    noinit is      : no
    noreset is     : no
    nolock is      : no
    send_cmd is    : sx -vv
    receive_cmd is : rz -vv

    Terminal ready

    When you plug UART-to-USB cable in the USB port of the host machine (Ubuntu PC), you should see /dev/ttyUSBx (in my case /dev/ttyUSB0). Then you pass this as a parameter to the picocom.

    Do you have the same output as me in your linux terminal (Applications -> Accessories -> Terminal)?

    BR
    Pavel

     

  • No, I do not get the same output for send-cmd"sx-vv" but if I do not give the send-cmd I get the same screen but with send command as sz-vv

    raunak@ubuntu:~$ sudo picocom -b 115200 /dev/ttyUSB0 --send-cmd"sx-vv"
    Unrecognized option.
    Run with '--help'.

    raunak@ubuntu:~$ sudo picocom -b 115200 /dev/ttyUSB0
    picocom v1.7

    port is : /dev/ttyUSB0
    flowcontrol : none
    baudrate is : 115200
    parity is : none
    databits are : 8
    escape is : C-a
    local echo is : no
    noinit is : no
    noreset is : no
    nolock is : no
    send_cmd is : sz -vv
    receive_cmd is : rz -vv
    imap is :
    omap is :
    emap is : crcrlf,delbs,

    Terminal ready

    After this It asks for login .

    How should I login and how do I run my C code on this Linux.
    I already tried root and user as login names.

    Thanks
    Raunak
  • Raunak,

    Raunak Kalani said:
    raunak@ubuntu:~$ sudo picocom -b 115200 /dev/ttyUSB0 --send-cmd"sx-vv"

    This is not correct, as you do not have space between --send-cmd and "sx -vv".

    You have: --send-cmd"sx -vv"

    It should be: --send-cmd "sx -vv"

    Raunak Kalani said:
    After this It asks for login .

    How should I login

    Can you try without sudo command?

    raunak@ubuntu:~$ picocom -b 115200 /dev/ttyUSB0 --send-cmd "sx-vv"

    BR
    Pavel

  • Hi,

    I tried without sudo then also login as root failed.

    baudrate is    : 115200
    parity is      : none
    databits are   : 8
    escape is      : C-a
    local echo is  : no
    noinit is      : no
    noreset is     : no
    nolock is      : no
    send_cmd is    : sx-vv
    receive_cmd is : rz -vv
    imap is        :
    omap is        :
    emap is        : crcrlf,delbs,

    Terminal ready

     _____                    _____           _         _   
    |  _  |___ ___ ___ ___   |  _  |___ ___  |_|___ ___| |_
    |     |  _| .'| . | . |  |   __|  _| . | | | -_|  _|  _|
    |__|__|_| |__,|_  |___|  |__|  |_| |___|_| |___|___|_|  
                  |___|                    |___|            

    Arago Project http://arago-project.org tmdxscbp6618x ttyO0

    Arago 2011.06 tmdxscbp6618x ttyO0

    tmdxscbp6618x login: root

     _____                    _____           _         _   
    |  _  |___ ___ ___ ___   |  _  |___ ___  |_|___ ___| |_
    |     |  _| .'| . | . |  |   __|  _| . | | | -_|  _|  _|
    |__|__|_| |__,|_  |___|  |__|  |_| |___|_| |___|___|_|  
                  |___|                    |___|            

    Arago Project http://arago-project.org tmdxscbp6618x ttyO0

    Arago 2011.06 tmdxscbp6618x ttyO0

    tmdxscbp6618x login: root

     _____                    _____           _         _   
    |  _  |___ ___ ___ ___   |  _  |___ ___  |_|___ ___| |_
    |     |  _| .'| . | . |  |   __|  _| . | | | -_|  _|  _|
    |__|__|_| |__,|_  |___|  |__|  |_| |___|_| |___|___|_|  
                  |___|                    |___|            

    Arago Project http://arago-project.org tmdxscbp6618x ttyO0

    Arago 2011.06 tmdxscbp6618x ttyO0

    tmdxscbp6618x login:

    Any way to change password?

    Thanks

    Raunak

  • Hi,

    I tried it without sudo. Login Name does not entertain "root".

    baudrate is : 115200
    parity is : none
    databits are : 8
    escape is : C-a
    local echo is : no
    noinit is : no
    noreset is : no
    nolock is : no
    send_cmd is : sx-vv
    receive_cmd is : rz -vv
    imap is :
    omap is :
    emap is : crcrlf,delbs,

    Terminal ready

    _____ _____ _ _
    | _ |___ ___ ___ ___ | _ |___ ___ |_|___ ___| |_
    | | _| .'| . | . | | __| _| . | | | -_| _| _|
    |__|__|_| |__,|_ |___| |__| |_| |___|_| |___|___|_|
    |___| |___|

    Arago Project http://arago-project.org tmdxscbp6618x ttyO0

    Arago 2011.06 tmdxscbp6618x ttyO0

    tmdxscbp6618x login: root

    _____ _____ _ _
    | _ |___ ___ ___ ___ | _ |___ ___ |_|___ ___| |_
    | | _| .'| . | . | | __| _| . | | | -_| _| _|
    |__|__|_| |__,|_ |___| |__| |_| |___|_| |___|___|_|
    |___| |___|

    Arago Project http://arago-project.org tmdxscbp6618x ttyO0

    Arago 2011.06 tmdxscbp6618x ttyO0

    tmdxscbp6618x login: root

    _____ _____ _ _
    | _ |___ ___ ___ ___ | _ |___ ___ |_|___ ___| |_
    | | _| .'| . | . | | __| _| . | | | -_| _| _|
    |__|__|_| |__,|_ |___| |__| |_| |___|_| |___|___|_|
    |___| |___|

    Arago Project http://arago-project.org tmdxscbp6618x ttyO0

    Arago 2011.06 tmdxscbp6618x ttyO0

    tmdxscbp6618x login:

    Any way to change the password?

    Thanks
    Raunak
  • Thanks Pavel it worked after disconnecting and reconnecting the EVM.

    Raunak
  • Glad to see it works fine. Regarding the password change, you can have a read our presentation and wiki page regarding Linux initial scripts available at the below link.

    processors.wiki.ti.com/.../Sitara_Linux_SDK_Training
  • Hi,


    Just one more thing, the evm is not able to access the home directory of the targetfs and hence unable to run the helloworld program with procedure given on processors.wiki.ti.com/.../DM816x_EZ_5.03_Software_Developers_Guide

    using cd /home/root gives cannot cd to root.

    Thanks
    Raunak
  • just to add the terminal text

    root@tmdxscbp6618x:/home# ls
    root
    root@tmdxscbp6618x:/home# cd root
    root@tmdxscbp6618x:~#


    the page says to run the helloworld stored in /home/root/dm816x , but doing cd /home/root/ is now returning me to the start as can be seen in the terminal snippet
  • Can you provide me your boot arguments? Are you loading your rootfs from ethernet/EMAC?

    Do you have the below folder on your Ubuntu PC?
    /home/users/raunak/targetfs/home/root/

    BR
    Pavel

  • I have the folder /home/raunak/targetfs/home/root  where i have made another folder dm816x and placed the helloworld executable there.

    what is rootfs?

    My steps:

    run picocom -b 115200 /dev/ttyUSB0 --send-cmd"sx-vv"in the terminal

    give root as login password

    follow the steps in the above site

    I do not have ethernet connection to the SCBP board.

    P.S. the board was loaded with Arago build with

    U-Boot binary:

    u-boot-tmdxscbp6618x-git-r0.0.noxip.bin

    Kernal binary:

    uImage-2.6.37-r0-r0rtmdxscbp6618x.bin

    Thanks

    Raunak



  • Raunak,

    Raunak Kalani said:
    I have the folder /home/raunak/targetfs/home/root  where i have made another folder dm816x and placed the helloworld executable there

    Can you try to place the executable in /home/raunak/targetfs/home/root/ or in /home/raunak/targetfs/home/. Is there any difference?

    Raunak Kalani said:
    what is rootfs?

    rootfs means root filesystem, the filesystem used with the linux kernel.

    Raunak Kalani said:

    My steps:

    run picocom -b 115200 /dev/ttyUSB0 --send-cmd"sx-vv"in the terminal

    give root as login password

    Can you provide me full console output log?

    Raunak Kalani said:
    I do not have ethernet connection to the SCBP board

    These steps are valid when you have ethernet connection between host (Ubuntu PC) and target (C6 Intergra board).

    Regards,
    Pavel

  • raunak@ubuntu:~$ picocom -b 115200 /dev/ttyUSB0 --send-cmd "sx-vv"
    picocom v1.7

    port is        : /dev/ttyUSB0
    flowcontrol    : none
    baudrate is    : 115200
    parity is      : none
    databits are   : 8
    escape is      : C-a
    local echo is  : no
    noinit is      : no
    noreset is     : no
    nolock is      : no
    send_cmd is    : sx-vv
    receive_cmd is : rz -vv
    imap is        :
    omap is        :
    emap is        : crcrlf,delbs,

    Terminal ready
    at 0x005178c0: read 0xd8a374fe,

    U-Boot 2010.06 (Oct 26 2011 - 15:33:11)

    TI8168-GP rev 1.1

    ARM clk: 987MHz
    DDR clk: 398MHz

    DRAM:  2 GiB
    NAND:  HW ECC Hamming Code selected
    256 MiB


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

    Net:   Detected MACID:d4:94:a1:a6:5:6c
    DaVinci EMAC
    Hit any key to stop autoboot:  0

    NAND read: device 0 offset 0x280000, size 0x440000
     4456448 bytes read: OK
    ## Booting kernel from Legacy Image at 81000000 ...
       Image Name:   Arago/2.6.37-r0/tmdxscbp6618x
       Image Type:   ARM Linux Kernel Image (uncompressed)
       Data Size:    2068588 Bytes = 2 MiB
       Load Address: 80008000
       Entry Point:  80008000
       Verifying Checksum ... OK
       Loading Kernel Image ... OK
    OK

    Starting kernel ...

    Uncompressing Linux... done, booting the kernel.
    Linux version 2.6.37 (a0868396@gta0868396-ubuntu10) (gcc version 4.3.3 (Sourcery G++ Lite 2009q1-203) ) #1 Thu Sep 29 17:38:36 EDT 2011
    CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c53c7f
    CPU: VIPT nonaliasing data cache, VIPT aliasing instruction cache
    Machine: tmdxscbp6618x
    bootconsole [earlycon0] enabled
    reserved size = 0 at 0
    Memory policy: ECC disabled, Data cache writeback
    OMAP chip is TI8168 1.1
    Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 130048
    Kernel command line: console=ttyO0,115200n8 root=/dev/mtdblock3 rootfstype=jffs2 rw noinitrd earlyprintk mem=512m mtdparts=omap2-nand.0:2432k(uboot)ro,128k(params)ro,4352k(kernel),204928k(filesystem),-(reserved)
    PID hash table entries: 2048 (order: 1, 8192 bytes)
    Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
    Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
    Memory: 512MB = 512MB total
    Memory: 515332k/515332k available, 8956k reserved, 0K highmem
    Virtual kernel memory layout:
        vector  : 0xffff0000 - 0xffff1000   (   4 kB)
        fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
        DMA     : 0xffc00000 - 0xffe00000   (   2 MB)
        vmalloc : 0xe0800000 - 0xf8000000   ( 376 MB)
        lowmem  : 0xc0000000 - 0xe0000000   ( 512 MB)
        modules : 0xbf000000 - 0xc0000000   (  16 MB)
          .init : 0xc0008000 - 0xc0035000   ( 180 kB)
          .text : 0xc0035000 - 0xc03e5000   (3776 kB)
          .data : 0xc03e6000 - 0xc041cec0   ( 220 kB)
    SLUB: Genslabs=11, HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
    NR_IRQS:375
    IRQ: Found an INTC at 0xfa200000 (revision 5.0) with 128 interrupts
    Total of 128 interrupts on 1 active controller
    GPMC revision 6.0
    Trying to install interrupt handler for IRQpt handler for IRQ371
    Trying to install interrupt handler for IRQ372
    Trying to install interrupt handler for IRQ373
    Trying to install interrupt handler for IRQ374
    Trying to install type control for IRQ375
    Trying to set irq flags for IRQ375
    OMAP clockevent source: GPTIMER1 at 27000000 Hz
    Console: colour dummy device 80x30
    Calibrating delay loop... 986.31 BogoMIPS (lpj=4931584)
    pid_max: default: 32768 minimum: 301
    Security Framework initialized
    Mount-cache hash table entries: 512
    CPU: Testing write buffer coherency: ok
    devtmpfs: initialized
    omap_voltage_early_init: voltage driver support not added
    regulator: core version 0.5
    regulator: dummy:
    NET: Registered protocol family 16
    omap_mux_init: Add partition: #1: core, flags: 0
    pm_dbg_init: only OMAP3 supported
    Registered ti81xx_fb device
    bio: create slab <bio-0> at 0
    SCSI subsystem initialized
    usbcore: registered new interface driver usbfs
    usbcore: registered new interface driver hub
    usbcore: registered new device driver usb
    Switching to clocksource gp timer
    musb-hdrc: version 6.0, host, debug=0
    NET: Registered protocol family 2
    IP route cache hash table entries: 4096 (order: 2, 16384 bytes)
    TCP established hash table entries: 16384 (order: 5, 131072 bytes)
    TCP bind hash table entries: 16384 (order: 4, 65536 bytes)
    TCP: Hash tables configured (established 16384 bind 16384)
    TCP reno registered hash table entries: 256 (order: 0, 4096 bytes)
    UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
    NET: Registered protocol family 1
    RPC: Registered udp transport module.
    RPC: Registered tcp transport module.

  • Raunak,

    Raunak Kalani said:
    Kernel command line: console=ttyO0,115200n8 root=/dev/mtdblock3 rootfstype=jffs2 rw noinitrd earlyprintk mem=512m mtdparts=omap2-nand.0:2432k(uboot)ro,128k(params)ro,4352k(kernel),204928k(filesystem),-(reserved)

    You are booting your board from NAND flash, it seems your board come with already flashed NAND chip. In order to be able to execute your application, you should place/flash it in NAND. The NAND filesystem come from ti-ezsdk_dm816x-evm_5_05_02_00/filesystem/arago-base-tisdk-image-dm816x-evm.tar.gz. You should untar this file, place your executable and then transform this folder into JFFS2 or UBIFS format for flash it into NAND. This is not an easy task.

    C6A device can boot from: SD card, Network/Ethernet, NAND, SPI, NOR

    I would recommend you to try first with SD card. You need SD card reader connected to your host (Ubuntu PC) through USB cable. You should plug SD card into the card reader and follow the instructions from ti-ezsdk_dm816x-evm_5_05_02_00/docs/DM816x_EZ_Software_Developers_Guide.pdf, 6.7 How to create an SD card. The mksdboot.sh script will create two partitions in your SD card, BOOT and ROOTFS. BOOT partition/folder will contain the pre-built u-boot and linux kernel from the ti-ezsdk_dm816x-evm_5_05_02_00/board-support/prebuilt-images/ folder. ROOTFS partition/folder will contain your filesystem which is based on ti-ezsdk_dm816x-evm_5_05_02_00/filesystem/ezsdk-dm816x-evm-rootfs.tar.gz.


    After mksdboot.sh script finished, you just need to place your executable in the /ROOTFS/home/root/ folder. Then remove the SD card from the PC, place it in the target board, configure the boot pins for SD boot and power on the board.


    BR
    Pavel

  • Thanks Pavel I was able to get the file over tftp server and run it on the board using tftp -g -r helloworld 192.168.1.1 69  from tftpboot folder.

    Raunak

  • Hi Pavel

    I am trying to run the whole thing in windows as well and want a arm compiler for the platform. Can you share the link for a .exe file.

    Thanks

    Raunak

  • Raunak,

    For ARM cross compiler for Windows OS, you should get it from Mentor:

    www.mentor.com/.../lite-edition

    Search for CodeSourcery G++ Lite 2009q1-203 for Windows OS.

    BR
    Pavel