ts-7000
[Top] [All Lists]

Re: [ts-7000] Problems with TS-7400 and SD-cards

To:
Subject: Re: [ts-7000] Problems with TS-7400 and SD-cards
From: "Samuel M. Smith" <>
Date: Sat, 27 Oct 2007 10:44:43 -0600
Here is what I did to program 1 GB sdCard.
Can't do bigger than 1 GB because the block size is no longer 512 and the 
dd file supplied by technologic uses 512 byte blocks. Need to have Technologic
provide dd image using 2048 byte blocks for 4 gb sd card.


---------------- Instructions for creating 1GB SDCard.
1 GB is the biggest size that works with 512 byte blocks in

Creating SDCard for 7400 using 7400 sdcard slot and nfs mount
Fownload latest SD card image link from

unzip it to get sdimage.dd
put sdimage.dd in directory on nfs server

insert new 1 GB sd card into 7400 sdcard slot

boot 7400 into fastboot
mount nfs directory where sdimage.dd can be reached

load sdcard devices
$ insmod  /sdcard.o dmaenable=1
Now the sdcard shows up in devices as /dev/sdcard0/disc0

Copy sdimage from nfs server onto sdcard

$ dd if=/mnt/root/home/sdimage.dd of=/dev/sdcard0/disc0/disc
487936+0 records in
487936+0 records out


Now use fdisk in interactive mode to get partition sizes
$ fdisk /dev/sdcard0/disc0/disc

The number of cylinders for this disk is set to 3888.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
   (e.g., DOS FDISK, OS/2 FDISK)

Command (m for help):
Command (m for help): p

Disk /dev/sdcard0/disc0/disc: 1019 MB, 1019215872 bytes
16 heads, 32 sectors/track, 3888 cylinders
Units = cylinders of 512 * 512 = 262144 bytes

                  Device Boot    Start       End    Blocks   Id  System
/dev/sdcard0/disc0/part1               1           6        1520   da  Unknown
/dev/sdcard0/disc0/part2               7          10        1024   da  Unknown
/dev/sdcard0/disc0/part3              20         953      239104   83  Linux

Now to resize partition 3 we have to delete it and then make a new one of the bigger size

Command (m for help): d
Partition number (1-4): 3

Now create a new one starting at the same cylinder but ending at the last cylinder 3888

Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 3
First cylinder (11-3888, default 11): 20
Last cylinder or +size or +sizeM or +sizeK (20-3888, default 3888): 3888

Now check partition table

Command (m for help): p

Disk /dev/sdcard0/disc0/disc: 1019 MB, 1019215872 bytes
16 heads, 32 sectors/track, 3888 cylinders
Units = cylinders of 512 * 512 = 262144 bytes

                  Device Boot    Start       End    Blocks   Id  System
/dev/sdcard0/disc0/part1               1           6        1520   da  Unknown
/dev/sdcard0/disc0/part2               7          10        1024   da  Unknown
/dev/sdcard0/disc0/part3              20        3888      990464   83  Linux


Now write out new partition table

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.

WARNING: Re-reading the partition table failed with error 22: Invalid argument.
The kernel still uses the old table.
The new table will be used at the next reboot.
Syncing disks.

fdisk will quit

Now reboot to use new partition table and check it using fdisk

$ reboot
$ insmod  /sdcard.o dmaenable=1
$ fdisk /dev/sdcard0/disc0/disc

Quit fdisk
Command (m for help): q


Now run e2fsck  to repair file system before resizing
$ e2fsck -f /dev/sdcard0/disc0/part3
e2fsck 1.37 (21-Mar-2005)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/sdcard0/disc0/part3: 15068/60000 files (0.5% non-contiguous), 218714/239104
blocks

Now resize the partition. Need access to resize2fs executable. Used one on nfs mount.
the ext2resize not provided

$ /mnt/root/sbin/resize2fs -f /dev/sdcard0/disc0/part3
resize2fs 1.37 (21-Mar-2005)
Resizing the filesystem on /dev/sdcard0/disc0/part3 to 990464 (1k) blocks.
The filesystem on /dev/sdcard0/disc0/part3 is now 990464 blocks long.

Now install the 7400 kernel from nfs mount. Get kernel here

$ dd if=/mnt/root/home/ts11-ts7400-1.01.dd of=/dev/sdcard0/disc0/part1
2838+1 records in
2838+1 records out

Now copy over the 7400 modules from nfs mount
Get modules here

Need to mount sdcard first
$ mkdir /mnt/sdroot
$ mount /dev/sdcard0/disc0/part3 /mnt/sdroot

$ tar -xzvpf /mnt/root/home/modules/tskernelmodules-2.4.26-ts11-7400.tar.gz -C mnt/sdroot/lib/modules

Check file system usage
$ df
Filesystem           1k-blocks      Used Available Use% Mounted on
/dev/root                 1003       947        56  94% /
10.0.2.140:/volumes/aux/data/nfs/sarge112155782288 114489552  41292736  73% /mnt
/root
/dev/sdcard0/disc0/part3   959921    211198    709105  23% /mnt/sdroot




Update preboot only if you want to always boot to sdcard. Since I want the flexibility of booting to fastboot, I , don't do this step. Has nothing to do with creating SDCard anyway.




On 26 Oct 2007, at 10:58 , jan_fristedt wrote:

We have two problems with the TS-7400 and SD-cards.
All SD-cards prepared according to
http://www.embeddedarm.com/epc/fastboot.htm
with an SD-card reader suitable for 4G SD-cards.

Any clues out there?

First problem, not so important:
We can't get it to boot at all.

>> TS-SDBOOT - built Jan 26 2007
>> Copyright (c) 2007, Technologic Systems

>> TS-SDBOOT - built Jan 26 2007
>> Copyright (c) 2007, Technologic Systems

>> TS-SDBOOT - built Jan 26 2007
>> Copyright (c) 2007, Technologic Systems

Second problem, with 512M and 1G SD-cards, rather important:
For some reason we are not able to bypass the fastboot on the TS-7400.
With the original SD-card we had no problem.

**** Placed boot jumper on TS-9441 and pressed reset. ****
**** Before reboot the jumper was removed. ****

>> TS-SPIFLASHBOOT - built Oct 3 2006
>> Copyright (c) 2006, Technologic Systems
.
.
.
Finished booting in 3.09 seconds
Type 'tshelp' for help
$ save
Saving ramdisk to flash, please do not remove power until finished.
$ reboot

>> TS-SDBOOT - built Jan 26 2007
>> Copyright (c) 2007, Technologic Systems
.
.
.
Finished booting in 1.48 seconds
Type 'tshelp' for help
$ exit
>> Booting Linux...
INIT: version 2.86 booting

**** Linux booted ok from SD-card after exit. ****
**** TS-7400 was rebooted. ****

:root# reboot

Broadcast message from root (ttyAM0) (Fri Oct 26 16:13:17 2007):

The system is going down for reboot NOW!
INIT: Switching to runlevel: 6

****

Rebooting...

>> TS-SDBOOT - built Jan 26 2007
>> Copyright (c) 2007, Technologic Systems
.
.
.
Finished booting in 1.42 seconds
Type 'tshelp' for help
$ ls -l /
drwxr-xr-x 2 0 0 1024 Jul 19 2007 onboardflash
-rw-r--r-- 1 0 0 5454 Jul 18 2007 ts7xxx.subr
-rwxr-xr-x 1 0 0 3707 Jul 17 2007 linuxrc
lrwxrwxrwx 1 0 0 14 Jan 1 00:01 root ->
/mnt/root/root
lrwxrwxrwx 1 0 0 15 Jan 1 00:01 home ->
/mnt/root/home/
-rw-r--r-- 1 0 0 2503 Jan 1 00:00 splash.gz
-rw-r--r-- 1 0 0 3 Jan 1 00:00 serialsh.pid
-rw-r--r-- 1 0 0 235 Jul 6 2007 serial-shinit
-rw-r--r-- 1 0 0 275 Jan 1 00:00 vid-shinit
-rw-r--r-- 1 0 0 3 Jan 1 00:00 vidsh.pid
lrwxrwxrwx 1 0 0 13 Jan 1 00:00 lib ->
/mnt/root/lib
lrwxrwxrwx 1 0 0 14 Jan 1 00:01 opt ->
/mnt/root/opt/
lrwxrwxrwx 1 0 0 14 Jan 1 00:00 tmp ->
/mnt/root/tmp/
lrwxrwxrwx 1 0 0 15 Jan 1 00:00 sbin ->
/mnt/root/sbin/
-rw-r--r-- 1 0 0 6288 Feb 28 2007 ts7300fb.o
-rw-r--r-- 1 0 0 20708 Aug 20 2007 sdcard.o
dr-xr-xr-x 19 0 0 0 Jan 1 00:00 proc
lrwxrwxrwx 1 0 0 13 Jan 1 00:00 var ->
/mnt/root/var
drwxr-xr-x 3 0 0 1024 May 22 2006 mnt
lrwxrwxrwx 1 0 0 13 Jan 1 00:00 usr ->
/mnt/root/usr
-rwxr-xr-x 1 0 0 1281 Jul 13 2007 stage2
-rw-r--r-- 1 0 0 218 Jul 6 2007 shinit
-rw-r--r-- 1 0 0 6772 Jun 22 2006 fbgen.o
-rw-r--r-- 1 0 0 7024 Jun 22 2006 fbcon-cfb16.o
lrwxrwxrwx 1 0 0 13 Jan 1 00:04 etc ->
/mnt/root/etc
drwxr-xr-x 1 0 0 0 Jan 1 00:00 dev
drwxr-xr-x 2 0 0 2048 Jul 17 2007 bin
drwx------ 2 0 0 12288 Jun 15 2006 lost+found
$ mount
/dev/root on / type ext2 (rw)
none on /dev type devfs (rw)
/proc on /proc type proc (rw)
/dev/sdcard0/disc0/part3 on /mnt/root type ext2 (ro)
$ ln -sf /linuxrc-sdroot /linuxrc; save
Saving ramdisk to flash, please do not remove power until finished.
mount: Mounting /dev/sdcard0/disc0/part3 on / failed: Device or
resource busy

**** Here we got a fail from mount. ****
**** We tried to reboot, unsuccessfully. ****

$ reboot

>> TS-SDBOOT - built Jan 26 2007
>> Copyright (c) 2007, Technologic Systems
.
.
.

**** Changed SD-card, voila, no problem to boot. ****

>> TS-SDBOOT - built Jan 26 2007
>> Copyright (c) 2007, Technologic Systems
.
.
.
Finished booting in 1.46 seconds
Type 'tshelp' for help
$ exit
>> Booting Linux...
INIT: version 2.86 booting

Thanks in advance,
Jan Fristedt


**********************************************************************

Samuel M. Smith Ph.D.

2966 Fort Hill Road

Eagle Mountain, Utah 84005-4108

801-768-2768 voice

801-768-2769 fax

**********************************************************************

"The greatest source of failure and unhappiness in the world is 

giving up what we want most for what we want at the moment"

**********************************************************************



__._,_.___

Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: =Email Delivery: Digest | m("yahoogroups.com?subject","ts-7000-fullfeatured");=Change Delivery Format: Fully Featured">Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | =Unsubscribe

__,_._,___
<Prev in Thread] Current Thread [Next in Thread>
Admin

Disclaimer: Neither Andrew Taylor nor the University of NSW School of Computer and Engineering take any responsibility for the contents of this archive. It is purely a compilation of material sent by many people to the birding-aus mailing list. It has not been checked for accuracy nor its content verified in any way. If you wish to get material removed from the archive or have other queries about the archive e-mail Andrew Taylor at this address: andrewt@cse.unsw.EDU.AU