Welcome! Log In Create A New Profile

Advanced

2023.04 U-Boot Kirkwood - ZyXEL NSA325

Posted by bodhi 
Re: 2023.04 U-Boot Kirkwood - ZyXEL NSA325
May 20, 2024 05:45PM
AleXSR700 Wrote:
-------------------------------------------------------
> Quick question: is this only for NSA325 or also
> the NSA325v2?

Yes, it is for both. The NSA325 and NSA325v2 are basically identical. Only the form factor is different.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: 2023.04 U-Boot Kirkwood - ZyXEL NSA325
May 22, 2024 09:40PM
Hi bodhi - My NSA325 returns the following for the command "cat /etc/fw_env.config"

# MTD device name Device offset Env. size Flash sector size Number of sectors
# NAND example
/dev/mtd1 0x0000 0x20000 0x20000 4


cat /proc/mtd returns

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"


dmesg | grep -i 'bad' returns nothing

Can I move forward with the flashing? Thank you for your help!
Re: 2023.04 U-Boot Kirkwood - ZyXEL NSA325
May 23, 2024 12:18AM
n325,

> Hi bodhi - My NSA325 returns the following for the
> command "cat /etc/fw_env.config"
>
> # MTD device name Device offset Env.
> size Flash sector size Number of
> sectors
> # NAND example
> /dev/mtd1 0x0000 0x20000 0x20000 4

>
> cat /proc/mtd returns
>
> 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"

>
> dmesg | grep -i 'bad' returns nothing

Are you running stock u-boot? and running Debian on USB or HDD rootfs?

Please post output of
dmesg
So I can see the complete picture, before I can advise further.

If you have serial console, then post the serial entire boot log (no need to post dmesg if you do this).

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: 2023.04 U-Boot Kirkwood - ZyXEL NSA325
May 23, 2024 08:52AM
I believe it's the stock u-boot. Here is the output from dmesg.

,0x2FC0000(rootfs1),0xA00000(kernel_2),0x2FC0000(rootfs2) root=/dev/nfs rw init=/init
PID hash table entries: 2048 (order: 11, 8192 bytes)
Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
Memory: 512MB = 512MB total
Memory: 506752KB available (5360K code, 302K data, 2872K init, 0K highmem)
Hierarchical RCU implementation.
NR_IRQS:128
Console: colour dummy device 80x30
Calibrating delay loop... 1599.07 BogoMIPS (lpj=7995392)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
NET: Registered protocol family 16
Feroceon L2: Enabling L2
Feroceon L2: Cache support initialised.
invoking softwareStaggeredSpinUp()..., it will delay 5 seconds to spin up the second harddisk
Re: 2023.04 U-Boot Kirkwood - ZyXEL NSA325
May 23, 2024 02:04PM
So your system is all stock.

Yes you can install new u-boot and Debian rootfs.

But I would recommend to connect serial console during installation to make sure you can have a recovery path, in case something goes wrong.

Quote
Installation Steps
A. Preparation

A.1. UART booting

It is strongly recommmended that you try to run kwboot to test this boot image with UART booting before flashing to NAND. This is the rescue path when and if the flashing goes wrong for some reason. See example here. And to download latest ARM kwboot binary for UART booting see here.

Of course, you can do it blind, but prepare to connect serial console if you cannot boot after installation. And remember to keep the log of the entire session (on the terminal) when you flash u-boot and prepare the rootfs.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: 2023.04 U-Boot Kirkwood - ZyXEL NSA325
May 23, 2024 03:09PM
Thank you. I do have access to a serial console so will follow that approach.
Re: 2023.04 U-Boot Kirkwood - ZyXEL NSA325
May 26, 2024 07:53PM
I successfully competed the process and the device now booted into Debian. Thank you bodhi for your help!
Re: 2023.04 U-Boot Kirkwood - ZyXEL NSA325
May 27, 2024 01:56PM
Cool!

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: 2023.04 U-Boot Kirkwood - ZyXEL NSA325
May 28, 2024 02:39PM
I found the following services failed. How can I fix these services?

root@debian:/# systemctl list-units --failed
UNIT LOAD ACTIVE SUB DESCRIPTION
* cockpit.service loaded failed failed Cockpit Web Service
* systemd-journal-flush.service loaded failed failed Flush Journal to Persistent Storage
* systemd-journald.service loaded failed failed Journal Service
* systemd-logind.service loaded failed failed User Login Management
* systemd-udevd.service loaded failed failed Rule-based Manager for Device Events and Files
* systemd-journald-dev-log.socket loaded failed failed Journal Socket (/dev/log)
* systemd-journald.socket loaded failed failed Journal Socket
* systemd-udevd-control.socket loaded failed failed udev Control Socket
* systemd-udevd-kernel.socket loaded failed failed udev Kernel Socket

LOAD = Reflects whether the unit definition was properly loaded.
ACTIVE = The high-level unit activation state, i.e. generalization of SUB.
SUB = The low-level unit activation state, values depend on unit type.
9 loaded units listed.
Re: 2023.04 U-Boot Kirkwood - ZyXEL NSA325
May 28, 2024 03:45PM
> I found the following services failed. How can I
> fix these services?

This basic rootfs init system is sysvinit.

Are you running systemd? If you have not set up for systemd then you can use uEnv.txt to run it

It was mentioned in the installation instruction.

Quote
https://forum.doozan.com/read.php?2,12096

Note 5 (Optional):

Note 5.1. To boot with systemd

After loged into Debian, run:

apt-get install systemd
And then add parameter init=/usr/bin/systemd to your u-boot env bootargs.

- For example,
fw_setenv set_bootargs 'setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 $mtdparts init=/usr/bin/systemd'

- Or, if you are booting with my latest u-boot images you can also use the uEnv.txt capability to do this. In the default envs, custom_params is a variable that allows you to add extra bootargs. So add the following line to uEnv.txt:
custom_params=earlyprintk=serial init=/usr/bin/systemd

While in Debian,
cd /boot
echo "custom_params=earlyprintk=serial init=/usr/bin/systemd" > uEnv.txt
sync

And reboot.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: 2023.04 U-Boot Kirkwood - ZyXEL NSA325
May 28, 2024 04:41PM
bodhi Wrote:
-------------------------------------------------------
> > I found the following services failed. How can
> I
> > fix these services?
>
> This basic rootfs init system is sysvinit.
>
> Are you running systemd? If you have not set up
> for systemd then you can use uEnv.txt to run it
>
> It was mentioned in the installation instruction.
>
>
Quote
https://forum.doozan.com/read.php?2,12096
>
> Note 5 (Optional):
>
> Note 5.1. To boot with systemd
>
> After loged into Debian, run:
>
> apt-get install systemd
> And then add parameter init=/usr/bin/systemd to
> your u-boot env bootargs.
>
> - For example,
> fw_setenv set_bootargs 'setenv bootargs
> console=ttyS0,115200 root=LABEL=rootfs
> rootdelay=10 $mtdparts init=/usr/bin/systemd'
>
> - Or, if you are booting with my latest u-boot
> images you can also use the uEnv.txt capability to
> do this. In the default envs, custom_params is a
> variable that allows you to add extra bootargs. So
> add the following line to uEnv.txt:
> custom_params=earlyprintk=serial
> init=/usr/bin/systemd
>
>
> While in Debian,
>
> cd /boot
> echo "custom_params=earlyprintk=serial
> init=/usr/bin/systemd" > uEnv.txt
> sync
>
>
> And reboot.


Yes, I was running systemd. I actually upgraded to Debian 6.8.7 now and I don't see any failed services now. Thank you!
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: