Buffalo NAS-Central Forums

Welcome to the Linkstation Wiki community
It is currently Mon Nov 20, 2017 1:23 am

All times are UTC+01:00




Post new topic  Reply to topic  [ 81 posts ]  Go to page 1 2 3 4 5 6 Next
Author Message
PostPosted: Thu Aug 30, 2007 6:57 pm 
Offline
Site Admin
User avatar

Joined: Mon Jul 11, 2005 7:19 am
Posts: 7703
Location: Austria, Vienna
there now is a modified loader.o for the LS2 which is able to boot Linuxnotincludeds 2.6.22 kernel:
http://www5.atwiki.jp/kuro-bsd/pages/132.html

direkt link to source:
http://kurobsd.ki.nu/download/junk/linu ... 26.tar.bz2

from file CAUTION-BETA-TESTING.txt:
Code:
Kernel loader module for LinkStation/MIPSel.

Usage:
   insmod loader.o kernel=zImage.bin load_addr=0x80800000 start_addr=0x80800000
        or just type
   insmod loader.o

If "kernel" was abbrebiated, "zImage.bin" is used.
If "load_addr" was abbreviated, "0x80800000" is used.
If "start_addr" was abbreviated, a value of "load_addr" is used.

No initrd support (yet).

-------------------------------------------------------------------------------
** TIPS: Boot from uncompressed kernel **

To boot vmlinux, you should find "load_addr" and "start_addr" by hand.
"load_addr" may get: "nm vmlinux | grep _ftext".
"start_addr" may get: "nm vmlinux | grep kernel_entry".
For example, "load_addr" is 0x80100000 and "start_addr" is 0x80286040, then

  objcopy -O binary vmlinux vmlinux.bin
  insmod loader.o kernel=vmlinux.bin load_addr=0x80800000 start_addr=0x80286040

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

The Linux kernel, zImage.bin, may create by
   "objcopy -O binary zImage zImage.bin".
(The Linux zImage kernel's load/start address is 0x80800000.)

Bugs:
- No kernel arguments support. (But Buffalo kernel is NOT support them at all!)
- No initrd support.

Please send me bug report/patches. Thank you.

Eiji Kawauchi

-----
Changes:
(2007-08-26)
- Support LinuxNotIncluded's Linux 2.6.22 kernel. It need to disable IT821x's raid mode to boot.
- Move PCI reset code from asm to C.
- My E-Mail address has changed.

(2006-05-20)
- Support vmlinux's boot (load_addr != start_addr)
- Fix registers overriden. (t6, t7) (But it was harmless...)
(2006-06-10)
- Disable PCI-controller on CPU (79RC32434 depend).
- Add a wait(1sec) before copy of the kernel.
- Some typo fixed.

_________________
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: Fri Aug 31, 2007 5:21 am 
Offline
Site Admin
User avatar

Joined: Sun Jul 17, 2005 4:34 pm
Posts: 5332
It's also included in my bootloader, just haven't updated the docs yet.


Top
   
PostPosted: Fri Aug 31, 2007 1:10 pm 
Offline
Site Admin
User avatar

Joined: Mon Jul 11, 2005 7:19 am
Posts: 7703
Location: Austria, Vienna
added usage from included file in first post.

_________________
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: Fri Aug 31, 2007 5:04 pm 
Offline
Site Admin
User avatar

Joined: Sun Jul 17, 2005 4:34 pm
Posts: 5332
It will come preconfigured, yet not activated, in /etc/default/boot_new.sh_local_sample


Top
   
PostPosted: Wed Oct 10, 2007 9:46 am 
Offline
Newbie
User avatar

Joined: Wed May 24, 2006 1:21 pm
Posts: 74
Location: Herzogenaurach / Germany
What is this "loader.o thing"?

Can somebody explain to me?

Will I be able to use a 2.6 kernel on my LS2 with it? With all features? For example udev?

Greetings!
berndstein


Top
   
PostPosted: Wed Oct 10, 2007 9:51 am 
Offline
Site Admin
User avatar

Joined: Sun Jul 17, 2005 4:34 pm
Posts: 5332
loader.o is a kernel loader and works on mounted file systems. See my bootloader docs on my approach to it; also /etc/default/boot_new*


Top
   
PostPosted: Wed Oct 10, 2007 10:20 am 
Offline
Newbie
User avatar

Joined: Wed May 24, 2006 1:21 pm
Posts: 74
Location: Herzogenaurach / Germany
Ok, I read the doku now: http://hvkls.dyndns.org/downloads/docum ... oader.html
Is this the doku, you told me to read?

Now I have another question: Would it be possible, to mount an usb stick BEFORE loading this loader.o? And then boot the 2.6 kernel and the whole debian from this usb stick?

Greetings,
berndstein


Top
   
PostPosted: Wed Oct 10, 2007 10:29 am 
Offline
Site Admin
User avatar

Joined: Sun Jul 17, 2005 4:34 pm
Posts: 5332
Should be possible. But you need to check if any LS2 kernel 2.6 without uboot support exists... All in all, this is an advanced project, be prepared.


Top
   
PostPosted: Wed Oct 10, 2007 10:40 am 
Offline
Newbie
User avatar

Joined: Wed May 24, 2006 1:21 pm
Posts: 74
Location: Herzogenaurach / Germany
Quote:
But you need to check if any LS2 kernel 2.6 without uboot support exists


?
What do you mean?

I'm a littlebit confused, because mindbender wrote:
Quote:
there now is a modified loader.o for the LS2 which is able to boot Linuxnotincludeds 2.6.22 kernel


Where is the problem?

berndstein


Top
   
PostPosted: Wed Oct 10, 2007 11:39 am 
Offline
Site Admin
User avatar

Joined: Sun Jul 17, 2005 4:34 pm
Posts: 5332
I just want to point out this is the bleeding edge. In other words, if there are problems, you will find out.


Top
   
PostPosted: Wed Oct 17, 2007 2:08 am 
Offline
Developer

Joined: Sat Aug 19, 2006 4:53 pm
Posts: 187
Location: United Kingdom (Great Britain)
U-Boot for the LS2 can load kernel images in ELF format ("normal" kernel images). The images can be either uncompressed or compressed with gzip. Compression using bzip2 is not supported. The 2.6.22 binary uploaded earlier is in gzip-ed ELF format.

Even if kernels in U-Boot formats are still supported, the exclusive use of these formats is not longer necessary. My advice is to use ELF kernels.

MIPS kernels can be compiled with an initrd image embedded. As the resulting kernel image is an ELF binary, U-Boot can load it.

With respect to Eiji's latest loader.o, I have not tested it but I don't see why it shouldn't work. Even if it doesn't work, all you have to do is reboot.

Please note that the stock modutils will not work with Linux 2.6. You can find new modutils in the download section. They work with both Linux 2.4 and Linux 2.6.

Finally, bear in mind that upgrading only the kernel will break things. If you are not familiar with fixing a Linux installation you should try FreeLink or wait until foonas is ready for "production".


Top
   
PostPosted: Wed Oct 17, 2007 9:20 am 
Offline
Betatester
User avatar

Joined: Thu Jul 14, 2005 4:38 pm
Posts: 941
Location: England
Has anyone used this? I can't get it to work. I had the older u-boot but have since reflashed the stock (because of the updated one and wanted to test this)

What I tried (probably wrong):

gunzip vmlinux-2.6.22.ls2.gz
mv vmlinux-2.6.22.ls2 vmlinux

root@LinkStation2:/boot# nm vmlinux | grep _ftext << get nothing

root@LinkStation2:/boot# nm vmlinux | grep kernel_entry
80426000 T kernel_entry

root@LinkStation2:/boot# insmod loader.o kernel=vmlinux load_addr=0x80800000 start_addr=0x80286000

loader.o: init_module: Cannot allocate memory
Hint: insmod errors can be caused by incorrect module parameters, including invalid IO or IRQ parameters.
You may find more information in syslog or the output from dmesg


root@LinkStation2:/boot# dmesg
.............
.............
.............
eth0: MII transceiver 12 status 0x786D advertising 0x01E1.
eth0: Setting 100mbps full-duplex based on auto-negotiated partner ability 0x45E1.
loader module loaded
kernel=vmlinux
load address=0x80800000
start address=0x80286000

-EDIT-

Didn't have LNI's module-init-tools

root@LinkStation2:/boot# insmod loader.o kernel=vmlinux load_addr=0x80800000 start_addr=0x80286000
Kernel requires old insmod, but couldn't run insmod.old: No such file or directory


Top
   
PostPosted: Wed Oct 24, 2007 3:41 pm 
Offline
Newbie
User avatar

Joined: Sun May 21, 2006 11:04 am
Posts: 29
Location: Japan
Bauldrick wrote:
Has anyone used this?

Yes. ;)

Bauldrick wrote:
gunzip vmlinux-2.6.22.ls2.gz
mv vmlinux-2.6.22.ls2 vmlinux

root@LinkStation2:/boot# nm vmlinux | grep _ftext << get nothing

root@LinkStation2:/boot# nm vmlinux | grep kernel_entry
80426000 T kernel_entry


Then you need to convert vmlinux (elf image) to vmlinux.bin to load correctly.

# objcopy -o binary vmlinux vmlinux.bin
# insmod loader.o kernel=vmlinux.bin load_addr=0x80800000 start_addr=0x80286000

_________________
NetBSD/LinkStation works well :-)


Top
   
PostPosted: Wed Oct 24, 2007 4:12 pm 
Offline
Site Admin
User avatar

Joined: Sun Jul 17, 2005 4:34 pm
Posts: 5332
FYI, my "bootloader" comes with Eiji's insmod setup preconfigured in /etc/default/boot_new.sh_local.


Top
   
PostPosted: Thu Oct 25, 2007 3:25 am 
Offline
Newbie

Joined: Wed Aug 30, 2006 11:43 pm
Posts: 38
I read different thread in this forum tried to put that together and I think I finally did.
What I understood, to make my freelink linkstation work with the 2.6 kernel I have to:

get the binary 2.6 kernel here:
http://buffalo.nas-central.org/download/LS ... .22.ls2.gz
and the binary modules:
http://buffalo.nas-central.org/download/LS ... ls2.tar.gz
untar the kernel anywhere

then
Code:
root@linkserver:/anywhere# objcopy -O binary vmlinux-2.6.22.ls2 /boot/vmlinux-2.6.22-ls2


get the loader from André's website:
http://hvkls.dyndns.org/downloads/bootl ... v86.tar.gz
untar it on the root of linkstation:
Code:
cd /
root@linkserver:/# tar xf /anywhere/bootloader_linkstation-uni-v86.tar.gz


untar kernel modules on the root of the linkstation:
Code:
root@linkserver:/# tar xf /anywhere/kernel-modules-2.6.22.ls2.tar.gz


to allow the right kernel to boot:
Code:
root@linkserver:/# cp /etc/default/boot_new.sh_local_sample /etc/default/boot_new.sh_local
root@linkserver:/# pico /etc/default/boot_new.sh_local


Ok assuming everything is correct and that I didn't forget something (it's late when I write this), I just need to know what modifications I have to do in that file. I guess I have to uncomment the MIPS24_HACK="1", but I'm not even sure of that.
André could you help me with that please?


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 81 posts ]  Go to page 1 2 3 4 5 6 Next

All times are UTC+01:00


Who is online

Users browsing this forum: No registered users and 8 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