Quotenielsek I'm booting from USB stick plugged in the front USB port (2.0). Whenever I plug it into the back USB ports, it will boot into failsafe. As mentioned above, and I can confirm that, only front USB 2.0 port is visible from U-boot. So if you keep your kernel and initrd on USB stick - you can only boot from the front 2.0. I mean kernel booting. System rootfs can be anywhere - attaby rr4m - Debian
I've recently found an interesting blog - a guy launches Debian on different Netgear NAS devices. The following article is about Debian on Netgear ReadyNAS 102 (Armada 370 based one). He also gathered Marvell's docs I was looking for (Armada 370 functional spec + Armada 370 hardware spec pdfs) - from those times when they were publicly available with no restriction, no registration aby rr4m - Debian
Quotebodhi Does anyone know how to enable SSH or telnet in stock OS without using serial console? There's a "universal_usb_key_func" toolkit. Download from here. It includes a script to enable telnet + README file inside. You can just launch your code from USB drive even without telnet. More documentation how usb_key_func.sh works. Quotebodhi BTW, one thing that we have notby rr4m - Debian
Fan control update. Turning it off also takes down the ethernet power :) Sooo, seems we won't have temperature regulation feature. Buzzer update - it works. fgrepping zyxel sources revealed some bits of info - trunk/build/fs.initrd/sbin/buzzer_beep.sh #!/bin/sh ## buzzer_beep.sh - beep N times usage() { echo echo -e "\033[031mUsage: `basename $0` &lby rr4m - Debian
Having a script for temperature would be cool! How I see it: 1. gpio0 pin24 must be set to 1 - let's call it 'Unlock fan control'. Can we add it to voltage regulators in dts with default value of 1 on boot? 2. gpio1 pin19 - we can add it to LEDs section, as 'nsa326:fan'. Then it would be possible to set it's 'brightness' to 1 (fan on), 0 (fan off), orby rr4m - Debian
Quotebodhi :) It does not seem to be a gpio-beeper. The Zyxel boxes seem to lack a conventional way to activate buzzer. I just unscrewed the box (another time) - it is a buzzer indeed, and it 'click-clack's :). Model HY-07 HYCOM, it's + pin is connected to MPP19 (GPIO0 pin19) Also - fan. Nas326 has 3-pin fan (GND, VCC, Sensor). There's way to turn it off and on - you neeby rr4m - Debian
I thought it might be my SanDisk Ultra Fit 32GB, yea - quite possible. --- Testing gpio-beeper (it's doesn't beep, but rather makes 'click-clack' sound - may be it's not a beeper at all?!): 1. Kernel config - add Input device support -> Miscellaneous devices -> Generic GPIO Beeper support 2.DTS - add below gpio-poweroff: beeper: beeper { compatiby rr4m - Debian
bodhi, thanks for update! I rebuilt 4.9.5 with new DTS, without mics.c patch. My setup - 2 HDD disks (/dev/sda, /dev/sdb) + USB flash drive with Ubuntu 16.04 ARMHF (/dev/sdc1, label=rootfs). 1. Plugged flash drive with rootfs into front USB - it boots without any problem - 4.9.5_front_usb_boot_success.txt While booting, if finds all drives (sda, sdb, sdc) and all partitions and passes the conby rr4m - Debian
bodhi, Quotebodhi Device drivers -> Power supply class support - can > enable/disable both Power and Reboot actions. > Are you sure that it is related to the buttons? Lemme check.... I'm wrong: Device Drivers -> Board level reset or power off -> GPIO power-off driver (this one is for front Power button + power off pin) - it's enabled in your config and worksby rr4m - Debian
Okay, final result - my version of kernel 4.9.5: +built with bodhi's linux-4.9.0-mvebu-tld-8.patch (includes latest armada-380-zyxel-nas326.dts) +hdd1 and hdd2 activity leds blink now (added 'linux,default-trigger = "ide-disk2";' into dts + enabled LED disk trigger in kernel config - Device Drivers -> LED Support -> LED Trigger Support -> LED Disk Trigger) +by rr4m - Debian
Let's control leds. List available: ls -1 /sys/class/leds nsa326:red:copy nsa326:red:sata1 nsa326:red:sata2 nsa326:red:sys nsa326:white:copy nsa326:white:sata1 nsa326:white:sata2 nsa326:white:sys nsa326:white:usb Turn on COPY RED LED > sudo -s # echo 1 >/sys/class/leds/nsa326\:red\:copy/brightness Turn off COPY RED LED # echo 0 >/sys/class/leds/nsa326\:red\:coby rr4m - Debian
4.9.5 kernel for NAS326 - see belowby rr4m - Debian
MTD write testing. NAS326 partition structure: # cat /proc/mtd dev: size erasesize name mtd0: 00200000 00020000 "U-Boot" mtd1: 00200000 00020000 "U-Boot env" mtd2: 00a00000 00020000 "Config" mtd3: 00f00000 00020000 "Kernel-1" mtd4: 06a00000 00020000 "RootFS-1" mtd5: 00f00000 00020000 "Kernel-2" mtd6: 06a00000 00020000 &qby rr4m - Debian
bodhi, thanks for assembling everything together. A bit of testing on my side. I wasn't able to boot zImage-4.9.0-mvebu-tld-8 directly (it doesn't have DTB attached, right?): Marvell>> ext2load usb 0:1 0x1000000 /zImage-4.9.0-mvebu-tld-8 4466616 bytes read in 567 ms (7.5 MiB/s) Marvell>> bootz 0x1000000 * kernel: cmdline image address = 0x01000000 Starting kerneby rr4m - Debian
bodhi, Ha-ha :) Exactly as expected - those 3 pins are in my INPUTS list. What's left - a proper DTS device tree config.by rr4m - Debian
Quotekralan I want to add these GPIOs to your collection: 20 poweroff system 53 hdd2 led white 54 hdd2 led red rr4m, can you share your GPIO findings? Okay, here it comes, NAS326 leds and pins: First we look at ARMADA370-FunctionalSpec-datasheet, page 1067, which says: DataOut Register GPIO_Num0: 0x00018100 GPIO_Num1: 0x00018140 Data Out Enable Control Register GPIO_Num0: 0by rr4m - Debian
Great! BTW - kernel. Recently I turned my NAS into openvpn client/server (with routing features). And found that our kernel config was lacking a lot of features (TUN/TAP was disabled, all netfilter stuff too) - so I recompiled that again, now sitting on patched 4.9.2. If anyone needs a kernel with tun/tap/iptables enabled - let me know, I'll share it (1 week uptime, no glitches so far).by rr4m - Debian
Hey bodhi! GPIO1 PIN 11 (or MPP43) controls USB power - it was found experimentally. As I wrote in my comment, GPIO address space on Armada 37x/38x is different from Kirkwood - and these GPIO addresses are declared in ARMADA370-FunctionalSpec-datasheet, page 1067 GPIO0 - f1018100 GPIO1 - f1018140 So, I sat down and started writing 0 and 1 to every general purpose in/out pin (using mw.lby rr4m - Debian
Quotebodhi Do you have an ARM box beside this NAS326? Nope, just that ZyXEL. +Arduinos for small projects. Quotebodhi When you run kwboot and eventually it is timed out by the NAS326 and it starts booting its own stock u-boot, how long is that T period? I'd say it's instant. Either I just power-on NAS326 or I run kwboot, then power-on NAS326 - it boots instantly. When I saw theby rr4m - Debian
bodhi, I think those @, ???, ?- are just voltage spikes on TX line when I plug in power, 95% sure they're not generated by board (because each time they're different or just absent). I even saw once: root@16041:~# ./kwboot.my -t /dev/ttyUSB0 ??????????<?%?????????? BootROM - 1.73 Booting from NAND flash Note regarding NAK. As far as I understand from docs, it works diffeby rr4m - Debian
Ok, found a minute to give kwboot a try, my steps: 1. Downloaded kwboot-tool.tar.gz x86_64 binary 2. Downloaded bodhi's u-boot-a38x-STG-328_2014_T3p6-nand-uart.bin 3. Setup Ubuntu 16.04.1 (virtualbox), connected FTDI232R UART to NAS326 and my linux, it detects as /dev/ttyUSB0, screen works, minicom works - no probs 4. Checking setup root@16041:~/kwboot-tool# uname -a Linux 16041 4.by rr4m - Debian
Confirm, kernels 4.9.1 and 4.10-rc2 have an updated /arch/arm/boot/dts/armada-38x.dtsi file. Compared to 4.8.15 (and older), spi0 { ... }; and spi1 { ... }; peripheral now declared outside of internal-regs { ... }; section. Seems they try to make flattened device tree a bit more flat :) Havent tried to build and run this yet, but should work IMO. Thanks to bodhi!by rr4m - Debian
Another kernel update for NAS 326, patch includes all previous improvements by hean01 and also: MTD partitions work now - /dev/mtdX are visible, you can read them, BUT WRITE IS NOT TESTED. Kernel uses armada370-nand driver (NOT armada-nand == mvebu_nfc, like original ZyXEL 3.10.39 kernel - they're quite different) Added 'nas328_compile_kernel.sh' script - just pass a fresh 4.xby rr4m - Debian