Difference between revisions of "RockBox"

From PINE64
Jump to navigation Jump to search
 
(16 intermediate revisions by 3 users not shown)
Line 1: Line 1:
[[File:rockbox.png|400px|thumb|right|Rendering of the RockBox]]
[[File:rockbox.png|400px|thumb|right|Rendering of the RockBox]]


The '''Popcorn Hour RockBox Basic''' is a TV box from the Cloud Media company in partnership with ''PINE64'' and the ''PINE64'' community. It is running a Rockchip RK3328 SoC and is supporting multiple different operating systems. The device is similar to the [[Rock64]] and runs some of its operating systems, it has a custom PCB and multiple hardware differences however.
The '''Popcorn Hour RockBox Basic''' is a TV box from the Cloud Media company in partnership with ''PINE64'' and the ''PINE64'' community. It is running a Rockchip RK3328 SoC and is supporting multiple different operating systems. The device is similar to the [[ROCK64]] and runs some of its operating systems, it has a custom PCB and multiple hardware differences however.


== Specifications ==
== Specifications ==
* '''Dimensions''': TODO
* '''Dimensions''': 106mm x 106mm x 16.9mm
* '''Weight''': TODO
* '''Weight''': 143 g
* '''CPU''': Rockchip RK3328, Quad core Cortex-A53 @ up to 1.5GHz
* '''CPU''': Rockchip RK3328, Quad core Cortex-A53 @ up to 1.5GHz
* '''GPU''': Mali-450MP2
* '''GPU''': Mali-450MP2
Line 18: Line 18:
== Software releases ==
== Software releases ==


* [https://github.com/mrfixit2001/debian_builds/releases Mrfixit2001's Debian Minimal Release] (Note: can be updated to a more recent Debian using the regular updating tools, except for the kernel and u-boot)
* [https://www.retro-center.com/about-r-cade/ Retro-Center's R-Cade: 100+ retro-gaming systems, a lightweight web browser, and 4k UHD media center] on the [https://www.retro-center.com/product/rockbox-r-cade/ RockBox R-Cade]
* [https://github.com/mrfixit2001/debian_builds/releases Mrfixit2001's Debian Minimal Release] (note: can be updated to a more recent Debian using the regular updating tools, except for the kernel and u-boot)
* [https://libreelec.tv/downloads/rockchip/ LibreELEC Rockchip] (note: select ''[https://releases.libreelec.tv/LibreELEC-RK3328.arm-9.2.6-rockbox.img.gz LibreELEC-RK3328.arm-9.2.6-rockbox.img.gz]'')
 
== Hardware ==
 
=== LED ===
The blue LED can be controlled with via the sysfs (''/sys/devices/platform/leds/leds/power/brightness''):
 
To turn off the blue LED: <code>echo 0 | sudo tee /sys/devices/platform/leds/leds/power/brightness</code>
 
To turn on the blue LED: <code>echo 1 | sudo tee /sys/devices/platform/leds/leds/power/brightness</code>
 
Note: the maximum brightness is defined as 255, it doesn't support dimming however, so 0 and 1 as brightness is sufficient. Turning off the blue LED will turn on a weak red LED. Trigger can be changed via ''/sys/devices/platform/leds/leds/power/trigger''.


== Development ==
== Development ==
Line 42: Line 55:
=== Mainline Linux ===
=== Mainline Linux ===


{{Note|The following paragraph is just for testing purposes and will be changed in the future}}
Mainline Linux works on the RockBox without patches. To create a compatible u-boot image, https://github.com/mrfixit2001/uboot_builder may be used. The ''dtb'' has to be compiled from a recent ''dts'', such as [https://github.com/mrfixit2001/mainline-kernel/blob/master/arch/arm64/boot/dts/rockchip/rk3328-rockbox.dts this], otherwise network and video won't work.
 
==== Building u-boot ====
{{hint|TODO}}


When using ''EXTLINUX'', the Linux kernel can be easily replaced by swapping the ''/boot/Image'' file with a more recent kernel (such as mainline Linux from Arch ARM, see [here http://os.archlinuxarm.org/os/ArchLinuxARM-aarch64-latest.tar.gz]. Note that this file is not updated with system updates and features such as Ethernet and video won't work.
==== Building the dtb ====
 
The dtb can be compiled from a recent dts. To do that, download a kernel source and add a dts, or use a kernel source with an fitting dts. The second variant is showcased here:
 
git clone https://github.com/mrfixit2001/mainline-kernel.git
 
Then change the directory to the kernel sources:
 
cd mainline-kernel
 
Then create a config (defaults can be accepted):
 
make ARCH=arm64 menuconfig
 
Now compile the dts files:
 
make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- -j 12 dtbs
 
The compiled dtb file can now be copied from ''/arch/arm64/boot/dts/rockchip/rk3328-rockbox.dtb'' into for example the EXTLINUX location.
 
==== Configuring EXTLINUX ====
 
In the EXTLINUX location, the ''/extlinux/extlinux.conf'' should be pointed to the correct kernel image and the correct dtb file. An example configuration (with serial output with 1500000 baud being enabled for the OS and with the root directory set to the second partition ''mmcblk1p2'') can look like the following example:
 
default ROCKBOX
label ROCKBOX
kernel /Image
fdt /rk3328-rockbox.dtb
append console=tty0 console=ttyS2,1500000n8 rw root=/dev/mmcblk1p2 rootwait rootfstype=ext4 panic=10 init=/sbin/init coherent_pool=1M ethaddr=${ethaddr} eth1addr=${eth1addr} serial=${serial#} cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory swapaccount=1 video=HDMI-A-1:1920x1080@60 loglevel=3


== External resources ==
== External resources ==


* [https://www.retro-center.com/product/rockbox-r-cade/ Retro Center online store]
* [https://www.retro-center.com/about-r-cade/ R-Cade software detail]
* [http://www.networkedmediatank.com/forumdisplay.php?fid=154 Networked Media Tank forum section]
* [http://www.networkedmediatank.com/forumdisplay.php?fid=154 Networked Media Tank forum section]
* [https://forum.pine64.org/forumdisplay.php?fid=85&page=1 PINE64 forum]
* [https://forum.pine64.org/forumdisplay.php?fid=85&page=1 PINE64 forum]
[[Category:RockBox]]

Latest revision as of 15:47, 20 February 2023

Rendering of the RockBox

The Popcorn Hour RockBox Basic is a TV box from the Cloud Media company in partnership with PINE64 and the PINE64 community. It is running a Rockchip RK3328 SoC and is supporting multiple different operating systems. The device is similar to the ROCK64 and runs some of its operating systems, it has a custom PCB and multiple hardware differences however.

Specifications

  • Dimensions: 106mm x 106mm x 16.9mm
  • Weight: 143 g
  • CPU: Rockchip RK3328, Quad core Cortex-A53 @ up to 1.5GHz
  • GPU: Mali-450MP2
  • System Memory: 1GB LPDDR3
  • Internal Storage: 8GB eMMC
  • Connectivity: 802.11a/b/g/n, Ethernet 10/100
  • USB: 1x USB 2.0 OTG port, 1x USB 3.0 port
  • Video Output: HDMI Standard HDMI 2.0a@60hz
  • Audio Output: Via HDMI, Optical S/PDIF port
  • Power Supply: DC 5V/2A

Software releases

Hardware

LED

The blue LED can be controlled with via the sysfs (/sys/devices/platform/leds/leds/power/brightness):

To turn off the blue LED: echo 0 | sudo tee /sys/devices/platform/leds/leds/power/brightness

To turn on the blue LED: echo 1 | sudo tee /sys/devices/platform/leds/leds/power/brightness

Note: the maximum brightness is defined as 255, it doesn't support dimming however, so 0 and 1 as brightness is sufficient. Turning off the blue LED will turn on a weak red LED. Trigger can be changed via /sys/devices/platform/leds/leds/power/trigger.

Development

Disassembly

The device can be easily disassembled by removing the four rubber feet and by unscrewing the four screws underneath them. The board is held in place by additional two black screws. Note: The board is connected to the main body with a cable.

UART

Internals of the RockBox with the UART contacts visible on the bottom right

A serial console can be connected to the RockBox to retrieve the UART boot logs. A device such as a USB to TTL converter can be used to connect the RockBox. Simply set the USB device to 3.3 volts and connect GND to the GND connector on the mainboard, RTX to TX and TXD to RX. The fourth unlabelled contact on the mainboard should not be connected. Note: Unlike the ROCKPro64, connecting TXD does not prevent the device from booting up.

Connect the USB device to the PC and use a tool such as screen to display the serial output:

screen /dev/ttyUSB0 1500000

Then power up the RockBox and enjoy the serial output on the PC.

To enable UART output in the OS as well (otherwise the output would stop at "Starting kernel ..."), console=ttyS2,1500000n8 can be added to the append line in the /boot/extlinux.conf file when using EXTLINUX.

Mainline Linux

Mainline Linux works on the RockBox without patches. To create a compatible u-boot image, https://github.com/mrfixit2001/uboot_builder may be used. The dtb has to be compiled from a recent dts, such as this, otherwise network and video won't work.

Building u-boot

TODO

Building the dtb

The dtb can be compiled from a recent dts. To do that, download a kernel source and add a dts, or use a kernel source with an fitting dts. The second variant is showcased here:

git clone https://github.com/mrfixit2001/mainline-kernel.git

Then change the directory to the kernel sources:

cd mainline-kernel

Then create a config (defaults can be accepted):

make ARCH=arm64 menuconfig

Now compile the dts files:

make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- -j 12 dtbs

The compiled dtb file can now be copied from /arch/arm64/boot/dts/rockchip/rk3328-rockbox.dtb into for example the EXTLINUX location.

Configuring EXTLINUX

In the EXTLINUX location, the /extlinux/extlinux.conf should be pointed to the correct kernel image and the correct dtb file. An example configuration (with serial output with 1500000 baud being enabled for the OS and with the root directory set to the second partition mmcblk1p2) can look like the following example:

default ROCKBOX

label ROCKBOX
kernel /Image
fdt /rk3328-rockbox.dtb
append console=tty0 console=ttyS2,1500000n8 rw root=/dev/mmcblk1p2 rootwait rootfstype=ext4 panic=10 init=/sbin/init coherent_pool=1M ethaddr=${ethaddr} eth1addr=${eth1addr} serial=${serial#} cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory swapaccount=1 video=HDMI-A-1:1920x1080@60 loglevel=3

External resources