• Home
  • Help
  • Search
  • Login
  • Register
Pages: 1 [2] 3
Author Topic: One good uniform way to install a guru/sheeva wanted  (Read 11322 times)
KidE
Newbie
*

Karma: 1
Posts: 28


View Profile
« Reply #15 on: February 27, 2011, 04:26:30 AM »

installer is running finally ;-)
Logged

ppmt
Full Member
***

Karma: 1
Posts: 129


View Profile
« Reply #16 on: February 27, 2011, 07:16:28 AM »

I have the same issue sometime and am working on it

sometime unplugging the plug (from the main power) and reconnect helps
Logged

KidE
Newbie
*

Karma: 1
Posts: 28


View Profile
« Reply #17 on: February 28, 2011, 01:57:50 AM »

after a big "tug of war" i completed the 1st draft

Would somebody be so kind to double check it?



##########################################################################################
1) Setup OpenOCD with guruplug installer @ http://www.plugcomputer.org/index.php/us/resources/downloads?func=fileinfo&id=65 (my prefference)

Or do it the manual way via: http://plugcomputer.org/plugwiki/index.php/Setting_Up_OpenOCD_Under_Linux

2) Enter the OpenOCD directory and download and untar the "flipflip" ultimate uboot config
Code:
cd openocd
wget http://oinkzwurgl.org/dl.php?file=guruplug-u-boot-flipflip-20101111.tar.gz
tar zxvf guruplug-u-boot-flipflip-20101111.tar.gz
cp guruplug-u-boot-flipflip-20101111/u-boot.elf .
mv u-boot.elf uboot.elf

3) Install tftpd
Code:
sudo apt-get install tftpd

4) Copy over the u-boot.kwb image to the tftp dir
Code:
cp guruplug-u-boot-flipflip-20101111/u-boot.kwb /srv/tftp/

5) Boot the guruplug via OpenOCD
Code:
sudo ./openocd -f ./board/guruplug.cfg -c init -c guruplug_load_uboot -c exit

6) Connect via minicom and set the ip address of the guruplug and set the tftp server ip adress (on the booted plug)
Code:
setenv ipaddr 192.168.10.110
setenv serverip 192.168.10.105

7) Load the u-boot.kwb from the tftp server
Code:
tftp 0x6400000 u-boot.kwb

Cool Flash the loaded u-boot.kwb into NAND and reset
Code:
nand erase 0x00000000 0x0100000
nand write 0x6400000 0x0000000 0x80000
reset

The error message "*** Warning - bad CRC, using default environment" can be ignored. This is because the default "setenv" settings are used.

9) Verify u-boot version
After booting the plug verify the correct version installed by typing "version"at the Marvell prompt.
Code:
GuruPlug>> version                     
                                       
U-Boot 2010.09-02612-g27fb783-dirty (Nov 11 2010 - 22:51:37)
Marvell-GuruPlug (-: flipflip's version 20101111 :-)
GuruPlug>>

Nice ;-) lets rock and roll

*** Installing debian (source http://bzed.de/posts/2010/05/installing_debian_on_the_guruplug_server_plus/)

10) Download uImage and uInitrd installer to your tftp server
Code:
wget http://http.us.debian.org/debian/dists/squeeze/main/installer-armel/current/images/kirkwood/netboot/marvell/guruplug/uImage
wget http://http.us.debian.org/debian/dists/squeeze/main/installer-armel/current/images/kirkwood/netboot/marvell/guruplug/uInitrd

11) Set your plugs environment variables to the correct achitecture

Find your arc
Code:
GuruPlug>> bdinfo
arch_number = 0x00000A63
boot_params = 0x00000100
DRAM bank   = 0x00000000
-> start    = 0x00000000
-> size     = 0x10000000
DRAM bank   = 0x00000001
-> start    = 0x10000000
-> size     = 0x10000000
DRAM bank   = 0x00000002
-> start    = 0x00000000
-> size     = 0x00000000
DRAM bank   = 0x00000003
-> start    = 0x62616C69
-> size     = 0x2A20656C
ethaddr     = 02:50:43:f7:34:25
ip_addr     = 192.168.10.110
baudrate    = 115200 bps
TLB addr    = 0x1FFF0000
relocaddr   = 0x1FF50000
reloc off   = 0x1F950000
irq_sp      = 0x1FE2FF74
sp start    = 0x1FE2FF70
FB base     = 0x00000000
GuruPlug>>

Your Arc = "arch_number = 0x00000A63" Convert this hex number to decimal via: http://easycalculation.com/hex-converter.php
The result in decimal is: 2659

Code:
setenv
setenv arcNumber 2659
saveenv
reset
the "Bad CRC" error will be gone finally ;-)

12) REPLUG YOUR POWER! Why? beat me, just do it! I found that the installer might hang when its trying to boot the kernel if you dont. I tested this about 20 times and replugging power worked for me every time.

13) Running the Debian installer to install on the internal MicroSD card.
Code:
setenv ipaddr 192.168.10.110
setenv serverip 192.168.10.105
tftp 0x01100000 uInitrd
tftp 0x00800000 uImage
setenv bootargs console=ttyS0,115200
bootm 0x00800000 0x01100000
[code]

Follow the installer and do what makes you feel comfortable. Use ext3 for your /boot filesystem and use the ext4 journaling filesystem for other filesystems for optimal performance. Its tested and ext4 is much much much faster that ext3.

When The installation is done, continue to reboot

14) Find your boot files

Start usb
[code]
GuruPlug>> usb start
(Re)start USB...
USB:   Register 10011 NbrPorts 1
USB EHCI 1.00
scanning bus for devices... 3 USB Device(s) found
       scanning bus for storage devices... Device NOT ready
   Request Sense returned 02 3A 00
2 Storage Device(s) found
GuruPlug>>

List your USB stree
Code:
GuruPlug>> usb tree

Device Tree:
  1  Hub (480 Mb/s, 0mA)
  |  u-boot EHCI Host Controller
  |
  +-2  Hub (480 Mb/s, 100mA)
    |   USB2.0 Hub
    |
    +-3  Mass Storage (480 Mb/s, 500mA)
          USB Storage 000000009909
       
GuruPlug>> usb storage
  Device 0: Vendor: Generic  Rev: 9909 Prod: STORAGE DEVICE 
            Type: Removable Hard Disk
            Capacity: not available
  Device 1: Vendor: Generic  Rev: 9909 Prod: STORAGE DEVICE 
            Type: Removable Hard Disk
            Capacity: 7580.0 MB = 7.4 GB (15523840 x 512)
GuruPlug>>

Device 1 is your internal MicroSD and this will be your target device.

List the partitions on the target
Code:
GuruPlug>> usb part 1

Partition Map for USB device 1  --   Partition Type: DOS

Partition     Start Sector     Num Sectors     Type
    1                 2048          497664      83
    2               499712         1953792      82
    3              2453504        13068288      83
GuruPlug>>

Find where your uImage and uInitrd are located. Use ext2ls usb <device>:<partition> <path>
Code:
GuruPlug>> ext2ls usb 1:1 /
<DIR>       1024 .
<DIR>       1024 ..
<DIR>      12288 lost+found
         1003346 System.map-2.6.32-5-kirkwood
         1431872 vmlinuz-2.6.32-5-kirkwood
<SYM>         28 initrd.img
<SYM>         25 vmlinuz
         1431936 uImage
           84197 config-2.6.32-5-kirkwood
         2571713 initrd.img-2.6.32-5-kirkwood
         2571777 uInitrd
GuruPlug>>

Find your root "/" (in my case partition 3 on device 1)
Code:
GuruPlug>> ext2ls usb 1:3 /
<DIR>       4096 .
<DIR>       4096 ..
<DIR>      16384 lost+found
<DIR>       4096 var
<DIR>       4096 boot
<DIR>       4096 etc
<DIR>       4096 media
<DIR>      12288 lib
<DIR>       4096 usr
<DIR>       4096 tmp
<DIR>       4096 proc
<DIR>       4096 root
<DIR>       4096 dev
<DIR>       4096 bin
<DIR>       4096 mnt
<DIR>       4096 home
<DIR>       4096 sbin
<DIR>       4096 selinux
<DIR>       4096 sys
<DIR>       4096 srv
<DIR>       4096 opt
GuruPlug>>

15) Make your plug boot

Now that we've found the Kernel, initrd and root filesystem we can start building the boot parameters.
Code:
setenv mainlineLinux yes
setenv bootargs console=ttyS0,115200 root=/dev/sdb3
setenv bootcmd_usb 'usb start; ;ext2load usb 1:1 0x0800000 /uImage; ext2load usb 1:1 0x1100000 /uInitrd'
bootm 0x00800000 0x01100000
saveenv
run bootcmd

So if all went correct you should end up with a prompt telling you to enter a username and password. Meaning: We have succeeded!!
[/code][/code]
Logged

ppmt
Full Member
***

Karma: 1
Posts: 129


View Profile
« Reply #18 on: February 28, 2011, 08:09:37 AM »

I will test your method.

My first comment is: do you really need the opencd part? I never installed it or used

I suspect it is for when your plug is bricked but in that case I use the installer script found here :
http://www.plugcomputer.org/index.php/us/resources/downloads?func=select&id=16

so quickly reading your method. You end up booting the plug from the sd card completely?

does it work for you? when I did that method the boot crash with a kernel panic (complaining about not knowing how to mount my partition)

Logged

KidE
Newbie
*

Karma: 1
Posts: 28


View Profile
« Reply #19 on: February 28, 2011, 08:14:45 AM »

so quickly reading your method. You end up booting the plug from the sd card completely?
does it work for you? when I did that method the boot crash with a kernel panic (complaining about not knowing how to mount my partition)

I've tested the method multiple times from scratch and it works like a charm. The OpenOCD part is not really necessary if you have a good working plug and just want to upgrade.
If you plug is totally f*cked then OpenOCD is a life saver. I'll modify the procedure with your comment Tnx for that ;-)
Logged

ppmt
Full Member
***

Karma: 1
Posts: 129


View Profile
« Reply #20 on: February 28, 2011, 08:18:26 AM »

Then I am off to buy a second SD card and will test your method Smiley
Logged

ppmt
Full Member
***

Karma: 1
Posts: 129


View Profile
« Reply #21 on: March 03, 2011, 06:21:42 PM »

I am more or less done with your method and can report that it works but I am having an issue with your final setting
Code:
setenv mainlineLinux yes
setenv bootargs console=ttyS0,115200 root=/dev/sdb3
setenv bootcmd_usb 'usb start; ;ext2load usb 1:1 0x0800000 /uImage; ext2load usb 1:1 0x1100000 /uInitrd'
bootm 0x00800000 0x01100000
saveenv
run bootcmd
this bit above didn't work for me. I made it work by fist loading the uImage and uInitrd then I coud use the bootm.

But how do I make it permanent?

Can you paste your printenv here please so I can look at it
Logged

KidE
Newbie
*

Karma: 1
Posts: 28


View Profile
« Reply #22 on: March 04, 2011, 12:55:27 AM »

with saveenv you make your variables permanent

Code:
GuruPlug>> printenv
arcNumber=2659
baudrate=115200
bootargs=console=ttyS0,115200 root=/dev/sdb3
bootcmd=run bootcmd_usb; bootm 0x00800000 0x01100000
bootcmd_usb=usb start; ;ext2load usb 1:1 0x0800000 /uImage; ext2load usb 1:1 0x1100000 /uInitrd
bootdelay=3
eth1addr=00:50:43:01:91:31
ethact=egiga0
ethaddr=00:50:43:01:91:30
ipaddr=192.168.10.110
mainlineLinux=yes
serverip=192.168.10.105
stderr=serial
stdin=serial
stdout=serial

Environment size: 440/131068 bytes
GuruPlug>>

the root=/dev/sdb3 needs to be modified for you setup


Logged

ppmt
Full Member
***

Karma: 1
Posts: 129


View Profile
« Reply #23 on: March 04, 2011, 09:11:57 AM »

yes!!

it works I am now running completely off the microSD card

Thanks KidE!

Code:
Last login: Fri Mar  4 09:11:00 EST 2011 on ttyS0                                                                               
Linux guruplug 2.6.37-2-kirkwood #1 Mon Feb 28 01:18:29 UTC 2011 armv5tel                                                       
                                                                                                                                 
The programs included with the Debian GNU/Linux system are free software;                                                       
the exact distribution terms for each program are described in the                                                               
individual files in /usr/share/doc/*/copyright.                                                                                 
                                                                                                                                 
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent                                                               
permitted by applicable law.                                                                                                     
unsa^Ha^H^H^Hroot@guruplug:~# uname -a                                                                                           
Linux guruplug 2.6.37-2-kirkwood #1 Mon Feb 28 01:18:29 UTC 2011 armv5tel GNU/Linux                                             
root@guruplug:~# df -kh                                                                                                         
Filesystem            Size  Used Avail Use% Mounted on                                                                           
/dev/sdb2             6.8G  807M  5.6G  13% /                                                                                   
tmpfs                 252M     0  252M   0% /lib/init/rw                                                                         
udev                  251M   76K  251M   1% /dev                                                                                 
tmpfs                 252M     0  252M   0% /dev/shm                                                                             
/dev/sdb1             228M  9.2M  207M   5% /boot                 
             


But in your method I think you should write this instead
Code:
setenv mainlineLinux yes
setenv bootargs console=ttyS0,115200 root=/dev/sdb3
setenv bootcmd_usb 'usb start; ;ext2load usb 1:1 0x0800000 /uImage; ext2load usb 1:1 0x1100000 /uInitrd'
setenv bootcmd 'run bootcmd_usb ; bootm 0x00800000 0x01100000
saveenv
reset

your initial command won't work for me as you executed bootm on the command line when uImage and uInitrd have not been loaded yet

Still thanks a lot. you should definitely write it on the wiki

Now I am going to install backuppc to centralize my backups and after that I will try to compile freeswitch on it!
Logged

KidE
Newbie
*

Karma: 1
Posts: 28


View Profile
« Reply #24 on: March 05, 2011, 12:09:31 AM »

OK great to hear thats itś working for you. I read my prcedure again and somehow i copied in a wrong part.

I've made to mod and iĺl write a wiki about it.

Didi you by any chance upgraded your kernel also? i tried it but afterwards its not booting and hanging in initramfs. If you could please let me know and iĺl included it in the wiki
Logged

ppmt
Full Member
***

Karma: 1
Posts: 129


View Profile
« Reply #25 on: March 05, 2011, 07:19:33 AM »

I didn't upgrade anything.

I followed the installation that you wrote and ended with what  I listed
Logged

Zortrium
Newbie
*

Karma: 0
Posts: 31


View Profile
« Reply #26 on: March 05, 2011, 08:27:53 AM »

Has anyone actually figured out what causes the problem where u-boot gets to "Done, booting the kernel" and then hangs?  I didn't use the installer or any OpenOCD stuff, but I still get this message about 30% of the time.  The other 70% of the time, the plug boots normally (without having changed anything, same kernel, u-boot version and u-boot parameters).  I'm booting off a microSD card using flipflip's u-boot, with the following relevant u-boot vars:

Code:
setenv bootargs_console 'console=ttyS0,115200n8'
setenv bootargs_root 'root=/dev/sda2 rootwait ro'
setenv bootcmd_usb 'usb start; ext2load usb 0:1 0x400000 /uImage'
setenv bootcmd 'setenv bootargs $(bootargs_console) $(bootargs_root); run bootcmd_usb; bootm 0x400000'
saveenv
Logged

ppmt
Full Member
***

Karma: 1
Posts: 129


View Profile
« Reply #27 on: March 10, 2011, 05:19:44 PM »

no I don't know why it does that and it is a bit scary actually

I want this plus to be on all the time and with my luck one day I will be away and a power cut will occur
and for sure that day the plug will hang Sad

Logged

Zortrium
Newbie
*

Karma: 0
Posts: 31


View Profile
« Reply #28 on: March 10, 2011, 05:32:59 PM »

Actually, I'm thinking that it may be a problem with the uImage load address (0x400000 in my above uboot env) -- I think this may overlap with what u-boot uses itself, and so sometimes causes a problem.  I changed my load address (both occurrences) to 0x800000 and I haven't seen the error since, although I haven't rebooted that many times since I changed it.
Logged

ppmt
Full Member
***

Karma: 1
Posts: 129


View Profile
« Reply #29 on: March 10, 2011, 05:49:13 PM »

in that case I might be good then because I am using 0x800000 already

but like you I haven't rebooted it that many time since Smiley
Logged

Pages: 1 [2] 3
Print
Jump to: