0
guidol

[Experiment] armbian on NanoPi A64

Recommended Posts

USB-Patch (for the upper port) did also work on the "new" debian Buster / armbian 5.86 :)

NanoPi_A64_Buster.jpg

 

NanoPi_A64_Buster_upper_USB.jpg

Share this post


Link to post
Share on other sites

Yesterday I did try 10 times to install Pihole to the NanoPi A64 (running debian buster), but got serveral unexpected restarts :(

After giving up yesterday and lying in the bed I did think about the cpu-frequencies.....

 

The original /etc/default/cpufrequtils file for debian buster (tweaked from Pine64) is:

ENABLE=true
MIN_SPEED=480000
MAX_SPEED=1200000
GOVERNOR=ondemand

but on the NanoPi A64 the frequency do start at 648000 and I dont know how high it could be stable (on the FriendlyArm Page the NanoPi A64 is advertised for 1152000). I got the NanoPi A64 serveral weeks running with SETI-Client and 960000

 

So I did try to install Pihole with:
 

ENABLE=true
MIN_SPEED=648000
MAX_SPEED=960000
GOVERNOR=conservative

And it succeeded like it could with debian buster:

 

After fixing the lighttpd - Pihole does work now with debian buster on the NanoPi A64 ;)

 

Maybe later I will try a more normal config ;)

 

ENABLE=true
MIN_SPEED=648000
MAX_SPEED=1010000
GOVERNOR=ondemand
 

Share this post


Link to post
Share on other sites

Hi, Is there any link to download this version with the changes to support the A64? 

Also how stable is it and is there any improvements that can be done?

Share this post


Link to post
Share on other sites
21 minutes ago, Rami Khawaly said:

Hi, Is there any link to download this version with the changes to support the A64? 

Also how stable is it and is there any improvements that can be done?

No :( there is no downloadable image, because its unofficial.

You could install the armbian-build-system and change the file of the Pine64 (see first page of this thread) and compile the image by yourself.

 

Another non-armbian-option is to take a look at

https://github.com/avafinger/nanopi-a64-firmware   or

https://github.com/avafinger/nanopi-a64-kodi

Share this post


Link to post
Share on other sites

little change at usb@1c19000 for the .dts/.dtb in the latest compile:

 

change from:

dr_mode = "otg";
status = "disabled";

change to:

status = "okay";
dr_mode = "host";

and you will get a working new version with boot usb-ports also working ;)
 

login as: root
root@192.168.6.116's password:
 _   _ ____  _         _    __   _  _
| \ | |  _ \(_)       / \  / /_ | || |
|  \| | |_) | |_____ / _ \| '_ \| || |_
| |\  |  __/| |_____/ ___ \ (_) |__   _|
|_| \_|_|   |_|    /_/   \_\___/   |_|

Welcome to Debian Buster with Armbian Linux 5.3.0-rc6-sunxi64
package bsp-kernel[5.96] u-boot[5.96] dtb[5.96] firmware[5.96] config[5.96]

System load:   0.03 0.07 0.03   Up time:       4 min
Memory usage:  10 % of 989MB    IP:            192.168.6.116
CPU temp:      39°C
Usage of /:    10% of 15G

[ General system configuration (beta): armbian-config ]

Last login: Fri Sep  6 15:00:08 2019 from 192.168.6.17

root@npi-a64(192.168.6.116):~#

armbianmonitor -u
System diagnosis information will now be uploaded to http://ix.io/1Uqg
 

Share this post


Link to post
Share on other sites

Here the commands for uncompile/editing and compiling the .dtb / .dts - files

(

check filename because of your board-configuration file in the armbian-build-system

maybe 

sun50i-a64-nanopi-a64 or

sun50i-a64-nanopia64

------------------------------------------------------------------------
CONVERT dtb to dts
------------------------------------------------------------------------
dtc -I dtb -O dts /boot/dtb/allwinner/sun50i-a64-nanopi-a64.dtb -o /boot/dtb/allwinner/sun50i-a64-nanopi-a64.dts

------------------------------------------------------------------------
EDIT dts
------------------------------------------------------------------------
nano /boot/dtb/allwinner/sun50i-a64-nanopi-a64.dts

------------------------------------------------------------------------
CONVERT (BACK) dts to dtb
------------------------------------------------------------------------	
dtc -I dts -O dtb /boot/dtb/allwinner/sun50i-a64-nanopi-a64.dts -o /boot/dtb/allwinner/sun50i-a64-nanopi-a64.dtb

 

Share this post


Link to post
Share on other sites

I have two boards of nanopi-a64. after following the instructions here to enable usb and hdmi audio, i've tried also making the audio jack working (at least for audio output).

 

I did the inclusion of a custom board config as stated in post #1 of this thread.

 

Here is my patch file I add to <armbian-build-path>/patch/kernel/sunxi-dev/
I named it xxx-xxx-nanopi-a64-fix-usb-and-audio.patch so that it would be executed last on the patching stage of the build.

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-nanopi-a64.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-nanopi-a64.dts
index 9b9d915..0b671c7 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-nanopi-a64.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-nanopi-a64.dts
@@ -283,3 +283,48 @@
 &usbphy {
 	status = "okay";
 };
+
+&codec {
+    status = "okay";
+};
+
+&codec_analog {
+    cpvdd-supply = <&reg_eldo1>;
+    status = "okay";
+};
+
+&dai {
+    status = "okay";
+};
+
+&i2s1 {
+    status = "okay";
+};
+
+&i2s2 {
+    status = "okay";
+};
+
+&sound {
+  simple-audio-card,aux-devs = <&codec_analog>;
+  simple-audio-card,widgets = "Microphone", "Microphone Jack",
+            "Headphone", "Headphone Jack";
+  simple-audio-card,routing =
+      "Left DAC", "AIF1 Slot 0 Left",
+      "Right DAC", "AIF1 Slot 0 Right",
+      "Headphone Jack", "HP",
+      "AIF1 Slot 0 Left ADC", "Left ADC",
+      "AIF1 Slot 0 Right ADC", "Right ADC",
+      "MIC2", "Microphone Jack";
+  status = "okay";
+};
+
+&sound_hdmi {
+    status = "okay";
+};
+
+&usb_otg {
+    dr_mode = "host";
+    status = "okay";
+};
+

Adding it at the patching stage avoids having to decompile and recompile into dtb and replacing the one at the boot.

So far so good, audio on hdmi and the audio jack works, you just have to set the default sink device on pulse audio's settings if you want to use either audio outputs.

 

Be aware though that is needed to hold the linux-dtb-dev-sunxi and linux-dtb-dev-sunxi64 packages so that the patches above wont be lost when running apt-get upgrade.

 

Share this post


Link to post
Share on other sites
On 9/15/2019 at 1:09 AM, kevinplatt said:

Be aware though that is needed to hold the linux-dtb-dev-sunxi and linux-dtb-dev-sunxi64 packages so that the patches above wont be lost when running apt-get upgrade.


If you get this working, send a PR (to dev and next) and you don't need to worry about ;) In case board works well, we could also add an image ... we have it for some other CSC targets as well.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
0