NanoPi M4 running ArchlinuxARM

This is for ARMv8 based devices

NanoPi M4 running ArchlinuxARM

Postby rubenvb » Sun Apr 12, 2020 7:33 pm

Hi folks,

In the past few days I have gotten the basics laid out for Archlinux ARM on the NanoPi M4.

What does this mean?
Archlinux ARM can be installed on the NanoPi M4 in a similar manner as on the Rock64.
The instructions are almost identical, you only need to use different u-boot files.
What I did works on SD card and eMMC.

So everything is completely ready for X/Y/... on my NanoPi M4 running Archlinux ARM?
No. Definitely not. What I have tested and what works is the SATA hat, ethernet, and kodi on an X server running with panfrost open source drivers. The CPU is capable of decoding 1080p H264, but of course hardware acceleration would be much better.
Some work is needed for hardware accelerated video playback, wifi/bluetooth, and other things I'm not directly planning on using in the immediate future.
If you need a fully working media center, LibreElec has you covered. If you need a "full-fledged" OS, Armbian has a lot of work being put into the NanoPi M4.

What's next?
I planned on using this device as a NAS/HTPC combo. That means I will be looking at getting hardware accelerated video and HDMI passthrough audio working. This either means using the LibreElec kernel/kodi/ffmpeg/... (which means the binary blob mali driver and rkmpp for hardware acceleration) or getting bleeding-edge work on open source V4L2 request API based hardware decoding working and figuring out what changes need to be done to alsa and/or the kernel to allow for audio passthrough (which is the full open-source way and much more future-proof).

How do I test/replicate what you did?
You can follow the Rock64 instructions to the letter except the wget commands for the files contained in this zip:
https://github.com/rubenvb/PKGBUILDs/re ... opi-m4.zip

Where can I look at what you're doing?
All my work is here:
https://github.com/rubenvb/PKGBUILDs
Current work:
u-boot: https://github.com/rubenvb/PKGBUILDs/tr ... -nanopi-m4
linux 5.6.2 with latest V4L2 hardware decoding support: https://github.com/rubenvb/PKGBUILDs/tr ... ux-aarch64
The latter seems to work correctly (checked with v4l2-ctl) but I haven't gotten e.g. ffmpeg to use this capability.

I hope to get all this into Archlinux ARM but nobody has responded to my long-winded post asking what I'd need to do exactly to make that happen.
I'll keep this post updated when I figure out more stuff.
rubenvb
 
Posts: 8
Joined: Fri Feb 01, 2013 9:14 pm

Re: NanoPi M4 running ArchlinuxARM

Postby ElazarX » Sun Apr 19, 2020 6:46 pm

Hi Ruben,

I'm also owner of a Nano PI M4 (V1 - ordered early 2019) and I'm currently also trying get ArchLinuxArm in this device.

Unfortunetly I struggeled a lot and until now I wasn't able to make it run.

I tried also the Rock64 walkthrough. And also recognized that the mentioned u-boot files where mit Marching.

But unfortunetly also your provided files give me just a blank screen. No HDMI output.

Have you any Idea?

I also compiled u-boot for rk3399-nanopi-m4 and arm-trusted-firmware by my own and got a a working u-bootshell.
Unlucky me U-Boot will recognized a created boot.scr from scdard but ist not able to run the commands. If I type the commands in the shell then they will executed but ist hangs after "Starring Kernel".

If I try the extlinux option it stops by reading the kernel-image with an Error. I'm using the "Rockchip/rk3399-nanopi-m4.fdt".

Any ideas... hints?

KR,

Elazar
ElazarX
 
Posts: 1
Joined: Sun Apr 19, 2020 6:21 pm

Re: NanoPi M4 running ArchlinuxARM

Postby nano » Sat May 02, 2020 3:30 pm

Modified Rock64 instructions should work for M4, too. See viewtopic.php?f=67&t=13763#p62347.

For hardware accelerated (HA) V4L2 you have to
$this->bbcode_list('1')
  • compile kernel with CONFIG_VIDEO_HANTRO enabled
  • use a patched version of FFMPEG https://aur.archlinux.org/packages/ffmp ... quest-git/
  • compile Kodi 19-dev and use Kodi with gbm backend (X11 backend doesn't provide HA)
  • nano
     
    Posts: 4
    Joined: Sun Sep 22, 2019 7:58 am


    Return to ARMv8 Devices

    Who is online

    Users browsing this forum: No registered users and 12 guests