gtg498u Posted August 31, 2020 Posted August 31, 2020 Long story short: Espressobin v7 1GB Armbian (Ubuntu Bionic 18.04) Kernel Mainline 5.4-rc4 (with custom userpatch (compiles fine)) U-Boot 2018.03-devel-18.12.3-gc9aa92c-armbian (Feb 20 2019 - 09:45:04 +0100) Without my Atheros AR9380 chipset (ath9k) wifi card inserted into the mPCIe, boots fine into Ubuntu from SD. With Atheros AR9380 chipset (ath9k) wifi card inserted into mPCIe I get a kernel hang (see below), I'm assuming it's because I'm using: U-Boot 2018.03-devel-18.12.3-gc9aa92c-armbian (Feb 20 2019 - 09:45:04 +0100) But according to this: https://docs.armbian.com/Hardware_Marvell/, I should be using U-Boot v2019.04-rc4 However, Marvell U-Boot only goes to 2018.03-armada 18.12: https://github.com/MarvellEmbeddedProcessors/u-boot-marvell I read on other forums with similar ath9k kernel hangs, that the kernel should be matched with the u-boot...so, how do I get u-boot v2019.04-rc4 on my espressobin, if Marvell U-Boot github doesn't host it? Here is the kernel hang: Spoiler TIM-1.0 WTMI-devel-18.12.1-e6bb176 WTMI: system early-init SVC REV: 5, CPU VDD voltage: 1.050V NOTICE: Booting Trusted Firmware NOTICE: BL1: v1.5(release):1f8ca7e (Marvell-devel-18.12.2) NOTICE: BL1: Built : 16:25:52, May 21 2019 NOTICE: BL1: Booting BL2 NOTICE: BL2: v1.5(release):1f8ca7e (Marvell-devel-18.12.2) NOTICE: BL2: Built : 16:25:53, May 21 2019 NOTICE: BL1: Booting BL31 NOTICE: BL31: v1.5(release):1f8ca7e (Marvell-devel-18.12.2) NOTICE: BL31: Built : 16:25:56, May U-Boot 2018.03-devel-18.12.3-gc9aa92c-armbian (Feb 20 2019 - 09:45:04 +0100) Model: Marvell Armada 3720 Community Board ESPRESSOBin CPU 600 [MHz] L2 800 [MHz] TClock 200 [MHz] DDR 600 [MHz] DRAM: 1 GiB Comphy chip #0: Comphy-0: USB3 5 Gbps Comphy-1: PEX0 2.5 Gbps Comphy-2: SATA0 6 Gbps SATA link 0 timeout. AHCI 0001.0300 32 slots 1 ports 6 Gbps 0x1 impl SATA mode flags: ncq led only pmp fbss pio slum part sxs PCIE-0: Link up MMC: sdhci@d0000: 0, sdhci@d8000: 1 Loading Environment from SPI Flash... SF: Detected mx25u3235f with page size 256 Bytes, erase size 64 KiB, total 4 MiB OK Model: Marvell Armada 3720 Community Board ESPRESSOBin Net: eth0: neta@30000 [PRIME] Hit any key to stop autoboot: 0 starting USB... USB0: Register 2000104 NbrPorts 2 Starting the controller USB XHCI 1.00 USB1: USB EHCI 1.00 scanning bus 0 for devices... 1 USB Device(s) found scanning bus 1 for devices... 1 USB Device(s) found scanning usb for storage devices... 0 Storage Device(s) found / ** Bad device usb 0 ** ## Executing script at 06d00000 Wrong image format for "source" command /boot/ ** Bad device usb 0 ** ## Executing script at 06d00000 Wrong image format for "source" command scanning bus for devices... Device 0: unknown device / ** Bad device scsi 0 ** ## Executing script at 06d00000 Wrong image format for "source" command /boot/ ** Bad device scsi 0 ** ## Executing script at 06d00000 Wrong image format for "source" command / Card did not respond to voltage select! ** Bad device mmc 1 ** ## Executing script at 06d00000 Wrong image format for "source" command /boot/ Card did not respond to voltage select! ** Bad device mmc 1 ** ## Executing script at 06d00000 Wrong image format for "source" command / ** File not found /boot.scr ** ## Executing script at 06d00000 Wrong image format for "source" command /boot/ 1119 bytes read in 15 ms (72.3 KiB/s) ## Executing script at 06d00000 240 bytes read in 5 ms (46.9 KiB/s) 17447424 bytes read in 769 ms (21.6 MiB/s) 9195816 bytes read in 410 ms (21.4 MiB/s) ** File not found /boot/dtb/marvell/armada-3720-community.dtb ** 10860 bytes read in 8 ms (1.3 MiB/s) ## Loading init Ramdisk from Legacy Image at 01100000 ... Image Name: uInitrd Image Type: AArch64 Linux RAMDisk Image (gzip compressed) Data Size: 9195752 Bytes = 8.8 MiB Load Address: 00000000 Entry Point: 00000000 Verifying Checksum ... OK ## Flattened Device Tree blob at 06000000 Booting using the fdt blob at 0x6000000 Loading Ramdisk to 3ed65000, end 3f62a0e8 ... OK Using Device Tree in place at 0000000006000000, end 0000000006005a6b Starting kernel ... [ 0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034] [ 0.000000] Linux version 5.4.0-rc4-mvebu64 (root@ubuntu) (gcc version 9.2.1 20191025 (GNU Toolchain for the A-profile Architecture 9.2-2019.12 (arm-9.10))) #trunk SMP PREEMPT Sat Aug 29 17:12:45 EDT 2020 [ 0.000000] Machine model: Globalscale Marvell ESPRESSOBin Board [ 0.000000] earlycon: ar3700_uart0 at MMIO 0x00000000d0012000 (options '') [ 0.000000] printk: bootconsole [ar3700_uart0] enabled [ 121.824019] SError Interrupt on CPU1, code 0xbf000002 -- SError [ 121.824025] CPU: 1 PID: 1 Comm: swapper/0 Not tainted 5.4.0-rc4-mvebu64 #trunk [ 121.824029] Hardware name: Globalscale Marvell ESPRESSOBin Board (DT) [ 121.824032] pstate: 80000085 (Nzcv daIf -PAN -UAO) [ 121.824035] pc : advk_pcie_rd_conf+0x64/0x208 [ 121.824038] lr : pci_bus_read_config_word+0x78/0xd0 [ 121.824040] sp : ffffffc01002b790 [ 121.824043] x29: ffffffc01002b790 x28: ffffff803f05a000 [ 121.824050] x27: ffffff803f05a000 x26: ffffff803f05a828 [ 121.824057] x25: ffffffc01118a268 x24: 0000000000000000 [ 121.824063] x23: ffffffc01002b872 x22: ffffffc01002b814 [ 121.824069] x21: 0000000000000002 x20: 0000000000000080 [ 121.824075] x19: ffffff803f992400 x18: 0000000000000000 [ 121.824081] x17: 0000000000000001 x16: 0000000000000019 [ 121.824087] x15: ffffffc011093000 x14: ffffffc01112e3c0 [ 121.824094] x13: 0000b66685e7f402 x12: 0000000000000001 [ 121.824100] x11: 0000000000000000 x10: 0000000000000930 [ 121.824106] x9 : ffffffc01002b6f0 x8 : ffffff803f880990 [ 121.824112] x7 : ffffff803f880180 x6 : 000000000000401c [ 121.824118] x5 : 0000000001040008 x4 : 0000000000000001 [ 121.824125] x3 : 0000000000000000 x2 : ffffffc011564020 [ 121.824131] x1 : 0000000000000000 x0 : ffffff803f05a800 [ 121.824139] Kernel panic - not syncing: Asynchronous SError Interrupt [ 121.824142] CPU: 1 PID: 1 Comm: swapper/0 Not tainted 5.4.0-rc4-mvebu64 #trunk [ 121.824146] Hardware name: Globalscale Marvell ESPRESSOBin Board (DT) [ 121.824148] Call trace: [ 121.824151] dump_backtrace+0x0/0x140 [ 121.824153] show_stack+0x14/0x20 [ 121.824156] dump_stack+0xa8/0xf0 [ 121.824158] panic+0x158/0x324 [ 121.824160] nmi_panic+0x84/0x88 [ 121.824163] arm64_serror_panic+0x74/0x80 [ 121.824165] do_serror+0x80/0x138 [ 121.824168] el1_error+0x84/0xf8 [ 121.824171] advk_pcie_rd_conf+0x64/0x208 [ 121.824174] pci_bus_read_config_word+0x78/0xd0 [ 121.824177] pcie_capability_read_word+0x8c/0xc8 [ 121.824179] pcie_get_aspm_reg+0x64/0x118 [ 121.824182] pcie_aspm_init_link_state+0x480/0xad8 [ 121.824185] pci_scan_slot+0x110/0x118 [ 121.824188] pci_scan_child_bus_extend+0x50/0x2a8 [ 121.824191] pci_scan_bridge_extend+0x294/0x570 [ 121.824194] pci_scan_child_bus_extend+0x1e4/0x2a8 [ 121.824196] pci_scan_root_bus_bridge+0x58/0xd8 [ 121.824199] pci_host_probe+0x14/0xc0 [ 121.824202] advk_pcie_probe+0x8a8/0x948 [ 121.824204] platform_drv_probe+0x50/0xa0 [ 121.824207] really_probe+0xd4/0x308 [ 121.824209] driver_probe_device+0x54/0xe8 [ 121.824212] device_driver_attach+0x6c/0x78 [ 121.824215] __driver_attach+0x54/0xd0 [ 121.824217] bus_for_each_dev+0x6c/0xc0 [ 121.824220] driver_attach+0x20/0x28 [ 121.824222] bus_add_driver+0x140/0x1e8 [ 121.824225] driver_register+0x60/0x110 [ 121.824228] __platform_driver_register+0x44/0x50 [ 121.824231] advk_pcie_driver_init+0x18/0x20 [ 121.824234] do_one_initcall+0x50/0x190 [ 121.824236] kernel_init_freeable+0x194/0x22c [ 121.824239] kernel_init+0x10/0x100 [ 121.824241] ret_from_fork+0x10/0x18 [ 121.824269] SMP: stopping secondary CPUs [ 121.824272] Kernel Offset: disabled [ 121.824274] CPU features: 0x0002,2000200c [ 121.824277] Memory Limit: none
Igor Posted August 31, 2020 Posted August 31, 2020 31 minutes ago, gtg498u said: I should be using U-Boot v2019.04-rc4 For start update to latest u-boot and kernel. You are using some very old build, nobody will even try to reason why it doesn't work as expected.
gtg498u Posted September 3, 2020 Author Posted September 3, 2020 Thanks for the reply Igor, I tried the latest already. Still doesn't work with ath9k wifi card. Is there an issues with the build script using: https://github.com/MarvellEmbeddedProcessors/u-boot-marvell.git, branch u-boot-2018.03-armada-18.12 This is the latest, that the u-boot build scripts pulls from. Is there a config file I can use to tell the u-boot build script to pull from the u-boot mainline (similar to how I can tell the kernel build script which kernel I want to build)? Perhaps I don't understand fully. TBH I'm just a practitioner. I specifically need 5.4-rc4 because I have an entire software stack that is married to that kernel (and for good reason). I have my set-up working (not armbian) on a different hardware SBC. So I'm trying to support this other board. It is crucial that I use 5.4-rc4 and Atheros AR9380 chipset (ath9k) wifi card.
Igor Posted September 3, 2020 Posted September 3, 2020 3 hours ago, gtg498u said: Is there a config file I can use to tell the u-boot build script to pull from the u-boot mainline There is no such things yet. Perhaps in a few months since there is some activity in that direction. And solo that usually brings nothing - it contains the same low level bugs and limitations. You just get new generic part. 3 hours ago, gtg498u said: TBH I'm just a practitioner. I specifically need 5.4-rc4 because I have an entire software stack that is married to that kernel Then this forum can't help you. 3 hours ago, gtg498u said: not armbian And especially not in this case.
Pali Posted September 3, 2020 Posted September 3, 2020 Hello @gtg498u! You should ignore @Igor's comments as it looks like that it is some local forum troll and joking that defend his decision that armbian erases ethernet MAC address is the correct. Also in this thread he said that U-Boot v2019.04-rc4 is very old version and you should use last version, but his armbian provides only U-Boot version U-Boot 2018.03, which is even older. So do not take his comments seriously. And based on these fatal decisions I would not be surprised that other things start to be broken with new u-boot or kernel versions, if there are other similar custom armbian patches like that which erase MAC address. @gtg498u: Could you look at thread https://forum.armbian.com/topic/15059-espressobin-mainline-u-bootatf/ and try to use @dhewg's builds of ATF+u-boot? We have sent more patches to upstream U-Boot to fix Armada 3720 HW, so it should work better than armbian builds. Also from that kernel log I see that crash is in aardvark PCIe bus driver. I sent more fixes for aardvark driver into 5.8 kernel which should make support for ath10k cards more stable. Could try to use 5.8 kernel? If problems are still there, please send me whole dmesg log and I will try to look at aardvark/A3720 issues.
Igor Posted September 3, 2020 Posted September 3, 2020 1 hour ago, Pali said: defend his decision that armbian erases ethernet MAC address is the correct. Of it is correct., but not anymore. Which I told you but you are seeing only yourself. Without setting it (at that time), MAC would have been randomly generated. Which is even worse. 1 hour ago, Pali said: so it should work better than armbian builds. He is not using Armbian, but yes we plan to bump version to 5.8.y. It just happen that we are overloaded with other work. Which you and your friend are totally unable to understand.
gtg498u Posted September 10, 2020 Author Posted September 10, 2020 Thank you so much @Pali and also thank you @Igor I thought your comments were amusing. so I’ve tried many different options so far (and by the way I am trying to get this to work on the espressobin, please ignore any comments about the other SBC that I am using I’m not running Armbian on that one). I’m having issues with the latest Armbian (5.6.y) and u-boot (2018) for marvel on the espressobin. Armbian loads up great. the issue is the Atheros Wi-Fi card with the AR 9380 chipset. With that in the mPCIe slot of the espressobin v7, I get the kernel hang I posted earlier. I saw on some forms that there was a patch for the kernel on marvel targets in which the millisecond delay for one of the routines for the aardvark PCI driver needed to be increased to 50ms as opposed to 1ms. I have successfully been able to get the espressobin v7 to boot Armbian and it works just fine with the Wi-Fi card using kernel 4.19 however when I use kernel 5.4 and up I get the kernel hang I posted earlier. the issue is always with the aardvark PCI driver. I suspect that the latest u-boot from Marvell doesn’t support kernel 5.4 and up. i was hoping it was just a slight modification of the kernel in aardvark PCI driver in the function: advk_pcie_rd_conf any other ideas?
Pali Posted September 23, 2020 Posted September 23, 2020 Hello @gtg498u, could you try to update U-Boot to new version from 2020 as described in thread https://forum.armbian.com/topic/15059-espressobin-mainline-u-bootatf/? As I wrote, new version contains lot of fixes for Armada 3720.
gtg498u Posted September 24, 2020 Author Posted September 24, 2020 Thank you @Pali I did as you said, no dice. I could get latest 5.8 with 2018 uboot to recognize the wifi card, I could not get 5.6 with your 2020.10-rc4 to recognize the card, it just stops at waiting for kernel...I'm going to try to build my custom kernel with my 5.8 and apply my patches...hopefully that's all I need!
gtg498u Posted September 26, 2020 Author Posted September 26, 2020 @Pali praise the LORD Jesus Christ! Got it working! Here are the specs: espressobin v7 Armbian running Ubuntu Focal 20.04 Linux kernel v5.8.6 Use the latest Flash image for ddr4 1GB 800_800 AR9380 chipset is recognized and stable. Thank you!!!! 1
Recommended Posts