Any plan for basic mainline linux support?

elatllat
Posts: 1690
Joined: Tue Sep 01, 2015 8:54 am
languages_spoken: english
ODROIDs: XU4, N1, N2
Has thanked: 31 times
Been thanked: 96 times
Contact:

Re: Any plan for basic mainline linux support?

Unread post by elatllat » Sat Feb 01, 2020 10:40 pm

MoikvanDoik wrote:
Sat Feb 01, 2020 5:11 pm
1. 0xf0000000
2. manually unplug and replug my USB-SSD to get it recognized.
I was using that Ram value for a long time but reduced it slightly when I found that one of the governors would magically disappear. More testing is required to figure out if the ram reduction or something else that I changed fix that issue...

My HDDs do not require manual replug for recognition on reboot... no spare SSDs ATM.
These users thanked the author elatllat for the post:
MoikvanDoik (Thu Feb 06, 2020 5:39 am)

elatllat
Posts: 1690
Joined: Tue Sep 01, 2015 8:54 am
languages_spoken: english
ODROIDs: XU4, N1, N2
Has thanked: 31 times
Been thanked: 96 times
Contact:

Re: Any plan for basic mainline linux support?

Unread post by elatllat » Sun Feb 02, 2020 8:00 am


brad
Posts: 1063
Joined: Tue Mar 29, 2016 1:22 pm
languages_spoken: english
ODROIDs: C2 N1 N2 H2 (64 bit ftw)
Location: Australia
Has thanked: 29 times
Been thanked: 56 times
Contact:

Re: Any plan for basic mainline linux support?

Unread post by brad » Sun Feb 02, 2020 10:23 am

Can anybody help me find the runtime value of PCI_IOBASE ?

./arch/arm64/include/asm/io.h:#define PCI_IOBASE ((void __iomem *)PCI_IO_START)
./arch/arm64/include/asm/memory.h:#define PCI_IO_START (PCI_IO_END - PCI_IO_SIZE)
./arch/arm64/include/asm/memory.h:#define PCI_IO_END (VMEMMAP_START - SZ_2M)
./arch/arm64/include/asm/memory.h:#define VMEMMAP_START (-VMEMMAP_SIZE - SZ_2M)

I remember older kernels used to provide memory layout early on boot but I cannot seem to find it. I want the memory address that represents the start of the PCI memory area so I can make a dummy io.h userland header.

Ie on the C2 mainline kernels used to provide at boot which I could use to workout the value, maybe its still the same

PCI I/O : 0xffff7dfffee00000 - 0xffff7dffffe00000 ( 16 MB)

Edit: I dont have PCI subsystem enabled in my build, can someone share output of

Code: Select all

cat /proc/iomem

elatllat
Posts: 1690
Joined: Tue Sep 01, 2015 8:54 am
languages_spoken: english
ODROIDs: XU4, N1, N2
Has thanked: 31 times
Been thanked: 96 times
Contact:

Re: Any plan for basic mainline linux support?

Unread post by elatllat » Sun Feb 02, 2020 10:44 am

Code: Select all

N2> cat /proc/iomem
00000000-04ffffff : System RAM
  01080000-01eaffff : Kernel code
  01eb0000-020dffff : reserved
  020e0000-02223fff : Kernel data
05300000-dfffffff : System RAM
  1fff2000-1fffcfff : reserved
  cb000000-cb7fffff : reserved
  cb9fe000-cf7fffff : reserved
  cf82a000-cf82afff : reserved
  cf82b000-cf8aefff : reserved
  cf8b1000-cf8b1fff : reserved
  cf8b2000-cf8b6fff : reserved
  cf8b7000-cf8fafff : reserved
  cf8fb000-dfffffff : reserved
ff3f0000-ff3fffff : ff3f0000.ethernet
ff400000-ff43ffff : ff400000.usb
ff500000-ff507fff : usb@ff500000
  ff500000-ff507fff : xhci-hcd.0.auto
ff50c100-ff5fffff : ff500000.usb
ff600000-ff60ffff : ff600000.hdmi-tx
ff630218-ff63021b : ff630218.rng
ff634440-ff63448b : ff634400.bus:pinctrl@40
ff6344e8-ff6344ff : ff634400.bus:pinctrl@40
ff634520-ff634537 : ff634400.bus:pinctrl@40
ff634540-ff634547 : ff3f0000.ethernet
ff6346c0-ff6346ff : ff634400.bus:pinctrl@40
ff634740-ff63475b : ff634400.bus:pinctrl@40
ff636000-ff637fff : ff636000.phy
ff638048-ff63805b : ff638048.video-lut
ff63a000-ff63bfff : ff63a000.phy
ff642000-ff6420b3 : ff642000.clock-controller
ff6421c0-ff6421eb : ff6421c0.audio-controller
ff642200-ff64222b : ff642200.audio-controller
ff642240-ff64226b : ff642240.audio-controller
ff642280-ff642283 : ff642280.reset-controller
ff642540-ff64257f : ff642540.audio-controller
ff642744-ff642747 : ff642744.audio-controller
ff646000-ff647fff : ff646000.phy
ff64c000-ff64c0a3 : ff64c000.mdio-multiplexer
ff800014-ff80001b : ff800000.sys-ctrl:pinctrl@14
ff80001c-ff800023 : ff800000.sys-ctrl:pinctrl@14
ff800024-ff800037 : ff800000.sys-ctrl:pinctrl@14
ff8000a8-ff8000ab : ff8000a8.rtc
ff802000-ff80201f : ff802000.pwm
ff803000-ff803017 : ff803000.serial
ff808000-ff80801f : ff808000.ir
ff900000-ff9fffff : ff900000.vpu
ffd01004-ffd0109f : ffd01004.reset-controller
ffd18000-ffd1800f : ffd18000.clock-measure
ffd1b000-ffd1b01f : ffd1b000.pwm
ffe05000-ffe057ff : ffe05000.sd
ffe07000-ffe077ff : ffe07000.mmc
ffe09000-ffe0909f : ffe09000.usb

N2> grep -i pci .config
# CONFIG_ACPI_PCI_SLOT is not set
CONFIG_ACPI_APEI_PCIEAER=y
CONFIG_BLK_MQ_PCI=y
CONFIG_HAVE_PCI=y
CONFIG_PCI=y
CONFIG_PCI_DOMAINS=y
CONFIG_PCI_DOMAINS_GENERIC=y
CONFIG_PCI_SYSCALL=y
CONFIG_PCIEPORTBUS=y
# CONFIG_HOTPLUG_PCI_PCIE is not set
CONFIG_PCIEAER=y
# CONFIG_PCIEAER_INJECT is not set
# CONFIG_PCIE_ECRC is not set
CONFIG_PCIEASPM=y
# CONFIG_PCIEASPM_DEBUG is not set
CONFIG_PCIEASPM_DEFAULT=y
# CONFIG_PCIEASPM_POWERSAVE is not set
# CONFIG_PCIEASPM_POWER_SUPERSAVE is not set
# CONFIG_PCIEASPM_PERFORMANCE is not set
CONFIG_PCIE_PME=y
# CONFIG_PCIE_DPC is not set
# CONFIG_PCIE_PTM is not set
# CONFIG_PCIE_BW is not set
CONFIG_PCI_MSI=y
CONFIG_PCI_MSI_IRQ_DOMAIN=y
CONFIG_PCI_QUIRKS=y
# CONFIG_PCI_REALLOC_ENABLE_AUTO is not set
# CONFIG_PCI_STUB is not set
# CONFIG_PCI_PF_STUB is not set
CONFIG_PCI_ATS=y
CONFIG_PCI_ECAM=y
CONFIG_PCI_IOV=y
# CONFIG_PCI_PRI is not set
# CONFIG_PCI_PASID is not set
CONFIG_PCI_LABEL=y
CONFIG_HOTPLUG_PCI=y
CONFIG_HOTPLUG_PCI_ACPI=y
# CONFIG_HOTPLUG_PCI_ACPI_IBM is not set
# CONFIG_HOTPLUG_PCI_CPCI is not set
# CONFIG_HOTPLUG_PCI_SHPC is not set
# PCI controller drivers
# Cadence PCIe controllers support
# CONFIG_PCIE_CADENCE_HOST is not set
# end of Cadence PCIe controllers support
# CONFIG_PCI_FTPCI100 is not set
CONFIG_PCI_HOST_COMMON=y
CONFIG_PCI_HOST_GENERIC=y
# CONFIG_PCIE_XILINX is not set
CONFIG_PCI_XGENE=y
CONFIG_PCI_XGENE_MSI=y
CONFIG_PCIE_IPROC=y
CONFIG_PCIE_IPROC_PLATFORM=y
CONFIG_PCIE_IPROC_MSI=y
CONFIG_PCIE_ALTERA=y
CONFIG_PCIE_ALTERA_MSI=y
CONFIG_PCI_HOST_THUNDER_PEM=y
CONFIG_PCI_HOST_THUNDER_ECAM=y
# DesignWare PCI Core Support
CONFIG_PCIE_DW=y
CONFIG_PCIE_DW_HOST=y
# CONFIG_PCIE_DW_PLAT_HOST is not set
CONFIG_PCI_HISI=y
CONFIG_PCIE_KIRIN=y
# CONFIG_PCI_MESON is not set
# CONFIG_PCIE_AL is not set
# end of DesignWare PCI Core Support
# end of PCI controller drivers
# PCI Endpoint
# CONFIG_PCI_ENDPOINT is not set
# end of PCI Endpoint
# PCI switch controller drivers
# CONFIG_PCI_SW_SWITCHTEC is not set
# end of PCI switch controller drivers
# CONFIG_MTD_NAND_DENALI_PCI is not set
# CONFIG_BLK_DEV_PCIESSD_MTIP32XX is not set
# CONFIG_PCI_ENDPOINT_TEST is not set
# CONFIG_MISC_ALCOR_PCI is not set
# CONFIG_MISC_RTSX_PCI is not set
CONFIG_SCSI_HISI_SAS_PCI=y
# CONFIG_SCSI_UFSHCD_PCI is not set
# CONFIG_SCSI_FDOMAIN_PCI is not set
# CONFIG_PATA_CMD640_PCI is not set
# CONFIG_MACB_PCI is not set
# CONFIG_KSZ884X_PCI is not set
# CONFIG_NE2K_PCI is not set
# CONFIG_STMMAC_PCI is not set
# CONFIG_SERIO_PCIPS2 is not set
CONFIG_SERIAL_8250_PCI=y
# CONFIG_I2C_DESIGNWARE_PCI is not set
# PCI GPIO expanders
# CONFIG_GPIO_PCI_IDIO_16 is not set
# CONFIG_GPIO_PCIE_IDIO_24 is not set
# end of PCI GPIO expanders
# PCI-based Watchdog Cards
# CONFIG_PCIPCWATCHDOG is not set
# CONFIG_WDTPCI is not set
# CONFIG_MEDIA_PCI_SUPPORT is not set
CONFIG_DRM_ATI_PCIGART=y
CONFIG_SND_PCI=y
# CONFIG_SND_CMIPCI is not set
# CONFIG_SND_YMFPCI is not set
CONFIG_USB_PCI=y
CONFIG_USB_XHCI_PCI=y
CONFIG_USB_EHCI_PCI=y
CONFIG_USB_OHCI_HCD_PCI=y
CONFIG_USB_DWC3_PCI=y
# CONFIG_USB_DWC2_PCI is not set
CONFIG_USB_CHIPIDEA_PCI=y
CONFIG_USB_BDC_PCI=y
# CONFIG_MMC_SDHCI_PCI is not set
# CONFIG_MMC_DW_PCI is not set
# CONFIG_MMC_TOSHIBA_PCI is not set
# CONFIG_DW_DMAC_PCI is not set
# CONFIG_DW_EDMA_PCIE is not set
CONFIG_VFIO_PCI=y
CONFIG_VFIO_PCI_MMAP=y
CONFIG_VFIO_PCI_INTX=y
CONFIG_VIRTIO_PCI=y
CONFIG_VIRTIO_PCI_LEGACY=y
CONFIG_ARM_GIC_V3_ITS_PCI=y
CONFIG_PHY_MESON_G12A_USB3_PCIE=y
CONFIG_PHY_NS2_PCIE=y
CONFIG_PHY_BCM_SR_PCIE=y
CONFIG_GENERIC_PCI_IOMAP=y
These users thanked the author elatllat for the post:
brad (Sun Feb 02, 2020 11:14 am)

brad
Posts: 1063
Joined: Tue Mar 29, 2016 1:22 pm
languages_spoken: english
ODROIDs: C2 N1 N2 H2 (64 bit ftw)
Location: Australia
Has thanked: 29 times
Been thanked: 56 times
Contact:

Re: Any plan for basic mainline linux support?

Unread post by brad » Sun Feb 02, 2020 11:14 am

elatllat wrote:
Sun Feb 02, 2020 10:44 am

Code: Select all

N2> cat /proc/iomem
00000000-04ffffff : System RAM
  01080000-01eaffff : Kernel code
  01eb0000-020dffff : reserved
  020e0000-02223fff : Kernel data
05300000-dfffffff : System RAM
  1fff2000-1fffcfff : reserved
  cb000000-cb7fffff : reserved
  cb9fe000-cf7fffff : reserved
  cf82a000-cf82afff : reserved
  cf82b000-cf8aefff : reserved
  cf8b1000-cf8b1fff : reserved
  cf8b2000-cf8b6fff : reserved
  cf8b7000-cf8fafff : reserved
  cf8fb000-dfffffff : reserved
ff3f0000-ff3fffff : ff3f0000.ethernet
ff400000-ff43ffff : ff400000.usb
ff500000-ff507fff : usb@ff500000
  ff500000-ff507fff : xhci-hcd.0.auto
ff50c100-ff5fffff : ff500000.usb
ff600000-ff60ffff : ff600000.hdmi-tx
ff630218-ff63021b : ff630218.rng
ff634440-ff63448b : ff634400.bus:pinctrl@40
ff6344e8-ff6344ff : ff634400.bus:pinctrl@40
ff634520-ff634537 : ff634400.bus:pinctrl@40
ff634540-ff634547 : ff3f0000.ethernet
ff6346c0-ff6346ff : ff634400.bus:pinctrl@40
ff634740-ff63475b : ff634400.bus:pinctrl@40
ff636000-ff637fff : ff636000.phy
ff638048-ff63805b : ff638048.video-lut
ff63a000-ff63bfff : ff63a000.phy
ff642000-ff6420b3 : ff642000.clock-controller
ff6421c0-ff6421eb : ff6421c0.audio-controller
ff642200-ff64222b : ff642200.audio-controller
ff642240-ff64226b : ff642240.audio-controller
ff642280-ff642283 : ff642280.reset-controller
ff642540-ff64257f : ff642540.audio-controller
ff642744-ff642747 : ff642744.audio-controller
ff646000-ff647fff : ff646000.phy
ff64c000-ff64c0a3 : ff64c000.mdio-multiplexer
ff800014-ff80001b : ff800000.sys-ctrl:pinctrl@14
ff80001c-ff800023 : ff800000.sys-ctrl:pinctrl@14
ff800024-ff800037 : ff800000.sys-ctrl:pinctrl@14
ff8000a8-ff8000ab : ff8000a8.rtc
ff802000-ff80201f : ff802000.pwm
ff803000-ff803017 : ff803000.serial
ff808000-ff80801f : ff808000.ir
ff900000-ff9fffff : ff900000.vpu
ffd01004-ffd0109f : ffd01004.reset-controller
ffd18000-ffd1800f : ffd18000.clock-measure
ffd1b000-ffd1b01f : ffd1b000.pwm
ffe05000-ffe057ff : ffe05000.sd
ffe07000-ffe077ff : ffe07000.mmc
ffe09000-ffe0909f : ffe09000.usb

N2> grep -i pci .config
# CONFIG_ACPI_PCI_SLOT is not set
CONFIG_ACPI_APEI_PCIEAER=y
CONFIG_BLK_MQ_PCI=y
CONFIG_HAVE_PCI=y
CONFIG_PCI=y
CONFIG_PCI_DOMAINS=y
CONFIG_PCI_DOMAINS_GENERIC=y
CONFIG_PCI_SYSCALL=y
CONFIG_PCIEPORTBUS=y
# CONFIG_HOTPLUG_PCI_PCIE is not set
CONFIG_PCIEAER=y
# CONFIG_PCIEAER_INJECT is not set
# CONFIG_PCIE_ECRC is not set
CONFIG_PCIEASPM=y
# CONFIG_PCIEASPM_DEBUG is not set
CONFIG_PCIEASPM_DEFAULT=y
# CONFIG_PCIEASPM_POWERSAVE is not set
# CONFIG_PCIEASPM_POWER_SUPERSAVE is not set
# CONFIG_PCIEASPM_PERFORMANCE is not set
CONFIG_PCIE_PME=y
# CONFIG_PCIE_DPC is not set
# CONFIG_PCIE_PTM is not set
# CONFIG_PCIE_BW is not set
CONFIG_PCI_MSI=y
CONFIG_PCI_MSI_IRQ_DOMAIN=y
CONFIG_PCI_QUIRKS=y
# CONFIG_PCI_REALLOC_ENABLE_AUTO is not set
# CONFIG_PCI_STUB is not set
# CONFIG_PCI_PF_STUB is not set
CONFIG_PCI_ATS=y
CONFIG_PCI_ECAM=y
CONFIG_PCI_IOV=y
# CONFIG_PCI_PRI is not set
# CONFIG_PCI_PASID is not set
CONFIG_PCI_LABEL=y
CONFIG_HOTPLUG_PCI=y
CONFIG_HOTPLUG_PCI_ACPI=y
# CONFIG_HOTPLUG_PCI_ACPI_IBM is not set
# CONFIG_HOTPLUG_PCI_CPCI is not set
# CONFIG_HOTPLUG_PCI_SHPC is not set
# PCI controller drivers
# Cadence PCIe controllers support
# CONFIG_PCIE_CADENCE_HOST is not set
# end of Cadence PCIe controllers support
# CONFIG_PCI_FTPCI100 is not set
CONFIG_PCI_HOST_COMMON=y
CONFIG_PCI_HOST_GENERIC=y
# CONFIG_PCIE_XILINX is not set
CONFIG_PCI_XGENE=y
CONFIG_PCI_XGENE_MSI=y
CONFIG_PCIE_IPROC=y
CONFIG_PCIE_IPROC_PLATFORM=y
CONFIG_PCIE_IPROC_MSI=y
CONFIG_PCIE_ALTERA=y
CONFIG_PCIE_ALTERA_MSI=y
CONFIG_PCI_HOST_THUNDER_PEM=y
CONFIG_PCI_HOST_THUNDER_ECAM=y
# DesignWare PCI Core Support
CONFIG_PCIE_DW=y
CONFIG_PCIE_DW_HOST=y
# CONFIG_PCIE_DW_PLAT_HOST is not set
CONFIG_PCI_HISI=y
CONFIG_PCIE_KIRIN=y
# CONFIG_PCI_MESON is not set
# CONFIG_PCIE_AL is not set
# end of DesignWare PCI Core Support
# end of PCI controller drivers
# PCI Endpoint
# CONFIG_PCI_ENDPOINT is not set
# end of PCI Endpoint
# PCI switch controller drivers
# CONFIG_PCI_SW_SWITCHTEC is not set
# end of PCI switch controller drivers
# CONFIG_MTD_NAND_DENALI_PCI is not set
# CONFIG_BLK_DEV_PCIESSD_MTIP32XX is not set
# CONFIG_PCI_ENDPOINT_TEST is not set
# CONFIG_MISC_ALCOR_PCI is not set
# CONFIG_MISC_RTSX_PCI is not set
CONFIG_SCSI_HISI_SAS_PCI=y
# CONFIG_SCSI_UFSHCD_PCI is not set
# CONFIG_SCSI_FDOMAIN_PCI is not set
# CONFIG_PATA_CMD640_PCI is not set
# CONFIG_MACB_PCI is not set
# CONFIG_KSZ884X_PCI is not set
# CONFIG_NE2K_PCI is not set
# CONFIG_STMMAC_PCI is not set
# CONFIG_SERIO_PCIPS2 is not set
CONFIG_SERIAL_8250_PCI=y
# CONFIG_I2C_DESIGNWARE_PCI is not set
# PCI GPIO expanders
# CONFIG_GPIO_PCI_IDIO_16 is not set
# CONFIG_GPIO_PCIE_IDIO_24 is not set
# end of PCI GPIO expanders
# PCI-based Watchdog Cards
# CONFIG_PCIPCWATCHDOG is not set
# CONFIG_WDTPCI is not set
# CONFIG_MEDIA_PCI_SUPPORT is not set
CONFIG_DRM_ATI_PCIGART=y
CONFIG_SND_PCI=y
# CONFIG_SND_CMIPCI is not set
# CONFIG_SND_YMFPCI is not set
CONFIG_USB_PCI=y
CONFIG_USB_XHCI_PCI=y
CONFIG_USB_EHCI_PCI=y
CONFIG_USB_OHCI_HCD_PCI=y
CONFIG_USB_DWC3_PCI=y
# CONFIG_USB_DWC2_PCI is not set
CONFIG_USB_CHIPIDEA_PCI=y
CONFIG_USB_BDC_PCI=y
# CONFIG_MMC_SDHCI_PCI is not set
# CONFIG_MMC_DW_PCI is not set
# CONFIG_MMC_TOSHIBA_PCI is not set
# CONFIG_DW_DMAC_PCI is not set
# CONFIG_DW_EDMA_PCIE is not set
CONFIG_VFIO_PCI=y
CONFIG_VFIO_PCI_MMAP=y
CONFIG_VFIO_PCI_INTX=y
CONFIG_VIRTIO_PCI=y
CONFIG_VIRTIO_PCI_LEGACY=y
CONFIG_ARM_GIC_V3_ITS_PCI=y
CONFIG_PHY_MESON_G12A_USB3_PCIE=y
CONFIG_PHY_NS2_PCIE=y
CONFIG_PHY_BCM_SR_PCIE=y
CONFIG_GENERIC_PCI_IOMAP=y
Thanks, unfortunately it does not seem to be listed. Ill try some other things to find out.

Edit: I think this might be it

Code: Select all

root@disco-minimal:/proc# cat /proc/kallsyms | grep -i iobase
ffff80001012cb48 W __arm64_sys_pciconfig_iobase

elatllat
Posts: 1690
Joined: Tue Sep 01, 2015 8:54 am
languages_spoken: english
ODROIDs: XU4, N1, N2
Has thanked: 31 times
Been thanked: 96 times
Contact:

Re: Any plan for basic mainline linux support?

Unread post by elatllat » Sun Feb 02, 2020 9:25 pm

Code: Select all

cat /proc/kallsyms | grep -i iobase
ffff800010109b10 W __arm64_sys_pciconfig_iobase

MoikvanDoik
Posts: 8
Joined: Thu May 02, 2019 6:25 am
languages_spoken: english, german
ODROIDs: HC2, N2
Has thanked: 3 times
Been thanked: 0
Contact:

Re: Any plan for basic mainline linux support?

Unread post by MoikvanDoik » Thu Feb 06, 2020 5:45 am

elatllat wrote:
Sat Feb 01, 2020 10:40 pm
MoikvanDoik wrote:
Sat Feb 01, 2020 5:11 pm
1. 0xf0000000
2. manually unplug and replug my USB-SSD to get it recognized.
I was using that Ram value for a long time but reduced it slightly when I found that one of the governors would magically disappear. More testing is required to figure out if the ram reduction or something else that I changed fix that issue...

My HDDs do not require manual replug for recognition on reboot... no spare SSDs ATM.
Thank you! So my amount of ram is normal and it is possible that it will get higher again in later kernel versions? Can you tell me how to change it manually?

elatllat
Posts: 1690
Joined: Tue Sep 01, 2015 8:54 am
languages_spoken: english
ODROIDs: XU4, N1, N2
Has thanked: 31 times
Been thanked: 96 times
Contact:

Re: Any plan for basic mainline linux support?

Unread post by elatllat » Thu Feb 06, 2020 5:56 am

MoikvanDoik wrote:
Thu Feb 06, 2020 5:45 am
...how to change it manually?
Look in the patch;

Code: Select all

-		reg = <0x0 0x0 0x0 0x40000000>;
+		reg = <0x0 0x0 0x0 0xf0000000>;
in
arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts

elatllat
Posts: 1690
Joined: Tue Sep 01, 2015 8:54 am
languages_spoken: english
ODROIDs: XU4, N1, N2
Has thanked: 31 times
Been thanked: 96 times
Contact:

Re: Any plan for basic mainline linux support?

Unread post by elatllat » Fri Feb 07, 2020 3:56 am

5.4.18 (LKML)
builds (and script).

Looks like Ubuntu 20.04 will use 5.4, so even though kernel.org only lists it as a 1 year LTS Ubuntu may be maintaining it for ~10 years
source here:
https://kernel.ubuntu.com/git/ubuntu/ubuntu-focal.git/

Hope HK is not to busy with the GO ADVANCE and other projects to put some work into supporting 5.4.

elatllat
Posts: 1690
Joined: Tue Sep 01, 2015 8:54 am
languages_spoken: english
ODROIDs: XU4, N1, N2
Has thanked: 31 times
Been thanked: 96 times
Contact:

Re: Any plan for basic mainline linux support?

Unread post by elatllat » Mon Feb 10, 2020 12:19 pm

5.6-rc1 (LKML)
builds (and script).

(has 40 Gbit USB software support vs the 5 Gbit USB hardware on the N2, also sanity prevailed)
These users thanked the author elatllat for the post:
brad (Mon Feb 10, 2020 4:04 pm)

elatllat
Posts: 1690
Joined: Tue Sep 01, 2015 8:54 am
languages_spoken: english
ODROIDs: XU4, N1, N2
Has thanked: 31 times
Been thanked: 96 times
Contact:

Re: Any plan for basic mainline linux support?

Unread post by elatllat » Thu Feb 13, 2020 10:47 pm

Last week a HEVC decoder PR was sent to mainline.

chewitt
Posts: 30
Joined: Mon Aug 12, 2019 12:27 pm
languages_spoken: english
Has thanked: 0
Been thanked: 27 times
Contact:

Re: Any plan for basic mainline linux support?

Unread post by chewitt » Fri Feb 14, 2020 12:45 am

elatllat wrote:
Thu Feb 13, 2020 10:47 pm
Last week a HEVC decoder PR was sent to mainline.
Not quite. The VP9 and HEVC decoders share some common plumbing and that's what was submitted (as part of the VP9 series). The HEVC decoder still needs to be reworked around the compliance changes and resent. Google (who is funding most of the current mainline work for a future Android device (on a mainline stack) prioritises H264/VP9 as those are required for YouTube, so they've been done first. Maxime also posted the firmware(s) .. so unlike a few months ago when we had a decoder and no firmware, now we have the firmware and no decoder :)
These users thanked the author chewitt for the post (total 4):
elatllat (Fri Feb 14, 2020 12:53 am) • odroid (Fri Feb 14, 2020 9:49 am) • istanbulls (Fri Feb 14, 2020 7:14 pm) • xabolcs (Sat Feb 15, 2020 10:56 pm)

elatllat
Posts: 1690
Joined: Tue Sep 01, 2015 8:54 am
languages_spoken: english
ODROIDs: XU4, N1, N2
Has thanked: 31 times
Been thanked: 96 times
Contact:

Re: Any plan for basic mainline linux support?

Unread post by elatllat » Sun Feb 16, 2020 2:42 am


dxm
Posts: 1
Joined: Wed Feb 19, 2020 1:25 am
languages_spoken: english
Has thanked: 0
Been thanked: 0
Contact:

Re: Any plan for basic mainline linux support?

Unread post by dxm » Wed Feb 19, 2020 2:11 am

hi all,
first of all: great work on the mainline kernel patches. loving it so far and using rbd tcmu-runner and stuff on my lovely n2's :) after upgrading my n2s with rtc backup batteries i noticed that i2c and obviously the rtc is not working. im not that into devicetree stuff and failed sofar in activating the i2c master. has somebody an idea regarding i2c on 5.5?

best

elatllat
Posts: 1690
Joined: Tue Sep 01, 2015 8:54 am
languages_spoken: english
ODROIDs: XU4, N1, N2
Has thanked: 31 times
Been thanked: 96 times
Contact:

Re: Any plan for basic mainline linux support?

Unread post by elatllat » Thu Feb 20, 2020 11:30 pm


alvarow
Posts: 47
Joined: Wed Apr 10, 2019 10:44 pm
languages_spoken: english
ODROIDs: N2
Has thanked: 22 times
Been thanked: 1 time
Contact:

Re: Any plan for basic mainline linux support?

Unread post by alvarow » Fri Feb 21, 2020 1:05 am

Does the 5.4 support the onboard crypto accelerator that's supported by HK 4.9 kernels?

I do OpenVPN and HTTPS based on OpenSSL on my N2, which makes use of it. The N2 is twice as fast than my 8th gen intel celeron desktop when doing sha256 :-)

Thanks for the builds!

elatllat
Posts: 1690
Joined: Tue Sep 01, 2015 8:54 am
languages_spoken: english
ODROIDs: XU4, N1, N2
Has thanked: 31 times
Been thanked: 96 times
Contact:

Re: Any plan for basic mainline linux support?

Unread post by elatllat » Fri Feb 21, 2020 1:15 am

alvarow wrote:
Fri Feb 21, 2020 1:05 am
Does the 5.4 support the onboard crypto accelerator that's supported by HK 4.9 kernels?
yes tested here.
also

Code: Select all

N2> openssl speed sha256
Doing sha256 for 3s on 16 size blocks: 9207283 sha256's in 3.00s
Doing sha256 for 3s on 64 size blocks: 6725254 sha256's in 3.00s
Doing sha256 for 3s on 256 size blocks: 3718736 sha256's in 2.99s
Doing sha256 for 3s on 1024 size blocks: 1333599 sha256's in 3.00s
Doing sha256 for 3s on 8192 size blocks: 190737 sha256's in 3.00s
Doing sha256 for 3s on 16384 size blocks: 96385 sha256's in 2.99s
OpenSSL 1.1.1  11 Sep 2018
built on: Tue Nov 12 16:58:35 2019 UTC
options:bn(64,64) rc4(char) des(int) aes(partial) blowfish(ptr) 
compiler: gcc -fPIC -pthread -Wa,--noexecstack -Wall -Wa,--noexecstack -g -O2 -fdebug-prefix-map=/build/openssl-J6qvxk/openssl-1.1.1=. -fstack-protector-strong -Wformat -Werror=format-security -DOPENSSL_USE_NODELETE -DOPENSSL_PIC -DOPENSSL_CPUID_OBJ -DOPENSSL_BN_ASM_MONT -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DKECCAK1600_ASM -DVPAES_ASM -DECP_NISTZ256_ASM -DPOLY1305_ASM -DNDEBUG -Wdate-time -D_FORTIFY_SOURCE=2
The 'numbers' are in 1000s of bytes per second processed.
type             16 bytes     64 bytes    256 bytes   1024 bytes   8192 bytes  16384 bytes
sha256           49105.51k   143472.09k   318393.45k   455201.79k   520839.17k   528151.12k

alvarow
Posts: 47
Joined: Wed Apr 10, 2019 10:44 pm
languages_spoken: english
ODROIDs: N2
Has thanked: 22 times
Been thanked: 1 time
Contact:

Re: Any plan for basic mainline linux support?

Unread post by alvarow » Fri Feb 21, 2020 1:29 am

Thanks for the quick reply... seem to be a lot worse :-/ this is what I am getting on the latest 4.9.213-67 HK kernel.

Code: Select all

alvarow@odroid:~$ openssl speed sha256
Doing sha256 for 3s on 16 size blocks: 16253732 sha256's in 3.00s
Doing sha256 for 3s on 64 size blocks: 12103863 sha256's in 3.00s
Doing sha256 for 3s on 256 size blocks: 6691060 sha256's in 3.00s
Doing sha256 for 3s on 1024 size blocks: 2399909 sha256's in 3.00s
Doing sha256 for 3s on 8192 size blocks: 343362 sha256's in 3.00s
Doing sha256 for 3s on 16384 size blocks: 173478 sha256's in 3.00s
OpenSSL 1.1.1  11 Sep 2018
built on: Tue Nov 12 16:58:35 2019 UTC
options:bn(64,64) rc4(char) des(int) aes(partial) blowfish(ptr)
compiler: gcc -fPIC -pthread -Wa,--noexecstack -Wall -Wa,--noexecstack -g -O2 -fdebug-prefix-map=/build/openssl-J6qvxk/openssl-1.1.1=. -fstack-protector-strong -Wformat -Werror=format-security -DOPENSSL_USE_NODELETE -DOPENSSL_PIC -DOPENSSL_CPUID_OBJ -DOPENSSL_BN_ASM_MONT -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DKECCAK1600_ASM -DVPAES_ASM -DECP_NISTZ256_ASM -DPOLY1305_ASM -DNDEBUG -Wdate-time -D_FORTIFY_SOURCE=2
The 'numbers' are in 1000s of bytes per second processed.
type             16 bytes     64 bytes    256 bytes   1024 bytes   8192 bytes  16384 bytes
sha256           86686.57k   258215.74k   570970.45k   819168.94k   937607.17k   947421.18k
alvarow@odroid:~$ uname -a
Linux odroid 4.9.213-67 #1 SMP PREEMPT Thu Feb 13 14:59:00 -03 2020 aarch64 aarch64 aarch64 GNU/Linux
Thanks

alvarow
Posts: 47
Joined: Wed Apr 10, 2019 10:44 pm
languages_spoken: english
ODROIDs: N2
Has thanked: 22 times
Been thanked: 1 time
Contact:

Re: Any plan for basic mainline linux support?

Unread post by alvarow » Fri Feb 21, 2020 1:43 am

Would passing kernel compilation flags improve things, I wonder?

For the stuff I compile, I've been setting my gcc flags as:

Code: Select all

CFLAGS="-march=armv8-a+crypto+crc -mtune=cortex-a73.cortex-a53 -mfix-cortex-a53-835769 -mfix-cortex-a53-843419 -pipe -fpie -O3"
CXXFLAGS="-march=armv8-a+crypto+crc -mtune=cortex-a73.cortex-a53 -mfix-cortex-a53-835769 -mfix-cortex-a53-843419 -pipe -fpie -O3"
LDFLAGS="-pie"
As per https://gcc.gnu.org/onlinedocs/gcc/AArch64-Options.html, seems enabling "+crc" and "+crypto" implies all the rest the a73/53 support:

Code: Select all

$ grep Features /proc/cpuinfo  | tail -1
Features        : fp asimd evtstrm aes pmull sha1 sha2 crc32
and seem to confirm those are the right flags for gcc

Code: Select all

alvarow@odroid:~/src$ gcc -c -Q -march=native --help=target
The following options are target specific:
  -mabi=ABI                             lp64
  -march=ARCH                           armv8-a+crypto+crc
  -mbig-endian                          [disabled]
  -mbionic                              [disabled]
  -mcmodel=                             small
  -mcpu=CPU
  -mfix-cortex-a53-835769               [enabled]
  -mfix-cortex-a53-843419               [enabled]
  -mgeneral-regs-only                   [disabled]
  -mglibc                               [enabled]
  -mlittle-endian                       [enabled]
  -mmusl                                [disabled]
  -momit-leaf-frame-pointer             [enabled]
  -moverride=STRING
  -mpc-relative-literal-loads           [enabled]
  -msign-return-address=                none
  -mstrict-align                        [disabled]
  -mtls-dialect=                        desc
  -mtls-size=                           24
  -mtune=CPU
  -muclibc                              [disabled]

elatllat
Posts: 1690
Joined: Tue Sep 01, 2015 8:54 am
languages_spoken: english
ODROIDs: XU4, N1, N2
Has thanked: 31 times
Been thanked: 96 times
Contact:

Re: Any plan for basic mainline linux support?

Unread post by elatllat » Fri Feb 21, 2020 2:33 am

alvarow, sorry I was using the ondemand governor, with the performance one:

Code: Select all

N2> openssl speed sha256
Doing sha256 for 3s on 16 size blocks: 12573250 sha256's in 2.99s
Doing sha256 for 3s on 64 size blocks: 9550737 sha256's in 3.00s
Doing sha256 for 3s on 256 size blocks: 5641306 sha256's in 3.00s
Doing sha256 for 3s on 1024 size blocks: 2515356 sha256's in 3.00s
Doing sha256 for 3s on 8192 size blocks: 364191 sha256's in 2.99s
Doing sha256 for 3s on 16384 size blocks: 183920 sha256's in 3.00s
OpenSSL 1.1.1  11 Sep 2018
built on: Tue Nov 12 16:58:35 2019 UTC
options:bn(64,64) rc4(char) des(int) aes(partial) blowfish(ptr) 
compiler: gcc -fPIC -pthread -Wa,--noexecstack -Wall -Wa,--noexecstack -g -O2 -fdebug-prefix-map=/build/openssl-J6qvxk/openssl-1.1.1=. -fstack-protector-strong -Wformat -Werror=format-security -DOPENSSL_USE_NODELETE -DOPENSSL_PIC -DOPENSSL_CPUID_OBJ -DOPENSSL_BN_ASM_MONT -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DKECCAK1600_ASM -DVPAES_ASM -DECP_NISTZ256_ASM -DPOLY1305_ASM -DNDEBUG -Wdate-time -D_FORTIFY_SOURCE=2
The 'numbers' are in 1000s of bytes per second processed.
type             16 bytes     64 bytes    256 bytes   1024 bytes   8192 bytes  16384 bytes
sha256           67281.61k   203749.06k   481391.45k   858574.85k   997810.26k  1004448.43k
It seems the 2nd cpufreq policy not showing up on some boots is still an issue.

alvarow
Posts: 47
Joined: Wed Apr 10, 2019 10:44 pm
languages_spoken: english
ODROIDs: N2
Has thanked: 22 times
Been thanked: 1 time
Contact:

Re: Any plan for basic mainline linux support?

Unread post by alvarow » Fri Feb 21, 2020 11:43 am

That's much better! Thanks for the reply! I am headless setup, so I'll give it a whirl!

elatllat
Posts: 1690
Joined: Tue Sep 01, 2015 8:54 am
languages_spoken: english
ODROIDs: XU4, N1, N2
Has thanked: 31 times
Been thanked: 96 times
Contact:

Re: Any plan for basic mainline linux support?

Unread post by elatllat » Mon Feb 24, 2020 10:38 pm


erm67
Posts: 28
Joined: Sat Jun 22, 2019 10:53 pm
languages_spoken: english,german,italian
ODROIDs: N2
Has thanked: 1 time
Been thanked: 2 times
Contact:

Re: Any plan for basic mainline linux support?

Unread post by erm67 » Fri Feb 28, 2020 7:36 pm

alvarow wrote:
Fri Feb 21, 2020 1:43 am
Would passing kernel compilation flags improve things, I wonder?
Nobody really knows for sure
alvarow wrote:
Fri Feb 21, 2020 1:43 am
For the stuff I compile, I've been setting my gcc flags as:

Code: Select all

CFLAGS="-march=armv8-a+crypto+crc -mtune=cortex-a73.cortex-a53 -mfix-cortex-a53-835769 -mfix-cortex-a53-843419 -pipe -fpie -O3"
CXXFLAGS="-march=armv8-a+crypto+crc -mtune=cortex-a73.cortex-a53 -mfix-cortex-a53-835769 -mfix-cortex-a53-843419 -pipe -fpie -O3"
LDFLAGS="-pie"
Yes finally with gcc 9 -march=native recognizes correctly features on arm/aarch64, but unlike on x86/x86_64 the cache size is not automatically detected by -march=native

I use this, but it should be the same as -march=native:

Code: Select all

CFLAGS="-march=armv8-a+crc+crypto -mcpu=cortex-a73.cortex-a53+crc+crypto -mtune=cortex-a73.cortex-a53 --param l1-cache-size=64 --param l1-cache-line-size=64 --param l2-cache-size=1024"
These users thanked the author erm67 for the post:
alvarow (Sat Feb 29, 2020 11:32 am)

jgmdev
Posts: 25
Joined: Tue Jan 28, 2020 2:28 pm
languages_spoken: english, spanish
ODROIDs: U2, N2
Has thanked: 9 times
Been thanked: 5 times
Contact:

Re: Any plan for basic mainline linux support?

Unread post by jgmdev » Sat Feb 29, 2020 1:46 am

elatllat wrote:
Fri Feb 21, 2020 2:33 am
...
It seems the 2nd cpufreq policy not showing up on some boots is still an issue.
I also confirm that even on kernel 5.6RC3 the cpufreq driver doesn't works on the four A53 cores on most boots. These four cores seem to stay at a frequency of 667Mhz when this happens.

elatllat
Posts: 1690
Joined: Tue Sep 01, 2015 8:54 am
languages_spoken: english
ODROIDs: XU4, N1, N2
Has thanked: 31 times
Been thanked: 96 times
Contact:

Re: Any plan for basic mainline linux support?

Unread post by elatllat » Sat Feb 29, 2020 10:14 am


alvarow
Posts: 47
Joined: Wed Apr 10, 2019 10:44 pm
languages_spoken: english
ODROIDs: N2
Has thanked: 22 times
Been thanked: 1 time
Contact:

Re: Any plan for basic mainline linux support?

Unread post by alvarow » Sat Feb 29, 2020 11:35 am

erm67 wrote:
Fri Feb 28, 2020 7:36 pm
Yes finally with gcc 9 -march=native recognizes correctly features on arm/aarch64, but unlike on x86/x86_64 the cache size is not automatically detected by -march=native

I use this, but it should be the same as -march=native:

Code: Select all

CFLAGS="-march=armv8-a+crc+crypto -mcpu=cortex-a73.cortex-a53+crc+crypto -mtune=cortex-a73.cortex-a53 --param l1-cache-size=64 --param l1-cache-line-size=64 --param l2-cache-size=1024"
Apparently, it seems -mcpu=native is the way to go, according to this article at https://community.arm.com/developer/too ... e-and-mcpu

erm67
Posts: 28
Joined: Sat Jun 22, 2019 10:53 pm
languages_spoken: english,german,italian
ODROIDs: N2
Has thanked: 1 time
Been thanked: 2 times
Contact:

Re: Any plan for basic mainline linux support?

Unread post by erm67 » Tue Mar 03, 2020 7:18 am

Yes use -mcpu=native it is the simplest way if the compiler supports it, but since there were some problem in the past with gcc failing to recognize it is better to check ......

In that old CFLAGS that I used with older gcc I simply manually specified all possible extensions, it is certainly redundant but correct, gcc doesn't complain.

Code: Select all

erm67 ~ # gcc -march=native -E -v - </dev/null 2>&1 | grep cc1
 /usr/libexec/gcc/aarch64-unknown-linux-gnu/9.2.0/cc1 -E -quiet -v - -mlittle-endian -mabi=lp64 -march=armv8-a+crypto+crc
Using arch=native will enable the crc extension

Code: Select all

erm67 ~ # gcc -mcpu=native -E -v - </dev/null 2>&1 | grep cc1
 /usr/libexec/gcc/aarch64-unknown-linux-gnu/9.2.0/cc1 -E -quiet -v - -mlittle-endian -mabi=lp64 -mcpu=cortex-a73.cortex-a53+crypto
Using cpu=native should be the correct way to go on arm, it correctly guesses the cpu but for some unknown reasons it will not use the crc extensions (gcc bug????)

Code: Select all

erm67 ~ # gcc -march=armv8-a+crc+crypto -mcpu=cortex-a73.cortex-a53+crc+crypto -mtune=cortex-a73.cortex-a53  -E -v - </dev/null 2>&1 | grep cc1
 /usr/libexec/gcc/aarch64-unknown-linux-gnu/9.2.0/cc1 -E -quiet -v - -march=armv8-a+crc+crypto -mcpu=cortex-a73.cortex-a53+crc+crypto -mtune=cortex-a73.cortex-a53 -mlittle-endian -mabi=lp64
This way I choose to specify everything, the code generated is also different, actually I have no idea if it is faster or not but there is a long series of bug regarding gcc misdetection of cpu features and specifying all options doesn't hurt, I use the CFLAGS on gentoo and compile the entire system with them, no problems at all.

brad
Posts: 1063
Joined: Tue Mar 29, 2016 1:22 pm
languages_spoken: english
ODROIDs: C2 N1 N2 H2 (64 bit ftw)
Location: Australia
Has thanked: 29 times
Been thanked: 56 times
Contact:

Re: Any plan for basic mainline linux support?

Unread post by brad » Wed Mar 04, 2020 5:49 pm

erm67 wrote:
Tue Mar 03, 2020 7:18 am
Using cpu=native should be the correct way to go on arm, it correctly guesses the cpu but for some unknown reasons it will not use the crc extensions (gcc bug????)
aarch64 is relatively new with some big changes with each version. I noticed with earlier versions features were missing and -march=native would get it less than optimal. linaro versions of gcc and toolchains also differed.

You can check different features supported by different versions on vanilla gcc in the doco

eg:

https://gcc.gnu.org/onlinedocs/gcc-7.4. ... 64-Options
https://gcc.gnu.org/onlinedocs/gcc-8.3. ... 64-Options
https://gcc.gnu.org/onlinedocs/gcc-9.2. ... 64-Options

I didn't really notice much difference in performance compiling kernels but I did with things like openssl (was testing on Odroid C2 at the time). -march=native chooses much better options in gcc8 or gcc9

elatllat
Posts: 1690
Joined: Tue Sep 01, 2015 8:54 am
languages_spoken: english
ODROIDs: XU4, N1, N2
Has thanked: 31 times
Been thanked: 96 times
Contact:

Re: Any plan for basic mainline linux support?

Unread post by elatllat » Sat Mar 07, 2020 1:59 am


nick793
Posts: 36
Joined: Mon Jun 24, 2019 9:35 pm
languages_spoken: english
ODROIDs: N2, GO
Has thanked: 0
Been thanked: 2 times
Contact:

Re: Any plan for basic mainline linux support?

Unread post by nick793 » Tue Mar 10, 2020 10:17 pm

hi everyone,

thanks for all the work you all have been doing to get us up to mainline! I had one question regarding the 5.4.y kernels that I was hoping to confirm before migrating to the latest Armbian with 5.4.y...

I've heard that while most kernel features are working and fairly stable with 5.4, do we have an unstable modules/features that could potentially break an mdadm raid5 array? I want to try the new kernel, but a comment elsewhere that DVFS isn't stable has me a tad concerned. I don't need a desktop/audio since this box is working as a NAS, but I was hoping to confirm that we're somewhat stable before jumping ship. I figured you all know more than me :D

elatllat
Posts: 1690
Joined: Tue Sep 01, 2015 8:54 am
languages_spoken: english
ODROIDs: XU4, N1, N2
Has thanked: 31 times
Been thanked: 96 times
Contact:

Re: Any plan for basic mainline linux support?

Unread post by elatllat » Tue Mar 10, 2020 11:49 pm

RAID stability should be unrelated to the SOC. I use lvm raid, but I did test mdadm ~4 months ago without issue. I use (and you will want) scripts to warn if there is only one DVFS policy, and to set them to performance (because ondemand is more like 1/2 speed all the time).

nick793
Posts: 36
Joined: Mon Jun 24, 2019 9:35 pm
languages_spoken: english
ODROIDs: N2, GO
Has thanked: 0
Been thanked: 2 times
Contact:

Re: Any plan for basic mainline linux support?

Unread post by nick793 » Wed Mar 11, 2020 2:46 am

elatllat wrote:
Tue Mar 10, 2020 11:49 pm
RAID stability should be unrelated to the SOC. I use lvm raid, but I did test mdadm ~4 months ago without issue. I use (and you will want) scripts to warn if there is only one DVFS policy, and to set them to performance (because ondemand is more like 1/2 speed all the time).
Ok, awesome that's great to hear! Regarding DVFS, I usually don't mess around with it, but I've noticed on the Armbian 5.4.21 image that I'm only able to adjust the CPU governor on cpu0/cpu1. Is that an issue on all 5.4 builds or would a reboot resolve this? Would you mind sharing the script you're running for DVFS policies?

elatllat
Posts: 1690
Joined: Tue Sep 01, 2015 8:54 am
languages_spoken: english
ODROIDs: XU4, N1, N2
Has thanked: 31 times
Been thanked: 96 times
Contact:

Re: Any plan for basic mainline linux support?

Unread post by elatllat » Wed Mar 11, 2020 2:58 am

Code: Select all

#!/bin/bash

#
# set_governors.sh
#

V=performance
E=2;
C="$(ls -1 /sys/devices/system/cpu/cpufreq/ | grep -c pol)"
if [ $C -lt $E ] ; then
	echo -e "missing cpufreq policy, found $C expecting $E.\nPlease try again after a reboot" >&2
	exit 1
fi
cd /sys/devices/system/cpu/cpufreq
for P in policy* ; do
	echo $V > "$P/scaling_governor"
done

tombriden
Posts: 19
Joined: Wed Mar 16, 2016 6:37 pm
languages_spoken: english
ODROIDs: C1 + eMMC
XU4 + Samsung EVO 850 over USB3
Has thanked: 0
Been thanked: 3 times
Contact:

Re: Any plan for basic mainline linux support?

Unread post by tombriden » Wed Mar 11, 2020 4:49 am

Hi, I've found you can consistently get DVFS policy on all cores by setting

Code: Select all

CONFIG_PWM_MESON=y
instead of building it as a module. I guess if it's a module and isn't loaded in time the policy isn't being applied properly?
These users thanked the author tombriden for the post (total 3):
jgmdev (Wed Mar 11, 2020 6:40 am) • odroid (Wed Mar 11, 2020 10:48 am) • brad (Fri Mar 13, 2020 2:39 pm)

elatllat
Posts: 1690
Joined: Tue Sep 01, 2015 8:54 am
languages_spoken: english
ODROIDs: XU4, N1, N2
Has thanked: 31 times
Been thanked: 96 times
Contact:

Re: Any plan for basic mainline linux support?

Unread post by elatllat » Wed Mar 11, 2020 10:09 am

tombriden wrote:
Wed Mar 11, 2020 4:49 am
Hi, I've found you can consistently get DVFS policy on all cores by setting

Code: Select all

CONFIG_PWM_MESON=y
instead of building it as a module. I guess if it's a module and isn't loaded in time the policy isn't being applied properly?
Thanks,
That might be hard to test given the intermediates of the issue but I have added that and will post here if data to the contrary shows up.

jgmdev
Posts: 25
Joined: Tue Jan 28, 2020 2:28 pm
languages_spoken: english, spanish
ODROIDs: U2, N2
Has thanked: 9 times
Been thanked: 5 times
Contact:

Re: Any plan for basic mainline linux support?

Unread post by jgmdev » Wed Mar 11, 2020 11:36 am

I have already compiled Linux 5.6 RC5 with that option set to yes to build statically instead of module and so far I have booted the little device 3 times and governors are working as they should on all cores, the governor on xfce cpu information shows as cpufreq-dt. So far the most annoying issue on mainline kernel is reddish screen output compared to more accurate colors on hardkernel maintained 4.9 kernel and no sound driver, but since I have a usb audio adapter I don't care much (maybe I just need to enable something to get sound on mainline but don't know what). I don't know if this is a placebo effect but Linux 5.6 RC5 feels snappier on performance governor than previous releases of mainline...

In any case I put up a linux-aarch64-rc PKGBUILD for archlinux with 32bits binary support in order to be able to run armv7 binaries and now CONFIG_PWM_MESON=y here: https://aur.archlinux.org/packages/linu ... rc-32bits/

Edit: Kernel Builds

I uploaded the builds to mega in case someone using archlinux wants to save the time building and give it a test:

Kernel package:
https://mega.nz/#!bdlhjSzA!CpwsT87nbJTN ... 9G3POPg1eo

Headers package:
https://mega.nz/#!nQ03hSZA!LU2mYhBcx-ON ... YP3vtrs47Y

brad
Posts: 1063
Joined: Tue Mar 29, 2016 1:22 pm
languages_spoken: english
ODROIDs: C2 N1 N2 H2 (64 bit ftw)
Location: Australia
Has thanked: 29 times
Been thanked: 56 times
Contact:

Re: Any plan for basic mainline linux support?

Unread post by brad » Wed Mar 11, 2020 2:50 pm

jgmdev wrote:
Wed Mar 11, 2020 11:36 am
I have already compiled Linux 5.6 RC5 with that option set to yes to build statically instead of module and so far I have booted the little device 3 times and governors are working as they should on all cores, the governor on xfce cpu information shows as cpufreq-dt. So far the most annoying issue on mainline kernel is reddish screen output compared to more accurate colors on hardkernel maintained 4.9 kernel and no sound driver, but since I have a usb audio adapter I don't care much (maybe I just need to enable something to get sound on mainline but don't know what). I don't know if this is a placebo effect but Linux 5.6 RC5 feels snappier on performance governor than previous releases of mainline...
I had seen Kevin Hilman mention CONFIG_PWM_MESON=y as a fix in the amlogic mailing lists also, makes sense for the issues I was experiencing also with Realtime kernel. PWM is used to generate the CPU frequencies for the domains as I understand it.

jgmdev
Posts: 25
Joined: Tue Jan 28, 2020 2:28 pm
languages_spoken: english, spanish
ODROIDs: U2, N2
Has thanked: 9 times
Been thanked: 5 times
Contact:

Re: Any plan for basic mainline linux support?

Unread post by jgmdev » Thu Mar 12, 2020 12:58 am

brad wrote:
Wed Mar 11, 2020 2:50 pm
I had seen Kevin Hilman mention CONFIG_PWM_MESON=y as a fix in the amlogic mailing lists also, makes sense for the issues I was experiencing also with Realtime kernel. PWM is used to generate the CPU frequencies for the domains as I understand it.
Also there is an old RFC discussion from Oct 2019 where the PWM_MESON is being proposed to be changed to Y to fix a uboot issue related with SD:

https://lore.kernel.org/linux-amlogic/2 ... gmail.com/

nick793
Posts: 36
Joined: Mon Jun 24, 2019 9:35 pm
languages_spoken: english
ODROIDs: N2, GO
Has thanked: 0
Been thanked: 2 times
Contact:

Re: Any plan for basic mainline linux support?

Unread post by nick793 » Fri Mar 13, 2020 7:43 am

Setting that config seemed to do the trick! igorpec merged this change into the armbian build script and first boot with a freshly compiled 5.4.25 and DVFS seemed fixed. Here's a benchmark:

Code: Select all

7-Zip (a) [64] 16.02 : Copyright (c) 1999-2016 Igor Pavlov : 2016-05-21
p7zip Version 16.02 (locale=C,Utf16=off,HugeFiles=on,64 bits,6 CPUs LE)

LE
CPU Freq:  1700  1702  1701  1700  1701  1701  1702  1702  1702

RAM size:    3698 MB,  # CPU hardware threads:   6
RAM usage:   1323 MB,  # Benchmark threads:      6

                       Compressing  |                  Decompressing
Dict     Speed Usage    R/U Rating  |      Speed Usage    R/U Rating
         KiB/s     %   MIPS   MIPS  |      KiB/s     %   MIPS   MIPS

22:       5619   476   1148   5466  |     122048   560   1858  10408
23:       6064   520   1189   6179  |     115220   542   1838   9970
24:       5819   516   1212   6258  |     118110   564   1839  10367
25:       5561   536   1184   6350  |     115677   562   1831  10295
----------------------------------  | ------------------------------
Avr:             512   1183   6063  |              557   1842  10260
Tot:             535   1512   8162

Monitoring output recorded while running the benchmark:

Time       big.LITTLE   load %cpu %sys %usr %nice %io %irq   CPU  C.St.
18:35:37: 1704/1896MHz  1.90  12%   2%   5%   0%   3%   1%     °C  0/10
18:35:42: 1704/1896MHz  1.75   4%   1%   2%   0%   0%   0%     °C  0/10
18:35:47: 1704/1896MHz  1.61   1%   0%   0%   0%   0%   0%     °C  0/10
18:35:54: 1704/1896MHz  1.80  59%   2%  57%   0%   0%   0%     °C  0/10
18:35:59: 1704/1896MHz  2.14  89%   1%  87%   0%   0%   0%     °C  0/10
18:36:04: 1704/1896MHz  2.61  86%   0%  84%   0%   0%   0%     °C  0/10
18:36:10: 1704/1896MHz  2.88  88%   2%  85%   0%   0%   1%     °C  0/10
18:36:16: 1704/1896MHz  3.21  96%   2%  92%   0%   0%   0%     °C  0/10
18:36:21: 1704/1896MHz  3.03  72%   1%  69%   0%   0%   0%     °C  0/10
18:36:26: 1704/1896MHz  3.43  95%   3%  90%   0%   0%   1%     °C  0/10
18:36:32: 1704/1896MHz  3.64  98%   3%  94%   0%   0%   1%     °C  0/10
18:36:38: 1704/1896MHz  4.37  96%   2%  93%   0%   0%   0%     °C  0/10

elatllat
Posts: 1690
Joined: Tue Sep 01, 2015 8:54 am
languages_spoken: english
ODROIDs: XU4, N1, N2
Has thanked: 31 times
Been thanked: 96 times
Contact:

Re: Any plan for basic mainline linux support?

Unread post by elatllat » Fri Mar 13, 2020 9:12 pm


alvarow
Posts: 47
Joined: Wed Apr 10, 2019 10:44 pm
languages_spoken: english
ODROIDs: N2
Has thanked: 22 times
Been thanked: 1 time
Contact:

Re: Any plan for basic mainline linux support?

Unread post by alvarow » Sun Mar 15, 2020 11:34 am

How do I get the kernel headers for 5.4.x ? Just grab the tarball from kernel.org and unpack it at /usr/src ? I use wireguard for VPN, which uses dkms, which depends on kernel headers to build the wireguard module.

Thanks

elatllat
Posts: 1690
Joined: Tue Sep 01, 2015 8:54 am
languages_spoken: english
ODROIDs: XU4, N1, N2
Has thanked: 31 times
Been thanked: 96 times
Contact:

Re: Any plan for basic mainline linux support?

Unread post by elatllat » Sun Mar 15, 2020 11:52 am

make headers_install

Or I upload it to my build.

alvarow
Posts: 47
Joined: Wed Apr 10, 2019 10:44 pm
languages_spoken: english
ODROIDs: N2
Has thanked: 22 times
Been thanked: 1 time
Contact:

Re: Any plan for basic mainline linux support?

Unread post by alvarow » Sun Mar 15, 2020 12:02 pm

thanks for the quick response, that was no good... I think I got it after I grabbed the kernel, unpacked it, then adjusted the symlinks dkms was looking (and I didn't know):

Code: Select all

root@odroid:/lib/modules/5.4.25-dirty# ln -s /usr/src/linux-5.4.25-dirty build
root@odroid:/lib/modules/5.4.25-dirty# ln -s /usr/src/linux-5.4.25-dirty source
cd source
zcat /proc/config.gz > .config
make oldconfig && make prepare
I will give 5.4.x a spin... I am using my N2 headless, is 5.5.x or 5.6.x more suitable?

alvarow
Posts: 47
Joined: Wed Apr 10, 2019 10:44 pm
languages_spoken: english
ODROIDs: N2
Has thanked: 22 times
Been thanked: 1 time
Contact:

Re: Any plan for basic mainline linux support?

Unread post by alvarow » Sun Mar 15, 2020 12:24 pm

Any chance you can include XFS module on your next build?

Thanks

elatllat
Posts: 1690
Joined: Tue Sep 01, 2015 8:54 am
languages_spoken: english
ODROIDs: XU4, N1, N2
Has thanked: 31 times
Been thanked: 96 times
Contact:

Re: Any plan for basic mainline linux support?

Unread post by elatllat » Sun Mar 15, 2020 1:07 pm

Will add xfs next weekend, 5.4 is supported for 1 year so I'm using that stable branch untill some new feature I want is available.
These users thanked the author elatllat for the post:
alvarow (Sun Mar 15, 2020 10:23 pm)

alvarow
Posts: 47
Joined: Wed Apr 10, 2019 10:44 pm
languages_spoken: english
ODROIDs: N2
Has thanked: 22 times
Been thanked: 1 time
Contact:

Re: Any plan for basic mainline linux support?

Unread post by alvarow » Sun Mar 15, 2020 1:26 pm

Cool, I can wait until next release, no need to for .25 I compiled it myself (I think it's been well over ten years last time I had to do similar hehe)

User avatar
tobetter
Posts: 4671
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: X, X2, U2, U3, XU3, C1
Location: Paju, South Korea
Has thanked: 88 times
Been thanked: 338 times
Contact:

Re: Any plan for basic mainline linux support?

Unread post by tobetter » Sun Mar 15, 2020 4:09 pm

I've managed the kernel package, specifically 5.4, and uploaded it to my private repository but most users are not aware of it unless using Debian/Ubuntu distro installed with the custom Netboot Installer. If anyone wants to try the kernel package without compiling by yourself, you can use the script to download and extract a recent kernel package from my repository.

Code: Select all

#!/bin/sh

KERNEL_URL=http://ppa.linuxfactory.or.kr/pool/main/l/linux
MAJOR=5
MINOR=4
PATCH=25
VERSION=${MAJOR}.${MINOR}.${PATCH}
CODENAME=disco

link=$(lynx -dump -listonly $KERNEL_URL | grep linux-image-${MAJOR}.${MINOR}.0-odroid-arm64 | grep ${VERSION} | grep ${CODENAME} | sort -nr | head -1 | awk '{print $2}')
package=${link#${KERNEL_URL}/}
header=$(echo $package | sed "s/image/headers/g")

for f in $package $header; do
        wget $KERNEL_URL/$f -P /tmp/ && ar x /tmp/$f data.tar.xz
        tar xJf data.tar.xz
        rm data.tar.xz
done
You can use 'vmlinuz-5.4.0-odroid-arm64' for the kernel image which is not compressed,

Code: Select all

$ ls boot   
System.map-5.4.0-odroid-arm64  config-5.4.0-odroid-arm64  vmlinuz-5.4.0-odroid-arm64
and drivers in lib/modules/5.4.0-odroid-arm64/

Code: Select all

$ ls lib/modules/5.4.0-odroid-arm64/
build  kernel  modules.builtin  modules.builtin.modinfo  modules.order  source
also, the device tree is like below.

Code: Select all

$ ls usr/lib/linux-image-5.4.0-odroid-arm64/amlogic/
meson-axg-s400.dtb                meson-gxbb-vega-s95-pro.dtb         meson-gxl-s905x-libretech-cc.dtb
meson-g12a-sei510.dtb             meson-gxbb-vega-s95-telos.dtb       meson-gxl-s905x-nexbox-a95x.dtb
meson-g12a-u200.dtb               meson-gxbb-wetek-hub.dtb            meson-gxl-s905x-p212.dtb
meson-g12a-x96-max.dtb            meson-gxbb-wetek-play2.dtb          meson-gxm-khadas-vim2.dtb
meson-g12b-a311d-khadas-vim3.dtb  meson-gxl-s805x-libretech-ac.dtb    meson-gxm-nexbox-a1.dtb
meson-g12b-odroid-n2.dtb          meson-gxl-s805x-p241.dtb            meson-gxm-q200.dtb
meson-g12b-s922x-khadas-vim3.dtb  meson-gxl-s905d-p230.dtb            meson-gxm-q201.dtb
meson-gxbb-nanopi-k2.dtb          meson-gxl-s905d-p231.dtb            meson-gxm-rbox-pro.dtb
meson-gxbb-nexbox-a95x.dtb        meson-gxl-s905d-phicomm-n1.dtb      meson-gxm-vega-s96.dtb
meson-gxbb-odroidc2.dtb           meson-gxl-s905w-p281.dtb            meson-sm1-khadas-vim3l.dtb
meson-gxbb-p200.dtb               meson-gxl-s905w-tx3-mini.dtb        meson-sm1-sei610.dtb
meson-gxbb-p201.dtb               meson-gxl-s905x-hwacom-amazetv.dtb  meson64_odroidc2.dtb
meson-gxbb-vega-s95-meta.dtb      meson-gxl-s905x-khadas-vim.dtb      meson64_odroidn2.dtb
These users thanked the author tobetter for the post:
alvarow (Sun Mar 15, 2020 10:23 pm)

alvarow
Posts: 47
Joined: Wed Apr 10, 2019 10:44 pm
languages_spoken: english
ODROIDs: N2
Has thanked: 22 times
Been thanked: 1 time
Contact:

Re: Any plan for basic mainline linux support?

Unread post by alvarow » Sun Mar 15, 2020 10:22 pm

From all I could test (IPv6 tunnel gateway, rsync client, ssl proxy and wireguard vpn server) everything seems ok so far. I have been having kernel panics with ---cut here--- for several months now, (below's an example before 5.4.x switch, it was running with on-demand), it only has been a few hours, but so far, no panics.

@tobebetter are those kernel packages candidates for the main distro and you are looking for testing? Else I'll stick with @elatllat build, that includes the USB fixes I need for my backups.

Code: Select all

Mar 12 19:15:22 odroid kernel: [10784.922711@5] ------------[ cut here ]------------
Mar 12 19:15:22 odroid kernel: [10784.922732@5] WARNING: CPU: 5 PID: 1514 at cpufreq_cpu_get+0xc0/0xd8
Mar 12 19:15:22 odroid kernel: [10784.922735@5] Modules linked in: xfs ipt_MASQUERADE wireguard(O) nf_nat_masquerade_ipv4 ip6_udp_tunnel udp_tunnel iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4 nf_nat ip6t_rt ip6t_REJECT nf_reject_ipv6 xt_tcpudp tun nf_conntrack_ipv6 nf_defrag_ipv6 xt_conntrack nf_conntrack cpufreq_ondemand squashfs cpufreq_powersave cpufreq_userspace cpufreq_conservative ip6table_filter ip6_tables iptable_filter rtc_pcf8563 ir_lirc_codec lirc_dev i2c_meson_master sit meson_ir tunnel4 ip_tunnel sch_fq_codel amvdec_vp9 amvdec_vc1 amvdec_real amvdec_mmpeg4 amvdec_mpeg4 amvdec_mpeg12 amvdec_mmjpeg amvdec_mjpeg amvdec_h265 amvdec_h264mvc amvdec_mh264 amvdec_h264 amvdec_avs stream_input decoder_common firmware media_clock nfsd auth_rpcgss nfs_acl lockd grace sunrpc ip_tables x_tables ipv6
Mar 12 19:15:22 odroid kernel: [10784.922857@5]
Mar 12 19:15:22 odroid kernel: [10784.922865@5] CPU: 5 PID: 1514 Comm: kworker/5:1 Tainted: G           O    4.9.213-67 #1
Mar 12 19:15:22 odroid kernel: [10784.922868@5] Hardware name: Hardkernel ODROID-N2 (DT)
Mar 12 19:15:22 odroid kernel: [10784.922879@5] Workqueue: events dbs_work_handler
Mar 12 19:15:22 odroid kernel: [10784.922885@5] task: ffffffc0c9ed8e00 task.stack: ffffffc0c75d4000
Mar 12 19:15:22 odroid kernel: [10784.922890@5] PC is at cpufreq_cpu_get+0xc0/0xd8
Mar 12 19:15:22 odroid kernel: [10784.922896@5] LR is at cpufreq_times_record_transition+0x34/0x78
Mar 12 19:15:22 odroid kernel: [10784.922901@5] R1  : ffffff800a8844f8, PFN: 2884
Mar 12 19:15:22 odroid kernel: [10784.922911@5] ------------[ cut here ]------------
Mar 12 19:15:22 odroid kernel: [10784.922922@5] WARNING: CPU: 5 PID: 1514 at vmalloc_to_page+0xd8/0xe8
Mar 12 19:15:22 odroid kernel: [10784.922924@5] Modules linked in: xfs ipt_MASQUERADE wireguard(O) nf_nat_masquerade_ipv4 ip6_udp_tunnel udp_tunnel iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4 nf_nat ip6t_rt ip6t_REJECT nf_reject_ipv6 xt_tcpudp tun nf_conntrack_ipv6 nf_defrag_ipv6 xt_conntrack nf_conntrack cpufreq_ondemand squashfs cpufreq_powersave cpufreq_userspace cpufreq_conservative ip6table_filter ip6_tables iptable_filter rtc_pcf8563 ir_lirc_codec lirc_dev i2c_meson_master sit meson_ir tunnel4 ip_tunnel sch_fq_codel amvdec_vp9 amvdec_vc1 amvdec_real amvdec_mmpeg4 amvdec_mpeg4 amvdec_mpeg12 amvdec_mmjpeg amvdec_mjpeg amvdec_h265 amvdec_h264mvc amvdec_mh264 amvdec_h264 amvdec_avs stream_input decoder_common firmware media_clock nfsd auth_rpcgss nfs_acl lockd grace sunrpc ip_tables x_tables ipv6
Mar 12 19:15:22 odroid kernel: [10784.923024@5]
Mar 12 19:15:22 odroid kernel: [10784.923030@5] CPU: 5 PID: 1514 Comm: kworker/5:1 Tainted: G           O    4.9.213-67 #1
Mar 12 19:15:22 odroid kernel: [10784.923032@5] Hardware name: Hardkernel ODROID-N2 (DT)
Mar 12 19:15:22 odroid kernel: [10784.923040@5] Workqueue: events dbs_work_handler
Mar 12 19:15:22 odroid kernel: [10784.923045@5] task: ffffffc0c9ed8e00 task.stack: ffffffc0c75d4000

User avatar
tobetter
Posts: 4671
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: X, X2, U2, U3, XU3, C1
Location: Paju, South Korea
Has thanked: 88 times
Been thanked: 338 times
Contact:

Re: Any plan for basic mainline linux support?

Unread post by tobetter » Sun Mar 15, 2020 11:06 pm

@alvarow, my kernel packages are building to support the Debian/Ubuntu OS installed with my Netboot Installer and ARM Mali supports. I am just sharing that the package can be useful if anyone hesitates to build.
viewtopic.php?f=182&t=37109

Actually, what I am wishing is that more developers/contributors are working together for better kernel support rather than having different clones. FYI, I've pushed my working branch for the kernel to Hardkernel's Github and the branch odroid-5.4.y contains the patches for ODROID-N2 as well as ODROID-XU4.
These users thanked the author tobetter for the post:
alvarow (Tue Mar 17, 2020 2:45 am)

elatllat
Posts: 1690
Joined: Tue Sep 01, 2015 8:54 am
languages_spoken: english
ODROIDs: XU4, N1, N2
Has thanked: 31 times
Been thanked: 96 times
Contact:

Re: Any plan for basic mainline linux support?

Unread post by elatllat » Sun Mar 15, 2020 11:08 pm

My build has 5 fixes to mainline (usb, speed, pwm, ram, size), only reason I'm building my own is I want weekly (same day) upstream security patches.
So if tobetter starts weekly builds with minimal diff from mainline I would use that.
The elec build has audio support, it might be nice to get that in a patch.
Last edited by elatllat on Mon Mar 16, 2020 5:13 am, edited 1 time in total.

Post Reply

Return to “General Topics”

Who is online

Users browsing this forum: No registered users and 2 guests