doc:appunti:hardware:lacie_d2_network_2
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
doc:appunti:hardware:lacie_d2_network_2 [2010/12/15 16:35] – [Making a new kernel] niccolo | doc:appunti:hardware:lacie_d2_network_2 [2014/01/28 10:22] (current) – [Hacking the LaCie d2 Network 2] niccolo | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Hacking the LaCie d2 Network 2 ====== | ====== Hacking the LaCie d2 Network 2 ====== | ||
- | The **LaCie d2 Network 2** is very similar to the **[[lacie_d2_network|LaCie d2 Network]]**, | + | {{.: |
+ | |||
+ | The **LaCie d2 Network 2** is very similar to the **[[lacie_d2_network|LaCie d2 Network]]**, | ||
The LaCie software is changed a lot. May be it is possible get root access without disassembling it, have a look at the [[# | The LaCie software is changed a lot. May be it is possible get root access without disassembling it, have a look at the [[# | ||
Line 211: | Line 213: | ||
The Wake-On-LAN is **not handled by the U-Boot code** (like in the LaCie d2 Network). When the power switch is onto the ON position, the U-Boot always begins the boot process spinning-on the disk, during the boot process a script checks if the Deep Sleep Mode is active, in that case it halts the disk and wait for the Magic Packet. | The Wake-On-LAN is **not handled by the U-Boot code** (like in the LaCie d2 Network). When the power switch is onto the ON position, the U-Boot always begins the boot process spinning-on the disk, during the boot process a script checks if the Deep Sleep Mode is active, in that case it halts the disk and wait for the Magic Packet. | ||
+ | |||
+ | If you install a plain Debian operating system, you can use the **[[# | ||
===== Installing Debian ===== | ===== Installing Debian ===== | ||
Line 312: | Line 316: | ||
</ | </ | ||
- | FIXME How to extract the initramfs from the vmlinux image? The recipe below (// | + | **How to extract the initramfs from the vmlinux image.** |
+ | |||
+ | First of all search for a gzip signature | ||
+ | |||
+ | < | ||
+ | </code> | ||
+ | |||
+ | Say the gzip signature offset is 12504, extract | ||
+ | |||
+ | < | ||
+ | dd if=vmlinux of=vmlinux_data1.gz bs=1 skip=12504 | ||
+ | gunzip vmlinux_data1.gz | ||
+ | </ | ||
+ | |||
+ | Search again for a gzip signature, extract the gzip data and expand it. The resulting file is the **{{.: | ||
+ | |||
+ | < | ||
+ | dd if=vmlinux_data1 of=vmlinux_data2.gz bs=1 skip=88928 | ||
+ | gunzip vmlinux_data2.gz | ||
+ | mv vmlinux_data2 initramfs.cpio | ||
+ | mkdir initramfs | ||
+ | cd initramfs | ||
+ | cat ../ | ||
+ | </ | ||
=== Useful links === | === Useful links === | ||
* [[http:// | * [[http:// | ||
+ | * [[http:// | ||
* [[http:// | * [[http:// | ||
* [[http:// | * [[http:// | ||
Line 339: | Line 367: | ||
With the old LaCie model it was possible to change the machine ID passed to the kernel using the **'' | With the old LaCie model it was possible to change the machine ID passed to the kernel using the **'' | ||
- | === Cross compile === | + | ==== Cross compile |
- | We choose to cross-compile a kernel on a Debian i386 Squeeze box. The procedure is very similar to the [[lacie_d2_network# | + | We choose to **cross-compile** a kernel on a **Debian i386 Squeeze** box. The procedure is very similar to the [[lacie_d2_network# |
On the Squeeze box install the following packages: | On the Squeeze box install the following packages: | ||
Line 375: | Line 403: | ||
Install the **[[http:// | Install the **[[http:// | ||
- | We started with the kernel config file provied by the Debian | + | Using the kernel config file provied by Debian for the kirkwood architecture |
Prepare the source tree: | Prepare the source tree: | ||
Line 387: | Line 415: | ||
</ | </ | ||
- | These are the commands create the .deb package and the uImage: | + | These are the commands create the linux-image |
< | < | ||
Line 401: | Line 429: | ||
The U-Boot image is saved in **'' | The U-Boot image is saved in **'' | ||
- | Copy both the .deb and the uImage into the LaCie and execute: | + | Copy both the **linux-image** |
< | < | ||
Line 407: | Line 435: | ||
dd if=uImage of=/ | dd if=uImage of=/ | ||
</ | </ | ||
+ | |||
+ | ===== Fake Wake-on-LAN ===== | ||
+ | |||
+ | The Ethernet chip does not have WoL capabilities (whereas the old d2 Network does), so we can only simulate it. This is my first attempt to make a software Wake-on-LAN. | ||
+ | |||
+ | At an early stage of the boot process the **'' | ||
+ | |||
+ | You can download the program here: **{{.: | ||
+ | |||
+ | ===== The EEPROM ===== | ||
+ | |||
+ | The content of the EEPROM is exposed for read and write via the pseudo file **''/ | ||
+ | |||
+ | ^ Offset | ||
+ | | 0 | 2 | 0x00 0x02 | | ||
+ | | 2 | 6 | Ethernet MAC address. | ||
+ |
doc/appunti/hardware/lacie_d2_network_2.1292427339.txt.gz · Last modified: 2010/12/15 16:35 by niccolo