Buffalo NAS-Central Forums

Welcome to the Linkstation Wiki community
It is currently Thu Aug 28, 2014 12:01 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 117 posts ]  Go to page Previous  1 ... 3, 4, 5, 6, 7, 8  Next
Author Message
PostPosted: Sat Apr 05, 2008 1:28 pm 
Offline
Site Admin
User avatar

Joined: Mon Aug 28, 2006 1:15 am
Posts: 2606
I knew "ide info", but not the other two, thanks...

Code:
=> ide inf
ide inf

IDE device 0: Model: WDC WD2500JD-00HBC0                      Firm: 08.02D08 Ser#:      WD-WCAL77520516
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 238475.1 MB = 232.8 GB (488397168 x 512)
=> ide dev
ide dev

IDE device 0: Model: WDC WD2500JD-00HBC0                      Firm: 08.02D08 Ser#:      WD-WCAL77520516
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 238475.1 MB = 232.8 GB (488397168 x 512)
=> ide part
ide part

Partition Map for IDE device 0  --   Partition Type: DOS

Partition     Start Sector     Num Sectors     Type
    1                   63         9783522      83
    2              9783585         1012095      82
    3             10795680       390636540      83
    4            401432220        86959845      83


I again ran fsck and it comes up clean... not sure what would cause it to read clean but still not not be readable by uboot... I'm checking one or two other ideas ...

_________________
LS1 (foonas, nfs, Tranmission & p910nd print server, Firefly for my Roku)
LS-HG500 (Lenny)
Various LS-Pros v1,v2 (unbricked w/ serial & jtag)
KuroPro, LS2 & KuroHG (foonas)
Working on davysweather.dyndns.org lately...

=> wooohooo!
wooohooo!
Unknown command 'wooohooo!' - try 'help'


Top
 Profile  
 
PostPosted: Sat Apr 05, 2008 2:09 pm 
Offline
Newbie

Joined: Sun Mar 23, 2008 2:47 pm
Posts: 15
there is a bug in the source code
if ext2fs_open failed,it will return 0 instead of a value less than 0
Code:
int ext2fs_open (char *filename) {
   ext2fs_node_t fdiro = NULL;
   int status;
   int len;

   if (ext2fs_root == NULL) {
      return (0);
   }
   ext2fs_file = NULL;
   status = ext2fs_find_file (filename, &ext2fs_root->diropen, &fdiro,
               FILETYPE_REG);
   if (status == 0) {
      goto fail;
   }
   if (!fdiro->inode_read) {
      status = ext2fs_read_inode (fdiro->data, fdiro->ino,
                   &fdiro->inode);
      if (status == 0) {
         goto fail;
      }
   }
   len = __le32_to_cpu (fdiro->inode.size);
   ext2fs_file = fdiro;
   return (len);

      fail:
   ext2fs_free_node (fdiro, &ext2fs_root->diropen);
   return (0);
}

but in the do_ext2load
Code:
filelen = ext2fs_open(filename);
if (filelen < 0) {
   printf("** File not found %s\n", filename);
   ext2fs_close();
   return(1);
}

filelen < 0 will always be FALSE.

so,i think the problem is /boot/uImage does not exist.

what's your /etc/fstab file?
do you install linux in another partition instead of the first partition
and mount your first partition in /boot?
in this situation,you should remove /boot/,just leave uImage as this

Code:
ext2load ide 0:1 0x00100000 uImage


Top
 Profile  
 
PostPosted: Sat Apr 05, 2008 4:14 pm 
Offline
Site Admin
User avatar

Joined: Mon Aug 28, 2006 1:15 am
Posts: 2606
well, fsck.ext3 and whatnot show it seems to be there and readable, as well...

Code:
Escape character is '^]'.

OpenEmbedded Linux lsarm


foonas-em 1.0-dev lsarm

lsarm login: root
Password:
foonas-em$ fsck.ext3 /dev/sda1
e2fsck 1.38 (30-Jun-2005)
/dev/sda1: clean, 7539/611648 files, 90935/1222940 blocks
foonas-em$ ls
foonas-em$ cd /
foonas-em$ mkdir sda1
foonas-em$ ls
bin    boot   dev    etc    home   init   lib    media  mnt    proc   sbin   sda1   sys    tmp    usr    var    www
foonas-em$ mount -t ext3 /dev/sda1 sda1
foonas-em$ cd sda1/boot
foonas-em$ ls -ln
-rw-r--r--    1 0        0         2282096 Apr  5 19:10 uImage
-rw-r--r--    1 0        0         2282096 Feb  2 17:38 uImage-2.6.24
-rw-r--r--    1 0        0         2285784 Jan 22 05:06 uImage-2.6.24-rc5


this is, as far as I can tell, an identical hdd setup as I have on my LSPro V1 ... later today I could try to open up the V1, take its known good hdd out and put it in the v2 ... to see if I see the same error on the V2 w/ the V1's hdd ... of course the v1's uboot is different ...


right now I am reflashing the V2 w/ stock uboot via jtag ...

I am thinking that I may drop the netconsole uboot work for a few days, back up to the buffalo109 (1.1.1) source and try just getting it to boot foonas (which has no initrd) ... maybe there is something I missed in porting it from uboot 1.1.1 to 1.1.4 ...

btw, I have not tried the following yet:
1. just disabling the env resets


2. just disabling the switch to tftp mode


3. using a truly stock partition to run foonas on ... though the only difference is that I have now an ext3 partition, and IIRC the stock format is ext2 ... it shouldn't make a difference there, though... but maybe there is something in the code that prevents ext3 from working?

_________________
LS1 (foonas, nfs, Tranmission & p910nd print server, Firefly for my Roku)
LS-HG500 (Lenny)
Various LS-Pros v1,v2 (unbricked w/ serial & jtag)
KuroPro, LS2 & KuroHG (foonas)
Working on davysweather.dyndns.org lately...

=> wooohooo!
wooohooo!
Unknown command 'wooohooo!' - try 'help'


Top
 Profile  
 
PostPosted: Sat Apr 05, 2008 6:17 pm 
Offline
Newbie

Joined: Sun Mar 23, 2008 2:47 pm
Posts: 15
my sda1's fs type is ext3.

tiamo-no-lspro:~# mount
tmpfs on /lib/init/rw type tmpfs (rw,nosuid,mode=0755)
proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
procbususb on /proc/bus/usb type usbfs (rw)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=620)
rootfs on / type rootfs (rw)
/dev/root.old on /initrd type ext2 (rw,nogrpid)
/dev/sda1 on /boot type ext3 (rw,noatime,errors=remount-ro)
/dev/sda6 on /mnt/disk1 type ext3 (rw)
/dev/sda7 on /mnt/share type ext3 (rw)
tiamo-no-lspro:~#


Top
 Profile  
 
PostPosted: Sat Apr 05, 2008 6:57 pm 
Offline
Site Admin
User avatar

Joined: Mon Aug 28, 2006 1:15 am
Posts: 2606
kk, that eliminates one (very remote) possibility, thanks...

I just put on a stock uboot and w/ serial, I will double-check and document the behaviors...

Code:
Marvell>> ext2ls ide 0:1 /
Using device ide 0:1, directory: /
<DIR>       4096 .
<DIR>       4096 ..
<DIR>      16384 lost+found
        42197629 foonas-bootstrap-image-1.0-dev-lsarm.rootfs-svn-1650.tar.gz
<DIR>       4096 usr
<DIR>       4096 bin
<DIR>       4096 sys
<DIR>       4096 etc
<DIR>       4096 boot
<DIR>       4096 tmp
<DIR>       4096 media
<DIR>       4096 dev
<DIR>       4096 sbin
<DIR>       4096 lib
<DIR>       4096 www
<DIR>       4096 mnt
<DIR>       4096 opt
<SYM>         17 linuxrc
<DIR>       4096 proc
<DIR>       4096 home
<DIR>       4096 var

_________________
LS1 (foonas, nfs, Tranmission & p910nd print server, Firefly for my Roku)
LS-HG500 (Lenny)
Various LS-Pros v1,v2 (unbricked w/ serial & jtag)
KuroPro, LS2 & KuroHG (foonas)
Working on davysweather.dyndns.org lately...

=> wooohooo!
wooohooo!
Unknown command 'wooohooo!' - try 'help'


Top
 Profile  
 
PostPosted: Sat Apr 05, 2008 7:50 pm 
Offline
Site Admin
User avatar

Joined: Mon Aug 28, 2006 1:15 am
Posts: 2606
the lsprostockuboot.bin that jonli left behind was a version 1.01 - probably from a lsprov1 ... it works w/ foonas just fine, even on the lsprov2... you can see the version string below ( buffalo_ver=BOOTVER=1.01 )... the only change that is needed between V1 and V2 is that the v2 needs 0:1 ...
Code:
root@lsarm:~# fw_printenv
MTD_open
MTD_read
MTD_read
MTD_close
baudrate=115200
loads_echo=0
ipaddr=192.168.11.150
serverip=192.168.11.1
rootpath=/nfs/arm
cpuName=926
CASset=min
MALLOC_len=4
ethprime=egiga0
bootargs_end=:::DB88FXX81:eth0:none
buffalo_ver=BOOTVER=1.01
build_time=10:35:38
kernel=uImage.buffalo
bootargs_base=console=ttyS0,115200
bootargs_root=root=/dev/sda2 rw initrd=0x00800040,15M panic=5
def_tftp=tftp 0x00100000 $(kernel);tftp 0x00800000 $(initrd);setenv bootargs $(bootargs_base) $(bootargs_root) $(buffalo_ver);bootm 0x001000
usb0Mode=host
usb1Mode=host
ethact=egiga0
ethaddr=00:16:01:41:4E:2B
filesize=22D270
bootargs=console=ttyS0,115200 root=/dev/sda1 rw
initrd=uImage
stdin=serial
stdout=serial
stderr=serial
enaMonExt=no
enaFlashBuf=yes
enaCpuStream=no
bootdelay=3
disaMvPnp=no
overEthAddr=no
force_tftp=1
bootcmd=ext2load ide 0:1 0x00100000 /boot/uImage; setenv bootargs console=ttyS0,115200 root=/dev/sda1 rw ; bootm 0x00100000


the version 109 stuff for sure does have some sort of blocks built in that either by intent or otherwise make it difficult to use w/ anything other than stock OS ... a fresh build of version 109 makes it impossible to start up automatically... the tftp alarm comes on, since it looks for initrd in partition 1 and can't find it...

but if you change the env var "initrd" to have the value "boot/uImage" it does overcome this obstacle... and does boot automatically into foonas...

Code:
root@lsarm:~# fw_printenv
baudrate=115200
loads_echo=0
rootpath=/nfs/arm
cpuName=926
CASset=min
MALLOC_len=4
bootargs_end=:::DB88FXX81:eth0:none
ethact=egiga0
ethaddr=00:16:01:41:4E:2B
bootargs=console=ttyS0,115200 root=/dev/sda1 rw
buffalo_ver=BOOTVER=1.09
build_time=14:15:16
kernel=uImage.buffalo
bootargs_base=console=ttyS0,115200
bootargs_root=root=/dev/sda2 rw initrd=0x00800040,15M panic=5
def_tftp=tftp 0x00100000 $(kernel);tftp 0x00800000 $(initrd);setenv bootargs $(bootargs_base) $(bootargs_root) $(buffalo_ver) tftpboot=yes;bootm 0x00100000 0x00800000
stdin=serial
stdout=serial
stderr=serial
enaMonExt=no
enaFlashBuf=yes
enaCpuStream=no
ethprime=egiga0
bootdelay=3
disaMvPnp=no
overEthAddr=no
usb0Mode=host
usb1Mode=host
force_tftp=1
filesize=1b9c38
fileaddr=100000
ipaddr=192.168.11.150
serverip=192.168.11.149
bootcmd=ext2load ide 0:1 0x00100000 /boot/uImage; setenv bootargs console=ttyS0,115200 root=/dev/sda1 rw ; bootm 0x00100000
initrd=boot/uImage


EDIT: I've also confirmed that the custom uboot w/ widened commands here http://buffalo.nas-central.org/download ... bin.tar.gz works for foonas, as long as you set the initrd env var to boot/uImage ... and changes are persistent...


I'll try this again w/ the netconsole version again tomorrow... but maybe with the non-netconsole 1.1.4 uboot source first, to see if perhaps there was some minor change in 1.1.4 that we need to patch...

EDIT2: there are some differences in ext2 stuff, so this may be why the ext2 command set wasn't working right... the ide commands seem to work correctly though ...

_________________
LS1 (foonas, nfs, Tranmission & p910nd print server, Firefly for my Roku)
LS-HG500 (Lenny)
Various LS-Pros v1,v2 (unbricked w/ serial & jtag)
KuroPro, LS2 & KuroHG (foonas)
Working on davysweather.dyndns.org lately...

=> wooohooo!
wooohooo!
Unknown command 'wooohooo!' - try 'help'


Top
 Profile  
 
PostPosted: Sun Apr 06, 2008 7:30 pm 
Offline
Site Admin
User avatar

Joined: Mon Aug 28, 2006 1:15 am
Posts: 2606
...found the problem, it was just a minor change that I needed to backup to ... in common/cmd_ext2.c, so the ext2* commands in uboot work again... 8-)

this gives us currently:
- basic netconsole (comes up by default)
- will work with both stock OS from Buffalo, or foonas (from hdd or em)
- fuller command set (everything in LNI's except the nfs stuff)
- changes to env var bootcmd and def_tftp can now be persistent, so the user can define which files/image to tftp load and boot automatically if no valid hdd rootfs is found (ie, you can set it up to look for/boot a foonas-em image on a local tftp server in case your hdd has a problem)
- switching back to serial console is possible by issuing "run ser" in uboot ...


still to do:
- test in a LSProV1 and see if it will autodetect/find the correct hdd & partition on the V1 (1:1)
- set up either autodetect or a hardware switch/button for changing to serial console instead of netconsole
- add in the nfs stuff
- make a few minor changes to the network/tftp timeouts so that the startup time is right around 15-20 seconds
- disable the irritating Hi-Lo tftp alarm again...

_________________
LS1 (foonas, nfs, Tranmission & p910nd print server, Firefly for my Roku)
LS-HG500 (Lenny)
Various LS-Pros v1,v2 (unbricked w/ serial & jtag)
KuroPro, LS2 & KuroHG (foonas)
Working on davysweather.dyndns.org lately...

=> wooohooo!
wooohooo!
Unknown command 'wooohooo!' - try 'help'


Last edited by davy_gravy on Mon Apr 07, 2008 12:13 pm, edited 1 time in total.

Top
 Profile  
 
PostPosted: Sun Apr 06, 2008 8:19 pm 
Offline
Newbie

Joined: Sun Mar 23, 2008 2:47 pm
Posts: 15
how about watchdog timer?

is there a simple way to disable watchdog timer?
otherwise there is only 5 minutes you can play with uboot command prompt.


Top
 Profile  
 
PostPosted: Sun Apr 06, 2008 8:46 pm 
Offline
Site Admin
User avatar

Joined: Mon Aug 28, 2006 1:15 am
Posts: 2606
from my experience, it will stay up (forever) as long as it has successfully found whatever the env var "initrd" is defined as ... I have it set to be 'uImage"

if it hasn't found this file on the hdd, it will indeed die out after 5 min or so... this can be dangerous if one is flashing something to ROM and the timer expires, so it would be nice to disable it completely ... (!)

It would be nice if it could be as simple as disabling it in include/configs/db88f5181.h, but it seems that it already is ... ?

Code:
...
/* which initialization functions to call for this board */
#define CONFIG_MISC_INIT_R   1      /* after relloc initialization*/
#undef CONFIG_DISPLAY_MEMMAP    /* at the end of the bootprocess show the memory map*/

#define CONFIG_ENV_OVERWRITE    /* allow to change env parameters */

#undef   CONFIG_WATCHDOG      /* watchdog disabled      */

/* Cache */
...
#define CFG_CACHELINE_SIZE   32   


will look into this further...

EDIT: tiamo, after some talk on the irc, bbradley tipped me to checking out the micon commands ...
issuing:
Code:
micon -0x35 -0xff
kept it up and running - it didn't die after 5 minutes... though this may have not been the exact command we were looking for ... probably
Code:
micon -0x01 -0x35
was the sought after one... maybe just about any micon command issued will do the trick...

Now we just need to code this in so that it will issue the proper micon command to keep it alive regardless of whether it found the initrd... this is important because it safeguards against the box automatically powering down - which would be disasterous (jtag!) if a user was flashing something to ROM while it shutdown automatically...

_________________
LS1 (foonas, nfs, Tranmission & p910nd print server, Firefly for my Roku)
LS-HG500 (Lenny)
Various LS-Pros v1,v2 (unbricked w/ serial & jtag)
KuroPro, LS2 & KuroHG (foonas)
Working on davysweather.dyndns.org lately...

=> wooohooo!
wooohooo!
Unknown command 'wooohooo!' - try 'help'


Top
 Profile  
 
PostPosted: Mon Apr 07, 2008 12:11 pm 
Offline
Site Admin
User avatar

Joined: Mon Aug 28, 2006 1:15 am
Posts: 2606
in looking for some clues about micon, I stumbled across some stuff dealing with a function called system_not_found ...

Code:
fgrep -rin system_not_found .
./board/mv88fxx81/Soc/uart/mvUart.h:155:MV_VOID system_not_found(void) ;
./board/mv88fxx81/Soc/uart/mvUart.c:479:MV_VOID system_not_found(void)
./common/main.c:522:                    system_not_found() ;
./common/main.c:1072:                   system_not_found();
./u-boot.map:380:                0x00f1b940                system_not_found
./System.map:308:00f1b940 T system_not_found


I'm wondering if it may be something that is called in case... the file specified in the env var initrd is not found... haven't had a chance to chase this down, but in board/mv88fxx81/Soc/uart/mvUart.c one can see how micon commands are sent... so maybe this shed light on how to tell micon to keep it up and running...

_________________
LS1 (foonas, nfs, Tranmission & p910nd print server, Firefly for my Roku)
LS-HG500 (Lenny)
Various LS-Pros v1,v2 (unbricked w/ serial & jtag)
KuroPro, LS2 & KuroHG (foonas)
Working on davysweather.dyndns.org lately...

=> wooohooo!
wooohooo!
Unknown command 'wooohooo!' - try 'help'


Top
 Profile  
 
PostPosted: Mon Apr 07, 2008 5:11 pm 
Offline
Newbie

Joined: Sun Mar 23, 2008 2:47 pm
Posts: 15
Quote:
micon -0x35 -0xff


yes micon works by setting watchdog timer to zero
but micon command does not exist in v1 uboot


Top
 Profile  
 
PostPosted: Mon Apr 07, 2008 10:38 pm 
Offline
Site Admin
User avatar

Joined: Mon Aug 28, 2006 1:15 am
Posts: 2606
we just have to figure out where to put it in the code ... hehe ...

I will be trying my V2 Uboot in my LSprov1 this week ... later ...

I am hopeful that it can be used either as is, with just changes to env vars, or with a bit of tweaking of the source code. It would be useful to have a single uboot that would work in either LSPro or the TeraStation... For that reason, I want to be careful to minimize any changes that would undercut it working in the TS-arm...

EDIT: something to add in - some prefigured scripts as uboot env vars that one could run to set it up for default boots into foonas or genlink:

ie: run foonasvars would set up def_tftp and bootcmd for automatic foonas booting , etc.
run stockbootvars would do the same for restoring default boot vars for stockware or jtymod, etc.

_________________
LS1 (foonas, nfs, Tranmission & p910nd print server, Firefly for my Roku)
LS-HG500 (Lenny)
Various LS-Pros v1,v2 (unbricked w/ serial & jtag)
KuroPro, LS2 & KuroHG (foonas)
Working on davysweather.dyndns.org lately...

=> wooohooo!
wooohooo!
Unknown command 'wooohooo!' - try 'help'


Top
 Profile  
 
PostPosted: Wed Apr 09, 2008 4:13 am 
Offline
Site Admin
User avatar

Joined: Mon Aug 28, 2006 1:15 am
Posts: 2606
just confirmed that the latest version that I built works in both the V1 and V2 LSPro - the serch_boot does indeed find the uImage correctly and boot it, regardless of it being on 0:1 or 1:1 (!) ... and it ought to (ehrr ... might) work on the TeraStation rev5, as well ... (the code shows it as a supported board, along with the lcd stuff)

boots my lsprov1 w/ foonas, seems to work well, with the fallback to tftp-em changed to pull in a foonas-em image... :up: can finally work unfettered on foonas lsarm w/ netconsole :up: which was my reason for doing this, anyway ... (and hopefully this will be one of the last times I have to open/close the case on my V1 :) )

...will work on making sure this is all just right for stock firmware, as well ... test this in both boxes for another week or so, code in persistent commands/scripts for:

- setting foonas booting env vars & hdd boot after a tftp-switch done
- restoring default/stock booting env vars (maybe different scripts for V1 and V2) done
- keep-alive when no hdd is found done
- & anything else you all request... (whatever is feasible)

need to document which env vars need to be changed in order for it to work in both V1 and V2 for the stock OS, but this will have to wait until my extra hdd arrives...


would anyone be interesting in adding flash/NAND support for 256MB flash in the KuroPro?

_________________
LS1 (foonas, nfs, Tranmission & p910nd print server, Firefly for my Roku)
LS-HG500 (Lenny)
Various LS-Pros v1,v2 (unbricked w/ serial & jtag)
KuroPro, LS2 & KuroHG (foonas)
Working on davysweather.dyndns.org lately...

=> wooohooo!
wooohooo!
Unknown command 'wooohooo!' - try 'help'


Last edited by davy_gravy on Thu Apr 10, 2008 6:14 am, edited 2 times in total.

Top
 Profile  
 
PostPosted: Wed Apr 09, 2008 6:59 am 
Offline
Regular Member
User avatar

Joined: Tue Oct 09, 2007 9:01 am
Posts: 117
Yes, of course ;).


Top
 Profile  
 
PostPosted: Wed Apr 09, 2008 11:40 am 
Offline
Site Admin
User avatar

Joined: Mon Jul 11, 2005 7:19 am
Posts: 7702
Location: Austria, Vienna
great.

i finished my thesis today. will soon solder the jtag headers on a LS Pro v1 and a dead LS Pro v2 so i can join testing.

_________________
LS1 (2.6 kernel, foonas svn1062, 750 GB, UBoot 1.2) & LS Pro (FreeLink/jtymod/GenLink, changes all the time)
Thx to all donators!


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 117 posts ]  Go to page Previous  1 ... 3, 4, 5, 6, 7, 8  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:

Protected by Anti-Spam ACP
Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group