User Tools

Site Tools


linuxforkirkwoodsocs

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
linuxforkirkwoodsocs [2011/07/15 22:28] simonlinuxforkirkwoodsocs [2011/08/20 14:55] (current) 88.159.114.99
Line 1: Line 1:
-====== Extending Linux support for Kirkwood SoC  ======+====== Linux support for Kirkwood SoCs  ======
  
-Repository: [[http://git.lacie-nas.org/?p=lacie-orion.git;a=summary|lacie-orion.git]]+===== Overview =====
  
-Here is a list of the LaCie machines based on Kirkwood SoC: +See our [[linuxlacie|LaCie Linux main page]].
- +
-  * LaCie d2 Network v2 +
-  * [[network_space_v2|LaCie Network Space (Max) v2]] +
-  * LaCie Internet Space v2 +
-  * [[2big_network_v2|LaCie 2Big Network v2]] +
-  * LaCie 5Big Network v2 +
-  * LaCie Wireless Space +
- +
-===== Overview =====+
  
 ===== To-do list ===== ===== To-do list =====
  
   * add power management support for Kirkwood SoCs.   * 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 SoC support for Orion 6082 (Network Space v1).
   * add support for Wireless Space.   * add support for Wireless Space.
Line 24: Line 13:
   * maybe add driver for hard disk GPIOs (presence and power).   * 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).   * 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 formatOne partition. +
- +
-  * Download [[ftp://lacie-nas.org/kernel/kirkwood/debian-installer-kirkwood/uImage-2.6.35-debian-installer|Image-2.6.35-debian-installer]], and rename as uImage on the usb key. +
-  * Download clunc at .... +
-  * Create a shell script with +
-<code bash> +
-#!/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 +
- +
-</code> +
- +
-  * 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: +
-<code> +
-./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 +
- +
-</code> +
- +
-  * after a moment, you can log in your nas with ssh on login 'installer'. The password is ''azerty'' +
-<code bash>ssh installer@192.168.1.9 +
-</code> +
-  +
- +
-==== 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 +
- +
-<code shell> +
-#!/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 +
- +
-</code> +
- +
-=== 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 [[ftp://lacie-nas.org/kernel/kirkwood/debian-installer-kirkwood/uImage-arm-kirkwood-2.6.35|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": +
- +
-<code bash> +
-#!/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 +
- +
-</code> +
- +
- +
-TODO+
  
 ===== Links ===== ===== Links =====
- 
-  * [[http://www.marvell.com/products/processors/embedded/kirkwood|Marvell Kirkwood SoC Data Sheets]] 
- 
linuxforkirkwoodsocs.1310761738.txt.gz · Last modified: 2011/07/15 22:28 by simon