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 2013-10-23 19:22:55

ben.shellrude
New member
Registered: 2013-10-23
Posts: 3

Build Custom Kernel - How to install

Hello all.

I first have to apologize if this has been answered elsewhere... I've searched and searched and have pieced together bits and pieces but have some specific questions regarding building and installing a customer kernel for a debian wheezy install (DNS-323 rev B1)

I've managed to get the system installed, and the main use will be to use as a Plex Media server to stream to an ATV3.  I've got all this working (believe it or not the Synology package downloadable from the plex site works, just unpack and run the start.sh script  - with a couple of mods to LANG="C" parts of the script... then run the PlexConnect package) but wanted to try and increase performance just a little. While trying to find some tweaks to increase swap performance, I stumbled onto a kernel feature called ZRAM... which looks promising in terms of virtually increasing the amount of RAM (via compressed swap in RAM)...

So, I cross compiled for ARM on a different system... No issues there.  I'm in the process of doing a "make uImage"...

The question is, what are the next steps.  I know I need to do a mkinitramfs (are there specifics somewhere in terms of how to ensure that boot-time modules are included in the image: md, lvm, sata, etc...). Also, once uImage is complete, and the initrd are complete, how do I install the kernel?  Are there any further steps required other than just a dd if=uImage of=/dev/mtdblock2, and dd if=initramfs of=/dev/mtdblock3?

During the build, does the kernel need any special patches to make it work with the Marvel uboot loader?

Is there a write up somewhere I can reference in terms of a how-to for custom kernel build and install?

Thanks in advance.

Ben

Last edited by ben.shellrude (2013-10-23 19:25:30)

Offline

 

#2 2013-10-23 19:52:19

ben.shellrude
New member
Registered: 2013-10-23
Posts: 3

Re: Build Custom Kernel - How to install

Think I may have answered my own question here looking at a post for a pogoplug.

Steps would be

make menuconfig
make uImage
make modules
make modules_install

mkinitramfs -o linux-3.11.6 3.11.6

mkimage -A arm -O linux -T ramdisk -C gzip -a 0x0000000 -e 0x0000000 -n "3.11.6-1" -d linux-3.11.6 uInitrd

Then:
dd if=uImage of=/dev/mtdbock2
dd if=uInitrd of=/dev/mtdblock3

Does that sound right?  I read somewhere about changing magic blocks with devio? Is that necessary or can I just install the two and cross my fingers?

Offline

 

#3 2013-10-23 23:25:04

bjby
Member
Registered: 2009-02-22
Posts: 265

Re: Build Custom Kernel - How to install

Good luck with your project. In your shoes I would contact Martin Michlmayr and see if he takes the time to point you in the right direction.

Also I would try to figure out the debian kernel packages for dns323.

Offline

 

#4 2013-10-24 22:59:51

ben.shellrude
New member
Registered: 2013-10-23
Posts: 3

Re: Build Custom Kernel - How to install

OK I've got the kernel tested and running via 'kexec'...

But now if someone - anyone - could answer for me, how to permanently install the kernel, it would be GREATLY appreciated.

Do I have to use devio to change the magic number?
Do I have to use mkimage on uImage? I'm assuming no and that make uImage has already done that for me...
Do I still have run mkimage on the initrd?
Those questions aside, is the install as simple as "cat uImage > /dev/mtdblock2" or is it "dd if=uImage of=/dev/mtdblock2"?

Really hoping someone can help me with an answer...

Thanks again!!

Ben

Offline

 

#5 2013-10-25 07:19:17

bjby
Member
Registered: 2009-02-22
Posts: 265

Re: Build Custom Kernel - How to install

http://dns323.kood.org/information:firmware_info

...
Kernel image
This contains the kernel image that is loaded by the bootloader. It is a standard Linux kernel binary, compiled for ARM. The easiest way to flash the kernel is to do a direct copy from a file:
dd if=/mnt/HD_a2/kernel.bin of=/dev/mtdblock2
reboot
...

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB