EDmini v2 mainline kernel support

Ethernet disk mini v2
rosbif
Posts: 112
Joined: Thu May 08, 2008 11:23 am
Location: near Toulouse, France

Re: EDmini v2 mainstream kernel support

Post by rosbif » Thu Jan 01, 2009 8:36 am

Happy New Year everybody.
giarrettu wrote:I have created uImge with the command

root@lacie:/temp/linux-2.6.28-rc9/arch/arm/boot# mkimage -A arm -O linux -T ker
nel -C none -a 0 -e 0 -n "uImage" -d Image uImage
I have never used mkimage directly.
Personally I always use this command:-

Code: Select all

make uImage
I suggest you try this.
giarrettu wrote:then I put the uImage on my edmini but it doesn't work.
Do you have a serial console?
If not you should ;-)

Without a serial console debugging is difficult.
Mount the disk in another system and see if it has written a boot log in /var/log/messages.
Alternatively you could do this after rebooting with the stock LaCie kernel.
By using the snaps mechanism, it should even be possible to reboot the stock kernel without swapping the disk.
Put the new kernel in /snaps/00/boot/uImage on partition 9 and leave the stock LaCie kernel on partition 6.
By default U-Boot will boot the new one.
However I believe you can make it boot the stock one if, at startup, you keep the power button pressed for a long time (about 15s IIRC).
Warning: I have never actually had the need to try this ;-)

Otherwise I can only guess what is likely to be going wrong.
Did you rememember to apply a machine type workaround (see above in topic)?
Are you using the stock LaCie rootfs?
If so ethernet is unlikely to initialize properly as it is egiga0 with the stock firmware but eth0 in mainline.

kosmaty
Posts: 32
Joined: Sat May 17, 2008 2:57 pm

Re: EDmini v2 mainstream kernel support

Post by kosmaty » Thu Jan 01, 2009 8:23 pm

Hello in New Year with Lacie :> .

Serial console is really good thing and because of that I have constructed one(following rosbif and aribaud instructions), I would say it isn't so difficult :) .
giarrettu wrote:then I put the uImage on my edmini but it doesn't work.
What do you mean? You are not able to connect via ssh? AFAIR I had to change network configuration, but I don't remember which one. I thing that was something with network properties for network card: change properties for eth0 insted of original Lacie's egiga0.

I found it by checking log files, just like rosbif wrote.

giarrettu
Posts: 16
Joined: Tue Jun 17, 2008 8:34 am

Re: EDmini v2 mainstream kernel support

Post by giarrettu » Sat Jan 03, 2009 10:34 am

thank you again very much for your help,

I have both fixed (arch/arm/tools/mach-types from 1756 to 526) and compiled the 2.6.28-rc9 kernel with "make uImage" command.
I have put the uImage on ./snaps/00/boot/ directory. I also have modifited the stock LaCie rootfs network configuration from egiga0 to eth0. Base on the log/messages file I only have modified these files

/usr/bin/edmini.sh
/etc/sysconfig/udhcpc.script
/etc/sysconfig/network-devices/services

but the edmini doesn't start up

do you remember what files that concern the network configuration have to be modified?

giarrettu

kosmaty
Posts: 32
Joined: Sat May 17, 2008 2:57 pm

Re: EDmini v2 mainstream kernel support

Post by kosmaty » Sat Jan 03, 2009 12:58 pm

giarrettu wrote:but the edmini doesn't start up
You mean there are no new entries in log files?

Mayby try this way:

Backup all partitions
Remove sda7,sda8,sda9
Create new sda7 using whole free space from deleted partitions
On sda7 put Debian from this package: http://www1.wpkg.org/fsg-3-debian/fsg-3 ... ck.tar.bz2 . You have to use root accout for untaring, because there are some block/char files.
In one of the startup scripts put command like dmesg, lspci etc. and write the output somewhere on Lacie. Then try to diagnose what is wrong. In this way, I found out about egiga0 -> eth0.

giarrettu
Posts: 16
Joined: Tue Jun 17, 2008 8:34 am

Re: EDmini v2 mainstream kernel support

Post by giarrettu » Thu Jan 08, 2009 2:32 pm

thank you very much,

based on your infos I have successfully installed debian lenny on my lacie edmini with last kernel! :-)

root@lacie500:/# uname -a
Linux lacie500 2.6.28-rc9 #1 PREEMPT Tue Jan 6 21:54:39 CET 2009 armv5tel GNU/Linux

I have used this partition table

fdisk -l
Device Boot Start End Blocks Id System
/dev/sda1 1 2431 19526976 5 Extended
/dev/sda2 2432 38913 293041665 83 Linux
/dev/sda5 1 16 128457 82 Linux swap / Solaris
/dev/sda6 17 17 8001 83 Linux
/dev/sda7 18 2431 19390423+ 83 Linux

now I have to work on the led button!
thank you again

giarrettu

giarrettu
Posts: 16
Joined: Tue Jun 17, 2008 8:34 am

Re: EDmini v2 mainstream kernel support

Post by giarrettu » Sat Jan 10, 2009 7:37 am

ciao,

usefully informations on bootstrapping debian are in this link

http://www.simtec.co.uk/products/SWDEBI ... ticle.html

giarrettu

langerak
Posts: 160
Joined: Sat May 29, 2010 6:37 pm

Re: EDmini v2 mainline kernel support

Post by langerak » Mon May 31, 2010 1:57 pm

Again a bump from me on this matter.

I have the V2, but mine is not configured with XFS partitions, my scheme is this:
sda1 -> 3 Gb EXT3 with all configfiles home dirs
sda2 -> 512 Mb swap
sda3 -> (all disk space) EXT3 home dir, usable space
sda4 -> extended
sda5 -> 8 Mb unformatted
sda6 -> 16 Mb unformatted
sda7 -> 48 Mb EXT3 i think this is the boot partition (as soon as i delete this partition it won't boot anymore :D)

So is there a way without a JTAG cable to run Debian on my version? I assume i have to put the kernel etc on SDA7?

I really hope you are still active here as i really need some help on this one! :)

rosbif
Posts: 112
Joined: Thu May 08, 2008 11:23 am
Location: near Toulouse, France

Re: EDmini v2 mainline kernel support

Post by rosbif » Mon May 31, 2010 7:32 pm

langerak wrote:So is there a way without a JTAG cable to run Debian on my version? I assume i have to put the kernel etc on SDA7?
You won't need a JTAG cable. However a *serial* cable will be a great help (it will only cost a few dollars).
You could make do without one but you will be running blind.
Without one, unless you are an expert, a genius and get everything right the first time, you will be in for a lot of disk swapping and guessing :(

You may be able to get some serial console functionality via a netconsole (Ethernet).
I have never used one but try googling for CLUNC. EDIT: or better go directly here: http://www.lacie-nas.org/dokuwiki/doku.php?id=clunc
Last edited by rosbif on Wed Jun 02, 2010 3:58 am, edited 1 time in total.

langerak
Posts: 160
Joined: Sat May 29, 2010 6:37 pm

Re: EDmini v2 mainline kernel support

Post by langerak » Mon May 31, 2010 8:18 pm

Thanks alot for the tip! CLUNC seems to work pretty good! I rebooted the LaCie and set up the CLUNC program on my Linux box and it connects perfectly, get "Marvell >>" command prompt :D!

So i assume i can use this topic to continue installing Debian on it now? :D

rosbif
Posts: 112
Joined: Thu May 08, 2008 11:23 am
Location: near Toulouse, France

Re: EDmini v2 mainline kernel support

Post by rosbif » Mon May 31, 2010 8:34 pm

langerak wrote:Thanks alot for the tip! CLUNC seems to work pretty good! I rebooted the LaCie and set up the CLUNC program on my Linux box and it connects perfectly, get "Marvell >>" command prompt :D!
The downside is that I don't think you will get Linux boot messages via CLUNC (and no login prompt either). But I could be wrong.
EDIT: it appears that I *was* wrong; you can get boot messages if you configure netconsole in your kernel and modify the Linux boot parameters.
From the CLUNC README:
CLUNC README wrote:Linux can log its messages via netconsole if compiled with option CONFIG_NETCONSOLE.
This feature must be configured at boot time:
set bootargs netconsole=6666@${ipaddr}/,6666@${serverip}/
You probably won't get a login prompt though (but again there may be a way to get one).
IIRC CLUNC was reported to be slow as it uses one ethernet packet per character :(
langerak wrote:So i assume i can use this topic to continue installing Debian on it now? :D
I generally leave the stock LaCie software in place and install Debian on another partition.
CLUNC gives you to access to the U-Boot command line so you can boot from wherever you want (even via a network).
However, unless you have a modified U-Boot, you will have to use CLUNC to do this each time you reboot Debian :(
Last edited by rosbif on Wed Jun 02, 2010 3:36 am, edited 1 time in total.

langerak
Posts: 160
Joined: Sat May 29, 2010 6:37 pm

Re: EDmini v2 mainline kernel support

Post by langerak » Tue Jun 01, 2010 5:50 am

I can play with the box since i have a 1:1 copy of the disk and it's software on a spare disk, which also boots, so in emergency cases i can always use that disk :).

What would you suggest me to do? Flash U-Boot to newer version (will CLUNC still work?) or leave it the way it is and try to install Debian onto it?

flavoie
Posts: 14
Joined: Wed Apr 16, 2008 4:23 am

Re: EDmini v2 mainline kernel support

Post by flavoie » Wed Jun 02, 2010 1:54 am

langerak wrote:I can play with the box since i have a 1:1 copy of the disk and it's software on a spare disk, which also boots, so in emergency cases i can always use that disk :).

What would you suggest me to do? Flash U-Boot to newer version (will CLUNC still work?) or leave it the way it is and try to install Debian onto it?
I just tried clunc (had to download from ftp.lacie-nas-org then compile then use it), I have the updated uboot myself so I confirm that clnc works fine with the new uboot, but IMHO I think it's not enough for you.

If you wish to upgrade to debian, I suggest adding a serial port, then upgrade uboot (if needed), then go to debian.

Whether you need the new uboot depends if you have the Macronix MX29LV400CBCT FLASH part.
Because I had opened up my case, I could visually confirm it.
Because I installed the serial port, I could also confirm it with these uboot startup messages:
Flash: flashStructGet manu 0xff id 0xff
[0kB@fff80000] ## Unknown FLASH at fff80000: Size = 0x00000000 = 0 MB
Flash: 0 kB

clunc does not show those startup messages which are sent before the prompt comes up. clunc also does not show the kernel messages after uboot launches the kernel. You're in the dark at that time if you don't have a serial connection.
Here's a sample of my clunc output ("Linkstation" is just the linux machine I was executing clunc from)" :
LinkStation:/media/clunc-1.1# ./clunc -i 192.168.0.104

Marvell>>

Marvell>> bdinfo
bdinfo
arch_number = 0x000006DC
env_t = 0x00000000
boot_params = 0x00000100
DRAM bank = 0x00000000
-> start = 0x00000000
-> size = 0x04000000
DRAM bank = 0x00000001
-> start = 0xFFFFFFFF
-> size = 0x00000000
DRAM bank = 0x00000002
-> start = 0xFFFFFFFF
-> size = 0x00000000
DRAM bank = 0x00000003
-> start = 0xFFFFFFFF
-> size = 0x00000000
ethaddr = 00:D0:4B:85:98:46
ip_addr = 192.168.0.104
baudrate = 115200 bps
Marvell>> printenv
printenv
bootargs=console=ttyS0,115200 root=/dev/sda7 ro
bootcmd=if lump 2; then ; else run disk_disk; fi
baudrate=115200
loads_echo=0
kernel_addr=0x400000
boot_disk=disk ${kernel_addr} 1:6
snap_disk=if snapboot 1:9 ${kernel_addr}; then; else run boot_disk; fi
disk_disk=ide reset; run snap_disk; bootm ${kernel_addr};
cpuName=926
CASset=min
MALLOC_len=4
ethprime=egiga0
usb0Mode=host
usb1Mode=device
ethact=egiga0
mach_type=526
ethaddr=00:d0:4b:85:98:46
stderr=serial
enaMonExt=no
enaFlashBuf=yes
enaCpuStream=no
bootdelay=3
disaMvPnp=no
overEthAddr=no
ipaddr=192.168.0.104
ncip=192.168.0.101
serverip=192.168.0.101
stdin=nc
stdout=nc

Environment size: 627/8188 bytes
Marvell>> boot
boot
Waiting for LUMP (2)
Using egiga0 device
no lump receive; continuing

Reset IDE:
Marvell Serial ATA Adapter
Intergrated Sata device found
Device 1: OK
Model: Hitachi HDP725050GLA360 Firm: GM4OA52A Ser#: GEB530RE2XSB8B
Type: Hard Disk
Supports 48-bit addressing
Capacity: 476940.0 MB = 465.7 GB (976773168 x 512)

Checking whether rollback is requested..
Checking for /snaps/00
<DIR> 4096 .
<DIR> 4096 ..
<DIR> 4096 oldroot
<DIR> 4096 etc
<DIR> 4096 dev
<DIR> 4096 usr
Checking for Image /snaps/00/boot/uImage
** Image /snaps/00/boot/uImage not found...
Checking for /snaps/01
** Can not find directory. **
** End of Snapshots **
No valid Image Found. Loading default kernel

Loading from IDE device 1, partition 6: Name: hdb6
Type: U-Boot
Image Name: Linux-2.6.12.6-arm1-lacie5a
Created: 2006-10-31 10:26:32 UTC
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 1523420 Bytes = 1.5 MB
Load Address: 00008000
Entry Point: 00008000
## Booting image at 00400000 ...
Image Name: Linux-2.6.12.6-arm1-lacie5a
Created: 2006-10-31 10:26:32 UTC
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 1523420 Bytes = 1.5 MB
Load Address: 00008000
Entry Point: 00008000
Verifying Checksum ... OK
OK

Starting kernel ...



LinkStation:/media/clunc-1.1#
===================================
In your case, if you don't have a serial connection i'd open up the case to find out about the flash part.

I think you'll need a uboot with saving ability if you wish to make changes to it in order to boot debian which I think needs different boot arguments, at least if you follow petris' instructions. And if you want to know what's going on during kernel bootup, you'll also need a serial connection.

rosbif
Posts: 112
Joined: Thu May 08, 2008 11:23 am
Location: near Toulouse, France

Re: EDmini v2 mainline kernel support

Post by rosbif » Wed Jun 02, 2010 3:52 am

langerak wrote:What would you suggest me to do? Flash U-Boot to newer version (will CLUNC still work?) or leave it the way it is and try to install Debian onto it?
*WARNING* Flashing U-Boot is a *very dangerous* operation.
You can easily brick your device and I do not know how to recover even with JTAG hardware.
AFAIK even Albert has not yet been able to access the FLASH using JTAG.

That said CLUNC should work with Albert's modified U-Boot.
flavoie wrote:I think you'll need a uboot with saving ability if you wish to make changes to it in order to boot debian which I think needs different boot arguments, at least if you follow petris' instructions.
This is correct if you want to boot Debian automatically.
I generally boot it from the U-Boot command line.
flavoie wrote:And if you want to know what's going on during kernel bootup, you'll also need a serial connection.
It seems that it is possible to see these messages via CLUNC if netconsole is configured into the kernel.
See the CLUNC README:
CLUNC README wrote:Linux can log its messages via netconsole if compiled with option CONFIG_NETCONSOLE.
This feature must be configured at boot time:
set bootargs netconsole=6666@${ipaddr}/,6666@${serverip}/

langerak
Posts: 160
Joined: Sat May 29, 2010 6:37 pm

Re: EDmini v2 mainline kernel support

Post by langerak » Wed Jun 02, 2010 6:48 am

I can't get the netconsole function to work :(. When it works it should replace the serial connection right? How can i compile the netconsole function? can't find infos on that :(.

EDIT:
nvm on the netconsole, on my Ubuntu 10.04 box i only had to modprobe it. Found info here and gonna test it tonight :):
http://www.cyberciti.biz/tips/linux-net ... orial.html

I had it boot from TFTP yesterday, that was a foonas-em image and that booted ok, hence no kernelmessages etc due to the above not working...

To use fully automate the boot of Debian i need to flash U-Boot you say? I've read some infos and it seems that the U-Boot update can be read from TFTP so that's no problem, should i try that? I know the risks for sure now, but in order to have Debian i have to update :P.

BTW, the Flashrom i have is the following: 29LV400CBTC-70G. Will the U-Boot update work on my flash rom?

Sorry for all the questions, but i want to have all things sorted out before i start messing up things that would have not been neccessary by asking ;)!

flavoie
Posts: 14
Joined: Wed Apr 16, 2008 4:23 am

Re: EDmini v2 mainline kernel support

Post by flavoie » Thu Jun 03, 2010 1:05 am

langerak wrote:I can't get the netconsole function to work :(. When it works it should replace the serial connection right? How can i compile the netconsole function? can't find infos on that :(.

EDIT:
nvm on the netconsole, on my Ubuntu 10.04 box i only had to modprobe it. Found info here and gonna test it tonight :):
http://www.cyberciti.biz/tips/linux-net ... orial.html

I had it boot from TFTP yesterday, that was a foonas-em image and that booted ok, hence no kernelmessages etc due to the above not working...

To use fully automate the boot of Debian i need to flash U-Boot you say? I've read some infos and it seems that the U-Boot update can be read from TFTP so that's no problem, should i try that? I know the risks for sure now, but in order to have Debian i have to update :P.

BTW, the Flashrom i have is the following: 29LV400CBTC-70G. Will the U-Boot update work on my flash rom?

Sorry for all the questions, but i want to have all things sorted out before i start messing up things that would have not been neccessary by asking ;)!
Your flashrom is the same as mine, exactly the same number, you'll likely notice "MX" for Macronix on the chip. The uboot should work for you if you follow the instructions to the letter like I did:
http://tweaky.aribaud.net/?q=node/39

Post Reply