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.

DM8107 UD DVR Kit boot and rootfs from SDCARD

Other Parts Discussed in Thread: DM8107

There's some way to completely boot, save env variables and make rootfs from SD card without need of a NAND flash memory in the board? The uboot env variables saves only at NAND, right?

  • Hi,

          Yes that is possible. Check and follow the macro CONFIG_ENV_IS_IN_MMC in uboot config.

    Regards

    Faizel

  • Leonardo,

    I am working on DM814x/AM387x device with EZSDK. In EZSDK, we have a special script which creates bootable SD card. With this script and a SD card, you do not need NAND flash. I assume there should be something similar in the DM8107 DVR. See the below links for more info:

    http://processors.wiki.ti.com/index.php/DM814x_AM387x_EZ_5.02_Software_Developers_Guide#How_to_create_an_SD_card

    http://processors.wiki.ti.com/index.php/Sitara_Linux_SDK_create_SD_card_script

    Regards,
    Pavel

     

  • Can you send me the script "mksdboot.sh"? In DVR SDK this script doesn't exist.

     

    Thanks,

    Leonardo

  • Leonardo,

    The "mksdboot.sh" scipt is attached:http://e2e.ti.com/cfs-file.ashx/__key/communityserver-discussions-components-files/716/2654.mksdboot.sh

    Please note that most probably you can not use this script, as it is. It will require some modifications to fit your working environment. But it is good starting point.

    Also, I suspect you should have "ready made" script for SD card in your DVR RDK, have you search for it?

    Best regards,
    Pavel

  • I will post here the steps that I have used to make the boot work using SDCard, maybe can help someone. I have used only the files in pre_built folder.

    First, the rootfs that comes with DVR SDK in folder pre_built is a jffs2 file (rfs_128_ud810x_dvr.jffs2). This file is for the NAND.

    Let's convert it to a tar.gz file:

    mknod /tmp/mtdblock0 b 31 0
    modprobe mtdblock
    modprobe mtdram total_size=65536 erase_size=256
    modprobe jffs2
    dd if=/pathtoimage/rfs_128_ud810x_dvr.jffs2 of=/tmp/mtdblock0
    mkdir /media/jffs2
    mount -t jffs2 /tmp/mtdblock0 /media/jffs2

    Go inside the folder /media/jffs2

    Give the commands:

    tar -czf /DestionationFolder/rootfs.tar.gz *

    Now put the files rootfs.tar.gz, MLO, u-boot_ud810x_dvr.bin and uImage_ud810x_dvr in a folder with the script mksd.sh 4657.mksd.sh.tar.gz

    Run the script:

    ./mksd.sh /dev/SD_DEVICE_NAME MLO u-boot_ud810x_dvr.bin uImage_ud810x_dvr rootfs.tar.gz

    The card probably will need be umounted before execute the script.

    Put the SDCard on DVR kit and stop u-boot before Linux load.

    Give the commands:

    mmcinfo
    fatload mmc 0:1 0x81000000 uImage_ud810x_dvr

    setenv bootargs 'mem=128M console=ttyO0,115200n8 noinitrd root=/dev/mmcblk0p2 rw rootfs=ext3 ip=192.168.1.200 vram=20M notifyk.vpssm3_sva=0xBFFD0000 i2c_bus=3,400 ddr_mem=512M'

    bootm 0x81000000

    This will boot directly from SD card.


    For a autonomous boot, the u-boot will need be recompiled with bootargs above hardcoded. Change the file:

    ti8107_dvr.h (include/configs)

    In this way isn't necessary to save the env variables to EEPROM or SDCard.