Rockbox.org home
Downloads
Release release
Dev builds dev builds
Extras extras
themes themes
Documentation
Manual manual
Wiki wiki
Device Status device status
Support
Forums forums
Mailing lists mailing lists
IRC IRC
Development
Bugs bugs
Patches patches
Dev Guide dev guide
Search



Donate

Rockbox Technical Forums


Login with username, password and session length
Home Help Search Staff List Login Register
News:

Welcome to the Rockbox Technical Forums!

+  Rockbox Technical Forums
|-+  Rockbox Development
| |-+  New Ports
| | |-+  Shanling Q1
« previous next »
  • Print
Pages: [1] 2 3 ... 7

Author Topic: Shanling Q1  (Read 10303 times)

Offline amachronic

  • Developer
  • Member
  • *
  • Posts: 271
Shanling Q1
« on: May 23, 2021, 07:52:49 PM »
Well, I know I said I wasn't gonna do this, but some users here on the forum were asking about a Shanling Q1 port which got me to investigate the "trick" to run scripts on its OF... in the end I found out a bit more information than I originally intended!

I've made some headway disassembling the Q1's Linux kernel, and probably identified most of the important hardware components. I haven't done much on the "hosted" side of things 'cause it's not easy to get an interactive shell on the player. For anybody interested I posted my current findings on the wiki, https://www.rockbox.org/wiki/ShanlingQ1Port.

Long story short, it looks like a native port would be pretty easy. All the hard/tedious parts were implemented with the FiiO M3K port. The main downside with a native port is that wifi/bluetooth will probably never work in Rockbox. With a hosted port we at least have a chance of wrapping the OF kernel's functionality with menus, and if Shanling's kernel is well done then tbh there may not be much benefit to a native port. In the short term I'll probably just keep checking out the hardware/software and find out if the OF kernel has any serious shortcomings.

I emailed Shanling and asked them nicely if they'd release their Linux kernel sources for the greater good of Rockbox. I'm not expecting much on that front, but who knows? They might just help us out, it's at least worth asking.

There is one other annoyance -- the Q1's screen resolution is 360x400, which isn't used by any other Rockbox player. So there's no ready-made themes for it, even Cabbie will need to be ported.

I'd like to hear opinions about wireless support... making a wild guess, given Rockbox's "target audience" maybe I'm not the only user who doesn't care much for it.
Logged

Offline Milardo

  • Member
  • *
  • Posts: 78
Re: Shanling Q1
« Reply #1 on: May 23, 2021, 09:42:34 PM »
Quote from: amachronic on May 23, 2021, 07:52:49 PM
Well, I know I said I wasn't gonna do this, but some users here on the forum were asking about a Shanling Q1 port which got me to investigate the "trick" to run scripts on its OF... in the end I found out a bit more information than I originally intended!

I've made some headway disassembling the Q1's Linux kernel, and probably identified most of the important hardware components. I haven't done much on the "hosted" side of things 'cause it's not easy to get an interactive shell on the player. For anybody interested I posted my current findings on the wiki, https://www.rockbox.org/wiki/ShanlingQ1Port.

Long story short, it looks like a native port would be pretty easy. All the hard/tedious parts were implemented with the FiiO M3K port. The main downside with a native port is that wifi/bluetooth will probably never work in Rockbox. With a hosted port we at least have a chance of wrapping the OF kernel's functionality with menus, and if Shanling's kernel is well done then tbh there may not be much benefit to a native port. In the short term I'll probably just keep checking out the hardware/software and find out if the OF kernel has any serious shortcomings.

I emailed Shanling and asked them nicely if they'd release their Linux kernel sources for the greater good of Rockbox. I'm not expecting much on that front, but who knows? They might just help us out, it's at least worth asking.

There is one other annoyance -- the Q1's screen resolution is 360x400, which isn't used by any other Rockbox player. So there's no ready-made themes for it, even Cabbie will need to be ported.

I'd like to hear opinions about wireless support... making a wild guess, given Rockbox's "target audience" maybe I'm not the only user who doesn't care much for it.

A different port, but I'm interested in bluetooth support, is anybody still working on that feature, would like to use it on agptek rocker.
Logged

Offline Telehubis

  • Member
  • *
  • Posts: 17
Re: Shanling Q1
« Reply #2 on: May 24, 2021, 05:32:51 AM »
More devices is always a good thing!

But what about that touch screen; is that supported?
Logged

Offline 7o9

  • Member
  • *
  • Posts: 117
Re: Shanling Q1
« Reply #3 on: May 24, 2021, 08:19:43 AM »
Very nice, looking forward to your progress.

The Shanling app is not bad but compared to RockBox it feels incredibly limited. A hosted version would not be bad at all though native works great on the FiiO M3K.

The wireless functionality is not needed for me, I have always only ever used it with wired buds. The wifi functionality that was added in the latest official firmware feels more like a 'because we can' feature than actually useful.

@Telehubis: Seems the touchscreen is using the same controller as the touchstrip on the M3K so it will probably work similar too.
« Last Edit: May 24, 2021, 08:29:15 AM by 7o9 »
Logged

Offline speachy

  • Administrator
  • Member
  • *
  • Posts: 328
Re: Shanling Q1
« Reply #4 on: May 25, 2021, 07:52:19 AM »
Quote from: amachronic on May 23, 2021, 07:52:49 PM
I'd like to hear opinions about wireless support... making a wild guess, given Rockbox's "target audience" maybe I'm not the only user who doesn't care much for it.

WiFi probably isn't going to ever happen.  The Q1 uses an SDIO-attached broadcom b43xx.  It's not clear if it's a softmac or fullmac part, but either way writing a native driver for that chip is a major undertaking in its own right.  Not to mention potentially writing an 802.11 stack plus coming up with network-enabled applications and usecases.

Bluetooth is a lot simpler at the "driver" level, but we're faced with having to write a stack from scratch or port the likes of bluez/bluedroid, another substantial undertaking. At least that stack would be usable for our other BT-supporting targets...
Logged

Offline amachronic

  • Developer
  • Member
  • *
  • Posts: 271
Re: Shanling Q1
« Reply #5 on: June 06, 2021, 08:09:36 AM »
Just posting to let everyone know I have got Rockbox running on the Q1, but no audio or bootloader yet; I'm stuck trying to get the DAC to work. There's a patch in gerrit in case anyone is interested. The simulator works, at least (lol).

I will probably put this aside and come back later, hopefully some 'enlightenment' will strike and I'll figure out how to get the DAC working.
Logged

Offline 7o9

  • Member
  • *
  • Posts: 117
Re: Shanling Q1
« Reply #6 on: June 06, 2021, 02:14:48 PM »
Thanks for the update and your efforts.

I read the comment in Gerrit about the state of your attempts. I also read you have great Google-fu so I am sure you found the LG V30 code for this DAC. Would have hoped that helped.

How did you run it without a bootloader? Read the code, answer is USB boot  :)

Hopefully inspiration will strike at some point. The M3K port is great but the Q1 feels so much nicer and does not have the crazy touchpad.
« Last Edit: June 06, 2021, 02:30:15 PM by 7o9 »
Logged

Offline amachronic

  • Developer
  • Member
  • *
  • Posts: 271
Re: Shanling Q1
« Reply #7 on: June 06, 2021, 03:00:18 PM »
Problem is, I just don't know how the board is physically wired... I've got datasheets but it's no help if the DAC won't turn on.
Logged

Offline 7o9

  • Member
  • *
  • Posts: 117
Re: Shanling Q1
« Reply #8 on: June 08, 2021, 02:27:08 AM »
Saw in the IRC logs that you managed to get audio. Very exciting.

Great that enlightenment struck so quickly!
Logged

Offline Telehubis

  • Member
  • *
  • Posts: 17
Re: Shanling Q1
« Reply #9 on: June 14, 2021, 11:04:35 AM »
Just one note on the WiFi - perhaps a dual boot would solve it?
Logged

Offline amachronic

  • Developer
  • Member
  • *
  • Posts: 271
Re: Shanling Q1
« Reply #10 on: June 14, 2021, 01:47:57 PM »
Yeah, I actually got dual boot working today for the Q1 and FiiO M3K (that was a real pain due to OF kernel bugs...)

Since I'm here, I may as well say the Q1 port pretty much "works" hardware-wise, aside from some odds and ends, but you can really feel how neglected touchscreens are in Rockbox... It's something I hope to improve over time though. I was able to jury-rig the M3K's bootloader to work on the Q1, but I don't want to release something so half-baked, with the potential for things to go terribly wrong -- my own Q1 was "bricked" for a while due to one such mistake.
Logged

Offline 7o9

  • Member
  • *
  • Posts: 117
Re: Shanling Q1
« Reply #11 on: June 22, 2021, 03:25:48 PM »
I have been playing around a bit with the Q1 patch from Gerrit (https://gerrit.rockbox.org/r/c/rockbox/+/3460) and it works quite well.

You have to start it with usbboot as there is no bootloader yet and it takes some serious getting used to the 3x3 touchscreen grid input.

Having said that, it plays music quite nicely and just looks cool.

Hopefully one day it will be mature enough to use like any other Rockbox player. Unlike most, you can still actually buy the Q1!

Attached is a screendump taken from the actual Q1 running Rockbox and playing a tune.

* cabbiev2-q1.png (105.22 kB, 360x400 - viewed 256 times.)
Logged

Offline Telehubis

  • Member
  • *
  • Posts: 17
Re: Shanling Q1
« Reply #12 on: July 14, 2021, 01:07:07 PM »
Saw that Q1 port is available. That is such a great news!
I would like to check it out so can you please share how to install that via usbboot?
Also how to achieve dual boot / revert to OF?

Great work!
Logged

Offline amachronic

  • Developer
  • Member
  • *
  • Posts: 271
Re: Shanling Q1
« Reply #13 on: July 14, 2021, 04:38:29 PM »
You'd have to compile the bootloader yourself. All needed files spl.q1, bootloader.bin/.q1 will be in the bootloader build directory. Hold the play (middle) button at boot to enter USB boot mode. Once connected, run usbboot in utils/ingenic_tools:
Code: [Select]
./usbboot -c x1000 -1 <spl.q1> --wait 1 -2 <bootloader.bin>
You'll get a recovery menu; to install the bootloader you need to place bootloader.q1 onto your SD card. You should take a bootloader backup before installation; it creates a backup file named shanlingq1-boot.bin on your SD card. In case you want to revert to the 'pure' OF, simply put that file back on your SD and choose restore in the recovery menu.

Boot options:
  • hold NEXT (bottom button) to enter rockbox bootloader's recovery menu
  • hold PREV (top button) to enter OF
  • hold NEXT+PREV to run the OF recovery (this provides an alternate restore method if you lose your backup or want to upgrade or downgrade the OF)
Proper docs, bootloader binary, jztool support, etc, should be ready over the next little while. Theme site and daily builds will be available once the patch is merged.

Enjoy!
Logged

Offline amachronic

  • Developer
  • Member
  • *
  • Posts: 271
Re: Shanling Q1
« Reply #14 on: July 25, 2021, 11:38:13 AM »
Alright, at last there's bootloader binaries available for the Q1. Installation instructions and download links are in the manual. If there's anything unclear or confusing about the manual let me know and I'll fix it; the install process is basically the same as for the FiiO M3K so its installation forum thread might clarify things.
Logged

  • Print
Pages: [1] 2 3 ... 7
« previous next »
+  Rockbox Technical Forums
|-+  Rockbox Development
| |-+  New Ports
| | |-+  Shanling Q1
 

  • SMF 2.0.19 | SMF © 2021, Simple Machines
  • Rockbox Privacy Policy
  • XHTML
  • RSS
  • WAP2

Page created in 0.507 seconds with 17 queries.