User Tools

Site Tools


linuxforkirkwoodsocs

This is an old revision of the document!


Extending Linux support for Kirkwood SoC

Repository: lacie-orion.git

Here is a list of the LaCie machines based on Kirkwood SoC:

Overview

To-do list

  • add power management support for Kirkwood SoCs.
  • add GPIO chip driver for F71882 Super I/O.
  • add support for 5Big Network XP (atom-bases boards, x86 Pineview).
  • add SoC support for Orion 6082 (Network Space v1).
  • add support for Wireless Space.
  • add driver for GMT G762 fan PWM controller.
  • maybe add driver for hard disk GPIOs (presence and power).
  • maybe add driver for USB GPIOs (VBus in detection, VBus out, fuse, host/device mode switch).

How to install debian squeeze

Quick install

  • Format a usb key in dos format. One partition.
#!/bin/bash
 
# 
nas_ip=192.168.1.9
# You can get it by ifconfig eth0
server_ip=192.168.1.3
server_mac=08:00:46:b6:64:17
 
echo -e "
set mainlineLinux 2206;
setenv bootargs netconsole=6666@${nas_ip}/,6666@${server_ip}/${server_mac} auto=true file=/preseed.cfg;
usb reset;
fatload usb 0:1 0x800000 uImage;
usb stop;
bootm 0x800000;
" | ./clunc -i ${nas_ip} -t 60
  • Check that your nas is connected with Ethernet cable and can have access to internet using DHCP.
  • Then run the script, you will see this message:
./boot_from_usb 
Marvell>> 
Marvell>> set mainlineLinux 2206;
Marvell>> setenv bootargs netconsole=6666@192.168.1.9/,6666@192.168.1.3/08:00:46:b6:64:17 auto=true file=/preseed.cfg;
Marvell>> usb reset;
(Re)start USB...
USB:   scanning bus for devices... 3 USB Device(s) found
       scanning bus for storage devices... 1 Storage Device(s) found
Marvell>> fatload usb 0:1 0x800000 uImage;
## Valid DOS partition found ##
reading uImage
..........................................................................................
..........................................................................................
.......................................................................
..........................................................................................
..........................................................................................
.....

4477180 bytes read
Marvell>> usb stop;
stopping USB..
Marvell>> bootm 0x800000;
## Booting image at 00800000 ...
   Image Name:   Linux-2.6.35.4-dirty
   Created:      2010-09-12  13:07:05 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    4477116 Bytes =  4.3 MB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
OK

Starting kernel ...

[    0.000000] Linux version 2.6.35.4-dirty (luc@luc-dell) (gcc version 4.4.4 (Buildroot 2010.08) ) #5 PREEMPT Sun Sep 12 3:06:51 UTC 2010
[    0.000000] CPU: Feroceon 88FR131 [56251311] revision 1 (ARMv5TE), cr=00053177
[    0.000000] CPU: VIVT data cache, VIVT instruction cache
[    0.000000] Machine: LaCie 5Big Network v2
[    0.000000] Memory policy: ECC disabled, Data cache writeback
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 130048
[....]
[    5.656473] Freeing init memory: 8408K
  • after a moment, you can log in your nas with ssh on login 'installer'. The password is azerty
ssh installer@192.168.1.9

Details install

Patch the initrd

We patch the debian installer initrd to include a 'presseed' file. This file will contains automatic answer when the debian installer will ask to configure the network. Another solution is to put all answers on the kernel command line. I use this script to unpack the initrd and rebuild it

#!/bin/sh
 
wget http://ftp.fr.debian.org/debian/dists/squeeze/main/installer-armel/current/images/kirkwood/network-console/qnap/ts-219/initrd.gz
 
rm -rf unpack
mkdir unpack
cd unpack
zcat ../initrd.gz | cpio -imd --quiet
rm -rf lib/modules/2.6.32-5-kirkwood
cat > preseed.cfg <<__EOF
d-i debconf/priority                   select critical
d-i auto-install/enabled               boolean true
d-i netcfg/choose_interface            select auto
d-i netcfg/get_hostname                string obelix
d-i network-console/password           password azerty
d-i network-console/password-again     password azerty
d-i preseed/early_command string anna-install network-console
 
__EOF
find . | cpio --quiet -H newc -o | gzip -9 -n > ../initrd-patched.gz
find . | cpio --quiet -H newc -o > ../debian-installer.cpio
echo done

Rebuild your own kernel

Debian squeeze kernel (2.6.32) is too old for your board. You must use a recent kernel (>=2.6.35). Download this prebuilt kernel to boot debian-installer.

Include the ../debian-installer.cpio into the kernel.

Note: uImage must not be greater than 6Mbytes. (U-boot will not support it).

TODO

Boot debian installer with clunc

TROUBLESHOOTING

If you get “failed to download a file” error during the install, try the following clunc script with “debian-installer/allow_unauthenticated=true”:

#!/bin/bash
 
# 
nas_ip=192.168.1.9
# You can get it by ifconfig eth0
server_ip=192.168.1.3
server_mac=08:00:46:b6:64:17
 
echo -e "
set mainlineLinux 2206;
setenv bootargs netconsole=6666@${nas_ip}/,6666@${server_ip}/${server_mac} auto=true debian-installer/allow_unauthenticated=true file=/preseed.cfg;
usb reset;
fatload usb 0:1 0x800000 uImage;
usb stop;
bootm 0x800000;
" | ./clunc -i ${nas_ip} -t 60

TODO

linuxforkirkwoodsocs.1310761738.txt.gz · Last modified: 2011/07/15 22:28 by simon