Welcome! Log In Create A New Profile

Advanced

Debian on Action Tech SG200

Posted by veriqster 
Re: Debian on Action Tech SG200
February 24, 2019 06:22PM
how hard would be to do that given that I have the config for the kernel and the fact that I've never done this before?

Is there anything I can do to get over that init message about no processes left?
Re: Debian on Action Tech SG200
February 25, 2019 12:09AM
> Is there anything I can do to get over that init
> message about no processes left?

At this point, hit <Enter/Return> key on your keyboard. I'd exepect it will drop you to the Linux shell, and you will be in stock OS.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Debian on Action Tech SG200
February 25, 2019 07:32AM
it does not, just sits idle.

If I try to use the stock kirkwood rootfs with the generated uImage then it boots to a point and then states "attempted to kill init" and "kernel too old".

Unless I can find a guide on how to make a DTS file it is my guess that this is a futile attempt at finding shortcuts.
Re: Debian on Action Tech SG200
February 26, 2019 03:20PM
veriqster,

> If I try to use the stock kirkwood rootfs with the
> generated uImage then it boots to a point and then
> states "attempted to kill init" and "kernel too
> old".

Yes, it make sense to see "kernel too old".

>
> Unless I can find a guide on how to make a DTS
> file it is my guess that this is a futile attempt
> at finding shortcuts.

Unlike other SoCs such as Kirkwood, Dove, or Armada, which all have a reference board in mainline. This is a new SoC. Therefore it would take me quite a bit of time to create the DTS. So I can't promise to help you doing that, unless I have a big chunk of free time (I already have some other tasks lined up and could not get to those yet :)

With that said, if I can find a board of this Avanta SoC that pikes my interest, no telling if I'll stay up all night working on it :))

-bodhi
===========================
Forum Wiki
bodhi's corner



Edited 1 time(s). Last edit at 02/26/2019 11:41PM by bodhi.
Re: Debian on Action Tech SG200
March 08, 2019 09:02AM
I can mail you mine if it's something you are willing to look at.
Not sure I'm seeing things the right way but It has an integrated N wireless and a Z wave so it might make an interesting box to play with for home automation.
Re: Debian on Action Tech SG200
March 08, 2019 07:39PM
veriqster,

Sorry, I have no free time to look at it anyway :)

But keep your box on the shelf, if you got it cheap, don't sell it.

-bodhi
===========================
Forum Wiki
bodhi's corner



Edited 1 time(s). Last edit at 03/09/2019 04:27AM by bodhi.
winnt5
Re: Debian on Action Tech SG200
January 05, 2021 05:22AM
hi ,I have a pon modem with 88f6560.I have find a dts file on 88f6560.It is from a close source branch of openwrt called pandorabox.I can get the dts file but can't get any kernel source code.Can you tell me the download site of the newest kernel which can run on the device?I will try my best to build it.
Re: Debian on Action Tech SG200
January 05, 2021 04:37PM
winnt5,

> It is from a close source
> branch of openwrt called pandorabox.I can get the
> dts file but can't get any kernel source code.Can
> you tell me the download site of the newest kernel
> which can run on the device?I will try my best to
> build it.

I am surprised that there is such a close source branch of OpenWrt. How did they get way with that? must be that they used the GPL source as is, and did some hacks to run their code independently.

See my response on another post about this Avanta SoC:

https://forum.doozan.com/read.php?3,112689,112764#msg-112764

Basically, there is no modern open source kernel for this SoC (there is open source 2.6.x kernel, though). The DTS is only a small part of what is need to run the kernel for this box. So I don't think it is possible to build a new kernel for this box without spending some serious time to add the supports for this Avanta SoC in mainline kernel source tree.

-bodhi
===========================
Forum Wiki
bodhi's corner
bkallus
Re: Debian on Action Tech SG200
January 10, 2021 07:28PM
Here's a repository with the dts files. I got them originally from the pandorabox imagebuilder located here.

https://github.com/kenballus/mi424wr-rev-i-dts
Re: Debian on Action Tech SG200
January 10, 2021 08:10PM
Wow, that's an interesting hack :).

Later, I got to compare with the Kirkwood DTS to see how Claudio Leite came up with the difference! It must be from info Claudio extracted from the open source u-boot.

For now, if this is the version they use to run pandorabox then it is not too difficult to make it work with Kirwood kernel.

Let me recompile it it the Kirkwood kernel and post the DTB with some instruction we already got in previous working session with veriqster.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Debian on Action Tech SG200
January 11, 2021 12:55AM
Looks like these DTS/DTSI files are quite old so it did not compile right away. I'll need to bring them up to the latest kernel bindings.

Also I need to add the DSA switch.

-bodhi
===========================
Forum Wiki
bodhi's corner



Edited 1 time(s). Last edit at 01/11/2021 03:54AM by bodhi.
Re: Debian on Action Tech SG200
January 11, 2021 02:11AM
As an FYI the Google Fiber Network Box (GFRG110) also uses the same SoC (88F6560). Source code is available at https://storage.googleapis.com/google-code-archive-source/v2/code.google.com/gfiber-gfrg100/source-archive.zip. I don't currently have any time to look at it, but would be interested in helping in the future, I have the mentioned Google Fiber Network Box, an Actiontec MI424WR Rev I, 2x Actiontec SG200, and an Aruba Networks AP-134 that all use the same SOC.

ray
Re: Debian on Action Tech SG200
January 11, 2021 03:50AM
Thanks Ray!

I often forget things that I did not spend time to do research :)

That'll certainly make it more interesting, and also worthwhile to get it working with the latest kernel.

-bodhi
===========================
Forum Wiki
bodhi's corner
bkallus
Re: Debian on Action Tech SG200
January 11, 2021 09:19AM
The Google Fiber firmware is OpenRG based on a 2.6 kernel, so the same as the MI424WR Rev. I. Aruba Networks doesn't post their GPL code publicly, but you can request it here: dl-gplquery@arubanetworks.com. (Or send HP a letter with $10.00 in it) Hopefully the Aruba Networks firmware is based on something more modern.
bkallus
Re: Debian on Action Tech SG200
January 11, 2021 10:03AM
I requested the GPL code from Aruba Networks. As far as I can tell, this is the list of all known devices using the 88F6560 (or anything avanta?)
  • Actiontec MI424WR Rev. I
  • Google Fiber Network Nox GFRG110
  • Actiontec SG200
  • Aruba Networks AP-134
  • Aruba Networks AP-135
  • ZTE ZXA10 F660
  • ZTE ZXA10 F460

I registered on Aruba Networks's website and downloaded one of their firmware updates for the AP-134. I've extracted the filesystem from it, but I'm not sure how to determine the kernel version from the filesystem. Any suggestions? I also emailed their GPL request address to request the source code for this firmware. It appears that they no longer advertise that email address, so if it turns out that this is a modern kernel, I might have to shell out that $10!
bkallus
Re: Debian on Action Tech SG200
January 11, 2021 03:19PM
Sorry to triple-post, but it looks like the newest Aruba Networks firmware that supports the AP-134 and AP-135 is based on kernel 2.6.32.11. (Found this by doing modinfo on one of the kernel modules in /lib/modules) I guess I won't be paying $10 after all.

The ZTE stuff is really hard to track down. I can't find an update image anywhere online. As for getting their kernel sources, I made an account on their website, but I still don't have permission to visit their open source portal. Apparently it takes a couple days.

So that's it. The only official firmwares I can find for this SoC have a 2.x kernel, and the only people who have gotten anything newer working is the PandoraBox team (+ Claudio Leite?).
Re: Debian on Action Tech SG200
January 11, 2021 05:08PM
bkallus,

> I requested the GPL code from Aruba Networks. As
> far as I can tell, this is the list of all known
> devices using the 88F6560 (or anything avanta?)

> I'm not sure how to determine the kernel version
> from the filesystem.

Look at the boot files /boot/*, most of the time they have the kernel files on this folder. Or do a strings on the uImage file

strings uImage | grep  Linux

> it turns out that this is a modern kernel, I might
> have to shell out that $10!

No need to buy it if you don't have the actual hardware. Once we got the new DTS running with the Kirkwood kernel, it should be feasible for all Avanta boxes to have a slight variation of the Actiontec SG200 DTS.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Debian on Action Tech SG200
January 11, 2021 05:14PM
Here is the new DTB (with modified DTS files).

I will update this post with u-boot envs needed to boot this box.

For now, the first step is

1. Create a USB rootfs using Debian-5.2.9-kirkwood-tld-1-rootfs-bodhi.tar.bz2 from the release thread:

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

And do Step 4 as followed


Quote

4. Create uImage with embedded DTB for booting with older u-boots (2012 or earlier). Do not do this step if you have installed the latest U-Boot for Kirkwood (or are installing this u-boot at the same time).

Please replace kirkwood-goflexnet.dtb below with the correct DTB name for your box (see the folder /media/sdb1/boot/dts for the exact spelling of your Kirkwood box name).

Generate the uImage with DTB embedded inside:
cd /media/sdb1/boot
cp -a zImage-5.2.9-kirkwood-tld-1 zImage.fdt
cat dts/avanta-mi424wr.dtb >> zImage.fdt
mv uImage uImage.orig
mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n Linux-5.2.9-kirkwood-tld-1 -d zImage.fdt uImage
sync

2. Set up u-boot envs to boot this box

setenv usb_set_bootargs 'setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 earlyprintk=serial'
setenv load_uimage 'ext2load usb 0:1 0x800000 /boot/uImage'
setenv load_uinitrd 'ext2load usb 0:1 0x2100000 /boot/uInitrd'
setenv usb_boot 'run load_uimage; if run load_uinitrd; then bootm 0x800000 0x2100000; else bootm 0x800000; fi'
setenv usb_bootcmd 'run usb_set_bootargs; run usb_boot'
setenv bootcmd 'usb start; run usb_bootcmd; usb stop; reset'
And then,
printenv
boot

-bodhi
===========================
Forum Wiki
bodhi's corner



Edited 1 time(s). Last edit at 01/11/2021 11:41PM by bodhi.
Attachments:
open | download - avanta-mi424wr-dts.tar (30 KB)
bkallus
Re: Debian on Action Tech SG200
January 11, 2021 11:03PM
I'm working on booting it now, but I'm still running into some difficulties mounting the rootfs. The uBoot that ships with the mi424wr supports usb booting, but when I try to usb boot I get an issue with mounting the rootfs. I'm assuming this is something I'm doing wrong, and not something with the build. What should I do differently?

The output from booting
Re: Debian on Action Tech SG200
January 11, 2021 11:42PM
bkallus,

Actually it looks quite good that you got that far!


See Step 2 in the revised instruction above:

https://forum.doozan.com/read.php?2,78499,113894#msg-113894

-bodhi
===========================
Forum Wiki
bodhi's corner
bkallus
Re: Debian on Action Tech SG200
January 12, 2021 12:44AM
Thanks!

In trying to reset some old environment variables, I used resetenv, and now when I boot I get this message:
*** Warning - bad CRC or NAND, using default environment
Hopefully that's not too much of a problem.

Anyway, setting load_uimage from step 2 gave me a little issue because I guess using if/then/fi is not supported in this version of U-Boot. Instead, I just did this:
setenv usb_boot 'run load_uimage; run load_uinitrd; bootm 0x800000 0x2100000'
...and it worked!!

Here's the boot output.

It's also worth noting that U-Boot wouldn't recognize any of my USB drives unless they were ext2 formatted.
Re: Debian on Action Tech SG200
January 12, 2021 04:21PM
bkallus,

> In trying to reset some old environment variables,
> I used resetenv, and now when I boot I get this
> message:
> *** Warning - bad CRC or NAND, using
> default environment
> Hopefully that's not too much of a problem.

That is bad! there are 2 commands in u-boot console that we should be very careful to avoid unless we need to use: saveenv and resetenv. These result in permanent update of the env area in flash. Usually, 1) never use resetenv, and 2) use saveenv only afer a lot of testing.

So in this case, at the next boot, the envs in NAND were considered corrupted. The internally defined envs in this u-boot were used as a fallback.

> Anyway, setting load_uimage from step 2 gave me a
> little issue because I guess using if/then/fi is
> not supported in this version of U-Boot. Instead,
> I just did this:
>
> setenv usb_boot 'run load_uimage; run
> load_uinitrd; bootm 0x800000 0x2100000'
>
> ...and it worked!!

Cool!

> It's also worth noting that U-Boot wouldn't
> recognize any of my USB drives unless they were
> ext2 formatted.

That's strange. It should not matter. This u-boot is not that old. Unless Actiontec intentionally disabled it, Ext2 and Ext3 should be the same code in u-boot.

I'll take a look at the log.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Debian on Action Tech SG200
January 12, 2021 05:06PM
bkallus,

Excellent!

There are issues (that I expected to see). But overall the boot is quite good. So a would-be Avanta kernel is very similar to the Kirkwood kernel (which makes sense because it is the same ARM core, iirc).

In fact, it can be run this way permanently. The only thing that is awkward is that while it is a good patch, we have not yet integrated fully its own Arch in the source tree. And the kernel name is Kirkwood.

- need mtds definition in the bootargs.

- Need to adjust the DTS to activate Ethernet properly. And a question is why Armada mvneta driver is used in Claudio dtsi (instead of mv643xx for Kirkwood). I need to look at the network chip.

- Need to fix the crypto driver exception (not very important).

-bodhi
===========================
Forum Wiki
bodhi's corner
bkallus
Re: Debian on Action Tech SG200
January 12, 2021 06:41PM
> That is bad! there are 2 commands in u-boot console that we should be very careful to avoid unless we need to use: saveenv and resetenv. These result in permanent update of the env area in flash. Usually, 1) never use resetenv, and 2) use saveenv only afer a lot of testing.

I have a backup of the original uboot environment variables if I need to restore, but I did a saveenv (risky!) after setting the variables in step 2, and the bad CRC message went away.

> - Need to fix the crypto driver exception (not very important).

The crypto driver exception happens repeatedly for the first few minutes after the system boots, and then stops.

Also, I accidentally unplugged the router without powering it off, and when I went to boot it up again, it found and repaired disk errors with fsck (as expected). What I didn't expect was that I got an error saying "Cannot restart, system-controller not available: check the device tree" (bootlog)

Overall, I am super impressed with this build. Other than these minor issues, the system works flawlessly. Great job!
bkallus
Re: Debian on Action Tech SG200
January 12, 2021 06:53PM
Also, when I logged out over serial by pressing ctrl-d, I got this error.
Re: Debian on Action Tech SG200
January 12, 2021 10:53PM
> I have a backup of the original uboot environment
> variables if I need to restore, but I did a
> saveenv (risky!) after setting the variables in
> step 2, and the bad CRC message went away.

Yes, that fixes the CRC error, since a fresh new set of envs was saved, u-boot generated a new CRC for it.

> The crypto driver exception happens repeatedly for
> the first few minutes after the system boots, and
> then stops.

The crypto issue needs to be looked at eventually. marvell-cesa is supported in Kirkwood, and Armada, so most likely is supported in Avanta. But we don't have the data sheet (reference manual) for this Avanta SoC so cannot confirm it, atm.

>
> Also, I accidentally unplugged the router without
> powering it off, and when I went to boot it up
> again, it found and repaired disk errors with fsck
> (as expected). What I didn't expect was that I got
> an error saying "Cannot restart, system-controller
> not available: check the device tree"
> (bootlog)

Usually the restart driver should work for all the SoC in the same family (e.g. Marvell). In some rare instance like this, do a normal reboot a few times and observe serial console during that time to see if there is any glitches.

> Also, when I logged out over serial by pressing ctrl-d, I got this error.

It happens a lot with the serial interrupt IRQ when we abort the session abnormally. You can test it with using picom/minicom as serial console server, and do Control-A-X to exit, and then run picocom again to see it resumes connection. If there is no error with picocom, then I'd say it is nothing to worry about.

-bodhi
===========================
Forum Wiki
bodhi's corner



Edited 1 time(s). Last edit at 01/12/2021 11:15PM by bodhi.
bkallus
Re: Debian on Action Tech SG200
January 12, 2021 11:49PM
Upon further inspection, it seems like the router can't ever reboot. If i run "reboot", I get the same error that I posted above, and then there's no more output over serial. Running "poweroff" works fine, though, so it's not a problem for me.

(bootlog)
Re: Debian on Action Tech SG200
January 13, 2021 01:32AM
> Upon further inspection, it seems like the router
> can't ever reboot. If i run "reboot", I get the
> same error that I posted above, and then there's
> no more output over serial. Running "poweroff"
> works fine, though, so it's not a problem for me.

Yes. It is a low priority item on our list.

Most important issue is Ethernet. And the Marvell DSA switch.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Debian on Action Tech SG200
January 13, 2021 04:07AM
The 88F6560 has a built in PHY if I recall correctly. On the MI424WR rev I and the Google GFRG110 the switch in the 88F6560 uses the Marvell 88E1545 PHY. The SG200 has only 1 Ethernet port, so uses the internal PHY. The Aruba AP-134 has 2 Ethernet ports and uses the 88E1540 PHY.
Re: Debian on Action Tech SG200
January 13, 2021 03:49PM
We will need 3 different DTSs, one for each box.

The MI424WR rev I is the most complicate among the 3. Since it has 4 ports and use the Marvell DSA switch. The other 2 are simpler, just a normal Ethernet port.

-bodhi
===========================
Forum Wiki
bodhi's corner
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: