Home
Welcome to the ZyXEL NSA325 wiki. If you want to run a state-of-the-art Linux kernel on the ZyXEL NSA 325, read on!
Note: The repository nsa325-kernel will not be updated any more. Please use the repository nsa325-linux-upstream instead.
Tested and works:
- All LEDs (SATA1/SATA2/Copy Green/Red, System Green/Orange, USB Green)
- Network (Booting with NFS as root file system works)
- Shutdown using "Power off" GPIO
- Serial interface
- RTC (pcf8563)
- USB 2.0 (with "USB power enable" GPIO)
- USB 3.0 (xHCI controller)
- Buttons (Power, Copy, Reset)
- SATA (2 Ports)
- NAND flash
Currently unsupported:
- MCU
Other wiki pages:
Stock firmware U-Boot environment variables
Useful links:
Marvell Kirkwood 88F6281 SoC Hardware Spec and Functional Spec
The 88F6281 SoC is very similar to the 88F6282 on the NSA325. These documents contain memory and register maps, function descriptions and other useful low-level hardware related stuff:
http://www.marvell.com/embedded-processors/kirkwood/
Serial port pinout: http://zyxel.nas-central.org/wiki/Serial_port_%28NSA325%29
Connect TX, RX and GND to an LV-TTL (3.3V) <-> USB interface.
The U-Boot bootloader in the NSA325 supports loading a linux kernel image from an USB device (e.g. stick or hard drive). The image can be located on either an FAT or EXT2 file system. An USB device can unfortunately not be directly used with the stock bootloader settings, as the USB ports are powered off after system power on. The following instructions show how to enable USB power and boot from an USB device:
The internal registers of the CPU are memory-mapped, so lets enable LEDs and USB power by setting the appropriate register values. For more information see the 88F6281 functional specs, pages 762 ff. and the MPP GPIO map.
-
Enable USB led and USB power
Marvell>> mw.l f1010100 0020c000 -
(Optionally) Enable system led blinking
Marvell>> mw.l f1010108 10000000
Power to the USB ports is now enabled. Note: Only the USB 2.0 ports located on the back work in U-Boot. The USB 3.0 port at the front can not be used as a boot interface, as they are not directly connected to the processor.
-
Start USB subsystem
Marvell>> usb reset -
Load kernel image from FAT or EXT2 filesystem. This example loads the image from the first partition on the first device using filename "uImage".
Marvell>> fatload usb 0:1 $(loadaddr) uImage or Marvell>> ext2load usb 0:1 $(loadaddr) uImage -
Execute the kernel image
Marvell>> bootm $(loadaddr)
To permanently execute these steps on each power on:
Marvell>> setenv enable_usb 'mw.l f1010108 10000000; mw.l f1010100 0020c000'
Marvell>> setenv bootcmd_usb 'run enable_usb; usb reset; fatload usb 0:1 $(loadaddr) uImage; bootm $(loadaddr)'
Marvell>> setenv bootcmd 'run bootcmd_usb'
Marvell>> saveenv
-
Install debian package "u-boot-tools"
-
Setup /etc/fw_env.config
# MTD device name Device offset Env. size Flash sector size /dev/mtd1 0x0 0x20000 0x20000 -
Do stuff with fw_printenv/fw_setenv
-
Install debian package "acpid"
-
Setup files
/etc/acpi/events/button_power
event=button/power action=/bin/sh /etc/acpi/shutdown.sh/etc/acpi/shutdown.sh
#!/bin/sh echo timer > /sys/class/leds/nsa325:green:sys/trigger echo none > /sys/class/leds/nsa325:orange:sys/trigger /sbin/shutdown -h now "Power button pressed" -
Reload acpid configuration
/etc/init.d/acpid reload