ts-7000
[Top] [All Lists]

[ts-7000] Re: :: Debian Lenny on a TS7400

To:
Subject: [ts-7000] Re: :: Debian Lenny on a TS7400
From: "sthenleymacedo" <>
Date: Thu, 01 Oct 2009 19:29:10 -0000
Hello again!

Remember...
> > I want to create a SD card with Debian Lenny. I have a 1 GB SD card with no 
> > partitions and this image: 
> > ftp://ftp.embeddedarm.com/ts-arm-sbc/ts-7400-linux/binaries/ts-images/512mbsd-7400-linux2629-lenny-eabi.dd.bz2

> I followed the instructions in these threads, and it worked for me:
> http://tech.groups.yahoo.com/group/ts-7000/message/15914
> http://tech.groups.yahoo.com/group/ts-7000/message/15933
> http://tech.groups.yahoo.com/group/ts-7000/message/15934

I must be doing something wrong... My steps (comments on []'s):

-------------------- 8< -------------------- 8< 
[ON MY DESK]
wget 
ftp://ftp.embeddedarm.com/ts-arm-sbc/ts-7400-linux/binaries/ts-images/512mbsd-7400-linux2629-lenny-eabi.dd.bz2

bunzip2 512mbsd-7400-linux2629-lenny-eabi.dd.bz2

[EXTRACTING PARTITIONS]
dd if=512mbsd-7400-linux2629-lenny-eabi.dd of=part2.dd bs=512 skip=8704 
count=5120
dd if=512mbsd-7400-linux2629-lenny-eabi.dd of=part3.dd bs=512 skip=16896 
count=2688
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 * 512))
cd part4

tar -jcS -b8 --one -f ../part4.tar.bz2 .
cd .. && umount part4

[HERE I THINK I NEED CUSTOMIZE linurc ON PARTITION 3... HOW?]

[MY SD CARD IS /dev/sdd]
fdisk /dev/sdd

[DELETED ALL EXISTING PARTITIONS. I FOLLOW THE STEPS BELOW]
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
[I MADE A +3M PARTITION 3] 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)

[COPY PARTITIONS]
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

[jfs ON PARTITION 4 AND POPULATE IT]
mkfs.jfs /dev/sdd4
mount /dev/sdd4 part4
cd part4
tar -xjS -b8 -p -f ../part4.tar.bz2
cd ..; umount part4
sync

[IS THAT ALL?]
-------------------- 8< -------------------- 8< 

So, on my TS7400, I do not touched my linuxrc-sdroot and boot with my new SD 
card:

>> TS-FLASHBOOT - built Jan 26 2007 [I THINK IS THE LATEST... RIGHT?]
>> Copyright (c) 2007, Technologic Systems
.
.
.
>> Booting Linux...
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

-------------------- 8< -------------------- 8< 

[MY NEW SD CARD WHEN I BOOT WITH linuxrc-mdtroot AND INSERT sdcard.o]
$ fdisk -l

Disk /dev/sdcard0/disc0/disc: 998 MB, 998768640 bytes
31 heads, 62 sectors/track, 1014 cylinders
Units = cylinders of 1922 * 512 = 984064 bytes

                  Device Boot    Start       End    Blocks   Id  System
/dev/sdcard0/disc0/part1               1           5        4774   83  Linux
/dev/sdcard0/disc0/part2               6           9        3844    0  Empty
/dev/sdcard0/disc0/part3              10          13        3844    0  Empty
/dev/sdcard0/disc0/part4              14        1014      961961   83  Linux

-------------------- 8< -------------------- 8< 
[I TRIED TO MODIFY MY linuxrc-sdroot SCRIPT]
#!/bin/sh
# Copyright (c) 2006, Technologic Systems.
# All rights reserved.
#
# Roots to SD flash card, assumes partition #4 (/dev/sdcard0/disc0/part4)
# symlink to /linuxrc and run "save" to use

mount -t proc proc /proc

export PATH=/bin:/sbin:/lbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin
export LD_LIBRARY_PATH=/lib:/usr/lib
export CONSOLE=/dev/ttyAM0

stty -F $CONSOLE ospeed 115200 >/dev/null 2>&1
setcons  <$CONSOLE >$CONSOLE 2>&1
check-usb-update >/dev/null 2>&1 </dev/null

(
  insmod -q -f /sdcard.o dmaenable=1
  mdev -s
  if [ -e /dev/sdcard0/disc0/part4 ]; then
    mount -t yaffs -o ro /dev/sdcard0/disc0/part4 /mnt/root
  fi
) >/dev/null 2>&1

cd /proc
if [ -e /mnt/root/fastboot -o ! -e /mnt/root/bin/mount ]; then
  (
  export BOOTTIME=`eptime`
  export ENV=/shinit
  setcons
  ifconfig eth0 192.168.0.50
  cd /mnt/root
  telnetd
  exec sh -i
  ) <$CONSOLE >$CONSOLE 2>&1
  killall busybox
fi
 
insmod -q -f /ts7xxx-nand.o >/dev/null 2>&1

(
stty -F $CONSOLE ospeed 115200 >/dev/null 2>&1
echo ">> Booting Deabian Lenny Linux..."
setcons
) >$CONSOLE <$CONSOLE 2>&1

cd /mnt/root
pivot_root . initrd
bin/mount -n --move initrd/dev dev              
bin/mount -n --move initrd/proc proc

exec usr/sbin/chroot . sbin/init <.$CONSOLE >.$CONSOLE 2>&1
---------------------------------------------------------------
ln -sf linuxrc-sdroot linuxrc; save; reboot
>> TS-FLASHBOOT - built Jan 26 2007 [I THINK IS THE LATEST... RIGHT?]
>> Copyright (c) 2007, Technologic Systems
.
.
.
>> Booting Linux...
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

:P

-------------------- 8< -------------------- 8< 

My partition 3 (/dev/sdcard0/disc0/part3) contains:
-    1 0        0            4651 May 17  2009 ts7400.ko
lrwxrwxrwx    1 0        0              13 Aug 25  2008 var -> /mnt/root/var
lrwxrwxrwx    1 0        0              13 Aug 25  2008 usr -> /mnt/root/usr
-rw-r--r--    1 0        0           24381 May  7  2009 tssdcard.ko
lrwxrwxrwx    1 0        0              11 Jan  1 00:04 ts7000_sdcard.ko -> 
tssdcard.ko
-rw-r--r--    1 0        0             205 Jan  1 00:03 .ash_history
-rw-r--r--    1 0        0               0 Jan  1 00:01 fastboot
lrwxrwxrwx    1 0        0               9 Jan  1 00:03 ts7000_nand.ko -> 
ts7400.ko
-rw-r--r--    1 0        0            6529 Jan  1 00:05 ts7000.subr
lrwxrwxrwx    1 0        0              13 Jan  1 00:03 ts7000_uart.ko -> 
tsuart7400.ko
drwxr-xr-x    2 0        0            1024 Aug  1  2008 tmp
drwxr-xr-x    2 0        0            1024 Apr 29  2008 sys
-rwxr-xr-x    1 0        0            2913 Aug  1  2008 splash.gz
-rw-r--r--    1 0        0             218 Aug 13  2008 shinit
drwxr-xr-x    2 0        0            1024 Aug  7  2008 sbin
drwxr-xr-x    2 0        0            1024 Apr 29  2008 root
drwxr-xr-x    2 0        0            1024 Apr 29  2008 proc
-rw-r--r--    1 0        0           36042 Jul 31  2008 power.wav
lrwxrwxrwx    1 0        0              13 Aug 25  2008 opt -> /mnt/root/opt
drwxr-xr-x    2 0        0            1024 Apr 29  2008 onboardflash
drwxr-xr-x    4 0        0            1024 Apr 29  2008 mnt
-rwx------    1 0        0            2470 Jan  1 00:00 linuxrc-sdroot
-rwx------    1 0        0            2378 Jan  1 00:04 linuxrc-nfsroot
-rwx------    1 0        0            2332 Jan  1 00:03 linuxrc-mtdroot
-rwx------    1 0        0            2231 Jan  1 00:03 linuxrc-fastboot
lrwxrwxrwx    1 0        0              16 Jan  1 00:00 linuxrc -> 
linuxrc-fastboot
lrwxrwxrwx    1 0        0              13 Aug 25  2008 lib -> /mnt/root/lib
drwxr-xr-x    2 0        0            1024 Aug 25  2008 lbin
lrwxrwxrwx    1 0        0              14 Aug 25  2008 home -> /mnt/root/home
lrwxrwxrwx    1 0        0              13 Aug 25  2008 etc -> /mnt/root/etc
drwxr-xr-x    2 0        0            1024 Apr 29  2008 devkit
drwxr-xr-x    3 0        0            1024 Apr  9  2009 dev
drwxr-xr-x    2 0        0            2048 Aug 11  2008 bin
drwx------    2 0        0           12288 Aug 25  2008 lost+found

So... I have to boot with linuxrc-fastboot and overwrite all with the contents 
of this partition?
I think the problem is mount the partition 4 with jffs/yaffs, but:

mount -t yaffs /dev/sdcard0/disc0/part4 /mnt/root
    
... Have no sucess at boot.

Please, someone can tell me what's missing?
I'll write a howto, I promise :)



------------------------------------

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/

<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