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.

how to make the image that is burned to c6678's nand flash

dear all:

Now I want to burn my own flash image(including kernel and file system) to the

c6678's on board nand flash. I can't find any documents on how to build this

image while I find some docs on how to burn the image to nand. Can any one

give some hints on how build the image (under linux)?

Thanks!

  • Hi,

    c6678's on board nand flash. I can't find any documents on how to build this

    Are you discussing about c6x-linux (DSP linux) ?

  • yes, It is about c6x-linux

  • Hi, Murat,

    Please refer to linux-c6x.org wiki page on how to build the image and program NAND. You mentioned that you build your own kernel. How did you do that without getting source from linux-c6x.org? I want to be sure that you understand that the linux used for C6x is embedded linux, ucLinux.

    Rex

  • Thanks for reply, Rex.

    Sorry for not making it clear about "my own kernel". I  only make some modifications to the sources

    downloaded form linux-c6x.org. I designed my own board based on the evm6678. So I need to burn 

    the image to the nand. 

    In addition, would you mind giving me the specfic web page address which shows the steps about

    compiling or making the image. I even don't know which files I need to burn to flash.

    Thanks!

  • To build: http://linux-c6x.org/wiki/index.php/Linux-c6x_2.0_Release#Building_Software_from_the_Source

    To program NAND: Read the user's guide in http://linux-c6x.org/wiki/index.php/Linux-c6x_2.0_Release#Creating_bootblobs_and_file_system_images

    It will be helpful if you can read through the whole wiki page to get more detailed info.

    Rex

  • Dear Rex:
    I read the doc you mentioned. After run the ".prj build",
    Then I run "./bootblob all" under product dir.
    The files generated after this command is the following:
    evmc6678-initramfs-demo.el-hf-dev-root-20140917.bin
    evmc6678-initramfs-demo.el-hf-dev-root-20140917.cpio.gz
    evmc6678-initramfs-min.el-hf-dev-root-20140917.bin
    evmc6678-initramfs-min.el-hf-dev-root-20140917.cpio.gz
    I don't know which file I should burn to nand flash? Does this file include
    both the kernel and file system?
    Or did I miss something important ?

  • Dear Rex: I tried to burn the evmc6678-initramfs-demo.el-hf-dev-root-20140917.bin to the nand flash. Before burning, I changd the cmdline of this bin using the following command:

    ./bootblob set-cmdline evmc6678-initramfs-demo.el-hf-dev-root-20140917.bin console=ttyS0,115200 rw mem=256M ip=192.168.7.111 initrd=0x80500000,0x200000

    I think when dsp boot from nand, it will use the static address 192.168.7.111. But this doesn't happen, it still use DHCP to obtain IP address. I noticed that the kernel cmd line has been changed to the one I set, you can see from the attached boot log. Why does the kernel still use the DHCP?

    IBL version: 1.0.0.17

    IBL: PLL and DDR Initialization Complete

    IBL Result code 00

    IBL: Booting from NAND

    DDR OK

    before iblBootBlob

    return from iblBoot

    linux comes 0

    Linux version 2.6.34-evmc6678.el-dev-root-20140917 (root@ubuntu) (gcc version 4.5.1 (Sourcery CodeBench Lite 4.5-124) ) #4 Wed Sep 17 22:56:58 CST 2014

    Designed for the EVMC6678 board, Texas Instruments.

    CPU0: C66x rev 0x0, 1.2 volts, 1000MHz

    Initializing kernel

    physical RAM map changed by user

    Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 65024

    Kernel command line: console=ttyS0,115200 rw mem=256M ip=192.168.7.111  initrd=0x80500000,0x200000

    PID hash table entries: 1024 (order: 0, 4096 bytes)

    Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)

    Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)

    Memory available: 253188k/257496k RAM, 0k/0k ROM (931k kernel code, 228k data)

    SLUB: Genslabs=7, HWalign=128, Order=0-3, MinObjects=0, CPUs=1, Nodes=1

    Hierarchical RCU implementation.

    RCU-based detection of stalled CPUs is enabled.

    NR_IRQS:288

    Console: colour dummy device 80x25

    Calibrating delay loop... 999.42 BogoMIPS (lpj=1998848)

    Mount-cache hash table entries: 512

    C64x: 9 gpio irqs

    NET: Registered protocol family 16

    SGMII init complete

    bio: create slab <bio-0> at 0

    vgaarb: loaded

    keystone_qmss keystone_qmss.0: firmware: using built-in firmware keystone/qmss_pdsp_acc48_le_1_0_2_0.fw

    TI KeyStone QMSS driver v1.1

    RIO: [keystone_rio_probe] keystone_rio_probe in platform rio.c

    KeyStone RapidIO driver v1.1

    RIO: [keystone_rio_setup_controller] size = 0, hostid = 101, ports = 0xf, init = 2, mode = 0

    RIO: register sRIO controller for hostid 101

    RIO: port 0 not ready

    RIO: port 1 not ready

    RIO: port 2 not ready

    RIO: port 3 not ready

    keystone-pcie: Invoking PCI BIOS ...

    keystone-pcie: Setting up Host Controller...

    keystone-pcie: Starting PCI scan...

    PCI: bus0: Fast back to back transfers enabled

    Switching to clocksource TSC64

    NET: Registered protocol family 2

    IP route cache hash table entries: 2048 (order: 1, 8192 bytes)

    TCP established hash table entries: 8192 (order: 4, 65536 bytes)

    TCP bind hash table entries: 8192 (order: 3, 32768 bytes)

    TCP: Hash tables configured (established 8192 bind 8192)

    TCP reno registered

    UDP 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.

    RPC: Registered tcp NFSv4.1 backchannel transport module.

    Trying to unpack rootfs image as initramfs...

    rootfs image is not initramfs (read error); looks like an initrd

    Freeing initrd memory: 2048k freed

    JFFS2 version 2.2. (NAND) (SUMMARY)  Â© 2001-2006 Red Hat, Inc.

    ROMFS MTD (C) 2007 Red Hat, Inc.

    msgmni has been set to 498

    Block layer SCSI generic (bsg) driver version 0.4 loaded (major 254)

    io scheduler noop registered

    io scheduler deadline registered

    io scheduler cfq registered (default)

    c6678_emif      initialized

    Serial: 8250/16550 driver, 1 ports, IRQ sharing disabled

    serial8250.0: ttyS0 at MMIO 0x2540000 (irq = 276) is a 16550A

    console [ttyS0] enabled

    brd: module loaded

    loop: module loaded

    at24 1-0050: 131072 byte 24c1024 EEPROM (writable)

    uclinux[mtd]: RAM probe address=0x80489780 size=0x0

    Creating 1 MTD partitions on "RAM":

    0x000000000000-0x000000000000 : "ROMfs"

    mtd: partition "ROMfs" is out of reach -- disabled

    Generic platform RAM MTD, (c) 2004 Simtec Electronics

    NAND device: Manufacturer ID: 0x20, Chip ID: 0x36 (ST Micro NAND 64MiB 1,8V 8-bit)

    Scanning device for bad blocks

    Bad eraseblock 2026 at 0x000001fa8000

    Bad eraseblock 2027 at 0x000001fac000

    Creating 3 MTD partitions on "davinci_nand.0":

    0x000000000000-0x000000004000 : "bootconfig"

    0x000000004000-0x000001000000 : "kernel"

    0x000001000000-0x000004000000 : "filesystem"

    davinci_nand davinci_nand.0: controller rev. 2.5

    spi_davinci spi_davinci.0: Controller at 0x20bf0000 

    spi_davinci spi_davinci.0: Operating in interrupt mode using IRQ 182

    keystone_netcp keystone_netcp.0: created a CPSW ALE engine

    keystone_netcp keystone_netcp.0: firmware: using built-in firmware keystone/pa_pdsp02_1_0_2_1.fw

    keystone_netcp keystone_netcp.0: firmware: using built-in firmware keystone/pa_pdsp02_1_0_2_1.fw

    keystone_netcp keystone_netcp.0: firmware: using built-in firmware keystone/pa_pdsp02_1_0_2_1.fw

    keystone_netcp keystone_netcp.0: firmware: using built-in firmware keystone/pa_pdsp3_1_0_2_1.fw

    keystone_netcp keystone_netcp.0: firmware: using built-in firmware keystone/pa_pdsp45_1_0_2_1.fw

    keystone_netcp keystone_netcp.0: firmware: using built-in firmware keystone/pa_pdsp45_1_0_2_1.fw

    eth0: TI KeyStone NetCP Driver v1.4 on SGMII1

    eth1: TI KeyStone NetCP Driver v1.4 on SGMII0

    pktgen 2.72: Packet Generator for packet performance testing.

    TCP cubic registered

    NET: Registered protocol family 17

    net eth0: initialized CPSW ALE revision 1.3

    Sending DHCP and RARP requests ...... timed out!

    IP-Config: Reopening network devices...

    net eth0: initialized CPSW ALE revision 1.3

    ------------[ cut here ]------------

    WARNING: at /opt/c6678-master/linux-c6x/fs/sysfs/dir.c:451 sysfs_add_one+0x120/0x160()

    sysfs: cannot create duplicate filename '/class/net/eth0/ale_control'

    Modules linked in:

    Stack from 8e017d7c:

            00002520 80022710 803cfd09 803d8075 000001c3 80126698 00000002 8e00a000

            ffffffef 8e00a000 8e00a000 80022788 8e90f0f0 00000000 8e017de8 803d80a0

            8e017dc8 80126698 803d80a0 8e00a000 8e8b8ae0 8e90f0f0 8e8b8ae0 00290103

            80124948 8e8bd030 00000000 8e8b8ae0 00000000 804841e8 8e8bd000 80249618

            8028edd0 8e08ac20 803e9ce0 803d7d89 8e8bd280 00000001 00000003 8e017e38

            00001573 00000000 8e08aae0 8e08a800 8028e5d0 8027e448 80053d54 fffffff8

    Call trace: [<80022710>] warn_slowpath_common+0xc8/0xf4

     [<80126698>] sysfs_add_one+0x120/0x160

     [<80022788>] warn_slowpath_fmt+0x2c/0x40

     [<80126698>] sysfs_add_one+0x120/0x160

     [<80124948>] sysfs_add_file_mode+0x90/0x150

     [<80249618>] device_create_file+0x0/0x44

     [<8028edd0>] cpsw_ale_start+0xe4/0x280

     [<8028e5d0>] cpsw_ale_control_set+0x0/0x10c

     [<8027e448>] netcp_ndo_open+0x1f0/0x5e8

     [<80053d54>] notifier_call_chain+0x74/0xd0

     [<802b809c>] dev_change_flags+0x0/0xb4

     [<802b73d4>] __dev_open+0x15c/0x230

     [<802af7b4>] dev_remove_pack+0x0/0x24

     [<802b7260>] dev_set_rx_mode+0x28/0x40

     [<802b7f38>] __dev_change_flags+0x1d0/0x278

     [<802b8148>] dev_change_flags+0xac/0xb4

     [<802b80c8>] dev_change_flags+0x2c/0xb4

     [<8003665c>] msleep+0x0/0x68

     [<8009e4c0>] kmem_cache_alloc+0x0/0x13c

     [<803a1280>] printk+0x0/0x40

     [<80462d78>] ip_auto_config+0x2e8/0x19f0

     [<8020ae14>] extract_entropy+0x90/0x1a0

     [<801f1cf0>] no_pci_devices+0x38/0x70

     [<80009fc0>] __current_thread_info+0x0/0x20

     [<80456180>] seqgen_init+0x0/0x40

     [<8020b138>] rekey_seq_generator+0x40/0xa0

     [<80009fc0>] __current_thread_info+0x0/0x20

     [<80462a90>] ip_auto_config+0x0/0x19f0

     [<80001aa4>] do_one_initcall+0x64/0x3a0

     [<80009fc0>] __current_thread_info+0x0/0x20

     [<8011a298>] proc_mkdir_mode+0x54/0xb8

     [<800731bc>] irq_to_desc+0x0/0x34

     [<80077dbc>] init_irq_proc+0x9c/0x100

     [<80001a40>] do_one_initcall+0x0/0x3a0

     [<80009fc0>] __current_thread_info+0x0/0x20

     [<8043e018>] kernel_init+0x1a0/0x2e8

     [<8000235c>] kernel_thread_helper+0x18/0x30

    ---[ end trace 36490755aed04246 ]---

    ------------[ cut here ]------------

    WARNING: at /opt/c6678-master/linux-c6x/drivers/platform/keystone/cpsw_ale.c:852 cpsw_ale_start+0x22c/0x280()

    Modules linked in:

    Stack from 8e017dcc:

            00002520 80022710 803cfd09 803e9bdd 00000354 8028ef18 00000000 8e8b8ae0

            8e8bd000 80249618 00290103 8028ef18 8e08ac20 00000000 803e9ce0 803d7d89

            8e8bd280 00000001 00000003 8e017e38 00001573 00000000 8e08aae0 8e08a800

            8028e5d0 8027e448 80053d54 fffffff8 0000000d 00001002 802b809c 00002520

            00040020 8e08a800 8e08a830 80416cf0 80467700 802b73d4 00001003 00000001

            802af7b4 804841b0 8e08a800 8e08a8c0 8e08a8c0 802b7260 8e08a800 8e08a8c0

    Call trace: [<80022710>] warn_slowpath_common+0xc8/0xf4

     [<8028ef18>] cpsw_ale_start+0x22c/0x280

     [<80249618>] device_create_file+0x0/0x44

     [<8028ef18>] cpsw_ale_start+0x22c/0x280

     [<8028e5d0>] cpsw_ale_control_set+0x0/0x10c

     [<8027e448>] netcp_ndo_open+0x1f0/0x5e8

     [<80053d54>] notifier_call_chain+0x74/0xd0

     [<802b809c>] dev_change_flags+0x0/0xb4

     [<802b73d4>] __dev_open+0x15c/0x230

     [<802af7b4>] dev_remove_pack+0x0/0x24

     [<802b7260>] dev_set_rx_mode+0x28/0x40

     [<802b7f38>] __dev_change_flags+0x1d0/0x278

     [<802b8148>] dev_change_flags+0xac/0xb4

     [<802b80c8>] dev_change_flags+0x2c/0xb4

     [<8003665c>] msleep+0x0/0x68

     [<8009e4c0>] kmem_cache_alloc+0x0/0x13c

     [<803a1280>] printk+0x0/0x40

     [<80462d78>] ip_auto_config+0x2e8/0x19f0

     [<8020ae14>] extract_entropy+0x90/0x1a0

     [<801f1cf0>] no_pci_devices+0x38/0x70

     [<80009fc0>] __current_thread_info+0x0/0x20

     [<80456180>] seqgen_init+0x0/0x40

     [<8020b138>] rekey_seq_generator+0x40/0xa0

     [<80009fc0>] __current_thread_info+0x0/0x20

     [<80462a90>] ip_auto_config+0x0/0x19f0

     [<80001aa4>] do_one_initcall+0x64/0x3a0

     [<80009fc0>] __current_thread_info+0x0/0x20

     [<8011a298>] proc_mkdir_mode+0x54/0xb8

     [<800731bc>] irq_to_desc+0x0/0x34

     [<80077dbc>] init_irq_proc+0x9c/0x100

     [<80001a40>] do_one_initcall+0x0/0x3a0

     [<80009fc0>] __current_thread_info+0x0/0x20

     [<8043e018>] kernel_init+0x1a0/0x2e8

     [<8000235c>] kernel_thread_helper+0x18/0x30

    ---[ end trace 36490755aed04247 ]---

    ------------[ cut here ]------------

    WARNING: at /opt/c6678-master/linux-c6x/fs/sysfs/dir.c:451 sysfs_add_one+0x120/0x160()

    sysfs: cannot create duplicate filename '/class/net/eth0/ale_table'

    Modules linked in:

    Stack from 8e017d7c:

            00002520 80022710 803cfd09 803d8075 000001c3 80126698 00000002 8e00a000

            ffffffef 8e00a000 8e00a000 80022788 8e90f0f0 00000000 8e017de8 803d80a0

            8e017dc8 80126698 803d80a0 8e00a000 8e8b8ae0 8e90f0f0 8e8b8ae0 00290103

            80124948 8e8bd044 00000000 8e8b8ae0 00000000 80249618 8e8bd000 80249618

            8028ef58 8e08ac20 803e9ce0 803d7d89 8e8bd280 00000001 00000003 8e017e38

            00001573 00000000 8e08aae0 8e08a800 8028e5d0 8027e448 80053d54 fffffff8

    Call trace: [<80022710>] warn_slowpath_common+0xc8/0xf4

     [<80126698>] sysfs_add_one+0x120/0x160

     [<80022788>] warn_slowpath_fmt+0x2c/0x40

     [<80126698>] sysfs_add_one+0x120/0x160

     [<80124948>] sysfs_add_file_mode+0x90/0x150

     [<80249618>] device_create_file+0x0/0x44

     [<80249618>] device_create_file+0x0/0x44

     [<8028ef58>] cpsw_ale_start+0x26c/0x280

     [<8028e5d0>] cpsw_ale_control_set+0x0/0x10c

     [<8027e448>] netcp_ndo_open+0x1f0/0x5e8

     [<80053d54>] notifier_call_chain+0x74/0xd0

     [<802b809c>] dev_change_flags+0x0/0xb4

     [<802b73d4>] __dev_open+0x15c/0x230

     [<802af7b4>] dev_remove_pack+0x0/0x24

     [<802b7260>] dev_set_rx_mode+0x28/0x40

     [<802b7f38>] __dev_change_flags+0x1d0/0x278

     [<802b8148>] dev_change_flags+0xac/0xb4

     [<802b80c8>] dev_change_flags+0x2c/0xb4

     [<8003665c>] msleep+0x0/0x68

     [<8009e4c0>] kmem_cache_alloc+0x0/0x13c

     [<803a1280>] printk+0x0/0x40

     [<80462d78>] ip_auto_config+0x2e8/0x19f0

     [<8020ae14>] extract_entropy+0x90/0x1a0

     [<801f1cf0>] no_pci_devices+0x38/0x70

     [<80009fc0>] __current_thread_info+0x0/0x20

     [<80456180>] seqgen_init+0x0/0x40

     [<8020b138>] rekey_seq_generator+0x40/0xa0

     [<80009fc0>] __current_thread_info+0x0/0x20

     [<80462a90>] ip_auto_config+0x0/0x19f0

     [<80001aa4>] do_one_initcall+0x64/0x3a0

     [<80009fc0>] __current_thread_info+0x0/0x20

     [<8011a298>] proc_mkdir_mode+0x54/0xb8

     [<800731bc>] irq_to_desc+0x0/0x34

     [<80077dbc>] init_irq_proc+0x9c/0x100

     [<80001a40>] do_one_initcall+0x0/0x3a0

     [<80009fc0>] __current_thread_info+0x0/0x20

     [<8043e018>] kernel_init+0x1a0/0x2e8

     [<8000235c>] kernel_thread_helper+0x18/0x30

    ---[ end trace 36490755aed04248 ]---

    ------------[ cut here ]------------

    WARNING: at /opt/c6678-master/linux-c6x/drivers/platform/keystone/cpsw_ale.c:856 cpsw_ale_start+0x204/0x280()

    Modules linked in:

    Stack from 8e017dcc:

            00002520 80022710 803cfd09 803e9bdd 00000358 8028eef0 00000000 8e8b8ae0

            8e8bd000 80249618 00290103 8028eef0 8e08ac20 00000000 803e9ce0 803d7d89

            8e8bd280 00000001 00000003 8e017e38 00001573 00000000 8e08aae0 8e08a800

            8028e5d0 8027e448 80053d54 fffffff8 0000000d 00001002 802b809c 00002520

            00040020 8e08a800 8e08a830 80416cf0 80467700 802b73d4 00001003 00000001

            802af7b4 804841b0 8e08a800 8e08a8c0 8e08a8c0 802b7260 8e08a800 8e08a8c0

    Call trace: [<80022710>] warn_slowpath_common+0xc8/0xf4

     [<8028eef0>] cpsw_ale_start+0x204/0x280

     [<80249618>] device_create_file+0x0/0x44

     [<8028eef0>] cpsw_ale_start+0x204/0x280

     [<8028e5d0>] cpsw_ale_control_set+0x0/0x10c

     [<8027e448>] netcp_ndo_open+0x1f0/0x5e8

     [<80053d54>] notifier_call_chain+0x74/0xd0

     [<802b809c>] dev_change_flags+0x0/0xb4

     [<802b73d4>] __dev_open+0x15c/0x230

     [<802af7b4>] dev_remove_pack+0x0/0x24

     [<802b7260>] dev_set_rx_mode+0x28/0x40

     [<802b7f38>] __dev_change_flags+0x1d0/0x278

     [<802b8148>] dev_change_flags+0xac/0xb4

     [<802b80c8>] dev_change_flags+0x2c/0xb4

     [<8003665c>] msleep+0x0/0x68

     [<8009e4c0>] kmem_cache_alloc+0x0/0x13c

     [<803a1280>] printk+0x0/0x40

     [<80462d78>] ip_auto_config+0x2e8/0x19f0

     [<8020ae14>] extract_entropy+0x90/0x1a0

     [<801f1cf0>] no_pci_devices+0x38/0x70

     [<80009fc0>] __current_thread_info+0x0/0x20

     [<80456180>] seqgen_init+0x0/0x40

     [<8020b138>] rekey_seq_generator+0x40/0xa0

     [<80009fc0>] __current_thread_info+0x0/0x20

     [<80462a90>] ip_auto_config+0x0/0x19f0

     [<80001aa4>] do_one_initcall+0x64/0x3a0

     [<80009fc0>] __current_thread_info+0x0/0x20

     [<8011a298>] proc_mkdir_mode+0x54/0xb8

     [<800731bc>] irq_to_desc+0x0/0x34

     [<80077dbc>] init_irq_proc+0x9c/0x100

     [<80001a40>] do_one_initcall+0x0/0x3a0

     [<80009fc0>] __current_thread_info+0x0/0x20

     [<8043e018>] kernel_init+0x1a0/0x2e8

     [<8000235c>] kernel_thread_helper+0x18/0x30

    ---[ end trace 36490755aed04249 ]---

    Sending DHCP and RARP requests .



  • Hi, Murat,

    That is the correct image to use. Currently, I don't have Shannon set up and will take me a while to get the environment back. From my memory, the static IP assignment syntax is not correct, but I am not sure if that will still cause the kernel looks for DHCP server. Could you try the correct syntax. I can't remember the exact syntax, but something like:

     ip={ ipaddr }:{ serverip }:{ gatewayip }:{ netmask }:{ hostname }::on

    enter nothing for serverip, gatewaryip, etc. if there isn't any, but keep the ':'

    Rex