Skip to content

Commit

Permalink
Updated RockBox docs
Browse files Browse the repository at this point in the history
  • Loading branch information
x1y committed Feb 10, 2024
1 parent 80fee95 commit 63ccec0
Show file tree
Hide file tree
Showing 9 changed files with 38 additions and 29 deletions.
17 changes: 7 additions & 10 deletions content/documentation/RockBox/Development/Mainline_Linux.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@ menu:

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

TIP: 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:
Expand All @@ -39,10 +35,11 @@ The compiled dtb file can now be copied from _/arch/arm64/boot/dts/rockchip/rk33

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
----
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
----
24 changes: 24 additions & 0 deletions content/documentation/RockBox/Development/UART.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
title: "UART"
draft: false
menu:
docs:
title:
parent: "RockBox/Development"
identifier: "RockBox/Development/UART"
weight: 3
---

image:/documentation/RockBox/images/rockbox_internals.jpg[Internals of the RockBox with the UART contacts visible on the bottom right,title="Internals of the RockBox with the UART contacts visible on the bottom right",width=400]

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_.
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
---
title: "LED"
title: "Hardware"
draft: false
menu:
docs:
title:
parent: "RockBox/Hardware"
identifier: "RockBox/Hardware/LED"
weight:
parent: "RockBox"
identifier: "RockBox/Hardware"
weight: 3
---

== LEDs

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`
Expand All @@ -17,5 +19,3 @@ To turn on the blue LED: `echo 1 | sudo tee /sys/devices/platform/leds/leds/powe

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

12 changes: 0 additions & 12 deletions content/documentation/RockBox/Hardware/_index.adoc

This file was deleted.

2 changes: 1 addition & 1 deletion content/documentation/RockBox/_index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ menu:
weight:
---

image:/documentation/images/rockbox.png[Rendering of the RockBox,title="Rendering of the RockBox",width=400]
image:images/rockbox.png[Rendering of the RockBox,title="Rendering of the RockBox",width=400]

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 link:/documentation/ROCK64[ROCK64] and runs some of its operating systems, it has a custom PCB and multiple hardware differences however.

File renamed without changes
Binary file removed content/documentation/images/Rockchip_RK3328.png
Binary file not shown.
Binary file removed content/documentation/images/Rockchip_RK3399.png
Binary file not shown.

0 comments on commit 63ccec0

Please sign in to comment.