Building Debian ARM64


#1

Thanks for the team I got Debian armhf working with Raspberry HAT, now I’m stretching my goal.

This is my second attempt for Debian ARM64. Before armhf started working with HAT, I built it once with custom device tree but didn’t test throughout. This time I build on fresh cloned repository, everything as is from GitHub, I’m seeing different behaviors than the official armhf image:

PRO

  • Latest Chromium 73.xx works, which is great.
  • Bluetooth icon shows up on task bar by default

CON

  • No audio

I quickly went through kern.log on both builds, didn’t see any difference in grep lines of “audio”.

Could you please tell where to look for the audio and WiFi issues? Thanks.


#2

For wifi issue, you can install the ap6256-firmware package.


#3

My bad WiFi started after a while, I didn’t do anything particular, but still no audio. ARM64 seems playing video smoother than armhf though, armhf version is very choppy and GPU video decoding doesn’t work in Vivaldi (I guess it didn’t work in Chromium either but I already removed it can’t be sure)


#4

No wonder Chromium plays YouTube so much better under ARM64, I checked chrome://gpu, hardware acceleration is enabled, after tweaked chrome://flags a little, the video looks even better now. If the audio works I’ll migrate to ARM64 in a heart beat.

Under armhf, neither Chromium nor Vivaldi (they are the same under the hood) could use hardware acceleration. I don’t think the users could live with this in the long term.


#5

Compared the files related to es8316 on ARM64 and armhf back and forth, folder by folder, didn’t find anything suspicious. When playing video or music on ARM64, pulseaudio even show the playback level on “rockchip,es8316-codec Analog Stereo”, but nothing came out from the 3.5mm jack.


#6

I see the dtbs of ARM64 build are in /boot, which in /sys under armhf build. I don’t remember if it was built like this or after some updates/upgrades.
aplay -l outputs are identical from both sides.
speaker-tests runs the same on both side but only armhf made the noise.


#7

pulseaudio -vvvv
I: [pulseaudio] main.c: setrlimit(RLIMIT_NICE, (31, 31)) failed: Operation not permitted
I: [pulseaudio] main.c: setrlimit(RLIMIT_RTPRIO, (9, 9)) failed: Operation not permitted
D: [pulseaudio] core-rtclock.c: Timer slack is set to 50 us.
I: [pulseaudio] core-util.c: Failed to acquire high-priority scheduling: No such file or directory
I: [pulseaudio] main.c: This is PulseAudio 10.0
D: [pulseaudio] main.c: Compilation host: aarch64-unknown-linux-gnu
D: [pulseaudio] main.c: Compilation CFLAGS: -g -O2 -fdebug-prefix-map=/build/pulseaudio-d7Bnku/pulseaudio-10.0=. -fstack-protector-strong -Wformat -Werror=format-security -Wall -W -Wextra -pipe -Wno-long-long -Wno-overlength-strings -Wunsafe-loop-optimizations -Wundef -Wformat=2 -Wlogical-op -Wsign-compare -Wformat-security -Wmissing-include-dirs -Wformat-nonliteral -Wpointer-arith -Winit-self -Wdeclaration-after-statement -Wfloat-equal -Wmissing-prototypes -Wredundant-decls -Wmissing-declarations -Wmissing-noreturn -Wshadow -Wendif-labels -Wcast-align -Wstrict-aliasing -Wwrite-strings -Wno-unused-parameter -ffast-math -fno-common -fdiagnostics-show-option -fdiagnostics-color=auto
D: [pulseaudio] main.c: Running on host: Linux aarch64 4.4.154-73-rockchip-00007-g155a65a #2 SMP Thu Feb 28 19:53:25 CST 2019
D: [pulseaudio] main.c: Found 6 CPUs.
I: [pulseaudio] main.c: Page size is 4096 bytes
D: [pulseaudio] main.c: Compiled with Valgrind support: no
D: [pulseaudio] main.c: Running in valgrind mode: no
D: [pulseaudio] main.c: Running in VM: no
D: [pulseaudio] main.c: Optimized build: yes
D: [pulseaudio] main.c: FASTPATH defined, only fast path asserts disabled.
I: [pulseaudio] main.c: Machine ID is 0b63385b9cbcd1f14c587b3f5c8420c8.
I: [pulseaudio] main.c: Session ID is 1.
I: [pulseaudio] main.c: Using runtime directory /run/user/1002/pulse.
I: [pulseaudio] main.c: Using state directory /home/one/.pulse.
I: [pulseaudio] main.c: Using modules directory /usr/lib/pulse-10.0/modules.
I: [pulseaudio] main.c: Running in system mode: no
E: [pulseaudio] pid.c: Daemon already running.
E: [pulseaudio] main.c: pa_pid_file_create() failed.


#8

Darn it, that’s not the issue. The armhf side has the same errors but still has audio.


#9

Keep at it and thanks for the updates. :slight_smile:


#10

Is the kernel same in both armhf and arm64?


#11

I don’t know. I compiled arm64, and armhf was downloaded originally. I ran apt-get upgrade linux-4.4-lastest on both side though.

On both side, apt list linux-4.4-lastest shows the same:
apt list linux-4.4-lastest
Listing… Done
linux-4.4-lastest/unknown,now 4.4.154-73 all [installed]

uname -a:
arm64:
4.4.154-73-rockchip-00007-g155a65a #2 SMP Thu Feb 28 19:53:25 CST 2019 aarch64 GNU/Linux
armhf:
4.4.154 #13 SMP Mon Nov 5 18:25:35 CST 2018 aarch64 GNU/Linux

cat /proc/version:
arm64:
4.4.154-73-rockchip-00007-g155a65a (jenkins@mrs-ella) (gcc version 7.3.1 20180425 [linaro-7.3-2018.05 revision d29120a424ecfbc167ef90065c0eeb7f91977701] (Linaro GCC 7.3-2018.05) ) #2 SMP Thu Feb 28 19:53:25 CST 2019
armhf:
4.4.154 (v@mrs-hebe) (gcc version 7.3.1 20180425 [linaro-7.3-2018.05 revision d29120a424ecfbc167ef90065c0eeb7f91977701] (Linaro GCC 7.3-2018.05) ) #13 SMP Mon Nov 5 18:25:35 CST 2018

The size of /boot/Image are different, slightly bigger on arm64.


#12

I can confirm the refresh arm64 build out of the github repository source code, does NOT have sound.

I think the code I pulled is newer than the code built into the “official” armhf version.


#13

OK, I got audio on ARM64!

I copied rockpi-4b-linux.dtb from armhf side to arm64 side, I got audio, and GPU accelerated video is still working!

Decompiled the 2 dtbs, compared them side by side, there are some suspicious differences, but nothing explicitly says “audio”. If I have time, I will flip them one at a time could find it out, but I have more stuff to do so I’ll move on to the next page.

Debian arm64 that is it, latest Chromium, smooth YouTube with audio.


#14

Congratulations! Maybe share the image? :slight_smile:


#15

I’ll make a clean image and share on github.