General NAS-Central Forums

Welcome to the NAS community
It is currently Tue Nov 21, 2017 12:07 pm

All times are UTC




Post new topic Reply to topic  [ 13 posts ] 
Author Message
PostPosted: Wed Jul 04, 2012 4:08 pm 
Offline

Joined: Wed Jun 20, 2012 6:04 pm
Posts: 6
i have a old etrayz without a NAS function (use synology) .
For now i have the idea to use is for a logging system (PV-panels)
At the originel kernel there are not a lot modules installed for some hardware. So i thought to place a native debian on it.
I've already found a way to read the startup with serial Console :

http://www.helmut.be/documents/startupnodisk.txt
this is startuplog without any disk



http://www.helmut.be/documents/startupwithdisk.txt
this is startuplog with OS Disk installed



Can someone help me on the right way ???

thanks alot

Helmut


Top
 Profile  
 
PostPosted: Wed Jul 04, 2012 6:57 pm 
Offline

Joined: Mon Jun 16, 2008 10:45 am
Posts: 6073
Actually this looks fairly easy. A different kernel is loaded when the box boots from harddisk:
Code:
   Image Name:   Linux-2.6.24.4
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2019368 Bytes =  1.9 MB
   Load Address: 48008000
   Entry Point:  48008000

Code:
   Image Name:   Linux-2.6.24.4
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    1614872 Bytes =  1.5 MB
   Load Address: 48008000
   Entry Point:  48008000

This obviously means a kernel is loaded from harddisk, so this can easily be replaced by a custom one. You only have to find out where it is.

Further a different commandline is applied. When booting from flash it should find it's rootfs from /dev/ram0, when booting from disk the kernel should find it's rootfs in /dev/md0. Booting from /dev/md0 is a bit unconvenient, but maybe this can be changed. Have a look if you can enter the bootloader:
Code:
Hit any key to stop autoboot:  0
If you can enter the bootloader, it could be possible to change the commandline. If not, it is possible to patch the kernel to ignore the commandline, and use a custom one.

Basically you can build your own kernel from the GPL sources (Which you have, haven't you?), create an uImage from it, and overwrite the current one on disk. Further put an ext3 filesystem on the first partition, and put a Debian (Lenny) rootfs on it. Then change the kernel commandline for booting from disk to something like:
Code:
console=ttyS0,115200 root=/dev/sda1 rw  mac_adr=0x00,0x1c,0x85,0x20,0x21,0x2a mem=128M poweroutage=yes
And it should boot in Debian.


Top
 Profile  
 
PostPosted: Thu Jul 05, 2012 5:15 pm 
Offline

Joined: Wed Jun 20, 2012 6:04 pm
Posts: 6
ok ,


So i need the GPL source code from my Etrayz ???? ( http://forum.xtreamer.net/mediawiki-1.15.1/index.php/ETRAYz_Kernel_Sources_and_cross_compiler)

somewhere a good step by step guide ???

i suppose that this is also cross compiling ????


tnx in advance


Top
 Profile  
 
PostPosted: Fri Jul 06, 2012 8:00 am 
Offline

Joined: Mon Jun 16, 2008 10:45 am
Posts: 6073
The wiki you linked to already gives a recipe for compiling that kernel:
wiki wrote:
Uncompress "/eTRAYz_Keren.tbz2" into some temp folder. Execure "build-target-kernel.sh" to compile this kernel and modules. When completed, kernel.tbz2 will be generated.

Unfortunately this does more than necessary.

Get yourself a Linux computer, on an Intel (-compatible) platform. Linux in a virtual machine is fine. A GUI is not needed, but it won't hurt. Open a commandprompt, and type
Code:
# Create and enter folder to contain it all:
mkdir e-trayz
cd e-trayz
# Download and extract GPL sources:
wget http://gator884.hostgator.com/~xtreamer/eTRAYz-Kernl/eTRAYz_Kernel.tbz2
tar xf eTRAYz_Kernel.tbz2
# Some one-time initialization (due to this specific GPL package)
cp kernel-config-target kernel/.config
mkdir -p  kernel/include/config
echo 2.6.24.4 > kernel/include/config/kernel.release

# Installing some needed stuff. (Assuming you use Ubuntu)
sudo apt-get update
sudo apt-get install gcc ncurses

# Some administration for the crosscompiler (has to be done each time in this directory)
export BUILD_DIR=` pwd `
# Build the kernel. Take some coffee, this can take several hours, depending on your computer and the kernel config
make -C kernel uImage
Now you can find the new kernel (uImage) in kernel/arch/arm/boot
You'll also need kernel modules, which can be made:
Code:
# Make sure we're in the right directory:
cd ~/e-trayz
# Some administration
export BUILD_DIR=` pwd `

make -C kernel modules
make -C kernel INSTALL_MOD_PATH=".."  modules_install
Now you have your modules in lib/modules/2.6.24.4
These directory has to be copied to /lib/modules/2.6.24.4 in your Debian rootfs. I *think* you also need to copy the firmware directory to /lib/firmware in de Debian rootfs, as this contains firmware which might have to be uploaded to the NIC, during userland boot.

So far you have build kernel+modules, but I suppose these are identical to those you already have. Not very exciting. So you want to change the kernel config:
Code:
# Make sure we're in the right directory:
cd ~/e-trayz
# Some administration
export BUILD_DIR=` pwd `

make -C kernel menuconfig
Go nuts. It's a good idea to put something in "General setup->Local version", this will result in the modules installed in lib/modules/2.6.24.4-something. This way you can boot a different kernel (-build) by just offering a different uImage to the bootloader. It will find it's own modules.
After you've left menuconfig you can build the kernel and modules:
Code:
make -C kernel uImage
make -C kernel modules
make -C kernel INSTALL_MOD_PATH=".."  modules_install


Top
 Profile  
 
PostPosted: Fri Jul 06, 2012 2:49 pm 
Offline

Joined: Wed Jun 20, 2012 6:04 pm
Posts: 6
Thnx ,

So here i go ;-o

first error

Code:
root@bt:/e-trayz# make -C kernel uImage
pwd: invalid option -- 'p'
Try `pwd --help' for more information.
make: Entering directory `/e-trayz/kernel'
  CHK     include/linux/version.h
make[1]: `include/asm-arm/mach-types.h' is up to date.
  CHK     include/linux/utsrelease.h
  CC      arch/arm/kernel/asm-offsets.s
/e-trayz/kernel
fixdep: arch/arm/kernel/.asm-offsets.s.d: No such file or directory
make[1]: *** [arch/arm/kernel/asm-offsets.s] Error 2
make: *** [prepare0] Error 2
make: Leaving directory `/e-trayz/kernel'
root@bt:/e-trayz#





also is there a guide to make a rootfs ??? i can install debian , but don't understand how to get debian on the NAS.

tnx in advance


Top
 Profile  
 
PostPosted: Fri Jul 06, 2012 3:19 pm 
Offline

Joined: Mon Jun 16, 2008 10:45 am
Posts: 6073
helmuteke wrote:
Code:
root@bt:/e-trayz# make -C kernel uImage
pwd: invalid option -- 'p'

I think you used the wrong quotes in
Code:
export BUILD_DIR=` pwd `
'pwd' is a command which prints the current directory. The `` quotes around it (on my keyboard top left, above the TAB) turn it into a string, which can be assigned to a variabele.

Have a look
Code:
echo $BUILD_DIR
should print "/home/helmuteke/e-trayz" or something like that. I think it prints "pwd" now.

Quote:
also is there a guide to make a rootfs ???
Painless Debian; building the rootfs. For the time being you can just use the rootfs offered on that wiki page.


Top
 Profile  
 
PostPosted: Fri Jul 06, 2012 3:56 pm 
Offline

Joined: Wed Jun 20, 2012 6:04 pm
Posts: 6
tnx for that it's ` instead '

but after fixing one error i get another

Code:
root@bt:/e-trayz# make -C kernel uImage
make: Entering directory `/e-trayz/kernel'
  CHK     include/linux/version.h
make[1]: `include/asm-arm/mach-types.h' is up to date.
  CHK     include/linux/utsrelease.h
  CALL    scripts/checksyscalls.sh
<stdin>:1097:2: warning: #warning syscall fadvise64 not implemented
<stdin>:1265:2: warning: #warning syscall migrate_pages not implemented
<stdin>:1321:2: warning: #warning syscall pselect6 not implemented
<stdin>:1325:2: warning: #warning syscall ppoll not implemented
<stdin>:1365:2: warning: #warning syscall epoll_pwait not implemented
  CC      scripts/mod/empty.o
/e-trayz/cross-tools/bin/../lib/gcc/arm-linux-uclibcgnueabi/4.2.4/../../../../arm-linux-uclibcgnueabi/bin/as: error while loading shared libraries: libopcodes-2.19.1.20090309.so: cannot open shared object file: No such file or directory
make[2]: *** [scripts/mod/empty.o] Error 1
make[1]: *** [scripts/mod] Error 2
make: *** [scripts] Error 2
make: Leaving directory `/e-trayz/kernel'
root@bt:/e-trayz#


think it's time to give it up :-(


Top
 Profile  
 
PostPosted: Fri Jul 06, 2012 5:11 pm 
Offline

Joined: Mon Jun 16, 2008 10:45 am
Posts: 6073
You are giving up quickly!

Google on libopcodes-2.19.1.20090309.so, 2nd hit (out of 2): http://blog.chinaunix.net/uid-20121320-id-161793.html


Top
 Profile  
 
PostPosted: Fri Jul 06, 2012 5:37 pm 
Offline

Joined: Wed Jun 20, 2012 6:04 pm
Posts: 6
hehe ,

alright it's true that i give it up quickly.

the link made it , he's begon with compiling

up to the next


Top
 Profile  
 
PostPosted: Wed Dec 26, 2012 10:30 pm 
Offline

Joined: Wed Dec 26, 2012 10:16 pm
Posts: 8
I have an old etrayz too. Can you share your precompiled kernel, modules and rootfs and a little help on the right way Helmut?

Thanks in advance


Top
 Profile  
 
PostPosted: Sat Jan 12, 2013 6:29 pm 
Offline

Joined: Sat Jan 12, 2013 6:23 pm
Posts: 20
Rufuss wrote:
I have an old etrayz too. Can you share your precompiled kernel, modules and rootfs and a little help on the right way Helmut?

Thanks in advance


Here another one with an old etrayz...

I would like to run openmediavault on the etrayz (http://stefanseidel.info/component/content/article/9.html) so I first have to install debian.

Please share your precompiled kernel, modules and rootfs or post a tutorial...

Thanks in advance muchas gracias... 8-)

edit:
I have a serial console running on etrayz and would like to update uBoot to have usb support...

edit2:
Yes.. now native debian lenny, kernel 2.6.24.4, some squeeze packages and Openmediavault running on eTrayz... :)


Top
 Profile  
 
PostPosted: Thu Mar 07, 2013 9:45 am 
Offline

Joined: Wed Dec 26, 2012 10:16 pm
Posts: 8
At least debian on etrayz, great job !!!

Can you share an usb image?

Thanks a lot


Top
 Profile  
 
PostPosted: Fri Mar 08, 2013 11:06 pm 
Offline

Joined: Wed Dec 26, 2012 10:16 pm
Posts: 8
How did you ported reloaded.ko from dns323 ?

Are you gonna post a tutorial or share an usb bootable image?


Thanks in advance


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 13 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


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