General NAS-Central Forums

Welcome to the NAS community
It is currently Fri Dec 15, 2017 4:33 am

All times are UTC




Post new topic Reply to topic  [ 78 posts ]  Go to page 1, 2, 3, 4, 5, 6  Next
Author Message
PostPosted: Sat May 10, 2008 5:40 pm 
Offline

Joined: Thu May 08, 2008 11:23 am
Posts: 112
Location: near Toulouse, France
As you suggest I'll read up a bit on foonas.

mindbender wrote:
what is the console log with the current kernel?


Remark: I've obscured my MAC address and put the bad SATA line in bold red characters.

bootm
## Booting image at 00000000 ...
Image Name: Linux-2.6.25.1
Created: 2008-05-04 17:09:56 UTC
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 4483052 Bytes = 4.3 MB
Load Address: 00008000
Entry Point: 00008000
Verifying Checksum ... OK
OK

Starting kernel ...

Uncompressing Linux................................................................................................................................................................................................ done, booting the kernel.
Linux version 2.6.25.1 (ole@mediapc) (gcc version 4.2.2) #1 PREEMPT Sun May 4 18:09:54 BST 2008
CPU: Feroceon [41069260] revision 0 (ARMv5TEJ), cr=a0053177
Machine: Buffalo Linkstation Pro/Live
Clearing invalid memory bank 0KB@0xffffffff
Clearing invalid memory bank 0KB@0xffffffff
Clearing invalid memory bank 0KB@0xffffffff
Ignoring unrecognised tag 0x00000000
Ignoring unrecognised tag 0x00000000
Ignoring unrecognised tag 0x00000000
Ignoring unrecognised tag 0x41000403
Memory policy: ECC disabled, Data cache writeback
CPU0: D VIVT write-back cache
CPU0: I cache: 32768 bytes, associativity 1, 32 byte lines, 1024 sets
CPU0: D cache: 32768 bytes, associativity 1, 32 byte lines, 1024 sets
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 16256
Kernel command line: console=ttyS0,115200
PID hash table entries: 256 (order: 8, 1024 bytes)
Console: colour dummy device 80x30
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
Memory: 64MB = 64MB total
Memory: 58776KB available (2980K code, 170K data, 2940K init)
SLUB: Genslabs=12, HWalign=32, Order=0-1, MinObjects=4, CPUs=1, Nodes=1
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
net_namespace: 236 bytes
NET: Registered protocol family 16
Orion ID: MV88F5182-A2. TCLK=166666667.
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 2048 (order: 2, 16384 bytes)
TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
TCP: Hash tables configured (established 2048 bind 2048)
TCP reno registered
JFFS2 version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
io scheduler noop registered
io scheduler anticipatory registered
io scheduler deadline registered
io scheduler cfq registered (default)
Serial: 8250/16550 driver $Revision: 1.90 $ 2 ports, IRQ sharing disabled
serial8250.0: ttyS0 at MMIO 0xf1012000 (irq = 3) is a 16550A
console [ttyS0] enabled
serial8250.0: ttyS1 at MMIO 0xf1012100 (irq = 4) is a 16550A
brd: module loaded
loop: module loaded
MV-643xx 10/100/1000 Ethernet Driver
eth0: port 0 with MAC address 00:d0:4b:81:XX:XX
eth0: Scatter Gather Enabled
eth0: TX TCP/IP Checksumming Supported
eth0: RX TCP/UDP Checksum Offload ON
eth0: RX NAPI Enabled
Driver 'sd' needs updating - please use bus_type methods
sata_mv sata_mv.0: version 1.20
sata_mv sata_mv.0: slots 32 ports 2
scsi0 : sata_mv
scsi1 : sata_mv
ata1: SATA max UDMA/133 irq 29
ata2: SATA max UDMA/133 irq 29
ata1: SATA link down (SStatus 0 SControl 300)
ata2: SATA link down (SStatus 0 SControl 300)
NFTL driver: nftlcore.c $Revision: 1.98 $, nftlmount.c $Revision: 1.41 $
physmap platform flash device: 00040000 at f4000000
physmap-flash.0: Found 1 x16 devices at 0x0 in 8-bit bank
NOR chip too large to fit in mapping. Attempting to cope...
Amd/Fujitsu Extended Query Table at 0x0040
physmap-flash.0: CFI does not contain boot bank location. Assuming top.
number of CFI chips: 1
cfi_cmdset_0002: Disabling erase-suspend-program due to code brokenness.
Reducing visibility of 512KiB chip to 256KiB
RedBoot partition parsing not available
i2c /dev entries driver
rtc-rs5c372 0-0032: rs5c372a found, 24hr, driver version 0.5
rtc-rs5c372 0-0032: rtc core: registered rtc-rs5c372 as rtc0
device-mapper: ioctl: 4.13.0-ioctl (2007-10-18) initialised: dm-devel@redhat.com
TCP cubic registered
NET: Registered protocol family 1
NET: Registered protocol family 10
IPv6 over IPv4 tunneling driver
NET: Registered protocol family 17
VFP support v0.3: not present
rtc-rs5c372 0-0032: setting system clock to 2008-04-04 06:04:33 UTC (1207289073)
Freeing init memory: 2940K
JFS: nTxBlock = 482, nTxLock = 3861
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
orion-ehci orion-ehci.0: Marvell Orion EHCI
orion-ehci orion-ehci.0: new USB bus registered, assigned bus number 1
orion-ehci orion-ehci.0: irq 17, io mem 0xf1050000
orion-ehci orion-ehci.0: USB 2.0 started, EHCI 1.00, driver 10 Dec 2004
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
orion-ehci orion-ehci.1: Marvell Orion EHCI
orion-ehci orion-ehci.1: new USB bus registered, assigned bus number 2
orion-ehci orion-ehci.1: irq 12, io mem 0xf10a0000
orion-ehci orion-ehci.1: USB 2.0 started, EHCI 1.00, driver 10 Dec 2004
usb usb2: configuration #1 chosen from 1 choice
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 1 port detected

______ _____ _____ __ __ _____ ______
| ___| | | \| |/ _ \| ___|
_| ___| - | - | | _ |\ \
| |__| |_____|_____|__|\___|__| |__|_\ \
|___________________________________________|

foonas-em for lspro - http://foonas.org

lspro login:


Here is the bootlog of the kernel I configured.
You will see that :
a) SATA is OK.
b) RTC is not detected.
c) Mine needs mem=64m for it to boot correctly but your's doesn't.
The init part is from a Maxtor Shared Storage II but slightly modified.

bootm
## Booting image at 00000000 ...
Image Name: Linux-2.6.25.2
Created: 2008-05-10 9:53:35 UTC
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 1763036 Bytes = 1.7 MB
Load Address: 00008000
Entry Point: 00008000
Verifying Checksum ... OK
OK

Starting kernel ...

Uncompressing Linux..................................................................................................................... done, booting the kernel.
Linux version 2.6.25.2 (cmoore@linuxvideo.moore.hd.free.fr) (gcc version 4.2.3 (Sourcery G++ Lite 2008q1-126)) #16 PREEMPT Sat May 10 11:53:29 CEST 2008
CPU: Feroceon [41069260] revision 0 (ARMv5TEJ), cr=a0053177
Machine: Marvell Orion-NAS Reference Design
Ignoring unrecognised tag 0x41000403
Memory policy: ECC disabled, Data cache writeback
CPU0: D VIVT write-back cache
CPU0: I cache: 32768 bytes, associativity 1, 32 byte lines, 1024 sets
CPU0: D cache: 32768 bytes, associativity 1, 32 byte lines, 1024 sets
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 16256
Kernel command line: console=ttyS0,115200 root=/dev/sda8 rw mem=64m
PID hash table entries: 256 (order: 8, 1024 bytes)
Console: colour dummy device 80x30
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
Memory: 64MB = 64MB total
Memory: 61116KB available (3416K code, 232K data, 104K init)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
net_namespace: 152 bytes
NET: Registered protocol family 16
Orion ID: MV88F5182-A2. TCLK=166666667.
PCI: bus0: Fast back to back transfers enabled
PCI: bus1: Fast back to back transfers enabled
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 2048 (order: 2, 16384 bytes)
TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
TCP: Hash tables configured (established 2048 bind 2048)
TCP reno registered
NetWinder Floating Point Emulator V0.97 (double precision)
JFFS2 version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
io scheduler noop registered
io scheduler anticipatory registered
io scheduler deadline registered
io scheduler cfq registered (default)
Serial: 8250/16550 driver $Revision: 1.90 $ 2 ports, IRQ sharing disabled
serial8250.0: ttyS0 at MMIO 0xf1012000 (irq = 3) is a 16550A
console [ttyS0] enabled
serial8250.0: ttyS1 at MMIO 0xf1012100 (irq = 4) is a 16550A
loop: module loaded
Intel(R) PRO/1000 Network Driver - version 7.3.20-k2-NAPI
Copyright (c) 1999-2006 Intel Corporation.
e100: Intel(R) PRO/100 Network Driver, 3.5.23-k4-NAPI
e100: Copyright(c) 1999-2006 Intel Corporation
MV-643xx 10/100/1000 Ethernet Driver
eth0: port 0 with MAC address 00:d0:4b:81:XX:XX
eth0: Scatter Gather Enabled
eth0: TX TCP/IP Checksumming Supported
eth0: RX TCP/UDP Checksum Offload ON
eth0: RX NAPI Enabled
Driver 'sd' needs updating - please use bus_type methods
sata_mv sata_mv.0: version 1.20
sata_mv sata_mv.0: slots 32 ports 2
scsi0 : sata_mv
scsi1 : sata_mv
ata1: SATA max UDMA/133 irq 29
ata2: SATA max UDMA/133 irq 29
ata1: SATA link down (SStatus 0 SControl 300)
ata2: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
ata2.00: ATA-7: ST3500630AS, 3.AAK, max UDMA/133
ata2.00: 976773168 sectors, multi 0: LBA48 NCQ (depth 0/32)
ata2.00: configured for UDMA/133
scsi 1:0:0:0: Direct-Access ATA ST3500630AS 3.AA PQ: 0 ANSI: 5
sd 1:0:0:0: [sda] 976773168 512-byte hardware sectors (500108 MB)
sd 1:0:0:0: [sda] Write Protect is off
sd 1:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
sd 1:0:0:0: [sda] 976773168 512-byte hardware sectors (500108 MB)
sd 1:0:0:0: [sda] Write Protect is off
sd 1:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
sda: sda1 < sda5 sda6 sda7 sda8 sda9 > sda2
sd 1:0:0:0: [sda] Attached SCSI disk
NFTL driver: nftlcore.c $Revision: 1.98 $, nftlmount.c $Revision: 1.41 $
physmap platform flash device: 01000000 at fc000000
physmap-flash physmap-flash.0: map_probe failed
orion-ehci orion-ehci.0: Marvell Orion EHCI
orion-ehci orion-ehci.0: new USB bus registered, assigned bus number 1
orion-ehci orion-ehci.0: irq 17, io mem 0xf1050000
orion-ehci orion-ehci.0: USB 2.0 started, EHCI 1.00, driver 10 Dec 2004
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
orion-ehci orion-ehci.1: Marvell Orion EHCI
orion-ehci orion-ehci.1: new USB bus registered, assigned bus number 2
orion-ehci orion-ehci.1: irq 12, io mem 0xf10a0000
orion-ehci orion-ehci.1: USB 2.0 started, EHCI 1.00, driver 10 Dec 2004
usb usb2: configuration #1 chosen from 1 choice
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 1 port detected
usbcore: registered new interface driver usblp
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
mice: PS/2 mouse device common for all mice
i2c /dev entries driver
rtc-ds1307: probe of 0-0068 failed with error -5
usbcore: registered new interface driver usbhid
drivers/hid/usbhid/hid-core.c: v2.6:USB HID core driver
TCP cubic registered
NET: Registered protocol family 1
NET: Registered protocol family 17
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
VFP support v0.3: not present
drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
kjournald starting. Commit interval 5 seconds
EXT3 FS on sda8, internal journal
EXT3-fs: recovery complete.
EXT3-fs: mounted filesystem with ordered data mode.
VFS: Mounted root (ext3 filesystem).
Freeing init memory: 104K
[: 0: unknown operand
[: 0: unknown operand
[: 0: unknown operand
[: 0: unknown operand
mount: Mounting /dev/Fail on /to failed: No such file or directory
cat: /proc/scsi/sg/devices: No such file or directory
cat: /proc/scsi/sg/devices: No such file or directory
Found Orion-Nas XML configuration file.
Configuring LAN interface... done
Configuring Disks... done
Starting swap... Adding 124960k swap on /dev/sda5. Priority:-1 extents:1 across:124960k
done
Mounting Partitions... kjournald starting. Commit interval 5 seconds
EXT3 FS on sda2, internal journal
EXT3-fs: mounted filesystem with writeback data mode.
done
Starting webGUI... done
Starting NTP client... done

Warning: opendir(/sys/class/usb): failed to open dir: No such file or directory in /etc/inc/cups.inc on line 15
Starting cups... done
Starting Samba... done
Starting udev... done
Starting syncaway... done

===============================
Starting MXO Initialization..
===============================

Setting current_boot_partition value.. done
Starting network monitor daemon.. done
Starting discoverd.. done
Starting hnscontrol.. done
Starting bonjour.. done
Starting watchdog daemon.. done
Starting crond[552]: crond 2.3.2 dillon, started, log level 0

done
Starting telnetd.. done
Creating Configuration html.. ifconfig: egiga0: error fetching interface information: Device not found

done
[: opening: unknown operand
[: opening: unknown operand

Maxtor MSSII firmware version : 3.1.28



*** Marvell Semiconductors ltd.
This is MSS-NAS version: 1009p_1 running on unknown-1HDD platform
built on: Thu Jun 15 23:17:13 UTC 2006

LAN IP address: 192.168.1.100 (dhcp)

Port configuration:

LAN -> eth0


BusyBox v1.01 (2006.03.03-02:59+0000) Built-in shell (ash)
Enter 'help' for a list of built-in commands.

/ #


Cheers,
Chris


Last edited by rosbif on Sat May 29, 2010 8:23 am, edited 1 time in total.

Top
 Profile  
 
PostPosted: Sun May 11, 2008 10:43 am 
Offline

Joined: Thu Mar 06, 2008 12:23 pm
Posts: 58
Location: Vienna
the explicit mem=128 command was needed in the past as well on the Linkstations...some patch which i linked fixes this.

ok, lets face your problem. your current kernel does not fully work and you do not have a proper distro to run on your box.

regarding the distro we can help with foonas, although it might be needed to run an additional daemon controlling the Leds & buttons.
(bbradley coded such a thing for the orion based qnap turbostations -> http://qnap.nas-central.org/index.php/P ... l_Software ). it might be possible to modify the application or maybe even just add support for this box. as soon as this userspace daemon works you do not have any problems anymore regarding the OS.

but the kernel needs to be fixed first. maybe a short glance at http://nas-central.org/index.php/Orion_ ... tion_guide does not hurt.....the guide needs to be updated a little though.

so actually if both kernel and the led/button daemon are working, its not that hard to install fullworking rootfs like foonas/debian/gentoo.


Top
 Profile  
 
PostPosted: Mon May 12, 2008 6:49 am 
Offline

Joined: Thu May 08, 2008 11:23 am
Posts: 112
Location: near Toulouse, France
@mindbender: I propose to continue this discussion in a new topic "EDmini v2 mainstream kernel support" as we seem to be getting very OT.
I hope this is OK with you.
Maybe you could also move some of this discussion over.
(I'm not sure if I have the rights (or the knowledge) to do this.
I shall give quick replies here but I shall try to write a better article in the new topic.

mindbender wrote:
the explicit mem=128 command was needed in the past as well on the Linkstations...some patch which i linked fixes this.


I think this is fixed by adding ".fixup = tag_fixup_mem32," to the machine definition in the xxx_setup.c file.
In any case I no longer need it ;-)

mindbender wrote:
ok, lets face your problem. your current kernel does not fully work and you do not have a proper distro to run on your box.


I have made a little progress ;-)

I now have a patched 2.6.25.2 kernel which (almost) works:-
- CPU, RAM, RTC, SATA, GbE, USB and FLASH read seem to work.
- FLASH write is untested: I don't dare as I don't yet have working JTAG :(
- LED, button and fan probably don't work but the fan seems to be "always on" which at least is a failsafe condition ;-)

I can now also generate a working LaCie edmini v2 kernel from their GPL source tree.

mindbender wrote:
regarding the distro we can help with foonas, although it might be needed to run an additional daemon controlling the Leds & buttons.
(bbradley coded such a thing for the orion based qnap turbostations -> http://qnap.nas-central.org/index.php/P ... l_Software ). it might be possible to modify the application or maybe even just add support for this box. as soon as this userspace daemon works you do not have any problems anymore regarding the OS.


This is what I need to look at next.

mindbender wrote:
but the kernel needs to be fixed first. maybe a short glance at http://nas-central.org/index.php/Orion_ ... tion_guide does not hurt.....the guide needs to be updated a little though.


Thanks for this very useful guide. I have done most of this part.

mindbender wrote:
so actually if both kernel and the led/button daemon are working, its not that hard to install fullworking rootfs like foonas/debian/gentoo.


Good: the rootfs I pinched from the Maxtor Shared Storage II seems to be the weakest point at the moment.
Could anyone give me a copy of the LaCie rootfs?


Top
 Profile  
 
PostPosted: Mon May 12, 2008 10:15 am 
Offline

Joined: Thu Mar 06, 2008 12:23 pm
Posts: 58
Location: Vienna
what about trying to boot a debian rootfs which works on the Linkstation pro?

download this file:
http://buffalo.nas-central.org/download ... lo.updated

its a gzipped tarball....so untar it with:
tar -vxzf hddrootfs.buffalo.updated

there is a process called micro_evtd inside....it definitely is not needed on your box...this is a daemon like the PIC daemon i linked before....the linkstations have a board watchdog which needs to be fed with packages regularily or the board resets..it also deals with the Leds/Buttons. maybe just disable the startup in /etc/init.d/

please post the patch at pastebin.org or somewhere so others can look at it.


Top
 Profile  
 
PostPosted: Mon May 12, 2008 2:02 pm 
Offline

Joined: Thu May 08, 2008 11:23 am
Posts: 112
Location: near Toulouse, France
mindbender wrote:
what about trying to boot a debian rootfs which works on the Linkstation pro?

download this file:
http://buffalo.nas-central.org/download ... lo.updated


GREAT STUFF !!!

mindbender you're the man ;-)

It took me some time to get running though.

I had a problem with passwords :(
I couldn't guess the root password for the maintenance shell so I tried to patch /etc/passwd to one I knew but then I lost the maintenance shell prompt.

After the maintenance shell I got infinite messages: "cat: /proc/driver/kernevnt: No such file or directory"

It wasn't micro_evtd which caused me problems but I finally isolated it to kernelmon.
I just eliminated it but I'll try to debug the problem later.

Then when I got to the real login screen it wouldn't accept a root login :(
I had seen admin in /etc/passwd so tried admin/admin and BINGO !

I'm much happier with a familiar and richer Debian environment ;-)

Many thanks.

mindbender wrote:
please post the patch at pastebin.org or somewhere so others can look at it.


Do you mean the source patch or the compiled uImage?


Top
 Profile  
 
PostPosted: Mon May 12, 2008 2:28 pm 
Offline

Joined: Thu Mar 06, 2008 12:23 pm
Posts: 58
Location: Vienna
great to know that it works :)

root password for freelink would have been "lspro". changing it in /etc/passwd does not work completely as ssh is used....the password is stored in /etc/shadow.

kernelmon is also linkstation specific stuff. remove it. there is a "buffalo" folder somewhere....remove the complete folder.

but sounds cool. seems as if you have a nearly free NAS box :)

i am currently trying to hunt a Lacie Ethernet Big disk which uses the same firmwareupdater + update (at least it seems so) for foonas-development at ebay.


Top
 Profile  
 
PostPosted: Wed May 14, 2008 4:36 am 
Offline

Joined: Thu May 08, 2008 11:23 am
Posts: 112
Location: near Toulouse, France
Please excuse this incomplete post which is work in progress.
If I wait till it is finished nothing will ever get done :(
I shall try to edit it regularly to complete it.
@mindbender: is this OK with you?
Maybe later you could move this post to the head of this topic.

I am writing this in the hope that it might help someone trying to port the Linux kernel to a platform.

While this topic is specific to EDmini v2 a lot of the following is also relevant to :-
    a) porting to another Marvell Feroceon/Orion platform,
    b) porting to another arm platform,
    c) porting to another embedded platform,
    d) porting to any platform.
But obviously with a decreasing degree of relevance.

I was under the impression that cross-compiling a kernel was difficult. In fact it is hardly any more complicated than native compiling.

Basically all you have to do is:-

a) Download and install the appropriate tool chain from http://www.codesourcery.com based on your host and target architectures. I installed it into a subdirectory of my home directory.
There is a first gotcha here. Compilers have got stricter and if you are compiling an “old” 2.6.12 kernel you will need to downgrade to a 2005q3 toolchain. I couldn't find old toolchains at first but this link should do the trick:-
http://www.codesourcery.com/gnu_toolcha ... s/2005q3-2

b) For a bash shell you need to:-
    export PATH=$HOME/Path/To/Tool/Chain/arm-2008q1/bin:$PATH
    export ARCH=arm
    export CROSS_COMPILE=arm-none-linux-gnueabi-
(You obviously have to adapt these to your needs)
and while you are at it if you will be generating modules
    export INSTALL_MOD_PATH=./
I was a bit worried about the last one as . (dot) is a moving target but it seems to work as expected: the idea being to generate the modules in the lib directory at the top of the source tree.
You could of course
    put these arguments in your .bash_profile and restart your shell or source it: ". ~/.bash_profile".
    put these arguments if a file you will source with ". file" in bash
    put these arguments (without the export) on the make command line below
    do this in an alias

Don't forget to disable these if you wish to go back to "normal" compiling ;-)

c) Either download and install a vanilla kernel source tree from http://www.kernel.org or a patched source tree from your NAS manufacturer.


It is easiest to start off from an existing platform in the kernel source tree which resembles yours. You will find lots of XXX_defconfig in arch/arm/configs.
    cd to the top of the source tree
    make XXX_defconfig

Then it's virtually just as normal:-
    make menuconfig (or whatever)
    make uImage (this is different)

And if you want modules:-
    make modules
    make modules_install (sudo is not needed)

If at any time you're paranoid and you want a clean start:-
    save your .config which I think will get clobbered
    make mrproper

WARNING: dangerous stuff follows ;-)
On an edmini, if you put your uImage in a directory called /snaps/00/boot on partition 9 U-Boot should pick it up automatically at the next boot (assuming there is no later subdirectory in /snaps).

I believe there should be a way (maybe holding in the power button) to force U-Boot to ignore this and boot normally from a raw uImage on partition 6 but I have found nothing that works for me.

So if your uImage does not work and you don't have serial access to U-Boot your edmini will be bricked.

You have been warned :(

Of course you could remove the disk, mount it in another system and remove, rename or replace the offending uImage.

To be continued...


Last edited by rosbif on Sat Jul 26, 2008 7:43 am, edited 2 times in total.

Top
 Profile  
 
PostPosted: Wed May 14, 2008 7:00 am 
Offline

Joined: Thu Mar 06, 2008 12:23 pm
Posts: 58
Location: Vienna
thx for posting this here :)

i should have thought about this...as i wrote this article here a while ago:
http://nas-central.org/index.php/Settin ... _compiling
install script:
http://nas-central.org/index.php/Talk:S ... _compiling

i think there is something currently wrong with that installscript...i think i messed up something with the absolute/relative paths...need to recheck.

just4info: i am currently trying to organize some EDmini v2/Ethernet Big Disk boxes for foonas-development.... a shame that they only have 64 MB RAM....all other boxes (QNAP/Buffalo linkstations/Kurobox Pro/..) have 128 MB RAM...


Top
 Profile  
 
PostPosted: Sat May 17, 2008 9:47 am 
Offline

Joined: Thu May 08, 2008 11:23 am
Posts: 112
Location: near Toulouse, France
Here are my preliminary patches to the 2.6.25.2 kernel for the EDmini V2.

It almost works:-
    CPU, RAM, RTC, SATA, GbE, USB host and FLASH read seem to work.
    USB device is untested and the port may even be configured as host as I don't recall setting it to device.
    FLASH write is untested: I don't dare as I don't yet have working JTAG :(
    LED, button and fan probably don't work but the fan seems to be "always on" which at least is a fail-safe condition ;-)
I intend to improve it but I shall not have much free time in the coming month so I am posting it as is in the hope that it will be of interest to someone.

It is based on rd88f5182-setup.c and, in particular, the comments on the MPP pins are unchanged and therefore probably incorrect for the edmini_v2.

One problem you are likely to have is that ethernet will be on eth0 whereas I believe LaCie uses egiga0.

Here are some of the things that need doing:-
    Clean up my code: there is a lot of "#if 0" code and incorrect comments that should be removed.
    Check the "magic" Feroceon/Orion configuration values I use.
    DANGEROUS: Test the USB device port. Bear in mind that it may be misconfigured as a host port and I do not know if they would crash and burn :(
    DANGEROUS: Test the flash interface in write mode. I would not do this without confirmed working JTAG access to the flash chip and, of course, a backup of its contents.
    Work out how the LED, the button, the fan and a possible temperature sensor are interfaced.
    In the EDmini V2 GPL tarball there is an edmini_button.c driver handling the button. There is also a probably more recent version in the 2Big tarball which seems to support the EDmini as well. I would be tempted to try to port the 2Big version. Possibly no other work is needed ;-)
Here are some things that are not strictly essential but would help a lot the reverse engineering:-
    Write a kernel module which either dumps the Feroceon/Orion registers or better (but VERY DANGEROUS) gives user space access to them (mmap?). Maybe such tools already exist for other Feroceon NAS. Any pointers please?
    Find (or build) a recent Debian rootfs (testing or unstable) and install it on sda2 to give a full environment with thousands of packages. Any pointers please?
Now for the health warnings:-
    These patches are HIGHLY EXPERIMENTAL and DANGEROUS.
    EDIT: IMPORTANT: before updating your kernel please read this topic: http://forums.nas-central.org/viewtopic.php?f=146&t=406
    I promise that I would not knowingly post anything that would damage your EDmini.
    However I could do so inadvertantly: either by my natural stupidity, my ignorance or by touching something that I do not understand.
    And I must admit that there are many things that I do not fully understand and for which the documentation is seemingly only available under NDA.
    I have found is this essential document but it still keeps lots of secrets :(
    http://www.embeddedarm.com/documentatio ... manual.pdf
Before trying these patches:-
    Backup the system partitions and the data partition.
    If possible replace the standard drive with a scratch drive onto which you have copied the system partitions.
    Ensure you have serial access to U-Boot.
EDIT: I am afraid that my ISP objected to my using my website on their server like this and shut it down. Therefore the following links will not work until I find an alternative solution.
The diff file for the patch is here:-
wget http://moore.free.fr/edmini_v2/2.6.25.2 ... /patch.bz2

The uImage is here:-
wget http://moore.free.fr/edmini_v2/2.6.25.2 ... OUS/uImage

The modules are here:-
wget http://moore.free.fr/edmini_v2/2.6.25.2 ... es.tar.bz2

MD5 checksums are here:-
wget http://moore.free.fr/edmini_v2/2.6.25.2 ... md5sum.txt

EDIT: I later realised that LaCie format partition 2 as xfs whereas I used ext3. I am not sure whether U-Boot can boot from an xfs partition.
I put the uImage, the modules and a rootfs on partition 2 and booted from U-Boot like this:-
    setenv bootargs console=ttyS0,115200 root=/dev/sda2 rw
    ide reset
    ext2load ide 1:2 $(kernel_addr) /uImage
    bootm
Enjoy ;-)


Last edited by rosbif on Tue Oct 21, 2008 3:27 am, edited 3 times in total.

Top
 Profile  
 
PostPosted: Fri May 23, 2008 7:33 pm 
Offline

Joined: Thu May 08, 2008 11:23 am
Posts: 112
Location: near Toulouse, France
I have been trying to get a recent Debian rootfs running.
To get recent stuff I wanted to use sid (unstable) or at least lenny (testing).
However debootstrap fails for me on both of these.
On sid I get the following error:-

It is the same with a different mirror.
And the same with lenny.
However it does work for etch.
I did an "apt-get dist-upgrade" to ensure my base system was up to date.

The only thing I can think of is that I am debootstrapping from etch.
Do you need to debootstrap from the same version you are debootstrapping to?


Top
 Profile  
 
PostPosted: Fri May 23, 2008 8:15 pm 
Offline

Joined: Thu Mar 06, 2008 12:23 pm
Posts: 58
Location: Vienna
hm....not your direct problem but isn`t a 2.6.16+ kernel mandatory for lenny?


Top
 Profile  
 
PostPosted: Fri May 23, 2008 9:42 pm 
Offline

Joined: Thu May 08, 2008 11:23 am
Posts: 112
Location: near Toulouse, France
mindbender wrote:
hm....not your direct problem but isn`t a 2.6.16+ kernel mandatory for lenny?

Perhaps, but this is with my patched 2.6.25.2 kernel :-)
    root@LS-GL7D6:~# uname -a
    Linux LS-GL7D6 2.6.25.2 #24 PREEMPT Mon May 12 01:41:13 CEST 2008 armv5tel GNU/Linux
But maybe that is the problem :(

Thanks for the suggestion anyway.


Top
 Profile  
 
PostPosted: Sat May 24, 2008 7:41 am 
Offline

Joined: Thu Mar 06, 2008 12:23 pm
Posts: 58
Location: Vienna
rosbif wrote:
mindbender wrote:
hm....not your direct problem but isn`t a 2.6.16+ kernel mandatory for lenny?

Perhaps, but this is with my patched 2.6.25.2 kernel :-)
    root@LS-GL7D6:~# uname -a
    Linux LS-GL7D6 2.6.25.2 #24 PREEMPT Mon May 12 01:41:13 CEST 2008 armv5tel GNU/Linux
But maybe that is the problem :(


a later kernel is definitely no problem.

i guess the arm-eabi debian feeds are not fully populated..


Top
 Profile  
 
 Post subject: Debian succes
PostPosted: Sun Jun 15, 2008 4:45 pm 
Offline

Joined: Thu Jun 12, 2008 10:59 pm
Posts: 8
Location: Kladno, Czech Republic
I'm currently running debian lenny (with rosbif kernel). Installation procedure(> stands for u-boot prompt and $ for shell):

1. prepare root (Debian based distribution not required, just install debootstrap. I did it from archlinux)
$ debootstrap --arch arm --foreign lenny rootfs
$ (cd rootfs; tar -cvzf ../rootfs.tgz *)
make rootfs.tgz available over http

2. connect serial terminal and boot into /bin/sh
> setenv bootargs console=ttyS0,115200 root=/dev/sda6 ro init=/bin/sh; boot

3. use fdisk to remove sda2 and create two partitions sda2 (freespace-512MB) and sda3 (512MB)

4. make filesystem on sda3 and mount it
$ mount -t proc p /proc
$ mkfs.ext3 /dev/sda3; mkfs.xfs /dev/sda2 (I've also formatted sda2)
$ mount /dev/sda3 /mnt

5. setup eth connection to your PC and download rootfs
$ ifconfig eth0 lacie_ip
$ (cd /mnt; wget http://your_pc_ip/rootfs.tgz; tar -xvzf rootfs.tgz)

6. Umount fs
$ umount /mnt and reboot

7. boot into newly installed system
> setenv bootargs console=ttyS0,115200 root=/dev/sda3 rw noinitrd init=/bin/sh; boot

8. complete the installation
$ export PATH; /debootstrap/debootstrap --second-stage

9. edit /etc/inittab (change the speed of serial console to 115200, remove vga consoles)
edit /etc/fstab (add /, swap etc...)
set the root password

10. reboot
$ mount -o umount,ro /; reboot -f

Then use this to boot into debian:
> setenv bootargs console=ttyS0,115200 root=/dev/sda3 ro noinitrd; boot


Top
 Profile  
 
PostPosted: Wed Jun 18, 2008 9:17 am 
Offline

Joined: Thu Mar 06, 2008 12:23 pm
Posts: 58
Location: Vienna
cool, native debian lenny on the Edmini v2 :D


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

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