Foonas-em:Install-lsppc

From foonas
Jump to: navigation, search

Contents

How To Install foonas-em for lsppc

Get Ready

Before installing foonas-em, or in fact the main foonas distribution for lsppc, you need to have a working U-Boot installation that supports loading flat device tree files. You'll also need to either download or compile:

  • foonas-em
  • The dtb file for your platform

Currently tested precompiled versions of the above files are available for Linkstation HD-HLAN/Kurobox here or Linkstation HG/Kurobox HG/HGWR here, and a complete installation guide for U-Boot with FDT support is available on NAS Central. Note that only the pre-compiled versions distributed by foonas.org are supported. Note that installing the firmware for the wrong platform will not work due to differences in the kernel configuration, so ensure you download the right one.

Install

This guide was updated on 04/05/2008 for version 0.1.0-r2.

WARNING: Carrying out the following procedure incorrectly could render your device inoperable. If you do not own a JTAG cable be wary that if you do not follow carefully you may not be able to revive your box.

This install guide is for lsppchd/lsppchg foonas-em 0.1.0-r2 only, and will only work correctly using the precompiled binaries above. Do not use this with a self compiled or customised foonas-em, or another official version of foonas-em. It will not work.

You should already be familiar with U-Boot, and connecting to it with nc and checking/saving U-Boot environment variables before starting this procedure. If you want to flash foonas-em from your hard disk read the following section. If you wish to flash foonas-em from a TFTP server skip down to the next section.

Load From Hard Disk

Before powering down or rebooting your device to access U-Boot, download and copy the dtb and kernel into /boot so we can load these into U-Boot memory for writing to flash. After this fire up your device and connect to U-Boot using nc. Now issue printenv and check you have at least the following in your U-Boot environment in order for this procedure to work:

Linkstation HD-HLAN/Kurobox:

ldaddr=800000
hdpart=0:1
hdload=echo Loading ${hdpart}:${hdfile};ext2load ide ${hdpart} ${ldaddr} ${hdfile};ext2load ide ${hdpart} 7f0000 boot/kuroboxHD.dtb

Linkstation HG/Kurobox HG/HGWR:

ldaddr=800000
hdpart=0:1
hdload=echo Loading ${hdpart}:${hdfile};ext2load ide ${hdpart} ${ldaddr} ${hdfile};ext2load ide ${hdpart} 7f0000 boot/kuroboxHG.dtb

Set the hdfile variable in U-Boot and load the kernel and dtb into memory:

setenv hdfile boot/vmlinux.UBoot
run hdload

Now scroll down to the Erase Flash & Install foonas-em section and continue there.

Load From TFTP Server

First install and configure a TFTP server on your network, then download the kernel and the dtb file for your platform to the root of this TFTP server. TFTP servers known to work for various platforms are listed here if you do not have one installed. After this fire up your device and connect to uboot using nc and load the files into memory.

First set the ip address of the machine with your TFTP server running on it (for example with 192.168.1.99):

setenv serverip 192.168.1.99

Load the kernel into memory:

tftp 800000 vmlinux.UBoot

Now, load the dtb into memory:

Linkstation HD-HLAN/Kurobox:

tftp 7f0000 kuroboxHD.dtb

Linkstation HG/Kurobox HG/HGWR:

tftp 7f0000 kuroboxHG.dtb

Now scroll down to the Erase Flash & Install foonas-em section and continue there.

Erase Flash & Install foonas-em

First, unprotect the areas that we are going to write to. If you carry out this step correctly the worst that can happen through the entire procedure is that you are left with only u-boot in flash.

protect off FFC00000 FFEFFFFF
protect off FFF80000 FFFFFFFF

Now we erase the contents of these areas:

era FFC00000 FFEFFFFF
era FFF80000 FFFFFFFF

Now write the kernel to flash:

cp.b 800000 FFC00000 2FFFFF

Linkstation HD-HLAN/Kurobox:

cp.b AFFFFF FFF80000 7E86B

Linkstation HG/Kurobox HG/HGWR:

cp.b AFFFFF FFF80000 7E887

Write the dtb to flash:

cp.b 7F0000 FFFFF6AC 953

Once this has been written to flash, power off your Linkstation/Kurobox. We need to do this to remove the kernel we've now got loaded into U-Boot memory. If you don't power off and reboot here, then the change that we made above to set "hdfile boot/vmlinux.UBoot" will get saved in flash when you issue saveenv at the end of this next procedure, and U-Boot will search for vmlinux.UBoot instead of the required uImage.

Configure U-Boot

Reconnect via nc and reconfigure your U-Boot environment to include the following variables:

Linkstation HD-HLAN/Kurobox:

setenv foofl1 'cp.b FFC00000 800000 2FFFFF;cp.b fff80000 AFFFFF 7E86B'
setenv foofl2 'setenv bootargs root=/dev/ram0 rw;bootm ${ldaddr} - FFFFF6AC'
setenv fooflboot 'run foofl1 foofl2' 

Linkstation HG/Kurobox HG/HGWR:

setenv foofl1 'cp.b FFC00000 800000 2FFFFF;cp.b fff80000 AFFFFF 7E887'
setenv foofl2 'setenv bootargs root=/dev/ram0 rw;bootm ${ldaddr} - FFFFF6AC'
setenv fooflboot 'run foofl1 foofl2'

And finally tell U-Boot to boot foonas-em if it fails to boot from the HDD, or if boot option 2 is issued:

setenv bootcmd1 'run hdboot;run fooflboot'
setenv bootcmd2 'run fooflboot' 

Now save these variables and boot your new OS in flash:

saveenv
run fooflboot

Username and password is root/hydr0g3n and you can login via telnet or serial port. By default foonas-em uses DHCP but will revert to the IP 192.168.11.150 if this fails. The ftpd should be enabled by default however you will need to login and mount partitions manually. You may also access foonas-em via your web browser to install supported Linux distributions.

Personal tools