Buffalo NAS-Central Forums

Welcome to the Linkstation Wiki community
It is currently Tue Feb 20, 2018 6:32 pm

All times are UTC+01:00




Post new topic  Reply to topic  [ 187 posts ]  Go to page Previous 17 8 9 10 1113 Next
Author Message
PostPosted: Wed Nov 07, 2007 2:50 pm 
Offline
Total Newbie

Joined: Sat Oct 13, 2007 4:02 am
Posts: 4
I also want a 2.6.22 kernel with netconsole support, so I can diagnose the problem that the kernel cannot boot from nfs.
How to add this support?

jthenley wrote:
Bauldrick wrote:
Linux LinkStation2 2.6.22.ls2 #1 Thu Oct 18 03:58:41 BST 2007 mips....
I hadn't changed the static IP that freelink ships with, changed it and it comes up!!

Baludrick - What did you do exactly to fix this? change the entry in /etc/network/interfaces to a new static IP? I do not understand how that fixed it. I have exactly the problem you described, in the netcat terminal it unpacks the kernel and says it is starting to boot, but then nothing. I think I must be having a past life regression as you - I followed almost exactly the same process independently before I saw your post:
  • I used to have openlink, dl'd the pre-compiled installed u-boot 1.0.1 and 2.6.22 kernel, it failed but 2.4 worked.
  • I tried flashing to freelink using the firmware update (having to mess around removing/re-applying u-boot), it still failed (but 2.4 still worked with u-boot).
  • I then bult my own kernel based on linuxnotincluded's patch (natively on the box having removed the cross-compiler prefix's to gcc etc. - it took a little while), when it finished, tried it and ... it failed.
  • I then found your post on page 6 of this thread and am really confused as to why changing the static ip would make any difference, unless it only booted with a specific IP set. Mine is 10.2.2.10 - this is always the first thing I set, in openlink, freelink straight after install. I do not understand what is going on, and without console is difficult to tell.
    Code:
    root@LINKSTATION:/lib/modules/2.6.22.ls2# cat /etc/network/interfaces
    auto lo
    iface lo inet loopback

    auto eth0
    iface eth0 inet static
    address 10.2.2.10
    netmask 255.255.255.0
    broadcast 10.2.0.255
    gateway 10.2.2.2
  • I followed linuxnotincluded's suggestion to do a tcpdump while the box is booting. I did this, and nothing appears after the UDP traffic from netcat - no DHCP requests/anything.
  • Note I did also unpack the modules to /lib/modules/2.6.22.ls2 (in both freelink and openlink versions)

All I have left to try is to install another distro on the box on another partition and do the inspection of syslog/dmesg but I have not seen/heard any disk activity on the box after the starting kernel message to suggest it is getting far enough to start logging. It would be really nice if the console messages from the kernel booting could be output to netcat also - is this possible?

Baludrick - any clarification on what you did would be great - I am pulling my hair out. Were you wearing a lucky hat when you booted the kernel?

Any other suggestions LNI so I can help to debug this problem - appears to be reproducable. Really want to get this working so I can get on with programming my usb/pl2303 serial interface PLCBus device to control my house lights from my LS2!

Thanks for your help, Justin.

EDIT: just adding netconsole support to my kernel and rebuilding... expect a post back in 4/5 hours saying it still does not work!

UPDATE: didn't work :cry: didn't clean first so going to try it again after a proper build, if someone would like to post a 2.6.22 kernel with netconsole support, would be appreciated


Top
   
PostPosted: Wed Nov 07, 2007 2:57 pm 
Offline
Site Admin
User avatar

Joined: Mon Jul 11, 2005 7:19 am
Posts: 7703
Location: Austria, Vienna
i suppose jthenley changed the config to include netconsole

it uses the config "CONFIG_NETCONSOLE" and can be found somewhere in "networking"
as you want to debug the kernel your only chance would be to compile it into the kernel, so use "y" (or "*" in the ncurses based config tool if you use "make menuconfig") and not "m"....

http://www.mjmwired.net/kernel/Document ... onsole.txt

_________________
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
   
PostPosted: Thu Nov 08, 2007 1:17 pm 
Offline
Betatester
User avatar

Joined: Thu Jul 14, 2005 4:38 pm
Posts: 941
Location: England
I can't quite remember what I did :(

I know I had a hat on at the time, but it wasn't my lucky one!

I did change to IP address, but like you say, I can't see that made the difference (specially seeing yours isn't working). I figured u-boots address was the same as default Freelink (.11.150) and so something screwy was happening, but obviously I was wrong.

Actually, I think I followed part of Freelinkomatix script, because LNI mentioned DHCP etc... which Freelink LS2 doesn't come with? Not sure, but I think I did this aswell:

dpkg --purge dhcpcd
apt-get install dhcp3-client

Pretty blurry though


Top
   
PostPosted: Thu Nov 08, 2007 2:44 pm 
Offline
Developer

Joined: Sat Aug 19, 2006 4:53 pm
Posts: 187
Location: United Kingdom (Great Britain)
I apologise for not replying for a time but I am quite busy these days.

Regarding the ST Micro flash, I have discoverd a bug. This chip has 2 banks and U-Boot appears to treat only the first half correctly. I don't have a LS2 with a ST Micro flash anymore so I can't really test so I am not sure if the second half of the flash is writeable by U-Boot. To resume:
  1. The first half, from 0xbfc00000 to 0xbfdfffff should flash without any problems.
  2. I can't test but if you can write anywhere to the second half, then you can write everywhere in the second half, from 0xbfe00000 to 0xbfffffff.
  3. If writing to the second half works, do not try to flash accross the half boundary. Flash to each half with separate commands.

Regarding flashing from linux 2.6, I don't really know. I didn't touch the flash routines themselves, I just added the LS2 partitions. If there is a bug, it is in the 2.6.22 flash code. I will look into it but not very soon.

In case you are wondering, in my 2.4.33 port of the ppc LS, I just dumped the flash code directly from the buffalo kernel as I knew it was "tried tested and true". I was hoping that any problems with the flash code was resolved in 2.6.22 but it appears I was wrong.


Top
   
PostPosted: Thu Nov 08, 2007 2:55 pm 
Offline
Developer
User avatar

Joined: Sun Dec 31, 2006 10:40 am
Posts: 434
Location: Scotland
The LS2 that I had sent you originally LNI is now in the hands of timtimred, as he's not too far away. maybe you & him can arrange something.

_________________
LS-500GL - Diskless
LS-250GL - Armel, U-Boot NC Enabled
HS-DH320GL - Stock 1.11_1a
LS-H120LAN(PPC) - Dev (foonas)
LS-H120LAN(PPC) - Freelink - 2.6.23.8
LS-H250LAN(MIPS) - Dev (foonas-em, foonas)
LS-HS400DGL(PPC) - Freelink
Thecus N1200 - Ubuntu 8.10


Top
   
PostPosted: Thu Nov 08, 2007 3:35 pm 
Offline
Newbie

Joined: Wed Apr 19, 2006 6:48 am
Posts: 54
linuxnotincluded wrote:
I can't test but if you can write anywhere to the second half, then you can write everywhere in the second half, from 0xbfe00000 to 0xbfffffff.

I can confirm that writing to the second half of the flash is possible!

linuxnotincluded wrote:
If writing to the second half works, do not try to flash accross the half boundary. Flash to each half with separate commands.

I can´t confirm this!
As stated in my earlier post:
weini wrote:
cp.b 82000000 bfc40000 180000 -> ok
cp.b 82180000 bfdc0000 40000 -> ok
cp.b 821c0000 bfe00000 100 -> failed with "Copy to Flash... Flash unlock bypass write: Timeout Timeout writing to Flash"


So the write was not across the boundary.
But: When I issued the erase command, I tried to erase the whole kernel flash area which means that I hit the boundary. So probably the timeout error was caused by writing to a flash area that has not been erased properly before?

Another guess: Could it be that writing to the second half in facts writes to the first and the second half of the flash at the same time ignoring the most significant address bit?

And:
linuxnotincluded wrote:
I apologize for not replying for a time but I am quite busy these days.

I don´t think you have to apologize for doing fantastic volunteer work here!


Top
   
PostPosted: Thu Nov 08, 2007 6:10 pm 
Offline
Developer

Joined: Sat Aug 19, 2006 4:53 pm
Posts: 187
Location: United Kingdom (Great Britain)
weini wrote:
When I issued the erase command, I tried to erase the whole kernel flash area
Erase and read commands don't have this problem. Only writes are affected.
weini wrote:
Another guess: Could it be that writing to the second half in facts writes to the first and the second half of the flash at the same time ignoring the most significant address bit?
No. To speed up the writes, I am using a method called "Unlock bypass" which is specific to the ST Micro flash. The normal AMD command set requires every byte to be unlocked before being writen to. With unlock bypass, the unlock has to be given once per bank. Basically, the bug is that I only give the unlock command once per write operation and if the write is accross the bank boundary it will fail attempting to write the first byte in the second bank.


Top
   
PostPosted: Thu Nov 08, 2007 7:57 pm 
Offline
Newbie

Joined: Wed Apr 19, 2006 6:48 am
Posts: 54
linuxnotincluded wrote:
Basically, the bug is that I only give the unlock command once per write operation and if the write is accross the bank boundary it will fail attempting to write the first byte in the second bank.
If this is the only bug, why does this
weini wrote:
cp.b 82000000 bfc40000 180000 -> ok
cp.b 82180000 bfdc0000 40000 -> ok
cp.b 821c0000 bfe00000 100 -> failed with "Copy to Flash... Flash unlock bypass write: Timeout Timeout writing to Flash"
throw an error?


Top
   
PostPosted: Fri Nov 09, 2007 12:04 am 
Offline
Developer

Joined: Sat Aug 19, 2006 4:53 pm
Posts: 187
Location: United Kingdom (Great Britain)
I noticed that the part number for the flash chip in question hasn't been mentioned. It is either ST M29DW324DT or ST M29DW324DB.

The address 0xbfe00000 is the first address in the second half of the flash. I went to the whole thread and it appears that nobody could write beyond that address. I checked the datasheet and the information about the banks is quite confusing. The dual bank flash chips discussed here are very similar to the single bank M29DW320DT/DB and my bet is that ST Micro just modified the datasheet for the single bank chips adding the information about the banks. Unfortunately, they didn't do a very good job.

Given the testing done, my guess is that the ST M29DW324DT/DB needs to be treated as two different chips (one half for each chip) for all multi-byte writes and for all erase commands.


Top
   
PostPosted: Fri Nov 09, 2007 12:20 am 
Offline
Newbie

Joined: Wed Apr 19, 2006 6:48 am
Posts: 54
My flinfo output says:
weini wrote:
=> flinfo

Bank # 1: Flash chip: STMICRO M29W324DB


If the flinfo output is not reliable enough, I can disassemble the box and have a look at the board.


Top
   
PostPosted: Fri Nov 09, 2007 12:36 am 
Offline
Developer

Joined: Sat Aug 19, 2006 4:53 pm
Posts: 187
Location: United Kingdom (Great Britain)
That's one of them. It's the bottom boot block type. Forget the "D" in the middle. I see that I will have to add multiple banks to the flash routines.


Top
   
PostPosted: Tue Nov 13, 2007 1:41 am 
Offline
Total Newbie

Joined: Tue Nov 06, 2007 7:01 pm
Posts: 2
Ok, I solved my problem. Thanks for all your help guys.

Was messing around with foonas-em kernal and got it to boot (picked up dhcp address). Logged into telnet, had been messing around with my freelink a lot, had screwed up the /etc/network/interfaces file and wanted to fix it, so thought I would just mount /dev/hda1 and fix it... oh - but wait the filesystem does not mount - lightbulb turnes on (in my head, not LS) :D - realised that the kernel was unable to read my disk as it was. So I run mkfs.ext3 on /dev/hda1, unpackage the freelink rootfs (tmpimage.tgz) file to the newley mounted hda1, create the /boot folder and stick in LNIs 2.6.22.ls2 kernel and now I have a bootable freelink 3.1 with kernel 2.6.22.

I will try my kernel that I built with netconsole support - yes it was a case of setting CONFIG_NETCONSOLE=y. I will post it somewhere if it works ok.

Going to try and load pl2303 module and usbserial to try my PLCBus controller first!

u-boot kicks ass, thanks LNI for all your hard work on this, without it this would have been so much more painful, have been making good use of tftpboot :up:

Hope this resolution helps some other poor sole.


Top
   
PostPosted: Wed Dec 05, 2007 9:20 pm 
Offline
Newbie

Joined: Sat Apr 14, 2007 12:33 am
Posts: 16
Just a quick post to say I followed lupins post on my LS2 with the ST firmware chip and it worked perfectly - I would like to say thanks to him and to all who contribute to this excellent project!! :biglol:


Top
   
PostPosted: Sat Dec 22, 2007 3:36 am 
Offline
Newbie
User avatar

Joined: Sun Nov 04, 2007 2:08 am
Posts: 6
kernoman wrote:
Just a quick post to say I followed lupins post on my LS2 with the ST firmware chip and it worked perfectly - I would like to say thanks to him and to all who contribute to this excellent project!! :biglol:


Hey cool! 8-)

Glad the post was of some help!


Top
   
PostPosted: Sun Dec 30, 2007 10:15 pm 
Offline
Moderator
User avatar

Joined: Thu Jun 22, 2006 10:54 pm
Posts: 240
Location: UK
Another side effect I have found with this flash issue is not being able to update the uboot env using fw_setenv, although fw_printenv works fine. Can't wait for this one to be fixed (so I can use this in foonas-em to ensure the correct uboot settings are applied in the installers).

Further to this (just so people are aware, stating the obvious!) if someone with this issue installs 2.6 in firmware and a 2.6 based OS they have no way of updating this bit of flash without installing 2.4 based linux back to the hard disk (or using JTAG!) - it is possible to install Openlink in foonas-em for this purpose.

_________________
Help the foonas fundraiser!

Click here for more information and donations


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 187 posts ]  Go to page Previous 17 8 9 10 1113 Next

All times are UTC+01:00


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:
Powered by phpBB® Forum Software © phpBB Limited