Home Forum Software discussion Kernel vanilla

This topic contains 20 replies, has 6 voices, and was last updated by  alpha_one_x86 2 weeks ago.

Viewing 15 posts - 1 through 15 (of 21 total)
  • Author
    Posts
  • #6830

    alpha_one_x86
    Participant

    Hi,

    How compile the vanilla kernel, in best I have that’s:
    https://pastebin.com/VVPHNPKC
    why ethernet/SFP+ is not detected?
    ifconfig -a show nothing

    Cheers,

    #6831

    kelledin
    Participant

    Currently I’m running vanilla 4.16.15 and have eth0-eth2 functional (at least as far as the RJ45 ports; I haven’t tried it with SFP+ modules yet, but I’ll get to that sooner or later). I know for certain you need CONFIG_MVPP2 and CONFIG_PHY_MVEBU_CP110_COMPHY enabled for the ethernet ports to show up (the COMPHY requirement is not obvious–but since it has SFP sockets, it is necessary).

    This is a little different than the last Macchiato BSP I tried; IIRC the 4.4 kernel from back then included a specialized add-on MVPP driver.

    You *might* also need CONFIG_OF_MDIO, CONFIG_MVMDIO, and CONFIG_MDIO_I2C enabled. If you like I can toss you my kernel .config, but I turned on a LOT of extra options just to see what all would build with my current compiler setup.

    #6832

    alpha_one_x86
    Participant

    Hi,
    Thanks, now the rj45 port work.
    for the SFP+ with direct attach:
    [ 293.143884] mvpp2 f2000000.ethernet eth0: cannot connect to phy
    [ 293.154107] mvpp2 f2000000.ethernet eth0: cannot connect to phy
    [ 304.591208] mvpp2 f4000000.ethernet eth1: cannot connect to phy
    [ 304.601483] mvpp2 f4000000.ethernet eth1: cannot connect to phy
    Work with official kernel. And I need the SFP+.

    Cheers,

    #6833

    alpha_one_x86
    Participant

    With official, I don’t have firewall, I can’t compile from source, see:
    https://github.com/MarvellEmbeddedProcessors/linux-marvell/issues/13

    #6843

    hchenji
    Participant

    Can you please send me your .config if you got it to boot?

    Also, try the latest .18-RC5, it has SFP cage support. marvell linux just hardcodes the phy bit rate.

    https://patchwork.kernel.org/patch/10380619/

    #6844

    alpha_one_x86
    Participant

    https://pastebin.com/mkM42nGi
    With .18 kernel.
    The problem start when I disable USB, HID, … well all the module not used into router.

    I load this config into vanilla kernel, I add the http://macchiatobin.net/forums/topic/kernel-vanilla/#post-6831
    disable too the not needed module, …

    I was always access to debug port.

    #6852

    kelledin
    Participant

    Ah well…I’m now getting back to this. Finally picked up some SFPs and a Mikrotik switch.

    FYI the closest to mainline kernel work to get this going is on Russell King’s “mcbin” branch (based off 4.17.0), accessible here:

    http://git.armlinux.org.uk/cgit/linux-arm.git

    I pulled his changeset and forward-ported it to 4.17.10. This took a few changes, mainly to support the new mac_link_up()/mac_link_down() prototypes, plus removing his head.S changes to make the kernel bootable on my DoubleShot board. Aside from that, his current DTS changes hardcode the MAC addresses to some bogus defaults, and the end-result is not getting link-up on ANY of my eth ports. So definitely not production-ready. 🙁

    I’ll see what i can do to pitch in and help him out with this.

    #7056

    alpha_one_x86
    Participant

    With 4.18:
    [ 58.364030] mvpp2 f2000000.ethernet eth0: could not attach PHY (-19)
    [ 58.381763] mvpp2 f2000000.ethernet eth0: could not attach PHY (-19)
    [ 67.443146] mvpp2 f4000000.ethernet eth1: could not attach PHY (-19)
    [ 67.460872] mvpp2 f4000000.ethernet eth1: could not attach PHY (-19)
    root@localhost:~# ifconfig eth1 192.168.88.5 up
    SIOCSIFFLAGS: No such device
    SIOCSIFFLAGS: No such device

    The constructor kernel have stability issue.

    #7070

    alpha_one_x86
    Participant

    With the official kernel:
    /root/linux-marvell-linux-4.4.120-armada-18.09/drivers/usb/gadget/udc/udc-core.c:510: undefined reference toudc_detect’
    /root/linux-marvell-linux-4.4.120-armada-18.09/drivers/usb/gadget/udc/udc-core.c:510:(.text+0x1e5b24): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `udc_detect’
    drivers/built-in.o: In function `usb_gadget_probe_driver’:
    /root/linux-marvell-linux-4.4.120-armada-18.09/drivers/usb/gadget/udc/udc-core.c:536: undefined reference to `udc_detect’
    /root/linux-marvell-linux-4.4.120-armada-18.09/drivers/usb/gadget/udc/udc-core.c:536:(.text+0x1e5bd4): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `udc_detect’
    drivers/built-in.o: In function `xenon_probe_dt’:
    /root/linux-marvell-linux-4.4.120-armada-18.09/drivers/mmc/host/sdhci-xenon.c:392: undefined reference to `mv_soc_info_get_ap_revision’
    /root/linux-marvell-linux-4.4.120-armada-18.09/drivers/mmc/host/sdhci-xenon.c:392:(.text+0x271748): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `mv_soc_info_get_ap_revision’
    drivers/built-in.o: In function `xenon_emmc_phy_parse_param_dt’:
    /root/linux-marvell-linux-4.4.120-armada-18.09/drivers/mmc/host/sdhci-xenon-phy.c:680: undefined reference to `mv_soc_info_get_ap_revision’
    /root/linux-marvell-linux-4.4.120-armada-18.09/drivers/mmc/host/sdhci-xenon-phy.c:680:(.text+0x271c6c): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `mv_soc_info_get_ap_revision’
    make: *** [Makefile:961: vmlinux] Error 1`

    #7082

    alpha_one_x86
    Participant

    My best result with marvell kernel:
    [ 28.051705] NMI watchdog: BUG: soft lockup – CPU#2 stuck for 23s! [swapper/0:1]
    [ 28.059043] Modules linked in:
    [ 28.062119]
    [ 28.063616] CPU: 2 PID: 1 Comm: swapper/0 Not tainted 4.4.120-armada-18.09.2 #5
    [ 28.070953] Hardware name: Marvell 8040 MACHIATOBin SingleShot (DT)
    [ 28.077245] task: ffff80013b088000 ti: ffff80013b06c000 task.ti: ffff80013b06c000
    [ 28.084765] PC is at smp_call_function_many+0x24c/0x2b0
    [ 28.090010] LR is at smp_call_function_many+0x21c/0x2b0
    [ 28.095256] pc : [<ffff80000012344c>] lr : [<ffff80000012341c>] pstate: 80000145
    [ 28.102681] sp : ffff80013b06f840
    [ 28.106008] x29: ffff80013b06f840 x28: ffff800000c6a000
    [ 28.111363] x27: ffff800000c6ab74 x26: 0000000000000040
    [ 28.116717] x25: ffff800000ce1300 x24: ffff8000001566f0
    [ 28.122070] x23: 0000000000000001 x22: ffff800000c47d80
    [ 28.127424] x21: ffff80013ff8ae08 x20: ffff800000c6ad78
    [ 28.132778] x19: ffff80013ff8ae00 x18: ffff800080cef12f
    [ 28.138132] x17: 000000000000677f x16: ffff800000ce1400
    [ 28.143485] x15: 0000000000000005 x14: 0000000000000050
    [ 28.148838] x13: 0000000000000001 x12: ffff800000ce1780
    [ 28.154192] x11: ffff800000ce1780 x10: ffff7bffc2c04020
    [ 28.159546] x9 : 0000000000000140 x8 : 0000000000000008
    [ 28.164899] x7 : 000000013f343000 x6 : 0000000000000000
    [ 28.170253] x5 : 000000000000000b x4 : 0000000000000000
    [ 28.175605] x3 : 0000000000000000 x2 : 0000000000000000
    [ 28.180959] x1 : ffff80013ff6e120 x0 : ffff80013ff6e13

    #7085

    minimaxwell
    Participant

    Hi alpha_one_x86

    With 4.18:
    [ 58.364030] mvpp2 f2000000.ethernet eth0: could not attach PHY (-19)
    [ 58.381763] mvpp2 f2000000.ethernet eth0: could not attach PHY (-19)
    [ 67.443146] mvpp2 f4000000.ethernet eth1: could not attach PHY (-19)
    [ 67.460872] mvpp2 f4000000.ethernet eth1: could not attach PHY (-19)

    You might be missing some options in your kernel config, namely :
    -CONFIG_SFP
    -CONFIG_MARVELL_10G

    Can you check that they are set ?

    Regarding this :

    [ 28.051705] NMI watchdog: BUG: soft lockup – CPU#2 stuck for 23s! [swapper/0:1]
    [ 28.059043] Modules linked in:
    [ 28.062119]
    [ 28.063616] CPU: 2 PID: 1 Comm: swapper/0 Not tainted 4.4.120-armada-18.09.2 #5
    [ 28.070953] Hardware name: Marvell 8040 MACHIATOBin SingleShot (DT)
    [ 28.077245] task: ffff80013b088000 ti: ffff80013b06c000 task.ti: ffff80013b06c000
    [ 28.084765] PC is at smp_call_function_many+0x24c/0x2b0
    [ 28.090010] LR is at smp_call_function_many+0x21c/0x2b0

    Marvell’s kernel require a recent ATF image and bootloader, so that the SERDES config
    can be setup using SMC calls, so my guess is that you should upgrade ATF + u-boot if you
    wish to use Marvell’s kernel.

    #7087

    alpha_one_x86
    Participant

    Hi,

    -CONFIG_SFP
    -CONFIG_MARVELL_10G

    Seam set, I will check and compile it again.

    http://wiki.macchiatobin.net/tiki-index.php?page=Build+from+source+-+Bootloader#Build_U-Boot -> not work with 18 build.

    #7088

    alpha_one_x86
    Participant

    Same:
    [ 9.734388] mvpp2 f2000000.ethernet eth0: could not attach PHY (-19)
    [ 9.912773] mvpp2 f2000000.ethernet eth0: could not attach PHY (-19)
    [ 15.412434] mvpp2 f4000000.ethernet eth1: could not attach PHY (-19)
    [ 15.883152] mvpp2 f4000000.ethernet eth2: PHY [f212a200.mdio-mii:00] driver [Marvell 88E1510]
    [ 15.894253] mvpp2 f4000000.ethernet eth2: configuring for phy/sgmii link mode
    [ 15.895052] IPv6: ADDRCONF(NETDEV_UP): eth2: link is not ready
    [ 16.091152] mvpp2 f4000000.ethernet eth2: PHY [f212a200.mdio-mii:00] driver [Marvell 88E1510]
    [ 16.102256] mvpp2 f4000000.ethernet eth2: configuring for phy/sgmii link mode
    [ 16.102782] IPv6: ADDRCONF(NETDEV_UP): eth2: link is not ready
    [ 19.230875] mvpp2 f4000000.ethernet eth2: Link is Up – 1Gbps/Full – flow control off
    [ 19.230888] IPv6: ADDRCONF(NETDEV_CHANGE): eth2: link becomes ready
    [ 21.985520] mvpp2 f4000000.ethernet eth3: configuring for inband/2500base-x link mode
    [ 21.986723] IPv6: ADDRCONF(NETDEV_UP): eth3: link is not ready
    [ 42.290581] mvpp2 f2000000.ethernet eth0: could not attach PHY (-19)

    #7093

    fozog
    Participant

    Using this config with vanilla 4.18 works with my macchiatobin
    https://pastebin.com/GFtqmGzY
    10GBps copper and optical via SFP are working

    #7096

    alpha_one_x86
    Participant

    You config change nothing. I have the single shot, and I use:
    arch/arm64/boot/dts/marvell/armada-8040-mcbin.dtb

Viewing 15 posts - 1 through 15 (of 21 total)

You must be logged in to reply to this topic.

Technical specification tables can not be displayed on mobile. Please view on desktop