DSM-G600, DNS-3xx and NSA-220 Hack Forum

Unfortunately no one can be told what fun_plug is - you have to see it for yourself.

You are not logged in.

Announcement

#1 2008-07-30 18:33:51

kreuters
Member
Registered: 2007-04-13
Posts: 13

booting custom kernel?

hey

has anyone managed to boot from a custom kernel? i have compiled an image using 2.6.26 sources, and have edited the Makefile to force the mach-type to be 1542, as mentioned here:

http://nas-central.org/index.php/Orion_ … tion_guide

but whenever i boot the kernel, i get no output after "done, booting the kernel"

if anyone has done this, how did you manage it?

thanks

Offline

 

#2 2008-07-30 18:54:21

fonz
Member / Developer
From: Berlin
Registered: 2007-02-06
Posts: 1716
Website

Re: booting custom kernel?

kreuters wrote:

has anyone managed to boot from a custom kernel?

Yes. Works nicely on my DNS-323 rev. A1. It seems 2.6.26 does not work on CH3SNAS, don't know about DNS-323 rev. B1.

You'll get console output on your serial link, when you add 'console=console=ttyS0,115200' to the kernel command line.

Note that the firmware relies on some specific 'features' (i.e. dirty hacks) in 2.6.12.6 that are, of course, not present in 2.6.26 - like fancontrol, disk spindown, maybe clock, maybe more.

Offline

 

#3 2008-07-31 19:35:29

kreuters
Member
Registered: 2007-04-13
Posts: 13

Re: booting custom kernel?

ok, got a kernel working now, but having a couple of problems still.

1> cannot boot using NFS. i know the guy who wrote the Install Debian wiki entry got this to work, but whether i set the IP using DHCP or statically, the network card will not work. something to do with the MAC address being 0? not sure.

2> i cannot write to the flash from u-boot. has anyone done this? doesn't seem possible to unprotect the flash, as the protect command is not present in the very limited u-boot.

i have created a jffs2 image that i am going to write to the flash, but if it does not work i have no way of rewriting the flash from what i can tell.

anyone have any ideas?

Offline

 

#4 2008-08-01 11:06:57

fonz
Member / Developer
From: Berlin
Registered: 2007-02-06
Posts: 1716
Website

Re: booting custom kernel?

kreuters wrote:

1> cannot boot using NFS. i know the guy who wrote the Install Debian wiki entry got this to work, but whether i set the IP using DHCP or statically, the network card will not work. something to do with the MAC address being 0? not sure.

Try 2.6.25.1 (yes, I mean .1, not .10 or .11) instead. Btw, what hardware do you have? dns-323 a1 or b1? ch3snas?

kreuters wrote:

2> i cannot write to the flash from u-boot. has anyone done this? doesn't seem possible to unprotect the flash, as the protect command is not present in the very limited u-boot.

You don't need uboot to flash. Just make a uImage. You can then flash kernel and ramdisk like:

Code:

cat uImage >/dev/mtdblock2
cat ramdisk >/dev/mtdblock3

(Note 100% sure about 2/3, check yourself).

Offline

 

#5 2008-08-01 11:29:19

kreuters
Member
Registered: 2007-04-13
Posts: 13

Re: booting custom kernel?

hey

i have a dns-323 a1. i have now fixed the nfs booting problem if anyone is interested, with a very horrible hack to mv643xx_eth.c file, just forced the MAC address to be something initially and everything worked fine. this is with 2.6.26 incidentally.

as for writing to the flash, the problem is if if goes wrong there is no way to recover. if u-boot had the protect and saveenv commands available there would be no problem as long as the u-boot partition is left untouched. i suppose it is always possible to load a kernel using the serial cable and nfs boot it now, so may well go this route. might take a quick look at the u-boot code and see why those commands are not usable. if anyone has any info about this, i would be most interested.

Offline

 

#6 2008-08-11 17:36:30

stevea
New member
Registered: 2008-08-04
Posts: 2

Re: booting custom kernel?

I'd like to clear up the confusing post #1 in this thread.  You should not edit the Makefile nor edit the specific number 1542.
Instead cause the symbol "CONFIG_MACH_DNS323=y" in .config by using the "make ... menuconfig" type command.

With recent kernels you should make the kernel like ...
mkdir ../kernelbin
export CROSS_COMPILE=arm-unknown-linux-gnu-
export ARCH=arm
make O=../kernelbin orion5x_defconfig
make O=../kernelbin menuconfig
## Follow the menu -- System Type// Orion Implementations; select "D-Link DNS-323"
## Change any other menu items and exit/save.
make O=../kernelbin zImage
make O=../kernelbin modules
...

Last edited by stevea (2008-08-11 17:37:03)

Offline

 

#7 2008-08-11 17:49:19

fonz
Member / Developer
From: Berlin
Registered: 2007-02-06
Posts: 1716
Website

Re: booting custom kernel?

Just curious. How are you using your kernel? What version did you compile?

Offline

 

#8 2008-08-30 11:49:57

kreuters
Member
Registered: 2007-04-13
Posts: 13

Re: booting custom kernel?

i was just trying to get a basic buildroot system working, using 2.6.25 mainline kernel. got the kernel booting, but have given up on the buildroot system, so many packages are broken it becomes very frustrating to use.

considering running netbsd instead, this guy seems to have got it working:

http://embedexpert.blogspot.com/2008/08 … s-323.html

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB