Buffalo NAS-Central Forums

Welcome to the Linkstation Wiki community
It is currently Thu Oct 02, 2014 9:31 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 58 posts ]  Go to page 1, 2, 3, 4  Next
Author Message
PostPosted: Wed Mar 25, 2009 5:50 pm 
Offline
Site Admin
User avatar

Joined: Sun Jul 17, 2005 4:34 pm
Posts: 5330
I'm currently working on a utility called flashinstaller which is supposed to install uboot one fine day, as a compliment to the webinstaller.

Unfortunately, I've flashed a LS2 ROM onto my LS1. Realizing my mistake, I wanted to flash the four mtds in

http://downloads.buffalo.nas-central.or ... hContents/

but made a second mistake:

dd if=mtd1 of=/dev/mtdblock0 bs=1k

wrong device!! and hit Ctrl-c in the middle of the process. Flashed mtd[1-4] cleanly thereafter.

I fear this is fatal once I have to reboot the box. What can I do?


Top
 Profile  
 
PostPosted: Wed Mar 25, 2009 8:26 pm 
Offline
Site Admin
User avatar

Joined: Tue Mar 21, 2006 9:11 pm
Posts: 658
grab a working u-boot binary for your Kuro HD and flash it brfore you reboot. once you have uboot installed you can pretty much recover from anything without jtag.

You can use the original nijino bootloader at http://downloads.buffalo.nas-central.or ... u-boot.bin assuming you have a serial port installed as it doesn't have network support.

or you can flash the linuxnotincluded 2.01 uboot at http://downloads.buffalo.nas-central.or ... NI.Patched. according to the readme at http://downloads.buffalo.nas-central.or ... OOT-README I built that binary in 1/15/2007 and it needs a netconsole at 192.168.11.149.

Good luck and Let us know how it goes.

_________________
My completely scratch built 832 push-pull tube amplifier with Padauk frame. It matches my custom mini-ITX machine.


Top
 Profile  
 
PostPosted: Wed Mar 25, 2009 11:16 pm 
Offline
Site Admin
User avatar

Joined: Mon Aug 28, 2006 1:15 am
Posts: 2606
andre, you can also dump out the contents of flash using dd or cat, and then compare them to the original.

In practice, I never reboot until I see that the dumped contents match the the original image/bin file.

EDIT : well, I seldom do it ... hehe :P

_________________
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: Thu Mar 26, 2009 7:19 am 
Offline
Site Admin
User avatar

Joined: Sun Jul 17, 2005 4:34 pm
Posts: 5330
Thanks for your assistance!!

Bauldrick sent me a dump of his LS1 foonas flash ROM, which I applied and also installed my uboot kernel. I wonder what happens when I have to reboot one day, but I'm more optimistic than I was yesterday.

Regarding the blitzer (the upcoming flashinstaller): It seems to be a good idea to include fix_ext2_magic in the LS1 and LS2 ROMs, in case their EM kernels don't support the Buffalo scheme. How can you repackage third-party ROM images?


Top
 Profile  
 
PostPosted: Sat Mar 28, 2009 2:37 pm 
Offline
Site Admin
User avatar

Joined: Sun Jul 17, 2005 4:34 pm
Posts: 5330
Unfortunately, there is a catch with Bauldrick's flash dump.

I've got these devices and flashed his foonas dump to

mtd0: 00300000 00010000 "mtd_firmimg"
mtd1: 00070000 00010000 "mtd_bootcode"
mtd2: 00010000 00010000 "mtd_status"
mtd3: 00080000 00010000 "mtd_conf"
mtd4: 00400000 00010000 "mtd_allflash"

but he's got one additional device

mtd5: 000f0000 00010000 "mtd_data"

which I can't flash tobecause I don't have /dev/mtdblock5 (2.6.18 w/ tonyo's patch). How can I fix that -- is that part essential to (u)boot the system?!

In the Wiki, there are the original mtd[1-4] (note: no mtd0) so not enough devices, Bauldrick has got one too many for me. Where can I get matching LS1 flash ROM contents?! I don't care what it is at this moment, I just want to know for sure the box comes up after a reboot or shutdown.

BTW, the flashinstaller now supports LS2 and LS1 and can be extended easily. My plan is to collect uboot Flash ROM dumps for various boxes to feed it, can you upload yours please?


Top
 Profile  
 
PostPosted: Sat Mar 28, 2009 3:04 pm 
Offline
Betatester
User avatar

Joined: Thu Jul 14, 2005 4:38 pm
Posts: 941
Location: England
Is the firming.bin inside firmware updater mtd0 ?If it is you can grab that then 1,2,3,4 form download section. That way you'd return to stock


Top
 Profile  
 
PostPosted: Sat Mar 28, 2009 3:30 pm 
Offline
Site Admin
User avatar

Joined: Tue Mar 21, 2006 9:11 pm
Posts: 658
grab one of the uboot binaries i suggested before and copy it to /dev/mtd_bootcode. that should get you a working uboot. after you do that you can reboot and get to a uboot console. from there you can flash em mode or better yet, a telnet enabled firmimg.bin. your other option is to flash a 4MB firmware image to mtd_allflash.

_________________
My completely scratch built 832 push-pull tube amplifier with Padauk frame. It matches my custom mini-ITX machine.


Top
 Profile  
 
PostPosted: Sat Mar 28, 2009 4:07 pm 
Offline
Site Admin
User avatar

Joined: Mon Aug 28, 2006 1:15 am
Posts: 2606
andre, this is from my LS1 (runs foonas, p910nd, Transmission,etc) ...
Code:
root@lsppchd:~# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00300000 00010000 "mtd_firmimg"
mtd1: 00070000 00010000 "mtd_bootcode"
mtd2: 00010000 00010000 "mtd_status"
mtd3: 00080000 00010000 "mtd_conf"
mtd4: 00400000 00010000 "mtd_allflash"
mtd5: 000f0000 00010000 "mtd_data"

I have the uboot 1.2.0, Foonas-em and some alterations/custom uboot env settings...

I can dump and upload whatever you need... allflash or the specific parts. If need be I can even do some tinkering/testing here on my Franken-LS1 for you, as I have jtag headers on my board and it is not a big deal if it bricks.

Kuroguy is right when he says that if you can just get a valid uboot in mtd1 (and can confirm its contents as identical to the original bin) you should be "safe", and can reboot. tftp booting is an easy option thereafter.


BTW, is the mtd layout defined by the kernel that one boots?

_________________
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 Mar 28, 2009 4:59 pm 
Offline
Site Admin
User avatar

Joined: Sun Jul 17, 2005 4:34 pm
Posts: 5330
The box froze for an unknown reason, so I had to pull the power plug before I could follow your advice. All I get now is a network LED flicker and a slowly pulsing green light, with either setting of the crossover switch. Can't ping or nmap the box on 192.168.11.150.

EDIT: But I can do this, then it stops:

Connection to 192.168.11.150 6666 port [udp/*] succeeded!
...OK
Device 0: Model: Hitachi HDT725050VLAT80 Firm: V56OA4NA Ser#: VF1400R4CWK25A
Type: Hard Disk
Supports 48-bit addressing
Capacity: 476940.0 MB = 465.7 GB (976773168 x 512)
Boot in 01 seconds ('s' to stop)...
Loading 0:1:boot/vmlinux.UBoot

1642081 bytes read

2236 bytes read
## Booting image at 00800000 ...
Image Name: Linux-2.6.18-kurobox
Image Type: PowerPC Linux Kernel Image (gzip compressed)
Data Size: 1642017 Bytes = 1.6 MB
Load Address: 00000000
Entry Point: 00000000
Verifying Checksum ... OK
Uncompressing Kernel Image ... OK
Booting using flat device tree at 0x7f0000


Top
 Profile  
 
PostPosted: Sat Mar 28, 2009 5:10 pm 
Offline
Betatester
User avatar

Joined: Thu Jul 14, 2005 4:38 pm
Posts: 941
Location: England
That's my fault (partly I think) I said in an early message that my foonas-em wasn't loading.
I think you don't have the correct image (or named image) at /boot and it's then trying to load foonas-em (which gives checksum... bad crc).

Start the box again after nc -u -p 6666 -v 192.168.11.150 6666 and stop uboot - then tftp foonas-em , mount hda1 and correct image at /boot

-edit-

maybe not then..


Top
 Profile  
 
PostPosted: Sat Mar 28, 2009 5:12 pm 
Offline
Site Admin
User avatar

Joined: Mon Aug 28, 2006 1:15 am
Posts: 2606
:)

the slowly pulsing green light should be a good sign... it means that U-Boot is "breathing" (sorry, that's an extreme anthropomorphization - but you know what I mean)...

While it is slowly pulsing the green LED, try pressing the power button once quickly... it should cause the red LED to blink... this is the minimal console:

1 blink - hdd booting
2 blinks - hddrootfs + ROM kernel booting
3 blinks - EM (firmimg.bin) booting

http://buffalo.nas-central.org/index.ph ... al_Console


do you have anything in mtd0 yet? like maybe mindbenders 2.4.33.3v3 firmimg.bin?

_________________
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 Mar 28, 2009 5:18 pm 
Offline
Betatester
User avatar

Joined: Thu Jul 14, 2005 4:38 pm
Posts: 941
Location: England
I take it you have run fix_ext2 on the box before? This is what's happened to me whilst testing on LS2, remember


Top
 Profile  
 
PostPosted: Sat Mar 28, 2009 5:39 pm 
Offline
Site Admin
User avatar

Joined: Sun Jul 17, 2005 4:34 pm
Posts: 5330
OK, two clicks got me to the foonas-em console, and I've been able to mount /dev/sda1 and /dev/sda3 (Bauldrick!!). My kernels support the org. IDE driver which accesses everything at /dev/hda?.

The question is, how can I fix uboot from here. This is my boot directory:

-rw-r--r-- 1 root root 18011 Jun 1 2006 COPYING
-rw-r--r-- 1 root root 692848 Feb 11 08:28 System.map
-rw-r--r-- 1 root root 692848 Feb 11 08:28 System.map18
-rw-r--r-- 1 root root 45370 Feb 11 08:22 config
-rw-r--r-- 1 root root 45370 Feb 11 08:22 config18
-rwx------ 1 root root 430080 Oct 25 2007 insmod.mipsel
-rwx------ 1 root root 143004 Oct 24 2007 insmod.ppc
lrwxrwxrwx 1 root root 13 Mar 25 18:22 kurobox.dtb -> kuroboxHD.dtb
-rw-r--r-- 1 root root 2236 Jan 15 2008 kuroboxHD.dtb
-rw-r--r-- 1 root root 2236 Jan 15 2008 kuroboxHG.dtb
-rw-r--r-- 1 root root 4862 Aug 4 2007 loaderHG.o
-rw-r--r-- 1 root root 8164 Aug 29 2007 loaderII.o
-rw-r--r-- 1 root root 4938 Aug 4 2007 loaderKB.o
-rw-r--r-- 1 root root 5135 Aug 4 2007 loaderKG.o
-rw-r--r-- 1 root root 5135 Aug 4 2007 loaderKO.o
-rw-r--r-- 1 root root 5075 Aug 4 2007 loaderLS.o
-rw-r--r-- 1 root root 4862 Jun 29 2007 loaderTS.o
-rw-r--r-- 1 root root 11 Mar 19 18:03 try_new_kernel.running
-rw-r--r-- 1 root root 13 Mar 19 18:03 try_new_kernelHG
-rw-r--r-- 1 root root 13 Mar 19 18:03 try_new_kernelII
-rw-r--r-- 1 root root 13 Mar 19 18:03 try_new_kernelKB
-rw-r--r-- 1 root root 13 Mar 19 18:03 try_new_kernelKG
-rw-r--r-- 1 root root 13 Mar 19 18:03 try_new_kernelKO
-rw-r--r-- 1 root root 13 Mar 19 18:03 try_new_kernelLS
-rw-r--r-- 1 root root 13 Mar 19 18:03 try_new_kernelTS
-rw-r--r-- 1 root root 1642081 Mar 20 08:16 uImage
-rw-r--r-- 1 root root 0 Feb 6 2008 variant-headers
-rw-r--r-- 1 root root 0 Feb 20 2008 variant-legacy
-rw-r--r-- 1 root root 0 Feb 20 2008 variant-nfs
-rw-r--r-- 1 root root 0 Mar 25 18:18 variant-uboot
-rw-r--r-- 1 root root 19 Feb 11 10:09 version
-rw-r--r-- 1 root root 19 Feb 11 10:09 version18
-rw-r--r-- 1 root root 10 Aug 1 2008 version25
lrwxrwxrwx 1 root root 6 Mar 25 18:47 vmlinux.UBoot -> uImage
-rwxr-xr-x 1 root root 3510406 Feb 11 08:28 vmlinux.bin
-rwxr-xr-x 1 root root 3510406 Feb 11 08:28 vmlinux.bin18

I'm not sure whether the dtb files (from 2.6.25.20) work with 2.6.18. The question is: Why doesn't it boot with my own kernel?


Top
 Profile  
 
PostPosted: Sat Mar 28, 2009 5:48 pm 
Offline
Site Admin
User avatar

Joined: Mon Aug 28, 2006 1:15 am
Posts: 2606
if you install something like Debian's uboot-envtools and run fw_printenv while in Debian, you you'll see your uboot env vars:
Code:
root@lsppchd:~# fw_printenv
bootargs=root=/dev/sda1 netconsole=6666@192.168.11.150/,@192.168.11.149/ rtc-rs5c372.probe=0,0x32
bootcmd=run bootcmd1
nfsboot=bootp;run nfsargs;bootm
bootdelay=10
baudrate=57600
autoload=no
stdin=nc
stdout=nc
stderr=nc
ipaddr=192.168.11.150
netmask=255.255.255.0
serverip=192.168.11.149
ncip=192.168.11.149
netretry=no
nc=setenv stdin nc;setenv stdout nc;setenv stderr nc
ser=setenv stdin serial;setenv stdout serial;setenv stderr serial
ldaddr=800000
hdpart=0:1
hdfile=boot/uImage
hdload=echo Loading ${hdpart}:${hdfile};ext2load ide ${hdpart} ${ldaddr} ${hdfile};ext2load ide ${hdpart} 7f0000 boot/kuroboxHD.dtb
boothd=setenv bootargs root=/dev/sda1 netconsole=6666@192.168.11.150/,@192.168.11.149/ rtc-rs5c372.probe=0,0x32;bootm ${ldaddr} - 7f0000
hdboot=run hdload boothd
flboot=setenv bootargs root=/dev/hda1;bootm ffc00000
emboot=setenv bootargs root=/dev/ram0;bootm ffc00000
nfsargs=setenv bootargs root=/dev/nfs rw nfsroot=${serverip}:${rootpath} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off
bootretry=30
bootcmd3=run emboot
writeng=protect off fff70000 fff7ffff;era fff70000 fff7ffff;mw.l 800000 4e474e47 1;cp.b 800000 fff70000 4
writeok=protect off fff70000 fff7ffff;era fff70000 fff7ffff;mw.l 800000 4f4b4f4b 1;cp.b 800000 fff70000 4
ubpart=0:1
ubfile=share/u-boot/u-boot-hd.flash.bin
ubload=echo Loading ${ubpart}:${ubfile};ext2load ide ${ubpart} ${ldaddr} ${ubfile}
ubsaddr=fff00000
ubeaddr=fff2ffff
ubflash=protect off ${ubsaddr} ${ubeaddr};era ${ubsaddr} ${ubeaddr};cp.b ${ldaddr} ${ubsaddr} ${filesize};cmp.b ${ldaddr} ${ubsaddr} ${filesize}
upgrade=run ubload ubflash
ethact=COMET#0
foofl2=setenv bootargs root=/dev/ram0 rw;bootm ${ldaddr} - FFFFF6AC
foofl1=cp.b FFC00000 800000 2FFFFF;cp.b fff80000 AFFFFF 7E887
fooflboot=run foofl1 foofl2
bootcmd1=run hdboot;run fooflboot
bootcmd2=run fooflboot


These are my contents for my foonas-buuilt kernel that uses the pata (sdXY) drivers. I'm thinking you have the ide (hdXY) setup w/ your kernel. You may have to change your uboot env vars to use sda1, etc.


fw_setenv has the following syntax, by example:
Code:
root@lsppchd:~# fw_setenv andremessage 'hello to andre in Koln'
Unlocking flash...
Done
Erasing old environment...
Done
Writing environment to /dev/mtd4...
Done
Locking ...
Done
root@lsppchd:~# fw_printenv | grep andre
andremessage=hello to andre in Koln


the values you would have to change are probably just bootargs and anything else you can see that has a "sdXY"-ish value in it ... to a hda1 or hda-whatever.

if that is the case...maybe something like :
Code:
fw_setenv  bootargs 'root=/dev/hda1 netconsole=6666@192.168.11.150/,@192.168.11.149/ rtc-rs5c372.probe=0,0x32'


The same can be done w/ printenv and setenv in Uboot, but the setenv is not by itself durable/permanent while in uboot - in this situation it needs to be followed by saveenv to make those values stored in ROM.


Would like to stick around and see you get through this OK :| , but ot to go to opening of a play at the theatre :) ... will check back later this evening ... ;)

Good luck, andre. :)

_________________
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 Mar 28, 2009 6:51 pm 
Offline
Site Admin
User avatar

Joined: Sun Jul 17, 2005 4:34 pm
Posts: 5330
No luck yet. Here's my

foonas-em$ fw_printenv
nfsboot=bootp;run nfsargs;bootm
bootdelay=10
baudrate=57600
autoload=no
stdin=nc
stdout=nc
stderr=nc
ipaddr=192.168.11.150
netmask=255.255.255.0
serverip=192.168.11.149
ncip=192.168.11.149
netretry=no
nc=setenv stdin nc;setenv stdout nc;setenv stderr nc
ser=setenv stdin serial;setenv stdout serial;setenv stderr serial
hdfile=boot/uImage
hdload=echo Loading ${hdpart}:${hdfile};ext2load ide ${hdpart} ${ldaddr} ${hdfile};ext2load ide ${hdpart} 7f0000 boot/kuroboxHD.dtb
boothd=setenv bootargs root=/dev/sda1 netconsole=6666@192.168.11.150/,@192.168.11.149/ rtc-rs5c372.probe=0,0x32;bootm ${ldaddr} - 7f0000
hdboot=run hdload boothd
flboot=setenv bootargs root=/dev/hda1;bootm ffc00000
emboot=setenv bootargs root=/dev/ram0;bootm ffc00000
nfsargs=setenv bootargs root=/dev/nfs rw nfsroot=${serverip}:${rootpath} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off
bootretry=30
bootcmd3=run emboot
writeng=protect off fff70000 fff7ffff;era fff70000 fff7ffff;mw.l 800000 4e474e47 1;cp.b 800000 fff70000 4
writeok=protect off fff70000 fff7ffff;era fff70000 fff7ffff;mw.l 800000 4f4b4f4b 1;cp.b 800000 fff70000 4
ubpart=0:1
ubfile=share/u-boot/u-boot-hd.flash.bin
ubload=echo Loading ${ubpart}:${ubfile};ext2load ide ${ubpart} ${ldaddr} ${ubfile}
foonas-em$ fw_printenv
nfsboot=bootp;run nfsargs;bootm
bootdelay=10
baudrate=57600
autoload=no
stdin=nc
stdout=nc
stderr=nc
ipaddr=192.168.11.150
netmask=255.255.255.0
serverip=192.168.11.149
ncip=192.168.11.149
netretry=no
nc=setenv stdin nc;setenv stdout nc;setenv stderr nc
ser=setenv stdin serial;setenv stdout serial;setenv stderr serial
hdfile=boot/uImage
hdload=echo Loading ${hdpart}:${hdfile};ext2load ide ${hdpart} ${ldaddr} ${hdfile};ext2load ide ${hdpart} 7f0000 boot/kuroboxHD.dtb
boothd=setenv bootargs root=/dev/sda1 netconsole=6666@192.168.11.150/,@192.168.11.149/ rtc-rs5c372.probe=0,0x32;bootm ${ldaddr} - 7f0000
hdboot=run hdload boothd
flboot=setenv bootargs root=/dev/hda1;bootm ffc00000
emboot=setenv bootargs root=/dev/ram0;bootm ffc00000
nfsargs=setenv bootargs root=/dev/nfs rw nfsroot=${serverip}:${rootpath} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off
bootretry=30
bootcmd3=run emboot
writeng=protect off fff70000 fff7ffff;era fff70000 fff7ffff;mw.l 800000 4e474e47 1;cp.b 800000 fff70000 4
writeok=protect off fff70000 fff7ffff;era fff70000 fff7ffff;mw.l 800000 4f4b4f4b 1;cp.b 800000 fff70000 4
ubpart=0:1
ubfile=share/u-boot/u-boot-hd.flash.bin
ubload=echo Loading ${ubpart}:${ubfile};ext2load ide ${ubpart} ${ldaddr} ${ubfile}
ubsaddr=fff00000
ubeaddr=fff2ffff
ubflash=protect off ${ubsaddr} ${ubeaddr};era ${ubsaddr} ${ubeaddr};cp.b ${ldaddr} ${ubsaddr} ${filesize};cmp.b ${ldaddr} ${ubsaddr} ${filesize}
upgrade=run ubload ubflash
ethact=COMET#0
filesize=8BC
bootargs=root=/dev/hda1
sdboot=run sdload bootsd
sdfile=boot/vmlinux.UBoot
sdload=echo Loading ${hdpart}:${sdfile};ext2load ide ${hdpart} ${ldaddr} ${sdfile};ext2load ide ${hdpart} 7f0000 boot/kuroboxHD.dtb
hdpart=0:1
ldaddr=800000
bootsd=setenv bootargs root=/dev/sda1 netconsole=6666@192.168.11.150/,@192.168.11.149/ rtc-rs5c372.probe=0,0x32;bootm 00800000 - 7f0000
bootcmd=run sdboot
foofl1=cp.b FFC00000 800000 2FFFFF;cp.b fff80000 AFFFFF 7E86B
foofl2=setenv bootargs root=/dev/ram0 rw;bootm ${ldaddr} - FFFFF6AC
fooflboot=run foofl1 foofl2
bootcmd1=run hdboot;run fooflboot
bootcmd2=run fooflboot


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 58 posts ]  Go to page 1, 2, 3, 4  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 2 guests


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