Skip to contentSkip to conversation

Amlogic support on Alpine Linux

DISCUSSION He Yangxuan 2 participants 3 messages Nov 28, 2018 – Dec 3, 2018 Arm/Amlogic Meson SoC support

lore
Share & tools
lore
#0 lore raw

Hi Neil,

The alpine kernel package linux-amlogic have been merged in alpine upstream:
https://github.com/alpinelinux/aports/commit/8dc0e43d5a410a6f173c14caaa625adaf45f11f4
The current kernel config only include arm64, maybe somebody can add armhf or armv7
kernel config later.
And alpine u-boot package have add Odroid C2 support:
https://github.com/alpinelinux/aports/commit/706b2721976b16d73274f23966f3f1a5735bf301#diff-bf45357b9515f24851da3b650e49829e
will add Khadas Vim and Nanopi K2 in alpine u-boot package later.
So after the alpine builder build the package, we will have basic support for amlogic
devices in alpine.
I'm thinking about package mali driver. Based on this mail:
https://lists.infradead.org/pipermail/linux-amlogic/2017-June/004092.html
and Joseph's archlinuxarm package:
https://github.com/archlinuxarm/PKGBUILDs/blob/master/alarm/dkms-mali-utgard-meson
https://github.com/archlinuxarm/PKGBUILDs/blob/master/alarm/mali-utgard-meson-libgl
https://github.com/archlinuxarm/PKGBUILDs/tree/master/alarm/xf86-video-armsoc-meson
I have wrote the alpine APKBUILD for those three packages.
Most part is same as Joseph's work, but use your repositories as source.
Actually I want to add wayland support and video acceleration.
In your this releases: https://github.com/superna9999/meson_gx_mali_450/releases/download/for-4.15/buildroot_openlinux_kernel_4.9_20180131_mali.tar.gz
there are several libMali.so (r7p0/m450/dummy,fbdev,wayland,r7p0/m450-X), I should use which one for wayland or video?
And besides xf86-video-armsoc-meson do we still need xf86-video-fbdev or xf86-video-fbturbo?

Yangxuan

#1 lore raw

Hi Yangxuan,

Quoted 8 lines · He Yangxuan

Hi Neil,

The alpine kernel package linux-amlogic have been merged in alpine upstream:
https://github.com/alpinelinux/aports/commit/8dc0e43d5a410a6f173c14caaa625adaf45f11f4
The current kernel config only include arm64, maybe somebody can add armhf or armv7 kernel config later.
And alpine u-boot package have add Odroid C2 support:
https://github.com/alpinelinux/aports/commit/706b2721976b16d73274f23966f3f1a5735bf301#diff-bf45357b9515f24851da3b650e49829e

Good news, thanks for pushing this !

Quoted 1 line

will add Khadas Vim and Nanopi K2 in alpine u-boot package later.

Could you also add the libretech-cc ?

Quoted 5 lines

So after the alpine builder build the package, we will have basic support for amlogic devices in alpine.
I'm thinking about package mali driver. Based on this mail:
https://lists.infradead.org/pipermail/linux-amlogic/2017-June/004092.html
and Joseph's archlinuxarm package:

Quoted 8 lines

https://github.com/archlinuxarm/PKGBUILDs/blob/master/alarm/dkms-mali-utgard-meson
https://github.com/archlinuxarm/PKGBUILDs/blob/master/alarm/mali-utgard-meson-libgl
https://github.com/archlinuxarm/PKGBUILDs/tree/master/alarm/xf86-video-armsoc-meson
I have wrote the alpine APKBUILD for those three packages.
Most part is same as Joseph's work, but use your repositories as source.
Actually I want to add wayland support and video acceleration.
In your this releases: https://github.com/superna9999/meson_gx_mali_450/releases/download/for-4.15/buildroot_openlinux_kernel_4.9_20180131_mali.tar.gz
there are several libMali.so (r7p0/m450/dummy,fbdev,wayland,r7p0/m450-X), I should use which one for wayland or video?

For wayland you should obviously use the wayland one, but this one is buggy, you should take the ARM HiKey binary instead at https://developer.arm.com/-/media/Files/downloads/mali-drivers/user-space/hikey/mali-450_r7p0-01rel0_linux_1arm64.tar.gz?revision=b8764bbe-c4d6-4825-a0d9-bceca4ee4b2d

For video acceleration, Mali is not involved her at all.

Quoted 1 line

And besides xf86-video-armsoc-meson do we still need xf86-video-fbdev or xf86-video-fbturbo?

No, the armsoc driver doesn't need other x11 driver.

Neil

Quoted 3 lines

Yangxuan

#2 lore raw

Hi Neil,

Quoted 13 lines · Neil Armstrong

Hi Yangxuan,

Quoted 8 lines · He Yangxuan

Hi Neil,

The alpine kernel package linux-amlogic have been merged in alpine upstream:
https://github.com/alpinelinux/aports/commit/8dc0e43d5a410a6f173c14caaa625adaf45f11f4
The current kernel config only include arm64, maybe somebody can add armhf or armv7 kernel config later.
And alpine u-boot package have add Odroid C2 support:
https://github.com/alpinelinux/aports/commit/706b2721976b16d73274f23966f3f1a5735bf301#diff-bf45357b9515f24851da3b650e49829e

Quoted 5 lines

Good news, thanks for pushing this !

Quoted 1 line

will add Khadas Vim and Nanopi K2 in alpine u-boot package later.

Could you also add the libretech-cc ?

I have created git PR for libretech-cc: https://github.com/alpinelinux/aports/pull/5739

Quoted 14 lines
Quoted 5 lines

So after the alpine builder build the package, we will have basic support for amlogic devices in alpine.
I'm thinking about package mali driver. Based on this mail:
https://lists.infradead.org/pipermail/linux-amlogic/2017-June/004092.html
and Joseph's archlinuxarm package:

Quoted 8 lines

https://github.com/archlinuxarm/PKGBUILDs/blob/master/alarm/dkms-mali-utgard-meson
https://github.com/archlinuxarm/PKGBUILDs/blob/master/alarm/mali-utgard-meson-libgl
https://github.com/archlinuxarm/PKGBUILDs/tree/master/alarm/xf86-video-armsoc-meson
I have wrote the alpine APKBUILD for those three packages.
Most part is same as Joseph's work, but use your repositories as source.
Actually I want to add wayland support and video acceleration.
In your this releases: https://github.com/superna9999/meson_gx_mali_450/releases/download/for-4.15/buildroot_openlinux_kernel_4.9_20180131_mali.tar.gz
there are several libMali.so (r7p0/m450/dummy,fbdev,wayland,r7p0/m450-X), I should use which one for wayland or video?

Quoted 1 line

For wayland you should obviously use the wayland one, but this one is buggy, you should take the ARM HiKey binary instead at https://developer.arm.com/-/media/Files/downloads/mali-drivers/user-space/hikey/mali-450_r7p0-01rel0_linux_1arm64.tar.gz?revision=b8764bbe-c4d6-4825-a0d9-bceca4ee4b2d

I have tried the libMali.so, both of them work on debian stretch, but none of them work for alpine:

```
phicomm:~# LD_LIBRARY_PATH=/usr/lib/mali weston
Date: 2018-11-29 CST
[23:39:18.762] weston 5.0.0
               https://wayland.freedesktop.org
               Bug reports to: https://gitlab.freedesktop.org/wayland/weston/issues/
               Build: unknown (not built from git or tarball)
[23:39:18.763] Command line: weston
[23:39:18.763] OS: Linux, 4.18.18-0-amlogic, #1-Alpine SMP PREEMPT Tue Nov 27 13:19:48 UTC 2018, aarch64
[23:39:18.763] Starting with no config file.
[23:39:18.763] Output repaint window is 7 ms maximum.
[23:39:18.763] Loading module '/usr/lib/libweston-5/drm-backend.so'
[23:39:18.765] Failed to load module: Error relocating /usr/lib/libweston-5/drm-backend.so: gbm_bo_get_offset: symbol not found
[23:39:18.765] fatal: failed to create compositor backend
```

Maybe this related to alpine use musl instead of glibc(from readelf output, libMali.so need some glibc related shared library)? And if lima work for amlogic wayland now?

Quoted 1 line

For video acceleration, Mali is not involved her at all.

Still trying to get video acceleration work based on this posts:
https://forum.odroid.com/viewtopic.php?f=135&t=22717&start=900
Seems Maxime have got mpv with v4l2+drmprime in zerocopy use r7p0/m450/dummy/libMali.so .

Quoted 4 lines
Quoted 1 line

And besides xf86-video-armsoc-meson do we still need xf86-video-fbdev or xf86-video-fbturbo?

No, the armsoc driver doesn't need other x11 driver.

Yangxuan

_______________________________________________
linux-amlogic mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-amlogic