Building Debian ARM64


#1

This is an old post, please come to
New Custom Debian ARM64 Build 4.4.154.c83 is finally here! for the latest updates.

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.
  • GPU accelerated video streaming.
  • Bluetooth icon shows up on task bar by default

CON

  • No audio (fixed)

EDIT:
I uploaded my Debian ARM64 build on github, please let me know if there is any issue:
https://github.com/SX-GitHub/Debian-ARM64-RockPi4/releases

[04/12/2019: Please wait for my 2nd build, I’ll test it on multiple cards and eMMC before upload it to GitHub]

[04/20/2019]: Finally the new build is here, tested on microSD and eMMC:

I posted the summary of this build down below.

Latest screenshot (Running Google TPU board from Rock Pi4 Debian ARM64):


eMMC setup questions
#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.


#16

Any update on your new image?


#17

I’m working on it. I had been busy on building OpenHab2, too many issues (not on the RockPi’s part).


#18

Nice! I just got my rockpi4b today, looking forward to running that.


#19

I’m very much interested in your image being available.


#20

I have my Debian ARM64 image ready (1.2GB after compression), it’s too big for github (they have 25MB size limit), would you provide some space for sharing? Thanks

SUMMARY: Debian-ARM64 for RockPi4

This is a Debian ARM64 build using the source code from Radxa (the manufacturer)'s repository (https://github.com/radxa/rockchip-bsp), with extra customized features and tunings.

Installed Packages after Build:

  • auto-config
  • automake
  • make
  • cmake
  • xmms2
  • openssh-server (re-installed)
  • rsync
  • libmraa (build using the source code from https://github.com/brian541/mraa)
  • gnome-screenshot

Fonts:

  • SourceCodePro (Powerline fonts)
  • Dejavu (Powerline fonts)
  • fonts-noto (Google “no tofu” fonts)
  • fonts-noto-cjk (Google “no tofu” fonts)

Themes:

Tunings:

  • Enabled ttyS2 on GPIO pin 8/10 for HATs
  • Chromium GPU acceleration flags.
  • “Open Folder as Root” context menu in File Manager

Known Issues:

  • The libmraa from Radxa apt repository is not compatible with Debian ARM64, the upgrade should be set on hold:
    sudo apt-mark hold libmraa-rockpi4(This is fixed on Mar 31, no longer need to put the upgrade on hold)
  • The root partition of the image is 3.0GB, you may need to increase the partition on your microSD card/eMMC
  • Onboard Bluetooth is not working.