Manjaro ARM for the VIM3

works like a charm for me

2 Likes

Hello,
Are you going to upload new version of Manjaro for VIM3 (VIM3 Pro)?
Or have you dropped support?
I don`t see any updates since version 20.06 of 15 of June at osdn.net although
as far as I understand the general project is developing and version 20.10 already
exists.

Thank you for any kind of information.

Have always supported it just didnā€™t create new images as there was not much of update but as panfrost is ready we plan to have a vim3 image for 20.12 release.
Even with old image you can just update packages and it will be on latest packages.
I have been hosting the newer image on my server as osdn storage was full.
Khadas Vim

Thanks for asking.

3 Likes

Thank you so much for your reply and for the links.
Id like to try installing latest version of Manjaro on NVME SSD disk connected with new Khadas M2X board. Ive flashed Krescue uboot into SPI so I hope after switching to SPI boot in Krescue
it will detect and load Manjaro installation from NVME SSD.

Nice, that reminds me of ny m2x in my drawer but need nvme for that test. Currently cannot afford it maybe later in the future.

Do let me know how the test goes, I am not sure if M2x is upstreamed or part of linux kernel yet.

Good luck.

1 Like

Unfortunately you were absolutely right. It doesnā€™t work. Neither AML mainline uboot, nor Krescue
SPI uboot by Hyphop can detect and load anything from NVME M.2 SSD.
And only stock Android and VIM3_Ubuntu-xfce-bionic_Linux-4.9_arm64_SD-USB_V20191231 which uses legacy uboot or legacy kernel (I may be wrong) could detect it as an external drive. Unfortunately Manjaro 20.06 and VIM3_Ubuntu-gnome-focal_Linux-5.7-rc7_arm64_SD-USB_V0.9-20200530 either canā€™t see it and I donā€™t have other Linux distros installed into EMMC to test.

This is an Ubuntu-xfce-bionic_Linux-4.9 screenshot:

And this screenshot taken from Manjaro v.20.06

Unfortunately I couldnā€™t test it in other Linux distros.

I really hope that it will be made in the future builds because it really makes sense to have
an opportunity to load Linux from SSD disk taking into note its tremendous read/write speed comparing with SD card or USB.

hahaha, Thank you for the information, you saved my time :wink:

@hyphop @Frank do you have any patch for mainline kernel that is needed to get m2 support ?
If yes then please do share it as I have bought an M2 extension board and have never put it to test so far. I will patch it so we can do some testing on it.

Thank you.

@Spikerguy Hello , I have tested PCIE, it works normally, M2X is just a hardware connection, there is no related patch

Neither AML mainline uboot, nor Krescue
SPI uboot by Hyphop can detect and load anything from NVME M.2 SSD.

some correct info

  1. mainline uboot for amlogic still not support nvme
  2. linux kernel support OK
  3. krescue use same mainline linux kernel and same can use nvme without problem

PS: in any case its not problem - just make boot partition with kernel to emmc
and next rootfs and other partition can load from nvme

Hello hyphop

just make boot partition with kernel to emmc
and next rootfs and other partition can load from nvme

As Iā€™d like to keep Android in my emmc Iā€™m wondering is it possible to start Linux from NVME SSD disk like from USB or SDCard?
Or to make Linux Boot partition with kernel along with Android partition like with CoreElec installation in emmc allowing switching between Android and CoreElec?
Is there any possible workaround?

If you check my screenshot of Gparted made in Ubuntu-xfce-bionic_Linux-4.9 which detects SSD as an external drive (3 posts above) you will see that there are Boot Manjaro partition and Rootfs Manjaro flashed on nvme0n1 which is my SSD but nothing can load and start directly from this SSD

yes for example easiest way for u

boot uboot and linux kernel from SD card and continue load rootfs and other from nvme already

can you write a short manual of how to make it for noob users like me? :laughing:

I searched the forum and found several topics about nvme ssd issues.
For instance Iā€™ve found this:

I confirmed that I had set the correct portmode in Krescue. I have successfully partitioned and formatted the drive as ext4 in Ubuntu bionic with 4.9 kernel (I understand that the NVME driver may have been disabled in 5.7 due to stability issues).
M2X board with 1TB NVME running Android Pie or CoreElec

So Iā€™m wondering is there any way to enable NVME support in latest kernels and future Manjaro builds at least to have an ability to mount nvme ssd as external drive. Now it doesnā€™t work

Sounds good.

I need an nvme drive to test. :frowning:

I think the module is enabled. Unless it is something other than standard config.

@hyphop can you confirm which config is needed in latest kernel for m2 port to work?

1 Like

@Spikerguy Hello,

Iā€™ve managed to mount ssd on VIM3_Ubuntu-server-focal_Linux-5.7-rc7_arm64_SD-USB_V0.9-20200530 after adding this line to env.txt of boot:
# User kernel args
# Add customer kernel args here
user_kernel_args=nvme_core.default_ps_max_latency_us=200

so actually pcie is supported by latest kernels but possibly some wrong config settings prevented ssd from detecting by the board.

I think we could discuss it. :innocent:

3 Likes

Thatā€™s good to hear. Where did you get this argument from?

You should try the same with Manjaro and add it to extlinux.conf

1 Like

@Spikerguy,

I searched many topics related to nvme boot issues and should admit that there is not so much information.
Iā€™ve found some in Russian and Western Internet resources:



which were similar to my errors got in Ubuntu 5.7:
[    1.687553] nvme nvme0: pci function 0000:01:00.0
[    1.691600] nvme 0000:01:00.0: enabling device (0000 -> 0002)
[    1.700974] nvme nvme0: missing or invalid SUBNQN field.
[    1.702563] nvme nvme0: Shutdown timeout set to 8 seconds
[    1.770859] nvme nvme0: 6/0/0 default/read/poll queues
[    1.787665]  nvme0n1: p1 p2
[   33.757398] nvme nvme0: controller is down; will reset: CSTS=0xffffffff, PCI_STATUS=0x10
[   33.813949] blk_update_request: I/O error, dev nvme0n1, sector 488396928 op 0x0:(READ) flags 0x80700 phys_seg 1 prio class 0
[   33.853219] nvme 0000:01:00.0: enabling device (0000 -> 0002)
[   33.868044] nvme nvme0: Removing after probe failure status: -19

Iā€™m going to try adding the line to extlinux.conf as you advised
Should I make it that way:

APPEND root=LABEL=ROOT_MNJRO rootflags=data=writeback rw console=ttyAML0,115200n8 console=tty0 no_console_suspend consoleblank=0 fsck.fix=yes fsck.repair=yes net.ifnames=0 user_kernel_args=nvme_core.default_ps_max_latency_us=200 bootsplash.bootfile=bootsplash-themes/manjaro/bootsplash

Or to write it additionally in separate line?

Iā€™m not sure that it will help because unlike two Ubuntu distros I used Manjaro unfortunately gives no outputs to nvme related commands like lspci or dmesg | grep -i nvme

khadas@Khadas:~$ lspci
00:00.0 PCI bridge: Synopsys, Inc. DWC_usb3 / PCIe bridge (rev 01)
01:00.0 Non-Volatile memory controller: Samsung Electronics Co Ltd NVMe SSD Controller SM981/PM981/PM983

khadas@Khadas:~$ sudo dmesg|grep -i nvme
[sudo] password for khadas: 
[    0.800414] nvme nvme0: pci function 0000:01:00.0
[    0.800494] nvme 0000:01:00.0: enabling device (0000 -> 0002)
[    0.923610]  nvme0n1: p1 p2

khadas@Khadas:~$ sudo fdisk -l /dev/nvme0n1
Disk /dev/nvme0n1: 232,91 GiB, 250059350016 bytes, 488397168 sectors
Disk model: Samsung SSD 970 EVO Plus 250GB          
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x11ff4fbd

Device         Boot  Start      End  Sectors   Size Id Type
/dev/nvme0n1p1       62500   500000   437501 213,6M  c W95 FAT32 (LBA)
/dev/nvme0n1p2      500001 10885119 10385119     5G 83 Linux
1 Like

First i need to understand which config is needed in kernel config to make the linux kernel detect the nvme drive once we can see the drive then we can look into the booting side of it.

Update: Bought an nvme 256gb by kingston a2000 and it doesnā€™t seem to detect on Manjaro even when using mainline kernel.

@hyphop or @frank can you share which kernel config is needed for m2 to work on mainline?
As you said the dtb have m2 support already then please share what module is needed to get it to work.

Thanks.

Update: I found something on Kernel side which I remember now that USB3 and M2 PCIE is muxed.

So we need to enable kbi or something to make it use pcie instead of the usb3 connector.
Or patch this dts by uncommented those lines.

I also see a patch for pcie in fenix git. @numbqq can you help me understand why 0092-VIM3-hack-for-PCIe.patch is needed?

1 Like

The PCIe/USB3 switch can be accessed from the command line as shown in Khadas Docs.

2 Likes

Thanks @RDFTKV This helped but not without a custom dtb with pcie enabled.
Finally I can see it visible in lsblk

What is needed:

  1. Enable kbi to PCIE Mode using this guide.
  2. Change dtb to pcie enabled version which I build, Will share the dtb here later.

Add-pcie-vim3-makefile.patch

meson-g12b-a311d-khadas-vim3-pcie.dtb

Try this dtb and also change it to pcie using uboot kbi steps.

There seems to be some problem when using NVME,
When NVME is being used the screen would keep flickering and glitching all the time. without the nvme it will not do this.

3 Likes