Welcome! Log In Create A New Profile

Advanced

Debian on Action Tech SG200 and MI424WR-rev-I

Posted by veriqster 
Re: Debian on Action Tech SG200 and MI424WR-rev-I
July 31, 2021 11:34PM
bodhi,

OH, now the driver is naughty. I updated compat-wireless package and there is an oops message which I can't remove.
[   18.923140] mvneta f1074000.ethernet eth1: link up
[   18.939346] Unable to handle kernel NULL pointer dereference at virtual address 00000006
[   18.947478] pgd = c59c0000
[   18.950198] [00000006] *pgd=05c7d831, *pte=00000000, *ppte=00000000
[   18.956526] Internal error: Oops: 817 [#1] ARM
[   18.960989] Modules linked in: rtl8192ce rtl_pci rtl8192c_common pppoe ppp_async iptable_nat rtlwifi pppox ppp_generic nf_nat_ipv4 nf_conntrack_ipv6 nf_conntrack_ipv4 mac80211 ipt_MASQUERADE cfg80211 xt_time xt_tcpudp xt_tcpmss xt_statistic xt_state xt_recent xt_nat xt_multiport xt_mark xt_mac xt_limit xt_length xt_id xt_hl xt_helper xt_ecn xt_dscp xt_conntrack xt_connmark xt_connlimit xt_connbytes xt_comment xt_TCPMSS xt_REDIRECT xt_LOG xt_HL xt_DSCP xt_CT xt_CLASSIFY usbhid ums_usbat ums_sddr55 ums_sddr09 ums_karma ums_jumpshot ums_isd200 ums_freecom ums_datafab ums_cypress ums_alauda slhc nf_nat_irc nf_nat_ftp nf_nat nf_defrag_ipv6 nf_defrag_ipv4 nf_conntrack_rtcache nf_conntrack_irc nf_conntrack_ftp nf_conntrack iptable_raw iptable_mangle iptable_filter ipt_REJECT ipt_ECN ip_tables hid_generic crc_ccitt compat fuse hid evdev input_core ledtrig_usbdev ledtrig_oneshot xt_LED ledtrig_morse ledtrig_heartbeat ledtrig_gpio xt_set ip_set_list_set ip_set_hash_netiface ip_set_hash_netport ip_set_hash_netnet ip_set_hash_net ip_set_hash_netportnet ip_set_hash_ipportnet ip_set_hash_ipportip ip_set_hash_ipport ip_set_hash_ip ip_set_bitmap_port ip_set_bitmap_ipmac ip_set_bitmap_ip ip_set nfnetlink ip6t_REJECT ip6table_raw ip6table_mangle ip6table_filter ip6_tables x_tables msdos vfat fat isofs nls_utf8 nls_iso8859_1 nls_cp437 ipv6 arc4 crypto_blkcipher ledtrig_transient exfat
[   19.083783] CPU: 0 PID: 2539 Comm: hostapd Not tainted 3.14.79 #1
[   19.089905] task: c71ff420 ti: c5cb4000 task.ti: c5cb4000
[   19.095347] PC is at rtl_get_tcb_desc(rtlwifi/base.c)+0x68/0x6a8 [rtlwifi]
tcb_desc->hw_rate = txrate->hw_value;
[   19.100866] LR is at rtl92ce_tx_fill_desc(rtlwifi/rtl8192ce/trx.c)+0x17c/0x634 [rtl8192ce]
[   19.106989] pc : [<bf36a350>]    lr : [<bf3a6218>]    psr: 80000093
[   19.106989] sp : c5cb5a18  ip : c5cb5a48  fp : c5cb5a44
[   19.118518] r10: c7391720  r9 : 00000080  r8 : c58be7a0
[   19.123766] r7 : 00000000  r6 : c5c8def8  r5 : c7390b00  r4 : 00000000
[   19.130322] r3 : 00000000  r2 : 00000000  r1 : bf3740b8  r0 : c7390b00
[   19.136879] Flags: Nzcv  IRQs off  FIQs on  Mode SVC_32  ISA ARM  Segment user
[   19.144134] Control: 0005397f  Table: 059c0000  DAC: 00000015
[   19.149905] Process hostapd (pid: 2539, stack limit = 0xc5cb41b8)
[   19.156025] Stack: (0xc5cb5a18 to 0xc5cb6000)
[   19.160404] 5a00:                                                       c5c8dee0 c8805000
[   19.168622] 5a20: 00000000 c7391720 c58be7a0 00000000 00000000 00000000 c5cb5a94 c5cb5a48
[   19.176842] 5a40: bf3a6218 bf36a2f8 00000000 00000000 c5ed18a4 00000000 00000010 c5ed1b20
[   19.185060] 5a60: 058be7a0 00000080 c5ed1400 c7391720 c5c8dee0 c739b6fc c7390b00 c58be7a0
[   19.193279] 5a80: 00009e1c c8805000 c5cb5afc c5cb5a98 bf3982d4 bf3a60ac c5c8def8 00000000
[   19.201498] 5aa0: c5c8dee0 00000004 00000000 00000001 00000200 00000000 00000000 00000000
[   19.209716] 5ac0: 00000000 00000013 c7391758 01040200 c5cb5afc c7391720 000c8340 c7390b00
[   19.217936] 5ae0: c5ed1b28 c5ed1b20 c7391758 00000200 c5cb5b3c c5cb5b00 bf36df8c bf397fa4
[   19.226155] 5b00: 00098583 c7391720 c5ed140c c5ed1400 c5cb5b34 00000001 c5ed1000 00000100
[   19.234373] 5b20: c5ed189c 00000356 c5cb5bf4 c7390b00 c5cb5b5c c5cb5b40 bf2e4768 bf36de8c
[   19.242593] 5b40: c5ed189c c5ed140c c5ed1000 c5ed140c c5cb5b9c c5cb5b60 bf2fc128 bf2e46b4
[   19.250813] 5b60: c7390140 00000003 c5ed1000 c5ed1400 c5cb5b9c c5ed1428 c5ed1408 c7390000
[   19.259032] 5b80: c5ed1000 c5cb5ba0 c7390140 c71cd400 c5cb5c6c c5cb5ba0 bf2bce70 bf2fbebc
[   19.267251] 5ba0: bf374830 00000001 0000099e 00000000 c5c60620 c5c60660 c5c606fc c5c6070c
[   19.275469] 5bc0: c5c6071c 00000000 0000003a 00000061 0000000a 0000000a 0000000a 00000000
[   19.283687] 5be0: 00000064 00000002 c5c606d8 00000007 00000000 00000000 00000000 00000000
[   19.291904] 5c00: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[   19.300122] 5c20: 8e880000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[   19.308342] 5c40: c5cb5c6c bf2d13c0 bf2c8c14 c5c60600 c5c8d820 00000000 c5c60610 c71cd400
[   19.316560] 5c60: c5cb5ccc c5cb5c70 c02beec0 bf2bcb04 bf2c877c 00000000 c71f32a0 60ffaca6
[   19.324780] 5c80: 000009eb c5c60600 c5c60610 c5c60614 c71cd400 c7390000 c5ed1000 c786e000
[   19.333000] 5ca0: c028f1d0 c5c60600 c5c8d820 c02bec00 00000128 00000000 00000000 00000000
[   19.341218] 5cc0: c5cb5cec c5cb5cd0 c02be38c c02bec10 60000013 c044002c c5c8d820 c5c8d820
[   19.349437] 5ce0: c5cb5d04 c5cb5cf0 c02bebec c02be344 c786e000 c714f400 c5cb5d34 c5cb5d08
[   19.357655] 5d00: c02bdcfc c02bebd4 c5cb5e68 7fffffff 00000000 00000000 c5cb5f5c c5cb5dd8
[   19.365873] 5d20: c714f400 c5c8d820 c5cb5

8086k
Re: Debian on Action Tech SG200 and MI424WR-rev-I
August 26, 2021 12:39AM
Good news:
I have ported sg200's uboot to F660 and HGG420N. Now everything works fine. Everyone can compile it.
NOTE:
You must use 32bit linux to compile it

Github repo: https://github.com/msdos03/avanta-uboot-f660
https://github.com/msdos03/avanta-uboot-hgg420n

8086k



Edited 1 time(s). Last edit at 10/01/2021 03:52AM by 8086k.
Re: Debian on Action Tech SG200 and MI424WR-rev-I
October 27, 2021 10:26AM
@bodhi

I have done the patch to make mvneta support 88f6560. Your DTS need to be changed to use this patch, so I will post my F660 DTS. Please add my patch to your debian work.
I also proved that kernel DSA driver doesn't work with 88f6560 internal switch, so I dumped mvsw61xx from older openwrt and updated some newer features to it according to the commits. The driver and Kconfig/Makefile patches will be posted too.

All my work are done for kernel 5.10.75 . You may need to change it a bit.

This is a part of new log

[    1.230906] mvsw61xx 8.mvsw6171: Found MV88F6560 built-in at f1072004.mdio-bus-mii:08
[    1.238805] mvsw61xx 8.mvsw6171: Using indirect addressing
[    1.280684] Freeing unused kernel memory: 10240K
[    1.285943] Run /init as init process
[    1.673744] init: Console is alive
[    1.688883] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    1.724951] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    1.734181] ehci-fsl: Freescale EHCI Host controller driver
[    1.742897] ehci-orion: EHCI orion driver
[    1.747151] orion-ehci f1050000.ehci: EHCI Host Controller
[    1.752709] orion-ehci f1050000.ehci: new USB bus registered, assigned bus number 1
[    1.760570] orion-ehci f1050000.ehci: irq 26, io mem 0xf1050000
[    1.793361] orion-ehci f1050000.ehci: USB 2.0 started, EHCI 1.00
[    1.800053] hub 1-0:1.0: USB hub found
[    1.804555] hub 1-0:1.0: 1 port detected
[    1.811608] ehci-platform: EHCI generic platform driver
[    1.825381] usbcore: registered new interface driver usb-storage
[    1.834291] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    1.852006] init: - preinit -
[    2.046959] random: jshn: uninitialized urandom read (4 bytes read)
[    2.098701] random: jshn: uninitialized urandom read (4 bytes read)
[    2.125950] random: jshn: uninitialized urandom read (4 bytes read)
[    2.320836] mvneta f1070000.ethernet eth0: configuring for fixed/gmii link mode
[    2.329583] mvneta f1070000.ethernet eth0: Link is Up - 1Gbps/Full - flow control off
[    2.342898] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
Press the [f] key and hit [enter] to enter failsafe mode
Press the [1], [2], [3] or [4] key and hit [enter] to select the debug level
[    4.123332] random: fast init done
[    6.456132] mvneta f1070000.ethernet eth0: Link is Down
[    6.485345] procd: - early -
[    7.025707] procd: - ubus -
[    7.034205] urandom_read: 6 callbacks suppressed
[    7.034212] random: ubusd: uninitialized urandom read (4 bytes read)
[    7.082425] procd: - init -
Please press Enter to activate this console.
[    7.549173] kmodloader: loading kernel modules from /etc/modules.d/*
[    7.727844] urngd: v1.0.2 started.
[    7.809338] random: crng init done
[    7.874519] Loading modules backported from Linux version v5.10.68-0-g4d8524048a35
[    7.882137] Backport generated by backports.git v5.10.68-1-0-ga4f9ba32
[    7.963866] xt_time: kernel timezone is -0000
[    8.070164] PPP generic driver version 2.4.2
[    8.085118] NET: Registered protocol family 24
[    8.163264] pci 0000:00:02.0: enabling device (0140 -> 0143)
[    8.169165] rtl8192ce: Chip Version ID: B_CHIP_92C
[    8.183389] rtl8192ce: Using firmware rtlwifi/rtl8192cfw.bin
[    8.198828] rtlwifi: rtlwifi: wireless switch is on
[    8.249092] kmodloader: done loading kernel modules from /etc/modules.d/*
[   48.243880] mvneta f1070000.ethernet eth0: configuring for fixed/gmii link mode
[   48.251433] mvneta f1070000.ethernet eth0: Link is Up - 1Gbps/Full - flow control off
[   48.331021] br-lan: port 1(eth0) entered blocking state
[   48.336325] br-lan: port 1(eth0) entered disabled state
[   48.341849] device eth0 entered promiscuous mode
[   48.380845] br-lan: port 1(eth0) entered blocking state
[   48.386148] br-lan: port 1(eth0) entered forwarding state
[   49.283407] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready

8086k
Attachments:
open | download - avanta-net-fix.tar (77 KB)
Re: Debian on Action Tech SG200 and MI424WR-rev-I
October 27, 2021 03:51PM
8086k,

> I also proved that kernel DSA driver doesn't work
> with 88f6560 internal switch, so I dumped mvsw61xx
> from older openwrt and updated some newer features
> to it according to the commits. The driver and
> Kconfig/Makefile patches will be posted too.

No, you have not proven that the DSA driver does not work for this SoC. What you did is a work-around to bring back the old switch driver.

Sorry, this solution is not good enough for me to include it in the kernel. The right solution is, as a first step, solving the IRQ conflicts, to bring up the ethernet ports. And then the DSA driver would take over and initialize the DSA switch properly.

But please feel free to post whatever you'd like, in case others want to use it in their own boxes.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Debian on Action Tech SG200 and MI424WR-rev-I
October 28, 2021 09:28AM
bodhi,

You don't understand me, please have a look at the attachment. I have fixed the new MVNETA driver of 5.10 kernel(all the issues are fixed, including IRQ and GMII mode), not bringing back the old one, the patch is in the attachment. My MVNETA patch-work is tested good.

And I have also tested using my fixed mvneta driver with DSA driver using several different configs, I changed the identify code in DSA driver but it still doesn't work.

mvsw61xx is a switch driver not included in kernel. I only bring this back. And this driver works very well with no errors.

So I think you should include it in the kernel.

8086k
Re: Debian on Action Tech SG200 and MI424WR-rev-I
October 28, 2021 01:56PM
8086k,

If your patch for the IRQ works with the latest kernel, then the next step is the DTS nodes for the DSA switch.

The DSA driver was based from the old switch driver. So if the old switch driver works then the DSA driver should work. Just a matter of correct configuration is needed in the DTS.

See the example in the Linksys EA4500 DTS.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Debian on Action Tech SG200 and MI424WR-rev-I
October 29, 2021 04:51AM
bodhi,

My next step is to solve realtek driver issue. The wireless is more important than using dsa switch driver. Fixing that is almost useless.

8086k
Re: Debian on Action Tech SG200 and MI424WR-rev-I
October 29, 2021 04:08PM
@8086k,

OK. Sounds like we don't have the same goal, and are not in the same project.

-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: