Installing LEDE on NSA325

It's was ok now after reflashing with sysupgrade -n -p parameter thanks!

How to install LEDE to NSA325-v2 ???

Same method above they have the same hardware.

probably is not the same hardware...

There are the same though.

Hi the 4.9 kirkwood kernel from this pull request doesn't have the sata LED patch so I've copied the 210-enable-sata-port-specific-led-triggers.patch to 4.9-patches folder but I'm getting compilation errors instead. Honestly I don't know if I applied it correctly, do I need to apply or refresh the patches? if so how to do it thanks!

Yeah, you need to refresh the patch, kernel changed and who knows at what line number that line needs to be inserted now.

Since it's a one-liner it's probably faster to just follow the procedure for adding a new kernel patch and you add that line manually to the file as if you were making a new patch
This is the documentation about working with patches,
See specifically the "working with kernel patches" part.

Then you take the patch you just made with quilt and place it in the 4.9-patches folder. If you do that and it works (that's what I did myself to add the patch to kernel 4.4 so I'm confident it should work with 4.9 too), please send the patch to p-wassi too so he can update his PR.

NSA 325 is the same board. V1 and V2 only have a different plastic box.

@bobafetthotmail You seem to have some knowledge about this device. Can you fill in the missing information (bootloader, cores, serial, jtag, switch)?

done, also done the nsa310b

Great, thanks! :slight_smile:

I try this with my Dockstar

i change the bootparameters:

setenv mtdparts=mtdparts=orion_nand:0x0c0000(uboot),0x80000(uboot_env),0x7ec0000(ubi)
setenv bootargs_lede ''
setenv bootcmd 'run bootargs_lede; ubi part ubi; ubi read 0x800000 kernel; bootm 0x800000'
setenv console=console=ttyS0,115200
setenv ethaddr 10:7B:EF:00:00:00 (put your mac address instead of the example one)
setenv mtdids=nand0=orion_nand

I erase the ubi partition with
nand erase.part ubi

Then i boot
usb reset; fatload usb 0 0x800000 lockstar-initramfs-uImage; bootm 0x800000

This boot the device with LEDE

After this i do this on the command line:

cd /tmp
sysupgrade dockstar-squashfs-sysupgrade.tar

After restarting the device start the kernel but after +- 10 seconds the device restart automatic again and again

How can i resolve this. There is no extra information (or errors) what i can see on the display (after booting kernel).

This solution works well RAID not working after Update LEDE 17.01.0 final GoFlexNet

But it can't save something....

Dockstar has different flash partitions, so you need to adjust the mtdparts line accordingly for uboot
see here for the patch where that is set

the following should be the right command for dockstar, you should just need to change this in the uboot and it should boot up fine

setenv mtdparts=mtdparts=orion_nand:0x0xe0000(uboot),0x100000(u-boot environment),0x0x200000(second stage u-boot),0x0xfe00000(ubi)

Afaik, the "second stage uboot" is unused if you have flashed lede uboot as primary uboot. Stock uboot can't boot LEDE on ubi partitions.

if you want to flash LEDE uboot, flash the file .kwb file, not the img or bin files

WARNING people that want to flash on other kirkwood please check their flash partitions, see the patch for your device in this github folder first

Hi @bobafetthotmail, @gendouhydeist, @jongerenchaos

I had a Lenovo Iomega EZ Media & Backup Center with 1 bay, and I think it have similar hardware, and I want to know how I could try to install LEDE on it. Since this is a different device I created another thread about:

Raid is also working fine on NSA310.

@bobafetthotmail I have bought my 3rd NSA310. I would like to try install uboot and rootfs using original software (Just in case I have serial cable). I will follow this instruction but install uboot from Openwrt.,12381,12381#msg-12381
What about rootfs ? Is it possible to install at once both things (uboot anr rootfs) ?
My current structure of nand:

~ # cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00100000 00020000 "uboot"
mtd1: 00080000 00020000 "uboot_env"
mtd2: 00080000 00020000 "key_store"
mtd3: 00080000 00020000 "info"
mtd4: 00a00000 00020000 "etc"
mtd5: 00a00000 00020000 "kernel_1"
mtd6: 02fc0000 00020000 "rootfs1"
mtd7: 00a00000 00020000 "kernel_2"
mtd8: 02fc0000 00020000 "rootfs2"

Yes, but if you have bad blocks the installation will fail (break on boot). Booting the initramfs image and doing a sysupgrade will always work even if you have bad blocks.
Openwrt firmware is formatting with ubi first (and this deals with bad blocks), while uboot just flashes raw binaries.

@bobafetthotmail For uboot there needs to be 8 first "good" blocks. What about rootfs (basic no addtional packages) ? In my case:

~ # dmesg | grep -i 'bad'
Scanning device for bad blocks
Bad eraseblock 476 at 0x000003b80000
Bad eraseblock 557 at 0x0000045a0000
Bad eraseblock 720 at 0x000005a00000
Bad eraseblock 857 at 0x000006b20000
Bad eraseblock 861 at 0x000006ba0000

So maybe it is enough to install and than use sysupgrade ? Will sysupgrade also format using ubi ?
Original OS has (plus tools from,27280):

~ # flash_eraseall --help
Usage: flash_eraseall [OPTION] MTD_DEVICE
Erases all of the specified MTD device.

  -j, --jffs2    format the device for jffs2
  -q, --quiet    don't display progress messages
      --silent   same as --quiet
      --help     display this help and exit
      --version  output version information and exit
~ # ls tools/
busybox        e2fsck         flash_erase    fw_env.config  fw_printenv    fw_setenv      nanddump       nandwrite

I would like to try. If it fail I can always connect via serial and flash again.
What should be the syntax (offsets, partitions - partition structure in previous post) for :
/usr/sbin/flash_erase /dev/mtd0 0xc0000 1 ??
/usr/sbin/nandwrite -s 786432 /dev/mtd0 zyxel_nsa310b-squashfs-factory.bin ??

the ubi partition in openwrt should start at mtd2 in stock firmware, if you can flash from there it might work.
see this is the openwrt mtd partitions