One major step to deal with is the control of your NAS. Since it has no screen, there has to be some way to control it (else LaCie could not have put their OS on it). This control goes via uBoot which can be managed via a serial connection or clunc.
I prefer the serial way, because you can also see the verbose output of the kernel when you boot your NAS, which clunc cannot do with the default kernel on your Linux distro. Clunc is also a way to manage it, but i prefer to use it when you have your NAS installed the way i’ll be describing the next posts, because with clunc you can keep your NAS case closed and just use it to boot the kernel and then disconnect.
If you open up your NAS (with LaCie) there may be a serial header (which is 8 pins) on the mainboard. You need to find out which pins are used for +5V, GND, RxD and TxD. A simple voltage meter can help you with this, the TxD and RxD are 3,3V and the rest is 5V. You can establish a simple serial connection with a Nokia DKU-5 USB to Serial cable. I will not explain in detail what the pinouts are on that cable, since there are many variants and buying one of them will costs you a couple of euros and with this as well, a simple voltage meter can help you read out the voltages on the cable.
To explain how to use the serial connection is a hard one, if you manage to hook everything up correctly (find that out yourself, every cable is different) you can easily read out the serial information using a terminal client such as Minicom. One tip when using a USB to Serial cable, the devicename of the cable is
/dev/ttyACM0. This information has to be entered once in Minicom via the Serial port setup inside Minicom. Then turn on your NAS and launch Minicom.
For a simple test i would use Clunc for now and clunc can be downloaded via Git:
git clone git://lacie-nas.org/clunc.git
Then you need to dive into clunc and build it:
When done you can use clunc this way:
./clunc -vi IPADDRESS
If you use DHCP on the NAS you need to find out the IP and enter that with clunc. For this to work you also have to reboot or re-power on your NAS.
If all went well you’ll be seeing something like this (just an example) or you’ll just see a Marvell prompt:
__ __ _ _
| \/ | __ _ _ ____ _____| | |
| |\/| |/ _` | '__\ \ / / _ \ | |
| | | | (_| | | \ V / __/ | |
|_| |_|\__,_|_| \_/ \___|_|_|
_ _ ____ _
| | | | | __ ) ___ ___ | |_
| | | |___| _ \ / _ \ / _ \| __|
| |_| |___| |_) | (_) | (_) | |_
\___/ |____/ \___/ \___/ \__| ** LOADER **
** MARVELL BOARD: DB-88F5182-LaCie LE
U-Boot 1.1.4 (Feb 9 2009 - 13:15:53) Marvell version: 2.4.9 LaCie : 1.00.0001
U-Boot code: 00200000 -> 0026FFF0 BSS: -> 00283280
Soc: 88F5182 A2 (DDR2)
CPU running @ 400Mhz
SysClock = 200Mhz , TClock = 166Mhz
DRAM CS base 0x00000000 size 128MB
DRAM Total size 128MB 32bit width
[512kB@fff80000] Flash: 512 kB
Addresses 4M - 0M are saved for the U-Boot usage.
Mem malloc Initialization (4M - 3M): Done
*** Warning - bad CRC, using default environment
CPU : ARM926 (Rev 0)
88F5182 A2 streaming disabled
There are some commands you should know, which helps you control uBoot:
bdinfo – Show you the boardinfo, however, not all boards support this command.
tftp [kerneladdress] [kernelfile] – This will boot [kernelfile] into [kerneladdress] via TFTP, the server used to retrieve this is set via
printenv – This will print out all the currently active environment variables.
saveenv – This will save the currently active environment variables to Flash memory.
resetenv – This will reset all environment variables to the default ones.
boot – This will initiate the bootprocess if a kernel image is found.
reset – This will give uBoot a reset and restart the board.
There are also some environment variables worth setting up before starting to boot things up:
setenv serverip [IPADDRESS] – With this you’ll set up the server ip-address which can be used to boot via TFTP.
setenv gatewayip [IPADDRESS – With this you can set the gateway ip-address which is needed before the
serverip will work.
setenv ipaddr [IPADDRESS] – With this you can set the NAS ip-address.
When done entering the above details it’s handy to save them to memory for later use:
This is not a post showing the way you boot things on your NAS, but as a informational guide how your NAS boots and handles things. This information is really handy for my next posts on how to really boot your own kernel and manage to boot your root filesystem you’ve built earlier. Especially it’s handy to know what certain commands do and how to use them.
If you have questions on the above, feel free to leave a comment, this part of the setup is always difficult at first :).