FAQ

From LinuxC6xWiki

Jump to: navigation, search

Compilation and Building

1.Q: Where to get gcc toolchain (4.5-124) for linux-c6x 2.0 release because the link in the release notes does not work ?

 A: As described in the release notes, the correct version of the gcc tool chain is downloaded if needed 
    by the “./prj config” process and need not downloaded by hand.

2.Q: Getting errors when building linux-c6x from the source in release package

 A: Please follow the instructions in “Setting up the Linux host” as indicated in Linux-c6x 2.0 Release Notes.

3.Q: ./prj build fails for evm6678 when building rpm on Ubuntu 12.04

 A: The issue only happens when building full-root filesystem, but not min-root and mcsdk-demo-root.
    A bug has been filed as in http://linux-c6x.org/cgi-bin/bugzilla3/show_bug.cgi?id=29 and
    a patch attached to the bug which allows the build of full-root. Please note that it has not been
    regression tested when building on Ubuntu 12.04. If one wish to use something that has passed test cycle,
    it is recommended to use Ubuntu 10.04. That said, we don’t expect issues with 12.04, and please report
    any issues you may encounter.

4.Q: How to manually compile filesystem without using ./prj ?

 A: Its hard to answer this question without knowing why one can't use ./prj.
    ./prj is just a helper to ensure that tools are installed and environment variables set correctly,
    and then it calls the top level Makefile. The top level Makefile does a lot of things.  Unlike the kernel,
    the "filesystem" is a lot of things.  You could certainly do each of the things the top level Makefile does yourself
    but that seems like a lot of added work. Again, please explain your need and we can try to support you.
    If you really need to redo the whole build system yourself you can look at the Makefile.  However, keep in mind that
    if you build things different than we do it will be hard for us to help you with other issues.

5.Q: How to change the kernel configuration and build the kernel only?

 A: There are several ways of doing it:
  (1)(a) After getting your .config file from menuconfig, just run ‘make’ and the result is in vmlinux. 
     (b) cp vmlinux ../product/vmlinux-myconfig
     (c) c6x-uclinux-objcopy –o binary ../product/vmlinux-myconfig.bin. 
         By doing this way, you can not run ‘./prj build’ until the kernel directory is thoroughly cleaned (make mrproper).
  (2) To integrate with prj, the easiest way:
     (a) cp .config arch/c6x/configs/ti_evmc6678_defconfig (save the original file before overwriting it)
     (b) make mrproper
     (c) cd ../linux-c6x-project
     (d) ./prj build.
  (3) To integrate with prj the correct way:
     (a) cd ../linux-c6x-project
     (b) need to create a new kbuild: cp kbuilds/evmc6678.mk kbuilds/evmc6678-custom.mk
     (c) edit evmc6678-custom.mk and set CONFIGPATH=patch/evmc6678-custom.patch
     (d) create the config patch:
        (mkdir –p scrap/stdconfig; mkdir –p scrap/myconfig;
         cp ../linux-c6x/arch/c6x/configs/ti_evmc6678_defconfig scrap/stdconfig/.config;
         cp ../linux-c6x/.config scrap/myconfig/.config; cd scrap;
         diff –uNr stdconfig myconfig > kbuilds/patches/evmc6678-custom.patch)
     (e) edit setenv and re-enable EXTRA_KERNELS_TO_BUILD=’evmc6678-custom”
     (f) ./prj build (the kernel needs to be cleaned frist from menuconfig (make mrproper)

6.Q: Is there a way to build just syslink instead of the whole project?

 A: type "./prj build syslink-help" will show a list of syslink targets.
    then type "./prj build <syslink-target>" to build it.

7.Q: How to compile SYS/BIOS application for mcoreloader in Linux-c6x?

 A: In addition to installing software dependencies stated in linux-c6x.org, try with the following steps:
    a. try out the notify example that is available in Code Composer Studio
       This one is available under File->New->CCS project
       Select C6000 familiy, Generic Devices and Generic C66xx Device.
       Projects -> IPC and I/O Examples ->C6678 Examples -> C6678 Notify (single image for all cores).
    b. When building the module, be sure the core .cfg and .cfg.xs files exist.
    c. assuming the c6x-linux environment has been built, include the ./Build/syslink_evmc6678.el_hardfp directory. 
       This indeed does not contain a package directory, but it also doesn't have to.
       It will include the stuff you need to build the application.

8.Q: When cross-compiling, it gets the error message of "Relocation Truncated to Fit"

 A: The issue is due to R_C6000_PCR_S21 relocation uses 21 bit PC-relative branches.
    Thus, problem may occur when .text is greater than 2MB. You may want to try 
    adding -mlong-calls flag to see if it helps. If it does not help, try to reorder the objects.
    The linker map file (-WI, --print-map) can help and show where things end up and
    might help pointing to any issues.

EVM Bringup

1.Q: How to boot a ramfs binary image from NOR instead of from NAND on C6678?

 A: NOR boot default setting is to use ELF format image. To boot using the binary file requires IBL code change. 
     Modify the norBoot.bootFormat value in tools/boot_loader/ibl/src/util/iblConfig/src/device.c from ibl_BOOT_FORMAT_ELF to
     ibl_BOOT_FORMAT_BBLOB, and rebuild the ibl according to the build_instruction.txt in the ibl/doc. 
     The dip switch setting for NOR boot on C6678 are
          Pin1  pin2  pin3  pin4
     SW3  OFF   OFF   ON    OFF
     SW4  ON    ON    ON    ON
     SW5  ON    ON    ON    OFF
     SW6  ON    ON    ON    ON

2.Q: Programming NAND flash under Window7 environment

 A: Though the programming flash was tested under Ubuntu environment, the Window XP also works. Before Java Script file is 
    modified and tested under Window7 environment, hard-coding the arguments in the java script can get around the issue quickly.
    When java script parses the argument, somehow, it does not recognize the arguments in the command line. Hence, hard-code the arguments as:
    // Parse the arguments
    arguments[0]="TDMXEVM6678LE";
    arguments[1]="nand eeprom51";
    if (arguments.length >= 0 && arguments.length < 3)
    The path to the binaries may also need to be modified or created accordinly.


Software Ecosystem Features

1.Q: How to run multiple Linux kernels on a multicore C66x DSP?

 A: Currently, the feature is not supported for C66x, but the implementation is very close to the SharedEMAC for C6474.
    Please follow SharedEMAC example for C6474 to compile a kernel image for each cores by creating the corresponding .mk files
    and modifying the setenv script. It is also need to adjust CONFIG_PAGE__OFFSET in .config and "mem=" in the Linux kernel command line.
    Only one image must own drivers for devices such as UART, SPI, NAND, and etc. 
    The only main difference with C64x procedure is that "master-core=<core_id>" needs to be set in the command line of every images
    to indicate which core is the master (the one which will be booted first and that will initialize NetCP) instead of using
    "emac_shared" in the other ones. For example on C6678, if core 0 is the one that will be booted first and manage the NetCP,
    you have to give "master-core=0" in every kernel command lines of the 8 Linux kernel images. You do not have to specify "shared_emac"
    in the command line of other images.
    After booting the first core with CCS or IBL, the other cores can be easily loaded and booted with the mcoreloader utility.
    Like on C64x, the shared-NetCP does not allow to communicate between the Linux instances on the same SoC but only to the external world
    through the LAN. For core-to-core TCP/IP communication you need to use Virtio Net similarly to C64x as indicated on the Wiki.

2.Q: How does multicore loader load and start BIOS?

 A: Please refer to the mcoreloader in Linux-c6x Syslink example. The source codes are in linux-c6x-project/tools/elfloader.

3.Q: Is PCIe Linux driver available on the server for the application of using EVMC6678 with the AMC to PCIe Adapter card plugged into the server?

 A: The linux driver can be downloaded from Advantech site for product DSPC-8681,
       http://www.advantech.com/products/DSPC-8681/mod_A9314996-0022-4927-9AA4-6B1060D4E5E8.aspx,
    and there is a document in 
       mcsdk_2_00_02_14/tools/boot_loader/examples/pcie/docs/README.pdf
    describing how c6678 being boot up through above mentioned configuration. BIOSMCSDK-c66x package can be downloaded from
       www.ti.com/tool/bioslinuxmcsdk..

4.Q: Can a HD or SSD be connected to C6678 in order to create a vliw linux station and would linux be able to manage the file system on the HD or SSD card?

 A: At current state, it can not attach a HD or a SSD. It may be able to after PCIe is supported.

5.Q: How to add SGMII port0 (eth1) in C6678 Linux-c6x NetCP?

 A: Linux-c6x only supports 1 Ethernet port. Adding eth1 involves in partitioning NetCP resources, such as Ethernet switch, etc.
    Also, by changing .sgmii_port=1 to 0 will not work for the same reason. There isn’t resouces allocated for port 0 (eth1).

6.Q: Does linux-c6x use ETB (Embedded Trace Buffer) in C6678 for dump information in case of a program crash?

 A: kmsg_dump will print log_buf of size 8KB.

7.Q: Is linux-c6x a realtime OS?

 A: Linux-c6x 2.0 is based on Linux kernel 2.6.34 and is not a RT Linux.

8.Q: Getting compilation error when building Syslink using Syslink version 2.21.00.03?

 A: When building Syslink, it should use Linux-c6x Syslink included in the Linux-c6x release package. Also follow the Linux-c6x Release Notes
    to download the resource stated in Manual Dependencies. That is, BIOS 6.32.01.38, IPC 1.23.01.26, and XDC 3.22.01.21, and modify setenv
    to set the path of these dependencies.

9.Q: How to increase Syslink messageQ size?

 A: Modify HEAP_MSGSIZE in samples/rtos/messageQ/MessageApp_common.cfg.xs to desired size in byte.

10.Q: How to add files/folders to the linux-c6x filesystem?

  A: There are several ways to copy files and folders to the file system:
     1) In c6678 console, create the directory and ftp the files in. (ftpget)
     2) mount the directory in c6678 console through NFS
        mkdir -p /mnt/shared
        mount -t nfs <nfsServer_IP>:/<your directory on server> /mnt/shared -o tcp,vers=3,nolock
     3) expand the cpio filesystem of linux-c6x and copy the executables and directories you want under it.
        Then, regenerate the cpio file
     4) Modify how the filesystem is built in linux-c6x-project/Makefile to include the directories and
        executables you want to be included. For example, to add the scripts folder under root directory,
        it needs to insert the following bolded line in Makefile. 
        min-root: $(call COND_DEP, busybox mtd devtools)
        one-min-root: min-root-$(ARCHef)
        min-root-$(ARCHef): productdir
           +$(QUIET)echo "********** min-root ENDIAN=$(ENDIAN) FLOAT=$(FLOAT)"
           if [ -d $(BLD)/rootfs/$@ -a -e $(BLD)/rootfs/$@-marker ] ; then rm -rf $(BLD)/rootfs/$@; fi
           mkdir -p $(BLD)/rootfs/$@; date > $(BLD)/rootfs/$@-marker
           (cd $(BLD)/rootfs/$@; cpio -i <$(PRJ)/rootfs/min-root-skel.cpio)
           cp -a rootfs/min-root-extra/* $(BLD)/rootfs/$@
           cp -a $(BBOX_DIR)/* $(BLD)/rootfs/$@
           cp -a $(MTD_DIR)/* $(BLD)/rootfs/$@
           cp -a /mnt/sda1/scripts $(BLD)/rootfs/$@
           #cp -a $(MOD_DIR)/* $(BLD)/rootfs/$@
           if [ -n $(EXTRA_ROOT_DIR) ] ; then for dir in $(EXTRA_ROOT_DIR); do cp -a $$dir/rootfs/* $(BLD)/rootfs/$@ ; done ; fi
           (cd $(SYSROOT_DIR) ; tar --exclude='*.a' -cf - lib | (cd $(BLD)/rootfs/$@; tar xf -))
           (cd $(SYSROOT_DIR) ; tar --exclude='*.a' -cf - usr/lib | (cd $(BLD)/rootfs/$@; tar xf -))

11.Q: How to resolve the error of "can't locate the package 'ti.syslink.ipc.rtos' along the path: ..."

     when building the DSP executables for Linux-c6x to download using mcoreloader?
  A: Assuming the c6x-linux environment has been built, you can include the ./Build/syslink_evmc6678.el_hardfp directory
     in the CCS. This indeed does not contain a package directory, but it also doesn't have to. It will include the stuffs
     you need to build the application.
Personal tools
Create a book