Jump to content

RK3328 Kernel


Peba

Recommended Posts

Found a GIC-related patch on RK3288 (and actually a bunch of other) SoC's concerning interface size, https://github.com/torvalds/linux/commit/387720c93812f1e702c20c667cb003a356e24a6c .  Building the rk3288 one, doubt I'll see anything new and different, but thought I'd give you guys a heads up, I see exynos and allwinner in the list as well.

 

[edit]

 

Looking through commits at rockchip, there are quite a few small error corrections in the rk3288.dtsi, I'm collecting them, and I'll clean up my patches accordingly.

Link to comment
Share on other sites

On 24.4.2017 at 2:47 PM, tkaiser said:

Since you're using OMV you should update your image with latest tweaks (IRQ affinity and 'special' OMV settings) or maybe simply give the optimized OMV image I built a few hours ago a try: OMV_3_0_72_Tinkerboard_4.4.63.7z (root password here is 'openmediavault' and will not be changed automatically on first login!)

 

I am currently playing with TK's OMV image. I was wondering whether your board reboots with 'init 6' or does it also stuck at the red LED like mine ?

 

 

Link to comment
Share on other sites

Some install routines, like the one from armbian need a reboot to complete the installation.
To find out what happens I tried to connect my UART cable; some basic information.

 

UART is on GPIO pins 8, 10 32, 33 and ground.
Unfortunately, there is no output at all, all I found on the internet is information for Tinker OS Debian here .

 

As I was not sucessful I tried this:
I sent an: init 6 and looked on in the log folder from the SDcard, if there is any. These were its last messages:

Spoiler

** SYSLOG: 
Apr 27 07:27:31 tinkerboard systemd[1]: Started Synchronise Hardware Clock to System Clock.
Apr 27 07:27:31 tinkerboard systemd[1]: Starting Beep before system shutdown...
Apr 27 07:27:31 tinkerboard systemd[1]: Stopping Session c1 of user root.
Apr 27 07:27:31 tinkerboard systemd[1]: Stopping system-ifup.slice.
Apr 27 07:27:31 tinkerboard systemd[1]: Removed slice system-ifup.slice.
Apr 27 07:27:31 tinkerboard systemd[1]: Stopping Sound Card.
Apr 27 07:27:31 tinkerboard systemd[1]: Stopped target Sound Card.
Apr 27 07:27:31 tinkerboard systemd[1]: Stopping User Manager for UID 0...
Apr 27 07:27:31 tinkerboard systemd[1]: Stopping WPA supplicant...
Apr 27 07:27:31 tinkerboard systemd[1585]: Stopping Default.
Apr 27 07:27:31 tinkerboard systemd[1585]: Stopped target Default.
Apr 27 07:27:31 tinkerboard systemd[1585]: Stopping Basic System.
Apr 27 07:27:31 tinkerboard systemd[1585]: Stopped target Basic System.
Apr 27 07:27:31 tinkerboard systemd[1585]: Stopping Paths.
Apr 27 07:27:31 tinkerboard systemd[1585]: Stopped target Paths.
Apr 27 07:27:31 tinkerboard systemd[1585]: Stopping Timers.
Apr 27 07:27:31 tinkerboard systemd[1585]: Stopped target Timers.
Apr 27 07:27:31 tinkerboard systemd[1585]: Stopping Sockets.
Apr 27 07:27:31 tinkerboard systemd[1585]: Stopped target Sockets.
Apr 27 07:27:31 tinkerboard systemd[1]: Stopping Authenticate and Authorize Users to Run Privileged Tasks...
Apr 27 07:27:31 tinkerboard systemd[1585]: Starting Shutdown.
Apr 27 07:27:31 tinkerboard systemd[1585]: Reached target Shutdown.
Apr 27 07:27:31 tinkerboard systemd[1]: Stopped target Graphical Interface.
Apr 27 07:27:31 tinkerboard rsyslogd: [origin software="rsyslogd" swVersion="8.4.2" x-pid="1124" x-info="http://www.rsyslog.com"] exiting on signal 15.

 

To find the cause, can someone give some hints were I would find necessary information - thank you.

 

Link to comment
Share on other sites

Tinker OS is the only distribution to use UART 1 as the communications port.  All others I've tried, including Armbian, use Uart 2, pins 32 and 33.  I have an FTDI Friend and a little pigtail harness I made for that purpose, I've been using it to debug since I became involved, see:

 

Link to comment
Share on other sites

interesting, the last line says of init 6 says reboot

Spoiler

[  OK  ] Stopped target Local File Systems.
         Unmounting /run/user/0...
         Unmounting /tmp...
         Stopping Monitoring of LVM2 mirrors, snapshots etc. ...ress polling...
         Stopping LSB: MD array assembly...
[  OK  ] Stopped Load/Save Random Seed.
[  OK  ] Unmounted /run/user/0.
[  OK  ] Unmounted /tmp.
[  OK  ] Stopped LSB: MD array assembly.
[  OK  ] Reached target Unmount All Filesystems.
[  OK  ] Stopped target Local File Systems (Pre).
         Stopping Create Static Device Nodes in /dev...
[  OK  ] Stopped Create Static Device Nodes in /dev.
         Stopping Remount Root and Kernel File Systems...
[  OK  ] Stopped Remount Root and Kernel File Systems.
[  OK  ] Reached target Shutdown.
[  538.490497] reboot: Restarting system

 

 

In the post you mention above you wrote:

Quote

I also see references to the now-gone eMMC, so it's probably trying to boot that and hanging.

Can it be, that the reboot squence still refers to that ?

 

Link to comment
Share on other sites

On a better note, I've hijacked the miqi device tree ( @Igor, I'm not sure how but I missed your response way back about stealing the Miqi one).  It (the kernel) did get mad about the storage situation, and the dts format likewise is more like the rockchip-linux model than it is like the 4.4 miqi setup, which most likely explains the rockchip-linux setup.  

 

[edit]  So mangling the miqi one didn't work out, it was getting messier by the second.  I did, however, decide to just stuff the Eddie Cai patch for the tinker board in there, renaming it miniarm, and it worked out.  Has 1080p desktop and not a lot else.  The LED's work...  ;-)

 

[final edit]   This image video output is extremely smooth, much better than the 4.4 based image.  I'm able to use Plex Web to play videos in a 2/3 screen sized window smoothly. 

 

In case anyone wants to check it out: http://sprunge.us/POjR

Link to comment
Share on other sites

Greetings everyone.

 

@TonyMac32 I tried to add a few lines to the DTS file integrated in the ARMbian tree, in order to enable preliminary support for Mali drivers and VCodec services to the Tinkerboard DTS file. If anyone could test this :

https://github.com/Miouyouyou/MyyQi/blob/master/patches/kernel/v4.11/0101-First-Mali-integration-test-for-ASUS-Tinkerboards.patch

 

A precompiled kernel and DTB file are available here. However the kernel come with minimal drivers support so I don't know if it will run directly on Tinkerboards.

0101-First-Mali-integration-test-for-ASUS-Tinkerboards.patch

Link to comment
Share on other sites

Thanks @Myy, I was actually looking at your repo last night, I'll give it a look later today after work.

 

In other news, it looks like the basic stuff will be in Kernel 4.12, including the wifi driver, albeit the old one (not sure why). However they've changed everything to tinker board from miniarm, so we'll have to adjust for that.

Link to comment
Share on other sites

Trying to figure out the audio thing, I can't find a single reference to the ALC4040 anywhere, that's the USB codec used on the Tinkerboard. 

 

Tinker OS dmesg:

[    2.917147] usb 3-1: Product: USB Audio
[    3.149587] input: Generic USB Audio as /devices/platform/ff500000.usb/usb3/3-1/3-1:1.255/0003:0BDA:481A.0004/input/input3
[    3.210790] hid-generic 0003:0BDA:481A.0004: input,hiddev0,hidraw3: USB HID v1.11 Device [Generic USB Audio] on usb-ff500000.usb-1/input255
[    7.225474]   #0: Generic USB Audio at usb-ff500000.usb-1, high speed

 

Armbian kernel 4.11:

[    1.867749] usb 3-1: new high-speed USB device number 2 using ehci-platform
[    2.255639] usb 3-1: config 1 has an invalid interface number: 255 but max is 6
[    2.255651] usb 3-1: config 1 has no interface number 6
[    2.256990] usb 3-1: New USB device found, idVendor=0bda, idProduct=481a
[    2.257002] usb 3-1: New USB device strings: Mfr=3, Product=1, SerialNumber=2
[    2.257012] usb 3-1: Product: USB Audio
[    2.257021] usb 3-1: Manufacturer: Generic
[    2.257030] usb 3-1: SerialNumber: 201405280001
[    4.376017] input: Generic USB Audio as /devices/platform/ff500000.usb/usb3/3-1/3-1:1.255/0003:0BDA:481A.0004/input/input4
[    4.428391] hid-generic 0003:0BDA:481A.0004: input,hiddev0,hidraw3: USB HID v1.11 Device [Generic USB Audio] on usb-ff500000.usb-1/input255

It looks like the results are the same,  but I can't for the life of me get sound out of the jack on Armbian.  Has anyone else had luck?

 

Going for a lobotomy on Tinker OS, it has a USB-audio device endoint like Armbian does, but it is also showing a "headset-output", which is the one that works.

 

[edit] forgot to check if the realtek "HDA-intel" module is in Armbian.

Link to comment
Share on other sites

Thank you Myy.  I pulled up the /usr/share/alsa directory and got this off of the Tinker OS image that's not part of Armbian:

 

CARDINFO{driver}=="rockchip_rt5616", INCLUDE="rt5616", GOTO="init_end"
CARDINFO{driver}=="rockchip_rt5640", INCLUDE="rt5640", GOTO="init_end"

 

Link to comment
Share on other sites

In the mainline kernel, I see references about the RT5640 for Tegra SoC and some Intel SoC, but nothing about Rockchip.

 

It might be necessary to write some code to adapt these drivers for Rockchip systems, in such kernels.

Link to comment
Share on other sites

Other news, getting wireless into mainline is going to be a pain, there is a rockchip-specific system interface file that references all sorts of goodness that they seem to have added to the kernel.  Running through the spaghetti.

Link to comment
Share on other sites

@TonyMac32

 

Thanks for the great work.

 

I had fairly simple needs - I just wanted an OS for the Tinker Board that would run the Squeezelite music player. I used your nightly from Thursday, installed Squeezelite from the Ubantu repository, edited the configuration files for my USB DAC and it worked first time. And has continued to work faultlessly since.

 

Concerning the audio socket on the TB that you asked about above; it is far from clear to me, from the ASUS documentation, what is actually is. Is it a digital output with capability to 24/192? Or an analogue output (like on the Pi) with something capability behind it to process up to 24/192 to analogue?

 

Anyway, thanks again for your work on this.

 

Chris

Link to comment
Share on other sites

Thanks Chris,

 

     There is a discrete codec on the board, that's the "ALC4040" chip, which, if using Realtek's website as reference, does not exist.  :rolleyes:.  The system reports it as a USB audio device, so I would guess it can do 24/192 digitally, not via onboard DAC (I think the Raspberry Pi is 10 bit?  Ugh.) 

 

So I did some comparing of the Tinker OS 1.4 kernel to the Armbian one source-wise, there is no difference, in fact spending a bit more time to carefully look, I just need to get pulseaudio to use Card 0 device 2 (Has the user friendly name of "Headset-output" on Tinker OS).   I've always simply used ALSA, so the pulseaudio part is less than amused with my tinkering.  (Pun not initially intended but wholly owned.)

 

**** List of PLAYBACK Hardware Devices ****
card 0: Audio [USB Audio], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: Audio [USB Audio], device 1: USB Audio [USB Audio #1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: Audio [USB Audio], device 2: USB Audio [USB Audio #2]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

 

Link to comment
Share on other sites

7 hours ago, TonyMac32 said:

I would guess it can do 24/192 digitally, not via onboard DAC

Two excerpts from the FAQ document dated: 15. February 2017 - I guess no changes so far.

 

6.What type of hardware interfaces does the Tinker board have
Tinker board has 4 x USB 2.0 ports, 1 x GbE LAN, 1 x 3.5mm audio jack with 192K/24bit audio, MIPI DSI/CSI

 

28. Is sound supported through HDMI
Yes, the sound output can be worked from HDMI or the 192K/24bit audio jack.

 

Did you have any luck with rebooting by now ?

 

Link to comment
Share on other sites

Hi,

Thank you all that have been doing the work here, I really appreciate this.

I've just finished my first version of a Volumio (volumio.org) port to Tinkerboard and have compiled the Armbian kernel and u-boot discussed in this topic.

Volumio is up and running ok, but.... as I had no time to check DACs and/or SoC sound drivers yet, I added the USB Audio driver as a module.

Output with my (otherwise perfect) XMOS based USB Audio is horrible, there is something terribly wrong with usb/ usb audio driver, never came across so much jittering and glitches.

I have not checked anything yet, but suspect hub bandwidth sharing. 

Has anyone else tried with a USB Audio device?

Link to comment
Share on other sites

Thank you @Myy, I'll take a look.

 

@gkkpch, I'll take a look, I was actually playing with I2S devices originally, I did plug in some USB headphones I have and didn't get any output, however I can't blame that on Armbian as whatever chipset the Klipsch headsets use is pretty finicky and was targetted at consoles.  I'll try it again with a creative labs "XMod" I have lying around, it worked with linux 10 years ago, it should still...   There was that comment by @tkaiser concerning an amazing number of IRQ's being generated by the OTG controller.  I haven't looked at that either since it hasn't caused any issues for what I'm doing at present, however I wonder if that could be causing Isochronous transfers to go haywire...  If I'm not mistaken the Tinker board does not actually expose the OTG controller, probably just as well to shut it off  (of course the official data also says it can't display a 4k desktop...  sooooo...)  Thoughts?

Link to comment
Share on other sites

...so.   I decided to give it another try in a bit more structured way, mpv will play MP3's like nobody's business with asound.conf set up to make card o device 2 default.  Volume is very loud very fast, but a start.  Firefox, on the other hand, spits out static and tries to make my ears bleed.  I'll do some digging, at least I know pulseaudio is (sort of) paying attention.  I'm guessing my woes come down to sample rates and channels.  This does sound pretty good through my ATH-M50x headphones, unlike a Pi...

 

As this is a USB device, I can say I'm not getting a jittery mess, I do seem to be running out of buffer to my home media server, but again, not the sound card.  I'm going to start from a fresh image and try to do it properly and get the kinks ironed out.  Not having any form of datasheet on this codec is a pain...  Anyone from ASUS reading this, take note and provide.  ;-)  Same goes for the rest of the board.

 

[edit]  Ran through 16 and 24 bit lossy compression files, and 16/44.1 and 24/96 FLAC, no playback issues.  So sample rate isn't it. 

Link to comment
Share on other sites

2 hours ago, TonyMac32 said:

...so.   I decided to give it another try in a bit more structured way, mpv will play MP3's like nobody's business with asound.conf set up to make card o device 2 default.  Volume is very loud very fast, but a start.  Firefox, on the other hand, spits out static and tries to make my ears bleed.  I'll do some digging, at least I know pulseaudio is (sort of) paying attention.  I'm guessing my woes come down to sample rates and channels.  This does sound pretty good through my ATH-M50x headphones, unlike a Pi...

 

On sunxi all(?) boards we apply this fix to Pulseaudio config to solve similar issues with sound through HDMI. 

Link to comment
Share on other sites

@TonyMac32

Thanks for the hint, that might be another option for improvement and because of the huge amount of interrupts, looking at changing cpu affinity could help too. 

However, when I checked the cpu governor, it appeared to be set to "powersave", definitely not what I intended. After changing this to "performance" the jittering has gone.

There are still a lot of settings to improve I guess....

 

Link to comment
Share on other sites

 

4 hours ago, zador.blood.stained said:

On sunxi all(?) boards we apply this fix to Pulseaudio config to solve similar issues with sound through HDMI. 

Thank you for that, I'll take a look later, I had a similar experience through I2S much earlier on, so that might be the ticket.

 

gkkpch, good find on the kernel, something else to look at later.

Link to comment
Share on other sites

we have not decided yet to change, @Igor does a good job keeping the kernel up-to-date. The one I pointed to will work, but may not be that current.

I'll give it a go at the weekend, for a headless install that might be sufficient.

Something else I noticed about "our" kernel: reboot does not work.

I solved the issue of the changing eth0 mac address with 2 patches for u-boot. I use mainline u-boot 2017.05-rc2

In case anyone is interested, one patch is rockchip: tinker: set ethaddr in late init and the other one i2c_eeprom: add read and write functions

 

Link to comment
Share on other sites

Well, I can try to build using it as the base and applying the updated patches, or just look at their commits and move them over to the Miqi kernel assuming no conflicts.  If I had a Miqi I'd be a little less nervous about that part...

 

@gkkpch The mac address fix is great, I was looking at the Tinker Board Kernel, they appear to have done it there instead of U-boot, https://github.com/TinkerBoard/debian_kernel/commit/2d84377b2c0541d9491ab33f936832634f5db123

 

Grabbing it in U-boot I like, instead of messing with the normal kernel drivers to add the function.

Link to comment
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...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines