F2-NAS2 and NSA325 contributions
Tony Dinh
mibodhi at gmail.com
Fri Jun 30 06:20:09 CEST 2023
Hi Henry,
On Thu, Jun 29, 2023 at 7:52 PM Henry Smith <henrybsee at gmail.com> wrote:
>
> Oh hello!
>
> Nice to hear from the person I wanted to contact. I based my work on
> your fork of the marvell repo.
> My priority is to get the new device into the tree so I don't lose it
> and other people can benefit. Please proceed at your own pace.
> Whatever you contributed to 2023 can be considered at a later time.
>
> I have a branch that compiles and boots on F2-NAS2 from TerraMaster.
> Powering the thing off, wakeup on a schedule and RTC is implemented
> through an extra uC, on/off button is not connected to the SoC I
> think.
On the NSA325, the Power button is connected to gpio1 14 (mpp 46). It
sounds like the F2-NAS2 is using the UART1 port for that purpose
instead. I came across a few boards like that.
> This uC is most likely connected to SoC via UART1 and receives
> commands from a small daemon controlled by a tiny client program. I
> wanted to make sure this is not something that would prevent you from
> accepting a new board.
> It does turn on. Pressing the power button when the device is on shuts
> the power off after 5-10s. Time is never set either so I used ntp. Now
Don't know about the F2-NAS2 , but the NSA325 has RTC (PCF8563 chip),
and it is already supported by current u-boot.
> I see u-boot supports that as well but unsure if that would somehow
> get passed to the kernel with no real RTC. For these things to work,
> the serial commands would have to get deciphered and implemented in
> u-boot itself or the OS like it is in TOS from the vendor. I can try
> to do it or disassemble at a later time.
>
If there is no RTC on the F2-NAS2, you can use CONFIG_RTC_EMULATION
and CONFIG_CMD_SNTP. But rootfs will need fake-hwclock anyway..
All the best,
Tony
> czw., 29 cze 2023 o 21:01 Tony Dinh <mibodhi at gmail.com> napisał(a):
> >
> > Hi Henry,
> >
> > On Thu, Jun 29, 2023 at 6:53 PM Tony Dinh <mibodhi at gmail.com> wrote:
> > >
> > > Hi Heny,
> > >
> > > On Thu, Jun 29, 2023 at 6:01 PM Henry Smith <henrybsee at gmail.com> wrote:
> > > >
> > > > Hello,
> > > >
> > > > I'm a hobbyist that has been playing with Linkstation LS-WVL years
> > > > ago. After frying UART on that, I got Terramaster F2-NAS2 later and
> > > > got u-boot from the main tree to work on it.
> > > >
> > > > Both landed in the closet until I dug up F2-NAS2 recently. My original
> > > > source code modifications and images were nowhere to be found so I
> > > > started from scratch.
> > > >
> > > > First tried to compile and run every defconfig available that uses Kirkwood SoC:
> > > > u-boot # for config in $(grep -i kirkwood ./configs -r | cut -d ":"
> > > > -f1 | cut -d "/" -f3 | sort -u); do make clean; make distclean;
> > > > ARCH=arm CROSS_COMPILE=arm-none-eabi- make $config && ARCH=arm
> > > > CROSS_COMPILE=arm-none-eabi- make -j64; echo $config; read; done
> > > >
> > > > Unfortunately, that didn't work. Then I saw the following:
> > > > "...By the way this box is a close cousin of the NSA325 (Kirkwood)..."
> > > > Source:
> > > > https://forum.doozan.com/read.php?3,49804,49964#msg-49964
> > > >
> > > > With that in mind, I've found the first compiled version I could lay
> > > > my hands on:
> > > > https://forum.doozan.com/read.php?3,12381
> > > > Actual file:
> > > > https://bitly.com/2xnfGmv
> > > >
> > > > The file worked, here is the source:
> > > > https://github.com/mibodhi/u-boot-kirkwood
> > > >
> > >
> > > That is my Kirkwood u-boot GitHub for 2017.07. So it would not compile
> > > with current u-boot.
> > >
> > > > The thing didn't compile and threw errors about libfdt:
> > > > https://github.com/hardkernel/u-boot/issues/73
> > > >
> > > > This is when I started porting it to the main u-boot tree from that
> > > > fork. I got it to boot on Terramaster F2-NAS2.
> > > >
> > > > To continue, I have 2 questions:
> > > > 1) Original changes ported to the original tree were for NSA325. Can
> > > > somebody test them on their own box or that's not something you would
> > > > do?
> > >
> > > I've planned to add support to mainline u-boot for ZyXEL NSA325 board.
> > > But I've been busy for a while so have not got time to do it. I've
> > > already released the u-boot 2023.04. binary in doozan forum.
> > >
> > > https://forum.doozan.com/read.php?3,12381
> > > "2023.04 U-Boot Kirkwood - ZyXEL NSA325. This version adds the
> > > capability of booting with the rootfs attached to the USB 3.0 port in
> > > the front, among other capabilities"
> > >
> > > > 2) I have changes for Terramaster F2-NAS2 derived from #1 as well. How
> > > > do I submit them since the PR pointed me to the mailing list:
> > > > https://github.com/u-boot/u-boot/pull/326
> > >
> > > Perhaps, you could wait until I send the NSA325 patch to this ML. And
> > > then use that as a template to create the patch for F2-NAS2? We only
> > > submit patches using the mailing list. And the patch will be reviewed
> > > by Stefan and/or others. Of course it's up to you, but I think it
> > > might be best that we could collaborate.
> > >
> > > All the best,
> > > Tony
> > >
> > > >
> > > > Please do not look at the changes in the PR, they are old and
> > > > irrelevant. I will close or update it, depending on what I hear back.
> > > >
> > > > Best,
> > > >
> > > > - Henry
> >
> > Sorry I've misspelled your name previously :) And also just to let
> > you know that I'll be quite occupied with work in the next several
> > weeks, so I might not be able to follow up right away.
> >
> > All the best,
> > Tony
More information about the U-Boot
mailing list