How to add pine64+ support

Hello,

I want to build a manjaro arm for my Pine64+. As it already exists for the pine64lTS, it should be just adding the dts for the pine64+. I already looked on the gitlab page but don't directly find where the devices are defined. So where should I begin.

The Pine64+ uses another uboot than Pine64-LTS, so you will need to add an extra device to the profiles. Then modify the tools to add the Pine64+ device where the sopine device is now, so it will flash the uboot the same way, but use the pine64+ uboot for it instead.

Strit,

I found how to add the profile and edit the functions.sh to add the pine64+. The only thing I don't find is how to add the pine64+ uboot to the build system. Should I make a PKGBUILD for it and inject it with the -i option?

Our uboot package actually already contains a u-boot binary for the pine64+.
You just need to make it use it in the functions.sh.

Which should be possible to just add [[ "$DEVICE" = "pine64" ]] to this line:

 ## For Allwinner devices
    elif [[ "$DEVICE" = "pinebook" ]] || [[ "$DEVICE" = "sopine" ]] || [[ "$DEVICE" = "pinephone" ]] || [[ "$DEVICE" = "pinetab" ]]; then

In the create_img() function.
Profile and other stuff for pine64+ must ofcourse be named the same everywhere. The reason it needs to be named pine64 and not pine64+ is because the u-boot binary is called u-boot-sunxi-with-spl-pine64.bin and not u-boot-sunxi-with-spl-pine64+.bin. :slight_smile:

PS: I will split these posts from this thread, since it's going way off topic.

Thank you, I understand it. I also found the pine64+ uboot now in the pkgbuild:

make pine64_plus_defconfig
echo 'CONFIG_IDENT_STRING=" Manjaro ARM"' >> .config
make EXTRAVERSION=-${pkgrel}
cat spl/sunxi-spl.bin u-boot.itb > u-boot-sunxi-with-spl-pine64.bin

So it's not a big job to implement the pine64+. If my build works, should I report it so you can include it in the official builds?

Gladly. Although I have no way of testing it. But if it works, please let me know what you did and I will implement it in the tools. :slight_smile:

Strit,

I managed to build a image that boots on the pine64+. The only thing I did was as you told me. I made a profiel "pine64" with following content:

## Maintained by Strit

# Kernel and bootloader stuff

linux-pine64
linux-pine64-headers
uboot-pine64-git

# Other device specific packages

pinebook-post-install

# Video drivers
xf86-video-fbturbo-git

And in the functions.sh I added [[ "$DEVICE" = "pine64" ]] where also the pineboot, sopine, etc where mentioned.

I build the image, burned it to SD and it booted. I must say it only booted on my second try. The first image I build didn't boot. I don't know why. I started fresh again and did try I second time and then it worked. Maybe the first time it was just a bad flash.

Thanks for the help and your scripts. Now I will explore it some more and play a little with the profile scripts.

Cool. I will add it to the tools, since it seems like an easy thing to do. :slight_smile:
Can you check if it boots with linux-aarch64 kernel? :slight_smile:
I would think it does, since it's basically a sopine.

Although, some stuff might be missing. Like sound. :slight_smile:

I will test all this, but didn't had time yet, just booting, the first run dialogue and explore the desktop.
I can not test the wifi as I don't have the wifi add-on.
In my libreelec build, the hdmi sound doesn't work but the analogue does. So it's possible it's the same here. Seems like it's a known problem.

Sound should work with the linux-pine64 kernel, since that's what the Pinebook uses, and it's basically the same board.

I am typing this now from my pine64+!

I checked the kernel and it's aarch64. Wifi works through usb. I tried a youtube video and it works also, but I don't have sound through hdmi, analogue works fine. So in fact the board is usable altough everything is rather slow, but it seems in use everything becomes better. Maybe it's just my sd-card that is rather slow.

3 Likes

I just tried with the 4.20 kernel, and with this one I have sound through hdmi. I also tested ethernet on both kernels and this one is working also.

Strit,

I found some time to check how it comes the hdmi sound doens't work in the 5.x kernels. Is it possible that it is because of line 1185 in the sun50i-a64.dtsi -> status="disabled":

	sound_hdmi: sound_hdmi {
		compatible = "simple-audio-card";
		simple-audio-card,format = "i2s";
		simple-audio-card,name = "allwinner,hdmi";
		simple-audio-card,mclk-fs = <256>;
		status = "disabled";

It is possible. But I don't know how it all fits together. I don't really know how these dts files work.

But, if you change the kernel to linux-pine64 it should work. It's the kernel we use on the Pinebook.

I use the linux-pine64 kernel and hdmi sound doesnt't work, analogue does. Maybe the pinebook uses analogue sound.
I will build a new kernel with a modified dts and try it.

I haven't tried HDMI sound on the pinebook. Only Speakers/Analog.

With latest 5.3.7-1-MANJARO-ARM kernel -> pacman -S linux-aarch64
I got HDMI sound working with a modified dtb. Problem with this kernel is that wifi and bluetooth don't work.
The point is that the 'i2S2' and 'sound_hdmi' sections are missing in sun50i-a64.dtsi.
I couldn't get it working in the linux-pine64 (anarsoul) kernel. Seems there is something broken in that kernel.

So let me see if I understand you.

With the mainline kernel linux-aarch64 you now have HDMI sound.
But it has no bluetooth.

But on Anaraouls kernel linux-pine64 you no longer have sound, but you have working bluetooth?

Yes,

with a modified DTB I have sound on mainline. I still have to make the patch. I think I also could wifi and bluetooth working by modifying the DTB.

On the anarsoul kernel I have crackling sound when patching the DTB. Wifi and bluetooth work out of the box on this kernel.

Forum kindly sponsored by