As of version 3.5, support for the IB-NAS 6210/6220 is part of the mainline kernel. As all newly added ARM-based boards, it uses flattened device tree. These provide a description of the available hardware resources and their dependencies in a platform-neutral and portable way. Usually, the boot loader should provide such a description to the kernel in the form of a compiled device tree blob (dtb).
Since this requires a new and patched U-Boot, another possibility is described here: The kernel supports a compatibility mode, which allows to append the dtb to the kernel zImage. Such a kernel can be booted like a non-DT enabled kernel by an old boot loader and uses DT only internally.
The following table summarizes the usage of the GPIO pins as far as know to me:
|GPIO#||In/Out||Function||LED name/Key name|
|22||O||Red OS LED (master enabled through green power LED)||nas6210:red:os|
|23||I||Power button (high only after button has been pressed for approx. 3 seconds. Will stay high until next power cycle).||Not supported|
|24||O||Power off device|
|25||O||Green OS LED (Off state: dim green, On state: bright green)||nas6210:green:os|
|27||O||USB copy LED (red)||nas6210:red:usb_copy|
|28||I||Reset Button (rear)||KEY_RESTART|
|29||I||USB copy button||KEY_COPY|
The kernel allows you to use those via the kernel’s LED or input event interfaces. GPIO #24 is used to turn off the device. If you have used my previous non-DT enabled patch, please be aware that I renamed the „power“ LED to „os“ to reflect the label on the case.
Obviously, you should enable:
System Type --> Marvell Kirkwood Implementations
- RaidSonic IB-NAS6210, IB-NAS6220 (Flattened Device Tree) (CONFIG_MACH_IB62X0_DT)
Additionally, you will need some open firmware stuff:
Boot Options -->
- Flattened Device Tree support (is already selected when you select a DT enabled board)
- Use appended device tree blob to zImage (EXPERIMENTAL) (CONFIG_ARM_APPENDED_DTB)
- Supplement the appended DTB with traditional ATAG information (CONFIG_ARM_ATAG_DTB_COMPAT)
Device Drivers --> Device Tree and Open Firmware support
- Support for device tree in /proc (CONFIG_PROC_DEVICETREE)
To enable the serial console: (This is in addition to the 8250/16550 and serial console support you should generally have enabled for kirkwood.)
Device Drivers --> Character Devices --> Serial Drivers
- Serial port on Open Firmware platform bus (CONFIG_SERIAL_OF_PLATFORM)
To be able to set the MTD partitions of the NAND flash via the flattened device tree:
Device Drivers --> Memory Technology Device (MTD) support
- OpenFirmware partitioning information support (CONFIG_MTD_OF_PARTS)
In addition to the NAND flash support you should generally have enabled (
Device Drivers --> Memory Technology Device (MTD) support --> NAND Device Support --> NAND Flash support for Marvell Orion SoC (CONFIG_MTD_NAND_ORION))
Then, compile your kernel and modules as usual to get a zImage (If you use
make uImage, don’t use it yet!). Additionally, do a:
to obtain „arch/arm/boot/kirkwood-ib62x0.dtb“. Because we enabled CONFIG_ARM_APPENDED_DTB, we need to append the dtb to the zImage.
cat arch/arm/boot/kirkwood-ib62x0.dtb >> arch/arm/boot/zImage
Now you can proceed to install the kernel as usual (probably making an uImage from the zImage in the process).
The uImage looks like any pre-FDT kernel. Thus, the description in my page RaidSonic ICY BOX IB-NAS6210, my “new” SheevaPlug allows to boot it. If the partitions are laid out as described there:
setenv mainlineLinux yes
setenv arcNumber 3104
setenv bootargs_console console=ttyS0,115200
setenv bootargs_root 'root=UUID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx rootdelay=10'
setenv bootcmd_usb 'usb start; ext2load usb 0:1 0x00800000 /uImage; ext2load usb 0:1 0x01100000 /uInitrd'
setenv bootcmd 'setenv bootargs $(bootargs_console) $(bootargs_root); run bootcmd_usb; bootm 0x00800000 0x01100000'
Note that the
arcNumber is not relevant anymore, the actual board is identified by the appended DTB.
Booting the Kernel using an FDT capable U-Boot
I keep this for later…