The utility allows to store boot data on SD card, boot DM355 from it and install software on flash. It can be useful for fast board initialization (comparing to serial restore) without JTAG using only Linux, or not using host computer at all. Root FS contains TI demo applications: encode, decode, encodedecode without data files.
4th release notes:- Used original UBL ( ublDM355-nand.bin ). It solves demo problems.- Fixed NAND erase.- Improved script dm355_sd_boot- Introduced default configuration dm355_sd.config- Enlarged root FS and added demo applications without data- Boot time is 20 sec
You may find full code at: http://www.linuxdriver.co.il/ti/dm355/sd_boot/Online documentation: http://wiki.davincidsp.com/?title=DM355_SD_card_boot_and_flash_utilityIn this release SD formatting performed from evaluation board. Script it reworked accordingly feedback and supports smaller SD without fixes.
----
Constantine Shulyupin,Could you please show me how to make SD boot data with size more than 20 MB? How to adjust that script "dm355_sd_boot"? Thanks in advance.
I made sd boot image on evm board.Regards,Jeff
0. You may format second partition as you wish (FAT, ext3), and use it from Linux. Linux application could install new big YAFS root FS on the NAND from SD card. It could be problematic to copy predefined YAFS/JFFS image to flash.
1. Make the first partition bigger or on the full disk.OLD: echo -e ",10,b,*\n,,,*" | sfdisk -uM -q $sdNEW: echo ",,b,*" 2> /dev/null | sfdisk -q $sd
2. and (my be redundant) increase image file:OLD:dd of=$sdc_mnt/dm355.dat bs=1024 seek=5120 count=0 # pad file 5MBNEW: dd of=$sdc_mnt/dm355.dat bs=1024 seek=100000 count=0 # pad file 100MB
thanks for your kind help. I have another problem about nand flash. please see the following:
I used the nand flash (HY27UF(08_16)4G2B 4G-bit(512M), pagesize = 2K, eraseblocksize = 128K,). I can put the kernel image to the nand flash successfully. But
when I put the root file system to the mtdblock3 on linux(flash_eraseall /dev/mtd3, mount –t yaffs2 /dev/mtdblock3 /mnt, cd /mnt, tar xf dm355_flash_image_1_30_00_40.tar)
I can not see anything in the mtdblock3 partition using ‘mount –t yaffs2 /dev/mtdblock3 /mnt/flash/’.
And when I checked the partition usage using ‘df –h’, I saw that it is no available space on mtdblock3.
Some error message :
Using flash_eraseall /dev/mtd3
Erasing 128 Kibyte @ f2a0000 -- 60 % complete.
flash_eraseall: /dev/mtd3: MTD Erase failure: Input/output error
Erasing 128 Kibyte @ 12e20000 -- 75 % complete.
Erasing 128 Kibyte @ 18fe0000 -- 99 % complete.
please give me some clues. Thanks very much.
Regards,
Jeff
4th release. main post is updated.
Hi Constantine,
This looks just the utility I need, but I have a problem getting it to work, maybe you can help please, see my noted logs below.
Many thanks.
Dowloaded software from http://www.linuxdriver.co.il/ti/dm355/sd_boot/ to PC and unpacked it.
Copied file and directory structure exactly as is onto an SD card I use for transferring data around. No original files or anything has been changed.
Copied the whole file and directory structure from SD card to the target into directory:
---- my 'file transferring' SD is inserted into top slot ----# mmcblk0: mmc1:e624 SU02G 1985024KiB mmcblk0: p1
---- SD mounted -----# mount -t vfat /dev/mmcblk0p1 /mnt/mmc
---- go to my installation directory I created on the target, which is /root/sd_boot ----# cd sd_boot
# pwd/root/sd_boot
---- copy the files from SD card to the target ----# cp -r /mnt/mmc/dm355_sd_boot-4 .
---- look at what's on the target ----# cd dm355_sd_boot-4# pwd/root/sd_boot/dm355_sd_boot-4
# lsDM35x_FlashAndBootUtils_1_10_sd dm355_sd.configMakefile dm355_sd_bootcredits originaldm355_boot_data ramdisk.gzdm355_boot_make_image readmedm355_boot_make_image.c u-boot-1.2.0dm355_boot_rec
---- unmount then remove my 'file transferring' SD card ----# umount /mnt/mmc
---- insert another SD card that I want to use as my boot card, into the bottom slot ----
# mmcblk0: mmc0:8fe4 SD02G 1931264KiB mmcblk0: p1 p2
---- run the formatter ----# ./dm355_sd_boot format /dev/mmcblk0./dm355_sd_boot: 146: [[: not foundcleaning SD card1000+0 records in1000+0 records out mmcblk0: unknown partition table
Disk /dev/mmcblk0: 60352 cylinders, 4 heads, 16 sectors/track
sfdisk: ERROR: sector 0 does not have an msdos signature /dev/mmcblk0: unrecognized partitionOld situation:No partitions foundNew situation:Units = mebibytes of 1048576 bytes, blocks of 1024 bytes, counting from 0
Device Boot Start End MiB #blocks Id System/dev/mmcblk0p1 * 0+ 19 20- 20479+ b W95 FAT32/dev/mmcblk0p2 * 20 1885 1866 1910784 83 Linux/dev/mmcblk0p3 0 - 0 0 0 Empty/dev/mmcblk0p4 0 - 0 0 0 EmptySuccessfully wrote the new partition table
Re-reading the partition table ... mmcblk0: p1 p2
mkfs.vfat 2.11 (12 Mar 2005)dd: /mnt/sdc/dm355.dat: Operation not permitted0+1 records in0+1 records out-rwxr--r-- 1 root root 17 Jan 1 00:16 dm355.datSD card /dev/mmcblk0 formatted./dm355_sd_boot: 146: [[: not found./dm355_sd_boot: 146: [[: not found1000+0 records in1000+0 records outod: invalid option -- ABusyBox v1.01 (2005.12.18-04:57+0000) multi-call binary
Usage: od [-aBbcDdeFfHhIiLlOovXx] [FILE]
Write an unambiguous representation, octal bytes by default, of FILEto standard output. With no FILE, or when FILE is -, read standard input.
od: invalid option -- ABusyBox v1.01 (2005.12.18-04:57+0000) multi-call binary
dm355_boot_data_addr=0xImage dm355_boot_rec:plese define dm355_boot_data_addrdm355 boot record is written#
---- from the warnings and errors above, something didn't look like it -------- worked, so mount the SD card and take a look ----# mount -t vfat /dev/mmcblk0p1 /mnt/mmc# ls /mnt/mmc -l-rwxr--r-- 1 root root 17 Jan 1 1980 dm355.dat#
Hi Steve,
You can use (via NFS) full MVL file system from /opt/mv_pro_4.0.1/montavista/pro/devkit/arm/v5t_le/target, because it contains all requited utilities as test, "[", od (not from busybox) one.
Or you can add requred utilities manually from full filesystem to working one by one.
Thank you for the feedback!
Hi Constantine, many thanks for the very helpful pointers, I think this is almost there now.
I copied the following files from the "/opt/mv_pro_4.0.1/montavista/pro/devkit/arm/v5t_le/target" directory tree to the EVM (renaming the current EVM files first):
/usr/bin/od
/usr/bin/[
/usr/bin/test
/bin/dd
/bin/sync
/sbin/sfdisk
I ran the utility and got much further this time, but still have some errors, notably to do with "[[" and dd operation not permitted:
# ./dm355_sd_boot format /dev/mmcblk0./dm355_sd_boot: 146: [[: not foundcleaning SD card1000+0 records in1000+0 records out mmcblk0: unknown partition table
mkfs.vfat 2.11 (12 Mar 2005)dd: advancing past 9216000 bytes in output file `/mnt/mmc/dm355.dat': Operation not permitted0+1 records in0+1 records out-rwxr--r-- 1 root root 17 Jan 1 00:01 dm355.datSD card /dev/mmcblk0 formatted./dm355_sd_boot: 146: [[: not found./dm355_sd_boot: 146: [[: not found1000+0 records in1000+0 records outdm355_boot_data_addr=0x053000Image dm355_boot_rec:a1aced00 100 3c 299 0 0 0 0 53000dm355 boot record is written
Constantine,
Could you please show me how to write yaffs2/jffs2 file system into flash using your tool? Thanks very much
Read TMS320DM355 DVEVM v1.30 Getting Started Guide, section Restoring the NAND Flash
I test the dm355_sd_boot-4.But I find some error.
1. Copy directory dm355_sd_boot to my target file system
2. Insert SD card to bottom (!) SD card slot J27 on evaluation board
# cd /# lsbin lib opt sysdev linuxrc proc tmpdm355_sd_boot-4 lost+found root usretc mnt sbin var# cd dm355_sd_boot-4/# ./dm355_sd_boot format /dev/mmcblk0./dm355_sd_boot: 146: [[: not foundYou need utility sfdisk./dm355_sd_boot: 146: [[: not found./dm355_sd_boot: 146: [[: not found1000+0 records in1000+0 records outod: invalid option -- ABusyBox v1.01 (2005.12.18-04:57+0000) multi-call binary
dm355_boot_data_addr=0xImage dm355_boot_rec:plese define dm355_boot_data_addrdm355 boot record is written# ./dm355_sd_boot data /dev/mmcblk0 original/ublDM355-nand.bin u-boot-1.2.0/u-boot-1.2.0-dm355_evm.bin original/uImage-dm355 ramdisk.gzcopying dataWriting /mnt/sdc/dm355.datSegmentation faultfailed to build data image#
Could you tell me how can I do next ?
1. read online documentation: http://wiki.davincidsp.com/?title=DM355_SD_card_boot_and_flash_utility
2. Mount full MVL FS via NFS or add required utilities manually from full file system to working one by one.
hi.. my name is jongsik yi.
I have a question about your SD card boot.
The below text is my DM355 EVM message.
I guess that SD format and image data copy process is successful.
After the below message, i set the SW7 to SD boot mode.
Next, reset the board.
But i don't see any message from EVM...
Why...?
----------------------------------------------------------------------------
root@192.168.0.3:/opt/dm355_sd_boot-4#./dm355_sd_boot format /dev/mmcblk0cleaning SD card1000+0 records in1000+0 records out mmcblk0: unknown partition table
Disk /dev/mmcblk0: 31000 cylinders, 4 heads, 16 sectors/track
Device Boot Start End MiB #blocks Id System/dev/mmcblk0p1 * 0+ 19 20- 20479+ b W95 FAT32/dev/mmcblk0p2 * 20 968- 949- 971520 83 Linux/dev/mmcblk0p3 0 - 0 0 0 Empty/dev/mmcblk0p4 0 - 0 0 0 EmptySuccessfully wrote the new partition table
mkfs.vfat 2.11 (12 Mar 2005)dd: advancing past 9216000 bytes in output file `/mnt/sdc/dm355.dat': Operation not permitted0+1 records in0+1 records outtotal 1-rwxr--r-- 1 root root 17 Jan 1 00:15 dm355.datSD card /dev/mmcblk0 formatted1000+0 records in1000+0 records outdm355_boot_data_addr=0x053000Image dm355_boot_rec:a1aced00 100 3c 299 0 0 0 0 53000 dm355 boot record is writtenroot@192.168.0.3:/opt/dm355_sd_boot-4# ./dm355_sd_boot data /dev/mmcblk0copying dataWriting /mnt/sdc/dm355.dat000200-007174, 28532 bytes <- DM35x_FlashAndBootUtils_1_10_sd/DM35x/GNU/sdc_flasher/sdc_flasher_DM35x_nand.bin008000-008200, 512 bytes <- test pattern 1 2 3010000-012e00, 11776 bytes <- original/ublDM355-nand.bin020000-03f648, 128584 bytes <- original/u-boot-1.2.0-dm355_evm.bin060000-1e182c, 1579052 bytes <- original/uImage-dm355400000-7e46a4, 4081316 bytes <- ramdisk.gzsyncingDM355 boot data copied on SD card mounted on /mnt/sdcroot@192.168.0.3:/opt/dm355_sd_boot-4# mountrootfs on / type rootfs (rw)/dev/root on / type nfs (rw,v2,rsize=4096,wsize=4096,hard,udp,nolock,addr=192.168.0.2)proc on /proc type proc (rw,nodiratime)sysfs on /sys type sysfs (rw)tmpfs on /tmp type tmpfs (rw)usbfs on /proc/bus/usb type usbfs (rw)/dev/root on /dev/.static/dev type nfs (rw,v2,rsize=4096,wsize=4096,hard,udp,nolock,addr=192.168.0.2)none on /dev type tmpfs (rw)devpts on /dev/pts type devpts (rw)tmpfs on /dev/shm type tmpfs (rw)/dev/mmcblk0p1 on /mnt/sdc type vfat (rw,nodiratime,fmask=0033,dmask=0033)root@192.168.0.3:/opt/dm355_sd_boot-4# ls -al /mnt/sdc\total 8087drwxr--r-- 2 root root 512 Jan 1 00:00 .drwxr-xr-x 4 1000 root 4096 Jul 30 2009 ..-rwxr--r-- 1 root root 8275620 Jan 1 00:16 dm355.datroot@192.168.0.3:/opt/dm355_sd_boot-4# \
Why does the UBL doesn't work as the MLO on OMAP3 ? Wouldn't it be possible to just copy the ubl u-boot and kernel image on a sd card without having to use a utility to flash the sd card with a special structure ? Looking at sdmmcboot.c it seems that would be possible. Is there any reason why it can't be done ?
Thanks
ALL CONTENT AND MATERIALS ON THIS SITE ARE PROVIDED "AS IS". TI AND ITS RESPECTIVE SUPPLIERS MAKE NO REPRESENTATIONS ABOUT THE SUITABILITY OF THESE MATERIALS FOR ANY PURPOSE AND DISCLAIM ALL WARRANTIES AND CONDITIONS WITH REGARD TO THESE MATERIALS, INCLUDING BUT NOT LIMITED TO, ALL IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT OF ANY THIRD PARTY INTELLECTUAL PROPERTY RIGHT. NO LICENSE, EITHER EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, IS GRANTED BY TI. USE OF THE INFORMATION ON THIS SITE MAY REQUIRE A LICENSE FROM A THIRD PARTY, OR A LICENSE FROM TI.
Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms of Use of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms of Use of this site. TI and its suppliers reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.