Ok - here is my way to make correct sd card from
512mbsd-7400-linux2629-lenny-eabi
It may be a little more complicated than necesary, but it works for me..
Download sdcard image file
# wget
ftp://ftp.embeddedarm.com/ts-arm-sbc/ts-7400-linux/binaries/ts-images/512mbsd-7400-linux2629-lenny-eabi.dd.bz2
unzip it
# bzip2 -d 512mbsd-7400-linux2629-lenny-eabi.dd.bz2
extract individual partitons (*1)
# dd if=512mbsd-7400-linux2629-lenny-eabi.dd of=part2.dd bs=512
skip=8704 count=5120
do not copy entire part3, end of partition contains lot of zeros,
block count was decreased to ignore them (using hexdump to find end of
data)
# dd if=512mbsd-7400-linux2629-lenny-eabi.dd of=part3.dd bs=512
skip=16896 count=2688
extract master boot record:
# dd if=512mbsd-7400-linux2629-lenny-eabi.dd of=boot.dd bs=446 count=1
copy data from partition 4:
# mkdir part4
# mount 512mbsd-7400-linux2629-lenny-eabi.dd part4 -oloop,offset=$((25088))
# cd part4
# tar -jcS -b8 --one -f ../part4.tar.bz2 .
# umount part4
You can modify initrd linuxrc scripts in part3 ( mount part3.dd part3 -oloop )
Now create sd card (my sdcard is mapped to /dev/sdd, be carefull to
use correct device!)
start fdisk on sd card:
# fdisk /dev/sdd
delete all existing partitions using d command
Create new partitions (command n)
First partition is unused, just create it, I user cylinder 5 as end
Partition 2 will hold kernel image, starting from default, size +3M
(zImage si about 2.5meg). Maybe larget partition can be usefull
Partition 3 is initrd, I used +2M as size
Partition 4 is root fs, use all available space
change type of partition 2 and 3 to 0xda (t command)
write it to disk (w)
(*2)
Now copy mbr, part2 and part3:
# dd if=boot.dd of=/dev/sdd
# dd if=part2.dd of=/dev/sdd2 bs=1M
# dd if=part3.dd of=/dev/sdd3 bs=1M
Create jfs filesystem on part4:
# mkfs.jfs /dev/sdd4
mount it and extract root filesystem to it:
# mount /dev/sdd4 part4
# cd part4
# tar -xjS -b8 -p -f ../part4.tar.bz2
# umount part4
# sync
And it's done ;-) Hope this will help
Boots fine on my board with TS-SDBOOT bootloader
*1:
fdisk complains about different logical and physical addresses on
image - i decided to build new partition table
Disk 512mbsd-7400-linux2629-lenny-eabi.dd: 255 heads, 63 sectors, 0 cylinders
Nr AF Hd Sec Cyl Hd Sec Cyl Start Size ID
1 00 8 25 0 14 42 8 512 8192 0c
Partition 1 has different physical/logical beginnings (non-Linux?):
phys=(0, 8, 25) logical=(0, 8, 9)
Partition 1 has different physical/logical endings:
phys=(8, 14, 42) logical=(0, 138, 10)
Partition 1 does not end on cylinder boundary.
2 00 14 43 8 2 38 14 8704 5120 da
Partition 2 has different physical/logical beginnings (non-Linux?):
phys=(8, 14, 43) logical=(0, 138, 11)
Partition 2 has different physical/logical endings:
phys=(14, 2, 38) logical=(0, 219, 27)
Partition 2 does not end on cylinder boundary.
3 00 4 61 17 7 21 20 16896 3072 da
Partition 3 has different physical/logical beginnings (non-Linux?):
phys=(17, 4, 61) logical=(1, 13, 13)
Partition 3 has different physical/logical endings:
phys=(20, 7, 21) logical=(1, 61, 60)
Partition 3 does not end on cylinder boundary.
4 00 11 18 25 15 29 969 25088 921600 83
Partition 4 has different physical/logical beginnings (non-Linux?):
phys=(25, 11, 18) logical=(1, 143, 15)
Partition 4 has different physical/logical endings:
phys=(969, 15, 29) logical=(58, 236, 50)
Partition 4 does not end on cylinder boundary.
*2:
this is my sdcard layout:
Disk /dev/sdd: 1019 MB, 1019215872 bytes
32 heads, 61 sectors/track, 1019 cylinders
Units = cylinders of 1952 * 512 = 999424 bytes
Device Boot Start End Blocks Id System
/dev/sdd1 1 5 4849+ 83 Linux
/dev/sdd2 6 9 3904 da Non-FS data
/dev/sdd3 10 12 2928 da Non-FS data
/dev/sdd4 13 1019 982832 83 Linux
Petr
On Wed, Sep 2, 2009 at 19:57, Petr Ledvina<> wrote:
> Hi,
> tsbootrom-update is available at
> ftp://ftp.embeddedarm.com/ts-arm-sbc/ts-7200-linux/binaries/ts-utils/tsbootrom-update
> . You can put it on USB flash disk to use it from fastboot prompt.
> You could probably try this version, it may be newer than that from sd card.
>
> As long as you can boot from linux-2.4 sd card, you cant restore
> original bootloader using tsbootrom-update:
>
> mac=`ifconfig eth0 | grep HWaddr | cut -d' ' -f11`
> tsbootrom-update -f -m $mac
>
> Using TS-SDBOOT bootup i can boot 2.6 linux. I'll try to reproduce it
> and post how to do it. Maybe try copying first 446 bytes from original
> 2.6 disk image - it's very easy to break masterboot:
> dd if=<disk image file> of=<sd card device eg. /dev/sdb> bs=446 count=1
>
> I am sorry for your trouble. It should be quite easy to get to
> original state. I'ts very good idea to have ts-7440 at hand - you can
> restore boot program when soething goes bad ...
>
> Petr
>
> On Wed, Sep 2, 2009 at 18:28, kailash295<> wrote:
>>
>>
>> Hello All,
>> Petr, since the 'tsbootrom-update' is neither available on 'fastboot-linux'
>> nor on 'flash-linux' OS, I booted Linux 2.4 through SD card that's where I
>> found this 'tsbootrom-update' utility.And then I followed these two steps
>> that you mentioned. As a result the 'fastboot-linux' was completely wiped
>> out. Now the board won't boot at all unless I have Linux-2.4 SD card on it.
>> I think I will have to buy their JTAG device to restore the 'fastboot-linux'
>> or put Redboot or Uboot bootloader on it.Of course I can see that you were
>> trying to help me but I am just revealing it what happened to rectify the
>> issue. So any help from someone of you will be appreciated.
>>
>> Thanks,
>> Kailash
>>
>> --- In Petr Ledvina <> wrote:
>>>
>>> You should use tsbootrom-update to change TS7400 to boot from sd card:
>>> $ mac=`ifconfig eth0 | grep HWaddr | cut -d' ' -f11`
>>> $ tsbootrom-update -s -m $mac
>>>
>>> SD card image contains proper masterboot (first 446 bytes), kernel
>>> (patrition 2) and initrd (partition 3) to boot 2.6 linux wint
>>> patrition 4 as root filesystem.
>>> ts-fastboot is designed to boot linux 2.4 (root on patrition 3).
>>>
>>> Petr
>>>
>>>
>>> On Tue, Sep 1, 2009 at 18:48, kailash295<> wrote:
>>> >
>>> >
>>> > Thanks for your reply. Actually my goal is to boot this linux2.6.29
>>> > through
>>> > SD card. I have related that I couldn't mount the 'part4' partition
>>> > because
>>> > based on 'linuxrc-sdroot' script, I thought it is needed that this
>>> > partition
>>> > be mounted before the kernel can be booted. This script tries to mount
>>> > 'part3' but in this case it should be directed to 'part4'. So I was
>>> > trying
>>> > to mount this 'part4' explicitly which failed. This could be a reason
>>> > for
>>> > failure to boot into Linux. So please help me in this regard also please
>>> > let
>>> > me know if I not clear.
>>> >
>>> > Thanks.
>>> >
>>> > --- In Matthew Minuti <minuti@> wrote:
>>> >>
>>> >> On Tue, 1 Sep 2009, kailash295 wrote:
>>> >>
>>> >> > How do install mtd-utils and jfs-utils onto the fastboot Linux?
>>> >> >
>>> >> > Thanks!
>>> >> >
>>> >>
>>> >> Sorry, I should have been more clear. You should install those packages
>>> >> on
>>> >> your development PC, not onto the TS device. It should be as simple as
>>> >> an
>>> >> "apt-get install" or "yum install." Once you have them, you can
>>> >> manipulate
>>> >> the partitions more easily.
>>> >>
>>> >> I don't know what could be causing the pivot_root problems,
>>> >> unfortunately.
>>> >>
>>> >>
>>> >>
>>> >> > --- In Matthew Minuti <minuti@> wrote:
>>> >> >>
>>> >> >> On Tue, 1 Sep 2009, kailash295 wrote:
>>> >> >>
>>> >> >>> Hello All,
>>> >> >>> I have burned the 512mbsd-7400-linux2629-lenny-eabi.dd image on my
>>> >> >>> SD
>>> >> >>> card. However it fails to boot, giving following errors.
>>> >> >>>
>>> >> >>> $ exit
>>> >> >>>>> Booting Linux (using SD card)...
>>> >> >>> pivot_root: pivot_root: No such file or directory
>>> >> >>> mount: mounting initrd/dev on dev failed: No such file or directory
>>> >> >>> mount: mounting initrd/proc on proc failed: No such file or
>>> >> >>> directory
>>> >> >>> exec: 49: ./usr/sbin/chroot: Too many levels of symbolic links
>>> >> >>>
>>> >> >>> and after that it hungs. I am using latest sdcard.o (20708 bytes)
>>> >> >>> module for the ts-7400. I am able to mount third partition (part3)
>>> >> >>> which is
>>> >> >>> ext2 filesystems. However I could not mount part4 which has jfs
>>> >> >>> filesystems.
>>> >> >>> Can someone please tell me the fix for it?
>>> >> >>>
>>> >> >>> Thanks,
>>> >> >>> Kailash
>>> >> >>>
>>> >> >>
>>> >> >> The fourth parition is actually JFFS2, which although related to
>>> >> >> JFS,
>>> >> >> is
>>> >> >> actually different. I found I had better luck working with those
>>> >> >> card
>>> >> >> images when I had mtd-utils and jfs-utils installed. With those, I
>>> >> >> can
>>> >> >> use gparted to easily resize the fourth partition, which was
>>> >> >> necessary
>>> >> >> for
>>> >> >> my implementation.
>>> >> >>
>>> >> >
>>> >> >
>>> >> >
>>> >>
>>> >
>>> >
>>>
>>>
>>>
>>> --
>>> Ing. Petr Ledvina
>>> ekoTIP ID s.r.o.
>>> identifikaèní technologie
>>> Morseova 1126/5 30100 Plzeò
>>> tel:608101056
>>> www: ekotip.cz
>>>
>>
>>
>
------------------------------------
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/ts-7000/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/ts-7000/join
(Yahoo! ID required)
<*> To change settings via email:
<*> To unsubscribe from this group, send an email to:
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|