TI E2E Community (Beta)
Welcome to the TI E2E (Engineer-to-Engineer) Community! We invite you to freely and openly interact with your peer Engineers, TI Engineers, and other experts in order to ask questions, share knowledge, explore ideas, and help solve problems.
More Search Options

Utility for Booting and Flashing DM355 from SD Card (outdated)

rated by 0 users
This post has 12 Replies | 7 Followers

Top 75 Contributor
Posts 86
Community Member
Constantine Posted: 18 Dec 2008 6:55 AM

The post is outdated. Continued on http://community.ti.com/forums/p/4238/15553.aspx

I have preliminary utility for Booting and Flashing DM355 from SD Card.
You can just boot Linux from SD card and install Linux on the flash.
As option you may totally erase the flash.

Usage:

1. download 5MB SD card image:

  wget http://www.linuxdriver.co.il/ti/dm355/dm355_boot.sdcard

2. put the image (CAREFULLY!) on your SD card conneced to PC :

cat dm355_boot.sdcard > /dev/sd<your SD device>

3. Set SD card boot mode on DM355

Switch SW7: left - up, right - down.

4. Insert SD card to bottom (!)  SD card slot  J27

5. Power up

6. On welcome screen choose boot mode:
   1. boot from SD card without modifying the flash
   2. install UBL, U-boot, kernel and root FS regularly
   3. erase flash totally and #2

After installing (#2,#3) boot continues from the flash

6. Set Flash boot mode on DM355

Switch SW7: left and right - up.

7. Send me feedback to const@LinuxDriver.co.il

Top 10 Contributor
Posts 2,559
Texas Instruments Employee

This is great news; we will have to try it and provide feedback

Top 150 Contributor
Posts 45
Community Member

Hi,

I am trying to boot from SD Card using this procedure but is not right. I don't know why. The board doesn't show nothig when I power up it. Do you know if this procedure is really correct?

I have my board based in the DM355 EVM that use the DM355 of course. I need to boot from SD Card because I don't have the Ethernet controlller yet...

 

Thanks

Top 10 Contributor
Posts 2,298
Texas Instruments Employee

I have not tried this myself for the DM355 but I have worked with the OMAP3 and booting SD cards. One of the common issues is the SD card itself, it may be worth asking Constantine what particular type of SD card he is using, how large it is, the manufacturer, etc, as there could be some dependency on the card itself, as I have seen cards that do and do not work well when attempting to put an image on them in the OMAP3 case.

The images I used with OMAP3 were much larger than this one, they were the exact size of the SD card (2GB), of course the OMAP3 bootable SD cards have full blown file systems on them, so there is much more data and the entire card is effectively used by the partition(s). This being said, my next guess would be some issue with writing the image to the card, though the way Constantine suggests doing it seems correct, in our case we used the dd command from within Cygwin in a Windows environment through. Hopefully Constantine can reply with some further ideas.

Top 75 Contributor
Posts 86
Community Member

write me please (may be on e-mail const@linuxdriver.co.il ) what you do and what you get. And I could tell you what to do.

BTW, I going to release updated clean version with sources

Top 500 Contributor
Posts 35
Community Member

I powered up ,but it has nothing on my screen.

1.I insert a 2GB SD card (Kodak) to my EVM.

2.Power up, I do "cat dm355_boot.sdcard > /dev/mmcblk0 ".

3.Switch SW7: left - up, right - down.

4.Power up, but it has nothing on screen.

By the way,can I store my file system on the sd card?

 

Top 75 Contributor
Posts 86
Community Member

I tested this operations on PC, not on EVM yet.
I don't know why it doesn't work.
Try please to write SD on your PC.

You can store your file system with updated version with sources:
http://makelinux.net/ti/dm355/sd_boot/2009.02.19/

Not Ranked
Posts 7
Community Member

Constantine,

I've downloaded your tarball and tried to get an card formatted to boot and have encountered similar results to xrqun.

I've built my card on a Linux system running Uuntu 8.10.  It's the same system I do my other DM355 development on.  I've formatted the card, an SanDisk 1GB class 2, with the command:

./dm355_sd_boot format /dev/sdb

And installed your Linux files with the command:

./install_sample

When I use the card I've created in either an DM355 EVM or a custom DM355 platform, I see the same results.  If the board is setup to boot from SD and it is powered up without an SD card installed, GPIO 61 will pulse at 4 Hz.  If the formatted SD card is installed, you won't see the pulse, but the system appears to hang.  So that would indicate to me that the RBL is finding the UBL on the SD card and jumping into it and hanging at some point.

I'm going to investigate further and see if I can trace down what's happening.

Jeff Cooper

 

 

 

Top 500 Contributor
Posts 31
Community Member

Has anyone made progress on this yet?

I have followed the proced ures that Constantine suggested, but the DM355 fails to boot, just the green LED flashing at 4Hz.

I did tweak the scripts slightly as my linux box (Fedora 10) starts the SD cards as /dev/mmcblk0 with the partitions being p1 and p2 suffixes to this.

Not sure where to go from here as it's hard to figure out what the DM355 is doing and why it's failing to boot.

Any suggestions ...

I am prepared to put some effort into this as SD boot is a requirement of our project, so if someone could give me push in the right direction I would be most greatful.

Thanks

Brendan

Top 75 Contributor
Posts 86
Community Member

When all is configured properly and all required ulutites are installed everything should work file. Please send me your script output, runing "set -x" before it.

Top 500 Contributor
Posts 31
Community Member

Here goes:

[root@BrensLaptop dm355_sd_boot]# ./dm355_sd_boot format /dev/mmcblk0
+ ./dm355_sd_boot format /dev/mmcblk0
10000+0 records in
10000+0 records out
10240000 bytes (10 MB) copied, 6.70447 s, 1.5 MB/s

Disk /dev/mmcblk0: 61120 cylinders, 4 heads, 16 sectors/track

sfdisk: ERROR: sector 0 does not have an msdos signature
 /dev/mmcblk0: unrecognized partition table type
Old situation:
No partitions found
New situation:
Units = cylinders of 32768 bytes, blocks of 1024 bytes, counting from 0

   Device Boot Start     End   #cyls    #blocks   Id  System
/dev/mmcblk0p1   *      0+      9      10-       319+   b  W95 FAT32
/dev/mmcblk0p2   *     10   61119   61110    1955520   83  Linux
/dev/mmcblk0p3          0       -       0          0    0  Empty
/dev/mmcblk0p4          0       -       0          0    0  Empty
Successfully wrote the new partition table

Re-reading the partition table ...

mkfs.vfat 3.0.0 (28 Sep 2008)
WARNING: Not enough clusters for a 32 bit FAT!
dd: truncating at 5242880 bytes in output file `/tmp/sdc/dm355.dat': No space left on device
0+1 records in
0+1 records out
17 bytes (17 B) copied, 6.0622e-05 s, 280 kB/s
total 296
-rwxr-xr-x 1 root root 303104 2009-03-18 14:58 dm355.dat
SD card /dev/mmcblk0 formatted
10000+0 records in
10000+0 records out
10240000 bytes (10 MB) copied, 0.873453 s, 11.7 MB/s
00005800  64 6d 33 35 35 5f 62 6f  6f 74 5f 6d 61 67 69 63  |dm355_boot_magic|
dm355_boot_data_addr=0x00005800
a1aced00 100 3c 2d 0 0 0 0 5800 Image dm355_boot_rec is ready
dm355 boot record is written
++ echo -ne '\033]0;Bren@BrensLaptop:/home/Bren/Ubl/dm355_sd_boot'
+ ./install_sample /dev/mmcblk0
installing data on /dev/mmcblk0
DM35x_FlashAndBootUtils_1_10_sd/DM35x/GNU/ubl/ubl_DM35x_nand.bin
000200-006fdc,    28124 bytes <- DM35x_FlashAndBootUtils_1_10_sd/DM35x/GNU/sdc_flasher/sdc_flasher_DM35x_nand.bin
008000-008200,    512 bytes <- test pattern 1 2 3
010000-0138b8,    14520 bytes <- DM35x_FlashAndBootUtils_1_10_sd/DM35x/GNU/ubl/ubl_DM35x_nand.bin
020000-03f648,   128584 bytes <- u-boot-1.2.0-dm355_evm.bin
060000-1e182c,  1579052 bytes <- uImage-dm355
400000-7f44d4,  4146388 bytes <- ramdisk.gz
Image dm355_boot_data is ready
mke2fs 1.41.3 (12-Oct-2008)
Filesystem label=Linux
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
122400 inodes, 488880 blocks
24444 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=503316480
15 block groups
32768 blocks per group, 32768 fragments per group
8160 inodes per group
Superblock backups stored on blocks:
    32768, 98304, 163840, 229376, 294912

Writing inode tables: done                            
Creating journal (8192 blocks): done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 35 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.
attempt to mount /dev/mmcblk0p2
DM355 boot data copied on SD card mounted on /tmp/sdc
++ echo -ne '\033]0;Bren@BrensLaptop:/home/Bren/Ubl/dm355_sd_boot'

Note that I have added mkfs.ext3 -L Linux ${sd}p2    to the sdcard_build phase, without this is get:

Image dm355_boot_data is ready
attempt to mount /dev/mmcblk0p2
mount: wrong fs type, bad option, bad superblock on /dev/mmcblk0p2,
       missing codepage or helper program, or other error
       In some cases useful info is found in syslog - try
       dmesg | tail  or so

mount: you must specify the filesystem type
Failed to mount SD card
++ echo -ne '\033]0;Bren@BrensLaptop:/home/Bren/Ubl/dm355_sd_boot'

Top 75 Contributor
Posts 86
Community Member

problem is: dd: truncating at 5242880 bytes in output file `/tmp/sdc/dm355.dat': No space left on device
because configuration is not suitable for your SD.
I tested my script on 1GB and 2GB SD cards.

FIX:
change echo -e ",10,b,*\n,,,*"
to          echo ",,b,*"
( or to      echo -e ",20,b,*\n,,,*" )

This fix will make one partition on all SD instead of 10 cylinders partition

Next emails please send me to const@linuxdriver.co.il

Top 75 Contributor
Posts 86
Community Member

The post is outdated. Continued on http://community.ti.com/forums/p/4238/15553.aspx

Page 1 of 1 (13 items) |

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.